Fix typo in documents
[openssl.git] / doc / man7 / Ed25519.pod
1 =pod
2
3 =head1 NAME
4
5 Ed25519 - EVP_PKEY Ed25519 support
6
7 =head1 DESCRIPTION
8
9 The B<Ed25519> EVP_PKEY implementation supports key generation, one shot
10 digest sign and digest verify using PureEdDSA and B<Ed25519> (see RFC8032).
11 It has associated private and public key formats compatible with
12 draft-ietf-curdle-pkix-04.
13
14 No additional parameters can be set during key generation one shot signing or
15 verification. In particular, because PureEdDSA is used, when signing or
16 verifying a digest must B<NOT> be specified.
17
18 =head1 NOTES
19
20 The PureEdDSA algorithm does not support the streaming mechanism
21 of other signature algorithms using, for example, EVP_DigestUpdate().
22 The message to sign or verify must be passed using the one shot
23 EVP_DigestSign() asn EVP_DigestVerify() functions.
24
25 When calling EVP_DigestSignInit() or EVP_DigestSignUpdate() the
26 digest parameter B<MUST> be set to B<NULL>.
27
28 Applications wishing to sign certificates (or other structures such as
29 CRLs or certificate requests) using Ed25519 can either use X509_sign()
30 or X509_sign_ctx() in the usual way.
31
32 A context for the B<Ed25519> algorithm can be obtained by calling:
33
34  EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_ED25519, NULL);
35
36 =head1 EXAMPLE
37
38 This example generates an B<ED25519> private key and writes it to standard
39 output in PEM format:
40
41  #include <openssl/evp.h>
42  #include <openssl/pem.h>
43  ...
44  EVP_PKEY *pkey = NULL;
45  EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_ED25519, NULL);
46  EVP_PKEY_keygen_init(pctx);
47  EVP_PKEY_keygen(pctx, &pkey);
48  EVP_PKEY_CTX_free(pctx);
49  PEM_write_PrivateKey(stdout, pkey, NULL, NULL, 0, NULL, NULL);
50
51 =head1 SEE ALSO
52
53 L<EVP_PKEY_CTX_new(3)>,
54 L<EVP_PKEY_keygen(3)>,
55 L<EVP_DigestSignInit(3)>,
56 L<EVP_DigestVerifyInit(3)>,
57
58 =head1 COPYRIGHT
59
60 Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
61
62 Licensed under the OpenSSL license (the "License").  You may not use
63 this file except in compliance with the License.  You can obtain a copy
64 in the file LICENSE in the source distribution or at
65 L<https://www.openssl.org/source/license.html>.
66
67 =cut