5 EVP_MAC_BLAKE2 - The BLAKE2 EVP_MAC implementation
9 Support for computing BLAKE2 MACs through the B<EVP_MAC> API.
11 =head2 Numeric identity
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
17 =head2 Supported controls
19 The supported controls are:
23 =item B<EVP_MAC_CTRL_SET_KEY>
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().
29 EVP_MAC_ctrl_str() takes two type strings for this control:
35 The value string is used as is.
39 The value string is expected to be a hexadecimal number, which will be
40 decoded before passing on as control value.
44 =item B<EVP_MAC_CTRL_SET_CUSTOM>
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().
50 EVP_MAC_ctrl_str() takes two type strings for this control:
56 The value string is used as is.
60 The value string is expected to be a hexadecimal number, which will be
61 decoded before passing on as control value.
65 =item B<EVP_MAC_CTRL_SET_SALT>
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().
71 EVP_MAC_ctrl_str() takes two type strings for this control:
77 The value string is used as is.
81 The value string is expected to be a hexadecimal number, which will be
82 decoded before passing on as control value.
86 =item B<EVP_MAC_CTRL_SET_SIZE>
88 EVP_MAC_ctrl_str() type string: "outlen"
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().
99 L<EVP_MAC_ctrl(3)>, L<EVP_MAC(3)/CONTROLS>
103 The macros and functions described here were added to OpenSSL 3.0.
107 Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
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>.