TinyCrypt PK parse: Impl. EC public key derivation in TC-based ECDSA

This commit is contained in:
Hanno Becker 2019-08-20 14:21:40 +01:00
parent 7e38c37302
commit d45f383b01

View file

@ -978,7 +978,14 @@ static int pk_parse_key_sec1_der( mbedtls_uecc_keypair *keypair,
}
}
//TODO: Do we need to support derived public keys with uecc?
if( !pubkey_done )
{
ret = uECC_compute_public_key( keypair->private_key,
keypair->public_key,
uECC_secp256r1() );
if( ret == 0 )
return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT );
}
return( 0 );
}