providers/implementations/digests/mdc2_prov.inc
providers/implementations/digests/sha3_prov.inc
providers/implementations/include/prov/blake2_params.inc
-providers/implementations/macs/cmac_prov.c
-providers/implementations/macs/gmac_prov.c
-providers/implementations/macs/hmac_prov.c
-providers/implementations/macs/kmac_prov.c
-providers/implementations/macs/poly1305_prov.c
-providers/implementations/macs/siphash_prov.c
+providers/implementations/macs/cmac_prov.inc
+providers/implementations/macs/gmac_prov.inc
+providers/implementations/macs/hmac_prov.inc
+providers/implementations/macs/kmac_prov.inc
+providers/implementations/macs/poly1305_prov.inc
+providers/implementations/macs/siphash_prov.inc
providers/implementations/rands/drbg_ctr.c
providers/implementations/rands/drbg_hash.c
providers/implementations/rands/drbg_hmac.c
providers/implementations/digests/mdc2_prov.inc \
providers/implementations/digests/sha3_prov.inc \
providers/implementations/include/prov/blake2_params.inc \
- providers/implementations/macs/cmac_prov.c \
- providers/implementations/macs/gmac_prov.c \
- providers/implementations/macs/hmac_prov.c \
- providers/implementations/macs/kmac_prov.c \
- providers/implementations/macs/poly1305_prov.c \
- providers/implementations/macs/siphash_prov.c \
+ providers/implementations/macs/cmac_prov.inc \
+ providers/implementations/macs/gmac_prov.inc \
+ providers/implementations/macs/hmac_prov.inc \
+ providers/implementations/macs/kmac_prov.inc \
+ providers/implementations/macs/poly1305_prov.inc \
+ providers/implementations/macs/siphash_prov.inc \
providers/implementations/rands/drbg_ctr.c \
providers/implementations/rands/drbg_hash.c \
providers/implementations/rands/drbg_hmac.c \
providers/implementations/digests/mdc2_prov.inc \
providers/implementations/digests/sha3_prov.inc \
providers/implementations/include/prov/blake2_params.inc \
- providers/implementations/macs/cmac_prov.c \
- providers/implementations/macs/gmac_prov.c \
- providers/implementations/macs/hmac_prov.c \
- providers/implementations/macs/kmac_prov.c \
- providers/implementations/macs/poly1305_prov.c \
- providers/implementations/macs/siphash_prov.c \
+ providers/implementations/macs/cmac_prov.inc \
+ providers/implementations/macs/gmac_prov.inc \
+ providers/implementations/macs/hmac_prov.inc \
+ providers/implementations/macs/kmac_prov.inc \
+ providers/implementations/macs/poly1305_prov.inc \
+ providers/implementations/macs/siphash_prov.inc \
providers/implementations/rands/drbg_ctr.c \
providers/implementations/rands/drbg_hash.c \
providers/implementations/rands/drbg_hmac.c \
providers/implementations/digests/sha3_prov.inc.in
GENERATE[providers/implementations/include/prov/blake2_params.inc]=\
providers/implementations/include/prov/blake2_params.inc.in
-GENERATE[providers/implementations/macs/cmac_prov.c]=\
- providers/implementations/macs/cmac_prov.c.in
-GENERATE[providers/implementations/macs/gmac_prov.c]=\
- providers/implementations/macs/gmac_prov.c.in
-GENERATE[providers/implementations/macs/hmac_prov.c]=\
- providers/implementations/macs/hmac_prov.c.in
-GENERATE[providers/implementations/macs/kmac_prov.c]=\
- providers/implementations/macs/kmac_prov.c.in
-GENERATE[providers/implementations/macs/poly1305_prov.c]=\
- providers/implementations/macs/poly1305_prov.c.in
-GENERATE[providers/implementations/macs/siphash_prov.c]=\
- providers/implementations/macs/siphash_prov.c.in
+GENERATE[providers/implementations/macs/cmac_prov.inc]=\
+ providers/implementations/macs/cmac_prov.inc.in
+GENERATE[providers/implementations/macs/gmac_prov.inc]=\
+ providers/implementations/macs/gmac_prov.inc.in
+GENERATE[providers/implementations/macs/hmac_prov.inc]=\
+ providers/implementations/macs/hmac_prov.inc.in
+GENERATE[providers/implementations/macs/kmac_prov.inc]=\
+ providers/implementations/macs/kmac_prov.inc.in
+GENERATE[providers/implementations/macs/poly1305_prov.inc]=\
+ providers/implementations/macs/poly1305_prov.inc.in
+GENERATE[providers/implementations/macs/siphash_prov.inc]=\
+ providers/implementations/macs/siphash_prov.inc.in
GENERATE[providers/implementations/rands/drbg_ctr.c]=\
providers/implementations/rands/drbg_ctr.c.in
GENERATE[providers/implementations/rands/drbg_hash.c]=\
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
-{-
-use OpenSSL::paramnames qw(produce_param_decoder);
--}
/*
* CMAC low level APIs are deprecated for public use, but still ok for internal
#include "prov/provider_util.h"
#include "prov/providercommon.h"
#include "crypto/cmac.h"
+#include "providers/implementations/macs/cmac_prov.inc"
/*
* Forward declaration of everything implemented here. This is not strictly
return CMAC_Final(macctx->ctx, out, outl);
}
-{- produce_param_decoder('cmac_get_ctx_params',
- (['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
- ['OSSL_MAC_PARAM_BLOCK_SIZE', 'bsize', 'size_t'],
- ['OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR', 'ind', 'int', 'fips'],
- )); -}
-
static const OSSL_PARAM *cmac_gettable_ctx_params(ossl_unused void *ctx,
ossl_unused void *provctx)
{
return 1;
}
-{- produce_param_decoder('cmac_set_ctx_params',
- (['OSSL_MAC_PARAM_CIPHER', 'cipher', 'utf8_string'],
- ['OSSL_ALG_PARAM_ENGINE', 'engine', 'utf8_string', 'hidden'],
- ['OSSL_MAC_PARAM_PROPERTIES', 'propq', 'utf8_string'],
- ['OSSL_MAC_PARAM_KEY', 'key', 'octet_string'],
- ['OSSL_CIPHER_PARAM_FIPS_ENCRYPT_CHECK', 'ind_ec', 'int', 'fips'],
- )); -}
-
static const OSSL_PARAM *cmac_settable_ctx_params(ossl_unused void *ctx,
ossl_unused void *provctx)
{
--- /dev/null
+/*
+ * Copyright 2025 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
+ */
+
+{-
+use OpenSSL::paramnames qw(produce_param_decoder);
+-}
+
+{- produce_param_decoder('cmac_get_ctx_params',
+ (['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
+ ['OSSL_MAC_PARAM_BLOCK_SIZE', 'bsize', 'size_t'],
+ ['OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR', 'ind', 'int', 'fips'],
+ )); -}
+
+{- produce_param_decoder('cmac_set_ctx_params',
+ (['OSSL_MAC_PARAM_CIPHER', 'cipher', 'utf8_string'],
+ ['OSSL_ALG_PARAM_ENGINE', 'engine', 'utf8_string', 'hidden'],
+ ['OSSL_MAC_PARAM_PROPERTIES', 'propq', 'utf8_string'],
+ ['OSSL_MAC_PARAM_KEY', 'key', 'octet_string'],
+ ['OSSL_CIPHER_PARAM_FIPS_ENCRYPT_CHECK', 'ind_ec', 'int', 'fips'],
+ )); -}
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
-{-
-use OpenSSL::paramnames qw(produce_param_decoder);
--}
#include <stdlib.h>
#include <string.h>
#include "prov/provider_ctx.h"
#include "prov/provider_util.h"
#include "prov/providercommon.h"
+#include "providers/implementations/macs/gmac_prov.inc"
/*
* Forward declaration of everything implemented here. This is not strictly
return 1;
}
-{- produce_param_decoder('gmac_get_params',
- (['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
- )); -}
-
static const OSSL_PARAM *gmac_gettable_params(void *provctx)
{
return gmac_get_params_list;
return 1;
}
-{- produce_param_decoder('gmac_set_ctx_params',
- (['OSSL_MAC_PARAM_CIPHER', 'cipher', 'utf8_string'],
- ['OSSL_ALG_PARAM_ENGINE', 'engine', 'utf8_string', 'hidden'],
- ['OSSL_MAC_PARAM_PROPERTIES', 'propq', 'utf8_string'],
- ['OSSL_MAC_PARAM_KEY', 'key', 'octet_string'],
- ['OSSL_MAC_PARAM_IV', 'iv', 'octet_string'],
- )); -}
-
static const OSSL_PARAM *gmac_settable_ctx_params(ossl_unused void *ctx,
ossl_unused void *provctx)
{
--- /dev/null
+/*
+ * Copyright 2025 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
+ */
+
+{-
+use OpenSSL::paramnames qw(produce_param_decoder);
+-}
+
+{- produce_param_decoder('gmac_get_params',
+ (['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
+ )); -}
+
+{- produce_param_decoder('gmac_set_ctx_params',
+ (['OSSL_MAC_PARAM_CIPHER', 'cipher', 'utf8_string'],
+ ['OSSL_ALG_PARAM_ENGINE', 'engine', 'utf8_string', 'hidden'],
+ ['OSSL_MAC_PARAM_PROPERTIES', 'propq', 'utf8_string'],
+ ['OSSL_MAC_PARAM_KEY', 'key', 'octet_string'],
+ ['OSSL_MAC_PARAM_IV', 'iv', 'octet_string'],
+ )); -}
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
-{-
-use OpenSSL::paramnames qw(produce_param_decoder);
--}
/*
* HMAC low level APIs are deprecated for public use, but still ok for internal
#include "prov/provider_util.h"
#include "prov/providercommon.h"
#include "prov/securitycheck.h"
+#include "providers/implementations/macs/hmac_prov.inc"
/*
* Forward declaration of everything implemented here. This is not strictly
return 1;
}
-{- produce_param_decoder('hmac_get_ctx_params',
- (['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
- ['OSSL_MAC_PARAM_BLOCK_SIZE', 'bsize', 'size_t'],
- ['OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR', 'ind', 'int', 'fips'],
- )); -}
-
static const OSSL_PARAM *hmac_gettable_ctx_params(ossl_unused void *ctx,
ossl_unused void *provctx)
{
return 1;
}
-{- produce_param_decoder('hmac_set_ctx_params',
- (['OSSL_MAC_PARAM_DIGEST', 'digest', 'utf8_string'],
- ['OSSL_ALG_PARAM_ENGINE', 'engine', 'utf8_string', 'hidden'],
- ['OSSL_MAC_PARAM_PROPERTIES', 'propq', 'utf8_string'],
- ['OSSL_MAC_PARAM_KEY', 'key', 'octet_string'],
- ['OSSL_MAC_PARAM_TLS_DATA_SIZE', 'tlssize', 'size_t'],
- ['OSSL_MAC_PARAM_FIPS_KEY_CHECK', 'ind_k', 'int', 'fips'],
- )); -}
-
static const OSSL_PARAM *hmac_settable_ctx_params(ossl_unused void *ctx,
ossl_unused void *provctx)
{
--- /dev/null
+/*
+ * Copyright 2025 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
+ */
+
+{-
+use OpenSSL::paramnames qw(produce_param_decoder);
+-}
+
+{- produce_param_decoder('hmac_get_ctx_params',
+ (['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
+ ['OSSL_MAC_PARAM_BLOCK_SIZE', 'bsize', 'size_t'],
+ ['OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR', 'ind', 'int', 'fips'],
+ )); -}
+
+{- produce_param_decoder('hmac_set_ctx_params',
+ (['OSSL_MAC_PARAM_DIGEST', 'digest', 'utf8_string'],
+ ['OSSL_ALG_PARAM_ENGINE', 'engine', 'utf8_string', 'hidden'],
+ ['OSSL_MAC_PARAM_PROPERTIES', 'propq', 'utf8_string'],
+ ['OSSL_MAC_PARAM_KEY', 'key', 'octet_string'],
+ ['OSSL_MAC_PARAM_TLS_DATA_SIZE', 'tlssize', 'size_t'],
+ ['OSSL_MAC_PARAM_FIPS_KEY_CHECK', 'ind_k', 'int', 'fips'],
+ )); -}
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
-{-
-use OpenSSL::paramnames qw(produce_param_decoder);
--}
/*
* See SP800-185 "Appendix A - KMAC, .... in Terms of Keccak[c]"
#include "prov/provider_util.h"
#include "prov/providercommon.h"
#include "internal/cryptlib.h" /* ossl_assert */
+#include "providers/implementations/macs/kmac_prov.inc"
/*
* Forward declaration of everything implemented here. This is not strictly
#define kmac_new_list
-{- produce_param_decoder('kmac_new',
- (['OSSL_MAC_PARAM_DIGEST', 'digest', 'utf8_string'],
- ['OSSL_MAC_PARAM_PROPERTIES', 'propq', 'utf8_string'],
- ['OSSL_ALG_PARAM_ENGINE', 'engine', 'utf8_string', 'hidden'],
- )); -}
-
static void *kmac_fetch_new(void *provctx, const OSSL_PARAM *params)
{
struct kmac_data_st *kctx = kmac_new(provctx);
return ok;
}
-{- produce_param_decoder('kmac_get_ctx_params',
- (['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
- ['OSSL_MAC_PARAM_BLOCK_SIZE', 'bsize', 'size_t'],
- ['OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR', 'ind', 'int', 'fips'],
- )); -}
-
static const OSSL_PARAM *kmac_gettable_ctx_params(ossl_unused void *ctx,
ossl_unused void *provctx)
{
return 1;
}
-{- produce_param_decoder('kmac_set_ctx_params',
- (['OSSL_MAC_PARAM_XOF', 'xof', 'int'],
- ['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
- ['OSSL_MAC_PARAM_KEY', 'key', 'octet_string'],
- ['OSSL_MAC_PARAM_CUSTOM', 'custom', 'octet_string'],
- ['OSSL_MAC_PARAM_FIPS_KEY_CHECK', 'ind_k', 'int', 'fips'],
- ['OSSL_MAC_PARAM_FIPS_NO_SHORT_MAC', 'ind_sht', 'int', 'fips'],
- )); -}
-
static const OSSL_PARAM *kmac_settable_ctx_params(ossl_unused void *ctx,
ossl_unused void *provctx)
{
--- /dev/null
+/*
+ * Copyright 2025 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
+ */
+
+{-
+use OpenSSL::paramnames qw(produce_param_decoder);
+-}
+
+{- produce_param_decoder('kmac_new',
+ (['OSSL_MAC_PARAM_DIGEST', 'digest', 'utf8_string'],
+ ['OSSL_MAC_PARAM_PROPERTIES', 'propq', 'utf8_string'],
+ ['OSSL_ALG_PARAM_ENGINE', 'engine', 'utf8_string', 'hidden'],
+ )); -}
+
+{- produce_param_decoder('kmac_get_ctx_params',
+ (['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
+ ['OSSL_MAC_PARAM_BLOCK_SIZE', 'bsize', 'size_t'],
+ ['OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR', 'ind', 'int', 'fips'],
+ )); -}
+
+{- produce_param_decoder('kmac_set_ctx_params',
+ (['OSSL_MAC_PARAM_XOF', 'xof', 'int'],
+ ['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
+ ['OSSL_MAC_PARAM_KEY', 'key', 'octet_string'],
+ ['OSSL_MAC_PARAM_CUSTOM', 'custom', 'octet_string'],
+ ['OSSL_MAC_PARAM_FIPS_KEY_CHECK', 'ind_k', 'int', 'fips'],
+ ['OSSL_MAC_PARAM_FIPS_NO_SHORT_MAC', 'ind_sht', 'int', 'fips'],
+ )); -}
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
-{-
-use OpenSSL::paramnames qw(produce_param_decoder);
--}
#include <string.h>
#include "prov/implementations.h"
#include "prov/providercommon.h"
+#include "providers/implementations/macs/poly1305_prov.inc"
/*
* Forward declaration of everything implemented here. This is not strictly
return 1;
}
-{- produce_param_decoder('poly1305_get_params',
- (['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
- )); -}
-
static const OSSL_PARAM *poly1305_gettable_params(void *provctx)
{
return poly1305_get_params_list;
return 1;
}
-{- produce_param_decoder('poly1305_set_ctx_params',
- (['OSSL_MAC_PARAM_KEY', 'key', 'octet_string'],
- )); -}
-
static const OSSL_PARAM *poly1305_settable_ctx_params(ossl_unused void *ctx,
ossl_unused void *provctx)
{
--- /dev/null
+/*
+ * Copyright 2025 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
+ */
+
+{-
+use OpenSSL::paramnames qw(produce_param_decoder);
+-}
+
+{- produce_param_decoder('poly1305_get_params',
+ (['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
+ )); -}
+
+{- produce_param_decoder('poly1305_set_ctx_params',
+ (['OSSL_MAC_PARAM_KEY', 'key', 'octet_string'],
+ )); -}
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
-{-
-use OpenSSL::paramnames qw(produce_param_decoder);
--}
#include <string.h>
#include <openssl/core_dispatch.h>
#include "prov/implementations.h"
#include "prov/providercommon.h"
+#include "providers/implementations/macs/siphash_prov.inc"
/*
* Forward declaration of everything implemented here. This is not strictly
return SipHash_Final(&ctx->siphash, out, hlen);
}
-{- produce_param_decoder('siphash_get_ctx_params',
- (['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
- ['OSSL_MAC_PARAM_C_ROUNDS', 'c', 'uint'],
- ['OSSL_MAC_PARAM_D_ROUNDS', 'd', 'uint'],
- )); -}
-
static const OSSL_PARAM *siphash_gettable_ctx_params(ossl_unused void *ctx,
ossl_unused void *provctx)
{
return 1;
}
-{- produce_param_decoder('siphash_set_params',
- (['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
- ['OSSL_MAC_PARAM_KEY', 'key', 'octet_string'],
- ['OSSL_MAC_PARAM_C_ROUNDS', 'c', 'uint'],
- ['OSSL_MAC_PARAM_D_ROUNDS', 'd', 'uint'],
- )); -}
-
static const OSSL_PARAM *siphash_settable_ctx_params(ossl_unused void *ctx,
void *provctx)
{
--- /dev/null
+/*
+ * Copyright 2025 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
+ */
+
+{-
+use OpenSSL::paramnames qw(produce_param_decoder);
+-}
+
+{- produce_param_decoder('siphash_get_ctx_params',
+ (['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
+ ['OSSL_MAC_PARAM_C_ROUNDS', 'c', 'uint'],
+ ['OSSL_MAC_PARAM_D_ROUNDS', 'd', 'uint'],
+ )); -}
+
+{- produce_param_decoder('siphash_set_params',
+ (['OSSL_MAC_PARAM_SIZE', 'size', 'size_t'],
+ ['OSSL_MAC_PARAM_KEY', 'key', 'octet_string'],
+ ['OSSL_MAC_PARAM_C_ROUNDS', 'c', 'uint'],
+ ['OSSL_MAC_PARAM_D_ROUNDS', 'd', 'uint'],
+ )); -}