Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PQ key exchange OIDs #1730

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 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 @@ -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
Loading