ENGINE modules aren't special, so call them MODULES
[openssl.git] / doc / man7 / EVP_MAC_BLAKE2.pod
1 =pod
2
3 =head1 NAME
4
5 EVP_MAC_BLAKE2 - The BLAKE2 EVP_MAC implementation
6
7 =head1 DESCRIPTION
8
9 Support for computing BLAKE2 MACs through the B<EVP_MAC> API.
10
11 =head2 Numeric identity
12
13 B<EVP_MAC_BLAKE2B> and B<EVP_MAC_BLAKE2S> 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 is a string value of at most 64 bytes for EVP_MAC_BLAKE2B
26 or 32 for EVP_MAC_BLAKE2S and at least 1 byte in both cases.
27 This must be set before calling EVP_MAC_init().
28
29 EVP_MAC_ctrl_str() takes two type strings for this control:
30
31 =over 4
32
33 =item "key"
34
35 The value string is used as is.
36
37 =item "hexkey"
38
39 The value string is expected to be a hexadecimal number, which will be
40 decoded before passing on as control value.
41
42 =back
43
44 =item B<EVP_MAC_CTRL_SET_CUSTOM>
45
46 This is an optional string value of at most 16 bytes for EVP_MAC_BLAKE2B
47 or 8 for EVP_MAC_BLAKE2S, set to all-NULL by default.
48 If used this must be set before calling EVP_MAC_init().
49
50 EVP_MAC_ctrl_str() takes two type strings for this control:
51
52 =over 4
53
54 =item "custom"
55
56 The value string is used as is.
57
58 =item "hexcustom"
59
60 The value string is expected to be a hexadecimal number, which will be
61 decoded before passing on as control value.
62
63 =back
64
65 =item B<EVP_MAC_CTRL_SET_SALT>
66
67 This is an optional string value of at most 16 bytes for EVP_MAC_BLAKE2B
68 or 8 for EVP_MAC_BLAKE2S, set to all-NULL by default.
69 If used this must be set before calling EVP_MAC_init().
70
71 EVP_MAC_ctrl_str() takes two type strings for this control:
72
73 =over 4
74
75 =item "salt"
76
77 The value string is used as is.
78
79 =item "hexsalt"
80
81 The value string is expected to be a hexadecimal number, which will be
82 decoded before passing on as control value.
83
84 =back
85
86 =item B<EVP_MAC_CTRL_SET_SIZE>
87
88 EVP_MAC_ctrl_str() type string: "outlen"
89
90 This is an optional value string containing a decimal number between 1 and
91 32 for EVP_MAC_BLAKE2S or 64 for EVP_MAC_BLAKE2B.
92 If it is not set it uses the default digest size of 32 and 64 respectively.
93 If used this must be set before calling EVP_MAC_init().
94
95 =back
96
97 =head1 SEE ALSO
98
99 L<EVP_MAC_ctrl(3)>, L<EVP_MAC(3)/CONTROLS>
100
101 =head1 HISTORY
102
103 The macros and functions described here were added to OpenSSL 3.0.0.
104
105 =head1 COPYRIGHT
106
107 Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
108
109 Licensed under the Apache License 2.0 (the "License").  You may not use
110 this file except in compliance with the License.  You can obtain a copy
111 in the file LICENSE in the source distribution or at
112 L<https://www.openssl.org/source/license.html>.
113
114 =cut