Debian Codegraph @

upstream/debian-unstable/man7/EVP_MD-SHAKE.7ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "EVP_MD-SHAKE 7SSL"
58 .TH EVP_MD-SHAKE 7SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 EVP_MD\-SHAKE, EVP_MD\-KECCAK\-KMAC
65 \&\- The SHAKE / KECCAK family EVP_MD implementations
66 .SH DESCRIPTION
67 .IX Header "DESCRIPTION"
68 Support for computing SHAKE or KECCAK-KMAC digests through the
69 \&\fBEVP_MD\fR API.
70 .PP
71 KECCAK-KMAC is an Extendable Output Function (XOF), with a definition
72 similar to SHAKE, used by the KMAC EVP_MAC implementation (see
73 \&\fBEVP_MAC\-KMAC\fR\|(7)).
74 .SS Identities
75 .IX Subsection "Identities"
76 This implementation is available in the FIPS provider as well as the default
77 provider, and includes the following varieties:
78 .IP KECCAK\-KMAC\-128 4
79 .IX Item "KECCAK-KMAC-128"
80 Known names are "KECCAK\-KMAC\-128" and "KECCAK\-KMAC128". This is used
81 by \fBEVP_MAC\-KMAC128\fR\|(7). Using the notation from NIST FIPS 202
82 (Section 6.2), we have KECCAK\-KMAC\-128(M,\ d) = KECCAK[256](M\ ||\ 00,\ d)
83 (see the description of KMAC128 in Appendix A of NIST SP 800\-185).
84 .IP KECCAK\-KMAC\-256 4
85 .IX Item "KECCAK-KMAC-256"
86 Known names are "KECCAK\-KMAC\-256" and "KECCAK\-KMAC256". This is used
87 by \fBEVP_MAC\-KMAC256\fR\|(7). Using the notation from NIST FIPS 202
88 (Section 6.2), we have KECCAK\-KMAC\-256(M,\ d) = KECCAK[512](M\ ||\ 00,\ d)
89 (see the description of KMAC256 in Appendix A of NIST SP 800\-185).
90 .IP SHAKE\-128 4
91 .IX Item "SHAKE-128"
92 Known names are "SHAKE\-128" and "SHAKE128".
93 .IP SHAKE\-256 4
94 .IX Item "SHAKE-256"
95 Known names are "SHAKE\-256" and "SHAKE256".
96 .SS Parameters
97 .IX Subsection "Parameters"
98 This implementation supports the following \fBOSSL_PARAM\fR\|(3) entries:
99 .IP """xoflen"" (\fBOSSL_DIGEST_PARAM_XOFLEN\fR) <unsigned integer>" 4
100 .IX Item """xoflen"" (OSSL_DIGEST_PARAM_XOFLEN) <unsigned integer>"
101 Sets or Gets the digest length for extendable output functions.
102 The length of the "xoflen" parameter should not exceed that of a \fBsize_t\fR.
103 .Sp
104 The SHAKE\-128 and SHAKE\-256 implementations do not have any default digest
105 length.
106 .Sp
107 This parameter must be set before calling either \fBEVP_DigestFinal_ex()\fR or
108 \&\fBEVP_DigestFinal()\fR, since these functions were not designed to handle variable
109 length output. It is recommended to either use \fBEVP_DigestSqueeze()\fR or
110 \&\fBEVP_DigestFinalXOF()\fR instead.
111 .IP """size"" (\fBOSSL_DIGEST_PARAM_SIZE\fR) <unsigned integer>" 4
112 .IX Item """size"" (OSSL_DIGEST_PARAM_SIZE) <unsigned integer>"
113 An alias of "xoflen".
114 .PP
115 See "PARAMETERS" in \fBEVP_DigestInit\fR\|(3) for further information related to parameters
116 .SH NOTES
117 .IX Header "NOTES"
118 For SHAKE\-128, to ensure the maximum security strength of 128 bits, the output
119 length passed to \fBEVP_DigestFinalXOF()\fR should be at least 32.
120 .PP
121 For SHAKE\-256, to ensure the maximum security strength of 256 bits, the output
122 length passed to \fBEVP_DigestFinalXOF()\fR should be at least 64.
123 .SH "SEE ALSO"
124 .IX Header "SEE ALSO"
125 \&\fBEVP_MD_CTX_set_params\fR\|(3), \fBprovider\-digest\fR\|(7), \fBOSSL_PROVIDER\-default\fR\|(7)
126 .SH HISTORY
127 .IX Header "HISTORY"
128 Since OpenSSL 3.4 the SHAKE\-128 and SHAKE\-256 implementations have no default
129 digest length.
130 .SH COPYRIGHT
131 .IX Header "COPYRIGHT"
132 Copyright 2020\-2024 The OpenSSL Project Authors. All Rights Reserved.
133 .PP
134 Licensed under the Apache License 2.0 (the "License"). You may not use
135 this file except in compliance with the License. You can obtain a copy
136 in the file LICENSE in the source distribution or at
137 <https://www.openssl.org/source/license.html>.