Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ScosslCommon/src/scossl_dh.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ SCOSSL_STATUS scossl_dh_generate_keypair(SCOSSL_DH_KEY_CTX *ctx, int nBitsPriv,
}
}

scError = SymCryptDlkeyGenerate(SYMCRYPT_FLAG_DLKEY_DH, ctx->dlkey);
scError = SymCryptDlkeyGenerate(SYMCRYPT_FLAG_DLKEY_DH | SYMCRYPT_FLAG_DLKEY_GEN_MODP | SYMCRYPT_FLAG_KEY_NO_FIPS, ctx->dlkey);
if (scError != SYMCRYPT_NO_ERROR)
{
SCOSSL_LOG_SYMCRYPT_ERROR(SCOSSL_ERR_F_DH_GENERATE_KEYPAIR,
Expand Down
6 changes: 4 additions & 2 deletions SymCryptProvider/src/keymgmt/p_scossl_dh_keymgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ static const OSSL_PARAM p_scossl_dh_keygen_param_types[] = {
OSSL_PARAM_utf8_string(OSSL_PKEY_PARAM_GROUP_NAME, NULL, 0),
OSSL_PARAM_size_t(OSSL_PKEY_PARAM_FFC_PBITS, NULL),
OSSL_PARAM_int(OSSL_PKEY_PARAM_DH_PRIV_LEN, NULL),
OSSL_PARAM_size_t("dh_paramgen_prime_len", NULL),
OSSL_PARAM_size_t("dh_paramgen_subprime_len", NULL),
OSSL_PARAM_uint("dh_paramgen_generator", NULL),
OSSL_PARAM_END};

// Import/export types
Expand Down Expand Up @@ -519,8 +522,7 @@ static SCOSSL_DH_KEYGEN_CTX *p_scossl_dh_keygen_init(_In_ SCOSSL_PROVCTX *provCt
static SCOSSL_STATUS p_scossl_dh_keygen_set_template(_Inout_ SCOSSL_DH_KEYGEN_CTX *genCtx, _In_ SCOSSL_PROV_DH_KEY_CTX *tmplCtx)
{
if (genCtx == NULL ||
tmplCtx == NULL ||
tmplCtx->groupSetByParams)
tmplCtx == NULL)
{
return SCOSSL_FAILURE;
}
Expand Down