mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-27 06:35:22 +00:00
Handle Edwards curves similar to Montgomery curves wrt key export length.
Signed-off-by: Stephan Koch <koch@oberon.ch>
This commit is contained in:
parent
daa65956c3
commit
6d50173d9c
@ -778,6 +778,10 @@ int mbedtls_test_psa_exported_key_sanity_check(
|
|||||||
/* The representation of an ECC Montgomery public key is
|
/* The representation of an ECC Montgomery public key is
|
||||||
* the raw compressed point */
|
* the raw compressed point */
|
||||||
TEST_EQUAL(PSA_BITS_TO_BYTES(bits), exported_length);
|
TEST_EQUAL(PSA_BITS_TO_BYTES(bits), exported_length);
|
||||||
|
} else if(PSA_KEY_TYPE_ECC_GET_FAMILY(type) == PSA_ECC_FAMILY_TWISTED_EDWARDS) {
|
||||||
|
/* The representation of an ECC Edwards public key is
|
||||||
|
* the raw compressed point */
|
||||||
|
TEST_EQUAL(PSA_BITS_TO_BYTES(bits + 1), exported_length);
|
||||||
} else {
|
} else {
|
||||||
/* The representation of an ECC Weierstrass public key is:
|
/* The representation of an ECC Weierstrass public key is:
|
||||||
* - The byte 0x04;
|
* - The byte 0x04;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user