1EVP_PKEY-HMAC(7ossl) OpenSSL EVP_PKEY-HMAC(7ossl)
2
3
4
6 EVP_PKEY-HMAC, EVP_KEYMGMT-HMAC, EVP_PKEY-Siphash, EVP_KEYMGMT-Siphash,
7 EVP_PKEY-Poly1305, EVP_KEYMGMT-Poly1305, EVP_PKEY-CMAC,
8 EVP_KEYMGMT-CMAC - EVP_PKEY legacy MAC keytypes and algorithm support
9
11 The HMAC and CMAC key types are implemented in OpenSSL's default and
12 FIPS providers. Additionally the Siphash and Poly1305 key types are
13 implemented in the default provider. Performing MAC operations via an
14 EVP_PKEY is considered legacy and are only available for backwards
15 compatibility purposes and for a restricted set of algorithms. The
16 preferred way of performing MAC operations is via the EVP_MAC APIs. See
17 EVP_MAC_init(3).
18
19 For further details on using EVP_PKEY based MAC keys see
20 EVP_SIGNATURE-HMAC(7), EVP_SIGNATURE-Siphash(7),
21 EVP_SIGNATURE-Poly1305(7) or EVP_SIGNATURE-CMAC(7).
22
23 Common MAC parameters
24 All the MAC keytypes support the following parameters.
25
26 "priv" (OSSL_PKEY_PARAM_PRIV_KEY) <octet string>
27 The MAC key value.
28
29 "properties" (OSSL_PKEY_PARAM_PROPERTIES) <UTF8 string>
30 A property query string to be used when any algorithms are fetched.
31
32 CMAC parameters
33 As well as the parameters described above, the CMAC keytype
34 additionally supports the following parameters.
35
36 "cipher" (OSSL_PKEY_PARAM_CIPHER) <UTF8 string>
37 The name of a cipher to be used when generating the MAC.
38
39 "engine" (OSSL_PKEY_PARAM_ENGINE) <UTF8 string>
40 The name of an engine to be used for the specified cipher (if any).
41
42 Common MAC key generation parameters
43 MAC key generation is unusual in that no new key is actually generated.
44 Instead a new provider side key object is created with the supplied raw
45 key value. This is done for backwards compatibility with previous
46 versions of OpenSSL.
47
48 "priv" (OSSL_PKEY_PARAM_PRIV_KEY) <octet string>
49 The MAC key value.
50
51 CMAC key generation parameters
52 In addition to the common MAC key generation parameters, the CMAC key
53 generation additionally recognises the following.
54
55 "cipher" (OSSL_PKEY_PARAM_CIPHER) <UTF8 string>
56 The name of a cipher to be used when generating the MAC.
57
59 EVP_KEYMGMT(3), EVP_PKEY(3), provider-keymgmt(7)
60
62 Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
63
64 Licensed under the Apache License 2.0 (the "License"). You may not use
65 this file except in compliance with the License. You can obtain a copy
66 in the file LICENSE in the source distribution or at
67 <https://www.openssl.org/source/license.html>.
68
69
70
713.0.5 2022-11-01 EVP_PKEY-HMAC(7ossl)