summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/BN_mod_inverse.3
diff options
context:
space:
mode:
authorschwarze <>2018-04-29 15:58:21 +0000
committerschwarze <>2018-04-29 15:58:21 +0000
commita60c20fc32aa2f822c683424f5bd90611e4d452f (patch)
treef067081374e9045588229a0f9af9373361fb2cbe /src/lib/libcrypto/man/BN_mod_inverse.3
parent0a991f6de98776a2cd65f3529adb8948b51c275a (diff)
downloadopenbsd-a60c20fc32aa2f822c683424f5bd90611e4d452f.tar.gz
openbsd-a60c20fc32aa2f822c683424f5bd90611e4d452f.tar.bz2
openbsd-a60c20fc32aa2f822c683424f5bd90611e4d452f.zip
In view of the recent BN_FLG_CONSTTIME vulnerabilities in OpenSSL,
carefully document constant time vs. non-constant time operation of BN_div(3), BN_mod_exp(3), and BN_mod_inverse(3). Until the work that is required on the ill-designed BN_exp(3) and BN_gcd(3) interfaces can be undertaken, also document the imperfections in their behaviour, for now. Finally, mention BN_mod_exp(3) behaviour for even moduli. Delete the vague statement about some functions automatically setting BN_FLG_CONSTTIME. It created a false sense of security. Do not rely on it: not all relevant functions do that. Topic brought up by beck@, significant feedback and OK jsing@.
Diffstat (limited to 'src/lib/libcrypto/man/BN_mod_inverse.3')
-rw-r--r--src/lib/libcrypto/man/BN_mod_inverse.312
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/libcrypto/man/BN_mod_inverse.3 b/src/lib/libcrypto/man/BN_mod_inverse.3
index ed6b6def4e..aa509b1ab6 100644
--- a/src/lib/libcrypto/man/BN_mod_inverse.3
+++ b/src/lib/libcrypto/man/BN_mod_inverse.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: BN_mod_inverse.3,v 1.9 2018/03/27 17:35:50 schwarze Exp $ 1.\" $OpenBSD: BN_mod_inverse.3,v 1.10 2018/04/29 15:58:21 schwarze Exp $
2.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 2.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
3.\" 3.\"
4.\" This file was written by Ulf Moeller <ulf@openssl.org>. 4.\" This file was written by Ulf Moeller <ulf@openssl.org>.
@@ -48,7 +48,7 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 49.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 50.\"
51.Dd $Mdocdate: March 27 2018 $ 51.Dd $Mdocdate: April 29 2018 $
52.Dt BN_MOD_INVERSE 3 52.Dt BN_MOD_INVERSE 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
@@ -80,6 +80,14 @@ a new
80.Vt BIGNUM 80.Vt BIGNUM
81is created. 81is created.
82.Pp 82.Pp
83If the flag
84.Dv BN_FLG_CONSTTIME
85is set on
86.Fa a
87or
88.Fa n ,
89it operates in constant time.
90.Pp
83.Fa ctx 91.Fa ctx
84is a previously allocated 92is a previously allocated
85.Vt BN_CTX 93.Vt BN_CTX