emoose / ExCrypt

Open source replacement for the Xbox360 XeCrypt suite.
BSD 3-Clause "New" or "Revised" License
26 stars 4 forks source link

AesCbc differences #4

Open emoose opened 5 years ago

emoose commented 5 years ago

When encrypting, XeCrypt pads block with zeroes if a block is < 16, but atm we just treat every block as if it's 16 bytes, so trying to encrypt 65 bytes will result in those 65 bytes, and the following 15 bytes of whatever is in memory next to it (buffer overreads are fun!)

When decrypting, it seems only full blocks will be decrypted, eg. trying to decrypt 65 bytes will result in only 64 decrypted bytes being written.

Need to try and emulate the XeCrypt behaviors.