-1

I am integrating standard java cryptography classes in my Android application, but I noticed that the AES algorithm is not that fast, it cannot encrypt more than about 5 Kb per second, so do someone know if I can get more performance if I implement my own cryptography methods using NDK? or it is just being done already in the standard library? any suggestions is appreciated

ammcom
  • 992
  • 1
  • 7
  • 24
  • 1
    *if I implement my own cryptography methods using NDK* is an absolute no no! The standard cryptography libraries are standards tested and accepted, use them! Unless you are **an expert** on cryptography and **have a Phd in Mathematics**! Instead focus on why you state *the AES algorithm is not that fast*, elaborate on how you come to that conclusion, how did you measure that and come with figure of *about 5 Kb per second*? – t0mm13b May 24 '16 at 10:31
  • I get the answer thank you, BTW cryptography algorithms does not need PHD in math to be implemented. I am not asking about inventing new algirithms – ammcom May 24 '16 at 10:59

1 Answers1

2

Is Java Cryptography standard libraries in Android run as native code

On older devices, javax.crypto is implemented in Java code. Starting in Android 4.3 or 4.4, Android uses an OpenSSL-based javax.crypto provider, so most of the code will be native.

so do someone know if I can get more performance if I implement my own cryptography methods using NDK?

If by "implement my own cryptography methods", you mean "link to and use libcrypto", that may be faster on older devices, but I would not expect much difference on newer devices.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491