issue-9316: Update return documentation for RAND_set_rand_engine
[openssl.git] / doc / man7 / EVP_MAC_KMAC.pod
1 =pod
2
3 =head1 NAME
4
5 EVP_MAC_KMAC - The KMAC EVP_MAC implementation
6
7 =head1 DESCRIPTION
8
9 Support for computing KMAC MACs through the B<EVP_MAC> API.
10
11 =head2 Numeric identity
12
13 B<EVP_MAC_KMAC128> and B<EVP_MAC_KMAC256> are the numeric identities for this
14 implementation, and can be used in functions like EVP_MAC_CTX_new_id() and
15 EVP_get_macbynid().
16
17 =head2 Supported controls
18
19 The supported controls are:
20
21 =over 4
22
23 =item B<EVP_MAC_CTRL_SET_KEY>
24
25 This must be set before calling EVP_MAC_init().
26
27 EVP_MAC_ctrl_str() takes two type strings for this control:
28
29 =over 4
30
31 =item "key"
32
33 The value string is used as is.
34
35 =item "hexkey"
36
37 The value string is expected to be a hexadecimal number, which will be
38 decoded before passing on as control value.
39
40 =back
41
42 =item B<EVP_MAC_CTRL_SET_CUSTOM>
43
44 This is an optional string value that can be set before calling EVP_MAC_init().
45 If it is not set it uses the default value "".
46
47 EVP_MAC_ctrl_str() takes two type strings for this control:
48
49 =over 4
50
51 =item "custom"
52
53 The value string is used as is.
54
55 =item "hexcustom"
56
57 The value string is expected to be a hexadecimal number, which will be
58 decoded before passing on as control value.
59
60 =back
61
62 =item B<EVP_MAC_CTRL_SET_SIZE>
63
64 EVP_MAC_ctrl_str() type string: "outlen"
65
66 This is an optional value string containing a decimal number. If it is not set
67 it uses the default value of 32 for EVP_MAC_KMAC128 and 64 for EVP_MAC_KMAC256.
68 This can be called any time before EVP_MAC_final().
69
70 =item B<EVP_MAC_CTRL_SET_XOF>
71
72 EVP_MAC_ctrl_str() type string: "xof"
73
74 The value string is expected to be an integer value of 1 or 0. Use 1 to enable
75 XOF mode. If XOF is enabled then the output len that is encoded as part of the
76 input stream is set to zero.
77 This can be called any time before EVP_MAC_final().
78
79 =back
80
81 =head1 SEE ALSO
82
83 L<EVP_MAC_ctrl(3)>, L<EVP_MAC(3)/CONTROLS>
84
85 =head1 COPYRIGHT
86
87 Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
88
89 Licensed under the Apache License 2.0 (the "License").  You may not use
90 this file except in compliance with the License.  You can obtain a copy
91 in the file LICENSE in the source distribution or at
92 L<https://www.openssl.org/source/license.html>.
93
94 =cut