bricke / Qt-AES

Native Qt AES encryption class
The Unlicense
502 stars 187 forks source link

AES CFB Without padding #48

Open bijanbina opened 1 year ago

bijanbina commented 1 year ago

Hi In AES-CFB is there anyway to encode data without padding in the Qt-AES library?

I used QAESEncryption::ZERO and QAESEncryption::ISO but it still changes the encrypted data length Thanks

bricke commented 1 year ago

Hi, going from memory here but i seem to remember that the data needs to be of an exact length to work with AES-CFB, hence the padding.

bijanbina commented 1 year ago

@bricke Hi, CFB, OFB and CTR modes are stream cipher modes, and therefore do not require padding. There is nothing stopping you from forcing padding, but unlike ECB/CBC modes, you don't need it for data that is not a multiple of the block size.

bricke commented 1 year ago

Can you send a MR?