开发者

Android slow AES decryption

开发者 https://www.devze.com 2023-04-01 07:49 出处:网络
Ref: Android encryption/decryption issue (AES) I am building an android app which requires aes decryption of a really large package (~50Mb) and it is really slow when implemented in android\'s inbuil

Ref: Android encryption/decryption issue (AES)

I am building an android app which requires aes decryption of a really large package (~50Mb) and it is really slow when implemented in android's inbuilt aes decryption mechanism (around 5 minutes).

Based on the above posts in SO, I attempted to use ndk and tried to download native libraries (openssl) to use开发者_StackOverflow中文版 for this app. However, openssl for android has a really large number of files and I do not know which ones to use to create the .so file.

I am quite inexperienced with the use of ndk and native code in android apps and would find any suggestions/sample code on how to use openssl library for aes decryption really useful.

Thanks in advance, Naveen


Try SpongyCastle its a repackaged BouncyCastle that wont conflict with the one released with Android. The one on Android systems is old (if you even have a release of Android that includes it).

This should be all you need.


I'm facing the same issue as Naveen.

I do have some doubts regarding spongy castle. Correct me if i'm wrong. This post i've found: http://www.coderanch.com/t/134504/Security/Bouncy-Castle-vs-Sun-JCE Seems like performance might be negligible. Though it did not specifically mentioned about spongycastle.bouncycastle but i'm assuming it is, as sun jce's crypto library uses a stripped down version of bouncy castle.

0

精彩评论

暂无评论...
验证码 换一张
取 消