Skip to content Skip to sidebar Skip to footer

Android Aes In C

I wanna encrypt my files on PC(Windows 7, 64bit) and decrypt 'em on Android. I use this algo to encrypt files. http://gladman.plushost.co.uk/oldsite/AES/aes-byte-29-08-08.zip I e

Solution 1:

In general, you should not try to implement AES (or any other cryptographic algorithm) yourself (other to learn how it works) - use known libraries for production purposes.

For Java (you are using JNI here, aren't you?), use the Cryptography API (javax.crypto) which comes with the JRE. The same API is also available for Android (either the one which comes with the engine, or the BouncyCastle variant).

Then, make sure you are using

  • the same mode of operation (e.g. ECB (not recommended), CBC, CTR, CFB, OFB) for the block cipher. I have no idea which mode is done by your C implementation, maybe ECB. I suppose the default for Android is CBC.

  • the same key for encrypting and decryption.

Post a Comment for "Android Aes In C"