Skip to content

Part 6: Revamped AES Lightengine CFB mode from core API tweaks - #111

Open
officialfrancismendoza wants to merge 4 commits into
bcgit:feature/aes-tweaksfrom
officialfrancismendoza:feature/officialfrancismendoza/103-from-aes-tweaks-CFB-mode
Open

Part 6: Revamped AES Lightengine CFB mode from core API tweaks#111
officialfrancismendoza wants to merge 4 commits into
bcgit:feature/aes-tweaksfrom
officialfrancismendoza:feature/officialfrancismendoza/103-from-aes-tweaks-CFB-mode

Conversation

@officialfrancismendoza

@officialfrancismendoza officialfrancismendoza commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Building upon previous work on aes-lowmemory derivative crate (#98, #99) and CBC mode compatible with the aes-lowmemory derivative (#100, #101); specifically to implement AES CFB mode for the new aes-lowmemory crate and factoring in the new changes to the core API design.

This feature branch implements the lowmemory derivative of AES, with its corresponding CFB mode (#103), to be compatible with the new BlockCipherEncryptor / BlockCipherDecryptor split and BlockPermutation.

@officialfrancismendoza officialfrancismendoza self-assigned this Sep 2, 2026
@officialfrancismendoza officialfrancismendoza added the enhancement New feature or request label Sep 2, 2026
@officialfrancismendoza
officialfrancismendoza marked this pull request as draft September 2, 2026 12:27
@officialfrancismendoza
officialfrancismendoza requested review from dghgit and removed request for dghgit September 2, 2026 12:27
@dghgit
dghgit changed the base branch from release/0.1.3alpha to feature/aes-tweaks September 2, 2026 14:17
@dghgit dghgit changed the title Revamped AES Lightengine CFB mode from core API tweaks Part 6: Revamped AES Lightengine CFB mode from core API tweaks Sep 2, 2026

@dghgit dghgit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sanity check passed, ACVP passed.

Fabel 5.1 audit, passed.

Squash of the original two commits (7f96e1b "Initial add of revamped CFB
mode based off of aes-tweaks" and 2a5d834 "Restored file changes on 3
files to resolve failing checks issues"), whose net effect is this
change; the first had reverted three files the second restored. Rebased
onto feature/aes-tweaks at 0d06cf9; the port to the in-place block
cipher API follows in a separate commit.
… API

Follows ede3b9e (core: block cipher data methods work in place) and
60e0cc0 (core: fold BlockCipher into Algorithm) on feature/aes-tweaks:

* Cfb implements Algorithm (its permutation's name and strength) and the
  in-place hooks do_encrypt_blocks / do_decrypt_blocks. decrypt_pair
  builds the two cipher inputs in its keystream buffer, so the only
  extra copy is C_{j+1} for the chaining value.
* block_mode_cmd streams through a mutable buffer and writes it back out
  after transforming it, with no separate output buffer.
* The CFB tests and benches use the same by-value helpers and
  iter_batched setup as the CBC ones; the AES_CFB_* doctests and crate
  docs show the in-place calls.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@dghgit
dghgit force-pushed the feature/officialfrancismendoza/103-from-aes-tweaks-CFB-mode branch from 2cf944a to f07e73e Compare September 3, 2026 07:34
@officialfrancismendoza

Copy link
Copy Markdown
Contributor Author

@dghgit checked post force-push, seems fine.

@officialfrancismendoza
officialfrancismendoza marked this pull request as ready for review September 3, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants