Import `offset-cookbook-mode`
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.
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.
@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 Ah, TIL. I will make the change then.
applied the missing CR in here: https://github.com/RustCrypto/AEADs/pull/587
Merged in #587
Thanks @sgmenda! Sorry it took so long!