AES Encryption stopped working on 32 bit devices

I am using CryptoSwift library to perform AES 256 ECB encryption to encrypt password. Everything works fine in my local environment. But strangely enough, when I upload the app to iTuneConnect and test it through Test Flight, this encryption doesn't work in iOS version below 11 (It works in iOS version >= 11). It return some different encrypted text in Test flight build than my local build for the same string. Therefore encrypted string from TestFlight build cannot be decrypted back using the key which was used while encryption.


This issue started from last month, till then everything was working fine.

Has anyone encountered this issue. If so, can help to me fix this.

Replies

Given that CryptoSwift is a pure Swift crypto library — that is, it doesn’t use the system’s crypto APIs at all — I recommend that you escalate it via their support channel. It’s possible that they have a bug in 32-bit systems, or it’s possible that you’re just using their API incorrectly, but it’s hard to say without deep knowledge of their implementation.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Looks like Apple has got this bug recently in their system. If I upload the build without enableing Bitcode, everything works fine. With Bitcode enable, it breaks in 32 bit devices.

With Bitcode enable, it breaks in 32 bit devices.

Are you talking about breaking specific to CryptoSwift? Or just general breakage?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"