external/boringssl: Sync to aa2485.
This includes the following changes:
https://boringssl.googlesource.com/boringssl/+log/171b5403ee767fa0f3aecd377867db6533c3eb8f..aa24851515d6280aa1d6a8b1548fe74691df3136
Bug: 29744850
Change-Id: Id4e4a9e7a19c2f0badbaead2c39a51037ba182ed
diff --git a/src/crypto/bn/sqrt.c b/src/crypto/bn/sqrt.c
index 2ed66c2..e3a7b9a 100644
--- a/src/crypto/bn/sqrt.c
+++ b/src/crypto/bn/sqrt.c
@@ -57,12 +57,11 @@
#include <openssl/err.h>
-/* Returns 'ret' such that
- * ret^2 == a (mod p),
- * using the Tonelli/Shanks algorithm (cf. Henri Cohen, "A Course
- * in Algebraic Computational Number Theory", algorithm 1.5.1).
- * 'p' must be prime! */
BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) {
+ /* Compute a square root of |a| mod |p| using the Tonelli/Shanks algorithm
+ * (cf. Henri Cohen, "A Course in Algebraic Computational Number Theory",
+ * algorithm 1.5.1). |p| is assumed to be a prime. */
+
BIGNUM *ret = in;
int err = 1;
int r;