mirror of
https://github.com/libtom/libtomcrypt
synced 2026-08-25 20:26:07 -04:00
Split up ec25519/448 tests.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
parent
811b1a6c14
commit
0834f876cd
6 changed files with 47 additions and 42 deletions
|
|
@ -446,27 +446,22 @@ int ed25519_test(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
if (ltc_mp.name == NULL) return CRYPT_NOP;
|
||||
|
||||
if ((ret = s_rfc_8410_10_test()) != CRYPT_OK) {
|
||||
return ret;
|
||||
}
|
||||
if ((ret = s_rfc_8032_7_1_test()) != CRYPT_OK) {
|
||||
return ret;
|
||||
}
|
||||
if ((ret = s_rfc_8032_7_2_test()) != CRYPT_OK) {
|
||||
return ret;
|
||||
}
|
||||
if ((ret = s_rfc_8032_7_3_test()) != CRYPT_OK) {
|
||||
return ret;
|
||||
}
|
||||
if ((ret = s_signature_malleability_test()) != CRYPT_OK) {
|
||||
return ret;
|
||||
}
|
||||
DO(s_rfc_8032_7_1_test());
|
||||
DO(s_rfc_8032_7_2_test());
|
||||
DO(s_rfc_8032_7_3_test());
|
||||
DO(s_signature_malleability_test());
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ed25519_mpi_test(void)
|
||||
{
|
||||
if (ltc_mp.name == NULL) return CRYPT_NOP;
|
||||
DO(s_rfc_8410_10_test());
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
#else
|
||||
LTC_NOP_TEST(ed25519_test)
|
||||
LTC_NOP_TEST(ed25519_mpi_test)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -469,12 +469,17 @@ int ed448_test(void)
|
|||
DO(s_rfc_8032_5_2_6_ctx_test());
|
||||
DO(s_rfc_8032_5_2_6_ph_test());
|
||||
DO(s_signature_malleability_test());
|
||||
if (ltc_mp.name != NULL) {
|
||||
DO(s_ed448_compat_test());
|
||||
}
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
int ed448_mpi_test(void)
|
||||
{
|
||||
if (ltc_mp.name == NULL) return CRYPT_NOP;
|
||||
DO(s_ed448_compat_test());
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
#else
|
||||
LTC_NOP_TEST(ed448_test)
|
||||
LTC_NOP_TEST(ed448_mpi_test)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -33,9 +33,13 @@ static const test_function test_functions[] =
|
|||
LTC_TEST_FN(ecc_test),
|
||||
LTC_TEST_FN(dsa_test),
|
||||
LTC_TEST_FN(ed25519_test),
|
||||
LTC_TEST_FN(ed25519_mpi_test),
|
||||
LTC_TEST_FN(x25519_test),
|
||||
LTC_TEST_FN(x25519_mpi_test),
|
||||
LTC_TEST_FN(ed448_test),
|
||||
LTC_TEST_FN(ed448_mpi_test),
|
||||
LTC_TEST_FN(x448_test),
|
||||
LTC_TEST_FN(x448_mpi_test),
|
||||
LTC_TEST_FN(file_test),
|
||||
LTC_TEST_FN(multi_test),
|
||||
LTC_TEST_FN(pem_test),
|
||||
|
|
|
|||
|
|
@ -41,9 +41,13 @@ int prng_test(void);
|
|||
int mpi_test(void);
|
||||
int padding_test(void);
|
||||
int x25519_test(void);
|
||||
int x25519_mpi_test(void);
|
||||
int x448_test(void);
|
||||
int x448_mpi_test(void);
|
||||
int ed25519_test(void);
|
||||
int ed25519_mpi_test(void);
|
||||
int ed448_test(void);
|
||||
int ed448_mpi_test(void);
|
||||
int ssh_test(void);
|
||||
int argon2_test(void);
|
||||
int bcrypt_test(void);
|
||||
|
|
|
|||
|
|
@ -224,29 +224,21 @@ static int s_x25519_compat_test(void)
|
|||
*/
|
||||
int x25519_test(void)
|
||||
{
|
||||
int ret;
|
||||
DO(s_rfc_7748_5_2_test());
|
||||
DO(s_rfc_7748_6_test());
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
int x25519_mpi_test(void)
|
||||
{
|
||||
if (ltc_mp.name == NULL) return CRYPT_NOP;
|
||||
|
||||
if ((ret = s_rfc_7748_5_2_test()) != CRYPT_OK) {
|
||||
return ret;
|
||||
}
|
||||
if ((ret = s_rfc_7748_6_test()) != CRYPT_OK) {
|
||||
return ret;
|
||||
}
|
||||
if ((ret = s_rfc_8410_10_test()) != CRYPT_OK) {
|
||||
return ret;
|
||||
}
|
||||
if ((ret = s_x25519_pkcs8_test()) != CRYPT_OK) {
|
||||
return ret;
|
||||
}
|
||||
if ((ret = s_x25519_compat_test()) != CRYPT_OK) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
DO(s_x25519_pkcs8_test());
|
||||
DO(s_rfc_8410_10_test());
|
||||
DO(s_x25519_compat_test());
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
#else
|
||||
LTC_NOP_TEST(x25519_test)
|
||||
LTC_NOP_TEST(x25519_mpi_test)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -233,12 +233,17 @@ int x448_test(void)
|
|||
DO(s_x448_rfc7748_iter_test());
|
||||
DO(s_x448_keygen_dh_test());
|
||||
DO(s_x448_wycheproof_special_test());
|
||||
if (ltc_mp.name != NULL) {
|
||||
DO(s_x448_compat_test());
|
||||
}
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
int x448_mpi_test(void)
|
||||
{
|
||||
if (ltc_mp.name == NULL) return CRYPT_NOP;
|
||||
DO(s_x448_compat_test());
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
#else
|
||||
LTC_NOP_TEST(x448_test)
|
||||
LTC_NOP_TEST(x448_mpi_test)
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue