]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
doc: document the rsa_oaep_md: pkeyopt
authorPauli <pauli@openssl.org>
Tue, 31 Aug 2021 23:52:03 +0000 (09:52 +1000)
committerPauli <pauli@openssl.org>
Thu, 2 Sep 2021 00:09:15 +0000 (10:09 +1000)
This was missing but essential for using non-SHA1 digests with OAEP.

Fixes #15998

Manual backport of #16410

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16488)

doc/man1/pkeyutl.pod

index 3b350efadd4fb460b2df64a56c68716bff72b769..f6fd48d5b5790d5532e2867ee1585fec2cc82949 100644 (file)
@@ -246,6 +246,11 @@ B<PSS> block structure.
 For PSS and OAEP padding sets the MGF1 digest. If the MGF1 digest is not
 explicitly set in PSS mode then the signing digest is used.
 
+=item B<rsa_oaep_md:>I<digest>
+
+Sets the digest used for the OAEP hash function. If not explicitly set then
+SHA1 is used.
+
 =back
 
 =head1 RSA-PSS ALGORITHM
@@ -319,6 +324,11 @@ seed consisting of the single byte 0xFF:
  openssl pkeyutl -kdf TLS1-PRF -kdflen 48 -pkeyopt md:SHA256 \
     -pkeyopt hexsecret:ff -pkeyopt hexseed:ff -hexdump
 
+Decrypt some data using a private key with OAEP padding using SHA256:
+
+ openssl pkeyutl -decrypt -in file -inkey key.pem -out secret \
+    -pkeyopt rsa_padding_mode:oaep -pkeyopt rsa_oaep_md:sha256
+
 =head1 SEE ALSO
 
 L<genpkey(1)>, L<pkey(1)>, L<rsautl(1)>