2018-11-09 04:00:05 +00:00
|
|
|
=pod
|
|
|
|
|
|
|
|
=head1 NAME
|
|
|
|
|
|
|
|
EVP_MAC_KMAC - The KMAC EVP_MAC implementation
|
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
|
|
|
Support for computing KMAC MACs through the B<EVP_MAC> API.
|
|
|
|
|
|
|
|
=head2 Numeric identity
|
|
|
|
|
|
|
|
B<EVP_MAC_KMAC128> and B<EVP_MAC_KMAC256> are the numeric identities for this
|
|
|
|
implementation, and can be used in functions like EVP_MAC_CTX_new_id() and
|
|
|
|
EVP_get_macbynid().
|
|
|
|
|
|
|
|
=head2 Supported controls
|
|
|
|
|
|
|
|
The supported controls are:
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item B<EVP_MAC_CTRL_SET_KEY>
|
|
|
|
|
|
|
|
This must be set before calling EVP_MAC_init().
|
|
|
|
|
|
|
|
EVP_MAC_ctrl_str() takes two type strings for this control:
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item "key"
|
|
|
|
|
|
|
|
The value string is used as is.
|
|
|
|
|
|
|
|
=item "hexkey"
|
|
|
|
|
|
|
|
The value string is expected to be a hexadecimal number, which will be
|
|
|
|
decoded before passing on as control value.
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
|
|
|
=item B<EVP_MAC_CTRL_SET_CUSTOM>
|
|
|
|
|
|
|
|
This is an optional string value that can be set before calling EVP_MAC_init().
|
|
|
|
If it is not set it uses the default value "".
|
|
|
|
|
|
|
|
EVP_MAC_ctrl_str() takes two type strings for this control:
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item "custom"
|
|
|
|
|
|
|
|
The value string is used as is.
|
|
|
|
|
|
|
|
=item "hexcustom"
|
|
|
|
|
|
|
|
The value string is expected to be a hexadecimal number, which will be
|
|
|
|
decoded before passing on as control value.
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
|
|
|
=item B<EVP_MAC_CTRL_SET_SIZE>
|
|
|
|
|
|
|
|
EVP_MAC_ctrl_str() type string: "outlen"
|
|
|
|
|
|
|
|
This is an optional value string containing a decimal number. If it is not set
|
|
|
|
it uses the default value of 32 for EVP_MAC_KMAC128 and 64 for EVP_MAC_KMAC256.
|
|
|
|
This can be called any time before EVP_MAC_final().
|
|
|
|
|
|
|
|
=item B<EVP_MAC_CTRL_SET_XOF>
|
|
|
|
|
|
|
|
EVP_MAC_ctrl_str() type string: "xof"
|
|
|
|
|
|
|
|
The value string is expected to be an integer value of 1 or 0. Use 1 to enable
|
|
|
|
XOF mode. If XOF is enabled then the output len that is encoded as part of the
|
|
|
|
input stream is set to zero.
|
|
|
|
This can be called any time before EVP_MAC_final().
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
|
|
|
=head1 SEE ALSO
|
|
|
|
|
|
|
|
L<EVP_MAC_ctrl(3)>, L<EVP_MAC(3)/CONTROLS>
|
|
|
|
|
|
|
|
=head1 COPYRIGHT
|
|
|
|
|
|
|
|
Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
|
|
|
|
|
2018-12-06 13:05:22 +00:00
|
|
|
Licensed under the Apache License 2.0 (the "License"). You may not use
|
2018-11-09 04:00:05 +00:00
|
|
|
this file except in compliance with the License. You can obtain a copy
|
|
|
|
in the file LICENSE in the source distribution or at
|
|
|
|
L<https://www.openssl.org/source/license.html>.
|
|
|
|
|
|
|
|
=cut
|