Why do people use bouncycastle instead of Java's built in JCE provider? What is the difference?

JavaCryptography

Java Problem Overview


Why do people use bouncycastle instead of Java Cryptography Extension? What is the difference?

Java Solutions


Solution 1 - Java

BouncyCastle has many more cipher suites and algorithms than the default JCE provided by Sun.

In addition to that, BouncyCastle has lots of utilities for reading arcane formats like PEM and ASN.1 that no sane person would want to rewrite themselves.

Solution 2 - Java

Bouncy Castle is Australian in origin, and therefore is not subject to the [Export of cryptography from the United States][1].

It is useful if you are outside the United States and you need to manage key sizes grater than permitted by such that restriction. In that case you are not permitted to use software from United States for that.

[1]: https://en.wikipedia.org/wiki/Export_of_cryptography_from_the_United_States "Export of cryptography from the United States"

Solution 3 - Java

On server or desktop, I don't see any reason to use BC unless you have to deal with some legacy ciphers or formats not supported by Sun JCE.

However, many JREs don't come with a JCE provider, like on mobile or embedded environments. BC comes handy in such cases.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionclyfeView Question on Stackoverflow
Solution 1 - JavaKevinView Answer on Stackoverflow
Solution 2 - JavaLaurence R. UgaldeView Answer on Stackoverflow
Solution 3 - JavaZZ CoderView Answer on Stackoverflow