Skip to content

Commit

Permalink
Add PQ key exchange OIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
WillChilds-Klein committed Aug 5, 2024
1 parent b929d74 commit 5230bd8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
20 changes: 17 additions & 3 deletions crypto/obj/obj_dat.h
Original file line number Diff line number Diff line change
Expand Up @@ -7218,6 +7218,18 @@ static const uint8_t kObjectData[] = {
0x04,
0x02,
0x0c,
/* NID_SecP256r1Kyber768Draft00 */
0x2b,
0xce,
0x0f,
0x63,
0x34,
/* NID_X25519Kyber768Draft00 */
0x2b,
0xce,
0x0f,
0x63,
0x33,
};

static const ASN1_OBJECT kObjects[NUM_NID] = {
Expand Down Expand Up @@ -8883,9 +8895,9 @@ static const ASN1_OBJECT kObjects[NUM_NID] = {
{"SHAKE128", "shake128", NID_shake128, 9, &kObjectData[6252], 0},
{"SHAKE256", "shake256", NID_shake256, 9, &kObjectData[6261], 0},
{"SecP256r1Kyber768Draft00", "SecP256r1Kyber768Draft00",
NID_SecP256r1Kyber768Draft00, 0, NULL, 0},
NID_SecP256r1Kyber768Draft00, 5, &kObjectData[6270], 0},
{"X25519Kyber768Draft00", "X25519Kyber768Draft00",
NID_X25519Kyber768Draft00, 0, NULL, 0},
NID_X25519Kyber768Draft00, 5, &kObjectData[6275], 0},
{"ffdhe3072", "ffdhe3072", NID_ffdhe3072, 0, NULL, 0},
{"ffdhe8192", "ffdhe8192", NID_ffdhe8192, 0, NULL, 0},
{"MLKEM512IPD", "MLKEM512IPD", NID_MLKEM512IPD, 0, NULL, 0},
Expand Down Expand Up @@ -10854,8 +10866,8 @@ static const uint16_t kNIDsInLongNameOrder[] = {
static const uint16_t kNIDsInOIDOrder[] = {
434 /* 0.9 (OBJ_data) */,
182 /* 1.2 (OBJ_member_body) */,
676 /* 1.3 (OBJ_identified_organization) */,
379 /* 1.3 (OBJ_org) */,
676 /* 1.3 (OBJ_identified_organization) */,
11 /* 2.5 (OBJ_X500) */,
647 /* 2.23 (OBJ_international_organizations) */,
380 /* 1.3.6 (OBJ_dod) */,
Expand Down Expand Up @@ -11137,6 +11149,8 @@ static const uint16_t kNIDsInOIDOrder[] = {
732 /* 1.3.132.0.37 (OBJ_sect409r1) */,
733 /* 1.3.132.0.38 (OBJ_sect571k1) */,
734 /* 1.3.132.0.39 (OBJ_sect571r1) */,
982 /* 1.3.9999.99.51 (OBJ_X25519Kyber768Draft00) */,
981 /* 1.3.9999.99.52 (OBJ_SecP256r1Kyber768Draft00) */,
624 /* 2.23.42.3.0.0 (OBJ_set_rootKeyThumb) */,
625 /* 2.23.42.3.0.1 (OBJ_set_addPolicy) */,
626 /* 2.23.42.3.2.1 (OBJ_setAttr_Token_EMV) */,
Expand Down
6 changes: 3 additions & 3 deletions crypto/obj/objects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ secg-ellipticCurve 39 : sect571r1
: ffdhe4096
: ffdhe8192

# PQ Groups
: SecP256r1Kyber768Draft00
: X25519Kyber768Draft00
# PQ Group OIDs from OQS
1 3 9999 99 51 : X25519Kyber768Draft00
1 3 9999 99 52 : SecP256r1Kyber768Draft00

# WAP/TLS curve OIDs (http://www.wapforum.org/)
!Alias wap-wsg-idm-ecid wap-wsg 4
Expand Down
2 changes: 2 additions & 0 deletions include/openssl/nid.h
Original file line number Diff line number Diff line change
Expand Up @@ -4321,9 +4321,11 @@ extern "C" {

#define SN_SecP256r1Kyber768Draft00 "SecP256r1Kyber768Draft00"
#define NID_SecP256r1Kyber768Draft00 981
#define OBJ_SecP256r1Kyber768Draft00 1L, 3L, 9999L, 99L, 52L

#define SN_X25519Kyber768Draft00 "X25519Kyber768Draft00"
#define NID_X25519Kyber768Draft00 982
#define OBJ_X25519Kyber768Draft00 1L, 3L, 9999L, 99L, 51L

#define SN_ffdhe3072 "ffdhe3072"
#define NID_ffdhe3072 983
Expand Down

0 comments on commit 5230bd8

Please sign in to comment.