boringssl/crypto/bn
Adam Langley c8e91d5798 bignum: allow concurrent BN_MONT_CTX_set_locked()
The lazy-initialisation of BN_MONT_CTX was serialising all threads, as noted by
Daniel Sands and co at Sandia. This was to handle the case that 2 or more
threads race to lazy-init the same context, but stunted all scalability in the
case where 2 or more threads are doing unrelated things! We favour the latter
case by punishing the former. The init work gets done by each thread that finds
the context to be uninitialised, and we then lock the "set" logic after that
work is done - the winning thread's work gets used, the losing threads throw
away what they've done.

(Imported from upstream's bf43446835bfd3f9abf1898a99ae20f2285320f3)
2014-06-20 13:17:40 -07:00
..
asm Add needed volatile qualifications. 2014-06-20 13:17:33 -07:00
add.c Inital import. 2014-06-20 13:17:32 -07:00
bn_error.c Add function to recover RSA CRT params. 2014-06-20 13:17:35 -07:00
bn_test.c Improvements in constant-time OAEP decoding. 2014-06-20 13:17:37 -07:00
bn.c Inital import. 2014-06-20 13:17:32 -07:00
bn.h Improvements in constant-time OAEP decoding. 2014-06-20 13:17:37 -07:00
CMakeLists.txt Inital import. 2014-06-20 13:17:32 -07:00
cmp.c Inital import. 2014-06-20 13:17:32 -07:00
convert.c Improvements in constant-time OAEP decoding. 2014-06-20 13:17:37 -07:00
ctx.c Inital import. 2014-06-20 13:17:32 -07:00
div.c Check for invalid divisors in BN_div. 2014-06-20 13:17:33 -07:00
exponentiation.c bignum: fix boundary condition in montgomery logic 2014-06-20 13:17:40 -07:00
gcd.c Inital import. 2014-06-20 13:17:32 -07:00
generic.c Inital import. 2014-06-20 13:17:32 -07:00
internal.h Inital import. 2014-06-20 13:17:32 -07:00
kronecker.c Inital import. 2014-06-20 13:17:32 -07:00
montgomery.c bignum: allow concurrent BN_MONT_CTX_set_locked() 2014-06-20 13:17:40 -07:00
mul.c Inital import. 2014-06-20 13:17:32 -07:00
prime.c Small prime generation. 2014-06-20 13:17:34 -07:00
random.c Safe (EC)DSA nonces. 2014-06-20 13:17:33 -07:00
rsaz_exp.c Inital import. 2014-06-20 13:17:32 -07:00
rsaz_exp.h Inital import. 2014-06-20 13:17:32 -07:00
shift.c Inital import. 2014-06-20 13:17:32 -07:00
sqrt.c Add function to recover RSA CRT params. 2014-06-20 13:17:35 -07:00