Repository navigation
Conversation
For signature verification
| /// Verify the signature `signature` of message `msg` with the public key | ||
| /// `public_key` using the algorithm `alg`. | ||
| /// | ||
| /// To generate the public key from your DER-encoded private key, use |
There was a problem hiding this comment.
Since this is RSA-specific, let's put this text in the RSA example below, after the sentence ”RSA signing (but not verification) requires the rsa_signing feature to be enabled” and before the example code block.
I suggest using the wording like this:
Note that by default OpenSSL writes RSA public keys in SubjectPublicKeyInfo format, not RSAPublicKey format, and by default it Base64-encodes them (”PEM” format).
To convert the PEM SubjectPublicKeyInfo format to the binary RSAPublicKey format needed by
verify(), use:
sh <example code #2>
To extract the RSAPublicKey-formatted public key from an ASN.1 (binary) DER-encoded RSAPrivateKey format private key file, use:
sh <example code #1>
In particular, I think it makes more sense to document how to convert from the default OpenSSL format to the RSAPublicKey format first.
WDYT?
There was a problem hiding this comment.
Sure. Will make the changes.
|
Thanks! I landed this as d48469d with a couple of typo fixes. If/when you contribute in the future, please read https://github.com/briansmith/ring#contributing, and in particular please add the contributor's statement to the end of each commit's commit message. Thanks again! |
|
Oops. Thanks. Maybe you could add this information to the PR template. I didn't check it because I thought it's just a "simple" comment addition. |
For signature verification
Should address #470