EVP_MAC_KMAC.pod 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. =pod
  2. =head1 NAME
  3. EVP_MAC_KMAC - The KMAC EVP_MAC implementation
  4. =head1 DESCRIPTION
  5. Support for computing KMAC MACs through the B<EVP_MAC> API.
  6. =head2 Numeric identity
  7. B<EVP_MAC_KMAC128> and B<EVP_MAC_KMAC256> are the numeric identities for this
  8. implementation, and can be used in functions like EVP_MAC_CTX_new_id() and
  9. EVP_get_macbynid().
  10. =head2 Supported controls
  11. The supported controls are:
  12. =over 4
  13. =item B<EVP_MAC_CTRL_SET_KEY>
  14. This must be set before calling EVP_MAC_init().
  15. EVP_MAC_ctrl_str() takes two type strings for this control:
  16. =over 4
  17. =item "key"
  18. The value string is used as is.
  19. =item "hexkey"
  20. The value string is expected to be a hexadecimal number, which will be
  21. decoded before passing on as control value.
  22. =back
  23. =item B<EVP_MAC_CTRL_SET_CUSTOM>
  24. This is an optional string value that can be set before calling EVP_MAC_init().
  25. If it is not set it uses the default value "".
  26. EVP_MAC_ctrl_str() takes two type strings for this control:
  27. =over 4
  28. =item "custom"
  29. The value string is used as is.
  30. =item "hexcustom"
  31. The value string is expected to be a hexadecimal number, which will be
  32. decoded before passing on as control value.
  33. =back
  34. =item B<EVP_MAC_CTRL_SET_SIZE>
  35. EVP_MAC_ctrl_str() type string: "outlen"
  36. This is an optional value string containing a decimal number. If it is not set
  37. it uses the default value of 32 for EVP_MAC_KMAC128 and 64 for EVP_MAC_KMAC256.
  38. This can be called any time before EVP_MAC_final().
  39. =item B<EVP_MAC_CTRL_SET_XOF>
  40. EVP_MAC_ctrl_str() type string: "xof"
  41. The value string is expected to be an integer value of 1 or 0. Use 1 to enable
  42. XOF mode. If XOF is enabled then the output len that is encoded as part of the
  43. input stream is set to zero.
  44. This can be called any time before EVP_MAC_final().
  45. =back
  46. =head1 SEE ALSO
  47. L<EVP_MAC_ctrl(3)>, L<EVP_MAC(3)/CONTROLS>
  48. =head1 COPYRIGHT
  49. Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
  50. Licensed under the Apache License 2.0 (the "License"). You may not use
  51. this file except in compliance with the License. You can obtain a copy
  52. in the file LICENSE in the source distribution or at
  53. L<https://www.openssl.org/source/license.html>.
  54. =cut