EVP_MAC-Siphash - The Siphash EVP_MAC implementation
| Use Case | Command | Description |
|---|---|---|
| đ Set MAC key | EVP_MAC_CTX_set_params(ctx, "key" (OSSL_MAC_PARAM_KEY)) | Set the secret key for Siphash MAC |
| đ Set MAC size | EVP_MAC_CTX_set_params(ctx, "size" (OSSL_MAC_PARAM_SIZE)) | Define output MAC length (default: 8 or 16 bytes depending on Siphash variant) |
| đ Set compression rounds | EVP_MAC_CTX_set_params(ctx, "c-rounds" (OSSL_MAC_PARAM_C_ROUNDS)) | Number of rounds per message block (default: 2) |
| đ Set finalization rounds | EVP_MAC_CTX_set_params(ctx, "d-rounds" (OSSL_MAC_PARAM_D_ROUNDS)) | Number of finalization rounds (default: 4) |
| đ Retrieve MAC size | EVP_MAC_CTX_get_mac_size(ctx) | Get the current MAC size (unsigned integer) |
Support for computing Siphash MACs through the EVP_MAC API.
This implementation is identified with this name and properties, to be used with EVP_MAC_fetch():
"SIPHASH", "provider=default"
The general description of these parameters can be found in EVP_MAC(3), section "PARAMETERS".
All these parameters can be set with EVP_MAC_CTX_set_params(). Furthermore, the "size" parameter can be retrieved with EVP_MAC_CTX_get_params(), or with EVP_MAC_CTX_get_mac_size(). The length of the "size" parameter should not exceed that of a size_t.
OSSL_MAC_PARAM_KEY) <octet string>OSSL_MAC_PARAM_SIZE) <unsigned integer>OSSL_MAC_PARAM_C_ROUNDS) <unsigned integer>OSSL_MAC_PARAM_D_ROUNDS) <unsigned integer>EVP_MAC_CTX_get_params(3), EVP_MAC_CTX_set_params(3), "PARAMETERS" in EVP_MAC(3), OSSL_PARAM(3)
Copyright 2018-2021 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html.
Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-04 12:53 @216.73.217.98
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format