commit | 31ece98da1b52769e24871066962990d28245f64 | [log] [tgz] |
---|---|---|
author | David Benjamin <davidben@google.com> | Mon Feb 21 14:25:13 2022 -0500 |
committer | Adam Langley <agl@google.com> | Wed Feb 23 19:12:21 2022 +0000 |
tree | d6e244889cb024184ec31415ed098c3565c4d7ac | |
parent | 17c8c811049a82d6c34897c718503444529c8d8b [diff] |
Align rsaz_avx2_preferred with x86_64-mont5.pl. x86_64-mont5.pl checks for both BMI1 and BMI2, because the MULX path also uses the ANDN instruction. Some history here from upstream: a5bb5bca52f57021a4017521c55a6b3590bbba7a, dated 2013-10-03, added the MULX path to x86_64-mont5.pl. At the time, the cpuid check was BMI2+ADX. (MULX comes from BMI2.) 37de2b5c1e370b493932552556940eb89922b027, dated 2013-10-09, made BN_mod_exp_mont_consttime prefer the MULX mont5 code over the AVX2 rsaz code, with a matching BMI2+ADX cpuid check. 8fc8f486f7fa098c9fbb6a6ae399e3c6856e0d87, dated 2016-01-25, tweaked some code to use the ANDN instruction, from BMI1. Correspondingly, it changed the cpuid check to be BMI1+BMI2+ADX. The BN_mod_exp_mont_consttime check was left unchanged. This CL fixes our version of the BN_mod_exp_mont_consttime check to match the assembly, by also checking BMI1. (This should be a no-op. Presumably any processor with BMI2 also has BMI1.) Change-Id: Ib0cacc7e2be840d970460eef4dd9ded7fb24231c Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/51547 Reviewed-by: Adam Langley <agl@google.com>
BoringSSL is a fork of OpenSSL that is designed to meet Google's needs.
Although BoringSSL is an open source project, it is not intended for general use, as OpenSSL is. We don't recommend that third parties depend upon it. Doing so is likely to be frustrating because there are no guarantees of API or ABI stability.
Programs ship their own copies of BoringSSL when they use it and we update everything as needed when deciding to make API changes. This allows us to mostly avoid compromises in the name of compatibility. It works for us, but it may not work for you.
BoringSSL arose because Google used OpenSSL for many years in various ways and, over time, built up a large number of patches that were maintained while tracking upstream OpenSSL. As Google's product portfolio became more complex, more copies of OpenSSL sprung up and the effort involved in maintaining all these patches in multiple places was growing steadily.
Currently BoringSSL is the SSL library in Chrome/Chromium, Android (but it's not part of the NDK) and a number of other apps/programs.
Project links:
There are other files in this directory which might be helpful: