Skip to content

Part 3: AES CBC mode: BlockPermutation trait, bouncycastle-modes crate, CLI - #106

Open
dghgit wants to merge 3 commits into
feature/part2-aes-lowmemoryfrom
feature/part3-block-cipher-cbc
Open

Part 3: AES CBC mode: BlockPermutation trait, bouncycastle-modes crate, CLI#106
dghgit wants to merge 3 commits into
feature/part2-aes-lowmemoryfrom
feature/part3-block-cipher-cbc

Conversation

@dghgit

@dghgit dghgit commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Part 3 of 3, stacked on Part 2. Content is identical to #101 as reviewed and merged (commits ff9fa67..70706e7, by @officialfrancismendoza).

  • core: new BlockPermutation<KEY_LEN, BLOCK_LEN> trait (CIPH_K / CIPH^-1_K of SP 800-38A Sec 5.1) with provided encrypt_blocks2 / decrypt_blocks2; implemented by Aes128/192/256.
  • New crate crypto/modes (bouncycastle-modes): Cbc<P, Dir, KEY_LEN, BLOCK_LEN> over any BlockPermutation, direction encoded in the type, IV generated (never accepted) per SP 800-38A Sec 5.3, pair-path decryption.
  • core-test-framework: TestFrameworkBlockPermutation; fix to the TestFrameworkBlockCipher security-strength loop.
  • CLI: aes128-cbc / aes192-cbc / aes256-cbc encrypt|decrypt, IV carried as the first block of the stream; 16 subprocess tests.
  • Verified against all six SP 800-38A F.2 vector sets and 2150 NIST ACVP ACVP-AES-CBC cases; Appendix D error propagation tested exhaustively.

Follow-ups already prepared on feature/aes-tweaks (to be opened once this lands): AES_CBC_128/192/256 aliases, flat-array one-shots and streaming methods, and a simpler CLI reader.

@hubot
hubot force-pushed the feature/part3-block-cipher-cbc branch from 70706e7 to 7c59c1d Compare September 2, 2026 06:54
@hubot
hubot force-pushed the feature/part2-aes-lowmemory branch from f119c2a to 12ecfae Compare September 2, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants