Saturday, December 24, 2016

JVM Key size limitation

The Oracle JDK limits the key size it is possible to use for cryptography. Here there is an utility class that can check if your JVM has this limit.


KeyLengthDetector.java (thanks to jehrhardt)

1) Let's run it in a limited JVM :







We can see the key length is limited to 128.

If you can to suppress this limitation , it is possible by installing JCE on the JRE.

2) And now we run it on OpenJDK 9:








key length is : 2147483647

No comments:

Post a Comment