From 028bae7ddc67b6061d80c17b0be4e2f60d94731b Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Mon, 27 Feb 2023 21:09:08 +0000 Subject: [PATCH] Define a NID for P-384 + Kyber768. We do not expect to support this combination, but other consumers of BoringSSL may choose to. Change-Id: Ifdafa6a0032af078343bb9ecd80eea89eee582be Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/57705 Auto-Submit: Adam Langley Reviewed-by: David Benjamin Commit-Queue: David Benjamin --- crypto/obj/obj_dat.h | 5 ++++- crypto/obj/obj_mac.num | 1 + crypto/obj/objects.txt | 1 + include/openssl/nid.h | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/crypto/obj/obj_dat.h b/crypto/obj/obj_dat.h index 17e384e655..d879233abf 100644 --- a/crypto/obj/obj_dat.h +++ b/crypto/obj/obj_dat.h @@ -57,7 +57,7 @@ /* This file is generated by crypto/obj/objects.go. */ -#define NUM_NID 966 +#define NUM_NID 967 static const uint8_t kObjectData[] = { /* NID_rsadsi */ @@ -8784,6 +8784,7 @@ static const ASN1_OBJECT kObjects[NUM_NID] = { {"HKDF", "hkdf", NID_hkdf, 0, NULL, 0}, {"X25519Kyber768", "X25519Kyber768", NID_X25519Kyber768, 0, NULL, 0}, {"P256Kyber768", "P256Kyber768", NID_P256Kyber768, 0, NULL, 0}, + {"P384Kyber768", "P384Kyber768", NID_P384Kyber768, 0, NULL, 0}, }; static const uint16_t kNIDsInShortNameOrder[] = { @@ -8918,6 +8919,7 @@ static const uint16_t kNIDsInShortNameOrder[] = { 749 /* Oakley-EC2N-3 */, 750 /* Oakley-EC2N-4 */, 965 /* P256Kyber768 */, + 966 /* P384Kyber768 */, 9 /* PBE-MD2-DES */, 168 /* PBE-MD2-RC2-64 */, 10 /* PBE-MD5-DES */, @@ -9833,6 +9835,7 @@ static const uint16_t kNIDsInLongNameOrder[] = { 371 /* OCSP Service Locator */, 180 /* OCSP Signing */, 965 /* P256Kyber768 */, + 966 /* P384Kyber768 */, 161 /* PBES2 */, 69 /* PBKDF2 */, 162 /* PBMAC1 */, diff --git a/crypto/obj/obj_mac.num b/crypto/obj/obj_mac.num index 03ef9582f4..c0473bca32 100644 --- a/crypto/obj/obj_mac.num +++ b/crypto/obj/obj_mac.num @@ -954,3 +954,4 @@ sha512_256 962 hkdf 963 X25519Kyber768 964 P256Kyber768 965 +P384Kyber768 966 diff --git a/crypto/obj/objects.txt b/crypto/obj/objects.txt index 814ca83e9b..11151f920c 100644 --- a/crypto/obj/objects.txt +++ b/crypto/obj/objects.txt @@ -1336,6 +1336,7 @@ secg-scheme 14 3 : dhSinglePass-cofactorDH-sha512kdf-scheme : CECPQ2 : X25519Kyber768 : P256Kyber768 + : P384Kyber768 # See RFC 8410. 1 3 101 110 : X25519 diff --git a/include/openssl/nid.h b/include/openssl/nid.h index 5f344dc73c..cf5691d71d 100644 --- a/include/openssl/nid.h +++ b/include/openssl/nid.h @@ -4261,6 +4261,9 @@ extern "C" { #define SN_P256Kyber768 "P256Kyber768" #define NID_P256Kyber768 965 +#define SN_P384Kyber768 "P384Kyber768" +#define NID_P384Kyber768 966 + #if defined(__cplusplus) } /* extern C */