xref: /freebsd/crypto/openssl/doc/man7/EVP_MAC-CMAC.pod (revision e0c4386e7e71d93b0edc0c8fa156263fc4a8b0b6)
1b077aed3SPierre Pronchery=pod
2b077aed3SPierre Pronchery
3b077aed3SPierre Pronchery=head1 NAME
4b077aed3SPierre Pronchery
5b077aed3SPierre ProncheryEVP_MAC-CMAC - The CMAC EVP_MAC implementation
6b077aed3SPierre Pronchery
7b077aed3SPierre Pronchery=head1 DESCRIPTION
8b077aed3SPierre Pronchery
9b077aed3SPierre ProncherySupport for computing CMAC MACs through the B<EVP_MAC> API.
10b077aed3SPierre Pronchery
11b077aed3SPierre ProncheryThis implementation uses EVP_CIPHER functions to get access to the underlying
12b077aed3SPierre Proncherycipher.
13b077aed3SPierre Pronchery
14b077aed3SPierre Pronchery=head2 Identity
15b077aed3SPierre Pronchery
16b077aed3SPierre ProncheryThis implementation is identified with this name and properties, to be
17b077aed3SPierre Proncheryused with EVP_MAC_fetch():
18b077aed3SPierre Pronchery
19b077aed3SPierre Pronchery=over 4
20b077aed3SPierre Pronchery
21b077aed3SPierre Pronchery=item "CMAC", "provider=default" or "provider=fips"
22b077aed3SPierre Pronchery
23b077aed3SPierre Pronchery=back
24b077aed3SPierre Pronchery
25b077aed3SPierre Pronchery=head2 Supported parameters
26b077aed3SPierre Pronchery
27b077aed3SPierre ProncheryThe general description of these parameters can be found in
28b077aed3SPierre ProncheryL<EVP_MAC(3)/PARAMETERS>.
29b077aed3SPierre Pronchery
30b077aed3SPierre ProncheryThe following parameter can be set with EVP_MAC_CTX_set_params():
31b077aed3SPierre Pronchery
32b077aed3SPierre Pronchery=over 4
33b077aed3SPierre Pronchery
34b077aed3SPierre Pronchery=item "key" (B<OSSL_MAC_PARAM_KEY>) <octet string>
35b077aed3SPierre Pronchery
36b077aed3SPierre ProncherySets the MAC key.
37b077aed3SPierre ProncherySetting this parameter is identical to passing a I<key> to L<EVP_MAC_init(3)>.
38b077aed3SPierre Pronchery
39b077aed3SPierre Pronchery=item "cipher" (B<OSSL_MAC_PARAM_CIPHER>) <UTF8 string>
40b077aed3SPierre Pronchery
41b077aed3SPierre ProncherySets the name of the underlying cipher to be used.
42b077aed3SPierre Pronchery
43b077aed3SPierre Pronchery=item "properties" (B<OSSL_MAC_PARAM_PROPERTIES>) <UTF8 string>
44b077aed3SPierre Pronchery
45b077aed3SPierre ProncherySets the properties to be queried when trying to fetch the underlying cipher.
46b077aed3SPierre ProncheryThis must be given together with the cipher naming parameter to be considered
47b077aed3SPierre Proncheryvalid.
48b077aed3SPierre Pronchery
49b077aed3SPierre Pronchery=back
50b077aed3SPierre Pronchery
51b077aed3SPierre ProncheryThe following parameters can be retrieved with
52b077aed3SPierre ProncheryEVP_MAC_CTX_get_params():
53b077aed3SPierre Pronchery
54b077aed3SPierre Pronchery=over 4
55b077aed3SPierre Pronchery
56b077aed3SPierre Pronchery=item "size" (B<OSSL_MAC_PARAM_SIZE>) <unsigned integer>
57b077aed3SPierre Pronchery
58b077aed3SPierre ProncheryThe "size" parameter can also be retrieved with with EVP_MAC_CTX_get_mac_size().
59b077aed3SPierre ProncheryThe length of the "size" parameter is equal to that of an B<unsigned int>.
60b077aed3SPierre Pronchery
61b077aed3SPierre Pronchery=back
62b077aed3SPierre Pronchery
63b077aed3SPierre Pronchery=over 4
64b077aed3SPierre Pronchery
65*e0c4386eSCy Schubert=item "block-size" (B<OSSL_MAC_PARAM_BLOCK_SIZE>) <unsigned integer>
66b077aed3SPierre Pronchery
67b077aed3SPierre ProncheryGets the MAC block size.  The "block-size" parameter can also be retrieved with
68b077aed3SPierre ProncheryEVP_MAC_CTX_get_block_size().
69b077aed3SPierre Pronchery
70b077aed3SPierre Pronchery=back
71b077aed3SPierre Pronchery
72b077aed3SPierre Pronchery=head1 SEE ALSO
73b077aed3SPierre Pronchery
74b077aed3SPierre ProncheryL<EVP_MAC_CTX_get_params(3)>, L<EVP_MAC_CTX_set_params(3)>,
75b077aed3SPierre ProncheryL<EVP_MAC(3)/PARAMETERS>, L<OSSL_PARAM(3)>
76b077aed3SPierre Pronchery
77b077aed3SPierre Pronchery=head1 COPYRIGHT
78b077aed3SPierre Pronchery
79b077aed3SPierre ProncheryCopyright 2018-2021 The OpenSSL Project Authors. All Rights Reserved.
80b077aed3SPierre Pronchery
81b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
82b077aed3SPierre Proncherythis file except in compliance with the License.  You can obtain a copy
83b077aed3SPierre Proncheryin the file LICENSE in the source distribution or at
84b077aed3SPierre ProncheryL<https://www.openssl.org/source/license.html>.
85b077aed3SPierre Pronchery
86b077aed3SPierre Pronchery=cut
87