diff --git a/doc/crypto/RSA_public_encrypt.pod b/doc/crypto/RSA_public_encrypt.pod index b146ad38a8edf575cc647cc9c94701cf046eb820..910c4752b8d5c2c0be5197f0e5f64ea2f8aa1324 100644 --- a/doc/crypto/RSA_public_encrypt.pod +++ b/doc/crypto/RSA_public_encrypt.pod @@ -18,7 +18,7 @@ RSA_public_encrypt, RSA_private_decrypt - RSA public key cryptography RSA_public_encrypt() encrypts the B bytes at B (usually a session key) using the public key B and stores the ciphertext in -B. B must point to B bytes of memory. +B. B must point to RSA_size(B) bytes of memory. B denotes one of the following modes: @@ -46,21 +46,21 @@ Encrypting user data directly with RSA is insecure. =back -B must be less than RSA_size(rsa) - 11 for the PKCS #1 v1.5 -based padding modes, and less than RSA_size(rsa) - 21 for +B must be less than RSA_size(B) - 11 for the PKCS #1 v1.5 +based padding modes, and less than RSA_size(B) - 21 for RSA_PKCS1_OAEP_PADDING. The random number generator must be seeded prior to calling RSA_public_encrypt(). RSA_private_decrypt() decrypts the B bytes at B using the private key B and stores the plaintext in B. B must point to a memory section large enough to hold the decrypted data (which is -smaller than B). B is the padding mode that +smaller than RSA_size(B)). B is the padding mode that was used to encrypt the data. =head1 RETURN VALUES RSA_public_encrypt() returns the size of the encrypted data (i.e., -RSA_size(rsa)). RSA_private_decrypt() returns the size of the +RSA_size(B)). RSA_private_decrypt() returns the size of the recovered plaintext. On error, -1 is returned; the error codes can be diff --git a/doc/crypto/RSA_sign.pod b/doc/crypto/RSA_sign.pod index b0d374f12fd1f014d6e7a5b8cd734578210a2675..f0bf6eea1b358ed0ae2a2fe2cd8747916f6eb21f 100644 --- a/doc/crypto/RSA_sign.pod +++ b/doc/crypto/RSA_sign.pod @@ -19,7 +19,7 @@ RSA_sign, RSA_verify - RSA signatures RSA_sign() signs the message digest B of size B using the private key B as specified in PKCS #1 v2.0. It stores the signature in B and the signature size in B. B -must point to B bytes of memory. +must point to RSA_size(B) bytes of memory. B denotes the message digest algorithm that was used to generate B. It usually is one of B, B and B;