Catch up to the removal of OSSL_STORE_open_file()
[openssl.git] / doc / man7 / X25519.pod
1 =pod
2
3 =head1 NAME
4
5 X25519 - EVP_PKEY X25519 support
6
7 =head1 DESCRIPTION
8
9 The B<X25519> EVP_PKEY implementation supports key generation and key
10 derivation using B<X25519>. It has associated private and public key formats
11 compatible with draft-ietf-curdle-pkix-03.
12
13 No additional parameters can be set during key generation.
14
15 The peer public key must be set using EVP_PKEY_derive_set_peer() when
16 performing key derivation.
17
18 =head1 NOTES
19
20 A context for the B<X25519> algorithm can be obtained by calling:
21
22  EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_X25519, NULL);
23
24 =head1 EXAMPLE
25
26 This example generates an B<X25519> private key and writes it to standard
27 output in PEM format:
28
29  #include <openssl/evp.h>
30  #include <openssl/pem.h>
31  ...
32  EVP_PKEY *pkey = NULL;
33  EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_X25519, NULL);
34  EVP_PKEY_keygen_init(pctx);
35  EVP_PKEY_keygen(pctx, &pkey);
36  EVP_PKEY_CTX_free(pctx);
37  PEM_write_PrivateKey(stdout, pkey, NULL, NULL, 0, NULL, NULL);
38
39 The key derivation example in L<EVP_PKEY_derive(3)> can be used with
40 B<X25519>.
41
42 =head1 SEE ALSO
43
44 L<EVP_PKEY_CTX_new(3)>,
45 L<EVP_PKEY_keygen(3)>,
46 L<EVP_PKEY_derive(3)>,
47 L<EVP_PKEY_derive_set_peer(3)>
48
49 =head1 COPYRIGHT
50
51 Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
52
53 Licensed under the OpenSSL license (the "License").  You may not use
54 this file except in compliance with the License.  You can obtain a copy
55 in the file LICENSE in the source distribution or at
56 L<https://www.openssl.org/source/license.html>.
57
58 =cut