mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-08 22:55:33 +00:00
Add OIDs for brainpool curves
This commit is contained in:
parent
22f64c8a9a
commit
48ac3db551
|
@ -74,6 +74,8 @@
|
||||||
#define OID_OIW_SECSIG_SHA1 OID_OIW_SECSIG_ALG "\x1a"
|
#define OID_OIW_SECSIG_SHA1 OID_OIW_SECSIG_ALG "\x1a"
|
||||||
#define OID_ORG_CERTICOM "\x81\x04" /* certicom(132) */
|
#define OID_ORG_CERTICOM "\x81\x04" /* certicom(132) */
|
||||||
#define OID_CERTICOM OID_ISO_IDENTIFIED_ORG OID_ORG_CERTICOM
|
#define OID_CERTICOM OID_ISO_IDENTIFIED_ORG OID_ORG_CERTICOM
|
||||||
|
#define OID_ORG_TELETRUST "\x24" /* teletrust(36) */
|
||||||
|
#define OID_TELETRUST OID_ISO_IDENTIFIED_ORG OID_ORG_TELETRUST
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ISO ITU OID parts
|
* ISO ITU OID parts
|
||||||
|
@ -258,7 +260,7 @@
|
||||||
#define OID_EC_ALG_ECDH OID_CERTICOM "\x01\x0c"
|
#define OID_EC_ALG_ECDH OID_CERTICOM "\x01\x0c"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ECParameters namedCurve identifiers, from RFC 5480
|
* ECParameters namedCurve identifiers, from RFC 5480 and RFC 5639
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* secp192r1 OBJECT IDENTIFIER ::= {
|
/* secp192r1 OBJECT IDENTIFIER ::= {
|
||||||
|
@ -281,6 +283,23 @@
|
||||||
* iso(1) identified-organization(3) certicom(132) curve(0) 35 } */
|
* iso(1) identified-organization(3) certicom(132) curve(0) 35 } */
|
||||||
#define OID_EC_GRP_SECP521R1 OID_CERTICOM "\x00\x23"
|
#define OID_EC_GRP_SECP521R1 OID_CERTICOM "\x00\x23"
|
||||||
|
|
||||||
|
/* RFC 5639 4.1
|
||||||
|
* ecStdCurvesAndGeneration OBJECT IDENTIFIER::= {iso(1)
|
||||||
|
* identified-organization(3) teletrust(36) algorithm(3) signature-
|
||||||
|
* algorithm(3) ecSign(2) 8}
|
||||||
|
* ellipticCurve OBJECT IDENTIFIER ::= {ecStdCurvesAndGeneration 1}
|
||||||
|
* versionOne OBJECT IDENTIFIER ::= {ellipticCurve 1} */
|
||||||
|
#define OID_EC_BRAINPOOL_V1 OID_TELETRUST "\x03\x03\x02\x08\x01\x01"
|
||||||
|
|
||||||
|
/* brainpoolP256r1 OBJECT IDENTIFIER ::= {versionOne 7} */
|
||||||
|
#define OID_EC_GRP_BP256R1 OID_EC_BRAINPOOL_V1 "\x07"
|
||||||
|
|
||||||
|
/* brainpoolP384r1 OBJECT IDENTIFIER ::= {versionOne 11} */
|
||||||
|
#define OID_EC_GRP_BP384R1 OID_EC_BRAINPOOL_V1 "\x0B"
|
||||||
|
|
||||||
|
/* brainpoolP512r1 OBJECT IDENTIFIER ::= {versionOne 13} */
|
||||||
|
#define OID_EC_GRP_BP512R1 OID_EC_BRAINPOOL_V1 "\x0D"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ECDSA signature identifers, from RFC 5480
|
* ECDSA signature identifers, from RFC 5480
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -405,6 +405,18 @@ static const oid_ecp_grp_t oid_ecp_grp[] =
|
||||||
{ ADD_LEN( OID_EC_GRP_SECP521R1 ), "secp521r1", "secp521r1" },
|
{ ADD_LEN( OID_EC_GRP_SECP521R1 ), "secp521r1", "secp521r1" },
|
||||||
POLARSSL_ECP_DP_SECP521R1,
|
POLARSSL_ECP_DP_SECP521R1,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
{ ADD_LEN( OID_EC_GRP_BP256R1 ), "brainpoolP256r1","brainpool256r1" },
|
||||||
|
POLARSSL_ECP_DP_BP256R1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{ ADD_LEN( OID_EC_GRP_BP384R1 ), "brainpoolP384r1","brainpool384r1" },
|
||||||
|
POLARSSL_ECP_DP_BP384R1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{ ADD_LEN( OID_EC_GRP_BP512R1 ), "brainpoolP512r1","brainpool512r1" },
|
||||||
|
POLARSSL_ECP_DP_BP512R1,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
{ NULL, 0, NULL, NULL },
|
{ NULL, 0, NULL, NULL },
|
||||||
0,
|
0,
|
||||||
|
|
5
tests/data_files/ec_bp256_prv.pem
Normal file
5
tests/data_files/ec_bp256_prv.pem
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
-----BEGIN EC PRIVATE KEY-----
|
||||||
|
MHgCAQEEICFh1vLbdlJvpiwW81aoDwHzL3dnhLNqqZeZqLdmIID/oAsGCSskAwMC
|
||||||
|
CAEBB6FEA0IABHaMjK5KvKYwbbDtgbDEpiFcN4Bm7G1hbBRuE/HH34CblqtpEcJ9
|
||||||
|
igIznwkmhA5VI209HvviZp0JDkxMZg+tqR0=
|
||||||
|
-----END EC PRIVATE KEY-----
|
4
tests/data_files/ec_bp256_pub.pem
Normal file
4
tests/data_files/ec_bp256_pub.pem
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
-----BEGIN PUBLIC KEY-----
|
||||||
|
MFowFAYHKoZIzj0CAQYJKyQDAwIIAQEHA0IABHaMjK5KvKYwbbDtgbDEpiFcN4Bm
|
||||||
|
7G1hbBRuE/HH34CblqtpEcJ9igIznwkmhA5VI209HvviZp0JDkxMZg+tqR0=
|
||||||
|
-----END PUBLIC KEY-----
|
6
tests/data_files/ec_bp384_prv.pem
Normal file
6
tests/data_files/ec_bp384_prv.pem
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
-----BEGIN EC PRIVATE KEY-----
|
||||||
|
MIGoAgEBBDA92S51DZDX05/BiFzYrRLqlEHyK5M0tNllICrbFEjOJMWAioXdmvwi
|
||||||
|
mvCjEk91W8ugCwYJKyQDAwIIAQELoWQDYgAEcZ+dCTpifg01A4XGYc6/AMYZI1Zv
|
||||||
|
6QBqMQevHYcbxrtomF/XIuoyvjFvjng7fNGVd4X2bPwMsZXdXJmo56uqhIVTpYTf
|
||||||
|
0rSOdtRF/gDdi+WQlth31GltI7S8jbFHJOZq
|
||||||
|
-----END EC PRIVATE KEY-----
|
5
tests/data_files/ec_bp384_pub.pem
Normal file
5
tests/data_files/ec_bp384_pub.pem
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
-----BEGIN PUBLIC KEY-----
|
||||||
|
MHowFAYHKoZIzj0CAQYJKyQDAwIIAQELA2IABHGfnQk6Yn4NNQOFxmHOvwDGGSNW
|
||||||
|
b+kAajEHrx2HG8a7aJhf1yLqMr4xb454O3zRlXeF9mz8DLGV3VyZqOerqoSFU6WE
|
||||||
|
39K0jnbURf4A3YvlkJbYd9RpbSO0vI2xRyTmag==
|
||||||
|
-----END PUBLIC KEY-----
|
7
tests/data_files/ec_bp512_prv.pem
Normal file
7
tests/data_files/ec_bp512_prv.pem
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
-----BEGIN EC PRIVATE KEY-----
|
||||||
|
MIHaAgEBBEA3LJd49p9ybLyj9KJo8WtNYX0QKA15pqApzVGHn+EBKTTf5TlUVTN9
|
||||||
|
9pBtx9bS7qTbsgZcAij3Oz7XFkgOfXHSoAsGCSskAwMCCAEBDaGBhQOBggAEOLfs
|
||||||
|
krYcXGx/vCik7HWdSPzU4uN03v1cSWilTb73UQ5ReIb7/DjqOapSk1nXCnFWw108
|
||||||
|
usfOd2vbJR3WS85xI0Qk7nBJ7tBy8NvE15mW4XXVV+JjdjrpcJXAgec+fbLjitw9
|
||||||
|
TJoEh7Ht6HbcH8phyQLpodhyK4YSko8YokhFWRo=
|
||||||
|
-----END EC PRIVATE KEY-----
|
6
tests/data_files/ec_bp512_pub.pem
Normal file
6
tests/data_files/ec_bp512_pub.pem
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
-----BEGIN PUBLIC KEY-----
|
||||||
|
MIGbMBQGByqGSM49AgEGCSskAwMCCAEBDQOBggAEOLfskrYcXGx/vCik7HWdSPzU
|
||||||
|
4uN03v1cSWilTb73UQ5ReIb7/DjqOapSk1nXCnFWw108usfOd2vbJR3WS85xI0Qk
|
||||||
|
7nBJ7tBy8NvE15mW4XXVV+JjdjrpcJXAgec+fbLjitw9TJoEh7Ht6HbcH8phyQLp
|
||||||
|
odhyK4YSko8YokhFWRo=
|
||||||
|
-----END PUBLIC KEY-----
|
|
@ -130,6 +130,18 @@ Parse Public EC Key #6 (RFC 5480, secp521r1)
|
||||||
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_ECP_C:POLARSSL_ECP_DP_SECP521R1_ENABLED
|
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_ECP_C:POLARSSL_ECP_DP_SECP521R1_ENABLED
|
||||||
pk_parse_public_keyfile_ec:"data_files/ec_521_pub.pem":0
|
pk_parse_public_keyfile_ec:"data_files/ec_521_pub.pem":0
|
||||||
|
|
||||||
|
Parse Public EC Key #7 (RFC 5480, brainpoolP256r1)
|
||||||
|
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_ECP_C:POLARSSL_ECP_DP_BP256R1_ENABLED
|
||||||
|
pk_parse_public_keyfile_ec:"data_files/ec_bp256_pub.pem":0
|
||||||
|
|
||||||
|
Parse Public EC Key #8 (RFC 5480, brainpoolP384r1)
|
||||||
|
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_ECP_C:POLARSSL_ECP_DP_BP384R1_ENABLED
|
||||||
|
pk_parse_public_keyfile_ec:"data_files/ec_bp384_pub.pem":0
|
||||||
|
|
||||||
|
Parse Public EC Key #9 (RFC 5480, brainpoolP512r1)
|
||||||
|
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_ECP_C:POLARSSL_ECP_DP_BP512R1_ENABLED
|
||||||
|
pk_parse_public_keyfile_ec:"data_files/ec_bp512_pub.pem":0
|
||||||
|
|
||||||
Parse EC Key #1 (SEC1 DER)
|
Parse EC Key #1 (SEC1 DER)
|
||||||
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_ECP_C:POLARSSL_ECP_DP_SECP192R1_ENABLED
|
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_ECP_C:POLARSSL_ECP_DP_SECP192R1_ENABLED
|
||||||
pk_parse_keyfile_ec:"data_files/ec_prv.sec1.der":"NULL":0
|
pk_parse_keyfile_ec:"data_files/ec_prv.sec1.der":"NULL":0
|
||||||
|
@ -174,6 +186,18 @@ Parse EC Key #11 (SEC1 PEM, secp521r1)
|
||||||
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_ECP_C:POLARSSL_ECP_DP_SECP521R1_ENABLED
|
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_ECP_C:POLARSSL_ECP_DP_SECP521R1_ENABLED
|
||||||
pk_parse_keyfile_ec:"data_files/ec_521_prv.pem":"NULL":0
|
pk_parse_keyfile_ec:"data_files/ec_521_prv.pem":"NULL":0
|
||||||
|
|
||||||
|
Parse EC Key #12 (SEC1 PEM, bp256r1)
|
||||||
|
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_ECP_C:POLARSSL_ECP_DP_BP256R1_ENABLED
|
||||||
|
pk_parse_keyfile_ec:"data_files/ec_bp256_prv.pem":"NULL":0
|
||||||
|
|
||||||
|
Parse EC Key #13 (SEC1 PEM, bp384r1)
|
||||||
|
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_ECP_C:POLARSSL_ECP_DP_BP384R1_ENABLED
|
||||||
|
pk_parse_keyfile_ec:"data_files/ec_bp384_prv.pem":"NULL":0
|
||||||
|
|
||||||
|
Parse EC Key #14 (SEC1 PEM, bp512r1)
|
||||||
|
depends_on:POLARSSL_PEM_PARSE_C:POLARSSL_ECP_C:POLARSSL_ECP_DP_BP512R1_ENABLED
|
||||||
|
pk_parse_keyfile_ec:"data_files/ec_bp512_prv.pem":"NULL":0
|
||||||
|
|
||||||
Key ASN1 (Incorrect first tag)
|
Key ASN1 (Incorrect first tag)
|
||||||
pk_parse_key_rsa:"":"":POLARSSL_ERR_PK_KEY_INVALID_FORMAT
|
pk_parse_key_rsa:"":"":POLARSSL_ERR_PK_KEY_INVALID_FORMAT
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue