AES Decryption has different behavior in iOS 7 than iOS 8/9

我是研究僧i 提交于 2019-12-03 17:12:59
zaph

Quick guess since there is little information to go on:

The data was encrypted with a different padding that PKCS#7 (or PKCS#5). mcrypt(), while popular was written by some bozos and uses non-standard null padding which is both insecure and will not work if the last byte of the data is 0x00.

For more information on PKCs#7 passing see this SO answer.

Early versions of CCCrypt would return an error if the padding was obviously incorrect, that was a security error which was later corrected. IIRC iOS7 was the last version that reported bad padding as an error.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!