]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Document that the RSA e value is mandatory when importing.
authorslontis <shane.lontis@oracle.com>
Wed, 25 Jan 2023 01:06:34 +0000 (11:06 +1000)
committerTomas Mraz <tomas@openssl.org>
Thu, 26 Jan 2023 10:04:30 +0000 (11:04 +0100)
The lab tried doing a RSA decryption primitive using just n (using p, q) and d.

This failed for 2 reasons:
(1) e is required when importing
(2) Internally e is used for blinding.

Note n and e can be calculated using:
n = pq
e = (1/d) mod (p-1)(q-1)

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20133)

doc/man7/EVP_PKEY-RSA.pod

index 3123813e9cd38624a811a26b53e9c00285040c9b..1a3f14cc230cac522ac9fc8fa51a4946519b72d7 100644 (file)
@@ -23,15 +23,18 @@ supports the following.
 
 =item "n" (B<OSSL_PKEY_PARAM_RSA_N>) <unsigned integer>
 
-The RSA "n" value.
+The RSA modulus "n" value.
 
 =item "e" (B<OSSL_PKEY_PARAM_RSA_E>) <unsigned integer>
 
-The RSA "e" value.
+The RSA public exponent "e" value.
+This value must always be set when creating a raw key using L<EVP_PKEY_fromdata(3)>.
+Note that when a decryption operation is performed, that this value is used for
+blinding purposes to prevent timing attacks.
 
 =item "d" (B<OSSL_PKEY_PARAM_RSA_D>) <unsigned integer>
 
-The RSA "d" value.
+The RSA private exponent "d" value.
 
 =item "rsa-factor1" (B<OSSL_PKEY_PARAM_RSA_FACTOR1>) <unsigned integer>