You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a method called ciphertext stealing (https://en.wikipedia.org/wiki/Ciphertext_stealing) which allows encryption of plaintext of artibrary length (the length does not have to be a multiply of blocksize) using ECB and CBC.
I see three ways how this can be integrated into the existing code:
a) add enable_cts=False parameter to constructors of AESModeOfOperationECB and AESModeOfOperationCBC, store the value in class and handle encryption/decryption with respect to this value
b) always perform CTS when len(plaintext) % blocksize > 0 or len(ciphertext) % blocksize > 0
c) create separate classes AESModeOfOperationECBCTS and AESModeOfOperationCBCCTS
Btw. Thanks for the library! Exactly what I was looking for after I realised that slowaes is dead. And your provide much more pleasant API. Thumbs up!
The text was updated successfully, but these errors were encountered:
We now have an optional parameter to specify padding options, so I will likely just add a PADDING_CTS in the non-distant future. If anyone wants this functionality soon-than-later, please +1 this issue. :)
There is a method called ciphertext stealing (https://en.wikipedia.org/wiki/Ciphertext_stealing) which allows encryption of plaintext of artibrary length (the length does not have to be a multiply of blocksize) using ECB and CBC.
I see three ways how this can be integrated into the existing code:
a) add enable_cts=False parameter to constructors of AESModeOfOperationECB and AESModeOfOperationCBC, store the value in class and handle encryption/decryption with respect to this value
b) always perform CTS when len(plaintext) % blocksize > 0 or len(ciphertext) % blocksize > 0
c) create separate classes AESModeOfOperationECBCTS and AESModeOfOperationCBCCTS
Btw. Thanks for the library! Exactly what I was looking for after I realised that slowaes is dead. And your provide much more pleasant API. Thumbs up!
The text was updated successfully, but these errors were encountered: