Skip to content

Commit

Permalink
removed deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
feventura committed Feb 26, 2024
1 parent 770aa96 commit 3b0cb8f
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 113 deletions.
157 changes: 56 additions & 101 deletions oqsprov/oqs_kmgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,286 +894,241 @@ static void *p521_mldsa87_gen_init(void *provctx, int selection)
"p521_mldsa87", KEY_TYPE_HYB_SIG, 256, 26);
}

static void *mldsa44_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44,
"mldsa44", KEY_TYPE_SIG, NULL, 128, 27);
}

static void *mldsa44_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, "mldsa44",
0, 128, 27);
}
static void *p256_mldsa44_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44,
"p256_mldsa44", KEY_TYPE_HYB_SIG, NULL, 128, 28);
}

static void *p256_mldsa44_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44,
"p256_mldsa44", KEY_TYPE_HYB_SIG, 128, 28);
}
static void *rsa3072_mldsa44_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44,
"rsa3072_mldsa44", KEY_TYPE_HYB_SIG, NULL, 128, 29);
}

static void *rsa3072_mldsa44_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44,
"rsa3072_mldsa44", KEY_TYPE_HYB_SIG, 128, 29);
}
static void *mldsa65_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_65,
"mldsa65", KEY_TYPE_SIG, NULL, 192, 30);
}

static void *mldsa65_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65, "mldsa65",
0, 192, 30);
}
static void *p384_mldsa65_new_key(void *provctx)
static void *falcon512_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_65,
"p384_mldsa65", KEY_TYPE_HYB_SIG, NULL, 192, 31);
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512,
"falcon512", KEY_TYPE_SIG, NULL, 128, 27);
}

static void *p384_mldsa65_gen_init(void *provctx, int selection)
static void *falcon512_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65,
"p384_mldsa65", KEY_TYPE_HYB_SIG, 192, 31);
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512,
"falcon512", 0, 128, 27);
}
static void *mldsa87_new_key(void *provctx)
static void *p256_falcon512_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_87,
"mldsa87", KEY_TYPE_SIG, NULL, 256, 32);
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512,
"p256_falcon512", KEY_TYPE_HYB_SIG, NULL, 128, 28);
}

static void *mldsa87_gen_init(void *provctx, int selection)
static void *p256_falcon512_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_87, "mldsa87",
0, 256, 32);
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512,
"p256_falcon512", KEY_TYPE_HYB_SIG, 128, 28);
}
static void *p521_mldsa87_new_key(void *provctx)
static void *rsa3072_falcon512_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_87,
"p521_mldsa87", KEY_TYPE_HYB_SIG, NULL, 256, 33);
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512,
"rsa3072_falcon512", KEY_TYPE_HYB_SIG, NULL, 128, 29);
}

static void *p521_mldsa87_gen_init(void *provctx, int selection)
static void *rsa3072_falcon512_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_87,
"p521_mldsa87", KEY_TYPE_HYB_SIG, 256, 33);
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512,
"rsa3072_falcon512", KEY_TYPE_HYB_SIG, 128, 29);
}

static void *falcon512_new_key(void *provctx)
static void *falcon512_p256_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512,
"falcon512", KEY_TYPE_SIG, NULL, 128, 34);
"falcon512_p256", KEY_TYPE_CMP_SIG, NULL, 128, 30);
}

static void *falcon512_gen_init(void *provctx, int selection)
static void *falcon512_p256_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512,
"falcon512", 0, 128, 34);
"falcon512_p256", KEY_TYPE_CMP_SIG, 128, 30);
}
static void *p256_falcon512_new_key(void *provctx)
static void *falcon512_bp256_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512,
"p256_falcon512", KEY_TYPE_HYB_SIG, NULL, 128, 35);
"falcon512_bp256", KEY_TYPE_CMP_SIG, NULL, 256, 31);
}

static void *p256_falcon512_gen_init(void *provctx, int selection)
static void *falcon512_bp256_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512,
"p256_falcon512", KEY_TYPE_HYB_SIG, 128, 35);
"falcon512_bp256", KEY_TYPE_CMP_SIG, 256, 31);
}
static void *rsa3072_falcon512_new_key(void *provctx)
static void *falcon512_ed25519_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512,
"rsa3072_falcon512", KEY_TYPE_HYB_SIG, NULL, 128, 36);
"falcon512_ed25519", KEY_TYPE_CMP_SIG, NULL, 128, 32);
}

static void *rsa3072_falcon512_gen_init(void *provctx, int selection)
static void *falcon512_ed25519_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512,
"rsa3072_falcon512", KEY_TYPE_HYB_SIG, 128, 36);
"falcon512_ed25519", KEY_TYPE_CMP_SIG, 128, 32);
}
static void *falcon1024_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_1024,
"falcon1024", KEY_TYPE_SIG, NULL, 256, 37);
"falcon1024", KEY_TYPE_SIG, NULL, 256, 33);
}

static void *falcon1024_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_1024,
"falcon1024", 0, 256, 37);
"falcon1024", 0, 256, 33);
}
static void *p521_falcon1024_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_1024,
"p521_falcon1024", KEY_TYPE_HYB_SIG, NULL, 256, 38);
"p521_falcon1024", KEY_TYPE_HYB_SIG, NULL, 256, 34);
}

static void *p521_falcon1024_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_1024,
"p521_falcon1024", KEY_TYPE_HYB_SIG, 256, 38);
"p521_falcon1024", KEY_TYPE_HYB_SIG, 256, 34);
}

static void *sphincssha2128fsimple_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx),
OQS_SIG_alg_sphincs_sha2_128f_simple,
"sphincssha2128fsimple", KEY_TYPE_SIG, NULL, 128, 39);
"sphincssha2128fsimple", KEY_TYPE_SIG, NULL, 128, 35);
}

static void *sphincssha2128fsimple_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection,
OQS_SIG_alg_sphincs_sha2_128f_simple,
"sphincssha2128fsimple", 0, 128, 39);
"sphincssha2128fsimple", 0, 128, 35);
}
static void *p256_sphincssha2128fsimple_new_key(void *provctx)
{
return oqsx_key_new(
PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128f_simple,
"p256_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 40);
"p256_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 36);
}

static void *p256_sphincssha2128fsimple_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(
provctx, selection, OQS_SIG_alg_sphincs_sha2_128f_simple,
"p256_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, 128, 40);
"p256_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, 128, 36);
}
static void *rsa3072_sphincssha2128fsimple_new_key(void *provctx)
{
return oqsx_key_new(
PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128f_simple,
"rsa3072_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 41);
"rsa3072_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 37);
}

static void *rsa3072_sphincssha2128fsimple_gen_init(void *provctx,
int selection)
{
return oqsx_gen_init(
provctx, selection, OQS_SIG_alg_sphincs_sha2_128f_simple,
"rsa3072_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, 128, 41);
"rsa3072_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, 128, 37);
}
static void *sphincssha2128ssimple_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx),
OQS_SIG_alg_sphincs_sha2_128s_simple,
"sphincssha2128ssimple", KEY_TYPE_SIG, NULL, 128, 42);
"sphincssha2128ssimple", KEY_TYPE_SIG, NULL, 128, 38);
}

