xref: /freebsd/crypto/openssl/doc/man7/EVP_MAC-Poly1305.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1*b077aed3SPierre Pronchery=pod
2*b077aed3SPierre Pronchery
3*b077aed3SPierre Pronchery=head1 NAME
4*b077aed3SPierre Pronchery
5*b077aed3SPierre ProncheryEVP_MAC-Poly1305 - The Poly1305 EVP_MAC implementation
6*b077aed3SPierre Pronchery
7*b077aed3SPierre Pronchery=head1 DESCRIPTION
8*b077aed3SPierre Pronchery
9*b077aed3SPierre ProncherySupport for computing Poly1305 MACs through the B<EVP_MAC> API.
10*b077aed3SPierre Pronchery
11*b077aed3SPierre Pronchery=head2 Identity
12*b077aed3SPierre Pronchery
13*b077aed3SPierre ProncheryThis implementation is identified with this name and properties, to be
14*b077aed3SPierre Proncheryused with EVP_MAC_fetch():
15*b077aed3SPierre Pronchery
16*b077aed3SPierre Pronchery=over 4
17*b077aed3SPierre Pronchery
18*b077aed3SPierre Pronchery=item "POLY1305", "provider=default"
19*b077aed3SPierre Pronchery
20*b077aed3SPierre Pronchery=back
21*b077aed3SPierre Pronchery
22*b077aed3SPierre Pronchery=head2 Supported parameters
23*b077aed3SPierre Pronchery
24*b077aed3SPierre ProncheryThe general description of these parameters can be found in
25*b077aed3SPierre ProncheryL<EVP_MAC(3)/PARAMETERS>.
26*b077aed3SPierre Pronchery
27*b077aed3SPierre ProncheryThe following parameter can be set with EVP_MAC_CTX_set_params():
28*b077aed3SPierre Pronchery
29*b077aed3SPierre Pronchery=over 4
30*b077aed3SPierre Pronchery
31*b077aed3SPierre Pronchery=item "key" (B<OSSL_MAC_PARAM_KEY>) <octet string>
32*b077aed3SPierre Pronchery
33*b077aed3SPierre ProncherySets the MAC key.
34*b077aed3SPierre ProncherySetting this parameter is identical to passing a I<key> to L<EVP_MAC_init(3)>.
35*b077aed3SPierre Pronchery
36*b077aed3SPierre Pronchery=back
37*b077aed3SPierre Pronchery
38*b077aed3SPierre ProncheryThe following parameters can be retrieved with
39*b077aed3SPierre ProncheryEVP_MAC_CTX_get_params():
40*b077aed3SPierre Pronchery
41*b077aed3SPierre Pronchery=over 4
42*b077aed3SPierre Pronchery
43*b077aed3SPierre Pronchery=item "size" (B<OSSL_MAC_PARAM_SIZE>) <unsigned integer>
44*b077aed3SPierre Pronchery
45*b077aed3SPierre ProncheryGets the MAC size.
46*b077aed3SPierre Pronchery
47*b077aed3SPierre Pronchery=back
48*b077aed3SPierre Pronchery
49*b077aed3SPierre ProncheryThe "size" parameter can also be retrieved with with EVP_MAC_CTX_get_mac_size().
50*b077aed3SPierre ProncheryThe length of the "size" parameter should not exceed that of an B<unsigned int>.
51*b077aed3SPierre Pronchery
52*b077aed3SPierre Pronchery=head1 NOTES
53*b077aed3SPierre Pronchery
54*b077aed3SPierre ProncheryThe OpenSSL implementation of the Poly 1305 MAC corresponds to RFC 7539.
55*b077aed3SPierre Pronchery
56*b077aed3SPierre ProncheryIt is critical to never reuse the key.  The security implication noted in
57*b077aed3SPierre ProncheryRFC 8439 applies equally to the OpenSSL implementation.
58*b077aed3SPierre Pronchery
59*b077aed3SPierre Pronchery=head1 SEE ALSO
60*b077aed3SPierre Pronchery
61*b077aed3SPierre ProncheryL<EVP_MAC_CTX_get_params(3)>, L<EVP_MAC_CTX_set_params(3)>,
62*b077aed3SPierre ProncheryL<EVP_MAC(3)/PARAMETERS>, L<OSSL_PARAM(3)>
63*b077aed3SPierre Pronchery
64*b077aed3SPierre Pronchery=head1 COPYRIGHT
65*b077aed3SPierre Pronchery
66*b077aed3SPierre ProncheryCopyright 2018-2021 The OpenSSL Project Authors. All Rights Reserved.
67*b077aed3SPierre Pronchery
68*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
69*b077aed3SPierre Proncherythis file except in compliance with the License.  You can obtain a copy
70*b077aed3SPierre Proncheryin the file LICENSE in the source distribution or at
71*b077aed3SPierre ProncheryL<https://www.openssl.org/source/license.html>.
72*b077aed3SPierre Pronchery
73*b077aed3SPierre Pronchery=cut
74