Request for modificaton of OpenSSL_decrypt/encrypt documentation

[email protected] Mon, 9 Sep 2024 15:42:14 -0500
Newsgroups php.doc
Message-ID <[email protected]>
Version: 8.2
Both of the OpenSSL_decrypt/encrypt documentation use a "loose" 
definition/explanation of a supposed private/public key used for 
decryption/encryption.

Example (public_decrypt):

Parameters
"public_key must be the public key corresponding that was used to encrypt the data."

First of all, this is not the "best" English grammar.
Secondly, this does not explicitly clarify that the "corresponding key" is 
supposed to be the previously used private key used to encrypt the data.

Note: the initial statement after the function description implies the "proper 
key" (but still not explicit) that was used to encrypt the data:

"openssl_public_decrypt() decrypts data that was previous encrypted via 
openssl_private_encrypt() and stores the result into decrypted_data."

Proposed openssl_public_decrypt modification:

public_key
"public_key must be the public key that corresponds to the private key that was 
used to encrypt the data."

Proposed openssl_private_decrypt modification:
private_key

"private_key must be the private key that corresponds to the public key that was 
  used to encrypt the data."

This clarifies the assymetric key-pair in both cases. Without this 
clarification, there is an apparent discrepancy between the two "descriptions of 
keys" used for the particular function. This should also be applied 
"public_encrypt .." function.

Similar modifications should also be applied to the "openssl_private..." functions.

Don't "assume" that things are (trivially) obvious.