AEADs icon indicating copy to clipboard operation
AEADs copied to clipboard

Import `offset-cookbook-mode`

Open initsecret opened this issue 2 years ago • 3 comments

Re https://github.com/sgmenda/offset-cookbook-mode/issues/1

I slightly cleaned up the code, made the implementation generic over Aes, added more KATs, and tried to match the repo's style.

initsecret avatar Sep 16 '23 08:09 initsecret

Thank you for the detailed comments.

I'd like to push back gently against decoupling OCB3 from AES. This implementation of OCB3 assumes a 128-bit blockcipher, which limits its utility with other blockciphers.

initsecret avatar Oct 08 '23 00:10 initsecret

@sgmenda you can express the block size requirement generically by bounding on the BlockCipher trait, e.g.

Cipher: BlockCipher<BlockSize = U16>

One of the advantages of making the underlying cipher generic is that it becomes possible to replace the AES implementation with e.g. a hardware cryptographic accelerator. Embedded platforms which use such accelerators can benefit greatly from OCB because it cuts the number of cipher invocations in half versus e.g. the more commonly used CCM mode.

tarcieri avatar Oct 08 '23 00:10 tarcieri

@tarcieri Ah, TIL. I will make the change then.

initsecret avatar Oct 08 '23 00:10 initsecret

applied the missing CR in here: https://github.com/RustCrypto/AEADs/pull/587

dignifiedquire avatar Mar 24 '24 16:03 dignifiedquire

Merged in #587

Thanks @sgmenda! Sorry it took so long!

tarcieri avatar Mar 25 '24 20:03 tarcieri