summaryrefslogtreecommitdiffstats
path: root/upstream/debian-unstable/man7/EVP_SIGNATURE-ED25519.7ssl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
commit4ad94864781f48b1a4b77f9cfb934622bf756ba1 (patch)
tree3900955c1886e6d2570fea7125ee1f01bafe876d /upstream/debian-unstable/man7/EVP_SIGNATURE-ED25519.7ssl
parentAdding upstream version 4.22.0. (diff)
downloadmanpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.tar.xz
manpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.zip
Adding upstream version 4.23.0.upstream/4.23.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/debian-unstable/man7/EVP_SIGNATURE-ED25519.7ssl')
-rw-r--r--upstream/debian-unstable/man7/EVP_SIGNATURE-ED25519.7ssl92
1 files changed, 76 insertions, 16 deletions
diff --git a/upstream/debian-unstable/man7/EVP_SIGNATURE-ED25519.7ssl b/upstream/debian-unstable/man7/EVP_SIGNATURE-ED25519.7ssl
index 0fcdcfe1..27df8aca 100644
--- a/upstream/debian-unstable/man7/EVP_SIGNATURE-ED25519.7ssl
+++ b/upstream/debian-unstable/man7/EVP_SIGNATURE-ED25519.7ssl
@@ -55,7 +55,7 @@
.\" ========================================================================
.\"
.IX Title "EVP_SIGNATURE-ED25519 7SSL"
-.TH EVP_SIGNATURE-ED25519 7SSL 2024-02-03 3.1.5 OpenSSL
+.TH EVP_SIGNATURE-ED25519 7SSL 2024-04-04 3.2.2-dev OpenSSL
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -68,29 +68,81 @@ Ed448
\&\- EVP_PKEY Ed25519 and Ed448 support
.SH DESCRIPTION
.IX Header "DESCRIPTION"
-The \fBEd25519\fR and \fBEd448\fR EVP_PKEY implementation supports key generation,
-one-shot digest sign and digest verify using PureEdDSA and \fBEd25519\fR or \fBEd448\fR
-(see RFC8032). It has associated private and public key formats compatible with
-RFC 8410.
+The \fBEd25519\fR and \fBEd448\fR EVP_PKEY implementation supports key
+generation, one-shot digest-sign and digest-verify using the EdDSA
+signature scheme described in RFC 8032. It has associated private and
+public key formats compatible with RFC 8410.
+.SS "EdDSA Instances"
+.IX Subsection "EdDSA Instances"
+RFC 8032 describes five EdDSA instances: Ed25519, Ed25519ctx,
+Ed25519ph, Ed448, Ed448ph.
+.PP
+The instances Ed25519, Ed25519ctx, Ed448 are referred to as \fBPureEdDSA\fR
+schemes. For these three instances, the sign and verify procedures
+require access to the complete message (not a digest of the message).
+.PP
+The instances Ed25519ph, Ed448ph are referred to as \fBHashEdDSA\fR
+schemes. For these two instances, the sign and verify procedures do
+not require access to the complete message; they operate on a hash of
+the message. For Ed25519ph, the hash function is SHA512. For
+Ed448ph, the hash function is SHAKE256 with an output length of 512
+bits.
+.PP
+The instances Ed25519ctx, Ed25519ph, Ed448, Ed448ph accept an optional
+\&\fBcontext-string\fR as input to sign and verify operations (and for
+Ed25519ctx, the context-string must be nonempty). For the Ed25519
+instance, a nonempty context-string is not permitted.
.SS "ED25519 and ED448 Signature Parameters"
.IX Subsection "ED25519 and ED448 Signature Parameters"
-No additional parameters can be set during one-shot signing or verification.
-In particular, because PureEdDSA is used, a digest must \fBNOT\fR be specified when
-signing or verifying.
+Two parameters can be set during signing or verification: the EdDSA
+\&\fBinstance name\fR and the \fBcontext-string value\fR. They can be set by
+passing an OSSL_PARAM array to \fBEVP_DigestSignInit_ex()\fR.
+.IP \(bu 4
+"instance" (\fBOSSL_SIGNATURE_PARAM_INSTANCE\fR) <utf8 string>
+.Sp
+One of the five strings "Ed25519", "Ed25519ctx", "Ed25519ph", "Ed448", "Ed448ph".
+.Sp
+"Ed25519", "Ed25519ctx", "Ed25519ph" are valid only for an Ed25519 EVP_PKEY.
+.Sp
+"Ed448", "Ed448ph" are valid only for an Ed448 EVP_PKEY.
+.IP \(bu 4
+"context-string" (\fBOSSL_SIGNATURE_PARAM_CONTEXT_STRING\fR) <octet string>
+.Sp
+A string of octets with length at most 255.
+.PP
+Both of these parameters are optional.
+.PP
+If the instance name is not specified, then the default "Ed25519" or
+"Ed448" is used.
+.PP
+If a context-string is not specified, then an empty context-string is
+used.
+.PP
+Note that a message digest name must \fBNOT\fR be specified when signing
+or verifying.
+.PP
See \fBEVP_PKEY\-X25519\fR\|(7) for information related to \fBX25519\fR and \fBX448\fR keys.
.PP
The following signature parameters can be retrieved using
\&\fBEVP_PKEY_CTX_get_params()\fR.
-.IP """algorithm-id"" (\fBOSSL_SIGNATURE_PARAM_ALGORITHM_ID\fR) <octet string>" 4
-.IX Item """algorithm-id"" (OSSL_SIGNATURE_PARAM_ALGORITHM_ID) <octet string>"
+.IP \(bu 4
+"algorithm-id" (\fBOSSL_SIGNATURE_PARAM_ALGORITHM_ID\fR) <octet string>
+.IP \(bu 4
+"instance" (\fBOSSL_SIGNATURE_PARAM_INSTANCE\fR) <utf8 string>
+.IP \(bu 4
+"context-string" (\fBOSSL_SIGNATURE_PARAM_CONTEXT_STRING\fR) <octet string>
+.PP
The parameters are described in \fBprovider\-signature\fR\|(7).
.SH NOTES
.IX Header "NOTES"
-The PureEdDSA algorithm does not support the streaming mechanism
-of other signature algorithms using, for example, \fBEVP_DigestUpdate()\fR.
+The PureEdDSA instances do not support the streaming mechanism of
+other signature algorithms using, for example, \fBEVP_DigestUpdate()\fR.
The message to sign or verify must be passed using the one-shot
\&\fBEVP_DigestSign()\fR and \fBEVP_DigestVerify()\fR functions.
.PP
+The HashEdDSA instances do not yet support the streaming mechanisms
+(so the one-shot functions must be used with HashEdDSA as well).
+.PP
When calling \fBEVP_DigestSignInit()\fR or \fBEVP_DigestVerifyInit()\fR, the
digest \fItype\fR parameter \fBMUST\fR be set to NULL.
.PP
@@ -114,7 +166,7 @@ Valid algorithm names are \fBed25519\fR, \fBed448\fR and \fBeddsa\fR. If \fBedds
specified, then both Ed25519 and Ed448 are benchmarked.
.SH EXAMPLES
.IX Header "EXAMPLES"
-To sign a message using a ED25519 or ED448 key:
+To sign a message using an ED25519 EVP_PKEY structure:
.PP
.Vb 5
\& void do_sign(EVP_PKEY *ed_key, unsigned char *msg, size_t msg_len)
@@ -123,8 +175,16 @@ To sign a message using a ED25519 or ED448 key:
\& unsigned char *sig = NULL;
\& EVP_MD_CTX *md_ctx = EVP_MD_CTX_new();
\&
-\& EVP_DigestSignInit(md_ctx, NULL, NULL, NULL, ed_key);
-\& /* Calculate the requires size for the signature by passing a NULL buffer */
+\& const OSSL_PARAM params[] = {
+\& OSSL_PARAM_utf8_string ("instance", "Ed25519ctx", 10),
+\& OSSL_PARAM_octet_string("context\-string", (unsigned char *)"A protocol defined context string", 33),
+\& OSSL_PARAM_END
+\& };
+\&
+\& /* The input "params" is not needed if default options are acceptable.
+\& Use NULL in place of "params" in that case. */
+\& EVP_DigestSignInit_ex(md_ctx, NULL, NULL, NULL, NULL, ed_key, params);
+\& /* Calculate the required size for the signature by passing a NULL buffer. */
\& EVP_DigestSign(md_ctx, NULL, &sig_len, msg, msg_len);
\& sig = OPENSSL_zalloc(sig_len);
\&
@@ -142,7 +202,7 @@ To sign a message using a ED25519 or ED448 key:
\&\fBEVP_DigestVerifyInit\fR\|(3),
.SH COPYRIGHT
.IX Header "COPYRIGHT"
-Copyright 2017\-2021 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2017\-2023 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the Apache License 2.0 (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy