diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-03-20 13:49:08 +0100 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-05-11 12:46:42 +0200 |
commit | f925315203f77d0241183ccabfc784d259b0a152 (patch) | |
tree | 2d92c75d7e19d48de1ed8da32b724b3603f5a3c6 /doc/man7/EVP_PKEY-EC.pod | |
parent | 6dbb277627de86578577185084378135605d2df1 (diff) |
Add convenience functions and macros for asymmetric key generation
Add EVP_PKEY_gen(), EVP_PKEY_Q_gen(), EVP_RSA_gen(), and EVP_EC_gen().
Also export auxiliary function OSSL_EC_curve_nid2name()
and improve deprecation info on RSA and EC key generation/management functions.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14695)
Diffstat (limited to 'doc/man7/EVP_PKEY-EC.pod')
-rw-r--r-- | doc/man7/EVP_PKEY-EC.pod | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/man7/EVP_PKEY-EC.pod b/doc/man7/EVP_PKEY-EC.pod index 839d18a894..6dfc1f16ae 100644 --- a/doc/man7/EVP_PKEY-EC.pod +++ b/doc/man7/EVP_PKEY-EC.pod @@ -159,6 +159,10 @@ An B<EVP_PKEY> context can be obtained by calling: An B<EVP_PKEY> ECDSA or ECDH key can be generated with a "P-256" named group by calling: + pkey = EVP_EC_gen("P-256"); + +or like this: + EVP_PKEY *key = NULL; OSSL_PARAM params[2]; EVP_PKEY_CTX *gctx = @@ -171,7 +175,7 @@ calling: params[1] = OSSL_PARAM_construct_end(); EVP_PKEY_CTX_set_params(gctx, params); - EVP_PKEY_gen(gctx, &key); + EVP_PKEY_generate(gctx, &key); EVP_PKEY_print_private(bio_out, key, 0, NULL); ... @@ -201,7 +205,7 @@ An B<EVP_PKEY> EC CDH (Cofactor Diffie-Hellman) key can be generated with a params[2] = OSSL_PARAM_construct_end(); EVP_PKEY_CTX_set_params(gctx, params); - EVP_PKEY_gen(gctx, &key); + EVP_PKEY_generate(gctx, &key); EVP_PKEY_print_private(bio_out, key, 0, NULL); ... EVP_PKEY_free(key); @@ -209,6 +213,7 @@ An B<EVP_PKEY> EC CDH (Cofactor Diffie-Hellman) key can be generated with a =head1 SEE ALSO +L<EVP_EC_gen(3)>, L<EVP_KEYMGMT(3)>, L<EVP_PKEY(3)>, L<provider-keymgmt(7)>, |