Codebase list pgpdump / 2f12bd1
Update keys.c 2022-02-22 changes to "keys.c": Added BrainPool-384/512 curve definitions Incremented ELLIP_CURVES_NUM Removed "expectedBits" structure element and array entries (unused, values source(s) lost, not really necessary) galaxiesFarApart authored 2 years ago GitHub committed 2 years ago
1 changed file(s) with 14 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
5353 multi_precision_integer("RSA e");
5454 }
5555
56 /* added: 2021-11-11
56 /* added: 2021-11-11; extended: 2022-02-21 (BrainPool 384,512; RFC5639)
5757 * Reference: draft-ietf-openpgp-crypto-refresh-04 (10/2021);section 9.2 ECC Curves for OpenPGP
5858 * https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-04.html
5959 * Note (2021-11-25): actual ECC curve hex OID padded to 10 to match incoming oid array length
6060 * so that memcmp will work properly (compare two values of the same size)
6161 */
6262 private unsigned char BrainPool256r1_OID[10]={0x2B,0x24,0x3,0x3,0x2,0x8,0x1,0x1,0x7,0};
63 private unsigned char BrainPool384r1_OID[10]={0x2B,0x24,0x3,0x3,0x2,0x8,0x1,0x1,0x0b,0};
64 private unsigned char BrainPool512r1_OID[10]={0x2B,0x24,0x3,0x3,0x2,0x8,0x1,0x1,0x0d,0};
6365 private unsigned char NIST_P256_OID[10]={0x2A,0x86,0x48,0xCE,0x3D,0x3,0x1,0x7,0,0};
6466 private unsigned char NIST_P384_OID[10]={0x2B,0x81,0x04,0x00,0x22,0,0,0,0,0};
6567 private unsigned char NIST_P521_OID[10]={0x2B,0x81,0x04,0x00,0x23,0,0,0,0,0};
7880 const unsigned char *oidhex;
7981 const char *name;
8082 const char *oidstring;
81 const int expectedBits;
8283 } ELLIP_CURVES[] = {
83 {NIST_P256_OID,"NIST P-256","0x2A 86 48 CE 3D 03 01 07",515},
84 {NIST_P384_OID,"NIST P-384","0x2B 81 04 00 22",771},
85 {NIST_P521_OID,"NIST P-521","0x2B 81 04 00 23",1059},
86 {Ed25519_OID,"Ed25519","0x2B 06 01 04 01 DA 47 0F 01",263},
87 {Ed448_OID,"Ed448","0x2B 65 71",463},
88 {Curve25519_OID,"Curve25519","0x2B 06 01 04 01 97 55 01 05 01",263},
89 {X448_OID,"X448","0x2B 65 6F",445},
90 {BrainPool256r1_OID,"brainpoolP256r1","0x2B 24 03 03 02 08 01 01 07",515}
84 {NIST_P256_OID,"NIST P-256","0x2A 86 48 CE 3D 03 01 07"},
85 {NIST_P384_OID,"NIST P-384","0x2B 81 04 00 22"},
86 {NIST_P521_OID,"NIST P-521","0x2B 81 04 00 23"},
87 {Ed25519_OID,"Ed25519","0x2B 06 01 04 01 DA 47 0F 01"},
88 {Ed448_OID,"Ed448","0x2B 65 71"},
89 {Curve25519_OID,"Curve25519","0x2B 06 01 04 01 97 55 01 05 01"},
90 {X448_OID,"X448","0x2B 65 6F"},
91 {BrainPool256r1_OID,"brainpoolP256r1","0x2B 24 03 03 02 08 01 01 07"},
92 {BrainPool384r1_OID,"BrainPoolP384r1","0x2B 24 03 03 02 08 01 01 07 0b"},
93 {BrainPool512r1_OID,"BrainPoolP512r1","0x2B 24 03 03 02 08 01 01 07 0d"}
9194 };
92 #define ELLIP_CURVES_NUM 8
95 #define ELLIP_CURVES_NUM 10
9396
9497 /* end 2021-11-11 */
9598