Open zer0x64 opened 1 week ago
Okay, I found the underlying issue: BlockModeEncrypt/Decrypt
simply does not support encrypting/decrypting data that's not aligned to a block without using padding. Therefore, it simply cannot provide ciphertext stealing.
For now, I will do like the cts
crate is doing and manually implement the encrypt/decrypt methods on the Encryptor/Decryptor
Opened up for review, since the InOut
refactoring to do can be done in a separate PR.
All IEEE 1619-2018 tests passes, parallel computing is supported, and doc is done.
Made a rookie mistake, the GF operations are not constant time. This should be an easy fix
Right now I work on other things, so I will try to take a look at this in a week or two.
I implemented the trait on the
pre
release ofcipher
.Suggestions for the
cipher
crate:cts
crate simply bypasses the trait system and implement the encryption methods directly on the struct.Missing:
cipher
traits correctly (cannot actually be done, see comment below)InOut
-based methods, as I initially wrote the implementation in-place.If you've got any suggestion for the first point, it would be appreciated!