EVP_MAC-BLAKE2.pod 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. =pod
  2. =head1 NAME
  3. EVP_MAC-BLAKE2, EVP_MAC-BLAKE2BMAC, EVP_MAC-BLAKE2SMAC
  4. - The BLAKE2 EVP_MAC implementations
  5. =head1 DESCRIPTION
  6. Support for computing BLAKE2 MACs through the B<EVP_MAC> API.
  7. =head2 Identity
  8. These implementations are identified with one of these names and
  9. properties, to be used with EVP_MAC_fetch():
  10. =over 4
  11. =item "BLAKE2BMAC", "default=yes"
  12. =item "BLAKE2SMAC", "default=yes"
  13. =back
  14. =head2 Supported parameters
  15. The general description of these parameters can be found in
  16. L<EVP_MAC(3)/PARAMETERS>.
  17. All these parameters can be set with EVP_MAC_CTX_set_params().
  18. Furthermore, the "size" parameter can be retrieved with
  19. EVP_MAC_CTX_get_params(), or with EVP_MAC_size().
  20. The length of the "size" parameter should not exceed that of a B<size_t>.
  21. =over 4
  22. =item "key" (B<OSSL_MAC_PARAM_KEY>) <octet string>
  23. This may be at most 64 bytes for BLAKE2BMAC or 32 for BLAKE2SMAC and
  24. at least 1 byte in both cases.
  25. =item "custom" (B<OSSL_MAC_PARAM_CUSTOM>) <octet string>
  26. This is an optional value of at most 16 bytes for BLAKE2BMAC or 8 for
  27. BLAKE2SMAC.
  28. It is empty by default.
  29. =item "salt" (B<OSSL_MAC_PARAM_SALT>) <octet string>
  30. This is an optional value of at most 16 bytes for BLAKE2BMAC or 8 for
  31. BLAKE2SMAC.
  32. It is empty by default.
  33. =item "size" (B<OSSL_MAC_PARAM_SIZE>) <unsigned integer>
  34. When set, this can be any number between between 1 and 32 for
  35. EVP_MAC_BLAKE2S or 64 for EVP_MAC_BLAKE2B.
  36. It is 32 and 64 respectively by default.
  37. =back
  38. =head1 SEE ALSO
  39. L<EVP_MAC_CTX_get_params(3)>, L<EVP_MAC_CTX_set_params(3)>,
  40. L<EVP_MAC(3)/PARAMETERS>, L<OSSL_PARAM(3)>
  41. =head1 HISTORY
  42. The macros and functions described here were added to OpenSSL 3.0.
  43. =head1 COPYRIGHT
  44. Copyright 2018-2019 The OpenSSL Project Authors. All Rights Reserved.
  45. Licensed under the Apache License 2.0 (the "License"). You may not use
  46. this file except in compliance with the License. You can obtain a copy
  47. in the file LICENSE in the source distribution or at
  48. L<https://www.openssl.org/source/license.html>.
  49. =cut