From 2073acdf9372a0c84af8fb605eda774ccba84092 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 30 Apr 2018 15:05:45 +0100 Subject: [PATCH 1/2] Clarify BN_mod_exp docs Specifically this is not supported with an even modulus and BN_FLG_CONSTTIME. Fixes #5082 --- doc/crypto/BN_add.pod | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/crypto/BN_add.pod b/doc/crypto/BN_add.pod index db3b0d45b4790..3d881f1038fd8 100644 --- a/doc/crypto/BN_add.pod +++ b/doc/crypto/BN_add.pod @@ -92,7 +92,9 @@ BN_exp() raises I to the I

-th power and places the result in I BN_mul(). BN_mod_exp() computes I to the I

-th power modulo I (C). This function uses less time and space than BN_exp(). +m>). This function uses less time and space than BN_exp(). Note that calling +this function with an even modulus and when any of B, B

or B have the +BN_FLG_CONSTTIME flag set is not supported. BN_gcd() computes the greatest common divisor of I and I and places the result in I. I may be the same B as I or From 997c544906bc95d9204ece7deb0383099970362e Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Tue, 1 May 2018 13:16:17 +0100 Subject: [PATCH 2/2] fixup! Clarify BN_mod_exp docs --- doc/crypto/BN_add.pod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/crypto/BN_add.pod b/doc/crypto/BN_add.pod index 3d881f1038fd8..418a6d7f9aac3 100644 --- a/doc/crypto/BN_add.pod +++ b/doc/crypto/BN_add.pod @@ -92,9 +92,9 @@ BN_exp() raises I to the I

-th power and places the result in I BN_mul(). BN_mod_exp() computes I to the I

-th power modulo I (C). This function uses less time and space than BN_exp(). Note that calling -this function with an even modulus and when any of B, B

or B have the -BN_FLG_CONSTTIME flag set is not supported. +m>). This function uses less time and space than BN_exp(). Do not call this +function when B is even and any of the parameters have the +B flag set. BN_gcd() computes the greatest common divisor of I and I and places the result in I. I may be the same B as I or