{
if (!strcmp(curve_name, "prime256v1"))
return 256;
- else
- return 0;
+ else if (!strcmp(curve_name, "secp384r1"))
+ return 384;
+
+ return 0;
}
static int fdt_get_key(struct ecdsa_public_key *key, const void *fdt, int node)
return ecdsa_verify_hash(dev, info, hash, sig, sig_len);
}
-U_BOOT_CRYPTO_ALGO(ecdsa) = {
+U_BOOT_CRYPTO_ALGO(ecdsa256) = {
.name = "ecdsa256",
.key_len = ECDSA256_BYTES,
.verify = ecdsa_verify,
};
+U_BOOT_CRYPTO_ALGO(ecdsa384) = {
+ .name = "ecdsa384",
+ .key_len = ECDSA384_BYTES,
+ .verify = ecdsa_verify,
+};
+
/*
* uclass definition for ECDSA API
*
.add_verify_data = ecdsa_add_verify_data,
.verify = ecdsa_verify,
},
+ {
+ .name = "ecdsa384",
+ .key_len = ECDSA384_BYTES,
+ .sign = ecdsa_sign,
+ .add_verify_data = ecdsa_add_verify_data,
+ .verify = ecdsa_verify,
+ },
{
.name = "secp521r1",
.key_len = ECDSA521_BYTES,