mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
17.02.2015 be0d3e368ca9459430cbae93cf96c40413696027
refs
author Matthew Swift <matthew.swift@forgerock.com>
Thursday, December 17, 2015 13:02 +0100
committer Matthew Swift <matthew.swift@forgerock.com>
Thursday, December 17, 2015 13:02 +0100
commitbe0d3e368ca9459430cbae93cf96c40413696027
tree cca235cc3aa6273cef8aa0a4024bfdd716b7bb9b tree | zip | gz
parent b872c4c424647ca1e61f96b125cdb4defe0aabd9 view | diff
OPENDJ-2558 - use secure PRNG for encryption IVs

The initial fix is to use the default secure PRNG for the JVM. Unless
overridden in the the JVM's configuration, "NativePRNG" will be used on
*nix systems and "SHA1PRNG" on Windows.

Note that NativePRNG consumes entropy from /dev/urandom using blocking
reads, and that SHA1PRNG has been reported to block less frequently, as
well as being more performant. We will use the default algorithm despite
the potential performance issue on *nix for three reasons:

* it is obviously the "preferred" algorithm chosen by the JVM vendor

* allows the administrator to override the algorithm/provider by
explicitly configuring their JVM parameters

* we automatically adapt to changes in the default algorithm based on
JVM version/vendor.

We may want to revisit this choice if we find that it becomes a
performance bottleneck. This may occur when performing bulk encryption
of sensitive attributes such as user passwords. Usually this is not the
case since passwords are hashed rather than encrypted.
1 files modified
8 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/crypto/CryptoManagerImpl.java 8 ●●●● diff | view | raw | blame | history