static void *sphincssha2128ssimple_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection,
OQS_SIG_alg_sphincs_sha2_128s_simple,
"sphincssha2128ssimple", 0, 128, 42);
"sphincssha2128ssimple", 0, 128, 38);
}
static void *p256_sphincssha2128ssimple_new_key(void *provctx)
{
return oqsx_key_new(
PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128s_simple,
"p256_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, NULL, 128, 43);
"p256_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, NULL, 128, 39);
}

static void *p256_sphincssha2128ssimple_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(
provctx, selection, OQS_SIG_alg_sphincs_sha2_128s_simple,
"p256_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, 128, 43);
"p256_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, 128, 39);
}
static void *rsa3072_sphincssha2128ssimple_new_key(void *provctx)
{
return oqsx_key_new(
PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128s_simple,
"rsa3072_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, NULL, 128, 44);
"rsa3072_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, NULL, 128, 40);
}

static void *rsa3072_sphincssha2128ssimple_gen_init(void *provctx,
int selection)
{
return oqsx_gen_init(
provctx, selection, OQS_SIG_alg_sphincs_sha2_128s_simple,
"rsa3072_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, 128, 44);
"rsa3072_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, 128, 40);
}
static void *sphincssha2192fsimple_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx),
OQS_SIG_alg_sphincs_sha2_192f_simple,
"sphincssha2192fsimple", KEY_TYPE_SIG, NULL, 192, 45);
"sphincssha2192fsimple", KEY_TYPE_SIG, NULL, 192, 41);
}

static void *sphincssha2192fsimple_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection,
OQS_SIG_alg_sphincs_sha2_192f_simple,
"sphincssha2192fsimple", 0, 192, 45);
"sphincssha2192fsimple", 0, 192, 41);
}
static void *p384_sphincssha2192fsimple_new_key(void *provctx)
{
return oqsx_key_new(
PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_192f_simple,
"p384_sphincssha2192fsimple", KEY_TYPE_HYB_SIG, NULL, 192, 46);
"p384_sphincssha2192fsimple", KEY_TYPE_HYB_SIG, NULL, 192, 42);
}

static void *p384_sphincssha2192fsimple_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(
provctx, selection, OQS_SIG_alg_sphincs_sha2_192f_simple,
"p384_sphincssha2192fsimple", KEY_TYPE_HYB_SIG, 192, 46);
"p384_sphincssha2192fsimple", KEY_TYPE_HYB_SIG, 192, 42);
}

static void *sphincsshake128fsimple_new_key(void *provctx)
{
return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx),
OQS_SIG_alg_sphincs_shake_128f_simple,
"sphincsshake128fsimple", KEY_TYPE_SIG, NULL, 128, 47);
"sphincsshake128fsimple", KEY_TYPE_SIG, NULL, 128, 43);
}

static void *sphincsshake128fsimple_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(provctx, selection,
OQS_SIG_alg_sphincs_shake_128f_simple,
"sphincsshake128fsimple", 0, 128, 47);
"sphincsshake128fsimple", 0, 128, 43);
}
static void *p256_sphincsshake128fsimple_new_key(void *provctx)
{
return oqsx_key_new(
PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_shake_128f_simple,
"p256_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 48);
"p256_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 44);
}

static void *p256_sphincsshake128fsimple_gen_init(void *provctx, int selection)
{
return oqsx_gen_init(
provctx, selection, OQS_SIG_alg_sphincs_shake_128f_simple,
"p256_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, 128, 48);
"p256_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, 128, 44);
}
static void *rsa3072_sphincsshake128fsimple_new_key(void *provctx)
{
return oqsx_key_new(
PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_shake_128f_simple,
"rsa3072_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 49);
"rsa3072_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 45);
}

static void *rsa3072_sphincsshake128fsimple_gen_init(void *provctx,
int selection)
{
return oqsx_gen_init(
provctx, selection, OQS_SIG_alg_sphincs_shake_128f_simple,
"rsa3072_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, 128, 49);
"rsa3072_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, 128, 45);
}

///// OQS_TEMPLATE_FRAGMENT_KEYMGMT_CONSTRUCTORS_END
Expand Down
2 changes: 1 addition & 1 deletion oqsprov/oqsprov.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ extern OSSL_FUNC_provider_get_capabilities_fn oqs_provider_get_capabilities;
///// OQS_TEMPLATE_FRAGMENT_ASSIGN_SIG_OIDS_START

#ifdef OQS_KEM_ENCODERS
# define OQS_OID_CNT 176
# define OQS_OID_CNT 196
#else
# define OQS_OID_CNT 92
#endif
Expand Down
Loading

0 comments on commit 3b0cb8f

Please sign in to comment.