RFR: 8260274: Cipher.init(int, key) does not use highest priority provider for random bytes

Anthony Scarpino ascarpino at openjdk.java.net
Mon Mar 15 20:59:06 UTC 2021


On Mon, 15 Mar 2021 20:39:13 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

> Can someone help review this somewhat trivial change?
> 
> Updated JCAUtil class to return the cached SecureRandom object only when the provider configuration has not changed. 
> Added a regression test to check the affected classes, i.e. AlgorithmParameterGenerator, KeyPairGenerator, Cipher, KeyAgreement, KeyGenerator. 
> 
> Thanks,
> Valerie

>From a performance standpoint, having a single synchronized block on every init() operations is going to slow things down

-------------

PR: https://git.openjdk.java.net/jdk/pull/3018


More information about the security-dev mailing list