Revert "Move EDDSA to another branch."

This reverts commit a0faf5308e.
This commit is contained in:
Pol Henarejos
2025-12-11 19:35:27 +01:00
parent 4d6f6e4635
commit 629f14ab0d
8 changed files with 103 additions and 11 deletions

View File

@@ -79,6 +79,14 @@ int cmd_keypair_gen() {
if (asn1_find_tag(&ctxo, 0x83, &g) != true) {
return SW_WRONG_DATA();
}
#ifdef MBEDTLS_EDDSA_C
if (ec_id == MBEDTLS_ECP_DP_CURVE25519 && (g.data[0] != 9)) {
ec_id = MBEDTLS_ECP_DP_ED25519;
}
else if (ec_id == MBEDTLS_ECP_DP_CURVE448 && (g.len != 56 || g.data[0] != 5)) {
ec_id = MBEDTLS_ECP_DP_ED448;
}
#endif
}
mbedtls_ecdsa_context ecdsa;
mbedtls_ecdsa_init(&ecdsa);