Document how BN_mod_sqrt handles the `in` parameter We missed this case in the docs. Change-Id: I6401f987a82824a472a8ab0a697777bf1ae0a591 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/82787 Reviewed-by: Lily Chen <chlily@google.com> Commit-Queue: Lily Chen <chlily@google.com> Auto-Submit: David Benjamin <davidben@google.com>
diff --git a/include/openssl/bn.h b/include/openssl/bn.h index d35b06b..f6aca92 100644 --- a/include/openssl/bn.h +++ b/include/openssl/bn.h
@@ -505,6 +505,9 @@ // If |a| is a square and |p| > 2, there are two possible square roots. This // function may return either and may even select one non-deterministically. // +// If |in| is non-NULL, the function, instead of allocating the result, stores +// the result in |in| and returns |in| on success or NULL on failure. +// // This function only works if |p| is a prime. If |p| is composite, it may fail // or return an arbitrary value. Callers should not pass attacker-controlled // values of |p|.