Integrated: 8262316: Reducing locks in RSA Blinding

Anthony Scarpino ascarpino at
Wed Apr 7 17:32:51 UTC 2021

On Wed, 31 Mar 2021 21:47:24 GMT, Anthony Scarpino <ascarpino at> wrote:

> Hi,
> I need a review of the locking change to the RSA blinding code. The problem was reported that multithreaded performance suffered because there was one global lock on the many blindings operation.  The change reduces locking by using a ConcurrentLinkedQueue to store the different BlindingParameters that other threads maybe using.  The queue size is limited to prevent sudden surges in stored BlindingParameters and a WeakHashMap is still used so the objects can be freed when no longer used.  Performance doubles under high load.
> thanks
> Tony

This pull request has now been integrated.

Changeset: 7a99a987
Author:    Anthony Scarpino <ascarpino at>
Stats:     80 lines in 1 file changed: 37 ins; 17 del; 26 mod

8262316: Reducing locks in RSA Blinding

Reviewed-by: jnimeh



More information about the security-dev mailing list