providers/implementations/kdfs/sskdf.inc
providers/implementations/kdfs/tls1_prf.inc
providers/implementations/kdfs/x942kdf.inc
-providers/implementations/kem/ec_kem.c
-providers/implementations/kem/ecx_kem.c
-providers/implementations/kem/ml_kem_kem.c
-providers/implementations/kem/rsa_kem.c
+providers/implementations/kem/ec_kem.inc
+providers/implementations/kem/ecx_kem.inc
+providers/implementations/kem/ml_kem_kem.inc
+providers/implementations/kem/rsa_kem.inc
providers/implementations/keymgmt/ml_dsa_kmgmt.c
providers/implementations/keymgmt/ml_kem_kmgmt.c
providers/implementations/keymgmt/mlx_kmgmt.c
providers/implementations/kdfs/sskdf.inc \
providers/implementations/kdfs/tls1_prf.inc \
providers/implementations/kdfs/x942kdf.inc \
- providers/implementations/kem/ec_kem.c \
- providers/implementations/kem/ecx_kem.c \
- providers/implementations/kem/ml_kem_kem.c \
- providers/implementations/kem/rsa_kem.c \
+ providers/implementations/kem/ec_kem.inc \
+ providers/implementations/kem/ecx_kem.inc \
+ providers/implementations/kem/ml_kem_kem.inc \
+ providers/implementations/kem/rsa_kem.inc \
providers/implementations/keymgmt/dh_kmgmt.c \
providers/implementations/keymgmt/dsa_kmgmt.c \
providers/implementations/keymgmt/ecx_kmgmt.c \
providers/implementations/kdfs/sskdf.inc \
providers/implementations/kdfs/tls1_prf.inc \
providers/implementations/kdfs/x942kdf.inc \
- providers/implementations/kem/ec_kem.c \
- providers/implementations/kem/ecx_kem.c \
- providers/implementations/kem/ml_kem_kem.c \
- providers/implementations/kem/rsa_kem.c \
+ providers/implementations/kem/ec_kem.inc \
+ providers/implementations/kem/ecx_kem.inc \
+ providers/implementations/kem/ml_kem_kem.inc \
+ providers/implementations/kem/rsa_kem.inc \
providers/implementations/keymgmt/dh_kmgmt.c \
providers/implementations/keymgmt/dsa_kmgmt.c \
providers/implementations/keymgmt/ecx_kmgmt.c \
providers/implementations/kdfs/tls1_prf.inc.in
GENERATE[providers/implementations/kdfs/x942kdf.inc]=\
providers/implementations/kdfs/x942kdf.inc.in
-GENERATE[providers/implementations/kem/ec_kem.c]=\
- providers/implementations/kem/ec_kem.c.in
-GENERATE[providers/implementations/kem/ecx_kem.c]=\
- providers/implementations/kem/ecx_kem.c.in
-GENERATE[providers/implementations/kem/ml_kem_kem.c]=\
- providers/implementations/kem/ml_kem_kem.c.in
-GENERATE[providers/implementations/kem/rsa_kem.c]=\
- providers/implementations/kem/rsa_kem.c.in
+GENERATE[providers/implementations/kem/ec_kem.inc]=\
+ providers/implementations/kem/ec_kem.inc.in
+GENERATE[providers/implementations/kem/ecx_kem.inc]=\
+ providers/implementations/kem/ecx_kem.inc.in
+GENERATE[providers/implementations/kem/ml_kem_kem.inc]=\
+ providers/implementations/kem/ml_kem_kem.inc.in
+GENERATE[providers/implementations/kem/rsa_kem.inc]=\
+ providers/implementations/kem/rsa_kem.inc.in
GENERATE[providers/implementations/keymgmt/dh_kmgmt.c]=\
providers/implementations/keymgmt/dh_kmgmt.c.in
GENERATE[providers/implementations/keymgmt/dsa_kmgmt.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);
--}
/*
* The following implementation is part of RFC 9180 related to DHKEM using
#include "crypto/ec.h"
#include "prov/ecx.h"
#include "prov/eckem.h"
+#include "providers/implementations/kem/ec_kem.inc"
typedef struct {
EC_KEY *recipient_key;
return eckem_init(vctx, EVP_PKEY_OP_DECAPSULATE, vecx, vauthpub, params);
}
-
-{- produce_param_decoder('eckem_set_ctx_params',
- (['OSSL_KEM_PARAM_OPERATION', 'op', 'utf8_string'],
- ['OSSL_KEM_PARAM_IKME', 'ikme', 'octet_string'],
- )); -}
-
static int eckem_set_ctx_params(void *vctx, const OSSL_PARAM params[])
{
PROV_EC_CTX *ctx = (PROV_EC_CTX *)vctx;
--- /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('eckem_set_ctx_params',
+ (['OSSL_KEM_PARAM_OPERATION', 'op', 'utf8_string'],
+ ['OSSL_KEM_PARAM_IKME', 'ikme', '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);
--}
/*
* The following implementation is part of RFC 9180 related to DHKEM using
#include <openssl/hpke.h>
#include "internal/hpke_util.h"
#include "prov/eckem.h"
+#include "providers/implementations/kem/ecx_kem.inc"
#define MAX_ECX_KEYLEN X448_KEYLEN
return ecxkem_init(vctx, EVP_PKEY_OP_DECAPSULATE, vecx, vauthpub, params);
}
-{- produce_param_decoder('ecxkem_set_ctx_params',
- (['OSSL_KEM_PARAM_OPERATION', 'op', 'utf8_string'],
- ['OSSL_KEM_PARAM_IKME', 'ikme', 'octet_string'],
- )); -}
-
static int ecxkem_set_ctx_params(void *vctx, const OSSL_PARAM params[])
{
PROV_ECX_CTX *ctx = (PROV_ECX_CTX *)vctx;
--- /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('ecxkem_set_ctx_params',
+ (['OSSL_KEM_PARAM_OPERATION', 'op', 'utf8_string'],
+ ['OSSL_KEM_PARAM_IKME', 'ikme', '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/crypto.h>
#include "prov/implementations.h"
#include "prov/securitycheck.h"
#include "prov/providercommon.h"
+#include "providers/implementations/kem/ml_kem_kem.inc"
static OSSL_FUNC_kem_newctx_fn ml_kem_newctx;
static OSSL_FUNC_kem_freectx_fn ml_kem_freectx;
return ml_kem_init(vctx, EVP_PKEY_OP_DECAPSULATE, key, params);
}
-{- produce_param_decoder('ml_kem_set_ctx_params',
- (['OSSL_KEM_PARAM_IKME', 'ikme', 'octet_string'],
- )); -}
-
static int ml_kem_set_ctx_params(void *vctx, const OSSL_PARAM params[])
{
PROV_ML_KEM_CTX *ctx = vctx;
--- /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('ml_kem_set_ctx_params',
+ (['OSSL_KEM_PARAM_IKME', 'ikme', '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);
--}
/*
* RSA low level APIs are deprecated for public use, but still ok for
#include "prov/providercommon.h"
#include "prov/implementations.h"
#include "prov/securitycheck.h"
+#include "providers/implementations/kem/rsa_kem.inc"
static OSSL_FUNC_kem_newctx_fn rsakem_newctx;
static OSSL_FUNC_kem_encapsulate_init_fn rsakem_encapsulate_init;
"RSA Decapsulate Init");
}
-{- produce_param_decoder('rsakem_get_ctx_params',
- (['OSSL_KEM_PARAM_FIPS_APPROVED_INDICATOR', 'ind', 'int', 'fips'],
- )); -}
-
static int rsakem_get_ctx_params(void *vprsactx, OSSL_PARAM *params)
{
PROV_RSA_CTX *ctx = (PROV_RSA_CTX *)vprsactx;
return rsakem_get_ctx_params_list;
}
-{- produce_param_decoder('rsakem_set_ctx_params',
- (['OSSL_KEM_PARAM_OPERATION', 'op', 'utf8_string'],
- ['OSSL_KEM_PARAM_FIPS_KEY_CHECK', 'ind_k', 'int', 'fips'],
- )); -}
-
static int rsakem_set_ctx_params(void *vprsactx, const OSSL_PARAM params[])
{
PROV_RSA_CTX *prsactx = (PROV_RSA_CTX *)vprsactx;
--- /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('rsakem_get_ctx_params',
+ (['OSSL_KEM_PARAM_FIPS_APPROVED_INDICATOR', 'ind', 'int', 'fips'],
+ )); -}
+
+{- produce_param_decoder('rsakem_set_ctx_params',
+ (['OSSL_KEM_PARAM_OPERATION', 'op', 'utf8_string'],
+ ['OSSL_KEM_PARAM_FIPS_KEY_CHECK', 'ind_k', 'int', 'fips'],
+ )); -}