mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-10 06:44:28 +00:00
Merge pull request #8668 from gilles-peskine-arm/asymmetric_key_data-secpr1
Fix incorrect test data for SECP_R1 in automatically generated tests
This commit is contained in:
commit
454ab28be5
@ -594,19 +594,23 @@
|
||||
* They are defined in _Standards for Efficient Cryptography_,
|
||||
* _SEC 2: Recommended Elliptic Curve Domain Parameters_.
|
||||
* https://www.secg.org/sec2-v2.pdf
|
||||
*
|
||||
* \note For secp224k1, the bit-size is 225 (size of a private value).
|
||||
*
|
||||
* \note Mbed TLS only supports secp192k1 and secp256k1.
|
||||
*/
|
||||
#define PSA_ECC_FAMILY_SECP_K1 ((psa_ecc_family_t) 0x17)
|
||||
|
||||
/** SEC random curves over prime fields.
|
||||
*
|
||||
* This family comprises the following curves:
|
||||
* secp192k1, secp224r1, secp256r1, secp384r1, secp521r1.
|
||||
* secp192r1, secp224r1, secp256r1, secp384r1, secp521r1.
|
||||
* They are defined in _Standards for Efficient Cryptography_,
|
||||
* _SEC 2: Recommended Elliptic Curve Domain Parameters_.
|
||||
* https://www.secg.org/sec2-v2.pdf
|
||||
*/
|
||||
#define PSA_ECC_FAMILY_SECP_R1 ((psa_ecc_family_t) 0x12)
|
||||
/* SECP160R2 (SEC2 v1, obsolete) */
|
||||
/* SECP160R2 (SEC2 v1, obsolete, not supported in Mbed TLS) */
|
||||
#define PSA_ECC_FAMILY_SECP_R2 ((psa_ecc_family_t) 0x1b)
|
||||
|
||||
/** SEC Koblitz curves over binary fields.
|
||||
@ -616,6 +620,8 @@
|
||||
* They are defined in _Standards for Efficient Cryptography_,
|
||||
* _SEC 2: Recommended Elliptic Curve Domain Parameters_.
|
||||
* https://www.secg.org/sec2-v2.pdf
|
||||
*
|
||||
* \note Mbed TLS does not support any curve in this family.
|
||||
*/
|
||||
#define PSA_ECC_FAMILY_SECT_K1 ((psa_ecc_family_t) 0x27)
|
||||
|
||||
@ -626,6 +632,8 @@
|
||||
* They are defined in _Standards for Efficient Cryptography_,
|
||||
* _SEC 2: Recommended Elliptic Curve Domain Parameters_.
|
||||
* https://www.secg.org/sec2-v2.pdf
|
||||
*
|
||||
* \note Mbed TLS does not support any curve in this family.
|
||||
*/
|
||||
#define PSA_ECC_FAMILY_SECT_R1 ((psa_ecc_family_t) 0x22)
|
||||
|
||||
@ -636,6 +644,8 @@
|
||||
* It is defined in _Standards for Efficient Cryptography_,
|
||||
* _SEC 2: Recommended Elliptic Curve Domain Parameters_.
|
||||
* https://www.secg.org/sec2-v2.pdf
|
||||
*
|
||||
* \note Mbed TLS does not support any curve in this family.
|
||||
*/
|
||||
#define PSA_ECC_FAMILY_SECT_R2 ((psa_ecc_family_t) 0x2b)
|
||||
|
||||
@ -645,6 +655,9 @@
|
||||
* brainpoolP160r1, brainpoolP192r1, brainpoolP224r1, brainpoolP256r1,
|
||||
* brainpoolP320r1, brainpoolP384r1, brainpoolP512r1.
|
||||
* It is defined in RFC 5639.
|
||||
*
|
||||
* \note Mbed TLS only supports the 256-bit, 384-bit and 512-bit curves
|
||||
* in this family.
|
||||
*/
|
||||
#define PSA_ECC_FAMILY_BRAINPOOL_P_R1 ((psa_ecc_family_t) 0x30)
|
||||
|
||||
@ -673,6 +686,8 @@
|
||||
* - 448-bit: Edwards448, the twisted Edwards curve birationally equivalent
|
||||
* to Curve448.
|
||||
* Hamburg, _Ed448-Goldilocks, a new elliptic curve_, NIST ECC Workshop, 2015.
|
||||
*
|
||||
* \note Mbed TLS does not support Edwards curves yet.
|
||||
*/
|
||||
#define PSA_ECC_FAMILY_TWISTED_EDWARDS ((psa_ecc_family_t) 0x42)
|
||||
|
||||
|
@ -41,13 +41,15 @@ ASYMMETRIC_KEY_DATA = construct_asymmetric_key_data({
|
||||
'ECC(PSA_ECC_FAMILY_SECP_K1)': {
|
||||
192: ("297ac1722ccac7589ecb240dc719842538ca974beb79f228",
|
||||
"0426b7bb38da649ac2138fc050c6548b32553dab68afebc36105d325b75538c12323cb0764789ecb992671beb2b6bef2f5"),
|
||||
224: ("0024122bf020fa113f6c0ac978dfbd41f749257a9468febdbe0dc9f7e8",
|
||||
225: ("0024122bf020fa113f6c0ac978dfbd41f749257a9468febdbe0dc9f7e8",
|
||||
"042cc7335f4b76042bed44ef45959a62aa215f7a5ff0c8111b8c44ed654ee71c1918326ad485b2d599fe2a6eab096ee26d977334d2bac6d61d"),
|
||||
256: ("7fa06fa02d0e911b9a47fdc17d2d962ca01e2f31d60c6212d0ed7e3bba23a7b9",
|
||||
"045c39154579efd667adc73a81015a797d2c8682cdfbd3c3553c4a185d481cdc50e42a0e1cbc3ca29a32a645e927f54beaed14c9dbbf8279d725f5495ca924b24d"),
|
||||
},
|
||||
'ECC(PSA_ECC_FAMILY_SECP_R1)': {
|
||||
225: ("872f203b3ad35b7f2ecc803c3a0e1e0b1ed61cc1afe71b189cd4c995",
|
||||
192: ("d83b57a59c51358d9c8bbb898aff507f44dd14cf16917190",
|
||||
"04e35fcbee11cec3154f80a1a61df7d7612de4f2fd70c5608d0ee3a4a1a5719471adb33966dd9b035fdb774feeba94b04c"),
|
||||
224: ("872f203b3ad35b7f2ecc803c3a0e1e0b1ed61cc1afe71b189cd4c995",
|
||||
"046f00eadaa949fee3e9e1c7fa1247eecec86a0dce46418b9bd3117b981d4bd0ae7a990de912f9d060d6cb531a42d22e394ac29e81804bf160"),
|
||||
256: ("49c9a8c18c4b885638c431cf1df1c994131609b580d4fd43a0cab17db2f13eee",
|
||||
"047772656f814b399279d5e1f1781fac6f099a3c5ca1b0e35351834b08b65e0b572590cdaf8f769361bcf34acfc11e5e074e8426bdde04be6e653945449617de45"),
|
||||
|
@ -131,8 +131,8 @@ class KeyType:
|
||||
'PSA_DH_FAMILY_RFC7919': (2048, 3072, 4096, 6144, 8192),
|
||||
} # type: Dict[str, Tuple[int, ...]]
|
||||
ECC_KEY_SIZES = {
|
||||
'PSA_ECC_FAMILY_SECP_K1': (192, 224, 256),
|
||||
'PSA_ECC_FAMILY_SECP_R1': (225, 256, 384, 521),
|
||||
'PSA_ECC_FAMILY_SECP_K1': (192, 225, 256),
|
||||
'PSA_ECC_FAMILY_SECP_R1': (224, 256, 384, 521),
|
||||
'PSA_ECC_FAMILY_SECP_R2': (160,),
|
||||
'PSA_ECC_FAMILY_SECT_K1': (163, 233, 239, 283, 409, 571),
|
||||
'PSA_ECC_FAMILY_SECT_R1': (163, 233, 283, 409, 571),
|
||||
|
Loading…
x
Reference in New Issue
Block a user