From 3d1869af8a313acce578fc9d89e7835b5430d659 Mon Sep 17 00:00:00 2001 From: Douglas Stebila Date: Fri, 28 May 2021 15:55:22 -0400 Subject: [PATCH 1/9] Support extra NIDs for KEMs --- oqs-template/generate-oid-nid-table.py | 50 ++++++---- oqs-template/generate.yml | 18 ++++ oqs-template/oqs-kem-info.md | 132 ++++++++++++++++--------- 3 files changed, 138 insertions(+), 62 deletions(-) diff --git a/oqs-template/generate-oid-nid-table.py b/oqs-template/generate-oid-nid-table.py index b1c644464ffb8..c07d8d78c06d6 100644 --- a/oqs-template/generate-oid-nid-table.py +++ b/oqs-template/generate-oid-nid-table.py @@ -24,6 +24,7 @@ for fil in files: with open(os.path.join(root, fil), mode='r', encoding='utf-8') as f: alg_pretty_name = next(f).rstrip() + if alg_pretty_name.startswith("# "): alg_pretty_name = alg_pretty_name[1:].lstrip() for line in f: if line.startswith("- **Version**:"): sig_to_impl_version[alg_pretty_name] = line.split(":")[1].rstrip() @@ -70,14 +71,16 @@ for fil in files: with open(os.path.join(root, fil), mode='r', encoding='utf-8') as f: alg_pretty_name = next(f).rstrip() + if alg_pretty_name.startswith("# "): alg_pretty_name = alg_pretty_name[1:].lstrip() for line in f: if line.startswith("- **Version**:"): kem_to_impl_version[alg_pretty_name] = line.split(":")[1].rstrip() break kem_to_impl_version['SIDH'] = kem_to_impl_version['SIKE'] -table = [['Family', 'Implementation Version', 'Variant', 'Claimed NIST Level', - 'PQ-only Code Point', 'Hybrid Elliptic Curve', 'Hybrid Code Point']] +table_header = ['Family', 'Implementation Version', 'Variant', 'Claimed NIST Level', + 'Code Point', 'Hybrid Elliptic Curve (if any)'] +table = [] hybrid_elliptic_curve = '' for kem in sorted(config['kems'], key=lambda k: k['family']): if kem['bit_security'] == 128: @@ -92,22 +95,35 @@ else: sys.exit("kem['bit_security'] value malformed.") - if kem['name_group'] == 'kyber512': - table.append([kem['family'], kem_to_impl_version[kem['family']], - kem['name_group'], claimed_nist_level, kem['nid'], - 'x25519', '0x2F26']) - elif kem['name_group'] == 'sikep434': - table.append([kem['family'], kem_to_impl_version[kem['family']], - kem['name_group'], claimed_nist_level, kem['nid'], - 'x25519', '0x2F27']) - elif kem['name_group'] == 'bike1l1fo': - table.append([kem['family'], kem_to_impl_version[kem['family']], - kem['name_group'], claimed_nist_level, kem['nid'], - 'x25519', '0x2F28']) - table.append([kem['family'], kem_to_impl_version[kem['family']], - kem['name_group'], claimed_nist_level, kem['nid'], - hybrid_elliptic_curve, kem['nid_hybrid']]) + kem['name_group'], claimed_nist_level, + kem['nid'], ""]) + table.append([kem['family'], kem_to_impl_version[kem['family']], + kem['name_group'], claimed_nist_level, + kem['nid_hybrid'], hybrid_elliptic_curve]) + + if 'extra_nids' in kem: + if 'current' in kem['extra_nids']: + for entry in kem['extra_nids']['current']: + table.append([kem['family'], kem_to_impl_version[kem['family']], + kem['name_group'], claimed_nist_level, + kem['nid'], ""]) + if 'previous' in kem['extra_nids']: + for entry in kem['extra_nids']['previous']: + if 'hybrid_group' in entry: + table.append([kem['family'], entry['implementation_version'], + kem['name_group'], claimed_nist_level, + entry['nid'], entry['hybrid_group']]) + else: + table.append([kem['family'], entry['implementation_version'], + kem['name_group'], claimed_nist_level, + entry['nid'], ""]) + +# sort by: family, version, security level, variant, hybrid +table.sort(key = lambda row: "{:s}|{:s}|{:d}|{:s}|{:s}".format(row[0], row[1], row[3], row[2], row[5])) + +table = [table_header] + table with open('oqs-kem-info.md', mode='w', encoding='utf-8') as f: f.write(tabulate(table, tablefmt="pipe", headers="firstrow")) + f.write("\n") diff --git a/oqs-template/generate.yml b/oqs-template/generate.yml index 50f3aef0238b7..8cfb83ff86a28 100644 --- a/oqs-template/generate.yml +++ b/oqs-template/generate.yml @@ -64,6 +64,16 @@ kems: nid_hybrid: '0x2F0F' oqs_alg: 'OQS_KEM_alg_kyber_512' bit_security: 128 + extra_nids: + current: + - hybrid_group: "x25519" + nid: '0x2F26' + previous: + - implementation_version: NIST Round 2 submission + nid: '0x020F' + - implementation_version: NIST Round 2 submission + hybrid_group: secp256_r1 + nid: '0x2F0F' - family: 'CRYSTALS-Kyber' name_group: 'kyber768' @@ -162,6 +172,10 @@ kems: nid_hybrid: '0x2F1F' oqs_alg: 'OQS_KEM_alg_sike_p434' bit_security: 128 + extra_nids: + current: + - hybrid_group: "x25519" + nid: '0x2F27' - family: 'SIKE' name_group: 'sikep503' @@ -190,6 +204,10 @@ kems: nid_hybrid: '0x2F23' oqs_alg: 'OQS_KEM_alg_bike1_l1_fo' bit_security: 128 + extra_nids: + current: + - hybrid_group: "x25519" + nid: '0x2F28' - family: 'BIKE' name_group: 'bike1l3fo' diff --git a/oqs-template/oqs-kem-info.md b/oqs-template/oqs-kem-info.md index 6d834afd4bce0..30db35b0d4ffb 100644 --- a/oqs-template/oqs-kem-info.md +++ b/oqs-template/oqs-kem-info.md @@ -1,45 +1,87 @@ -| Family | Implementation Version | Variant | Claimed NIST Level | PQ-only Code Point | Hybrid Elliptic Curve | Hybrid Code Point | -|:---------------|:-------------------------|:----------------|---------------------:|:---------------------|:------------------------|:--------------------| -| BIKE | 3.2 | bike1l1cpa | 1 | 0x0206 | secp256_r1 | 0x2F06 | -| BIKE | 3.2 | bike1l3cpa | 3 | 0x0207 | secp384_r1 | 0x2F07 | -| BIKE | 3.2 | bike1l1fo | 1 | 0x0223 | x25519 | 0x2F28 | -| BIKE | 3.2 | bike1l1fo | 1 | 0x0223 | secp256_r1 | 0x2F23 | -| BIKE | 3.2 | bike1l3fo | 3 | 0x0224 | secp384_r1 | 0x2F24 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x020F | x25519 | 0x2F26 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x020F | secp256_r1 | 0x2F0F | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 0x0210 | secp384_r1 | 0x2F10 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber1024 | 5 | 0x0211 | secp521_r1 | 0x2F11 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 1 | 0x0229 | secp256_r1 | 0x2F29 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s768 | 3 | 0x022A | secp384_r1 | 0x2F2A | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s1024 | 5 | 0x022B | secp521_r1 | 0x2F2B | -| FrodoKEM | NIST Round 3 submission | frodo640aes | 1 | 0x0200 | secp256_r1 | 0x2F00 | -| FrodoKEM | NIST Round 3 submission | frodo640shake | 1 | 0x0201 | secp256_r1 | 0x2F01 | -| FrodoKEM | NIST Round 3 submission | frodo976aes | 3 | 0x0202 | secp384_r1 | 0x2F02 | -| FrodoKEM | NIST Round 3 submission | frodo976shake | 3 | 0x0203 | secp384_r1 | 0x2F03 | -| FrodoKEM | NIST Round 3 submission | frodo1344aes | 5 | 0x0204 | secp521_r1 | 0x2F04 | -| FrodoKEM | NIST Round 3 submission | frodo1344shake | 5 | 0x0205 | secp521_r1 | 0x2F05 | -| HQC | 2020/10/01 | hqc128 | 1 | 0x022C | secp256_r1 | 0x2F2C | -| HQC | 2020/10/01 | hqc192 | 3 | 0x022D | secp384_r1 | 0x2F2D | -| HQC | 2020/10/01 | hqc256 | 5 | 0x022E | secp521_r1 | 0x2F2E | -| NTRU | NIST Round 3 submission | ntru_hps2048509 | 1 | 0x0214 | secp256_r1 | 0x2F14 | -| NTRU | NIST Round 3 submission | ntru_hps2048677 | 3 | 0x0215 | secp384_r1 | 0x2F15 | -| NTRU | NIST Round 3 submission | ntru_hps4096821 | 5 | 0x0216 | secp521_r1 | 0x2F16 | -| NTRU | NIST Round 3 submission | ntru_hrss701 | 3 | 0x0217 | secp384_r1 | 0x2F17 | -| NTRU-Prime | supercop-20200826 | ntrulpr653 | 1 | 0x022F | secp256_r1 | 0x2F2F | -| NTRU-Prime | supercop-20200826 | ntrulpr761 | 3 | 0x0230 | secp384_r1 | 0x2F30 | -| NTRU-Prime | supercop-20200826 | ntrulpr857 | 3 | 0x0231 | secp384_r1 | 0x2F31 | -| NTRU-Prime | supercop-20200826 | sntrup653 | 1 | 0x0232 | secp256_r1 | 0x2F32 | -| NTRU-Prime | supercop-20200826 | sntrup761 | 3 | 0x0233 | secp384_r1 | 0x2F33 | -| NTRU-Prime | supercop-20200826 | sntrup857 | 3 | 0x0234 | secp384_r1 | 0x2F34 | -| SABER | NIST Round 3 submission | lightsaber | 1 | 0x0218 | secp256_r1 | 0x2F18 | -| SABER | NIST Round 3 submission | saber | 3 | 0x0219 | secp384_r1 | 0x2F19 | -| SABER | NIST Round 3 submission | firesaber | 5 | 0x021A | secp521_r1 | 0x2F1A | -| SIDH | 3.3 | sidhp434 | 1 | 0x021B | secp256_r1 | 0x2F1B | -| SIDH | 3.3 | sidhp503 | 1 | 0x021C | secp256_r1 | 0x2F1C | -| SIDH | 3.3 | sidhp610 | 3 | 0x021D | secp384_r1 | 0x2F1D | -| SIDH | 3.3 | sidhp751 | 5 | 0x021E | secp521_r1 | 0x2F1E | -| SIKE | 3.3 | sikep434 | 1 | 0x021F | x25519 | 0x2F27 | -| SIKE | 3.3 | sikep434 | 1 | 0x021F | secp256_r1 | 0x2F1F | -| SIKE | 3.3 | sikep503 | 1 | 0x0220 | secp256_r1 | 0x2F20 | -| SIKE | 3.3 | sikep610 | 3 | 0x0221 | secp384_r1 | 0x2F21 | -| SIKE | 3.3 | sikep751 | 5 | 0x0222 | secp521_r1 | 0x2F22 | \ No newline at end of file +| Family | Implementation Version | Variant | Claimed NIST Level | Code Point | Hybrid Elliptic Curve (if any) | +|:---------------|:-------------------------|:----------------|---------------------:|:-------------|:---------------------------------| +| BIKE | 3.2 | bike1l1cpa | 1 | 0x0206 | | +| BIKE | 3.2 | bike1l1cpa | 1 | 0x2F06 | secp256_r1 | +| BIKE | 3.2 | bike1l1fo | 1 | 0x0223 | | +| BIKE | 3.2 | bike1l1fo | 1 | 0x0223 | | +| BIKE | 3.2 | bike1l1fo | 1 | 0x2F23 | secp256_r1 | +| BIKE | 3.2 | bike1l3cpa | 3 | 0x0207 | | +| BIKE | 3.2 | bike1l3cpa | 3 | 0x2F07 | secp384_r1 | +| BIKE | 3.2 | bike1l3fo | 3 | 0x0224 | | +| BIKE | 3.2 | bike1l3fo | 3 | 0x2F24 | secp384_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x020F | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x020F | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x2F0F | secp256_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 1 | 0x0229 | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 1 | 0x2F29 | secp256_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 0x0210 | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 0x2F10 | secp384_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s768 | 3 | 0x022A | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s768 | 3 | 0x2F2A | secp384_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber1024 | 5 | 0x0211 | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber1024 | 5 | 0x2F11 | secp521_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s1024 | 5 | 0x022B | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s1024 | 5 | 0x2F2B | secp521_r1 | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber512 | 1 | 0x020F | | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber512 | 1 | 0x2F0F | secp256_r1 | +| FrodoKEM | NIST Round 3 submission | frodo640aes | 1 | 0x0200 | | +| FrodoKEM | NIST Round 3 submission | frodo640aes | 1 | 0x2F00 | secp256_r1 | +| FrodoKEM | NIST Round 3 submission | frodo640shake | 1 | 0x0201 | | +| FrodoKEM | NIST Round 3 submission | frodo640shake | 1 | 0x2F01 | secp256_r1 | +| FrodoKEM | NIST Round 3 submission | frodo976aes | 3 | 0x0202 | | +| FrodoKEM | NIST Round 3 submission | frodo976aes | 3 | 0x2F02 | secp384_r1 | +| FrodoKEM | NIST Round 3 submission | frodo976shake | 3 | 0x0203 | | +| FrodoKEM | NIST Round 3 submission | frodo976shake | 3 | 0x2F03 | secp384_r1 | +| FrodoKEM | NIST Round 3 submission | frodo1344aes | 5 | 0x0204 | | +| FrodoKEM | NIST Round 3 submission | frodo1344aes | 5 | 0x2F04 | secp521_r1 | +| FrodoKEM | NIST Round 3 submission | frodo1344shake | 5 | 0x0205 | | +| FrodoKEM | NIST Round 3 submission | frodo1344shake | 5 | 0x2F05 | secp521_r1 | +| HQC | 2020/10/01 | hqc128 | 1 | 0x022C | | +| HQC | 2020/10/01 | hqc128 | 1 | 0x2F2C | secp256_r1 | +| HQC | 2020/10/01 | hqc192 | 3 | 0x022D | | +| HQC | 2020/10/01 | hqc192 | 3 | 0x2F2D | secp384_r1 | +| HQC | 2020/10/01 | hqc256 | 5 | 0x022E | | +| HQC | 2020/10/01 | hqc256 | 5 | 0x2F2E | secp521_r1 | +| NTRU-Prime | supercop-20200826 | ntrulpr653 | 1 | 0x022F | | +| NTRU-Prime | supercop-20200826 | ntrulpr653 | 1 | 0x2F2F | secp256_r1 | +| NTRU-Prime | supercop-20200826 | sntrup653 | 1 | 0x0232 | | +| NTRU-Prime | supercop-20200826 | sntrup653 | 1 | 0x2F32 | secp256_r1 | +| NTRU-Prime | supercop-20200826 | ntrulpr761 | 3 | 0x0230 | | +| NTRU-Prime | supercop-20200826 | ntrulpr761 | 3 | 0x2F30 | secp384_r1 | +| NTRU-Prime | supercop-20200826 | ntrulpr857 | 3 | 0x0231 | | +| NTRU-Prime | supercop-20200826 | ntrulpr857 | 3 | 0x2F31 | secp384_r1 | +| NTRU-Prime | supercop-20200826 | sntrup761 | 3 | 0x0233 | | +| NTRU-Prime | supercop-20200826 | sntrup761 | 3 | 0x2F33 | secp384_r1 | +| NTRU-Prime | supercop-20200826 | sntrup857 | 3 | 0x0234 | | +| NTRU-Prime | supercop-20200826 | sntrup857 | 3 | 0x2F34 | secp384_r1 | +| NTRU | NIST Round 3 submission | ntru_hps2048509 | 1 | 0x0214 | | +| NTRU | NIST Round 3 submission | ntru_hps2048509 | 1 | 0x2F14 | secp256_r1 | +| NTRU | NIST Round 3 submission | ntru_hps2048677 | 3 | 0x0215 | | +| NTRU | NIST Round 3 submission | ntru_hps2048677 | 3 | 0x2F15 | secp384_r1 | +| NTRU | NIST Round 3 submission | ntru_hrss701 | 3 | 0x0217 | | +| NTRU | NIST Round 3 submission | ntru_hrss701 | 3 | 0x2F17 | secp384_r1 | +| NTRU | NIST Round 3 submission | ntru_hps4096821 | 5 | 0x0216 | | +| NTRU | NIST Round 3 submission | ntru_hps4096821 | 5 | 0x2F16 | secp521_r1 | +| SABER | NIST Round 3 submission | lightsaber | 1 | 0x0218 | | +| SABER | NIST Round 3 submission | lightsaber | 1 | 0x2F18 | secp256_r1 | +| SABER | NIST Round 3 submission | saber | 3 | 0x0219 | | +| SABER | NIST Round 3 submission | saber | 3 | 0x2F19 | secp384_r1 | +| SABER | NIST Round 3 submission | firesaber | 5 | 0x021A | | +| SABER | NIST Round 3 submission | firesaber | 5 | 0x2F1A | secp521_r1 | +| SIDH | 3.3 | sidhp434 | 1 | 0x021B | | +| SIDH | 3.3 | sidhp434 | 1 | 0x2F1B | secp256_r1 | +| SIDH | 3.3 | sidhp503 | 1 | 0x021C | | +| SIDH | 3.3 | sidhp503 | 1 | 0x2F1C | secp256_r1 | +| SIDH | 3.3 | sidhp610 | 3 | 0x021D | | +| SIDH | 3.3 | sidhp610 | 3 | 0x2F1D | secp384_r1 | +| SIDH | 3.3 | sidhp751 | 5 | 0x021E | | +| SIDH | 3.3 | sidhp751 | 5 | 0x2F1E | secp521_r1 | +| SIKE | 3.3 | sikep434 | 1 | 0x021F | | +| SIKE | 3.3 | sikep434 | 1 | 0x021F | | +| SIKE | 3.3 | sikep434 | 1 | 0x2F1F | secp256_r1 | +| SIKE | 3.3 | sikep503 | 1 | 0x0220 | | +| SIKE | 3.3 | sikep503 | 1 | 0x2F20 | secp256_r1 | +| SIKE | 3.3 | sikep610 | 3 | 0x0221 | | +| SIKE | 3.3 | sikep610 | 3 | 0x2F21 | secp384_r1 | +| SIKE | 3.3 | sikep751 | 5 | 0x0222 | | +| SIKE | 3.3 | sikep751 | 5 | 0x2F22 | secp521_r1 | From 2d3fc605881dac73649061823befc7a2d693cbab Mon Sep 17 00:00:00 2001 From: Douglas Stebila Date: Mon, 31 May 2021 11:44:44 -0400 Subject: [PATCH 2/9] previous -> old [skip ci] --- oqs-template/generate-oid-nid-table.py | 4 ++-- oqs-template/generate.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/oqs-template/generate-oid-nid-table.py b/oqs-template/generate-oid-nid-table.py index c07d8d78c06d6..e69dca9f604cf 100644 --- a/oqs-template/generate-oid-nid-table.py +++ b/oqs-template/generate-oid-nid-table.py @@ -108,8 +108,8 @@ table.append([kem['family'], kem_to_impl_version[kem['family']], kem['name_group'], claimed_nist_level, kem['nid'], ""]) - if 'previous' in kem['extra_nids']: - for entry in kem['extra_nids']['previous']: + if 'old' in kem['extra_nids']: + for entry in kem['extra_nids']['old']: if 'hybrid_group' in entry: table.append([kem['family'], entry['implementation_version'], kem['name_group'], claimed_nist_level, diff --git a/oqs-template/generate.yml b/oqs-template/generate.yml index 8cfb83ff86a28..4bad935277596 100644 --- a/oqs-template/generate.yml +++ b/oqs-template/generate.yml @@ -68,7 +68,7 @@ kems: current: - hybrid_group: "x25519" nid: '0x2F26' - previous: + old: - implementation_version: NIST Round 2 submission nid: '0x020F' - implementation_version: NIST Round 2 submission From c1517c48005d9cfd70d9318f1e5891e498352b00 Mon Sep 17 00:00:00 2001 From: Douglas Stebila Date: Mon, 7 Jun 2021 14:07:47 -0400 Subject: [PATCH 3/9] Add NIDs from @alexw91 [skip ci] --- oqs-template/generate.yml | 14 +++++++++++-- oqs-template/oqs-kem-info.md | 39 +++++++++++++++++++----------------- 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/oqs-template/generate.yml b/oqs-template/generate.yml index 4bad935277596..66722395bb0c2 100644 --- a/oqs-template/generate.yml +++ b/oqs-template/generate.yml @@ -61,19 +61,22 @@ kems: family: 'CRYSTALS-Kyber' name_group: 'kyber512' nid: '0x020F' - nid_hybrid: '0x2F0F' + nid_hybrid: '0x2F3A' oqs_alg: 'OQS_KEM_alg_kyber_512' bit_security: 128 extra_nids: current: - hybrid_group: "x25519" - nid: '0x2F26' + nid: '0x2F39' old: - implementation_version: NIST Round 2 submission nid: '0x020F' - implementation_version: NIST Round 2 submission hybrid_group: secp256_r1 nid: '0x2F0F' + - implementation_version: NIST Round 2 submission + hybrid_group: x25519 + nid: '0x2F26' - family: 'CRYSTALS-Kyber' name_group: 'kyber768' @@ -208,6 +211,13 @@ kems: current: - hybrid_group: "x25519" nid: '0x2F28' + old: + - implementation_version: NIST Round 3 submission + hybrid_group: secp256_r1 + nid: '0x2F38' + - implementation_version: NIST Round 3 submission + hybrid_group: x25519 + nid: '0x2F37' - family: 'BIKE' name_group: 'bike1l3fo' diff --git a/oqs-template/oqs-kem-info.md b/oqs-template/oqs-kem-info.md index 30db35b0d4ffb..8ae2265343ef0 100644 --- a/oqs-template/oqs-kem-info.md +++ b/oqs-template/oqs-kem-info.md @@ -9,9 +9,11 @@ | BIKE | 3.2 | bike1l3cpa | 3 | 0x2F07 | secp384_r1 | | BIKE | 3.2 | bike1l3fo | 3 | 0x0224 | | | BIKE | 3.2 | bike1l3fo | 3 | 0x2F24 | secp384_r1 | +| BIKE | NIST Round 3 submission | bike1l1fo | 1 | 0x2F38 | secp256_r1 | +| BIKE | NIST Round 3 submission | bike1l1fo | 1 | 0x2F37 | x25519 | | CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x020F | | | CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x020F | | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x2F0F | secp256_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x2F3A | secp256_r1 | | CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 1 | 0x0229 | | | CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 1 | 0x2F29 | secp256_r1 | | CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 0x0210 | | @@ -24,6 +26,7 @@ | CRYSTALS-Kyber | NIST Round 3 submission | kyber90s1024 | 5 | 0x2F2B | secp521_r1 | | CRYSTALS-Kyber | NIST Round 2 submission | kyber512 | 1 | 0x020F | | | CRYSTALS-Kyber | NIST Round 2 submission | kyber512 | 1 | 0x2F0F | secp256_r1 | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber512 | 1 | 0x2F26 | x25519 | | FrodoKEM | NIST Round 3 submission | frodo640aes | 1 | 0x0200 | | | FrodoKEM | NIST Round 3 submission | frodo640aes | 1 | 0x2F00 | secp256_r1 | | FrodoKEM | NIST Round 3 submission | frodo640shake | 1 | 0x0201 | | @@ -68,20 +71,20 @@ | SABER | NIST Round 3 submission | saber | 3 | 0x2F19 | secp384_r1 | | SABER | NIST Round 3 submission | firesaber | 5 | 0x021A | | | SABER | NIST Round 3 submission | firesaber | 5 | 0x2F1A | secp521_r1 | -| SIDH | 3.3 | sidhp434 | 1 | 0x021B | | -| SIDH | 3.3 | sidhp434 | 1 | 0x2F1B | secp256_r1 | -| SIDH | 3.3 | sidhp503 | 1 | 0x021C | | -| SIDH | 3.3 | sidhp503 | 1 | 0x2F1C | secp256_r1 | -| SIDH | 3.3 | sidhp610 | 3 | 0x021D | | -| SIDH | 3.3 | sidhp610 | 3 | 0x2F1D | secp384_r1 | -| SIDH | 3.3 | sidhp751 | 5 | 0x021E | | -| SIDH | 3.3 | sidhp751 | 5 | 0x2F1E | secp521_r1 | -| SIKE | 3.3 | sikep434 | 1 | 0x021F | | -| SIKE | 3.3 | sikep434 | 1 | 0x021F | | -| SIKE | 3.3 | sikep434 | 1 | 0x2F1F | secp256_r1 | -| SIKE | 3.3 | sikep503 | 1 | 0x0220 | | -| SIKE | 3.3 | sikep503 | 1 | 0x2F20 | secp256_r1 | -| SIKE | 3.3 | sikep610 | 3 | 0x0221 | | -| SIKE | 3.3 | sikep610 | 3 | 0x2F21 | secp384_r1 | -| SIKE | 3.3 | sikep751 | 5 | 0x0222 | | -| SIKE | 3.3 | sikep751 | 5 | 0x2F22 | secp521_r1 | +| SIDH | 3.4 | sidhp434 | 1 | 0x021B | | +| SIDH | 3.4 | sidhp434 | 1 | 0x2F1B | secp256_r1 | +| SIDH | 3.4 | sidhp503 | 1 | 0x021C | | +| SIDH | 3.4 | sidhp503 | 1 | 0x2F1C | secp256_r1 | +| SIDH | 3.4 | sidhp610 | 3 | 0x021D | | +| SIDH | 3.4 | sidhp610 | 3 | 0x2F1D | secp384_r1 | +| SIDH | 3.4 | sidhp751 | 5 | 0x021E | | +| SIDH | 3.4 | sidhp751 | 5 | 0x2F1E | secp521_r1 | +| SIKE | 3.4 | sikep434 | 1 | 0x021F | | +| SIKE | 3.4 | sikep434 | 1 | 0x021F | | +| SIKE | 3.4 | sikep434 | 1 | 0x2F1F | secp256_r1 | +| SIKE | 3.4 | sikep503 | 1 | 0x0220 | | +| SIKE | 3.4 | sikep503 | 1 | 0x2F20 | secp256_r1 | +| SIKE | 3.4 | sikep610 | 3 | 0x0221 | | +| SIKE | 3.4 | sikep610 | 3 | 0x2F21 | secp384_r1 | +| SIKE | 3.4 | sikep751 | 5 | 0x0222 | | +| SIKE | 3.4 | sikep751 | 5 | 0x2F22 | secp521_r1 | From 57e3634fe27481bfc7353843d598305e06401091 Mon Sep 17 00:00:00 2001 From: Michael <57787676+baentsch@users.noreply.github.com> Date: Wed, 16 Jun 2021 13:50:19 +0200 Subject: [PATCH 4/9] KAT checking added --- oqs-template/generate.py | 28 +++++++++++++++++ oqs-template/v040kemkats.json | 57 +++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 oqs-template/v040kemkats.json diff --git a/oqs-template/generate.py b/oqs-template/generate.py index 8732dd37e2304..456aa0b9af43f 100644 --- a/oqs-template/generate.py +++ b/oqs-template/generate.py @@ -8,6 +8,8 @@ import shutil import subprocess import yaml +import json +import sys # For list.append in Jinja templates Jinja2 = jinja2.Environment(loader=jinja2.FileSystemLoader(searchpath="."),extensions=['jinja2.ext.do']) @@ -58,6 +60,32 @@ def load_config(include_disabled_sigs=False): config = load_config() +if len(sys.argv)>2: + # short term approach: iterate KEMs looking for OQS alg names: Argument needs to be v040 KEM KATS list + # long term solution: Embed KEM KATs as arguments to generate.yml and compare against current liboqs KEM KATs + kems={} + v040kats=[] + kats=[] + for kem in config['kems']: + with open(os.path.join('oqs', 'include', 'oqs', 'kem.h')) as fh: + for line in fh: + if line.startswith("#define "+kem['oqs_alg'] + " "): + kem_name = line.split(' ')[2] + kem_name = kem_name[1:-2] + #print("SSL %s -> OQS: %s -> KAT name %s" % (kem['name_group'], kem['oqs_alg'], kem_name)) + kems[kem['name_group']] = kem_name + with open(sys.argv[1], 'r') as fp: + kats = json.load(fp) + # temporary solution until generate.yml contains all KATs: + with open(sys.argv[2], 'r') as fp: + v040kats = json.load(fp) + for k in kems.keys(): + try: + if v040kats[kems[k]] != kats[kems[k]]: + print("Different KATs for %s: Code point update needed" % k) + except KeyError as ke: + print("No KAT for KEM %s: New code point needed" % (k)) + # sigs populate('crypto/asn1/standard_methods.h', config, '/////') populate('crypto/ec/oqs_meth.c', config, '/////') diff --git a/oqs-template/v040kemkats.json b/oqs-template/v040kemkats.json new file mode 100644 index 0000000000000..95e19dde69544 --- /dev/null +++ b/oqs-template/v040kemkats.json @@ -0,0 +1,57 @@ +{ + "BIKE1-L1-CPA": "596d1fd7e592a69288214505a9b2f443b8a8f3b465dbc174aab5129869f9eb00", + "BIKE1-L1-FO": "ad3afc61446ad32b4e2d0dad0d789cb5649578cf1847c5eed3cc272718dcd33f", + "BIKE1-L3-CPA": "7d3572fc1085fca3e113635a07bbc6dde071e91154e8abb2266ad47a7023fe7a", + "BIKE1-L3-FO": "9c2719c8d948142d2983480bb26b1b4c294e4a75b9bf30fdd1ea8cc055b28844", + "BabyBear": "b8442ffaad8e74c6ebfd75d02e13f8db017a7a6dd8458f5d1a5011de6057d775", + "BabyBearEphem": "1caf1dc65c7b2923c936ed464574694a8983ed5508dadfc554fd98e1095652e9", + "Classic-McEliece-348864": "f0a166a9115a0c8481c85aee3fe901729a21a8a84a5d2b871fb99fc50223046b", + "Classic-McEliece-348864f": "f0a166a9115a0c8481c85aee3fe901729a21a8a84a5d2b871fb99fc50223046b", + "Classic-McEliece-460896": "b0822a5d00d7fad26380044c77b33370a5fb38e7851263229f590cac323a46a7", + "Classic-McEliece-460896f": "b0822a5d00d7fad26380044c77b33370a5fb38e7851263229f590cac323a46a7", + "Classic-McEliece-6688128": "2946eb61d1505967d2ba223ff64c9baadbefa18ec6849fcbc068c0348a39f6f8", + "Classic-McEliece-6688128f": "a8270440cacaa34509c9cf24bd5c79cc58db774adcd65b2f98d46dcf8749f632", + "Classic-McEliece-6960119": "653ada51f795f7c606a6316f6c6db50f18804fe4a07aa26c78dc8f4ae2f9bccd", + "Classic-McEliece-6960119f": "653ada51f795f7c606a6316f6c6db50f18804fe4a07aa26c78dc8f4ae2f9bccd", + "Classic-McEliece-8192128": "be85dab645c70e3a5eb91edcef125b2ae3838a8742e1fccf199149c4b814e357", + "Classic-McEliece-8192128f": "464f27c8eeef313c1bb024330fdc00125bbf0a28fccd9053e232a9cb0a1a0ac0", + "FireSaber-KEM": "937d9b2e139112e13d4093a6afe715deff476e4d578208b9e8e1809de43835cd", + "FrodoKEM-1344-AES": "2f4f1c352c1b343cce386c54234ca39fe29b48e45c66300f7311f5d3060d82b3", + "FrodoKEM-1344-SHAKE": "6e54e319cc590c3f136af81990a04cd0009ef78dec92825d2eb834adfec661dc", + "FrodoKEM-640-AES": "c1f006531583896c47416e10707d1c8e487fe549df304d7a9c43155d5e47b8b6", + "FrodoKEM-640-SHAKE": "df2b77b8e108c61d16c78a99e79f3351ab15840a690f25c1f87a8e89295e9219", + "FrodoKEM-976-AES": "7e415ab659d0d08d8f43135e1e9d75a8b342f52b65e8326ebf8135521b987615", + "FrodoKEM-976-SHAKE": "0d3d3a3ad11b69a93e72f1233b310884e97be8d16c9981bf1eb1321880cd0658", + "HQC-128-1-CCA2": "29b6545c85a9aaf75572f112b4d4cf9078c716147f84072c4efe4ce5160f18e0", + "HQC-192-1-CCA2": "ddff72bfd7bf33a9fa1b3c70a05378b0544e57207b5bb9205cacd6d69002d597", + "HQC-192-2-CCA2": "838916e26585828d15cabb7a0a0b9dabb63986e432735b7f6cf2ee0e823bcca3", + "HQC-256-1-CCA2": "339bd96be8b2d6bfb12315550b16827c612b41ab7aa4585ded55d2bf87410968", + "HQC-256-2-CCA2": "df224b5438e4958b636d0d5353c869c65c9b881cc8e8fc940295013b191e213c", + "HQC-256-3-CCA2": "e0bb4e73a1a27f05ddb1138685922bf4a40c2e535b5152b93135c06a73777770", + "Kyber1024": "b4b4fc1c2cbbb182252d2822ccb8cb704bcfe876122635c5dfa48ddc09b6e73f", + "Kyber1024-90s": "d3064040a33c15b65eb55dfd1bb116d092dab2cf5d693f8ab02b91ed105d66e3", + "Kyber512": "bdd9b46001de4595a4f185aec8d5d04d217705e65e10711c99fa3f0ac3d61c21", + "Kyber512-90s": "d081dafce242de5d2a9b1cfe2b304cf5ebaed71b7a91f028fefd569693307d45", + "Kyber768": "d6dbb9399d1ba4ee2d986de3e54a461256b91d6c2f9b90ad2410cf41e09b64d1", + "Kyber768-90s": "57fa080a0b2295044b128f1e4f7d978a7863ec6c99ebd6239fba747525a3d451", + "LightSaber-KEM": "dc2233ae221cfabbb1db5ab1a76c93967d37de9f87a8092561f95ab28eff6061", + "MamaBear": "2161de5015dc0477106b71ba17498982f77fae127fce724496c8a587803b1839", + "MamaBearEphem": "ef94f0f6471a1276efd9e019195489661c2356027fc2e8163e3718a1df027123", + "NTRU-HPS-2048-509": "7ecb93dbc7a588878691f2b2d656ebc42192779f335e3a96197f4ce2134f72c6", + "NTRU-HPS-2048-677": "715a5caf1ee22bb4b75ff6b10f911fec77e0d63378ea359c0773ee0a4c6cbb97", + "NTRU-HPS-4096-821": "0c5b6b159fab6eb677da469ec35aaa7e6b16162b315dcdb55a3b5da857e10519", + "NTRU-HRSS-701": "501e000c3eb374ffbfb81b0f16673a6282116465936608d7d164b05635e769e8", + "NewHope-1024-CCA": "4a21f329bb5402a90d343af01ec1c8bc8ffffa8098cb0b89e1d2129f5157a073", + "NewHope-512-CCA": "4290da64305e70e65766be5d4e488dee2b4b238172876ceefc931934b6964a7d", + "PapaBear": "60212e4433ee326c375b00996e1f524b37a8a12fba16aa51c420315a20dbd708", + "PapaBearEphem": "afe40a1172ab5f4f87135297e0a7c67047d21c87f33ab518864c030820c3674d", + "SIKE-p434": "6f467a94ec7edebe2722963dbe63edf4c0d7585075c1a490b31efc9297cb5008", + "SIKE-p434-compressed": "bf33586683dffbf29e270a7c6fc0d5df8800ee19a2594c81e52a447cc421ea04", + "SIKE-p503": "1d3cf07bdc02d7bf25d39d24e9da82630180987aa736e7e1c01ce07c2793d51a", + "SIKE-p503-compressed": "e37125bdc3dc2732559ba482dba09eac2cb9fbaaaea9d79cc379ec68f06473b5", + "SIKE-p610": "531e0c552de4eb1b6ec2532d33d631157f96315725701c81bf21b819321126b6", + "SIKE-p610-compressed": "a5e3641f481270e36277fd1b0d0a8b30e2ce1196aeffdf5f955a97bc1b09a547", + "SIKE-p751": "9cab6bd714fbc118861f78cf13c146b93b1e7f8bba4f0d3cf953f0349c41ca11", + "SIKE-p751-compressed": "15b506c6301f63d39c90d48f4090b3c369955d4d64b09cb91a714484a1a76e64", + "Saber-KEM": "c9e2c16f41f162c607a1d5704107159e5e12713b9bb8c356b1d68b216e79096e" +} \ No newline at end of file From 3441d5d3fac5d2763497a17e6862167cb49131b0 Mon Sep 17 00:00:00 2001 From: Douglas Stebila Date: Mon, 5 Jul 2021 21:33:27 -0400 Subject: [PATCH 5/9] Update NIDs based on landed s2n --- oqs-template/generate-oid-nid-table.py | 28 ++++++++++++++------------ oqs-template/generate.yml | 20 +++++++++++------- oqs-template/oqs-kem-info.md | 11 +++++----- oqs-template/oqs-sig-info.md | 28 +++++++++++++------------- 4 files changed, 48 insertions(+), 39 deletions(-) diff --git a/oqs-template/generate-oid-nid-table.py b/oqs-template/generate-oid-nid-table.py index e69dca9f604cf..ddbce376cffc8 100644 --- a/oqs-template/generate-oid-nid-table.py +++ b/oqs-template/generate-oid-nid-table.py @@ -94,31 +94,33 @@ hybrid_elliptic_curve = 'secp521_r1' else: sys.exit("kem['bit_security'] value malformed.") + + if 'implementation_version' in kem: + implementation_version = kem['implementation_version'] + else: + implementation_version = kem_to_impl_version[kem['family']] - table.append([kem['family'], kem_to_impl_version[kem['family']], + table.append([kem['family'], implementation_version, kem['name_group'], claimed_nist_level, kem['nid'], ""]) - table.append([kem['family'], kem_to_impl_version[kem['family']], + table.append([kem['family'], implementation_version, kem['name_group'], claimed_nist_level, kem['nid_hybrid'], hybrid_elliptic_curve]) if 'extra_nids' in kem: if 'current' in kem['extra_nids']: for entry in kem['extra_nids']['current']: - table.append([kem['family'], kem_to_impl_version[kem['family']], + table.append([kem['family'], implementation_version, kem['name_group'], claimed_nist_level, - kem['nid'], ""]) + entry['nid'], + entry['hybrid_group'] if 'hybrid_group' in entry else ""]) if 'old' in kem['extra_nids']: for entry in kem['extra_nids']['old']: - if 'hybrid_group' in entry: - table.append([kem['family'], entry['implementation_version'], - kem['name_group'], claimed_nist_level, - entry['nid'], entry['hybrid_group']]) - else: - table.append([kem['family'], entry['implementation_version'], - kem['name_group'], claimed_nist_level, - entry['nid'], ""]) - + table.append([kem['family'], entry['implementation_version'], + kem['name_group'], claimed_nist_level, + entry['nid'], + entry['hybrid_group'] if 'hybrid_group' in entry else ""]) + # sort by: family, version, security level, variant, hybrid table.sort(key = lambda row: "{:s}|{:s}|{:d}|{:s}|{:s}".format(row[0], row[1], row[3], row[2], row[5])) diff --git a/oqs-template/generate.yml b/oqs-template/generate.yml index 66722395bb0c2..553c7d4bc812f 100644 --- a/oqs-template/generate.yml +++ b/oqs-template/generate.yml @@ -211,13 +211,6 @@ kems: current: - hybrid_group: "x25519" nid: '0x2F28' - old: - - implementation_version: NIST Round 3 submission - hybrid_group: secp256_r1 - nid: '0x2F38' - - implementation_version: NIST Round 3 submission - hybrid_group: x25519 - nid: '0x2F37' - family: 'BIKE' name_group: 'bike1l3fo' @@ -225,6 +218,19 @@ kems: nid_hybrid: '0x2F24' oqs_alg: 'OQS_KEM_alg_bike1_l3_fo' bit_security: 192 + - + family: 'BIKE' + name_group: 'bikel1' + implementation_version: '4.1' + nid: '0x0238' + nid_hybrid: '0x2F38' + oqs_alg: 'OQS_KEM_alg_bike_l1o' + bit_security: 128 + extra_nids: + current: + - hybrid_group: "x25519" + nid: '0x2F37' + implementation_version: '4.1' - family: 'CRYSTALS-Kyber' name_group: 'kyber90s512' diff --git a/oqs-template/oqs-kem-info.md b/oqs-template/oqs-kem-info.md index 8ae2265343ef0..be9095acc7fb8 100644 --- a/oqs-template/oqs-kem-info.md +++ b/oqs-template/oqs-kem-info.md @@ -3,17 +3,18 @@ | BIKE | 3.2 | bike1l1cpa | 1 | 0x0206 | | | BIKE | 3.2 | bike1l1cpa | 1 | 0x2F06 | secp256_r1 | | BIKE | 3.2 | bike1l1fo | 1 | 0x0223 | | -| BIKE | 3.2 | bike1l1fo | 1 | 0x0223 | | | BIKE | 3.2 | bike1l1fo | 1 | 0x2F23 | secp256_r1 | +| BIKE | 3.2 | bike1l1fo | 1 | 0x2F28 | x25519 | | BIKE | 3.2 | bike1l3cpa | 3 | 0x0207 | | | BIKE | 3.2 | bike1l3cpa | 3 | 0x2F07 | secp384_r1 | | BIKE | 3.2 | bike1l3fo | 3 | 0x0224 | | | BIKE | 3.2 | bike1l3fo | 3 | 0x2F24 | secp384_r1 | -| BIKE | NIST Round 3 submission | bike1l1fo | 1 | 0x2F38 | secp256_r1 | -| BIKE | NIST Round 3 submission | bike1l1fo | 1 | 0x2F37 | x25519 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x020F | | +| BIKE | 4.1 | bikel1 | 1 | 0x0238 | | +| BIKE | 4.1 | bikel1 | 1 | 0x2F38 | secp256_r1 | +| BIKE | 4.1 | bikel1 | 1 | 0x2F37 | x25519 | | CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x020F | | | CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x2F3A | secp256_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x2F39 | x25519 | | CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 1 | 0x0229 | | | CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 1 | 0x2F29 | secp256_r1 | | CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 0x0210 | | @@ -80,8 +81,8 @@ | SIDH | 3.4 | sidhp751 | 5 | 0x021E | | | SIDH | 3.4 | sidhp751 | 5 | 0x2F1E | secp521_r1 | | SIKE | 3.4 | sikep434 | 1 | 0x021F | | -| SIKE | 3.4 | sikep434 | 1 | 0x021F | | | SIKE | 3.4 | sikep434 | 1 | 0x2F1F | secp256_r1 | +| SIKE | 3.4 | sikep434 | 1 | 0x2F27 | x25519 | | SIKE | 3.4 | sikep503 | 1 | 0x0220 | | | SIKE | 3.4 | sikep503 | 1 | 0x2F20 | secp256_r1 | | SIKE | 3.4 | sikep610 | 3 | 0x0221 | | diff --git a/oqs-template/oqs-sig-info.md b/oqs-template/oqs-sig-info.md index 7067858907537..5f756704a592a 100644 --- a/oqs-template/oqs-sig-info.md +++ b/oqs-template/oqs-sig-info.md @@ -1,19 +1,19 @@ | Algorithm | Implementation Version | Claimed NIST Level | Code Point | OID | |:--------------------------------------------------|:-------------------------|---------------------:|:-------------|:--------------------------| -| dilithium2 | NIST Round 3 submission | 1 | 0xfea0 | 1.3.6.1.4.1.2.267.7.4.4 | -| dilithium2 **hybrid with** p256 | NIST Round 3 submission | 1 | 0xfea1 | 1.3.9999.2.7.1 | -| dilithium2 **hybrid with** rsa3072 | NIST Round 3 submission | 1 | 0xfea2 | 1.3.9999.2.7.2 | -| dilithium3 | NIST Round 3 submission | 3 | 0xfea3 | 1.3.6.1.4.1.2.267.7.6.5 | -| dilithium3 **hybrid with** p384 | NIST Round 3 submission | 3 | 0xfea4 | 1.3.9999.2.7.3 | -| dilithium5 | NIST Round 3 submission | 5 | 0xfea5 | 1.3.6.1.4.1.2.267.7.8.7 | -| dilithium5 **hybrid with** p521 | NIST Round 3 submission | 5 | 0xfea6 | 1.3.9999.2.7.4 | -| dilithium2_aes | NIST Round 3 submission | 1 | 0xfea7 | 1.3.6.1.4.1.2.267.11.4.4 | -| dilithium2_aes **hybrid with** p256 | NIST Round 3 submission | 1 | 0xfea8 | 1.3.9999.2.11.1 | -| dilithium2_aes **hybrid with** rsa3072 | NIST Round 3 submission | 1 | 0xfea9 | 1.3.9999.2.11.2 | -| dilithium3_aes | NIST Round 3 submission | 3 | 0xfeaa | 1.3.6.1.4.1.2.267.11.6.5 | -| dilithium3_aes **hybrid with** p384 | NIST Round 3 submission | 3 | 0xfeab | 1.3.9999.2.11.3 | -| dilithium5_aes | NIST Round 3 submission | 5 | 0xfeac | 1.3.6.1.4.1.2.267.11.8.7 | -| dilithium5_aes **hybrid with** p521 | NIST Round 3 submission | 5 | 0xfead | 1.3.9999.2.11.4 | +| dilithium2 | 3.1 | 1 | 0xfea0 | 1.3.6.1.4.1.2.267.7.4.4 | +| dilithium2 **hybrid with** p256 | 3.1 | 1 | 0xfea1 | 1.3.9999.2.7.1 | +| dilithium2 **hybrid with** rsa3072 | 3.1 | 1 | 0xfea2 | 1.3.9999.2.7.2 | +| dilithium3 | 3.1 | 3 | 0xfea3 | 1.3.6.1.4.1.2.267.7.6.5 | +| dilithium3 **hybrid with** p384 | 3.1 | 3 | 0xfea4 | 1.3.9999.2.7.3 | +| dilithium5 | 3.1 | 5 | 0xfea5 | 1.3.6.1.4.1.2.267.7.8.7 | +| dilithium5 **hybrid with** p521 | 3.1 | 5 | 0xfea6 | 1.3.9999.2.7.4 | +| dilithium2_aes | 3.1 | 1 | 0xfea7 | 1.3.6.1.4.1.2.267.11.4.4 | +| dilithium2_aes **hybrid with** p256 | 3.1 | 1 | 0xfea8 | 1.3.9999.2.11.1 | +| dilithium2_aes **hybrid with** rsa3072 | 3.1 | 1 | 0xfea9 | 1.3.9999.2.11.2 | +| dilithium3_aes | 3.1 | 3 | 0xfeaa | 1.3.6.1.4.1.2.267.11.6.5 | +| dilithium3_aes **hybrid with** p384 | 3.1 | 3 | 0xfeab | 1.3.9999.2.11.3 | +| dilithium5_aes | 3.1 | 5 | 0xfeac | 1.3.6.1.4.1.2.267.11.8.7 | +| dilithium5_aes **hybrid with** p521 | 3.1 | 5 | 0xfead | 1.3.9999.2.11.4 | | falcon512 | 20201018 | 1 | 0xfe0b | 1.3.9999.3.1 | | falcon512 **hybrid with** p256 | 20201018 | 1 | 0xfe0c | 1.3.9999.3.2 | | falcon512 **hybrid with** rsa3072 | 20201018 | 1 | 0xfe0d | 1.3.9999.3.3 | From 48cac13f4212ae3288116aca908263340abdd064 Mon Sep 17 00:00:00 2001 From: Michael <57787676+baentsch@users.noreply.github.com> Date: Tue, 6 Jul 2021 09:18:54 +0200 Subject: [PATCH 6/9] removed BIKE R2; removed default; added s2n historical NIDs --- README.md | 5 +- apps/s_cb.c | 22 +- crypto/asn1/standard_methods.h | 3 - crypto/ec/oqs_meth.c | 50 +- crypto/evp/pmeth_lib.c | 3 - crypto/objects/obj_dat.h | 724 +++++++++--------- crypto/objects/obj_mac.num | 276 ++++--- crypto/objects/obj_xref.h | 6 - crypto/objects/obj_xref.txt | 3 - crypto/objects/objects.txt | 17 +- crypto/x509/x509type.c | 3 - fuzz/oids.txt | 3 - include/crypto/asn1.h | 3 - include/crypto/evp.h | 3 - include/openssl/evp.h | 11 +- include/openssl/obj_mac.h | 273 +++---- oqs-interop-test/README.md | 2 +- oqs-interop-test/common.py | 6 +- oqs-interop-test/test_basic.py | 14 +- .../ec/oqs_meth.c/assign_sig_alg.fragment | 2 - .../objects/obj_mac.num/assign_ids.fragment | 2 - .../objects/objects.txt/list_kems.fragment | 2 - oqs-template/generate-oid-nid-table.py | 16 +- oqs-template/generate.py | 9 + oqs-template/generate.yml | 90 ++- .../openssl/evp.h/define_evp_pkeys.fragment | 5 +- oqs-template/oqs-kem-info.md | 20 +- .../ssl/ssl_local.h/oqs_alg_name.fragment | 3 +- .../ssl_local.h/oqs_hybrid_kem_nid.fragment | 3 +- .../ssl/ssl_local.h/oqs_kem_curveid.fragment | 3 +- .../oqs_kem_hybrid_curveid.fragment | 3 +- .../ssl/ssl_local.h/oqs_kem_nid.fragment | 3 +- oqs-test/README.md | 2 +- oqs-test/common.py | 9 +- oqs-test/test_speed.py | 5 +- oqs-test/test_tls_basic.py | 10 +- ssl/ssl_cert_table.h | 3 - ssl/ssl_local.h | 233 +++--- ssl/t1_lib.c | 56 +- ssl/t1_trce.c | 17 +- 40 files changed, 854 insertions(+), 1069 deletions(-) diff --git a/README.md b/README.md index b6ba88f4637e3..3aa61870c898c 100644 --- a/README.md +++ b/README.md @@ -74,9 +74,8 @@ If an algorithm is provided by liboqs but is not listed below, it might still be The following quantum-safe algorithms from liboqs are supported (assuming they have been enabled in liboqs): -- `oqs_kem_default` (see [here](https://github.com/open-quantum-safe/openssl/wiki/Using-liboqs-algorithms-that-are-not-in-the-forks#oqsdefault) for what this denotes) -- **BIKE**: `bike1l1cpa`, `bike1l3cpa`, `bike1l1fo`, `bike1l3fo` +- **BIKE**: `bikel1`, `bikel3` - **CRYSTALS-Kyber**: `kyber512`, `kyber768`, `kyber1024`, `kyber90s512`, `kyber90s768`, `kyber90s1024` - **FrodoKEM**: `frodo640aes`, `frodo640shake`, `frodo976aes`, `frodo976shake`, `frodo1344aes`, `frodo1344shake` - **HQC**: `hqc128`, `hqc192`, `hqc256`† @@ -101,9 +100,7 @@ Note that algorithms marked with a dagger (†) have large stack usage and may c The following digital signature algorithms from liboqs are supported by the fork. **Note that not all variants of all algorithms are enabled by default; algorithms that are enabled by default are marked with an asterisk, and should you wish to enable additional variants, consult [the "Code Generation" section of the documentation in the wiki](https://github.com/open-quantum-safe/openssl/wiki/Using-liboqs-algorithms-not-in-the-fork#code-generation)**. -- `oqs_sig_default`* (see [here](https://github.com/open-quantum-safe/openssl/wiki/Using-liboqs-algorithms-that-are-not-in-the-forks#oqsdefault) for what this denotes) -- **CRYSTALS-Dilithium**:`dilithium2`\*, `dilithium3`\*, `dilithium5`\*, `dilithium2_aes`\*, `dilithium3_aes`\*, `dilithium5_aes`\* - **Falcon**:`falcon512`\*, `falcon1024`\* - **Picnic**:`picnicl1fs`, `picnicl1ur`, `picnicl1full`\*, `picnic3l1`\*, `picnic3l3`, `picnic3l5` - **Rainbow**:`rainbowIclassic`\*, `rainbowIcircumzenithal`, `rainbowIcompressed`, `rainbowIIIclassic`, `rainbowIIIcircumzenithal`, `rainbowIIIcompressed`, `rainbowVclassic`\*, `rainbowVcircumzenithal`, `rainbowVcompressed` diff --git a/apps/s_cb.c b/apps/s_cb.c index a5f0cc3990d55..ecfe1f43329d8 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -246,12 +246,6 @@ static const char *get_sigtype(int nid) return "gost2012_512"; ///// OQS_TEMPLATE_FRAGMENT_SIG_NAME_STR_START - case NID_oqs_sig_default: - return "OQS Default Signature Algorithm"; - case NID_p256_oqs_sig_default: - return "ECDSA p256 - OQS Default Signature Algorithm"; - case NID_rsa3072_oqs_sig_default: - return "RSA3072 - OQS Default Signature Algorithm"; case NID_dilithium2: return "Dilithium2"; case NID_p256_dilithium2: @@ -482,7 +476,6 @@ int ssl_print_groups(BIO *out, SSL *s, int noshared) /* OQS note: is there a better place to put this? we only need it here... */ static const char* OQS_CURVE_ID_NAME_STR(int id) { switch(id) { - case 0x01FF: return "oqs_kem_default"; ///// OQS_TEMPLATE_FRAGMENT_OQS_CURVE_ID_NAME_STR_START case 0x0200: return "frodo640aes"; case 0x0201: return "frodo640shake"; @@ -490,8 +483,6 @@ static const char* OQS_CURVE_ID_NAME_STR(int id) { case 0x0203: return "frodo976shake"; case 0x0204: return "frodo1344aes"; case 0x0205: return "frodo1344shake"; - case 0x0206: return "bike1l1cpa"; - case 0x0207: return "bike1l3cpa"; case 0x020F: return "kyber512"; case 0x0210: return "kyber768"; case 0x0211: return "kyber1024"; @@ -510,8 +501,8 @@ static const char* OQS_CURVE_ID_NAME_STR(int id) { case 0x0220: return "sikep503"; case 0x0221: return "sikep610"; case 0x0222: return "sikep751"; - case 0x0223: return "bike1l1fo"; - case 0x0224: return "bike1l3fo"; + case 0x0238: return "bikel1"; + case 0x023B: return "bikel3"; case 0x0229: return "kyber90s512"; case 0x022A: return "kyber90s768"; case 0x022B: return "kyber90s1024"; @@ -525,7 +516,6 @@ static const char* OQS_CURVE_ID_NAME_STR(int id) { case 0x0233: return "sntrup761"; case 0x0234: return "sntrup857"; ///// OQS_TEMPLATE_FRAGMENT_OQS_CURVE_ID_NAME_STR_END - case 0x2FFF: return "p256_oqs_kem_default hybrid"; ///// OQS_TEMPLATE_FRAGMENT_OQS_CURVE_ID_NAME_STR_HYBRID_START case 0x2F00: return "p256_frodo640aes hybrid"; case 0x2F01: return "p256_frodo640shake hybrid"; @@ -533,9 +523,7 @@ static const char* OQS_CURVE_ID_NAME_STR(int id) { case 0x2F03: return "p384_frodo976shake hybrid"; case 0x2F04: return "p521_frodo1344aes hybrid"; case 0x2F05: return "p521_frodo1344shake hybrid"; - case 0x2F06: return "p256_bike1l1cpa hybrid"; - case 0x2F07: return "p384_bike1l3cpa hybrid"; - case 0x2F0F: return "p256_kyber512 hybrid"; + case 0x2F3A: return "p256_kyber512 hybrid"; case 0x2F10: return "p384_kyber768 hybrid"; case 0x2F11: return "p521_kyber1024 hybrid"; case 0x2F14: return "p256_ntru_hps2048509 hybrid"; @@ -553,8 +541,8 @@ static const char* OQS_CURVE_ID_NAME_STR(int id) { case 0x2F20: return "p256_sikep503 hybrid"; case 0x2F21: return "p384_sikep610 hybrid"; case 0x2F22: return "p521_sikep751 hybrid"; - case 0x2F23: return "p256_bike1l1fo hybrid"; - case 0x2F24: return "p384_bike1l3fo hybrid"; + case 0x2F38: return "p256_bikel1 hybrid"; + case 0x2F3B: return "p384_bikel3 hybrid"; case 0x2F29: return "p256_kyber90s512 hybrid"; case 0x2F2A: return "p384_kyber90s768 hybrid"; case 0x2F2B: return "p521_kyber90s1024 hybrid"; diff --git a/crypto/asn1/standard_methods.h b/crypto/asn1/standard_methods.h index 9e29c85e36caa..8b6cd31896838 100644 --- a/crypto/asn1/standard_methods.h +++ b/crypto/asn1/standard_methods.h @@ -60,9 +60,6 @@ static const EVP_PKEY_ASN1_METHOD *standard_methods[] = { &sm2_asn1_meth, #endif ///// OQS_TEMPLATE_FRAGMENT_SIG_ASN1_METHS_START - &oqs_sig_default_asn1_meth, - &p256_oqs_sig_default_asn1_meth, - &rsa3072_oqs_sig_default_asn1_meth, &dilithium2_asn1_meth, &p256_dilithium2_asn1_meth, &rsa3072_dilithium2_asn1_meth, diff --git a/crypto/ec/oqs_meth.c b/crypto/ec/oqs_meth.c index deb3e947ee169..20ccfc1f5a864 100644 --- a/crypto/ec/oqs_meth.c +++ b/crypto/ec/oqs_meth.c @@ -76,9 +76,6 @@ typedef enum { int oqssl_sig_nids_list[] = { ///// OQS_TEMPLATE_FRAGMENT_LIST_KNOWN_NIDS_START - NID_oqs_sig_default, - NID_p256_oqs_sig_default, - NID_rsa3072_oqs_sig_default, NID_dilithium2, NID_p256_dilithium2, NID_rsa3072_dilithium2, @@ -129,8 +126,6 @@ int oqssl_kem_nids_list[] = { NID_frodo976shake, NID_frodo1344aes, NID_frodo1344shake, - NID_bike1l1cpa, - NID_bike1l3cpa, NID_kyber512, NID_kyber768, NID_kyber1024, @@ -149,8 +144,8 @@ int oqssl_kem_nids_list[] = { NID_sikep503, NID_sikep610, NID_sikep751, - NID_bike1l1fo, - NID_bike1l3fo, + NID_bikel1, + NID_bikel3, NID_kyber90s512, NID_kyber90s768, NID_kyber90s1024, @@ -193,10 +188,6 @@ char* get_oqs_alg_name(int openssl_nid) switch (openssl_nid) { ///// OQS_TEMPLATE_FRAGMENT_ASSIGN_SIG_ALG_START - case NID_oqs_sig_default: - case NID_p256_oqs_sig_default: - case NID_rsa3072_oqs_sig_default: - return OQS_SIG_alg_default; case NID_dilithium2: case NID_p256_dilithium2: case NID_rsa3072_dilithium2: @@ -251,8 +242,6 @@ char* get_oqs_alg_name(int openssl_nid) case NID_p256_sphincsshake256128frobust: case NID_rsa3072_sphincsshake256128frobust: return OQS_SIG_alg_sphincs_shake256_128f_robust; - case NID_oqs_kem_default: - return OQS_KEM_alg_default; case NID_frodo640aes: case NID_p256_frodo640aes: return OQS_KEM_alg_frodokem_640_aes; @@ -271,12 +260,6 @@ char* get_oqs_alg_name(int openssl_nid) case NID_frodo1344shake: case NID_p521_frodo1344shake: return OQS_KEM_alg_frodokem_1344_shake; - case NID_bike1l1cpa: - case NID_p256_bike1l1cpa: - return OQS_KEM_alg_bike1_l1_cpa; - case NID_bike1l3cpa: - case NID_p384_bike1l3cpa: - return OQS_KEM_alg_bike1_l3_cpa; case NID_kyber512: case NID_p256_kyber512: return OQS_KEM_alg_kyber_512; @@ -331,12 +314,12 @@ char* get_oqs_alg_name(int openssl_nid) case NID_sikep751: case NID_p521_sikep751: return OQS_KEM_alg_sike_p751; - case NID_bike1l1fo: - case NID_p256_bike1l1fo: - return OQS_KEM_alg_bike1_l1_fo; - case NID_bike1l3fo: - case NID_p384_bike1l3fo: - return OQS_KEM_alg_bike1_l3_fo; + case NID_bikel1: + case NID_p256_bikel1: + return OQS_KEM_alg_bike_l1; + case NID_bikel3: + case NID_p384_bikel3: + return OQS_KEM_alg_bike_l3; case NID_kyber90s512: case NID_p256_kyber90s512: return OQS_KEM_alg_kyber_512_90s; @@ -384,8 +367,6 @@ static int is_oqs_hybrid_alg(int openssl_nid) switch (openssl_nid) { ///// OQS_TEMPLATE_FRAGMENT_LIST_HYBRID_NIDS_START - case NID_p256_oqs_sig_default: - case NID_rsa3072_oqs_sig_default: case NID_p256_dilithium2: case NID_rsa3072_dilithium2: case NID_p384_dilithium3: @@ -423,7 +404,6 @@ static int get_classical_nid(int hybrid_id) switch (hybrid_id) { ///// OQS_TEMPLATE_FRAGMENT_ASSIGN_CLASSICAL_NIDS_START - case NID_rsa3072_oqs_sig_default: case NID_rsa3072_dilithium2: case NID_rsa3072_dilithium2_aes: case NID_rsa3072_falcon512: @@ -434,7 +414,6 @@ static int get_classical_nid(int hybrid_id) case NID_rsa3072_sphincssha256128frobust: case NID_rsa3072_sphincsshake256128frobust: return NID_rsaEncryption; - case NID_p256_oqs_sig_default: case NID_p256_dilithium2: case NID_p256_dilithium2_aes: case NID_p256_falcon512: @@ -463,9 +442,6 @@ static int get_oqs_nid(int hybrid_id) switch (hybrid_id) { ///// OQS_TEMPLATE_FRAGMENT_ASSIGN_OQS_NID_START - case NID_p256_oqs_sig_default: - case NID_rsa3072_oqs_sig_default: - return NID_oqs_sig_default; case NID_p256_dilithium2: case NID_rsa3072_dilithium2: return NID_dilithium2; @@ -622,10 +598,6 @@ static int get_oqs_security_bits(int openssl_nid) switch (openssl_nid) { ///// OQS_TEMPLATE_FRAGMENT_GET_SIG_SECURITY_BITS_START - case NID_oqs_sig_default: - case NID_p256_oqs_sig_default: - case NID_rsa3072_oqs_sig_default: - return 128; case NID_dilithium2: case NID_p256_dilithium2: case NID_rsa3072_dilithium2: @@ -1252,9 +1224,6 @@ static int oqs_item_verify(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, if ( ( ///// OQS_TEMPLATE_FRAGMENT_CHECK_IF_KNOWN_NID_START - nid != NID_oqs_sig_default && - nid != NID_p256_oqs_sig_default && - nid != NID_rsa3072_oqs_sig_default && nid != NID_dilithium2 && nid != NID_p256_dilithium2 && nid != NID_rsa3072_dilithium2 && @@ -1854,9 +1823,6 @@ DEFINE_OQS_SIGN_INFO_SET(ALG, NID_ALG) \ DEFINE_OQS_EVP_PKEY_METHOD(ALG, NID_ALG) \ DEFINE_OQS_EVP_PKEY_ASN1_METHOD(ALG, NID_ALG, SHORT_NAME, LONG_NAME) ///// OQS_TEMPLATE_FRAGMENT_DEFINE_OQS_EVP_METHS_START -DEFINE_OQS_EVP_METHODS(oqs_sig_default, NID_oqs_sig_default, "oqs_sig_default", "OpenSSL OQS Default Signature Algorithm algorithm") -DEFINE_OQS_EVP_METHODS(p256_oqs_sig_default, NID_p256_oqs_sig_default, "p256_oqs_sig_default", "OpenSSL ECDSA p256 OQS Default Signature Algorithm algorithm") -DEFINE_OQS_EVP_METHODS(rsa3072_oqs_sig_default, NID_rsa3072_oqs_sig_default, "rsa3072_oqs_sig_default", "OpenSSL RSA3072 OQS Default Signature Algorithm algorithm") DEFINE_OQS_EVP_METHODS(dilithium2, NID_dilithium2, "dilithium2", "OpenSSL Dilithium2 algorithm") DEFINE_OQS_EVP_METHODS(p256_dilithium2, NID_p256_dilithium2, "p256_dilithium2", "OpenSSL ECDSA p256 Dilithium2 algorithm") DEFINE_OQS_EVP_METHODS(rsa3072_dilithium2, NID_rsa3072_dilithium2, "rsa3072_dilithium2", "OpenSSL RSA3072 Dilithium2 algorithm") diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c index 09f7622daa8e1..5c26e82daa952 100644 --- a/crypto/evp/pmeth_lib.c +++ b/crypto/evp/pmeth_lib.c @@ -69,9 +69,6 @@ static const EVP_PKEY_METHOD *standard_methods[] = { &sm2_pkey_meth, #endif ///// OQS_TEMPLATE_FRAGMENT_LIST_PKEY_METHS_START - &oqs_sig_default_pkey_meth, - &p256_oqs_sig_default_pkey_meth, - &rsa3072_oqs_sig_default_pkey_meth, &dilithium2_pkey_meth, &p256_dilithium2_pkey_meth, &rsa3072_dilithium2_pkey_meth, diff --git a/crypto/objects/obj_dat.h b/crypto/objects/obj_dat.h index 3a5011f2cda2f..f849798825f20 100644 --- a/crypto/objects/obj_dat.h +++ b/crypto/objects/obj_dat.h @@ -10,7 +10,7 @@ */ /* Serialized OID's */ -static const unsigned char so[8071] = { +static const unsigned char so[8056] = { 0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 0] OBJ_rsadsi */ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 6] OBJ_pkcs */ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x02, /* [ 13] OBJ_md2 */ @@ -1076,51 +1076,48 @@ static const unsigned char so[8071] = { 0x2A,0x85,0x03,0x07,0x01,0x02,0x01,0x01,0x04, /* [ 7736] OBJ_id_tc26_gost_3410_2012_256_paramSetD */ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x0C, /* [ 7745] OBJ_hmacWithSHA512_224 */ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x0D, /* [ 7753] OBJ_hmacWithSHA512_256 */ - 0x2B,0xCE,0x0F,0x01,0x01, /* [ 7761] OBJ_oqs_sig_default */ - 0x2B,0xCE,0x0F,0x01,0x02, /* [ 7766] OBJ_p256_oqs_sig_default */ - 0x2B,0xCE,0x0F,0x01,0x03, /* [ 7771] OBJ_rsa3072_oqs_sig_default */ - 0x2B,0x06,0x01,0x04,0x01,0x02,0x82,0x0B,0x07,0x04,0x04, /* [ 7776] OBJ_dilithium2 */ - 0x2B,0xCE,0x0F,0x02,0x07,0x01, /* [ 7787] OBJ_p256_dilithium2 */ - 0x2B,0xCE,0x0F,0x02,0x07,0x02, /* [ 7793] OBJ_rsa3072_dilithium2 */ - 0x2B,0x06,0x01,0x04,0x01,0x02,0x82,0x0B,0x07,0x06,0x05, /* [ 7799] OBJ_dilithium3 */ - 0x2B,0xCE,0x0F,0x02,0x07,0x03, /* [ 7810] OBJ_p384_dilithium3 */ - 0x2B,0x06,0x01,0x04,0x01,0x02,0x82,0x0B,0x07,0x08,0x07, /* [ 7816] OBJ_dilithium5 */ - 0x2B,0xCE,0x0F,0x02,0x07,0x04, /* [ 7827] OBJ_p521_dilithium5 */ - 0x2B,0x06,0x01,0x04,0x01,0x02,0x82,0x0B,0x0B,0x04,0x04, /* [ 7833] OBJ_dilithium2_aes */ - 0x2B,0xCE,0x0F,0x02,0x0B,0x01, /* [ 7844] OBJ_p256_dilithium2_aes */ - 0x2B,0xCE,0x0F,0x02,0x0B,0x02, /* [ 7850] OBJ_rsa3072_dilithium2_aes */ - 0x2B,0x06,0x01,0x04,0x01,0x02,0x82,0x0B,0x0B,0x06,0x05, /* [ 7856] OBJ_dilithium3_aes */ - 0x2B,0xCE,0x0F,0x02,0x0B,0x03, /* [ 7867] OBJ_p384_dilithium3_aes */ - 0x2B,0x06,0x01,0x04,0x01,0x02,0x82,0x0B,0x0B,0x08,0x07, /* [ 7873] OBJ_dilithium5_aes */ - 0x2B,0xCE,0x0F,0x02,0x0B,0x04, /* [ 7884] OBJ_p521_dilithium5_aes */ - 0x2B,0xCE,0x0F,0x03,0x01, /* [ 7890] OBJ_falcon512 */ - 0x2B,0xCE,0x0F,0x03,0x02, /* [ 7895] OBJ_p256_falcon512 */ - 0x2B,0xCE,0x0F,0x03,0x03, /* [ 7900] OBJ_rsa3072_falcon512 */ - 0x2B,0xCE,0x0F,0x03,0x04, /* [ 7905] OBJ_falcon1024 */ - 0x2B,0xCE,0x0F,0x03,0x05, /* [ 7910] OBJ_p521_falcon1024 */ - 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x59,0x02,0x01,0x07, /* [ 7915] OBJ_picnicl1full */ - 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x59,0x02,0x01,0x08, /* [ 7926] OBJ_p256_picnicl1full */ - 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x59,0x02,0x01,0x09, /* [ 7937] OBJ_rsa3072_picnicl1full */ - 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x59,0x02,0x01,0x15, /* [ 7948] OBJ_picnic3l1 */ - 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x59,0x02,0x01,0x16, /* [ 7959] OBJ_p256_picnic3l1 */ - 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x59,0x02,0x01,0x17, /* [ 7970] OBJ_rsa3072_picnic3l1 */ - 0x2B,0xCE,0x0F,0x05,0x01,0x01,0x01, /* [ 7981] OBJ_rainbowIclassic */ - 0x2B,0xCE,0x0F,0x05,0x01,0x02,0x01, /* [ 7988] OBJ_p256_rainbowIclassic */ - 0x2B,0xCE,0x0F,0x05,0x01,0x03,0x01, /* [ 7995] OBJ_rsa3072_rainbowIclassic */ - 0x2B,0xCE,0x0F,0x05,0x03,0x01,0x01, /* [ 8002] OBJ_rainbowVclassic */ - 0x2B,0xCE,0x0F,0x05,0x03,0x02,0x01, /* [ 8009] OBJ_p521_rainbowVclassic */ - 0x2B,0xCE,0x0F,0x06,0x01,0x01, /* [ 8016] OBJ_sphincsharaka128frobust */ - 0x2B,0xCE,0x0F,0x06,0x01,0x02, /* [ 8022] OBJ_p256_sphincsharaka128frobust */ - 0x2B,0xCE,0x0F,0x06,0x01,0x03, /* [ 8028] OBJ_rsa3072_sphincsharaka128frobust */ - 0x2B,0xCE,0x0F,0x06,0x04,0x01, /* [ 8034] OBJ_sphincssha256128frobust */ - 0x2B,0xCE,0x0F,0x06,0x04,0x02, /* [ 8040] OBJ_p256_sphincssha256128frobust */ - 0x2B,0xCE,0x0F,0x06,0x04,0x03, /* [ 8046] OBJ_rsa3072_sphincssha256128frobust */ - 0x2B,0xCE,0x0F,0x06,0x07,0x01, /* [ 8052] OBJ_sphincsshake256128frobust */ - 0x2B,0xCE,0x0F,0x06,0x07,0x02, /* [ 8058] OBJ_p256_sphincsshake256128frobust */ - 0x2B,0xCE,0x0F,0x06,0x07,0x03, /* [ 8064] OBJ_rsa3072_sphincsshake256128frobust */ + 0x2B,0x06,0x01,0x04,0x01,0x02,0x82,0x0B,0x07,0x04,0x04, /* [ 7761] OBJ_dilithium2 */ + 0x2B,0xCE,0x0F,0x02,0x07,0x01, /* [ 7772] OBJ_p256_dilithium2 */ + 0x2B,0xCE,0x0F,0x02,0x07,0x02, /* [ 7778] OBJ_rsa3072_dilithium2 */ + 0x2B,0x06,0x01,0x04,0x01,0x02,0x82,0x0B,0x07,0x06,0x05, /* [ 7784] OBJ_dilithium3 */ + 0x2B,0xCE,0x0F,0x02,0x07,0x03, /* [ 7795] OBJ_p384_dilithium3 */ + 0x2B,0x06,0x01,0x04,0x01,0x02,0x82,0x0B,0x07,0x08,0x07, /* [ 7801] OBJ_dilithium5 */ + 0x2B,0xCE,0x0F,0x02,0x07,0x04, /* [ 7812] OBJ_p521_dilithium5 */ + 0x2B,0x06,0x01,0x04,0x01,0x02,0x82,0x0B,0x0B,0x04,0x04, /* [ 7818] OBJ_dilithium2_aes */ + 0x2B,0xCE,0x0F,0x02,0x0B,0x01, /* [ 7829] OBJ_p256_dilithium2_aes */ + 0x2B,0xCE,0x0F,0x02,0x0B,0x02, /* [ 7835] OBJ_rsa3072_dilithium2_aes */ + 0x2B,0x06,0x01,0x04,0x01,0x02,0x82,0x0B,0x0B,0x06,0x05, /* [ 7841] OBJ_dilithium3_aes */ + 0x2B,0xCE,0x0F,0x02,0x0B,0x03, /* [ 7852] OBJ_p384_dilithium3_aes */ + 0x2B,0x06,0x01,0x04,0x01,0x02,0x82,0x0B,0x0B,0x08,0x07, /* [ 7858] OBJ_dilithium5_aes */ + 0x2B,0xCE,0x0F,0x02,0x0B,0x04, /* [ 7869] OBJ_p521_dilithium5_aes */ + 0x2B,0xCE,0x0F,0x03,0x01, /* [ 7875] OBJ_falcon512 */ + 0x2B,0xCE,0x0F,0x03,0x02, /* [ 7880] OBJ_p256_falcon512 */ + 0x2B,0xCE,0x0F,0x03,0x03, /* [ 7885] OBJ_rsa3072_falcon512 */ + 0x2B,0xCE,0x0F,0x03,0x04, /* [ 7890] OBJ_falcon1024 */ + 0x2B,0xCE,0x0F,0x03,0x05, /* [ 7895] OBJ_p521_falcon1024 */ + 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x59,0x02,0x01,0x07, /* [ 7900] OBJ_picnicl1full */ + 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x59,0x02,0x01,0x08, /* [ 7911] OBJ_p256_picnicl1full */ + 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x59,0x02,0x01,0x09, /* [ 7922] OBJ_rsa3072_picnicl1full */ + 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x59,0x02,0x01,0x15, /* [ 7933] OBJ_picnic3l1 */ + 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x59,0x02,0x01,0x16, /* [ 7944] OBJ_p256_picnic3l1 */ + 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x59,0x02,0x01,0x17, /* [ 7955] OBJ_rsa3072_picnic3l1 */ + 0x2B,0xCE,0x0F,0x05,0x01,0x01,0x01, /* [ 7966] OBJ_rainbowIclassic */ + 0x2B,0xCE,0x0F,0x05,0x01,0x02,0x01, /* [ 7973] OBJ_p256_rainbowIclassic */ + 0x2B,0xCE,0x0F,0x05,0x01,0x03,0x01, /* [ 7980] OBJ_rsa3072_rainbowIclassic */ + 0x2B,0xCE,0x0F,0x05,0x03,0x01,0x01, /* [ 7987] OBJ_rainbowVclassic */ + 0x2B,0xCE,0x0F,0x05,0x03,0x02,0x01, /* [ 7994] OBJ_p521_rainbowVclassic */ + 0x2B,0xCE,0x0F,0x06,0x01,0x01, /* [ 8001] OBJ_sphincsharaka128frobust */ + 0x2B,0xCE,0x0F,0x06,0x01,0x02, /* [ 8007] OBJ_p256_sphincsharaka128frobust */ + 0x2B,0xCE,0x0F,0x06,0x01,0x03, /* [ 8013] OBJ_rsa3072_sphincsharaka128frobust */ + 0x2B,0xCE,0x0F,0x06,0x04,0x01, /* [ 8019] OBJ_sphincssha256128frobust */ + 0x2B,0xCE,0x0F,0x06,0x04,0x02, /* [ 8025] OBJ_p256_sphincssha256128frobust */ + 0x2B,0xCE,0x0F,0x06,0x04,0x03, /* [ 8031] OBJ_rsa3072_sphincssha256128frobust */ + 0x2B,0xCE,0x0F,0x06,0x07,0x01, /* [ 8037] OBJ_sphincsshake256128frobust */ + 0x2B,0xCE,0x0F,0x06,0x07,0x02, /* [ 8043] OBJ_p256_sphincsshake256128frobust */ + 0x2B,0xCE,0x0F,0x06,0x07,0x03, /* [ 8049] OBJ_rsa3072_sphincsshake256128frobust */ }; -#define NUM_NID 1344 +#define NUM_NID 1336 static const ASN1_OBJECT nid_objs[NUM_NID] = { {"UNDEF", "undefined", NID_undef}, {"rsadsi", "RSA Data Security, Inc.", NID_rsadsi, 6, &so[0]}, @@ -2317,15 +2314,13 @@ static const ASN1_OBJECT nid_objs[NUM_NID] = { {"magma-mac", "magma-mac", NID_magma_mac}, {"hmacWithSHA512-224", "hmacWithSHA512-224", NID_hmacWithSHA512_224, 8, &so[7745]}, {"hmacWithSHA512-256", "hmacWithSHA512-256", NID_hmacWithSHA512_256, 8, &so[7753]}, - {"oqs_kem_default", "oqs_kem_default", NID_oqs_kem_default}, + { NULL, NULL, NID_undef }, {"frodo640aes", "frodo640aes", NID_frodo640aes}, {"frodo640shake", "frodo640shake", NID_frodo640shake}, {"frodo976aes", "frodo976aes", NID_frodo976aes}, {"frodo976shake", "frodo976shake", NID_frodo976shake}, {"frodo1344aes", "frodo1344aes", NID_frodo1344aes}, {"frodo1344shake", "frodo1344shake", NID_frodo1344shake}, - {"bike1l1cpa", "bike1l1cpa", NID_bike1l1cpa}, - {"bike1l3cpa", "bike1l3cpa", NID_bike1l3cpa}, {"kyber512", "kyber512", NID_kyber512}, {"kyber768", "kyber768", NID_kyber768}, {"kyber1024", "kyber1024", NID_kyber1024}, @@ -2344,8 +2339,8 @@ static const ASN1_OBJECT nid_objs[NUM_NID] = { {"sikep503", "sikep503", NID_sikep503}, {"sikep610", "sikep610", NID_sikep610}, {"sikep751", "sikep751", NID_sikep751}, - {"bike1l1fo", "bike1l1fo", NID_bike1l1fo}, - {"bike1l3fo", "bike1l3fo", NID_bike1l3fo}, + {"bikel1", "bikel1", NID_bikel1}, + {"bikel3", "bikel3", NID_bikel3}, {"kyber90s512", "kyber90s512", NID_kyber90s512}, {"kyber90s768", "kyber90s768", NID_kyber90s768}, {"kyber90s1024", "kyber90s1024", NID_kyber90s1024}, @@ -2358,15 +2353,13 @@ static const ASN1_OBJECT nid_objs[NUM_NID] = { {"sntrup653", "sntrup653", NID_sntrup653}, {"sntrup761", "sntrup761", NID_sntrup761}, {"sntrup857", "sntrup857", NID_sntrup857}, - {"p256_oqs_kem_default", "p256_oqs_kem_default", NID_p256_oqs_kem_default}, + { NULL, NULL, NID_undef }, {"p256_frodo640aes", "p256_frodo640aes", NID_p256_frodo640aes}, {"p256_frodo640shake", "p256_frodo640shake", NID_p256_frodo640shake}, { NULL, NULL, NID_undef }, { NULL, NULL, NID_undef }, { NULL, NULL, NID_undef }, { NULL, NULL, NID_undef }, - {"p256_bike1l1cpa", "p256_bike1l1cpa", NID_p256_bike1l1cpa}, - { NULL, NULL, NID_undef }, {"p256_kyber512", "p256_kyber512", NID_p256_kyber512}, { NULL, NULL, NID_undef }, { NULL, NULL, NID_undef }, @@ -2385,7 +2378,7 @@ static const ASN1_OBJECT nid_objs[NUM_NID] = { {"p256_sikep503", "p256_sikep503", NID_p256_sikep503}, { NULL, NULL, NID_undef }, { NULL, NULL, NID_undef }, - {"p256_bike1l1fo", "p256_bike1l1fo", NID_p256_bike1l1fo}, + {"p256_bikel1", "p256_bikel1", NID_p256_bikel1}, { NULL, NULL, NID_undef }, {"p256_kyber90s512", "p256_kyber90s512", NID_p256_kyber90s512}, { NULL, NULL, NID_undef }, @@ -2399,53 +2392,49 @@ static const ASN1_OBJECT nid_objs[NUM_NID] = { {"p256_sntrup653", "p256_sntrup653", NID_p256_sntrup653}, { NULL, NULL, NID_undef }, { NULL, NULL, NID_undef }, - {"oqs_sig_default", "oqs_sig_default", NID_oqs_sig_default, 5, &so[7761]}, - {"p256_oqs_sig_default", "p256_oqs_sig_default", NID_p256_oqs_sig_default, 5, &so[7766]}, - {"rsa3072_oqs_sig_default", "rsa3072_oqs_sig_default", NID_rsa3072_oqs_sig_default, 5, &so[7771]}, - {"dilithium2", "dilithium2", NID_dilithium2, 11, &so[7776]}, - {"p256_dilithium2", "p256_dilithium2", NID_p256_dilithium2, 6, &so[7787]}, - {"rsa3072_dilithium2", "rsa3072_dilithium2", NID_rsa3072_dilithium2, 6, &so[7793]}, - {"dilithium3", "dilithium3", NID_dilithium3, 11, &so[7799]}, - {"p384_dilithium3", "p384_dilithium3", NID_p384_dilithium3, 6, &so[7810]}, - {"dilithium5", "dilithium5", NID_dilithium5, 11, &so[7816]}, - {"p521_dilithium5", "p521_dilithium5", NID_p521_dilithium5, 6, &so[7827]}, - {"dilithium2_aes", "dilithium2_aes", NID_dilithium2_aes, 11, &so[7833]}, - {"p256_dilithium2_aes", "p256_dilithium2_aes", NID_p256_dilithium2_aes, 6, &so[7844]}, - {"rsa3072_dilithium2_aes", "rsa3072_dilithium2_aes", NID_rsa3072_dilithium2_aes, 6, &so[7850]}, - {"dilithium3_aes", "dilithium3_aes", NID_dilithium3_aes, 11, &so[7856]}, - {"p384_dilithium3_aes", "p384_dilithium3_aes", NID_p384_dilithium3_aes, 6, &so[7867]}, - {"dilithium5_aes", "dilithium5_aes", NID_dilithium5_aes, 11, &so[7873]}, - {"p521_dilithium5_aes", "p521_dilithium5_aes", NID_p521_dilithium5_aes, 6, &so[7884]}, - {"falcon512", "falcon512", NID_falcon512, 5, &so[7890]}, - {"p256_falcon512", "p256_falcon512", NID_p256_falcon512, 5, &so[7895]}, - {"rsa3072_falcon512", "rsa3072_falcon512", NID_rsa3072_falcon512, 5, &so[7900]}, - {"falcon1024", "falcon1024", NID_falcon1024, 5, &so[7905]}, - {"p521_falcon1024", "p521_falcon1024", NID_p521_falcon1024, 5, &so[7910]}, - {"picnicl1full", "picnicl1full", NID_picnicl1full, 11, &so[7915]}, - {"p256_picnicl1full", "p256_picnicl1full", NID_p256_picnicl1full, 11, &so[7926]}, - {"rsa3072_picnicl1full", "rsa3072_picnicl1full", NID_rsa3072_picnicl1full, 11, &so[7937]}, - {"picnic3l1", "picnic3l1", NID_picnic3l1, 11, &so[7948]}, - {"p256_picnic3l1", "p256_picnic3l1", NID_p256_picnic3l1, 11, &so[7959]}, - {"rsa3072_picnic3l1", "rsa3072_picnic3l1", NID_rsa3072_picnic3l1, 11, &so[7970]}, - {"rainbowIclassic", "rainbowIclassic", NID_rainbowIclassic, 7, &so[7981]}, - {"p256_rainbowIclassic", "p256_rainbowIclassic", NID_p256_rainbowIclassic, 7, &so[7988]}, - {"rsa3072_rainbowIclassic", "rsa3072_rainbowIclassic", NID_rsa3072_rainbowIclassic, 7, &so[7995]}, - {"rainbowVclassic", "rainbowVclassic", NID_rainbowVclassic, 7, &so[8002]}, - {"p521_rainbowVclassic", "p521_rainbowVclassic", NID_p521_rainbowVclassic, 7, &so[8009]}, - {"sphincsharaka128frobust", "sphincsharaka128frobust", NID_sphincsharaka128frobust, 6, &so[8016]}, - {"p256_sphincsharaka128frobust", "p256_sphincsharaka128frobust", NID_p256_sphincsharaka128frobust, 6, &so[8022]}, - {"rsa3072_sphincsharaka128frobust", "rsa3072_sphincsharaka128frobust", NID_rsa3072_sphincsharaka128frobust, 6, &so[8028]}, - {"sphincssha256128frobust", "sphincssha256128frobust", NID_sphincssha256128frobust, 6, &so[8034]}, - {"p256_sphincssha256128frobust", "p256_sphincssha256128frobust", NID_p256_sphincssha256128frobust, 6, &so[8040]}, - {"rsa3072_sphincssha256128frobust", "rsa3072_sphincssha256128frobust", NID_rsa3072_sphincssha256128frobust, 6, &so[8046]}, - {"sphincsshake256128frobust", "sphincsshake256128frobust", NID_sphincsshake256128frobust, 6, &so[8052]}, - {"p256_sphincsshake256128frobust", "p256_sphincsshake256128frobust", NID_p256_sphincsshake256128frobust, 6, &so[8058]}, - {"rsa3072_sphincsshake256128frobust", "rsa3072_sphincsshake256128frobust", NID_rsa3072_sphincsshake256128frobust, 6, &so[8064]}, + {"dilithium2", "dilithium2", NID_dilithium2, 11, &so[7761]}, + {"p256_dilithium2", "p256_dilithium2", NID_p256_dilithium2, 6, &so[7772]}, + {"rsa3072_dilithium2", "rsa3072_dilithium2", NID_rsa3072_dilithium2, 6, &so[7778]}, + {"dilithium3", "dilithium3", NID_dilithium3, 11, &so[7784]}, + {"p384_dilithium3", "p384_dilithium3", NID_p384_dilithium3, 6, &so[7795]}, + {"dilithium5", "dilithium5", NID_dilithium5, 11, &so[7801]}, + {"p521_dilithium5", "p521_dilithium5", NID_p521_dilithium5, 6, &so[7812]}, + {"dilithium2_aes", "dilithium2_aes", NID_dilithium2_aes, 11, &so[7818]}, + {"p256_dilithium2_aes", "p256_dilithium2_aes", NID_p256_dilithium2_aes, 6, &so[7829]}, + {"rsa3072_dilithium2_aes", "rsa3072_dilithium2_aes", NID_rsa3072_dilithium2_aes, 6, &so[7835]}, + {"dilithium3_aes", "dilithium3_aes", NID_dilithium3_aes, 11, &so[7841]}, + {"p384_dilithium3_aes", "p384_dilithium3_aes", NID_p384_dilithium3_aes, 6, &so[7852]}, + {"dilithium5_aes", "dilithium5_aes", NID_dilithium5_aes, 11, &so[7858]}, + {"p521_dilithium5_aes", "p521_dilithium5_aes", NID_p521_dilithium5_aes, 6, &so[7869]}, + {"falcon512", "falcon512", NID_falcon512, 5, &so[7875]}, + {"p256_falcon512", "p256_falcon512", NID_p256_falcon512, 5, &so[7880]}, + {"rsa3072_falcon512", "rsa3072_falcon512", NID_rsa3072_falcon512, 5, &so[7885]}, + {"falcon1024", "falcon1024", NID_falcon1024, 5, &so[7890]}, + {"p521_falcon1024", "p521_falcon1024", NID_p521_falcon1024, 5, &so[7895]}, + {"picnicl1full", "picnicl1full", NID_picnicl1full, 11, &so[7900]}, + {"p256_picnicl1full", "p256_picnicl1full", NID_p256_picnicl1full, 11, &so[7911]}, + {"rsa3072_picnicl1full", "rsa3072_picnicl1full", NID_rsa3072_picnicl1full, 11, &so[7922]}, + {"picnic3l1", "picnic3l1", NID_picnic3l1, 11, &so[7933]}, + {"p256_picnic3l1", "p256_picnic3l1", NID_p256_picnic3l1, 11, &so[7944]}, + {"rsa3072_picnic3l1", "rsa3072_picnic3l1", NID_rsa3072_picnic3l1, 11, &so[7955]}, + {"rainbowIclassic", "rainbowIclassic", NID_rainbowIclassic, 7, &so[7966]}, + {"p256_rainbowIclassic", "p256_rainbowIclassic", NID_p256_rainbowIclassic, 7, &so[7973]}, + {"rsa3072_rainbowIclassic", "rsa3072_rainbowIclassic", NID_rsa3072_rainbowIclassic, 7, &so[7980]}, + {"rainbowVclassic", "rainbowVclassic", NID_rainbowVclassic, 7, &so[7987]}, + {"p521_rainbowVclassic", "p521_rainbowVclassic", NID_p521_rainbowVclassic, 7, &so[7994]}, + {"sphincsharaka128frobust", "sphincsharaka128frobust", NID_sphincsharaka128frobust, 6, &so[8001]}, + {"p256_sphincsharaka128frobust", "p256_sphincsharaka128frobust", NID_p256_sphincsharaka128frobust, 6, &so[8007]}, + {"rsa3072_sphincsharaka128frobust", "rsa3072_sphincsharaka128frobust", NID_rsa3072_sphincsharaka128frobust, 6, &so[8013]}, + {"sphincssha256128frobust", "sphincssha256128frobust", NID_sphincssha256128frobust, 6, &so[8019]}, + {"p256_sphincssha256128frobust", "p256_sphincssha256128frobust", NID_p256_sphincssha256128frobust, 6, &so[8025]}, + {"rsa3072_sphincssha256128frobust", "rsa3072_sphincssha256128frobust", NID_rsa3072_sphincssha256128frobust, 6, &so[8031]}, + {"sphincsshake256128frobust", "sphincsshake256128frobust", NID_sphincsshake256128frobust, 6, &so[8037]}, + {"p256_sphincsshake256128frobust", "p256_sphincsshake256128frobust", NID_p256_sphincsshake256128frobust, 6, &so[8043]}, + {"rsa3072_sphincsshake256128frobust", "rsa3072_sphincsshake256128frobust", NID_rsa3072_sphincsshake256128frobust, 6, &so[8049]}, {"p384_frodo976aes", "p384_frodo976aes", NID_p384_frodo976aes}, {"p384_frodo976shake", "p384_frodo976shake", NID_p384_frodo976shake}, {"p521_frodo1344aes", "p521_frodo1344aes", NID_p521_frodo1344aes}, {"p521_frodo1344shake", "p521_frodo1344shake", NID_p521_frodo1344shake}, - {"p384_bike1l3cpa", "p384_bike1l3cpa", NID_p384_bike1l3cpa}, {"p384_kyber768", "p384_kyber768", NID_p384_kyber768}, {"p521_kyber1024", "p521_kyber1024", NID_p521_kyber1024}, {"p384_ntru_hps2048677", "p384_ntru_hps2048677", NID_p384_ntru_hps2048677}, @@ -2457,7 +2446,7 @@ static const ASN1_OBJECT nid_objs[NUM_NID] = { {"p521_sidhp751", "p521_sidhp751", NID_p521_sidhp751}, {"p384_sikep610", "p384_sikep610", NID_p384_sikep610}, {"p521_sikep751", "p521_sikep751", NID_p521_sikep751}, - {"p384_bike1l3fo", "p384_bike1l3fo", NID_p384_bike1l3fo}, + {"p384_bikel3", "p384_bikel3", NID_p384_bikel3}, {"p384_kyber90s768", "p384_kyber90s768", NID_p384_kyber90s768}, {"p521_kyber90s1024", "p521_kyber90s1024", NID_p521_kyber90s1024}, {"p384_hqc192", "p384_hqc192", NID_p384_hqc192}, @@ -2468,7 +2457,7 @@ static const ASN1_OBJECT nid_objs[NUM_NID] = { {"p384_sntrup857", "p384_sntrup857", NID_p384_sntrup857}, }; -#define NUM_SN 1310 +#define NUM_SN 1301 static const unsigned int sn_objs[NUM_SN] = { 364, /* "AD_DVCS" */ 419, /* "AES-128-CBC" */ @@ -2781,10 +2770,8 @@ static const unsigned int sn_objs[NUM_SN] = { 882, /* "authorityRevocationList" */ 87, /* "basicConstraints" */ 365, /* "basicOCSPResponse" */ - 1202, /* "bike1l1cpa" */ - 1222, /* "bike1l1fo" */ - 1203, /* "bike1l3cpa" */ - 1223, /* "bike1l3fo" */ + 1220, /* "bikel1" */ + 1221, /* "bikel3" */ 285, /* "biometricInfo" */ 921, /* "brainpoolP160r1" */ 922, /* "brainpoolP160t1" */ @@ -2877,12 +2864,12 @@ static const unsigned int sn_objs[NUM_SN] = { 939, /* "dhSinglePass-stdDH-sha384kdf-scheme" */ 940, /* "dhSinglePass-stdDH-sha512kdf-scheme" */ 920, /* "dhpublicnumber" */ - 1280, /* "dilithium2" */ - 1287, /* "dilithium2_aes" */ - 1283, /* "dilithium3" */ - 1290, /* "dilithium3_aes" */ - 1285, /* "dilithium5" */ - 1292, /* "dilithium5_aes" */ + 1273, /* "dilithium2" */ + 1280, /* "dilithium2_aes" */ + 1276, /* "dilithium3" */ + 1283, /* "dilithium3_aes" */ + 1278, /* "dilithium5" */ + 1285, /* "dilithium5_aes" */ 382, /* "directory" */ 887, /* "distinguishedName" */ 892, /* "dmdName" */ @@ -2924,15 +2911,15 @@ static const unsigned int sn_objs[NUM_SN] = { 126, /* "extendedKeyUsage" */ 372, /* "extendedStatus" */ 867, /* "facsimileTelephoneNumber" */ - 1297, /* "falcon1024" */ - 1294, /* "falcon512" */ + 1290, /* "falcon1024" */ + 1287, /* "falcon512" */ 462, /* "favouriteDrink" */ 1126, /* "ffdhe2048" */ 1127, /* "ffdhe3072" */ 1128, /* "ffdhe4096" */ 1129, /* "ffdhe6144" */ 1130, /* "ffdhe8192" */ - 1213, /* "firesaber" */ + 1211, /* "firesaber" */ 857, /* "freshestCRL" */ 453, /* "friendlyCountry" */ 490, /* "friendlyCountryName" */ @@ -2981,9 +2968,9 @@ static const unsigned int sn_objs[NUM_SN] = { 473, /* "homeTelephoneNumber" */ 466, /* "host" */ 889, /* "houseIdentifier" */ - 1227, /* "hqc128" */ - 1228, /* "hqc192" */ - 1229, /* "hqc256" */ + 1225, /* "hqc128" */ + 1226, /* "hqc192" */ + 1227, /* "hqc256" */ 442, /* "iA5StringSyntax" */ 783, /* "id-DHBasedMac" */ 824, /* "id-Gost28147-89-CryptoPro-A-ParamSet" */ @@ -3308,15 +3295,15 @@ static const unsigned int sn_objs[NUM_SN] = { 956, /* "jurisdictionST" */ 150, /* "keyBag" */ 83, /* "keyUsage" */ - 1206, /* "kyber1024" */ - 1204, /* "kyber512" */ - 1205, /* "kyber768" */ - 1226, /* "kyber90s1024" */ - 1224, /* "kyber90s512" */ - 1225, /* "kyber90s768" */ + 1204, /* "kyber1024" */ + 1202, /* "kyber512" */ + 1203, /* "kyber768" */ + 1224, /* "kyber90s1024" */ + 1222, /* "kyber90s512" */ + 1223, /* "kyber90s768" */ 477, /* "lastModifiedBy" */ 476, /* "lastModifiedTime" */ - 1211, /* "lightsaber" */ + 1209, /* "lightsaber" */ 157, /* "localKeyID" */ 480, /* "mXRecord" */ 1190, /* "magma-cbc" */ @@ -3365,78 +3352,72 @@ static const unsigned int sn_objs[NUM_SN] = { 73, /* "nsRevocationUrl" */ 139, /* "nsSGC" */ 77, /* "nsSslServerName" */ - 1207, /* "ntru_hps2048509" */ - 1208, /* "ntru_hps2048677" */ - 1209, /* "ntru_hps4096821" */ - 1210, /* "ntru_hrss701" */ - 1230, /* "ntrulpr653" */ - 1231, /* "ntrulpr761" */ - 1232, /* "ntrulpr857" */ + 1205, /* "ntru_hps2048509" */ + 1206, /* "ntru_hps2048677" */ + 1207, /* "ntru_hps4096821" */ + 1208, /* "ntru_hrss701" */ + 1228, /* "ntrulpr653" */ + 1229, /* "ntrulpr761" */ + 1230, /* "ntrulpr857" */ 681, /* "onBasis" */ - 1195, /* "oqs_kem_default" */ - 1277, /* "oqs_sig_default" */ 1089, /* "organizationIdentifier" */ 491, /* "organizationalStatus" */ 1141, /* "oscca" */ 475, /* "otherMailbox" */ 876, /* "owner" */ - 1243, /* "p256_bike1l1cpa" */ - 1263, /* "p256_bike1l1fo" */ - 1281, /* "p256_dilithium2" */ - 1288, /* "p256_dilithium2_aes" */ - 1295, /* "p256_falcon512" */ - 1237, /* "p256_frodo640aes" */ - 1238, /* "p256_frodo640shake" */ - 1268, /* "p256_hqc128" */ - 1245, /* "p256_kyber512" */ - 1265, /* "p256_kyber90s512" */ - 1252, /* "p256_lightsaber" */ - 1248, /* "p256_ntru_hps2048509" */ - 1271, /* "p256_ntrulpr653" */ - 1236, /* "p256_oqs_kem_default" */ - 1278, /* "p256_oqs_sig_default" */ - 1303, /* "p256_picnic3l1" */ - 1300, /* "p256_picnicl1full" */ - 1306, /* "p256_rainbowIclassic" */ - 1255, /* "p256_sidhp434" */ - 1256, /* "p256_sidhp503" */ - 1259, /* "p256_sikep434" */ - 1260, /* "p256_sikep503" */ - 1274, /* "p256_sntrup653" */ - 1311, /* "p256_sphincsharaka128frobust" */ - 1314, /* "p256_sphincssha256128frobust" */ - 1317, /* "p256_sphincsshake256128frobust" */ - 1323, /* "p384_bike1l3cpa" */ - 1335, /* "p384_bike1l3fo" */ - 1284, /* "p384_dilithium3" */ - 1291, /* "p384_dilithium3_aes" */ - 1319, /* "p384_frodo976aes" */ - 1320, /* "p384_frodo976shake" */ - 1338, /* "p384_hqc192" */ - 1324, /* "p384_kyber768" */ - 1336, /* "p384_kyber90s768" */ - 1326, /* "p384_ntru_hps2048677" */ - 1328, /* "p384_ntru_hrss701" */ - 1340, /* "p384_ntrulpr761" */ - 1341, /* "p384_ntrulpr857" */ - 1329, /* "p384_saber" */ - 1331, /* "p384_sidhp610" */ - 1333, /* "p384_sikep610" */ - 1342, /* "p384_sntrup761" */ - 1343, /* "p384_sntrup857" */ - 1286, /* "p521_dilithium5" */ - 1293, /* "p521_dilithium5_aes" */ - 1298, /* "p521_falcon1024" */ - 1330, /* "p521_firesaber" */ - 1321, /* "p521_frodo1344aes" */ - 1322, /* "p521_frodo1344shake" */ - 1339, /* "p521_hqc256" */ - 1325, /* "p521_kyber1024" */ - 1337, /* "p521_kyber90s1024" */ - 1327, /* "p521_ntru_hps4096821" */ - 1309, /* "p521_rainbowVclassic" */ - 1332, /* "p521_sidhp751" */ - 1334, /* "p521_sikep751" */ + 1259, /* "p256_bikel1" */ + 1274, /* "p256_dilithium2" */ + 1281, /* "p256_dilithium2_aes" */ + 1288, /* "p256_falcon512" */ + 1235, /* "p256_frodo640aes" */ + 1236, /* "p256_frodo640shake" */ + 1264, /* "p256_hqc128" */ + 1241, /* "p256_kyber512" */ + 1261, /* "p256_kyber90s512" */ + 1248, /* "p256_lightsaber" */ + 1244, /* "p256_ntru_hps2048509" */ + 1267, /* "p256_ntrulpr653" */ + 1296, /* "p256_picnic3l1" */ + 1293, /* "p256_picnicl1full" */ + 1299, /* "p256_rainbowIclassic" */ + 1251, /* "p256_sidhp434" */ + 1252, /* "p256_sidhp503" */ + 1255, /* "p256_sikep434" */ + 1256, /* "p256_sikep503" */ + 1270, /* "p256_sntrup653" */ + 1304, /* "p256_sphincsharaka128frobust" */ + 1307, /* "p256_sphincssha256128frobust" */ + 1310, /* "p256_sphincsshake256128frobust" */ + 1327, /* "p384_bikel3" */ + 1277, /* "p384_dilithium3" */ + 1284, /* "p384_dilithium3_aes" */ + 1312, /* "p384_frodo976aes" */ + 1313, /* "p384_frodo976shake" */ + 1330, /* "p384_hqc192" */ + 1316, /* "p384_kyber768" */ + 1328, /* "p384_kyber90s768" */ + 1318, /* "p384_ntru_hps2048677" */ + 1320, /* "p384_ntru_hrss701" */ + 1332, /* "p384_ntrulpr761" */ + 1333, /* "p384_ntrulpr857" */ + 1321, /* "p384_saber" */ + 1323, /* "p384_sidhp610" */ + 1325, /* "p384_sikep610" */ + 1334, /* "p384_sntrup761" */ + 1335, /* "p384_sntrup857" */ + 1279, /* "p521_dilithium5" */ + 1286, /* "p521_dilithium5_aes" */ + 1291, /* "p521_falcon1024" */ + 1322, /* "p521_firesaber" */ + 1314, /* "p521_frodo1344aes" */ + 1315, /* "p521_frodo1344shake" */ + 1331, /* "p521_hqc256" */ + 1317, /* "p521_kyber1024" */ + 1329, /* "p521_kyber90s1024" */ + 1319, /* "p521_ntru_hps4096821" */ + 1302, /* "p521_rainbowVclassic" */ + 1324, /* "p521_sidhp751" */ + 1326, /* "p521_sikep751" */ 489, /* "pagerTelephoneNumber" */ 374, /* "path" */ 112, /* "pbeWithMD5AndCast5CBC" */ @@ -3444,8 +3425,8 @@ static const unsigned int sn_objs[NUM_SN] = { 487, /* "personalTitle" */ 464, /* "photo" */ 863, /* "physicalDeliveryOfficeName" */ - 1302, /* "picnic3l1" */ - 1299, /* "picnicl1full" */ + 1295, /* "picnic3l1" */ + 1292, /* "picnicl1full" */ 437, /* "pilot" */ 439, /* "pilotAttributeSyntax" */ 438, /* "pilotAttributeType" */ @@ -3497,29 +3478,28 @@ static const unsigned int sn_objs[NUM_SN] = { 286, /* "qcStatements" */ 457, /* "qualityLabelledData" */ 450, /* "rFC822localPart" */ - 1305, /* "rainbowIclassic" */ - 1308, /* "rainbowVclassic" */ + 1298, /* "rainbowIclassic" */ + 1301, /* "rainbowVclassic" */ 870, /* "registeredAddress" */ 400, /* "role" */ 877, /* "roleOccupant" */ 448, /* "room" */ 463, /* "roomNumber" */ - 1282, /* "rsa3072_dilithium2" */ - 1289, /* "rsa3072_dilithium2_aes" */ - 1296, /* "rsa3072_falcon512" */ - 1279, /* "rsa3072_oqs_sig_default" */ - 1304, /* "rsa3072_picnic3l1" */ - 1301, /* "rsa3072_picnicl1full" */ - 1307, /* "rsa3072_rainbowIclassic" */ - 1312, /* "rsa3072_sphincsharaka128frobust" */ - 1315, /* "rsa3072_sphincssha256128frobust" */ - 1318, /* "rsa3072_sphincsshake256128frobust" */ + 1275, /* "rsa3072_dilithium2" */ + 1282, /* "rsa3072_dilithium2_aes" */ + 1289, /* "rsa3072_falcon512" */ + 1297, /* "rsa3072_picnic3l1" */ + 1294, /* "rsa3072_picnicl1full" */ + 1300, /* "rsa3072_rainbowIclassic" */ + 1305, /* "rsa3072_sphincsharaka128frobust" */ + 1308, /* "rsa3072_sphincssha256128frobust" */ + 1311, /* "rsa3072_sphincsshake256128frobust" */ 6, /* "rsaEncryption" */ 644, /* "rsaOAEPEncryptionSET" */ 377, /* "rsaSignature" */ 1, /* "rsadsi" */ 482, /* "sOARecord" */ - 1212, /* "saber" */ + 1210, /* "saber" */ 155, /* "safeContentsBag" */ 291, /* "sbgp-autonomousSysNum" */ 290, /* "sbgp-ipAddrBlock" */ @@ -3701,25 +3681,25 @@ static const unsigned int sn_objs[NUM_SN] = { 604, /* "setext-pinAny" */ 603, /* "setext-pinSecure" */ 605, /* "setext-track2" */ - 1214, /* "sidhp434" */ - 1215, /* "sidhp503" */ - 1216, /* "sidhp610" */ - 1217, /* "sidhp751" */ + 1212, /* "sidhp434" */ + 1213, /* "sidhp503" */ + 1214, /* "sidhp610" */ + 1215, /* "sidhp751" */ 52, /* "signingTime" */ - 1218, /* "sikep434" */ - 1219, /* "sikep503" */ - 1220, /* "sikep610" */ - 1221, /* "sikep751" */ + 1216, /* "sikep434" */ + 1217, /* "sikep503" */ + 1218, /* "sikep610" */ + 1219, /* "sikep751" */ 454, /* "simpleSecurityObject" */ 496, /* "singleLevelQuality" */ 1142, /* "sm-scheme" */ 387, /* "snmpv2" */ - 1233, /* "sntrup653" */ - 1234, /* "sntrup761" */ - 1235, /* "sntrup857" */ - 1310, /* "sphincsharaka128frobust" */ - 1313, /* "sphincssha256128frobust" */ - 1316, /* "sphincsshake256128frobust" */ + 1231, /* "sntrup653" */ + 1232, /* "sntrup761" */ + 1233, /* "sntrup857" */ + 1303, /* "sphincsharaka128frobust" */ + 1306, /* "sphincssha256128frobust" */ + 1309, /* "sphincsshake256128frobust" */ 660, /* "street" */ 85, /* "subjectAltName" */ 769, /* "subjectDirectoryAttributes" */ @@ -3782,7 +3762,7 @@ static const unsigned int sn_objs[NUM_SN] = { 1093, /* "x509ExtAdmission" */ }; -#define NUM_LN 1310 +#define NUM_LN 1301 static const unsigned int ln_objs[NUM_LN] = { 363, /* "AD Time Stamping" */ 405, /* "ANSI X9.62" */ @@ -4080,10 +4060,8 @@ static const unsigned int ln_objs[NUM_LN] = { 93, /* "bf-cfb" */ 92, /* "bf-ecb" */ 94, /* "bf-ofb" */ - 1202, /* "bike1l1cpa" */ - 1222, /* "bike1l1fo" */ - 1203, /* "bike1l3cpa" */ - 1223, /* "bike1l3fo" */ + 1220, /* "bikel1" */ + 1221, /* "bikel3" */ 1056, /* "blake2b512" */ 1057, /* "blake2s256" */ 921, /* "brainpoolP160r1" */ @@ -4220,12 +4198,12 @@ static const unsigned int ln_objs[NUM_LN] = { 938, /* "dhSinglePass-stdDH-sha256kdf-scheme" */ 939, /* "dhSinglePass-stdDH-sha384kdf-scheme" */ 940, /* "dhSinglePass-stdDH-sha512kdf-scheme" */ - 1280, /* "dilithium2" */ - 1287, /* "dilithium2_aes" */ - 1283, /* "dilithium3" */ - 1290, /* "dilithium3_aes" */ - 1285, /* "dilithium5" */ - 1292, /* "dilithium5_aes" */ + 1273, /* "dilithium2" */ + 1280, /* "dilithium2_aes" */ + 1276, /* "dilithium3" */ + 1283, /* "dilithium3_aes" */ + 1278, /* "dilithium5" */ + 1285, /* "dilithium5_aes" */ 11, /* "directory services (X.500)" */ 378, /* "directory services - algorithms" */ 887, /* "distinguishedName" */ @@ -4273,15 +4251,15 @@ static const unsigned int ln_objs[NUM_LN] = { 885, /* "enhancedSearchGuide" */ 56, /* "extendedCertificateAttributes" */ 867, /* "facsimileTelephoneNumber" */ - 1297, /* "falcon1024" */ - 1294, /* "falcon512" */ + 1290, /* "falcon1024" */ + 1287, /* "falcon512" */ 462, /* "favouriteDrink" */ 1126, /* "ffdhe2048" */ 1127, /* "ffdhe3072" */ 1128, /* "ffdhe4096" */ 1129, /* "ffdhe6144" */ 1130, /* "ffdhe8192" */ - 1213, /* "firesaber" */ + 1211, /* "firesaber" */ 453, /* "friendlyCountry" */ 490, /* "friendlyCountryName" */ 156, /* "friendlyName" */ @@ -4327,9 +4305,9 @@ static const unsigned int ln_objs[NUM_LN] = { 473, /* "homeTelephoneNumber" */ 466, /* "host" */ 889, /* "houseIdentifier" */ - 1227, /* "hqc128" */ - 1228, /* "hqc192" */ - 1229, /* "hqc256" */ + 1225, /* "hqc128" */ + 1226, /* "hqc192" */ + 1227, /* "hqc256" */ 442, /* "iA5StringSyntax" */ 381, /* "iana" */ 824, /* "id-Gost28147-89-CryptoPro-A-ParamSet" */ @@ -4609,15 +4587,15 @@ static const unsigned int ln_objs[NUM_LN] = { 1037, /* "kx-rsa" */ 1042, /* "kx-rsa-psk" */ 1044, /* "kx-srp" */ - 1206, /* "kyber1024" */ - 1204, /* "kyber512" */ - 1205, /* "kyber768" */ - 1226, /* "kyber90s1024" */ - 1224, /* "kyber90s512" */ - 1225, /* "kyber90s768" */ + 1204, /* "kyber1024" */ + 1202, /* "kyber512" */ + 1203, /* "kyber768" */ + 1224, /* "kyber90s1024" */ + 1222, /* "kyber90s512" */ + 1223, /* "kyber90s768" */ 477, /* "lastModifiedBy" */ 476, /* "lastModifiedTime" */ - 1211, /* "lightsaber" */ + 1209, /* "lightsaber" */ 157, /* "localKeyID" */ 15, /* "localityName" */ 480, /* "mXRecord" */ @@ -4649,16 +4627,14 @@ static const unsigned int ln_objs[NUM_LN] = { 488, /* "mobileTelephoneNumber" */ 481, /* "nSRecord" */ 173, /* "name" */ - 1207, /* "ntru_hps2048509" */ - 1208, /* "ntru_hps2048677" */ - 1209, /* "ntru_hps4096821" */ - 1210, /* "ntru_hrss701" */ - 1230, /* "ntrulpr653" */ - 1231, /* "ntrulpr761" */ - 1232, /* "ntrulpr857" */ + 1205, /* "ntru_hps2048509" */ + 1206, /* "ntru_hps2048677" */ + 1207, /* "ntru_hps4096821" */ + 1208, /* "ntru_hrss701" */ + 1228, /* "ntrulpr653" */ + 1229, /* "ntrulpr761" */ + 1230, /* "ntrulpr857" */ 681, /* "onBasis" */ - 1195, /* "oqs_kem_default" */ - 1277, /* "oqs_sig_default" */ 379, /* "org" */ 1089, /* "organizationIdentifier" */ 17, /* "organizationName" */ @@ -4667,63 +4643,59 @@ static const unsigned int ln_objs[NUM_LN] = { 1141, /* "oscca" */ 475, /* "otherMailbox" */ 876, /* "owner" */ - 1243, /* "p256_bike1l1cpa" */ - 1263, /* "p256_bike1l1fo" */ - 1281, /* "p256_dilithium2" */ - 1288, /* "p256_dilithium2_aes" */ - 1295, /* "p256_falcon512" */ - 1237, /* "p256_frodo640aes" */ - 1238, /* "p256_frodo640shake" */ - 1268, /* "p256_hqc128" */ - 1245, /* "p256_kyber512" */ - 1265, /* "p256_kyber90s512" */ - 1252, /* "p256_lightsaber" */ - 1248, /* "p256_ntru_hps2048509" */ - 1271, /* "p256_ntrulpr653" */ - 1236, /* "p256_oqs_kem_default" */ - 1278, /* "p256_oqs_sig_default" */ - 1303, /* "p256_picnic3l1" */ - 1300, /* "p256_picnicl1full" */ - 1306, /* "p256_rainbowIclassic" */ - 1255, /* "p256_sidhp434" */ - 1256, /* "p256_sidhp503" */ - 1259, /* "p256_sikep434" */ - 1260, /* "p256_sikep503" */ - 1274, /* "p256_sntrup653" */ - 1311, /* "p256_sphincsharaka128frobust" */ - 1314, /* "p256_sphincssha256128frobust" */ - 1317, /* "p256_sphincsshake256128frobust" */ - 1323, /* "p384_bike1l3cpa" */ - 1335, /* "p384_bike1l3fo" */ - 1284, /* "p384_dilithium3" */ - 1291, /* "p384_dilithium3_aes" */ - 1319, /* "p384_frodo976aes" */ - 1320, /* "p384_frodo976shake" */ - 1338, /* "p384_hqc192" */ - 1324, /* "p384_kyber768" */ - 1336, /* "p384_kyber90s768" */ - 1326, /* "p384_ntru_hps2048677" */ - 1328, /* "p384_ntru_hrss701" */ - 1340, /* "p384_ntrulpr761" */ - 1341, /* "p384_ntrulpr857" */ - 1329, /* "p384_saber" */ - 1331, /* "p384_sidhp610" */ - 1333, /* "p384_sikep610" */ - 1342, /* "p384_sntrup761" */ - 1343, /* "p384_sntrup857" */ - 1286, /* "p521_dilithium5" */ - 1293, /* "p521_dilithium5_aes" */ - 1298, /* "p521_falcon1024" */ - 1330, /* "p521_firesaber" */ - 1321, /* "p521_frodo1344aes" */ - 1322, /* "p521_frodo1344shake" */ - 1339, /* "p521_hqc256" */ - 1325, /* "p521_kyber1024" */ - 1337, /* "p521_kyber90s1024" */ - 1327, /* "p521_ntru_hps4096821" */ - 1309, /* "p521_rainbowVclassic" */ - 1332, /* "p521_sidhp751" */ - 1334, /* "p521_sikep751" */ + 1259, /* "p256_bikel1" */ + 1274, /* "p256_dilithium2" */ + 1281, /* "p256_dilithium2_aes" */ + 1288, /* "p256_falcon512" */ + 1235, /* "p256_frodo640aes" */ + 1236, /* "p256_frodo640shake" */ + 1264, /* "p256_hqc128" */ + 1241, /* "p256_kyber512" */ + 1261, /* "p256_kyber90s512" */ + 1248, /* "p256_lightsaber" */ + 1244, /* "p256_ntru_hps2048509" */ + 1267, /* "p256_ntrulpr653" */ + 1296, /* "p256_picnic3l1" */ + 1293, /* "p256_picnicl1full" */ + 1299, /* "p256_rainbowIclassic" */ + 1251, /* "p256_sidhp434" */ + 1252, /* "p256_sidhp503" */ + 1255, /* "p256_sikep434" */ + 1256, /* "p256_sikep503" */ + 1270, /* "p256_sntrup653" */ + 1304, /* "p256_sphincsharaka128frobust" */ + 1307, /* "p256_sphincssha256128frobust" */ + 1310, /* "p256_sphincsshake256128frobust" */ + 1327, /* "p384_bikel3" */ + 1277, /* "p384_dilithium3" */ + 1284, /* "p384_dilithium3_aes" */ + 1312, /* "p384_frodo976aes" */ + 1313, /* "p384_frodo976shake" */ + 1330, /* "p384_hqc192" */ + 1316, /* "p384_kyber768" */ + 1328, /* "p384_kyber90s768" */ + 1318, /* "p384_ntru_hps2048677" */ + 1320, /* "p384_ntru_hrss701" */ + 1332, /* "p384_ntrulpr761" */ + 1333, /* "p384_ntrulpr857" */ + 1321, /* "p384_saber" */ + 1323, /* "p384_sidhp610" */ + 1325, /* "p384_sikep610" */ + 1334, /* "p384_sntrup761" */ + 1335, /* "p384_sntrup857" */ + 1279, /* "p521_dilithium5" */ + 1286, /* "p521_dilithium5_aes" */ + 1291, /* "p521_falcon1024" */ + 1322, /* "p521_firesaber" */ + 1314, /* "p521_frodo1344aes" */ + 1315, /* "p521_frodo1344shake" */ + 1331, /* "p521_hqc256" */ + 1317, /* "p521_kyber1024" */ + 1329, /* "p521_kyber90s1024" */ + 1319, /* "p521_ntru_hps4096821" */ + 1302, /* "p521_rainbowVclassic" */ + 1324, /* "p521_sidhp751" */ + 1326, /* "p521_sikep751" */ 935, /* "pSpecified" */ 489, /* "pagerTelephoneNumber" */ 782, /* "password based MAC" */ @@ -4746,8 +4718,8 @@ static const unsigned int ln_objs[NUM_LN] = { 487, /* "personalTitle" */ 464, /* "photo" */ 863, /* "physicalDeliveryOfficeName" */ - 1302, /* "picnic3l1" */ - 1299, /* "picnicl1full" */ + 1295, /* "picnic3l1" */ + 1292, /* "picnicl1full" */ 437, /* "pilot" */ 439, /* "pilotAttributeSyntax" */ 438, /* "pilotAttributeType" */ @@ -4791,8 +4763,8 @@ static const unsigned int ln_objs[NUM_LN] = { 286, /* "qcStatements" */ 457, /* "qualityLabelledData" */ 450, /* "rFC822localPart" */ - 1305, /* "rainbowIclassic" */ - 1308, /* "rainbowVclassic" */ + 1298, /* "rainbowIclassic" */ + 1301, /* "rainbowVclassic" */ 98, /* "rc2-40-cbc" */ 166, /* "rc2-64-cbc" */ 37, /* "rc2-cbc" */ @@ -4815,23 +4787,22 @@ static const unsigned int ln_objs[NUM_LN] = { 448, /* "room" */ 463, /* "roomNumber" */ 19, /* "rsa" */ - 1282, /* "rsa3072_dilithium2" */ - 1289, /* "rsa3072_dilithium2_aes" */ - 1296, /* "rsa3072_falcon512" */ - 1279, /* "rsa3072_oqs_sig_default" */ - 1304, /* "rsa3072_picnic3l1" */ - 1301, /* "rsa3072_picnicl1full" */ - 1307, /* "rsa3072_rainbowIclassic" */ - 1312, /* "rsa3072_sphincsharaka128frobust" */ - 1315, /* "rsa3072_sphincssha256128frobust" */ - 1318, /* "rsa3072_sphincsshake256128frobust" */ + 1275, /* "rsa3072_dilithium2" */ + 1282, /* "rsa3072_dilithium2_aes" */ + 1289, /* "rsa3072_falcon512" */ + 1297, /* "rsa3072_picnic3l1" */ + 1294, /* "rsa3072_picnicl1full" */ + 1300, /* "rsa3072_rainbowIclassic" */ + 1305, /* "rsa3072_sphincsharaka128frobust" */ + 1308, /* "rsa3072_sphincssha256128frobust" */ + 1311, /* "rsa3072_sphincsshake256128frobust" */ 6, /* "rsaEncryption" */ 644, /* "rsaOAEPEncryptionSET" */ 377, /* "rsaSignature" */ 919, /* "rsaesOaep" */ 912, /* "rsassaPss" */ 482, /* "sOARecord" */ - 1212, /* "saber" */ + 1210, /* "saber" */ 155, /* "safeContentsBag" */ 291, /* "sbgp-autonomousSysNum" */ 290, /* "sbgp-ipAddrBlock" */ @@ -5019,15 +4990,15 @@ static const unsigned int ln_objs[NUM_LN] = { 42, /* "shaWithRSAEncryption" */ 1100, /* "shake128" */ 1101, /* "shake256" */ - 1214, /* "sidhp434" */ - 1215, /* "sidhp503" */ - 1216, /* "sidhp610" */ - 1217, /* "sidhp751" */ + 1212, /* "sidhp434" */ + 1213, /* "sidhp503" */ + 1214, /* "sidhp610" */ + 1215, /* "sidhp751" */ 52, /* "signingTime" */ - 1218, /* "sikep434" */ - 1219, /* "sikep503" */ - 1220, /* "sikep610" */ - 1221, /* "sikep751" */ + 1216, /* "sikep434" */ + 1217, /* "sikep503" */ + 1218, /* "sikep610" */ + 1219, /* "sikep751" */ 454, /* "simpleSecurityObject" */ 496, /* "singleLevelQuality" */ 1062, /* "siphash" */ @@ -5042,12 +5013,12 @@ static const unsigned int ln_objs[NUM_LN] = { 1139, /* "sm4-ctr" */ 1133, /* "sm4-ecb" */ 1135, /* "sm4-ofb" */ - 1233, /* "sntrup653" */ - 1234, /* "sntrup761" */ - 1235, /* "sntrup857" */ - 1310, /* "sphincsharaka128frobust" */ - 1313, /* "sphincssha256128frobust" */ - 1316, /* "sphincsshake256128frobust" */ + 1231, /* "sntrup653" */ + 1232, /* "sntrup761" */ + 1233, /* "sntrup857" */ + 1303, /* "sphincsharaka128frobust" */ + 1306, /* "sphincssha256128frobust" */ + 1309, /* "sphincsshake256128frobust" */ 16, /* "stateOrProvinceName" */ 660, /* "streetAddress" */ 498, /* "subtreeMaximumQuality" */ @@ -5096,7 +5067,7 @@ static const unsigned int ln_objs[NUM_LN] = { 125, /* "zlib compression" */ }; -#define NUM_OBJ 1113 +#define NUM_OBJ 1110 static const unsigned int obj_objs[NUM_OBJ] = { 0, /* OBJ_undef 0 */ 181, /* OBJ_iso 1 */ @@ -5404,14 +5375,11 @@ static const unsigned int obj_objs[NUM_OBJ] = { 732, /* OBJ_sect409r1 1 3 132 0 37 */ 733, /* OBJ_sect571k1 1 3 132 0 38 */ 734, /* OBJ_sect571r1 1 3 132 0 39 */ - 1277, /* OBJ_oqs_sig_default 1 3 9999 1 1 */ - 1278, /* OBJ_p256_oqs_sig_default 1 3 9999 1 2 */ - 1279, /* OBJ_rsa3072_oqs_sig_default 1 3 9999 1 3 */ - 1294, /* OBJ_falcon512 1 3 9999 3 1 */ - 1295, /* OBJ_p256_falcon512 1 3 9999 3 2 */ - 1296, /* OBJ_rsa3072_falcon512 1 3 9999 3 3 */ - 1297, /* OBJ_falcon1024 1 3 9999 3 4 */ - 1298, /* OBJ_p521_falcon1024 1 3 9999 3 5 */ + 1287, /* OBJ_falcon512 1 3 9999 3 1 */ + 1288, /* OBJ_p256_falcon512 1 3 9999 3 2 */ + 1289, /* OBJ_rsa3072_falcon512 1 3 9999 3 3 */ + 1290, /* OBJ_falcon1024 1 3 9999 3 4 */ + 1291, /* OBJ_p521_falcon1024 1 3 9999 3 5 */ 624, /* OBJ_set_rootKeyThumb 2 23 42 3 0 0 */ 625, /* OBJ_set_addPolicy 2 23 42 3 0 1 */ 626, /* OBJ_setAttr_Token_EMV 2 23 42 3 2 1 */ @@ -5462,23 +5430,23 @@ static const unsigned int obj_objs[NUM_OBJ] = { 943, /* OBJ_dhSinglePass_cofactorDH_sha256kdf_scheme 1 3 132 1 14 1 */ 944, /* OBJ_dhSinglePass_cofactorDH_sha384kdf_scheme 1 3 132 1 14 2 */ 945, /* OBJ_dhSinglePass_cofactorDH_sha512kdf_scheme 1 3 132 1 14 3 */ - 1281, /* OBJ_p256_dilithium2 1 3 9999 2 7 1 */ - 1282, /* OBJ_rsa3072_dilithium2 1 3 9999 2 7 2 */ - 1284, /* OBJ_p384_dilithium3 1 3 9999 2 7 3 */ - 1286, /* OBJ_p521_dilithium5 1 3 9999 2 7 4 */ - 1288, /* OBJ_p256_dilithium2_aes 1 3 9999 2 11 1 */ - 1289, /* OBJ_rsa3072_dilithium2_aes 1 3 9999 2 11 2 */ - 1291, /* OBJ_p384_dilithium3_aes 1 3 9999 2 11 3 */ - 1293, /* OBJ_p521_dilithium5_aes 1 3 9999 2 11 4 */ - 1310, /* OBJ_sphincsharaka128frobust 1 3 9999 6 1 1 */ - 1311, /* OBJ_p256_sphincsharaka128frobust 1 3 9999 6 1 2 */ - 1312, /* OBJ_rsa3072_sphincsharaka128frobust 1 3 9999 6 1 3 */ - 1313, /* OBJ_sphincssha256128frobust 1 3 9999 6 4 1 */ - 1314, /* OBJ_p256_sphincssha256128frobust 1 3 9999 6 4 2 */ - 1315, /* OBJ_rsa3072_sphincssha256128frobust 1 3 9999 6 4 3 */ - 1316, /* OBJ_sphincsshake256128frobust 1 3 9999 6 7 1 */ - 1317, /* OBJ_p256_sphincsshake256128frobust 1 3 9999 6 7 2 */ - 1318, /* OBJ_rsa3072_sphincsshake256128frobust 1 3 9999 6 7 3 */ + 1274, /* OBJ_p256_dilithium2 1 3 9999 2 7 1 */ + 1275, /* OBJ_rsa3072_dilithium2 1 3 9999 2 7 2 */ + 1277, /* OBJ_p384_dilithium3 1 3 9999 2 7 3 */ + 1279, /* OBJ_p521_dilithium5 1 3 9999 2 7 4 */ + 1281, /* OBJ_p256_dilithium2_aes 1 3 9999 2 11 1 */ + 1282, /* OBJ_rsa3072_dilithium2_aes 1 3 9999 2 11 2 */ + 1284, /* OBJ_p384_dilithium3_aes 1 3 9999 2 11 3 */ + 1286, /* OBJ_p521_dilithium5_aes 1 3 9999 2 11 4 */ + 1303, /* OBJ_sphincsharaka128frobust 1 3 9999 6 1 1 */ + 1304, /* OBJ_p256_sphincsharaka128frobust 1 3 9999 6 1 2 */ + 1305, /* OBJ_rsa3072_sphincsharaka128frobust 1 3 9999 6 1 3 */ + 1306, /* OBJ_sphincssha256128frobust 1 3 9999 6 4 1 */ + 1307, /* OBJ_p256_sphincssha256128frobust 1 3 9999 6 4 2 */ + 1308, /* OBJ_rsa3072_sphincssha256128frobust 1 3 9999 6 4 3 */ + 1309, /* OBJ_sphincsshake256128frobust 1 3 9999 6 7 1 */ + 1310, /* OBJ_p256_sphincsshake256128frobust 1 3 9999 6 7 2 */ + 1311, /* OBJ_rsa3072_sphincsshake256128frobust 1 3 9999 6 7 3 */ 631, /* OBJ_setAttr_GenCryptgrm 2 23 42 3 3 3 1 */ 632, /* OBJ_setAttr_T2Enc 2 23 42 3 3 4 1 */ 633, /* OBJ_setAttr_T2cleartxt 2 23 42 3 3 4 2 */ @@ -5558,11 +5526,11 @@ static const unsigned int obj_objs[NUM_OBJ] = { 176, /* OBJ_id_ad 1 3 6 1 5 5 7 48 */ 507, /* OBJ_id_hex_partial_message 1 3 6 1 7 1 1 1 */ 508, /* OBJ_id_hex_multipart_message 1 3 6 1 7 1 1 2 */ - 1305, /* OBJ_rainbowIclassic 1 3 9999 5 1 1 1 */ - 1306, /* OBJ_p256_rainbowIclassic 1 3 9999 5 1 2 1 */ - 1307, /* OBJ_rsa3072_rainbowIclassic 1 3 9999 5 1 3 1 */ - 1308, /* OBJ_rainbowVclassic 1 3 9999 5 3 1 1 */ - 1309, /* OBJ_p521_rainbowVclassic 1 3 9999 5 3 2 1 */ + 1298, /* OBJ_rainbowIclassic 1 3 9999 5 1 1 1 */ + 1299, /* OBJ_p256_rainbowIclassic 1 3 9999 5 1 2 1 */ + 1300, /* OBJ_rsa3072_rainbowIclassic 1 3 9999 5 1 3 1 */ + 1301, /* OBJ_rainbowVclassic 1 3 9999 5 3 1 1 */ + 1302, /* OBJ_p521_rainbowVclassic 1 3 9999 5 3 2 1 */ 57, /* OBJ_netscape 2 16 840 1 113730 */ 754, /* OBJ_camellia_128_ecb 0 3 4401 5 3 1 9 1 */ 766, /* OBJ_camellia_128_ofb128 0 3 4401 5 3 1 9 3 */ @@ -6182,22 +6150,22 @@ static const unsigned int obj_objs[NUM_OBJ] = { 153, /* OBJ_crlBag 1 2 840 113549 1 12 10 1 4 */ 154, /* OBJ_secretBag 1 2 840 113549 1 12 10 1 5 */ 155, /* OBJ_safeContentsBag 1 2 840 113549 1 12 10 1 6 */ - 1280, /* OBJ_dilithium2 1 3 6 1 4 1 2 267 7 4 4 */ - 1283, /* OBJ_dilithium3 1 3 6 1 4 1 2 267 7 6 5 */ - 1285, /* OBJ_dilithium5 1 3 6 1 4 1 2 267 7 8 7 */ - 1287, /* OBJ_dilithium2_aes 1 3 6 1 4 1 2 267 11 4 4 */ - 1290, /* OBJ_dilithium3_aes 1 3 6 1 4 1 2 267 11 6 5 */ - 1292, /* OBJ_dilithium5_aes 1 3 6 1 4 1 2 267 11 8 7 */ + 1273, /* OBJ_dilithium2 1 3 6 1 4 1 2 267 7 4 4 */ + 1276, /* OBJ_dilithium3 1 3 6 1 4 1 2 267 7 6 5 */ + 1278, /* OBJ_dilithium5 1 3 6 1 4 1 2 267 7 8 7 */ + 1280, /* OBJ_dilithium2_aes 1 3 6 1 4 1 2 267 11 4 4 */ + 1283, /* OBJ_dilithium3_aes 1 3 6 1 4 1 2 267 11 6 5 */ + 1285, /* OBJ_dilithium5_aes 1 3 6 1 4 1 2 267 11 8 7 */ 34, /* OBJ_idea_cbc 1 3 6 1 4 1 188 7 1 1 2 */ 955, /* OBJ_jurisdictionLocalityName 1 3 6 1 4 1 311 60 2 1 1 */ 956, /* OBJ_jurisdictionStateOrProvinceName 1 3 6 1 4 1 311 60 2 1 2 */ 957, /* OBJ_jurisdictionCountryName 1 3 6 1 4 1 311 60 2 1 3 */ - 1299, /* OBJ_picnicl1full 1 3 6 1 4 1 311 89 2 1 7 */ - 1300, /* OBJ_p256_picnicl1full 1 3 6 1 4 1 311 89 2 1 8 */ - 1301, /* OBJ_rsa3072_picnicl1full 1 3 6 1 4 1 311 89 2 1 9 */ - 1302, /* OBJ_picnic3l1 1 3 6 1 4 1 311 89 2 1 21 */ - 1303, /* OBJ_p256_picnic3l1 1 3 6 1 4 1 311 89 2 1 22 */ - 1304, /* OBJ_rsa3072_picnic3l1 1 3 6 1 4 1 311 89 2 1 23 */ + 1292, /* OBJ_picnicl1full 1 3 6 1 4 1 311 89 2 1 7 */ + 1293, /* OBJ_p256_picnicl1full 1 3 6 1 4 1 311 89 2 1 8 */ + 1294, /* OBJ_rsa3072_picnicl1full 1 3 6 1 4 1 311 89 2 1 9 */ + 1295, /* OBJ_picnic3l1 1 3 6 1 4 1 311 89 2 1 21 */ + 1296, /* OBJ_p256_picnic3l1 1 3 6 1 4 1 311 89 2 1 22 */ + 1297, /* OBJ_rsa3072_picnic3l1 1 3 6 1 4 1 311 89 2 1 23 */ 1056, /* OBJ_blake2b512 1 3 6 1 4 1 1722 12 2 1 16 */ 1057, /* OBJ_blake2s256 1 3 6 1 4 1 1722 12 2 2 8 */ 1159, /* OBJ_dstu4145be 1 2 804 2 1 1 1 1 3 1 1 1 1 */ diff --git a/crypto/objects/obj_mac.num b/crypto/objects/obj_mac.num index 9d737af87ed42..637e4c2ecd14c 100644 --- a/crypto/objects/obj_mac.num +++ b/crypto/objects/obj_mac.num @@ -1192,152 +1192,142 @@ magma_cfb 1191 magma_mac 1192 hmacWithSHA512_224 1193 hmacWithSHA512_256 1194 -oqs_kem_default 1195 frodo640aes 1196 frodo640shake 1197 frodo976aes 1198 frodo976shake 1199 frodo1344aes 1200 frodo1344shake 1201 -bike1l1cpa 1202 -bike1l3cpa 1203 -kyber512 1204 -kyber768 1205 -kyber1024 1206 -ntru_hps2048509 1207 -ntru_hps2048677 1208 -ntru_hps4096821 1209 -ntru_hrss701 1210 -lightsaber 1211 -saber 1212 -firesaber 1213 -sidhp434 1214 -sidhp503 1215 -sidhp610 1216 -sidhp751 1217 -sikep434 1218 -sikep503 1219 -sikep610 1220 -sikep751 1221 -bike1l1fo 1222 -bike1l3fo 1223 -kyber90s512 1224 -kyber90s768 1225 -kyber90s1024 1226 -hqc128 1227 -hqc192 1228 -hqc256 1229 -ntrulpr653 1230 -ntrulpr761 1231 -ntrulpr857 1232 -sntrup653 1233 -sntrup761 1234 -sntrup857 1235 -p256_oqs_kem_default 1236 -p256_frodo640aes 1237 -p256_frodo640shake 1238 -p256_frodo976aes 1239 -p256_frodo976shake 1240 -p256_frodo1344aes 1241 -p256_frodo1344shake 1242 -p256_bike1l1cpa 1243 -p256_bike1l3cpa 1244 -p256_kyber512 1245 -p256_kyber768 1246 -p256_kyber1024 1247 -p256_ntru_hps2048509 1248 -p256_ntru_hps2048677 1249 -p256_ntru_hps4096821 1250 -p256_ntru_hrss701 1251 -p256_lightsaber 1252 -p256_saber 1253 -p256_firesaber 1254 -p256_sidhp434 1255 -p256_sidhp503 1256 -p256_sidhp610 1257 -p256_sidhp751 1258 -p256_sikep434 1259 -p256_sikep503 1260 -p256_sikep610 1261 -p256_sikep751 1262 -p256_bike1l1fo 1263 -p256_bike1l3fo 1264 -p256_kyber90s512 1265 -p256_kyber90s768 1266 -p256_kyber90s1024 1267 -p256_hqc128 1268 -p256_hqc192 1269 -p256_hqc256 1270 -p256_ntrulpr653 1271 -p256_ntrulpr761 1272 -p256_ntrulpr857 1273 -p256_sntrup653 1274 -p256_sntrup761 1275 -p256_sntrup857 1276 -oqs_sig_default 1277 -p256_oqs_sig_default 1278 -rsa3072_oqs_sig_default 1279 -dilithium2 1280 -p256_dilithium2 1281 -rsa3072_dilithium2 1282 -dilithium3 1283 -p384_dilithium3 1284 -dilithium5 1285 -p521_dilithium5 1286 -dilithium2_aes 1287 -p256_dilithium2_aes 1288 -rsa3072_dilithium2_aes 1289 -dilithium3_aes 1290 -p384_dilithium3_aes 1291 -dilithium5_aes 1292 -p521_dilithium5_aes 1293 -falcon512 1294 -p256_falcon512 1295 -rsa3072_falcon512 1296 -falcon1024 1297 -p521_falcon1024 1298 -picnicl1full 1299 -p256_picnicl1full 1300 -rsa3072_picnicl1full 1301 -picnic3l1 1302 -p256_picnic3l1 1303 -rsa3072_picnic3l1 1304 -rainbowIclassic 1305 -p256_rainbowIclassic 1306 -rsa3072_rainbowIclassic 1307 -rainbowVclassic 1308 -p521_rainbowVclassic 1309 -sphincsharaka128frobust 1310 -p256_sphincsharaka128frobust 1311 -rsa3072_sphincsharaka128frobust 1312 -sphincssha256128frobust 1313 -p256_sphincssha256128frobust 1314 -rsa3072_sphincssha256128frobust 1315 -sphincsshake256128frobust 1316 -p256_sphincsshake256128frobust 1317 -rsa3072_sphincsshake256128frobust 1318 -p384_frodo976aes 1319 -p384_frodo976shake 1320 -p521_frodo1344aes 1321 -p521_frodo1344shake 1322 -p384_bike1l3cpa 1323 -p384_kyber768 1324 -p521_kyber1024 1325 -p384_ntru_hps2048677 1326 -p521_ntru_hps4096821 1327 -p384_ntru_hrss701 1328 -p384_saber 1329 -p521_firesaber 1330 -p384_sidhp610 1331 -p521_sidhp751 1332 -p384_sikep610 1333 -p521_sikep751 1334 -p384_bike1l3fo 1335 -p384_kyber90s768 1336 -p521_kyber90s1024 1337 -p384_hqc192 1338 -p521_hqc256 1339 -p384_ntrulpr761 1340 -p384_ntrulpr857 1341 -p384_sntrup761 1342 -p384_sntrup857 1343 +kyber512 1202 +kyber768 1203 +kyber1024 1204 +ntru_hps2048509 1205 +ntru_hps2048677 1206 +ntru_hps4096821 1207 +ntru_hrss701 1208 +lightsaber 1209 +saber 1210 +firesaber 1211 +sidhp434 1212 +sidhp503 1213 +sidhp610 1214 +sidhp751 1215 +sikep434 1216 +sikep503 1217 +sikep610 1218 +sikep751 1219 +bikel1 1220 +bikel3 1221 +kyber90s512 1222 +kyber90s768 1223 +kyber90s1024 1224 +hqc128 1225 +hqc192 1226 +hqc256 1227 +ntrulpr653 1228 +ntrulpr761 1229 +ntrulpr857 1230 +sntrup653 1231 +sntrup761 1232 +sntrup857 1233 +p256_frodo640aes 1235 +p256_frodo640shake 1236 +p256_frodo976aes 1237 +p256_frodo976shake 1238 +p256_frodo1344aes 1239 +p256_frodo1344shake 1240 +p256_kyber512 1241 +p256_kyber768 1242 +p256_kyber1024 1243 +p256_ntru_hps2048509 1244 +p256_ntru_hps2048677 1245 +p256_ntru_hps4096821 1246 +p256_ntru_hrss701 1247 +p256_lightsaber 1248 +p256_saber 1249 +p256_firesaber 1250 +p256_sidhp434 1251 +p256_sidhp503 1252 +p256_sidhp610 1253 +p256_sidhp751 1254 +p256_sikep434 1255 +p256_sikep503 1256 +p256_sikep610 1257 +p256_sikep751 1258 +p256_bikel1 1259 +p256_bikel3 1260 +p256_kyber90s512 1261 +p256_kyber90s768 1262 +p256_kyber90s1024 1263 +p256_hqc128 1264 +p256_hqc192 1265 +p256_hqc256 1266 +p256_ntrulpr653 1267 +p256_ntrulpr761 1268 +p256_ntrulpr857 1269 +p256_sntrup653 1270 +p256_sntrup761 1271 +p256_sntrup857 1272 +dilithium2 1273 +p256_dilithium2 1274 +rsa3072_dilithium2 1275 +dilithium3 1276 +p384_dilithium3 1277 +dilithium5 1278 +p521_dilithium5 1279 +dilithium2_aes 1280 +p256_dilithium2_aes 1281 +rsa3072_dilithium2_aes 1282 +dilithium3_aes 1283 +p384_dilithium3_aes 1284 +dilithium5_aes 1285 +p521_dilithium5_aes 1286 +falcon512 1287 +p256_falcon512 1288 +rsa3072_falcon512 1289 +falcon1024 1290 +p521_falcon1024 1291 +picnicl1full 1292 +p256_picnicl1full 1293 +rsa3072_picnicl1full 1294 +picnic3l1 1295 +p256_picnic3l1 1296 +rsa3072_picnic3l1 1297 +rainbowIclassic 1298 +p256_rainbowIclassic 1299 +rsa3072_rainbowIclassic 1300 +rainbowVclassic 1301 +p521_rainbowVclassic 1302 +sphincsharaka128frobust 1303 +p256_sphincsharaka128frobust 1304 +rsa3072_sphincsharaka128frobust 1305 +sphincssha256128frobust 1306 +p256_sphincssha256128frobust 1307 +rsa3072_sphincssha256128frobust 1308 +sphincsshake256128frobust 1309 +p256_sphincsshake256128frobust 1310 +rsa3072_sphincsshake256128frobust 1311 +p384_frodo976aes 1312 +p384_frodo976shake 1313 +p521_frodo1344aes 1314 +p521_frodo1344shake 1315 +p384_kyber768 1316 +p521_kyber1024 1317 +p384_ntru_hps2048677 1318 +p521_ntru_hps4096821 1319 +p384_ntru_hrss701 1320 +p384_saber 1321 +p521_firesaber 1322 +p384_sidhp610 1323 +p521_sidhp751 1324 +p384_sikep610 1325 +p521_sikep751 1326 +p384_bikel3 1327 +p384_kyber90s768 1328 +p521_kyber90s1024 1329 +p384_hqc192 1330 +p521_hqc256 1331 +p384_ntrulpr761 1332 +p384_ntrulpr857 1333 +p384_sntrup761 1334 +p384_sntrup857 1335 diff --git a/crypto/objects/obj_xref.h b/crypto/objects/obj_xref.h index de0e638343b10..0613af64d720c 100644 --- a/crypto/objects/obj_xref.h +++ b/crypto/objects/obj_xref.h @@ -79,9 +79,6 @@ static const nid_triple sigoid_srt[] = { {NID_RSA_SHA3_256, NID_sha3_256, NID_rsaEncryption}, {NID_RSA_SHA3_384, NID_sha3_384, NID_rsaEncryption}, {NID_RSA_SHA3_512, NID_sha3_512, NID_rsaEncryption}, - {NID_oqs_sig_default, NID_sha512, NID_oqs_sig_default}, - {NID_p256_oqs_sig_default, NID_sha512, NID_p256_oqs_sig_default}, - {NID_rsa3072_oqs_sig_default, NID_sha512, NID_rsa3072_oqs_sig_default}, {NID_dilithium2, NID_sha512, NID_dilithium2}, {NID_p256_dilithium2, NID_sha512, NID_p256_dilithium2}, {NID_rsa3072_dilithium2, NID_sha512, NID_rsa3072_dilithium2}, @@ -198,9 +195,6 @@ static const nid_triple *const sigoid_srt_xref[] = { &sigoid_srt[84], &sigoid_srt[85], &sigoid_srt[86], - &sigoid_srt[87], - &sigoid_srt[88], - &sigoid_srt[89], &sigoid_srt[16], &sigoid_srt[23], &sigoid_srt[19], diff --git a/crypto/objects/obj_xref.txt b/crypto/objects/obj_xref.txt index ad32d3463faed..8fb805307a2c1 100644 --- a/crypto/objects/obj_xref.txt +++ b/crypto/objects/obj_xref.txt @@ -24,9 +24,6 @@ rsassaPss undef rsaEncryption ED25519 undef ED25519 ED448 undef ED448 ##### OQS_TEMPLATE_FRAGMENT_LIST_OQS_SIGS_START -oqs_sig_default sha512 oqs_sig_default -p256_oqs_sig_default sha512 p256_oqs_sig_default -rsa3072_oqs_sig_default sha512 rsa3072_oqs_sig_default dilithium2 sha512 dilithium2 p256_dilithium2 sha512 p256_dilithium2 rsa3072_dilithium2 sha512 rsa3072_dilithium2 diff --git a/crypto/objects/objects.txt b/crypto/objects/objects.txt index efc1d7962e2b7..51ce0b683d62e 100644 --- a/crypto/objects/objects.txt +++ b/crypto/objects/objects.txt @@ -1677,8 +1677,6 @@ dstu4145le 2 8 : uacurve8 : DSTU curve 8 dstu4145le 2 9 : uacurve9 : DSTU curve 9 ##### OQS_TEMPLATE_FRAGMENT_LIST_KEMS_START - : oqs_kem_default : oqs_kem_default - : p256_oqs_kem_default : p256_oqs_kem_default : frodo640aes : frodo640aes : p256_frodo640aes : p256_frodo640aes : frodo640shake : frodo640shake @@ -1691,10 +1689,6 @@ dstu4145le 2 9 : uacurve9 : DSTU curve 9 : p521_frodo1344aes : p521_frodo1344aes : frodo1344shake : frodo1344shake : p521_frodo1344shake : p521_frodo1344shake - : bike1l1cpa : bike1l1cpa - : p256_bike1l1cpa : p256_bike1l1cpa - : bike1l3cpa : bike1l3cpa - : p384_bike1l3cpa : p384_bike1l3cpa : kyber512 : kyber512 : p256_kyber512 : p256_kyber512 : kyber768 : kyber768 @@ -1731,10 +1725,10 @@ dstu4145le 2 9 : uacurve9 : DSTU curve 9 : p384_sikep610 : p384_sikep610 : sikep751 : sikep751 : p521_sikep751 : p521_sikep751 - : bike1l1fo : bike1l1fo - : p256_bike1l1fo : p256_bike1l1fo - : bike1l3fo : bike1l3fo - : p384_bike1l3fo : p384_bike1l3fo + : bikel1 : bikel1 + : p256_bikel1 : p256_bikel1 + : bikel3 : bikel3 + : p384_bikel3 : p384_bikel3 : kyber90s512 : kyber90s512 : p256_kyber90s512 : p256_kyber90s512 : kyber90s768 : kyber90s768 @@ -1762,9 +1756,6 @@ dstu4145le 2 9 : uacurve9 : DSTU curve 9 ##### OQS_TEMPLATE_FRAGMENT_LIST_KEMS_END ##### OQS_TEMPLATE_FRAGMENT_ASSIGN_SIG_OIDS_START -1 3 9999 1 1 : oqs_sig_default : oqs_sig_default -1 3 9999 1 2 : p256_oqs_sig_default : p256_oqs_sig_default -1 3 9999 1 3 : rsa3072_oqs_sig_default : rsa3072_oqs_sig_default 1 3 6 1 4 1 2 267 7 4 4 : dilithium2 : dilithium2 1 3 9999 2 7 1 : p256_dilithium2 : p256_dilithium2 1 3 9999 2 7 2 : rsa3072_dilithium2 : rsa3072_dilithium2 diff --git a/crypto/x509/x509type.c b/crypto/x509/x509type.c index 1e7525d270280..592e98de68e8e 100644 --- a/crypto/x509/x509type.c +++ b/crypto/x509/x509type.c @@ -48,9 +48,6 @@ int X509_certificate_type(const X509 *x, const EVP_PKEY *pkey) case EVP_PKEY_ED448: case EVP_PKEY_ED25519: ///// OQS_TEMPLATE_FRAGMENT_LIST_SIG_SWITCH_CASES_START - case EVP_PKEY_OQS_SIG_DEFAULT: - case EVP_PKEY_P256_OQS_SIG_DEFAULT: - case EVP_PKEY_RSA3072_OQS_SIG_DEFAULT: case EVP_PKEY_DILITHIUM2: case EVP_PKEY_P256_DILITHIUM2: case EVP_PKEY_RSA3072_DILITHIUM2: diff --git a/fuzz/oids.txt b/fuzz/oids.txt index 28baf4bee0b75..1b3a89cb17b08 100644 --- a/fuzz/oids.txt +++ b/fuzz/oids.txt @@ -1063,9 +1063,6 @@ OBJ_id_tc26_gost_3410_2012_256_paramSetC="\x2A\x85\x03\x07\x01\x02\x01\x01\x03" OBJ_id_tc26_gost_3410_2012_256_paramSetD="\x2A\x85\x03\x07\x01\x02\x01\x01\x04" OBJ_hmacWithSHA512_224="\x2A\x86\x48\x86\xF7\x0D\x02\x0C" OBJ_hmacWithSHA512_256="\x2A\x86\x48\x86\xF7\x0D\x02\x0D" -OBJ_oqs_sig_default="\x2B\xCE\x0F\x01\x01" -OBJ_p256_oqs_sig_default="\x2B\xCE\x0F\x01\x02" -OBJ_rsa3072_oqs_sig_default="\x2B\xCE\x0F\x01\x03" OBJ_dilithium2="\x2B\xCE\x0F\x02\x01" OBJ_p256_dilithium2="\x2B\xCE\x0F\x02\x02" OBJ_rsa3072_dilithium2="\x2B\xCE\x0F\x02\x03" diff --git a/include/crypto/asn1.h b/include/crypto/asn1.h index 40896eee395d7..ba540a08792e6 100644 --- a/include/crypto/asn1.h +++ b/include/crypto/asn1.h @@ -87,9 +87,6 @@ extern const EVP_PKEY_ASN1_METHOD rsa_pss_asn1_meth; extern const EVP_PKEY_ASN1_METHOD siphash_asn1_meth; ///// OQS_TEMPLATE_FRAGMENT_DEFINE_ASN1_METHS_START -extern const EVP_PKEY_ASN1_METHOD oqs_sig_default_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD p256_oqs_sig_default_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD rsa3072_oqs_sig_default_asn1_meth; extern const EVP_PKEY_ASN1_METHOD dilithium2_asn1_meth; extern const EVP_PKEY_ASN1_METHOD p256_dilithium2_asn1_meth; extern const EVP_PKEY_ASN1_METHOD rsa3072_dilithium2_asn1_meth; diff --git a/include/crypto/evp.h b/include/crypto/evp.h index 057e8278ba8d8..1bb2bdc5716cf 100644 --- a/include/crypto/evp.h +++ b/include/crypto/evp.h @@ -113,9 +113,6 @@ extern const EVP_PKEY_METHOD hkdf_pkey_meth; extern const EVP_PKEY_METHOD poly1305_pkey_meth; extern const EVP_PKEY_METHOD siphash_pkey_meth; ///// OQS_TEMPLATE_FRAGMENT_DEFINE_EVP_METHS_START -extern const EVP_PKEY_METHOD oqs_sig_default_pkey_meth; -extern const EVP_PKEY_METHOD p256_oqs_sig_default_pkey_meth; -extern const EVP_PKEY_METHOD rsa3072_oqs_sig_default_pkey_meth; extern const EVP_PKEY_METHOD dilithium2_pkey_meth; extern const EVP_PKEY_METHOD p256_dilithium2_pkey_meth; extern const EVP_PKEY_METHOD rsa3072_dilithium2_pkey_meth; diff --git a/include/openssl/evp.h b/include/openssl/evp.h index 5375528c1b9ba..f0b3e392d84de 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -64,9 +64,6 @@ # define EVP_PKEY_X448 NID_X448 # define EVP_PKEY_ED448 NID_ED448 ///// OQS_TEMPLATE_FRAGMENT_DEFINE_EVP_PKEYS_START -# define EVP_PKEY_OQS_SIG_DEFAULT NID_oqs_sig_default -# define EVP_PKEY_P256_OQS_SIG_DEFAULT NID_p256_oqs_sig_default -# define EVP_PKEY_RSA3072_OQS_SIG_DEFAULT NID_rsa3072_oqs_sig_default # define EVP_PKEY_DILITHIUM2 NID_dilithium2 # define EVP_PKEY_P256_DILITHIUM2 NID_p256_dilithium2 # define EVP_PKEY_RSA3072_DILITHIUM2 NID_rsa3072_dilithium2 @@ -106,10 +103,10 @@ # define EVP_PKEY_SPHINCSSHAKE256128FROBUST NID_sphincsshake256128frobust # define EVP_PKEY_P256_SPHINCSSHAKE256128FROBUST NID_p256_sphincsshake256128frobust # define EVP_PKEY_RSA3072_SPHINCSSHAKE256128FROBUST NID_rsa3072_sphincsshake256128frobust -#define OQS_OPENSSL_SIG_algs_length 42 -#define OQS_OPENSSL_KEM_algs_length 40 -#define IS_OQS_OPENSSL_KEM_NID(a) ((a >= NID_oqs_kem_default) && (a <= NID_p384_sntrup857)) -#define IS_OQS_OPENSSL_SIG_NID(a) ((a >= NID_oqs_sig_default) && (a <= NID_rsa3072_sphincsshake256128frobust)) +#define OQS_OPENSSL_SIG_algs_length 39 +#define OQS_OPENSSL_KEM_algs_length 38 +#define IS_OQS_OPENSSL_KEM_NID(a) ((a >= 0x01FF) && (a <= NID_p384_sntrup857)) +#define IS_OQS_OPENSSL_SIG_NID(a) ((a >= NID_dilithium2) && (a <= NID_rsa3072_sphincsshake256128frobust)) /////// OQS_TEMPLATE_FRAGMENT_DEFINE_EVP_PKEYS_END const char *OQSKEM_options(void); const char *OQSSIG_options(void); diff --git a/include/openssl/obj_mac.h b/include/openssl/obj_mac.h index a47c9a1070632..527871509459f 100644 --- a/include/openssl/obj_mac.h +++ b/include/openssl/obj_mac.h @@ -5197,21 +5197,13 @@ #define NID_uacurve9 1169 #define OBJ_uacurve9 OBJ_dstu4145le,2L,9L -#define SN_oqs_kem_default "oqs_kem_default" -#define LN_oqs_kem_default "oqs_kem_default" -#define NID_oqs_kem_default 1195 - -#define SN_p256_oqs_kem_default "p256_oqs_kem_default" -#define LN_p256_oqs_kem_default "p256_oqs_kem_default" -#define NID_p256_oqs_kem_default 1236 - #define SN_frodo640aes "frodo640aes" #define LN_frodo640aes "frodo640aes" #define NID_frodo640aes 1196 #define SN_p256_frodo640aes "p256_frodo640aes" #define LN_p256_frodo640aes "p256_frodo640aes" -#define NID_p256_frodo640aes 1237 +#define NID_p256_frodo640aes 1235 #define SN_frodo640shake "frodo640shake" #define LN_frodo640shake "frodo640shake" @@ -5219,7 +5211,7 @@ #define SN_p256_frodo640shake "p256_frodo640shake" #define LN_p256_frodo640shake "p256_frodo640shake" -#define NID_p256_frodo640shake 1238 +#define NID_p256_frodo640shake 1236 #define SN_frodo976aes "frodo976aes" #define LN_frodo976aes "frodo976aes" @@ -5227,7 +5219,7 @@ #define SN_p384_frodo976aes "p384_frodo976aes" #define LN_p384_frodo976aes "p384_frodo976aes" -#define NID_p384_frodo976aes 1319 +#define NID_p384_frodo976aes 1312 #define SN_frodo976shake "frodo976shake" #define LN_frodo976shake "frodo976shake" @@ -5235,7 +5227,7 @@ #define SN_p384_frodo976shake "p384_frodo976shake" #define LN_p384_frodo976shake "p384_frodo976shake" -#define NID_p384_frodo976shake 1320 +#define NID_p384_frodo976shake 1313 #define SN_frodo1344aes "frodo1344aes" #define LN_frodo1344aes "frodo1344aes" @@ -5243,7 +5235,7 @@ #define SN_p521_frodo1344aes "p521_frodo1344aes" #define LN_p521_frodo1344aes "p521_frodo1344aes" -#define NID_p521_frodo1344aes 1321 +#define NID_p521_frodo1344aes 1314 #define SN_frodo1344shake "frodo1344shake" #define LN_frodo1344shake "frodo1344shake" @@ -5251,486 +5243,455 @@ #define SN_p521_frodo1344shake "p521_frodo1344shake" #define LN_p521_frodo1344shake "p521_frodo1344shake" -#define NID_p521_frodo1344shake 1322 - -#define SN_bike1l1cpa "bike1l1cpa" -#define LN_bike1l1cpa "bike1l1cpa" -#define NID_bike1l1cpa 1202 - -#define SN_p256_bike1l1cpa "p256_bike1l1cpa" -#define LN_p256_bike1l1cpa "p256_bike1l1cpa" -#define NID_p256_bike1l1cpa 1243 - -#define SN_bike1l3cpa "bike1l3cpa" -#define LN_bike1l3cpa "bike1l3cpa" -#define NID_bike1l3cpa 1203 - -#define SN_p384_bike1l3cpa "p384_bike1l3cpa" -#define LN_p384_bike1l3cpa "p384_bike1l3cpa" -#define NID_p384_bike1l3cpa 1323 +#define NID_p521_frodo1344shake 1315 #define SN_kyber512 "kyber512" #define LN_kyber512 "kyber512" -#define NID_kyber512 1204 +#define NID_kyber512 1202 #define SN_p256_kyber512 "p256_kyber512" #define LN_p256_kyber512 "p256_kyber512" -#define NID_p256_kyber512 1245 +#define NID_p256_kyber512 1241 #define SN_kyber768 "kyber768" #define LN_kyber768 "kyber768" -#define NID_kyber768 1205 +#define NID_kyber768 1203 #define SN_p384_kyber768 "p384_kyber768" #define LN_p384_kyber768 "p384_kyber768" -#define NID_p384_kyber768 1324 +#define NID_p384_kyber768 1316 #define SN_kyber1024 "kyber1024" #define LN_kyber1024 "kyber1024" -#define NID_kyber1024 1206 +#define NID_kyber1024 1204 #define SN_p521_kyber1024 "p521_kyber1024" #define LN_p521_kyber1024 "p521_kyber1024" -#define NID_p521_kyber1024 1325 +#define NID_p521_kyber1024 1317 #define SN_ntru_hps2048509 "ntru_hps2048509" #define LN_ntru_hps2048509 "ntru_hps2048509" -#define NID_ntru_hps2048509 1207 +#define NID_ntru_hps2048509 1205 #define SN_p256_ntru_hps2048509 "p256_ntru_hps2048509" #define LN_p256_ntru_hps2048509 "p256_ntru_hps2048509" -#define NID_p256_ntru_hps2048509 1248 +#define NID_p256_ntru_hps2048509 1244 #define SN_ntru_hps2048677 "ntru_hps2048677" #define LN_ntru_hps2048677 "ntru_hps2048677" -#define NID_ntru_hps2048677 1208 +#define NID_ntru_hps2048677 1206 #define SN_p384_ntru_hps2048677 "p384_ntru_hps2048677" #define LN_p384_ntru_hps2048677 "p384_ntru_hps2048677" -#define NID_p384_ntru_hps2048677 1326 +#define NID_p384_ntru_hps2048677 1318 #define SN_ntru_hps4096821 "ntru_hps4096821" #define LN_ntru_hps4096821 "ntru_hps4096821" -#define NID_ntru_hps4096821 1209 +#define NID_ntru_hps4096821 1207 #define SN_p521_ntru_hps4096821 "p521_ntru_hps4096821" #define LN_p521_ntru_hps4096821 "p521_ntru_hps4096821" -#define NID_p521_ntru_hps4096821 1327 +#define NID_p521_ntru_hps4096821 1319 #define SN_ntru_hrss701 "ntru_hrss701" #define LN_ntru_hrss701 "ntru_hrss701" -#define NID_ntru_hrss701 1210 +#define NID_ntru_hrss701 1208 #define SN_p384_ntru_hrss701 "p384_ntru_hrss701" #define LN_p384_ntru_hrss701 "p384_ntru_hrss701" -#define NID_p384_ntru_hrss701 1328 +#define NID_p384_ntru_hrss701 1320 #define SN_lightsaber "lightsaber" #define LN_lightsaber "lightsaber" -#define NID_lightsaber 1211 +#define NID_lightsaber 1209 #define SN_p256_lightsaber "p256_lightsaber" #define LN_p256_lightsaber "p256_lightsaber" -#define NID_p256_lightsaber 1252 +#define NID_p256_lightsaber 1248 #define SN_saber "saber" #define LN_saber "saber" -#define NID_saber 1212 +#define NID_saber 1210 #define SN_p384_saber "p384_saber" #define LN_p384_saber "p384_saber" -#define NID_p384_saber 1329 +#define NID_p384_saber 1321 #define SN_firesaber "firesaber" #define LN_firesaber "firesaber" -#define NID_firesaber 1213 +#define NID_firesaber 1211 #define SN_p521_firesaber "p521_firesaber" #define LN_p521_firesaber "p521_firesaber" -#define NID_p521_firesaber 1330 +#define NID_p521_firesaber 1322 #define SN_sidhp434 "sidhp434" #define LN_sidhp434 "sidhp434" -#define NID_sidhp434 1214 +#define NID_sidhp434 1212 #define SN_p256_sidhp434 "p256_sidhp434" #define LN_p256_sidhp434 "p256_sidhp434" -#define NID_p256_sidhp434 1255 +#define NID_p256_sidhp434 1251 #define SN_sidhp503 "sidhp503" #define LN_sidhp503 "sidhp503" -#define NID_sidhp503 1215 +#define NID_sidhp503 1213 #define SN_p256_sidhp503 "p256_sidhp503" #define LN_p256_sidhp503 "p256_sidhp503" -#define NID_p256_sidhp503 1256 +#define NID_p256_sidhp503 1252 #define SN_sidhp610 "sidhp610" #define LN_sidhp610 "sidhp610" -#define NID_sidhp610 1216 +#define NID_sidhp610 1214 #define SN_p384_sidhp610 "p384_sidhp610" #define LN_p384_sidhp610 "p384_sidhp610" -#define NID_p384_sidhp610 1331 +#define NID_p384_sidhp610 1323 #define SN_sidhp751 "sidhp751" #define LN_sidhp751 "sidhp751" -#define NID_sidhp751 1217 +#define NID_sidhp751 1215 #define SN_p521_sidhp751 "p521_sidhp751" #define LN_p521_sidhp751 "p521_sidhp751" -#define NID_p521_sidhp751 1332 +#define NID_p521_sidhp751 1324 #define SN_sikep434 "sikep434" #define LN_sikep434 "sikep434" -#define NID_sikep434 1218 +#define NID_sikep434 1216 #define SN_p256_sikep434 "p256_sikep434" #define LN_p256_sikep434 "p256_sikep434" -#define NID_p256_sikep434 1259 +#define NID_p256_sikep434 1255 #define SN_sikep503 "sikep503" #define LN_sikep503 "sikep503" -#define NID_sikep503 1219 +#define NID_sikep503 1217 #define SN_p256_sikep503 "p256_sikep503" #define LN_p256_sikep503 "p256_sikep503" -#define NID_p256_sikep503 1260 +#define NID_p256_sikep503 1256 #define SN_sikep610 "sikep610" #define LN_sikep610 "sikep610" -#define NID_sikep610 1220 +#define NID_sikep610 1218 #define SN_p384_sikep610 "p384_sikep610" #define LN_p384_sikep610 "p384_sikep610" -#define NID_p384_sikep610 1333 +#define NID_p384_sikep610 1325 #define SN_sikep751 "sikep751" #define LN_sikep751 "sikep751" -#define NID_sikep751 1221 +#define NID_sikep751 1219 #define SN_p521_sikep751 "p521_sikep751" #define LN_p521_sikep751 "p521_sikep751" -#define NID_p521_sikep751 1334 +#define NID_p521_sikep751 1326 -#define SN_bike1l1fo "bike1l1fo" -#define LN_bike1l1fo "bike1l1fo" -#define NID_bike1l1fo 1222 +#define SN_bikel1 "bikel1" +#define LN_bikel1 "bikel1" +#define NID_bikel1 1220 -#define SN_p256_bike1l1fo "p256_bike1l1fo" -#define LN_p256_bike1l1fo "p256_bike1l1fo" -#define NID_p256_bike1l1fo 1263 +#define SN_p256_bikel1 "p256_bikel1" +#define LN_p256_bikel1 "p256_bikel1" +#define NID_p256_bikel1 1259 -#define SN_bike1l3fo "bike1l3fo" -#define LN_bike1l3fo "bike1l3fo" -#define NID_bike1l3fo 1223 +#define SN_bikel3 "bikel3" +#define LN_bikel3 "bikel3" +#define NID_bikel3 1221 -#define SN_p384_bike1l3fo "p384_bike1l3fo" -#define LN_p384_bike1l3fo "p384_bike1l3fo" -#define NID_p384_bike1l3fo 1335 +#define SN_p384_bikel3 "p384_bikel3" +#define LN_p384_bikel3 "p384_bikel3" +#define NID_p384_bikel3 1327 #define SN_kyber90s512 "kyber90s512" #define LN_kyber90s512 "kyber90s512" -#define NID_kyber90s512 1224 +#define NID_kyber90s512 1222 #define SN_p256_kyber90s512 "p256_kyber90s512" #define LN_p256_kyber90s512 "p256_kyber90s512" -#define NID_p256_kyber90s512 1265 +#define NID_p256_kyber90s512 1261 #define SN_kyber90s768 "kyber90s768" #define LN_kyber90s768 "kyber90s768" -#define NID_kyber90s768 1225 +#define NID_kyber90s768 1223 #define SN_p384_kyber90s768 "p384_kyber90s768" #define LN_p384_kyber90s768 "p384_kyber90s768" -#define NID_p384_kyber90s768 1336 +#define NID_p384_kyber90s768 1328 #define SN_kyber90s1024 "kyber90s1024" #define LN_kyber90s1024 "kyber90s1024" -#define NID_kyber90s1024 1226 +#define NID_kyber90s1024 1224 #define SN_p521_kyber90s1024 "p521_kyber90s1024" #define LN_p521_kyber90s1024 "p521_kyber90s1024" -#define NID_p521_kyber90s1024 1337 +#define NID_p521_kyber90s1024 1329 #define SN_hqc128 "hqc128" #define LN_hqc128 "hqc128" -#define NID_hqc128 1227 +#define NID_hqc128 1225 #define SN_p256_hqc128 "p256_hqc128" #define LN_p256_hqc128 "p256_hqc128" -#define NID_p256_hqc128 1268 +#define NID_p256_hqc128 1264 #define SN_hqc192 "hqc192" #define LN_hqc192 "hqc192" -#define NID_hqc192 1228 +#define NID_hqc192 1226 #define SN_p384_hqc192 "p384_hqc192" #define LN_p384_hqc192 "p384_hqc192" -#define NID_p384_hqc192 1338 +#define NID_p384_hqc192 1330 #define SN_hqc256 "hqc256" #define LN_hqc256 "hqc256" -#define NID_hqc256 1229 +#define NID_hqc256 1227 #define SN_p521_hqc256 "p521_hqc256" #define LN_p521_hqc256 "p521_hqc256" -#define NID_p521_hqc256 1339 +#define NID_p521_hqc256 1331 #define SN_ntrulpr653 "ntrulpr653" #define LN_ntrulpr653 "ntrulpr653" -#define NID_ntrulpr653 1230 +#define NID_ntrulpr653 1228 #define SN_p256_ntrulpr653 "p256_ntrulpr653" #define LN_p256_ntrulpr653 "p256_ntrulpr653" -#define NID_p256_ntrulpr653 1271 +#define NID_p256_ntrulpr653 1267 #define SN_ntrulpr761 "ntrulpr761" #define LN_ntrulpr761 "ntrulpr761" -#define NID_ntrulpr761 1231 +#define NID_ntrulpr761 1229 #define SN_p384_ntrulpr761 "p384_ntrulpr761" #define LN_p384_ntrulpr761 "p384_ntrulpr761" -#define NID_p384_ntrulpr761 1340 +#define NID_p384_ntrulpr761 1332 #define SN_ntrulpr857 "ntrulpr857" #define LN_ntrulpr857 "ntrulpr857" -#define NID_ntrulpr857 1232 +#define NID_ntrulpr857 1230 #define SN_p384_ntrulpr857 "p384_ntrulpr857" #define LN_p384_ntrulpr857 "p384_ntrulpr857" -#define NID_p384_ntrulpr857 1341 +#define NID_p384_ntrulpr857 1333 #define SN_sntrup653 "sntrup653" #define LN_sntrup653 "sntrup653" -#define NID_sntrup653 1233 +#define NID_sntrup653 1231 #define SN_p256_sntrup653 "p256_sntrup653" #define LN_p256_sntrup653 "p256_sntrup653" -#define NID_p256_sntrup653 1274 +#define NID_p256_sntrup653 1270 #define SN_sntrup761 "sntrup761" #define LN_sntrup761 "sntrup761" -#define NID_sntrup761 1234 +#define NID_sntrup761 1232 #define SN_p384_sntrup761 "p384_sntrup761" #define LN_p384_sntrup761 "p384_sntrup761" -#define NID_p384_sntrup761 1342 +#define NID_p384_sntrup761 1334 #define SN_sntrup857 "sntrup857" #define LN_sntrup857 "sntrup857" -#define NID_sntrup857 1235 +#define NID_sntrup857 1233 #define SN_p384_sntrup857 "p384_sntrup857" #define LN_p384_sntrup857 "p384_sntrup857" -#define NID_p384_sntrup857 1343 - -#define SN_oqs_sig_default "oqs_sig_default" -#define LN_oqs_sig_default "oqs_sig_default" -#define NID_oqs_sig_default 1277 -#define OBJ_oqs_sig_default 1L,3L,9999L,1L,1L - -#define SN_p256_oqs_sig_default "p256_oqs_sig_default" -#define LN_p256_oqs_sig_default "p256_oqs_sig_default" -#define NID_p256_oqs_sig_default 1278 -#define OBJ_p256_oqs_sig_default 1L,3L,9999L,1L,2L - -#define SN_rsa3072_oqs_sig_default "rsa3072_oqs_sig_default" -#define LN_rsa3072_oqs_sig_default "rsa3072_oqs_sig_default" -#define NID_rsa3072_oqs_sig_default 1279 -#define OBJ_rsa3072_oqs_sig_default 1L,3L,9999L,1L,3L +#define NID_p384_sntrup857 1335 #define SN_dilithium2 "dilithium2" #define LN_dilithium2 "dilithium2" -#define NID_dilithium2 1280 +#define NID_dilithium2 1273 #define OBJ_dilithium2 1L,3L,6L,1L,4L,1L,2L,267L,7L,4L,4L #define SN_p256_dilithium2 "p256_dilithium2" #define LN_p256_dilithium2 "p256_dilithium2" -#define NID_p256_dilithium2 1281 +#define NID_p256_dilithium2 1274 #define OBJ_p256_dilithium2 1L,3L,9999L,2L,7L,1L #define SN_rsa3072_dilithium2 "rsa3072_dilithium2" #define LN_rsa3072_dilithium2 "rsa3072_dilithium2" -#define NID_rsa3072_dilithium2 1282 +#define NID_rsa3072_dilithium2 1275 #define OBJ_rsa3072_dilithium2 1L,3L,9999L,2L,7L,2L #define SN_dilithium3 "dilithium3" #define LN_dilithium3 "dilithium3" -#define NID_dilithium3 1283 +#define NID_dilithium3 1276 #define OBJ_dilithium3 1L,3L,6L,1L,4L,1L,2L,267L,7L,6L,5L #define SN_p384_dilithium3 "p384_dilithium3" #define LN_p384_dilithium3 "p384_dilithium3" -#define NID_p384_dilithium3 1284 +#define NID_p384_dilithium3 1277 #define OBJ_p384_dilithium3 1L,3L,9999L,2L,7L,3L #define SN_dilithium5 "dilithium5" #define LN_dilithium5 "dilithium5" -#define NID_dilithium5 1285 +#define NID_dilithium5 1278 #define OBJ_dilithium5 1L,3L,6L,1L,4L,1L,2L,267L,7L,8L,7L #define SN_p521_dilithium5 "p521_dilithium5" #define LN_p521_dilithium5 "p521_dilithium5" -#define NID_p521_dilithium5 1286 +#define NID_p521_dilithium5 1279 #define OBJ_p521_dilithium5 1L,3L,9999L,2L,7L,4L #define SN_dilithium2_aes "dilithium2_aes" #define LN_dilithium2_aes "dilithium2_aes" -#define NID_dilithium2_aes 1287 +#define NID_dilithium2_aes 1280 #define OBJ_dilithium2_aes 1L,3L,6L,1L,4L,1L,2L,267L,11L,4L,4L #define SN_p256_dilithium2_aes "p256_dilithium2_aes" #define LN_p256_dilithium2_aes "p256_dilithium2_aes" -#define NID_p256_dilithium2_aes 1288 +#define NID_p256_dilithium2_aes 1281 #define OBJ_p256_dilithium2_aes 1L,3L,9999L,2L,11L,1L #define SN_rsa3072_dilithium2_aes "rsa3072_dilithium2_aes" #define LN_rsa3072_dilithium2_aes "rsa3072_dilithium2_aes" -#define NID_rsa3072_dilithium2_aes 1289 +#define NID_rsa3072_dilithium2_aes 1282 #define OBJ_rsa3072_dilithium2_aes 1L,3L,9999L,2L,11L,2L #define SN_dilithium3_aes "dilithium3_aes" #define LN_dilithium3_aes "dilithium3_aes" -#define NID_dilithium3_aes 1290 +#define NID_dilithium3_aes 1283 #define OBJ_dilithium3_aes 1L,3L,6L,1L,4L,1L,2L,267L,11L,6L,5L #define SN_p384_dilithium3_aes "p384_dilithium3_aes" #define LN_p384_dilithium3_aes "p384_dilithium3_aes" -#define NID_p384_dilithium3_aes 1291 +#define NID_p384_dilithium3_aes 1284 #define OBJ_p384_dilithium3_aes 1L,3L,9999L,2L,11L,3L #define SN_dilithium5_aes "dilithium5_aes" #define LN_dilithium5_aes "dilithium5_aes" -#define NID_dilithium5_aes 1292 +#define NID_dilithium5_aes 1285 #define OBJ_dilithium5_aes 1L,3L,6L,1L,4L,1L,2L,267L,11L,8L,7L #define SN_p521_dilithium5_aes "p521_dilithium5_aes" #define LN_p521_dilithium5_aes "p521_dilithium5_aes" -#define NID_p521_dilithium5_aes 1293 +#define NID_p521_dilithium5_aes 1286 #define OBJ_p521_dilithium5_aes 1L,3L,9999L,2L,11L,4L #define SN_falcon512 "falcon512" #define LN_falcon512 "falcon512" -#define NID_falcon512 1294 +#define NID_falcon512 1287 #define OBJ_falcon512 1L,3L,9999L,3L,1L #define SN_p256_falcon512 "p256_falcon512" #define LN_p256_falcon512 "p256_falcon512" -#define NID_p256_falcon512 1295 +#define NID_p256_falcon512 1288 #define OBJ_p256_falcon512 1L,3L,9999L,3L,2L #define SN_rsa3072_falcon512 "rsa3072_falcon512" #define LN_rsa3072_falcon512 "rsa3072_falcon512" -#define NID_rsa3072_falcon512 1296 +#define NID_rsa3072_falcon512 1289 #define OBJ_rsa3072_falcon512 1L,3L,9999L,3L,3L #define SN_falcon1024 "falcon1024" #define LN_falcon1024 "falcon1024" -#define NID_falcon1024 1297 +#define NID_falcon1024 1290 #define OBJ_falcon1024 1L,3L,9999L,3L,4L #define SN_p521_falcon1024 "p521_falcon1024" #define LN_p521_falcon1024 "p521_falcon1024" -#define NID_p521_falcon1024 1298 +#define NID_p521_falcon1024 1291 #define OBJ_p521_falcon1024 1L,3L,9999L,3L,5L #define SN_picnicl1full "picnicl1full" #define LN_picnicl1full "picnicl1full" -#define NID_picnicl1full 1299 +#define NID_picnicl1full 1292 #define OBJ_picnicl1full 1L,3L,6L,1L,4L,1L,311L,89L,2L,1L,7L #define SN_p256_picnicl1full "p256_picnicl1full" #define LN_p256_picnicl1full "p256_picnicl1full" -#define NID_p256_picnicl1full 1300 +#define NID_p256_picnicl1full 1293 #define OBJ_p256_picnicl1full 1L,3L,6L,1L,4L,1L,311L,89L,2L,1L,8L #define SN_rsa3072_picnicl1full "rsa3072_picnicl1full" #define LN_rsa3072_picnicl1full "rsa3072_picnicl1full" -#define NID_rsa3072_picnicl1full 1301 +#define NID_rsa3072_picnicl1full 1294 #define OBJ_rsa3072_picnicl1full 1L,3L,6L,1L,4L,1L,311L,89L,2L,1L,9L #define SN_picnic3l1 "picnic3l1" #define LN_picnic3l1 "picnic3l1" -#define NID_picnic3l1 1302 +#define NID_picnic3l1 1295 #define OBJ_picnic3l1 1L,3L,6L,1L,4L,1L,311L,89L,2L,1L,21L #define SN_p256_picnic3l1 "p256_picnic3l1" #define LN_p256_picnic3l1 "p256_picnic3l1" -#define NID_p256_picnic3l1 1303 +#define NID_p256_picnic3l1 1296 #define OBJ_p256_picnic3l1 1L,3L,6L,1L,4L,1L,311L,89L,2L,1L,22L #define SN_rsa3072_picnic3l1 "rsa3072_picnic3l1" #define LN_rsa3072_picnic3l1 "rsa3072_picnic3l1" -#define NID_rsa3072_picnic3l1 1304 +#define NID_rsa3072_picnic3l1 1297 #define OBJ_rsa3072_picnic3l1 1L,3L,6L,1L,4L,1L,311L,89L,2L,1L,23L #define SN_rainbowIclassic "rainbowIclassic" #define LN_rainbowIclassic "rainbowIclassic" -#define NID_rainbowIclassic 1305 +#define NID_rainbowIclassic 1298 #define OBJ_rainbowIclassic 1L,3L,9999L,5L,1L,1L,1L #define SN_p256_rainbowIclassic "p256_rainbowIclassic" #define LN_p256_rainbowIclassic "p256_rainbowIclassic" -#define NID_p256_rainbowIclassic 1306 +#define NID_p256_rainbowIclassic 1299 #define OBJ_p256_rainbowIclassic 1L,3L,9999L,5L,1L,2L,1L #define SN_rsa3072_rainbowIclassic "rsa3072_rainbowIclassic" #define LN_rsa3072_rainbowIclassic "rsa3072_rainbowIclassic" -#define NID_rsa3072_rainbowIclassic 1307 +#define NID_rsa3072_rainbowIclassic 1300 #define OBJ_rsa3072_rainbowIclassic 1L,3L,9999L,5L,1L,3L,1L #define SN_rainbowVclassic "rainbowVclassic" #define LN_rainbowVclassic "rainbowVclassic" -#define NID_rainbowVclassic 1308 +#define NID_rainbowVclassic 1301 #define OBJ_rainbowVclassic 1L,3L,9999L,5L,3L,1L,1L #define SN_p521_rainbowVclassic "p521_rainbowVclassic" #define LN_p521_rainbowVclassic "p521_rainbowVclassic" -#define NID_p521_rainbowVclassic 1309 +#define NID_p521_rainbowVclassic 1302 #define OBJ_p521_rainbowVclassic 1L,3L,9999L,5L,3L,2L,1L #define SN_sphincsharaka128frobust "sphincsharaka128frobust" #define LN_sphincsharaka128frobust "sphincsharaka128frobust" -#define NID_sphincsharaka128frobust 1310 +#define NID_sphincsharaka128frobust 1303 #define OBJ_sphincsharaka128frobust 1L,3L,9999L,6L,1L,1L #define SN_p256_sphincsharaka128frobust "p256_sphincsharaka128frobust" #define LN_p256_sphincsharaka128frobust "p256_sphincsharaka128frobust" -#define NID_p256_sphincsharaka128frobust 1311 +#define NID_p256_sphincsharaka128frobust 1304 #define OBJ_p256_sphincsharaka128frobust 1L,3L,9999L,6L,1L,2L #define SN_rsa3072_sphincsharaka128frobust "rsa3072_sphincsharaka128frobust" #define LN_rsa3072_sphincsharaka128frobust "rsa3072_sphincsharaka128frobust" -#define NID_rsa3072_sphincsharaka128frobust 1312 +#define NID_rsa3072_sphincsharaka128frobust 1305 #define OBJ_rsa3072_sphincsharaka128frobust 1L,3L,9999L,6L,1L,3L #define SN_sphincssha256128frobust "sphincssha256128frobust" #define LN_sphincssha256128frobust "sphincssha256128frobust" -#define NID_sphincssha256128frobust 1313 +#define NID_sphincssha256128frobust 1306 #define OBJ_sphincssha256128frobust 1L,3L,9999L,6L,4L,1L #define SN_p256_sphincssha256128frobust "p256_sphincssha256128frobust" #define LN_p256_sphincssha256128frobust "p256_sphincssha256128frobust" -#define NID_p256_sphincssha256128frobust 1314 +#define NID_p256_sphincssha256128frobust 1307 #define OBJ_p256_sphincssha256128frobust 1L,3L,9999L,6L,4L,2L #define SN_rsa3072_sphincssha256128frobust "rsa3072_sphincssha256128frobust" #define LN_rsa3072_sphincssha256128frobust "rsa3072_sphincssha256128frobust" -#define NID_rsa3072_sphincssha256128frobust 1315 +#define NID_rsa3072_sphincssha256128frobust 1308 #define OBJ_rsa3072_sphincssha256128frobust 1L,3L,9999L,6L,4L,3L #define SN_sphincsshake256128frobust "sphincsshake256128frobust" #define LN_sphincsshake256128frobust "sphincsshake256128frobust" -#define NID_sphincsshake256128frobust 1316 +#define NID_sphincsshake256128frobust 1309 #define OBJ_sphincsshake256128frobust 1L,3L,9999L,6L,7L,1L #define SN_p256_sphincsshake256128frobust "p256_sphincsshake256128frobust" #define LN_p256_sphincsshake256128frobust "p256_sphincsshake256128frobust" -#define NID_p256_sphincsshake256128frobust 1317 +#define NID_p256_sphincsshake256128frobust 1310 #define OBJ_p256_sphincsshake256128frobust 1L,3L,9999L,6L,7L,2L #define SN_rsa3072_sphincsshake256128frobust "rsa3072_sphincsshake256128frobust" #define LN_rsa3072_sphincsshake256128frobust "rsa3072_sphincsshake256128frobust" -#define NID_rsa3072_sphincsshake256128frobust 1318 +#define NID_rsa3072_sphincsshake256128frobust 1311 #define OBJ_rsa3072_sphincsshake256128frobust 1L,3L,9999L,6L,7L,3L diff --git a/oqs-interop-test/README.md b/oqs-interop-test/README.md index 4eedb0848c99a..6dfd9174e345e 100644 --- a/oqs-interop-test/README.md +++ b/oqs-interop-test/README.md @@ -4,7 +4,7 @@ This directory contains tests of interoperability between OQS-OpenSSL and OQS-Bo There are two types of tests: -- The "basic" TLS test suite: This first sets the server signature algorithm to `oqs_sig_default` and establishes a TLS connection for each key-exchange algorithm, and next sets the server key-exchange algorithm to `oqs_kem_default` and establishes a TLS connection for each signature algorithm. +- The "basic" TLS test suite: This first sets the server signature algorithm to `dilithium2` and establishes a TLS connection for each key-exchange algorithm, and next sets the server key-exchange algorithm to `frodo640aes` and establishes a TLS connection for each signature algorithm. - The "full" TLS test suite, which tests TLS connections for all possible pairs of signature and key-exchange algorithms. diff --git a/oqs-interop-test/common.py b/oqs-interop-test/common.py index d5240d35a1f29..0830144eed90d 100644 --- a/oqs-interop-test/common.py +++ b/oqs-interop-test/common.py @@ -12,18 +12,16 @@ OSSL = os.path.join('apps', 'openssl') key_exchanges = [ - 'oqs_kem_default', 'p256_oqs_kem_default', ##### OQS_TEMPLATE_FRAGMENT_KEX_ALGS_START # post-quantum key exchanges - 'frodo640aes','frodo640shake','frodo976aes','frodo976shake','frodo1344aes','frodo1344shake','bike1l1cpa','bike1l3cpa','kyber512','kyber768','kyber1024','ntru_hps2048509','ntru_hps2048677','ntru_hps4096821','ntru_hrss701','lightsaber','saber','firesaber','sidhp434','sidhp503','sidhp610','sidhp751','sikep434','sikep503','sikep610','sikep751','bike1l1fo','bike1l3fo','kyber90s512','kyber90s768','kyber90s1024','hqc128','hqc192','hqc256','ntrulpr653','ntrulpr761','ntrulpr857','sntrup653','sntrup761','sntrup857', + 'frodo640aes','frodo640shake','frodo976aes','frodo976shake','frodo1344aes','frodo1344shake','kyber512','kyber768','kyber1024','ntru_hps2048509','ntru_hps2048677','ntru_hps4096821','ntru_hrss701','lightsaber','saber','firesaber','sidhp434','sidhp503','sidhp610','sidhp751','sikep434','sikep503','sikep610','sikep751','bikel1','bikel3','kyber90s512','kyber90s768','kyber90s1024','hqc128','hqc192','hqc256','ntrulpr653','ntrulpr761','ntrulpr857','sntrup653','sntrup761','sntrup857', # post-quantum + classical key exchanges - 'p256_frodo640aes','p256_frodo640shake','p384_frodo976aes','p384_frodo976shake','p521_frodo1344aes','p521_frodo1344shake','p256_bike1l1cpa','p384_bike1l3cpa','p256_kyber512','p384_kyber768','p521_kyber1024','p256_ntru_hps2048509','p384_ntru_hps2048677','p521_ntru_hps4096821','p384_ntru_hrss701','p256_lightsaber','p384_saber','p521_firesaber','p256_sidhp434','p256_sidhp503','p384_sidhp610','p521_sidhp751','p256_sikep434','p256_sikep503','p384_sikep610','p521_sikep751','p256_bike1l1fo','p384_bike1l3fo','p256_kyber90s512','p384_kyber90s768','p521_kyber90s1024','p256_hqc128','p384_hqc192','p521_hqc256','p256_ntrulpr653','p384_ntrulpr761','p384_ntrulpr857','p256_sntrup653','p384_sntrup761','p384_sntrup857', + 'p256_frodo640aes','p256_frodo640shake','p384_frodo976aes','p384_frodo976shake','p521_frodo1344aes','p521_frodo1344shake','p256_kyber512','p384_kyber768','p521_kyber1024','p256_ntru_hps2048509','p384_ntru_hps2048677','p521_ntru_hps4096821','p384_ntru_hrss701','p256_lightsaber','p384_saber','p521_firesaber','p256_sidhp434','p256_sidhp503','p384_sidhp610','p521_sidhp751','p256_sikep434','p256_sikep503','p384_sikep610','p521_sikep751','p256_bikel1','p384_bikel3','p256_kyber90s512','p384_kyber90s768','p521_kyber90s1024','p256_hqc128','p384_hqc192','p521_hqc256','p256_ntrulpr653','p384_ntrulpr761','p384_ntrulpr857','p256_sntrup653','p384_sntrup761','p384_sntrup857', ##### OQS_TEMPLATE_FRAGMENT_KEX_ALGS_END ] signatures = [ ##### OQS_TEMPLATE_FRAGMENT_PQ_SIG_ALGS_START - 'oqs_sig_default', 'dilithium2', 'dilithium3', 'dilithium5', diff --git a/oqs-interop-test/test_basic.py b/oqs-interop-test/test_basic.py index 76923f0ce2cbe..0c007ff4d6696 100644 --- a/oqs-interop-test/test_basic.py +++ b/oqs-interop-test/test_basic.py @@ -6,7 +6,7 @@ @pytest.fixture() def sig_default_server_port(client_type, test_artifacts_dir, worker_id): - server, server_port = common.start_server(client_type, test_artifacts_dir, "oqs_sig_default", worker_id) + server, server_port = common.start_server(client_type, test_artifacts_dir, "dilithium2", worker_id) # Run tests yield server_port @@ -44,8 +44,8 @@ def test_kex(kex_name, bssl_alg_to_id, test_artifacts_dir, sig_default_server_po '-expect-version', 'TLSv1.3', '-curves', bssl_alg_to_id[kex_name], '-expect-curve-id', bssl_alg_to_id[kex_name], - '-expect-peer-signature-algorithm', bssl_alg_to_id['oqs_sig_default'], - '-expect-peer-cert-file', os.path.join(test_artifacts_dir, '{}_oqs_sig_default_cert_chain'.format(worker_id)), + '-expect-peer-signature-algorithm', bssl_alg_to_id['dilithium2'], + '-expect-peer-cert-file', os.path.join(test_artifacts_dir, '{}_dilithium2_cert_chain'.format(worker_id)), '-verify-fail', '-shim-shuts-down']) @@ -55,18 +55,18 @@ def test_sig(parametrized_sig_server, bssl_alg_to_id, client_type, test_artifact if client_type == "ossl": client_output = common.run_subprocess([common.OSSL, 's_client', - '-groups', 'oqs_kem_default', + '-groups', 'frodo640aes', '-connect', 'localhost:{}'.format(server_port)], input='Q'.encode()) - if not (("Server Temp Key: oqs_kem_default" in client_output) or ("issuer=C = US, O = BoringSSL" in client_output)) : + if not (("Server Temp Key: frodo640aes" in client_output) or ("issuer=C = US, O = BoringSSL" in client_output)) : print(client_output) assert False elif client_type == "bssl": common.run_subprocess([common.BSSL_SHIM, '-port', str(server_port), '-expect-version', 'TLSv1.3', - '-curves', bssl_alg_to_id['oqs_kem_default'], - '-expect-curve-id', bssl_alg_to_id['oqs_kem_default'], + '-curves', bssl_alg_to_id['frodo640aes'], + '-expect-curve-id', bssl_alg_to_id['frodo640aes'], '-expect-peer-signature-algorithm', bssl_alg_to_id[server_sig], '-expect-peer-cert-file', os.path.join(test_artifacts_dir, '{}_{}_cert_chain'.format(worker_id, server_sig)), '-verify-fail', diff --git a/oqs-template/crypto/ec/oqs_meth.c/assign_sig_alg.fragment b/oqs-template/crypto/ec/oqs_meth.c/assign_sig_alg.fragment index 40ceb407efb22..4d43829210eac 100644 --- a/oqs-template/crypto/ec/oqs_meth.c/assign_sig_alg.fragment +++ b/oqs-template/crypto/ec/oqs_meth.c/assign_sig_alg.fragment @@ -7,8 +7,6 @@ return {{ variant['oqs_meth'] }}; {%- endfor %} {%- endfor %} - case NID_oqs_kem_default: - return OQS_KEM_alg_default; {%- for kem in config['kems'] %} case NID_{{ kem['name_group'] }}: {% if kem['bit_security'] == 128 -%} case NID_p256_{{ kem['name_group'] }}: diff --git a/oqs-template/crypto/objects/obj_mac.num/assign_ids.fragment b/oqs-template/crypto/objects/obj_mac.num/assign_ids.fragment index 1940040475cf0..8077f49ef3efb 100644 --- a/oqs-template/crypto/objects/obj_mac.num/assign_ids.fragment +++ b/oqs-template/crypto/objects/obj_mac.num/assign_ids.fragment @@ -1,11 +1,9 @@ {%- set count = namespace(val=1195) -%} -oqs_kem_default {{ count.val }} {% set count.val = count.val + 1 -%} {%- for kem in config['kems'] -%} {{ kem['name_group'] }} {{ count.val }} {% set count.val = count.val + 1 -%} {%- endfor -%} -p256_oqs_kem_default {{ count.val }} {% set count.val = count.val + 1 -%} {%- for kem in config['kems'] -%} p256_{{ kem['name_group'] }} {{ count.val }} diff --git a/oqs-template/crypto/objects/objects.txt/list_kems.fragment b/oqs-template/crypto/objects/objects.txt/list_kems.fragment index 88cf5e06e45b7..de5f17189d5d3 100644 --- a/oqs-template/crypto/objects/objects.txt/list_kems.fragment +++ b/oqs-template/crypto/objects/objects.txt/list_kems.fragment @@ -1,6 +1,4 @@ - : oqs_kem_default : oqs_kem_default - : p256_oqs_kem_default : p256_oqs_kem_default {%- for kem in config['kems'] %} : {{ kem['name_group'] }} : {{ kem['name_group'] }} {% if kem['bit_security'] == 128 -%} : p256_{{ kem['name_group'] }} : p256_{{ kem['name_group'] }} {%- endif -%} diff --git a/oqs-template/generate-oid-nid-table.py b/oqs-template/generate-oid-nid-table.py index ddbce376cffc8..fd0112a8d5d2e 100644 --- a/oqs-template/generate-oid-nid-table.py +++ b/oqs-template/generate-oid-nid-table.py @@ -100,12 +100,16 @@ else: implementation_version = kem_to_impl_version[kem['family']] - table.append([kem['family'], implementation_version, - kem['name_group'], claimed_nist_level, - kem['nid'], ""]) - table.append([kem['family'], implementation_version, - kem['name_group'], claimed_nist_level, - kem['nid_hybrid'], hybrid_elliptic_curve]) + try: + table.append([kem['family'], implementation_version, + kem['name_group'], claimed_nist_level, + kem['nid'], ""]) + table.append([kem['family'], implementation_version, + kem['name_group'], claimed_nist_level, + kem['nid_hybrid'], hybrid_elliptic_curve]) + except KeyError: + # Non-existant NIDs mean this alg is not supported any more + pass if 'extra_nids' in kem: if 'current' in kem['extra_nids']: diff --git a/oqs-template/generate.py b/oqs-template/generate.py index 456aa0b9af43f..292cc5ec64f9f 100644 --- a/oqs-template/generate.py +++ b/oqs-template/generate.py @@ -52,10 +52,19 @@ def populate(filename, config, delimiter, overwrite=False): def load_config(include_disabled_sigs=False): config = file_get_contents(os.path.join('oqs-template', 'generate.yml'), encoding='utf-8') config = yaml.safe_load(config) + + # remove KEMs without NID (old stuff) + newkems = [] + for kem in config['kems']: + if 'nid' in kem: + newkems.append(kem) + config['kems']=newkems + if include_disabled_sigs: return config for sig in config['sigs']: sig['variants'] = [variant for variant in sig['variants'] if variant['enable']] + return config config = load_config() diff --git a/oqs-template/generate.yml b/oqs-template/generate.yml index 553c7d4bc812f..84258991fbd12 100644 --- a/oqs-template/generate.yml +++ b/oqs-template/generate.yml @@ -46,15 +46,25 @@ kems: - family: 'BIKE' name_group: 'bike1l1cpa' - nid: '0x0206' - nid_hybrid: '0x2F06' + extra_nids: + old: + - implementation_version: NIST Round 2 submission + nid: '0x0206' + - implementation_version: NIST Round 2 submission + hybrid_group: secp256_r1 + nid: '0x2F06' oqs_alg: 'OQS_KEM_alg_bike1_l1_cpa' bit_security: 128 - family: 'BIKE' name_group: 'bike1l3cpa' - nid: '0x0207' - nid_hybrid: '0x2F07' + extra_nids: + old: + - implementation_version: NIST Round 2 submission + nid: '0x0207' + - implementation_version: NIST Round 2 submission + hybrid_group: secp384_r1 + nid: '0x2F07' oqs_alg: 'OQS_KEM_alg_bike1_l3_cpa' bit_security: 192 - @@ -203,19 +213,28 @@ kems: - family: 'BIKE' name_group: 'bike1l1fo' - nid: '0x0223' - nid_hybrid: '0x2F23' - oqs_alg: 'OQS_KEM_alg_bike1_l1_fo' - bit_security: 128 extra_nids: - current: - - hybrid_group: "x25519" + old: + - implementation_version: NIST Round 2 submission + nid: '0x0223' + - implementation_version: NIST Round 2 submission + hybrid_group: secp256_r1 + nid: '0x2F23' + - implementation_version: NIST Round 2 submission + hybrid_group: "x25519" nid: '0x2F28' + oqs_alg: 'OQS_KEM_alg_bike1_l1_fo' + bit_security: 128 - family: 'BIKE' name_group: 'bike1l3fo' - nid: '0x0224' - nid_hybrid: '0x2F24' + extra_nids: + old: + - implementation_version: NIST Round 2 submission + nid: '0x0224' + - implementation_version: NIST Round 2 submission + hybrid_group: secp384_r1 + nid: '0x2F24' oqs_alg: 'OQS_KEM_alg_bike1_l3_fo' bit_security: 192 - @@ -224,13 +243,21 @@ kems: implementation_version: '4.1' nid: '0x0238' nid_hybrid: '0x2F38' - oqs_alg: 'OQS_KEM_alg_bike_l1o' + oqs_alg: 'OQS_KEM_alg_bike_l1' bit_security: 128 extra_nids: current: - hybrid_group: "x25519" nid: '0x2F37' implementation_version: '4.1' + - + family: 'BIKE' + name_group: 'bikel3' + implementation_version: '4.1' + nid: '0x023B' + nid_hybrid: '0x2F3B' + oqs_alg: 'OQS_KEM_alg_bike_l3' + bit_security: 192 - family: 'CRYSTALS-Kyber' name_group: 'kyber90s512' @@ -323,28 +350,29 @@ kem_nid_hybrid_end: '0x2FFF' # N.B: For interoperability, code-points and OIDs must match those used in # https://docs.google.com/spreadsheets/d/12YarzaNv3XQNLnvDsWLlRKwtZFhRrDdWf36YlzwrPeg/edit#gid=0 sigs: - - + # - # iso (1) # identified-organization (3) # reserved (9999) # oqs_sig_default (1) - variants: - - - name: 'oqs_sig_default' - pretty_name: 'OQS Default Signature Algorithm' - oqs_meth: 'OQS_SIG_alg_default' - security: 128 - oid: '1.3.9999.1.1' - code_point: '0xfe00' - enable: true - mix_with: [{'name': 'p256', - 'pretty_name': 'ECDSA p256', - 'oid': '1.3.9999.1.2', - 'code_point': '0xfe01'}, - {'name': 'rsa3072', - 'pretty_name': 'RSA3072', - 'oid': '1.3.9999.1.3', - 'code_point': '0xfe02'}] + # disabled + #variants: + # - + # name: 'oqs_sig_default' + # pretty_name: 'OQS Default Signature Algorithm' + # oqs_meth: 'OQS_SIG_alg_default' + # security: 128 + # oid: '1.3.9999.1.1' + # code_point: '0xfe00' + # enable: true + # mix_with: [{'name': 'p256', + # 'pretty_name': 'ECDSA p256', + # 'oid': '1.3.9999.1.2', + # 'code_point': '0xfe01'}, + # {'name': 'rsa3072', + # 'pretty_name': 'RSA3072', + # 'oid': '1.3.9999.1.3', + # 'code_point': '0xfe02'}] - # OID scheme for hybrid variants of Dilithium: # iso (1) diff --git a/oqs-template/include/openssl/evp.h/define_evp_pkeys.fragment b/oqs-template/include/openssl/evp.h/define_evp_pkeys.fragment index 1538ef86fa2c8..b7aa32c3e3701 100644 --- a/oqs-template/include/openssl/evp.h/define_evp_pkeys.fragment +++ b/oqs-template/include/openssl/evp.h/define_evp_pkeys.fragment @@ -21,7 +21,8 @@ {%- else -%} {%- set hybrid_curve = "" -%} {%- endif %} -#define IS_OQS_OPENSSL_KEM_NID(a) ((a >= NID_oqs_kem_default) && (a <= NID_{{ hybrid_curve }}{{ (config['kems'] | last)['name_group'] }})) +#define IS_OQS_OPENSSL_KEM_NID(a) ((a >= 0x01FF) && (a <= NID_{{ hybrid_curve }}{{ (config['kems'] | last)['name_group'] }})) +{%- set first_sig_variant = (config['sigs']|first)['variants']|first %} {%- set last_sig_variant = (config['sigs']|last)['variants']|last %} -#define IS_OQS_OPENSSL_SIG_NID(a) ((a >= NID_oqs_sig_default) && (a <= NID_{{ (last_sig_variant['mix_with']|last)['name'] }}_{{ last_sig_variant['name'] }})) +#define IS_OQS_OPENSSL_SIG_NID(a) ((a >= NID_{{ first_sig_variant['name'] }}) && (a <= NID_{{ (last_sig_variant['mix_with']|last)['name'] }}_{{ last_sig_variant['name'] }})) // diff --git a/oqs-template/oqs-kem-info.md b/oqs-template/oqs-kem-info.md index be9095acc7fb8..5c81f8917b88b 100644 --- a/oqs-template/oqs-kem-info.md +++ b/oqs-template/oqs-kem-info.md @@ -1,17 +1,19 @@ | Family | Implementation Version | Variant | Claimed NIST Level | Code Point | Hybrid Elliptic Curve (if any) | |:---------------|:-------------------------|:----------------|---------------------:|:-------------|:---------------------------------| -| BIKE | 3.2 | bike1l1cpa | 1 | 0x0206 | | -| BIKE | 3.2 | bike1l1cpa | 1 | 0x2F06 | secp256_r1 | -| BIKE | 3.2 | bike1l1fo | 1 | 0x0223 | | -| BIKE | 3.2 | bike1l1fo | 1 | 0x2F23 | secp256_r1 | -| BIKE | 3.2 | bike1l1fo | 1 | 0x2F28 | x25519 | -| BIKE | 3.2 | bike1l3cpa | 3 | 0x0207 | | -| BIKE | 3.2 | bike1l3cpa | 3 | 0x2F07 | secp384_r1 | -| BIKE | 3.2 | bike1l3fo | 3 | 0x0224 | | -| BIKE | 3.2 | bike1l3fo | 3 | 0x2F24 | secp384_r1 | | BIKE | 4.1 | bikel1 | 1 | 0x0238 | | | BIKE | 4.1 | bikel1 | 1 | 0x2F38 | secp256_r1 | | BIKE | 4.1 | bikel1 | 1 | 0x2F37 | x25519 | +| BIKE | 4.1 | bikel3 | 3 | 0x023B | | +| BIKE | 4.1 | bikel3 | 3 | 0x2F3B | secp384_r1 | +| BIKE | NIST Round 2 submission | bike1l1cpa | 1 | 0x0206 | | +| BIKE | NIST Round 2 submission | bike1l1cpa | 1 | 0x2F06 | secp256_r1 | +| BIKE | NIST Round 2 submission | bike1l1fo | 1 | 0x0223 | | +| BIKE | NIST Round 2 submission | bike1l1fo | 1 | 0x2F23 | secp256_r1 | +| BIKE | NIST Round 2 submission | bike1l1fo | 1 | 0x2F28 | x25519 | +| BIKE | NIST Round 2 submission | bike1l3cpa | 3 | 0x0207 | | +| BIKE | NIST Round 2 submission | bike1l3cpa | 3 | 0x2F07 | secp384_r1 | +| BIKE | NIST Round 2 submission | bike1l3fo | 3 | 0x0224 | | +| BIKE | NIST Round 2 submission | bike1l3fo | 3 | 0x2F24 | secp384_r1 | | CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x020F | | | CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x2F3A | secp256_r1 | | CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x2F39 | x25519 | diff --git a/oqs-template/ssl/ssl_local.h/oqs_alg_name.fragment b/oqs-template/ssl/ssl_local.h/oqs_alg_name.fragment index d6d3bf132af76..39b2a671c0bc5 100644 --- a/oqs-template/ssl/ssl_local.h/oqs_alg_name.fragment +++ b/oqs-template/ssl/ssl_local.h/oqs_alg_name.fragment @@ -1,9 +1,8 @@ #define OQS_ALG_NAME(nid) \ - (nid == NID_oqs_kem_default ? OQS_KEM_alg_default : \ {%- for kem in config['kems'] %} (nid == NID_{{ kem['name_group'] }} ? {{ kem['oqs_alg'] }} : \ {%- endfor %} 0 \ - {% for kem in config['kems'] %}){% endfor %}) + {% for kem in config['kems'] %}){% endfor %} diff --git a/oqs-template/ssl/ssl_local.h/oqs_hybrid_kem_nid.fragment b/oqs-template/ssl/ssl_local.h/oqs_hybrid_kem_nid.fragment index 7167301e5c186..44745d5e9cd04 100644 --- a/oqs-template/ssl/ssl_local.h/oqs_hybrid_kem_nid.fragment +++ b/oqs-template/ssl/ssl_local.h/oqs_hybrid_kem_nid.fragment @@ -1,6 +1,5 @@ #define OQS_HYBRID_KEM_NID(curveID) \ - (curveID == 0x2FFF ? NID_p256_oqs_kem_default : \ {%- for kem in config['kems'] %} {% if kem['bit_security'] == 128 -%} (curveID == {{ kem['nid_hybrid'] }} ? NID_p256_{{ kem['name_group'] }} : \ {%- endif -%} {% if kem['bit_security'] == 192 -%} (curveID == {{ kem['nid_hybrid'] }} ? NID_p384_{{ kem['name_group'] }} : \ {%- endif -%} @@ -8,5 +7,5 @@ {%- endfor %} 0 \ - {% for kem in config['kems'] %}){% endfor %}) + {% for kem in config['kems'] %}){% endfor %} diff --git a/oqs-template/ssl/ssl_local.h/oqs_kem_curveid.fragment b/oqs-template/ssl/ssl_local.h/oqs_kem_curveid.fragment index 7594308043714..824f444e429d6 100644 --- a/oqs-template/ssl/ssl_local.h/oqs_kem_curveid.fragment +++ b/oqs-template/ssl/ssl_local.h/oqs_kem_curveid.fragment @@ -1,9 +1,8 @@ #define OQS_KEM_CURVEID(nid) \ - (nid == NID_oqs_kem_default ? 0x01FF : \ {%- for kem in config['kems'] %} (nid == NID_{{ kem['name_group'] }} ? {{ kem['nid'] }} : \ {%- endfor %} 0 \ - {% for kem in config['kems'] %}){% endfor %}) + {% for kem in config['kems'] %}){% endfor %} diff --git a/oqs-template/ssl/ssl_local.h/oqs_kem_hybrid_curveid.fragment b/oqs-template/ssl/ssl_local.h/oqs_kem_hybrid_curveid.fragment index c5515d6d11888..05a4316c71263 100644 --- a/oqs-template/ssl/ssl_local.h/oqs_kem_hybrid_curveid.fragment +++ b/oqs-template/ssl/ssl_local.h/oqs_kem_hybrid_curveid.fragment @@ -1,6 +1,5 @@ #define OQS_KEM_HYBRID_CURVEID(nid) \ - (nid == NID_p256_oqs_kem_default ? 0x2FFF : \ {%- for kem in config['kems'] %} {% if kem['bit_security'] == 128 -%} (nid == NID_p256_{{ kem['name_group'] }} ? {{ kem['nid_hybrid'] }} : \ {%- endif -%} {% if kem['bit_security'] == 192 -%} (nid == NID_p384_{{ kem['name_group'] }} ? {{ kem['nid_hybrid'] }} : \ {%- endif -%} @@ -8,5 +7,5 @@ {%- endfor %} 0 \ - {% for kem in config['kems'] %}){% endfor %}) + {% for kem in config['kems'] %}){% endfor %} diff --git a/oqs-template/ssl/ssl_local.h/oqs_kem_nid.fragment b/oqs-template/ssl/ssl_local.h/oqs_kem_nid.fragment index daf1810a7e61b..ca37274b275b6 100644 --- a/oqs-template/ssl/ssl_local.h/oqs_kem_nid.fragment +++ b/oqs-template/ssl/ssl_local.h/oqs_kem_nid.fragment @@ -1,9 +1,8 @@ #define OQS_KEM_NID(curveID) \ - (curveID == 0x01FF || curveID == 0x2FFF ? NID_oqs_kem_default : \ {%- for kem in config['kems'] %} (curveID == {{ kem['nid'] }} || curveID == {{ kem['nid_hybrid'] }} ? NID_{{ kem['name_group'] }} : \ {%- endfor %} 0 \ - {% for kem in config['kems'] %}){% endfor %}) + {% for kem in config['kems'] %}){% endfor %} diff --git a/oqs-test/README.md b/oqs-test/README.md index 3636be8e9c523..a4592940fc68a 100644 --- a/oqs-test/README.md +++ b/oqs-test/README.md @@ -23,7 +23,7 @@ pip3 install --user pytest pytest-xdist psutil 2. From the project root directory, the following test suites can be executed: -- The "basic" TLS test suite: This first sets the server signature algorithm to `oqs_sig_default` and establishes a TLS connection for each key-exchange algorithm, and then sets the server key-exchange algorithm to `oqs_kem_default` and establishes a TLS connection for each signature algorithm. This can be run by executing the following command: +- The "basic" TLS test suite: This first sets the server signature algorithm to `dilithium2` and establishes a TLS connection for each key-exchange algorithm, and then sets the server key-exchange algorithm to `frodo640aes` and establishes a TLS connection for each signature algorithm. This can be run by executing the following command: ``` python3 -m pytest oqs-test/test_tls_basic.py diff --git a/oqs-test/common.py b/oqs-test/common.py index a33b3483d22e2..66e3425c8bb7b 100644 --- a/oqs-test/common.py +++ b/oqs-test/common.py @@ -5,21 +5,20 @@ import time key_exchanges = [ - 'oqs_kem_default', 'p256_oqs_kem_default', ##### OQS_TEMPLATE_FRAGMENT_KEX_ALGS_START # post-quantum key exchanges - 'frodo640aes','frodo640shake','frodo976aes','frodo976shake','frodo1344aes','frodo1344shake','bike1l1cpa','bike1l3cpa','kyber512','kyber768','kyber1024','ntru_hps2048509','ntru_hps2048677','ntru_hps4096821','ntru_hrss701','lightsaber','saber','firesaber','sidhp434','sidhp503','sidhp610','sidhp751','sikep434','sikep503','sikep610','sikep751','bike1l1fo','bike1l3fo','kyber90s512','kyber90s768','kyber90s1024','hqc128','hqc192','hqc256','ntrulpr653','ntrulpr761','ntrulpr857','sntrup653','sntrup761','sntrup857', + 'frodo640aes','frodo640shake','frodo976aes','frodo976shake','frodo1344aes','frodo1344shake','kyber512','kyber768','kyber1024','ntru_hps2048509','ntru_hps2048677','ntru_hps4096821','ntru_hrss701','lightsaber','saber','firesaber','sidhp434','sidhp503','sidhp610','sidhp751','sikep434','sikep503','sikep610','sikep751','bikel1','bikel3','kyber90s512','kyber90s768','kyber90s1024','hqc128','hqc192','hqc256','ntrulpr653','ntrulpr761','ntrulpr857','sntrup653','sntrup761','sntrup857', # post-quantum + classical key exchanges - 'p256_frodo640aes','p256_frodo640shake','p384_frodo976aes','p384_frodo976shake','p521_frodo1344aes','p521_frodo1344shake','p256_bike1l1cpa','p384_bike1l3cpa','p256_kyber512','p384_kyber768','p521_kyber1024','p256_ntru_hps2048509','p384_ntru_hps2048677','p521_ntru_hps4096821','p384_ntru_hrss701','p256_lightsaber','p384_saber','p521_firesaber','p256_sidhp434','p256_sidhp503','p384_sidhp610','p521_sidhp751','p256_sikep434','p256_sikep503','p384_sikep610','p521_sikep751','p256_bike1l1fo','p384_bike1l3fo','p256_kyber90s512','p384_kyber90s768','p521_kyber90s1024','p256_hqc128','p384_hqc192','p521_hqc256','p256_ntrulpr653','p384_ntrulpr761','p384_ntrulpr857','p256_sntrup653','p384_sntrup761','p384_sntrup857', + 'p256_frodo640aes','p256_frodo640shake','p384_frodo976aes','p384_frodo976shake','p521_frodo1344aes','p521_frodo1344shake','p256_kyber512','p384_kyber768','p521_kyber1024','p256_ntru_hps2048509','p384_ntru_hps2048677','p521_ntru_hps4096821','p384_ntru_hrss701','p256_lightsaber','p384_saber','p521_firesaber','p256_sidhp434','p256_sidhp503','p384_sidhp610','p521_sidhp751','p256_sikep434','p256_sikep503','p384_sikep610','p521_sikep751','p256_bikel1','p384_bikel3','p256_kyber90s512','p384_kyber90s768','p521_kyber90s1024','p256_hqc128','p384_hqc192','p521_hqc256','p256_ntrulpr653','p384_ntrulpr761','p384_ntrulpr857','p256_sntrup653','p384_sntrup761','p384_sntrup857', ##### OQS_TEMPLATE_FRAGMENT_KEX_ALGS_END ] signatures = [ 'ecdsap256', 'rsa3072', ##### OQS_TEMPLATE_FRAGMENT_SIG_ALGS_START # post-quantum signatures - 'oqs_sig_default','dilithium2','dilithium3','dilithium5','dilithium2_aes','dilithium3_aes','dilithium5_aes','falcon512','falcon1024','picnicl1full','picnic3l1','rainbowIclassic','rainbowVclassic','sphincsharaka128frobust','sphincssha256128frobust','sphincsshake256128frobust', + 'dilithium2','dilithium3','dilithium5','dilithium2_aes','dilithium3_aes','dilithium5_aes','falcon512','falcon1024','picnicl1full','picnic3l1','rainbowIclassic','rainbowVclassic','sphincsharaka128frobust','sphincssha256128frobust','sphincsshake256128frobust', # post-quantum + classical signatures - 'p256_oqs_sig_default','rsa3072_oqs_sig_default','p256_dilithium2','rsa3072_dilithium2','p384_dilithium3','p521_dilithium5','p256_dilithium2_aes','rsa3072_dilithium2_aes','p384_dilithium3_aes','p521_dilithium5_aes','p256_falcon512','rsa3072_falcon512','p521_falcon1024','p256_picnicl1full','rsa3072_picnicl1full','p256_picnic3l1','rsa3072_picnic3l1','p256_rainbowIclassic','rsa3072_rainbowIclassic','p521_rainbowVclassic','p256_sphincsharaka128frobust','rsa3072_sphincsharaka128frobust','p256_sphincssha256128frobust','rsa3072_sphincssha256128frobust','p256_sphincsshake256128frobust','rsa3072_sphincsshake256128frobust', + 'p256_dilithium2','rsa3072_dilithium2','p384_dilithium3','p521_dilithium5','p256_dilithium2_aes','rsa3072_dilithium2_aes','p384_dilithium3_aes','p521_dilithium5_aes','p256_falcon512','rsa3072_falcon512','p521_falcon1024','p256_picnicl1full','rsa3072_picnicl1full','p256_picnic3l1','rsa3072_picnic3l1','p256_rainbowIclassic','rsa3072_rainbowIclassic','p521_rainbowVclassic','p256_sphincsharaka128frobust','rsa3072_sphincsharaka128frobust','p256_sphincssha256128frobust','rsa3072_sphincssha256128frobust','p256_sphincsshake256128frobust','rsa3072_sphincsshake256128frobust', ##### OQS_TEMPLATE_FRAGMENT_SIG_ALGS_END ] diff --git a/oqs-test/test_speed.py b/oqs-test/test_speed.py index 5521a43b475f2..db215333081ab 100644 --- a/oqs-test/test_speed.py +++ b/oqs-test/test_speed.py @@ -10,9 +10,8 @@ def test_sig_speed(ossl, ossl_config, test_artifacts_dir, sig_name): common.run_subprocess([ossl, 'speed', '-seconds', '1', sig_name]) # Hybrid KEMs are not integrated to EVP layer yet (issue #59), hence are not -# speed tested: Thus exclude them from testing. Also exclude oqs_kem_default -# as that may be set to a hybrid too -@pytest.mark.parametrize('kem_name', [i for i in common.key_exchanges if not (i.startswith("p256_") or i.startswith("p384_") or i.startswith("p521_") or i == "oqs_kem_default")]) +# speed tested: Thus exclude them from testing. +@pytest.mark.parametrize('kem_name', [i for i in common.key_exchanges if not (i.startswith("p256_") or i.startswith("p384_") or i.startswith("p521_")]) def test_kem_speed(ossl, ossl_config, test_artifacts_dir, kem_name): common.run_subprocess([ossl, 'speed', '-seconds', '1', kem_name]) diff --git a/oqs-test/test_tls_basic.py b/oqs-test/test_tls_basic.py index 431e7f8c8063a..ae60ccfa9e6b6 100644 --- a/oqs-test/test_tls_basic.py +++ b/oqs-test/test_tls_basic.py @@ -6,8 +6,8 @@ @pytest.fixture() def sig_default_server_port(ossl, ossl_config, test_artifacts_dir, worker_id): # Setup: start ossl server - common.gen_keys(ossl, ossl_config, 'oqs_sig_default', test_artifacts_dir, worker_id) - server, port = common.start_server(ossl, test_artifacts_dir, 'oqs_sig_default', worker_id) + common.gen_keys(ossl, ossl_config, 'dilithium2', test_artifacts_dir, worker_id) + server, port = common.start_server(ossl, test_artifacts_dir, 'dilithium2', worker_id) # Run tests yield port # Teardown: stop ossl server @@ -31,7 +31,7 @@ def test_kem(ossl, sig_default_server_port, test_artifacts_dir, kex_name, worker pytest.skip('BIKE not supported in windows') client_output = common.run_subprocess([ossl, 's_client', '-groups', kex_name, - '-CAfile', os.path.join(test_artifacts_dir, '{}_oqs_sig_default_CA.crt'.format(worker_id)), + '-CAfile', os.path.join(test_artifacts_dir, '{}_dilithium2_CA.crt'.format(worker_id)), '-verify_return_error', '-connect', 'localhost:{}'.format(sig_default_server_port)], input='Q'.encode()) @@ -50,12 +50,12 @@ def test_sig(parametrized_sig_server, ossl, test_artifacts_dir, worker_id): server_port = parametrized_sig_server[1] client_output = common.run_subprocess([ossl, 's_client', - '-groups', 'oqs_kem_default', + '-groups', 'frodo640aes', '-CAfile', os.path.join(test_artifacts_dir, '{}_{}_CA.crt'.format(worker_id, server_sig)), '-verify_return_error', '-connect', 'localhost:{}'.format(server_port)], input='Q'.encode()) - if not "Server Temp Key: oqs_kem_default" in client_output: + if not "Server Temp Key: frodo640aes" in client_output: print(client_output) assert False, "Server temp key missing." diff --git a/ssl/ssl_cert_table.h b/ssl/ssl_cert_table.h index 1d74cf3168844..6227c0c3af3be 100644 --- a/ssl/ssl_cert_table.h +++ b/ssl/ssl_cert_table.h @@ -23,9 +23,6 @@ static const SSL_CERT_LOOKUP ssl_cert_info [] = { {EVP_PKEY_ED25519, SSL_aECDSA}, /* SSL_PKEY_ED25519 */ {EVP_PKEY_ED448, SSL_aECDSA}, /* SSL_PKEY_ED448 */ ///// OQS_TEMPLATE_FRAGMENT_GIVE_SSL_CERT_INFO_START - {EVP_PKEY_OQS_SIG_DEFAULT, SSL_aOQS_SIG_DEFAULT}, /* SSL_PKEY_OQS_SIG_DEFAULT */ - {EVP_PKEY_P256_OQS_SIG_DEFAULT, SSL_aP256_OQS_SIG_DEFAULT}, /* SSL_PKEY_P256_OQS_SIG_DEFAULT */ - {EVP_PKEY_RSA3072_OQS_SIG_DEFAULT, SSL_aRSA3072_OQS_SIG_DEFAULT}, /* SSL_PKEY_RSA3072_OQS_SIG_DEFAULT */ {EVP_PKEY_DILITHIUM2, SSL_aDILITHIUM2}, /* SSL_PKEY_DILITHIUM2 */ {EVP_PKEY_P256_DILITHIUM2, SSL_aP256_DILITHIUM2}, /* SSL_PKEY_P256_DILITHIUM2 */ {EVP_PKEY_RSA3072_DILITHIUM2, SSL_aRSA3072_DILITHIUM2}, /* SSL_PKEY_RSA3072_DILITHIUM2 */ diff --git a/ssl/ssl_local.h b/ssl/ssl_local.h index 45ff8b3efcc92..4111626a45981 100644 --- a/ssl/ssl_local.h +++ b/ssl/ssl_local.h @@ -203,90 +203,84 @@ /* GOST R 34.10-2012 signature auth */ # define SSL_aGOST12 0x00000080U ///// OQS_TEMPLATE_FRAGMENT_DEFINE_SIG_MASKS_START -/* OQS Default Signature Algorithm auth */ -#define SSL_aOQS_SIG_DEFAULT 0x00000100U -/* ECDSA p256 - OQS Default Signature Algorithm auth */ -#define SSL_aP256_OQS_SIG_DEFAULT 0x00000200U -/* RSA3072 - OQS Default Signature Algorithm auth */ -#define SSL_aRSA3072_OQS_SIG_DEFAULT 0x00000400U /* Dilithium2 auth */ -#define SSL_aDILITHIUM2 0x00000800U +#define SSL_aDILITHIUM2 0x00000100U /* ECDSA p256 - Dilithium2 auth */ -#define SSL_aP256_DILITHIUM2 0x00001000U +#define SSL_aP256_DILITHIUM2 0x00000200U /* RSA3072 - Dilithium2 auth */ -#define SSL_aRSA3072_DILITHIUM2 0x00002000U +#define SSL_aRSA3072_DILITHIUM2 0x00000400U /* Dilithium3 auth */ -#define SSL_aDILITHIUM3 0x00004000U +#define SSL_aDILITHIUM3 0x00000800U /* ECDSA p384 - Dilithium3 auth */ -#define SSL_aP384_DILITHIUM3 0x00008000U +#define SSL_aP384_DILITHIUM3 0x00001000U /* Dilithium5 auth */ -#define SSL_aDILITHIUM5 0x00010000U +#define SSL_aDILITHIUM5 0x00002000U /* ECDSA p521 - Dilithium5 auth */ -#define SSL_aP521_DILITHIUM5 0x00020000U +#define SSL_aP521_DILITHIUM5 0x00004000U /* Dilithium2_AES auth */ -#define SSL_aDILITHIUM2_AES 0x00040000U +#define SSL_aDILITHIUM2_AES 0x00008000U /* ECDSA p256 - Dilithium2_AES auth */ -#define SSL_aP256_DILITHIUM2_AES 0x00080000U +#define SSL_aP256_DILITHIUM2_AES 0x00010000U /* RSA3072 - Dilithium2_AES auth */ -#define SSL_aRSA3072_DILITHIUM2_AES 0x00100000U +#define SSL_aRSA3072_DILITHIUM2_AES 0x00020000U /* Dilithium3_AES auth */ -#define SSL_aDILITHIUM3_AES 0x00200000U +#define SSL_aDILITHIUM3_AES 0x00040000U /* ECDSA p384 - Dilithium3_AES auth */ -#define SSL_aP384_DILITHIUM3_AES 0x00400000U +#define SSL_aP384_DILITHIUM3_AES 0x00080000U /* Dilithium5_AES auth */ -#define SSL_aDILITHIUM5_AES 0x00800000U +#define SSL_aDILITHIUM5_AES 0x00100000U /* ECDSA p521 - Dilithium5_AES auth */ -#define SSL_aP521_DILITHIUM5_AES 0x01000000U +#define SSL_aP521_DILITHIUM5_AES 0x00200000U /* Falcon-512 auth */ -#define SSL_aFALCON512 0x02000000U +#define SSL_aFALCON512 0x00400000U /* ECDSA p256 - Falcon-512 auth */ -#define SSL_aP256_FALCON512 0x04000000U +#define SSL_aP256_FALCON512 0x00800000U /* RSA3072 - Falcon-512 auth */ -#define SSL_aRSA3072_FALCON512 0x08000000U +#define SSL_aRSA3072_FALCON512 0x01000000U /* Falcon-1024 auth */ -#define SSL_aFALCON1024 0x10000000U +#define SSL_aFALCON1024 0x02000000U /* ECDSA p521 - Falcon-1024 auth */ -#define SSL_aP521_FALCON1024 0x20000000U +#define SSL_aP521_FALCON1024 0x04000000U /* Picnic L1 full auth */ -#define SSL_aPICNICL1FULL 0x40000000U +#define SSL_aPICNICL1FULL 0x08000000U /* ECDSA p256 - Picnic L1 full auth */ -#define SSL_aP256_PICNICL1FULL 0x80000000U +#define SSL_aP256_PICNICL1FULL 0x10000000U /* RSA3072 - Picnic L1 full auth */ -#define SSL_aRSA3072_PICNICL1FULL 0x100000000U +#define SSL_aRSA3072_PICNICL1FULL 0x20000000U /* Picnic3 L1 auth */ -#define SSL_aPICNIC3L1 0x200000000U +#define SSL_aPICNIC3L1 0x40000000U /* ECDSA p256 - Picnic3 L1 auth */ -#define SSL_aP256_PICNIC3L1 0x400000000U +#define SSL_aP256_PICNIC3L1 0x80000000U /* RSA3072 - Picnic3 L1 auth */ -#define SSL_aRSA3072_PICNIC3L1 0x800000000U +#define SSL_aRSA3072_PICNIC3L1 0x100000000U /* Rainbow-I-Classic auth */ -#define SSL_aRAINBOWICLASSIC 0x1000000000U +#define SSL_aRAINBOWICLASSIC 0x200000000U /* ECDSA p256 - Rainbow-I-Classic auth */ -#define SSL_aP256_RAINBOWICLASSIC 0x2000000000U +#define SSL_aP256_RAINBOWICLASSIC 0x400000000U /* RSA3072 - Rainbow-I-Classic auth */ -#define SSL_aRSA3072_RAINBOWICLASSIC 0x4000000000U +#define SSL_aRSA3072_RAINBOWICLASSIC 0x800000000U /* Rainbow-V-Classic auth */ -#define SSL_aRAINBOWVCLASSIC 0x8000000000U +#define SSL_aRAINBOWVCLASSIC 0x1000000000U /* ECDSA p521 - Rainbow-V-Classic auth */ -#define SSL_aP521_RAINBOWVCLASSIC 0x10000000000U +#define SSL_aP521_RAINBOWVCLASSIC 0x2000000000U /* SPHINCS+-Haraka-128f-robust auth */ -#define SSL_aSPHINCSHARAKA128FROBUST 0x20000000000U +#define SSL_aSPHINCSHARAKA128FROBUST 0x4000000000U /* ECDSA p256 - SPHINCS+-Haraka-128f-robust auth */ -#define SSL_aP256_SPHINCSHARAKA128FROBUST 0x40000000000U +#define SSL_aP256_SPHINCSHARAKA128FROBUST 0x8000000000U /* RSA3072 - SPHINCS+-Haraka-128f-robust auth */ -#define SSL_aRSA3072_SPHINCSHARAKA128FROBUST 0x80000000000U +#define SSL_aRSA3072_SPHINCSHARAKA128FROBUST 0x10000000000U /* SPHINCS+-SHA256-128f-robust auth */ -#define SSL_aSPHINCSSHA256128FROBUST 0x100000000000U +#define SSL_aSPHINCSSHA256128FROBUST 0x20000000000U /* ECDSA p256 - SPHINCS+-SHA256-128f-robust auth */ -#define SSL_aP256_SPHINCSSHA256128FROBUST 0x200000000000U +#define SSL_aP256_SPHINCSSHA256128FROBUST 0x40000000000U /* RSA3072 - SPHINCS+-SHA256-128f-robust auth */ -#define SSL_aRSA3072_SPHINCSSHA256128FROBUST 0x400000000000U +#define SSL_aRSA3072_SPHINCSSHA256128FROBUST 0x80000000000U /* SPHINCS+-SHAKE256-128f-robust auth */ -#define SSL_aSPHINCSSHAKE256128FROBUST 0x800000000000U +#define SSL_aSPHINCSSHAKE256128FROBUST 0x100000000000U /* ECDSA p256 - SPHINCS+-SHAKE256-128f-robust auth */ -#define SSL_aP256_SPHINCSSHAKE256128FROBUST 0x1000000000000U +#define SSL_aP256_SPHINCSSHAKE256128FROBUST 0x200000000000U /* RSA3072 - SPHINCS+-SHAKE256-128f-robust auth */ -#define SSL_aRSA3072_SPHINCSSHAKE256128FROBUST 0x2000000000000U +#define SSL_aRSA3072_SPHINCSSHAKE256128FROBUST 0x400000000000U ///// OQS_TEMPLATE_FRAGMENT_DEFINE_SIG_MASKS_END /* Any appropriate signature auth (for TLS 1.3 ciphersuites) */ # define SSL_aANY 0x00000000U @@ -471,50 +465,47 @@ # define SSL_PKEY_ED25519 7 # define SSL_PKEY_ED448 8 ///// OQS_TEMPLATE_FRAGMENT_DEFINE_SSL_PKEYS_START -#define SSL_PKEY_OQS_SIG_DEFAULT 9 -#define SSL_PKEY_P256_OQS_SIG_DEFAULT 10 -#define SSL_PKEY_RSA3072_OQS_SIG_DEFAULT 11 -#define SSL_PKEY_DILITHIUM2 12 -#define SSL_PKEY_P256_DILITHIUM2 13 -#define SSL_PKEY_RSA3072_DILITHIUM2 14 -#define SSL_PKEY_DILITHIUM3 15 -#define SSL_PKEY_P384_DILITHIUM3 16 -#define SSL_PKEY_DILITHIUM5 17 -#define SSL_PKEY_P521_DILITHIUM5 18 -#define SSL_PKEY_DILITHIUM2_AES 19 -#define SSL_PKEY_P256_DILITHIUM2_AES 20 -#define SSL_PKEY_RSA3072_DILITHIUM2_AES 21 -#define SSL_PKEY_DILITHIUM3_AES 22 -#define SSL_PKEY_P384_DILITHIUM3_AES 23 -#define SSL_PKEY_DILITHIUM5_AES 24 -#define SSL_PKEY_P521_DILITHIUM5_AES 25 -#define SSL_PKEY_FALCON512 26 -#define SSL_PKEY_P256_FALCON512 27 -#define SSL_PKEY_RSA3072_FALCON512 28 -#define SSL_PKEY_FALCON1024 29 -#define SSL_PKEY_P521_FALCON1024 30 -#define SSL_PKEY_PICNICL1FULL 31 -#define SSL_PKEY_P256_PICNICL1FULL 32 -#define SSL_PKEY_RSA3072_PICNICL1FULL 33 -#define SSL_PKEY_PICNIC3L1 34 -#define SSL_PKEY_P256_PICNIC3L1 35 -#define SSL_PKEY_RSA3072_PICNIC3L1 36 -#define SSL_PKEY_RAINBOWICLASSIC 37 -#define SSL_PKEY_P256_RAINBOWICLASSIC 38 -#define SSL_PKEY_RSA3072_RAINBOWICLASSIC 39 -#define SSL_PKEY_RAINBOWVCLASSIC 40 -#define SSL_PKEY_P521_RAINBOWVCLASSIC 41 -#define SSL_PKEY_SPHINCSHARAKA128FROBUST 42 -#define SSL_PKEY_P256_SPHINCSHARAKA128FROBUST 43 -#define SSL_PKEY_RSA3072_SPHINCSHARAKA128FROBUST 44 -#define SSL_PKEY_SPHINCSSHA256128FROBUST 45 -#define SSL_PKEY_P256_SPHINCSSHA256128FROBUST 46 -#define SSL_PKEY_RSA3072_SPHINCSSHA256128FROBUST 47 -#define SSL_PKEY_SPHINCSSHAKE256128FROBUST 48 -#define SSL_PKEY_P256_SPHINCSSHAKE256128FROBUST 49 -#define SSL_PKEY_RSA3072_SPHINCSSHAKE256128FROBUST 50 - -#define SSL_PKEY_NUM 51 +#define SSL_PKEY_DILITHIUM2 9 +#define SSL_PKEY_P256_DILITHIUM2 10 +#define SSL_PKEY_RSA3072_DILITHIUM2 11 +#define SSL_PKEY_DILITHIUM3 12 +#define SSL_PKEY_P384_DILITHIUM3 13 +#define SSL_PKEY_DILITHIUM5 14 +#define SSL_PKEY_P521_DILITHIUM5 15 +#define SSL_PKEY_DILITHIUM2_AES 16 +#define SSL_PKEY_P256_DILITHIUM2_AES 17 +#define SSL_PKEY_RSA3072_DILITHIUM2_AES 18 +#define SSL_PKEY_DILITHIUM3_AES 19 +#define SSL_PKEY_P384_DILITHIUM3_AES 20 +#define SSL_PKEY_DILITHIUM5_AES 21 +#define SSL_PKEY_P521_DILITHIUM5_AES 22 +#define SSL_PKEY_FALCON512 23 +#define SSL_PKEY_P256_FALCON512 24 +#define SSL_PKEY_RSA3072_FALCON512 25 +#define SSL_PKEY_FALCON1024 26 +#define SSL_PKEY_P521_FALCON1024 27 +#define SSL_PKEY_PICNICL1FULL 28 +#define SSL_PKEY_P256_PICNICL1FULL 29 +#define SSL_PKEY_RSA3072_PICNICL1FULL 30 +#define SSL_PKEY_PICNIC3L1 31 +#define SSL_PKEY_P256_PICNIC3L1 32 +#define SSL_PKEY_RSA3072_PICNIC3L1 33 +#define SSL_PKEY_RAINBOWICLASSIC 34 +#define SSL_PKEY_P256_RAINBOWICLASSIC 35 +#define SSL_PKEY_RSA3072_RAINBOWICLASSIC 36 +#define SSL_PKEY_RAINBOWVCLASSIC 37 +#define SSL_PKEY_P521_RAINBOWVCLASSIC 38 +#define SSL_PKEY_SPHINCSHARAKA128FROBUST 39 +#define SSL_PKEY_P256_SPHINCSHARAKA128FROBUST 40 +#define SSL_PKEY_RSA3072_SPHINCSHARAKA128FROBUST 41 +#define SSL_PKEY_SPHINCSSHA256128FROBUST 42 +#define SSL_PKEY_P256_SPHINCSSHA256128FROBUST 43 +#define SSL_PKEY_RSA3072_SPHINCSSHA256128FROBUST 44 +#define SSL_PKEY_SPHINCSSHAKE256128FROBUST 45 +#define SSL_PKEY_P256_SPHINCSSHAKE256128FROBUST 46 +#define SSL_PKEY_RSA3072_SPHINCSSHAKE256128FROBUST 47 + +#define SSL_PKEY_NUM 48 ///// OQS_TEMPLATE_FRAGMENT_DEFINE_SSL_PKEYS_END /*- @@ -534,15 +525,12 @@ /* Returns the curve ID for an OQS KEM NID */ ///// OQS_TEMPLATE_FRAGMENT_OQS_KEM_CURVEID_START #define OQS_KEM_CURVEID(nid) \ - (nid == NID_oqs_kem_default ? 0x01FF : \ (nid == NID_frodo640aes ? 0x0200 : \ (nid == NID_frodo640shake ? 0x0201 : \ (nid == NID_frodo976aes ? 0x0202 : \ (nid == NID_frodo976shake ? 0x0203 : \ (nid == NID_frodo1344aes ? 0x0204 : \ (nid == NID_frodo1344shake ? 0x0205 : \ - (nid == NID_bike1l1cpa ? 0x0206 : \ - (nid == NID_bike1l3cpa ? 0x0207 : \ (nid == NID_kyber512 ? 0x020F : \ (nid == NID_kyber768 ? 0x0210 : \ (nid == NID_kyber1024 ? 0x0211 : \ @@ -561,8 +549,8 @@ (nid == NID_sikep503 ? 0x0220 : \ (nid == NID_sikep610 ? 0x0221 : \ (nid == NID_sikep751 ? 0x0222 : \ - (nid == NID_bike1l1fo ? 0x0223 : \ - (nid == NID_bike1l3fo ? 0x0224 : \ + (nid == NID_bikel1 ? 0x0238 : \ + (nid == NID_bikel3 ? 0x023B : \ (nid == NID_kyber90s512 ? 0x0229 : \ (nid == NID_kyber90s768 ? 0x022A : \ (nid == NID_kyber90s1024 ? 0x022B : \ @@ -576,21 +564,18 @@ (nid == NID_sntrup761 ? 0x0233 : \ (nid == NID_sntrup857 ? 0x0234 : \ 0 \ - ))))))))))))))))))))))))))))))))))))))))) + )))))))))))))))))))))))))))))))))))))) ///// OQS_TEMPLATE_FRAGMENT_OQS_KEM_CURVEID_END ///// OQS_TEMPLATE_FRAGMENT_OQS_KEM_HYBRID_CURVEID_START #define OQS_KEM_HYBRID_CURVEID(nid) \ - (nid == NID_p256_oqs_kem_default ? 0x2FFF : \ (nid == NID_p256_frodo640aes ? 0x2F00 : \ (nid == NID_p256_frodo640shake ? 0x2F01 : \ (nid == NID_p384_frodo976aes ? 0x2F02 : \ (nid == NID_p384_frodo976shake ? 0x2F03 : \ (nid == NID_p521_frodo1344aes ? 0x2F04 : \ (nid == NID_p521_frodo1344shake ? 0x2F05 : \ - (nid == NID_p256_bike1l1cpa ? 0x2F06 : \ - (nid == NID_p384_bike1l3cpa ? 0x2F07 : \ - (nid == NID_p256_kyber512 ? 0x2F0F : \ + (nid == NID_p256_kyber512 ? 0x2F3A : \ (nid == NID_p384_kyber768 ? 0x2F10 : \ (nid == NID_p521_kyber1024 ? 0x2F11 : \ (nid == NID_p256_ntru_hps2048509 ? 0x2F14 : \ @@ -608,8 +593,8 @@ (nid == NID_p256_sikep503 ? 0x2F20 : \ (nid == NID_p384_sikep610 ? 0x2F21 : \ (nid == NID_p521_sikep751 ? 0x2F22 : \ - (nid == NID_p256_bike1l1fo ? 0x2F23 : \ - (nid == NID_p384_bike1l3fo ? 0x2F24 : \ + (nid == NID_p256_bikel1 ? 0x2F38 : \ + (nid == NID_p384_bikel3 ? 0x2F3B : \ (nid == NID_p256_kyber90s512 ? 0x2F29 : \ (nid == NID_p384_kyber90s768 ? 0x2F2A : \ (nid == NID_p521_kyber90s1024 ? 0x2F2B : \ @@ -623,22 +608,19 @@ (nid == NID_p384_sntrup761 ? 0x2F33 : \ (nid == NID_p384_sntrup857 ? 0x2F34 : \ 0 \ - ))))))))))))))))))))))))))))))))))))))))) + )))))))))))))))))))))))))))))))))))))) ///// OQS_TEMPLATE_FRAGMENT_OQS_KEM_HYBRID_CURVEID_END /* Returns the non-hybrid OQS KEM NID for a PQ or hybrid curve ID */ ///// OQS_TEMPLATE_FRAGMENT_OQS_KEM_NID_START #define OQS_KEM_NID(curveID) \ - (curveID == 0x01FF || curveID == 0x2FFF ? NID_oqs_kem_default : \ (curveID == 0x0200 || curveID == 0x2F00 ? NID_frodo640aes : \ (curveID == 0x0201 || curveID == 0x2F01 ? NID_frodo640shake : \ (curveID == 0x0202 || curveID == 0x2F02 ? NID_frodo976aes : \ (curveID == 0x0203 || curveID == 0x2F03 ? NID_frodo976shake : \ (curveID == 0x0204 || curveID == 0x2F04 ? NID_frodo1344aes : \ (curveID == 0x0205 || curveID == 0x2F05 ? NID_frodo1344shake : \ - (curveID == 0x0206 || curveID == 0x2F06 ? NID_bike1l1cpa : \ - (curveID == 0x0207 || curveID == 0x2F07 ? NID_bike1l3cpa : \ - (curveID == 0x020F || curveID == 0x2F0F ? NID_kyber512 : \ + (curveID == 0x020F || curveID == 0x2F3A ? NID_kyber512 : \ (curveID == 0x0210 || curveID == 0x2F10 ? NID_kyber768 : \ (curveID == 0x0211 || curveID == 0x2F11 ? NID_kyber1024 : \ (curveID == 0x0214 || curveID == 0x2F14 ? NID_ntru_hps2048509 : \ @@ -656,8 +638,8 @@ (curveID == 0x0220 || curveID == 0x2F20 ? NID_sikep503 : \ (curveID == 0x0221 || curveID == 0x2F21 ? NID_sikep610 : \ (curveID == 0x0222 || curveID == 0x2F22 ? NID_sikep751 : \ - (curveID == 0x0223 || curveID == 0x2F23 ? NID_bike1l1fo : \ - (curveID == 0x0224 || curveID == 0x2F24 ? NID_bike1l3fo : \ + (curveID == 0x0238 || curveID == 0x2F38 ? NID_bikel1 : \ + (curveID == 0x023B || curveID == 0x2F3B ? NID_bikel3 : \ (curveID == 0x0229 || curveID == 0x2F29 ? NID_kyber90s512 : \ (curveID == 0x022A || curveID == 0x2F2A ? NID_kyber90s768 : \ (curveID == 0x022B || curveID == 0x2F2B ? NID_kyber90s1024 : \ @@ -671,22 +653,19 @@ (curveID == 0x0233 || curveID == 0x2F33 ? NID_sntrup761 : \ (curveID == 0x0234 || curveID == 0x2F34 ? NID_sntrup857 : \ 0 \ - ))))))))))))))))))))))))))))))))))))))))) + )))))))))))))))))))))))))))))))))))))) ///// OQS_TEMPLATE_FRAGMENT_OQS_KEM_NID_END /* Returns the hybrid OQS KEM NID for a hybrid curve ID */ ///// OQS_TEMPLATE_FRAGMENT_OQS_HYBRID_KEM_NID_START #define OQS_HYBRID_KEM_NID(curveID) \ - (curveID == 0x2FFF ? NID_p256_oqs_kem_default : \ (curveID == 0x2F00 ? NID_p256_frodo640aes : \ (curveID == 0x2F01 ? NID_p256_frodo640shake : \ (curveID == 0x2F02 ? NID_p384_frodo976aes : \ (curveID == 0x2F03 ? NID_p384_frodo976shake : \ (curveID == 0x2F04 ? NID_p521_frodo1344aes : \ (curveID == 0x2F05 ? NID_p521_frodo1344shake : \ - (curveID == 0x2F06 ? NID_p256_bike1l1cpa : \ - (curveID == 0x2F07 ? NID_p384_bike1l3cpa : \ - (curveID == 0x2F0F ? NID_p256_kyber512 : \ + (curveID == 0x2F3A ? NID_p256_kyber512 : \ (curveID == 0x2F10 ? NID_p384_kyber768 : \ (curveID == 0x2F11 ? NID_p521_kyber1024 : \ (curveID == 0x2F14 ? NID_p256_ntru_hps2048509 : \ @@ -704,8 +683,8 @@ (curveID == 0x2F20 ? NID_p256_sikep503 : \ (curveID == 0x2F21 ? NID_p384_sikep610 : \ (curveID == 0x2F22 ? NID_p521_sikep751 : \ - (curveID == 0x2F23 ? NID_p256_bike1l1fo : \ - (curveID == 0x2F24 ? NID_p384_bike1l3fo : \ + (curveID == 0x2F38 ? NID_p256_bikel1 : \ + (curveID == 0x2F3B ? NID_p384_bikel3 : \ (curveID == 0x2F29 ? NID_p256_kyber90s512 : \ (curveID == 0x2F2A ? NID_p384_kyber90s768 : \ (curveID == 0x2F2B ? NID_p521_kyber90s1024 : \ @@ -719,7 +698,7 @@ (curveID == 0x2F33 ? NID_p384_sntrup761 : \ (curveID == 0x2F34 ? NID_p384_sntrup857 : \ 0 \ - ))))))))))))))))))))))))))))))))))))))))) + )))))))))))))))))))))))))))))))))))))) ///// OQS_TEMPLATE_FRAGMENT_OQS_HYBRID_KEM_NID_END /* Returns true if the curve ID is for an OQS KEM */ @@ -733,15 +712,12 @@ /* Returns the OQS alg ID for OQS API */ ///// OQS_TEMPLATE_FRAGMENT_OQS_ALG_NAME_START #define OQS_ALG_NAME(nid) \ - (nid == NID_oqs_kem_default ? OQS_KEM_alg_default : \ (nid == NID_frodo640aes ? OQS_KEM_alg_frodokem_640_aes : \ (nid == NID_frodo640shake ? OQS_KEM_alg_frodokem_640_shake : \ (nid == NID_frodo976aes ? OQS_KEM_alg_frodokem_976_aes : \ (nid == NID_frodo976shake ? OQS_KEM_alg_frodokem_976_shake : \ (nid == NID_frodo1344aes ? OQS_KEM_alg_frodokem_1344_aes : \ (nid == NID_frodo1344shake ? OQS_KEM_alg_frodokem_1344_shake : \ - (nid == NID_bike1l1cpa ? OQS_KEM_alg_bike1_l1_cpa : \ - (nid == NID_bike1l3cpa ? OQS_KEM_alg_bike1_l3_cpa : \ (nid == NID_kyber512 ? OQS_KEM_alg_kyber_512 : \ (nid == NID_kyber768 ? OQS_KEM_alg_kyber_768 : \ (nid == NID_kyber1024 ? OQS_KEM_alg_kyber_1024 : \ @@ -760,8 +736,8 @@ (nid == NID_sikep503 ? OQS_KEM_alg_sike_p503 : \ (nid == NID_sikep610 ? OQS_KEM_alg_sike_p610 : \ (nid == NID_sikep751 ? OQS_KEM_alg_sike_p751 : \ - (nid == NID_bike1l1fo ? OQS_KEM_alg_bike1_l1_fo : \ - (nid == NID_bike1l3fo ? OQS_KEM_alg_bike1_l3_fo : \ + (nid == NID_bikel1 ? OQS_KEM_alg_bike_l1 : \ + (nid == NID_bikel3 ? OQS_KEM_alg_bike_l3 : \ (nid == NID_kyber90s512 ? OQS_KEM_alg_kyber_512_90s : \ (nid == NID_kyber90s768 ? OQS_KEM_alg_kyber_768_90s : \ (nid == NID_kyber90s1024 ? OQS_KEM_alg_kyber_1024_90s : \ @@ -775,7 +751,7 @@ (nid == NID_sntrup761 ? OQS_KEM_alg_ntruprime_sntrup761 : \ (nid == NID_sntrup857 ? OQS_KEM_alg_ntruprime_sntrup857 : \ 0 \ - ))))))))))))))))))))))))))))))))))))))))) + )))))))))))))))))))))))))))))))))))))) ///// OQS_TEMPLATE_FRAGMENT_OQS_ALG_NAME_END /* Returns the classic curve ID for a given hybrid curve */ @@ -788,9 +764,7 @@ (cid == 0x2F03 ?24: \ (cid == 0x2F04 ?25: \ (cid == 0x2F05 ?25: \ - (cid == 0x2F06 ?23: \ - (cid == 0x2F07 ?24: \ - (cid == 0x2F0F ?23: \ + (cid == 0x2F3A ?23: \ (cid == 0x2F10 ?24: \ (cid == 0x2F11 ?25: \ (cid == 0x2F14 ?23: \ @@ -808,8 +782,8 @@ (cid == 0x2F20 ?23: \ (cid == 0x2F21 ?24: \ (cid == 0x2F22 ?25: \ - (cid == 0x2F23 ?23: \ - (cid == 0x2F24 ?24: \ + (cid == 0x2F38 ?23: \ + (cid == 0x2F3B ?24: \ (cid == 0x2F29 ?23: \ (cid == 0x2F2A ?24: \ (cid == 0x2F2B ?25: \ @@ -823,7 +797,7 @@ (cid == 0x2F33 ?24: \ (cid == 0x2F34 ?24: \ 23 \ - ))))))))))))))))))))))))))))))))))))))))) + ))))))))))))))))))))))))))))))))))))))) ///// OQS_TEMPLATE_FRAGMENT_OQS_MAP_HYBRID_END /* Returns the classical nid for an hybrid alg */ @@ -2488,9 +2462,6 @@ typedef enum downgrade_en { ///// OQS_TEMPLATE_FRAGMENT_DEFINE_SIG_CODE_POINTS_START /* The following are all private use code points */ -#define TLSEXT_SIGALG_oqs_sig_default 0xfe00 -#define TLSEXT_SIGALG_p256_oqs_sig_default 0xfe01 -#define TLSEXT_SIGALG_rsa3072_oqs_sig_default 0xfe02 #define TLSEXT_SIGALG_dilithium2 0xfea0 #define TLSEXT_SIGALG_p256_dilithium2 0xfea1 #define TLSEXT_SIGALG_rsa3072_dilithium2 0xfea2 diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 571d725e66cdd..6e8bd8bfdd910 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -186,7 +186,6 @@ static const TLS_GROUP_INFO nid_list[] = { /* OQS groups. The values are arbitraty, since the TLS spec does not specify values for non finite field and elliptic curve "groups". Security level is classical. */ static const TLS_GROUP_INFO oqs_nid_list[] = { - {NID_oqs_kem_default, 128, TLS_CURVE_CUSTOM}, /* OQS KEM default (0x01FF) */ ///// OQS_TEMPLATE_FRAGMENT_OQS_NID_LIST_START {NID_frodo640aes, 128, TLS_CURVE_CUSTOM}, /* frodo640aes (0x0200) */ {NID_frodo640shake, 128, TLS_CURVE_CUSTOM}, /* frodo640shake (0x0201) */ @@ -194,8 +193,6 @@ static const TLS_GROUP_INFO oqs_nid_list[] = { {NID_frodo976shake, 192, TLS_CURVE_CUSTOM}, /* frodo976shake (0x0203) */ {NID_frodo1344aes, 256, TLS_CURVE_CUSTOM}, /* frodo1344aes (0x0204) */ {NID_frodo1344shake, 256, TLS_CURVE_CUSTOM}, /* frodo1344shake (0x0205) */ - {NID_bike1l1cpa, 128, TLS_CURVE_CUSTOM}, /* bike1l1cpa (0x0206) */ - {NID_bike1l3cpa, 192, TLS_CURVE_CUSTOM}, /* bike1l3cpa (0x0207) */ {NID_kyber512, 128, TLS_CURVE_CUSTOM}, /* kyber512 (0x020F) */ {NID_kyber768, 192, TLS_CURVE_CUSTOM}, /* kyber768 (0x0210) */ {NID_kyber1024, 256, TLS_CURVE_CUSTOM}, /* kyber1024 (0x0211) */ @@ -214,8 +211,8 @@ static const TLS_GROUP_INFO oqs_nid_list[] = { {NID_sikep503, 128, TLS_CURVE_CUSTOM}, /* sikep503 (0x0220) */ {NID_sikep610, 192, TLS_CURVE_CUSTOM}, /* sikep610 (0x0221) */ {NID_sikep751, 256, TLS_CURVE_CUSTOM}, /* sikep751 (0x0222) */ - {NID_bike1l1fo, 128, TLS_CURVE_CUSTOM}, /* bike1l1fo (0x0223) */ - {NID_bike1l3fo, 192, TLS_CURVE_CUSTOM}, /* bike1l3fo (0x0224) */ + {NID_bikel1, 128, TLS_CURVE_CUSTOM}, /* bikel1 (0x0238) */ + {NID_bikel3, 192, TLS_CURVE_CUSTOM}, /* bikel3 (0x023B) */ {NID_kyber90s512, 128, TLS_CURVE_CUSTOM}, /* kyber90s512 (0x0229) */ {NID_kyber90s768, 192, TLS_CURVE_CUSTOM}, /* kyber90s768 (0x022A) */ {NID_kyber90s1024, 256, TLS_CURVE_CUSTOM}, /* kyber90s1024 (0x022B) */ @@ -232,7 +229,6 @@ static const TLS_GROUP_INFO oqs_nid_list[] = { }; /* Hybrid OQS groups. Security level is classical. */ static const TLS_GROUP_INFO oqs_hybrid_nid_list[] = { - {NID_p256_oqs_kem_default, 128, TLS_CURVE_CUSTOM}, /* p256 + OQS KEM default hybrid (0x2FFF) */ ///// OQS_TEMPLATE_FRAGMENT_OQS_NID_LIST_HYBRID_START {NID_p256_frodo640aes, 128, TLS_CURVE_CUSTOM}, /* p256/384/521 + frodo640aes hybrid (0x0200) */ {NID_p256_frodo640shake, 128, TLS_CURVE_CUSTOM}, /* p256/384/521 + frodo640shake hybrid (0x0201) */ @@ -240,8 +236,6 @@ static const TLS_GROUP_INFO oqs_hybrid_nid_list[] = { {NID_p384_frodo976shake, 192, TLS_CURVE_CUSTOM}, /* p256/384/521 + frodo976shake hybrid (0x0203) */ {NID_p521_frodo1344aes, 256, TLS_CURVE_CUSTOM}, /* p256/384/521 + frodo1344aes hybrid (0x0204) */ {NID_p521_frodo1344shake, 256, TLS_CURVE_CUSTOM}, /* p256/384/521 + frodo1344shake hybrid (0x0205) */ - {NID_p256_bike1l1cpa, 128, TLS_CURVE_CUSTOM}, /* p256/384/521 + bike1l1cpa hybrid (0x0206) */ - {NID_p384_bike1l3cpa, 192, TLS_CURVE_CUSTOM}, /* p256/384/521 + bike1l3cpa hybrid (0x0207) */ {NID_p256_kyber512, 128, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber512 hybrid (0x020F) */ {NID_p384_kyber768, 192, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber768 hybrid (0x0210) */ {NID_p521_kyber1024, 256, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber1024 hybrid (0x0211) */ @@ -260,8 +254,8 @@ static const TLS_GROUP_INFO oqs_hybrid_nid_list[] = { {NID_p256_sikep503, 128, TLS_CURVE_CUSTOM}, /* p256/384/521 + sikep503 hybrid (0x0220) */ {NID_p384_sikep610, 192, TLS_CURVE_CUSTOM}, /* p256/384/521 + sikep610 hybrid (0x0221) */ {NID_p521_sikep751, 256, TLS_CURVE_CUSTOM}, /* p256/384/521 + sikep751 hybrid (0x0222) */ - {NID_p256_bike1l1fo, 128, TLS_CURVE_CUSTOM}, /* p256/384/521 + bike1l1fo hybrid (0x0223) */ - {NID_p384_bike1l3fo, 192, TLS_CURVE_CUSTOM}, /* p256/384/521 + bike1l3fo hybrid (0x0224) */ + {NID_p256_bikel1, 128, TLS_CURVE_CUSTOM}, /* p256/384/521 + bikel1 hybrid (0x0238) */ + {NID_p384_bikel3, 192, TLS_CURVE_CUSTOM}, /* p256/384/521 + bikel3 hybrid (0x023B) */ {NID_p256_kyber90s512, 128, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber90s512 hybrid (0x0229) */ {NID_p384_kyber90s768, 192, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber90s768 hybrid (0x022A) */ {NID_p521_kyber90s1024, 256, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber90s1024 hybrid (0x022B) */ @@ -293,15 +287,14 @@ static const uint16_t eccurves_default[] = { ///// OQS_TEMPLATE_FRAGMENT_ECCURVES_DEFAULT_HYBRID_START 0x2F00, /* OQS frodo640aes hybrid */ 0x2F01, /* OQS frodo640shake hybrid */ - 0x2F06, /* OQS bike1l1cpa hybrid */ - 0x2F0F, /* OQS kyber512 hybrid */ + 0x2F3A, /* OQS kyber512 hybrid */ 0x2F14, /* OQS ntru_hps2048509 hybrid */ 0x2F18, /* OQS lightsaber hybrid */ 0x2F1B, /* OQS sidhp434 hybrid */ 0x2F1C, /* OQS sidhp503 hybrid */ 0x2F1F, /* OQS sikep434 hybrid */ 0x2F20, /* OQS sikep503 hybrid */ - 0x2F23, /* OQS bike1l1fo hybrid */ + 0x2F38, /* OQS bikel1 hybrid */ 0x2F29, /* OQS kyber90s512 hybrid */ 0x2F2C, /* OQS hqc128 hybrid */ 0x2F2F, /* OQS ntrulpr653 hybrid */ @@ -320,8 +313,6 @@ static const uint16_t oqs_all_tls13_server_groups[] = { 30, /* X448 (30) */ 25, /* secp521r1 (25) */ 24, /* secp384r1 (24) */ - 0x01FF, /* oqs_kem_default */ - 0x2FFF, /* p256 - oqs_kem_default */ ///// OQS_TEMPLATE_FRAGMENT_ALL_OQS_CURVEIDS_START 0x0200, /* frodo640aes */ 0x2F00, /* OQS frodo640aes hybrid */ @@ -335,12 +326,8 @@ static const uint16_t oqs_all_tls13_server_groups[] = { 0x2F04, /* OQS frodo1344aes hybrid */ 0x0205, /* frodo1344shake */ 0x2F05, /* OQS frodo1344shake hybrid */ - 0x0206, /* bike1l1cpa */ - 0x2F06, /* OQS bike1l1cpa hybrid */ - 0x0207, /* bike1l3cpa */ - 0x2F07, /* OQS bike1l3cpa hybrid */ 0x020F, /* kyber512 */ - 0x2F0F, /* OQS kyber512 hybrid */ + 0x2F3A, /* OQS kyber512 hybrid */ 0x0210, /* kyber768 */ 0x2F10, /* OQS kyber768 hybrid */ 0x0211, /* kyber1024 */ @@ -375,10 +362,10 @@ static const uint16_t oqs_all_tls13_server_groups[] = { 0x2F21, /* OQS sikep610 hybrid */ 0x0222, /* sikep751 */ 0x2F22, /* OQS sikep751 hybrid */ - 0x0223, /* bike1l1fo */ - 0x2F23, /* OQS bike1l1fo hybrid */ - 0x0224, /* bike1l3fo */ - 0x2F24, /* OQS bike1l3fo hybrid */ + 0x0238, /* bikel1 */ + 0x2F38, /* OQS bikel1 hybrid */ + 0x023B, /* bikel3 */ + 0x2F3B, /* OQS bikel3 hybrid */ 0x0229, /* kyber90s512 */ 0x2F29, /* OQS kyber90s512 hybrid */ 0x022A, /* kyber90s768 */ @@ -928,9 +915,6 @@ static const uint16_t tls12_sigalgs[] = { TLSEXT_SIGALG_ed448, #endif ///// OQS_TEMPLATE_FRAGMENT_DEFINE_TLS12_SIGALGS_START - TLSEXT_SIGALG_oqs_sig_default, - TLSEXT_SIGALG_p256_oqs_sig_default, - TLSEXT_SIGALG_rsa3072_oqs_sig_default, TLSEXT_SIGALG_dilithium2, TLSEXT_SIGALG_p256_dilithium2, TLSEXT_SIGALG_rsa3072_dilithium2, @@ -1100,15 +1084,6 @@ static const SIGALG_LOOKUP sigalg_lookup_tbl[] = { NID_undef, NID_undef}, #endif ///// OQS_TEMPLATE_FRAGMENT_POPULATE_SIGALG_TBL_START - {"oqs_sig_default", TLSEXT_SIGALG_oqs_sig_default, - NID_undef, -1, EVP_PKEY_OQS_SIG_DEFAULT, SSL_PKEY_OQS_SIG_DEFAULT, - NID_undef, NID_undef}, - {"p256_oqs_sig_default", TLSEXT_SIGALG_p256_oqs_sig_default, - NID_undef, -1, EVP_PKEY_P256_OQS_SIG_DEFAULT, SSL_PKEY_P256_OQS_SIG_DEFAULT, - NID_undef, NID_undef}, - {"rsa3072_oqs_sig_default", TLSEXT_SIGALG_rsa3072_oqs_sig_default, - NID_undef, -1, EVP_PKEY_RSA3072_OQS_SIG_DEFAULT, SSL_PKEY_RSA3072_OQS_SIG_DEFAULT, - NID_undef, NID_undef}, {"dilithium2", TLSEXT_SIGALG_dilithium2, NID_undef, -1, EVP_PKEY_DILITHIUM2, SSL_PKEY_DILITHIUM2, NID_undef, NID_undef}, @@ -1469,12 +1444,6 @@ static int sigalg_security_bits(const SIGALG_LOOKUP *lu) else if (lu->sigalg == TLSEXT_SIGALG_ed448) secbits = 224; ///// OQS_TEMPLATE_FRAGMENT_MAP_SIGALG_TO_BIT_SECURITY_START - else if(lu->sigalg == TLSEXT_SIGALG_oqs_sig_default) - secbits = 128; - else if(lu->sigalg == TLSEXT_SIGALG_p256_oqs_sig_default) - secbits = 128; - else if(lu->sigalg == TLSEXT_SIGALG_rsa3072_oqs_sig_default) - secbits = 128; else if(lu->sigalg == TLSEXT_SIGALG_dilithium2) secbits = 128; else if(lu->sigalg == TLSEXT_SIGALG_p256_dilithium2) @@ -2971,9 +2940,6 @@ void tls1_set_cert_validity(SSL *s) tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_ED25519); tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_ED448); ///// OQS_TEMPLATE_FRAGMENT_ADD_CERT_CHAIN_CHECKS_START - tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_OQS_SIG_DEFAULT); - tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_P256_OQS_SIG_DEFAULT); - tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_RSA3072_OQS_SIG_DEFAULT); tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_DILITHIUM2); tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_P256_DILITHIUM2); tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_RSA3072_DILITHIUM2); diff --git a/ssl/t1_trce.c b/ssl/t1_trce.c index b5bb62f27fe89..b34e7f7dc9bdf 100644 --- a/ssl/t1_trce.c +++ b/ssl/t1_trce.c @@ -530,7 +530,6 @@ static const ssl_trace_tbl ssl_groups_tbl[] = { /* OQS groups, using private code points. The TLS 1.3 spec only reserves FF and EC ranges for code points; we'll update our values if/when this gets updated for PQC. */ - {OQS_KEM_CURVEID(NID_oqs_kem_default), "OQS KEM default"}, ///// OQS_TEMPLATE_FRAGMENT_SSL_GROUPS_TBL_START {OQS_KEM_CURVEID(NID_frodo640aes), "frodo640aes"}, {OQS_KEM_CURVEID(NID_frodo640shake), "frodo640shake"}, @@ -538,8 +537,6 @@ static const ssl_trace_tbl ssl_groups_tbl[] = { {OQS_KEM_CURVEID(NID_frodo976shake), "frodo976shake"}, {OQS_KEM_CURVEID(NID_frodo1344aes), "frodo1344aes"}, {OQS_KEM_CURVEID(NID_frodo1344shake), "frodo1344shake"}, - {OQS_KEM_CURVEID(NID_bike1l1cpa), "bike1l1cpa"}, - {OQS_KEM_CURVEID(NID_bike1l3cpa), "bike1l3cpa"}, {OQS_KEM_CURVEID(NID_kyber512), "kyber512"}, {OQS_KEM_CURVEID(NID_kyber768), "kyber768"}, {OQS_KEM_CURVEID(NID_kyber1024), "kyber1024"}, @@ -558,8 +555,8 @@ static const ssl_trace_tbl ssl_groups_tbl[] = { {OQS_KEM_CURVEID(NID_sikep503), "sikep503"}, {OQS_KEM_CURVEID(NID_sikep610), "sikep610"}, {OQS_KEM_CURVEID(NID_sikep751), "sikep751"}, - {OQS_KEM_CURVEID(NID_bike1l1fo), "bike1l1fo"}, - {OQS_KEM_CURVEID(NID_bike1l3fo), "bike1l3fo"}, + {OQS_KEM_CURVEID(NID_bikel1), "bikel1"}, + {OQS_KEM_CURVEID(NID_bikel3), "bikel3"}, {OQS_KEM_CURVEID(NID_kyber90s512), "kyber90s512"}, {OQS_KEM_CURVEID(NID_kyber90s768), "kyber90s768"}, {OQS_KEM_CURVEID(NID_kyber90s1024), "kyber90s1024"}, @@ -573,7 +570,6 @@ static const ssl_trace_tbl ssl_groups_tbl[] = { {OQS_KEM_CURVEID(NID_sntrup761), "sntrup761"}, {OQS_KEM_CURVEID(NID_sntrup857), "sntrup857"}, ///// OQS_TEMPLATE_FRAGMENT_SSL_GROUPS_TBL_END - {OQS_KEM_CURVEID(NID_p256_oqs_kem_default), "p256 - OQS KEM default hybrid"}, ///// OQS_TEMPLATE_FRAGMENT_SSL_GROUPS_TBL_HYBRID_START {OQS_KEM_CURVEID(NID_p256_frodo640aes), "p256 - frodo640aes hybrid"}, {OQS_KEM_CURVEID(NID_p256_frodo640shake), "p256 - frodo640shake hybrid"}, @@ -581,8 +577,6 @@ static const ssl_trace_tbl ssl_groups_tbl[] = { {OQS_KEM_CURVEID(NID_p384_frodo976shake), "p384 - frodo976shake hybrid"}, {OQS_KEM_CURVEID(NID_p521_frodo1344aes), "p521 - frodo1344aes hybrid"}, {OQS_KEM_CURVEID(NID_p521_frodo1344shake), "p521 - frodo1344shake hybrid"}, - {OQS_KEM_CURVEID(NID_p256_bike1l1cpa), "p256 - bike1l1cpa hybrid"}, - {OQS_KEM_CURVEID(NID_p384_bike1l3cpa), "p384 - bike1l3cpa hybrid"}, {OQS_KEM_CURVEID(NID_p256_kyber512), "p256 - kyber512 hybrid"}, {OQS_KEM_CURVEID(NID_p384_kyber768), "p384 - kyber768 hybrid"}, {OQS_KEM_CURVEID(NID_p521_kyber1024), "p521 - kyber1024 hybrid"}, @@ -601,8 +595,8 @@ static const ssl_trace_tbl ssl_groups_tbl[] = { {OQS_KEM_CURVEID(NID_p256_sikep503), "p256 - sikep503 hybrid"}, {OQS_KEM_CURVEID(NID_p384_sikep610), "p384 - sikep610 hybrid"}, {OQS_KEM_CURVEID(NID_p521_sikep751), "p521 - sikep751 hybrid"}, - {OQS_KEM_CURVEID(NID_p256_bike1l1fo), "p256 - bike1l1fo hybrid"}, - {OQS_KEM_CURVEID(NID_p384_bike1l3fo), "p384 - bike1l3fo hybrid"}, + {OQS_KEM_CURVEID(NID_p256_bikel1), "p256 - bikel1 hybrid"}, + {OQS_KEM_CURVEID(NID_p384_bikel3), "p384 - bikel3 hybrid"}, {OQS_KEM_CURVEID(NID_p256_kyber90s512), "p256 - kyber90s512 hybrid"}, {OQS_KEM_CURVEID(NID_p384_kyber90s768), "p384 - kyber90s768 hybrid"}, {OQS_KEM_CURVEID(NID_p521_kyber90s1024), "p521 - kyber90s1024 hybrid"}, @@ -662,9 +656,6 @@ static const ssl_trace_tbl ssl_sigalg_tbl[] = { {TLSEXT_SIGALG_gostr34102012_512_gostr34112012_512, "gost2012_512"}, {TLSEXT_SIGALG_gostr34102001_gostr3411, "gost2001_gost94"}, ///// OQS_TEMPLATE_FRAGMENT_POPULATE_SIGALG_TBL_START - {TLSEXT_SIGALG_oqs_sig_default, "oqs_sig_default"}, - {TLSEXT_SIGALG_p256_oqs_sig_default, "p256_oqs_sig_default"}, - {TLSEXT_SIGALG_rsa3072_oqs_sig_default, "rsa3072_oqs_sig_default"}, {TLSEXT_SIGALG_dilithium2, "dilithium2"}, {TLSEXT_SIGALG_p256_dilithium2, "p256_dilithium2"}, {TLSEXT_SIGALG_rsa3072_dilithium2, "rsa3072_dilithium2"}, From c8b60975321e6d0772de2f0bc706327ae9806b31 Mon Sep 17 00:00:00 2001 From: Michael <57787676+baentsch@users.noreply.github.com> Date: Tue, 6 Jul 2021 11:13:02 +0200 Subject: [PATCH 7/9] correct paren error --- oqs-test/test_speed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oqs-test/test_speed.py b/oqs-test/test_speed.py index db215333081ab..98aea81663c7c 100644 --- a/oqs-test/test_speed.py +++ b/oqs-test/test_speed.py @@ -11,7 +11,7 @@ def test_sig_speed(ossl, ossl_config, test_artifacts_dir, sig_name): # Hybrid KEMs are not integrated to EVP layer yet (issue #59), hence are not # speed tested: Thus exclude them from testing. -@pytest.mark.parametrize('kem_name', [i for i in common.key_exchanges if not (i.startswith("p256_") or i.startswith("p384_") or i.startswith("p521_")]) +@pytest.mark.parametrize('kem_name', [i for i in common.key_exchanges if not (i.startswith("p256_") or i.startswith("p384_") or i.startswith("p521_"))]) def test_kem_speed(ossl, ossl_config, test_artifacts_dir, kem_name): common.run_subprocess([ossl, 'speed', '-seconds', '1', kem_name]) From 14e172950248eaa2565916274eb9e0decc28b099 Mon Sep 17 00:00:00 2001 From: Michael <57787676+baentsch@users.noreply.github.com> Date: Wed, 7 Jul 2021 07:45:06 +0200 Subject: [PATCH 8/9] upgraded KyberR3 code points --- apps/s_cb.c | 22 +++++++------- oqs-template/generate.yml | 57 +++++++++++++++++++++++++++++------- oqs-template/oqs-kem-info.md | 32 +++++++++++++------- oqs-template/oqs-sig-info.md | 14 --------- ssl/ssl_local.h | 54 +++++++++++++++++----------------- ssl/t1_lib.c | 48 +++++++++++++++--------------- 6 files changed, 129 insertions(+), 98 deletions(-) diff --git a/apps/s_cb.c b/apps/s_cb.c index ecfe1f43329d8..b2130da26c867 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -483,9 +483,9 @@ static const char* OQS_CURVE_ID_NAME_STR(int id) { case 0x0203: return "frodo976shake"; case 0x0204: return "frodo1344aes"; case 0x0205: return "frodo1344shake"; - case 0x020F: return "kyber512"; - case 0x0210: return "kyber768"; - case 0x0211: return "kyber1024"; + case 0x023A: return "kyber512"; + case 0x023C: return "kyber768"; + case 0x023D: return "kyber1024"; case 0x0214: return "ntru_hps2048509"; case 0x0215: return "ntru_hps2048677"; case 0x0216: return "ntru_hps4096821"; @@ -503,9 +503,9 @@ static const char* OQS_CURVE_ID_NAME_STR(int id) { case 0x0222: return "sikep751"; case 0x0238: return "bikel1"; case 0x023B: return "bikel3"; - case 0x0229: return "kyber90s512"; - case 0x022A: return "kyber90s768"; - case 0x022B: return "kyber90s1024"; + case 0x023E: return "kyber90s512"; + case 0x023F: return "kyber90s768"; + case 0x0240: return "kyber90s1024"; case 0x022C: return "hqc128"; case 0x022D: return "hqc192"; case 0x022E: return "hqc256"; @@ -524,8 +524,8 @@ static const char* OQS_CURVE_ID_NAME_STR(int id) { case 0x2F04: return "p521_frodo1344aes hybrid"; case 0x2F05: return "p521_frodo1344shake hybrid"; case 0x2F3A: return "p256_kyber512 hybrid"; - case 0x2F10: return "p384_kyber768 hybrid"; - case 0x2F11: return "p521_kyber1024 hybrid"; + case 0x2F3C: return "p384_kyber768 hybrid"; + case 0x2F3D: return "p521_kyber1024 hybrid"; case 0x2F14: return "p256_ntru_hps2048509 hybrid"; case 0x2F15: return "p384_ntru_hps2048677 hybrid"; case 0x2F16: return "p521_ntru_hps4096821 hybrid"; @@ -543,9 +543,9 @@ static const char* OQS_CURVE_ID_NAME_STR(int id) { case 0x2F22: return "p521_sikep751 hybrid"; case 0x2F38: return "p256_bikel1 hybrid"; case 0x2F3B: return "p384_bikel3 hybrid"; - case 0x2F29: return "p256_kyber90s512 hybrid"; - case 0x2F2A: return "p384_kyber90s768 hybrid"; - case 0x2F2B: return "p521_kyber90s1024 hybrid"; + case 0x2F3E: return "p256_kyber90s512 hybrid"; + case 0x2F3F: return "p384_kyber90s768 hybrid"; + case 0x2F40: return "p521_kyber90s1024 hybrid"; case 0x2F2C: return "p256_hqc128 hybrid"; case 0x2F2D: return "p384_hqc192 hybrid"; case 0x2F2E: return "p521_hqc256 hybrid"; diff --git a/oqs-template/generate.yml b/oqs-template/generate.yml index 84258991fbd12..d79265eb70743 100644 --- a/oqs-template/generate.yml +++ b/oqs-template/generate.yml @@ -70,7 +70,7 @@ kems: - family: 'CRYSTALS-Kyber' name_group: 'kyber512' - nid: '0x020F' + nid: '0x023A' nid_hybrid: '0x2F3A' oqs_alg: 'OQS_KEM_alg_kyber_512' bit_security: 128 @@ -90,15 +90,29 @@ kems: - family: 'CRYSTALS-Kyber' name_group: 'kyber768' - nid: '0x0210' - nid_hybrid: '0x2F10' + nid: '0x023C' + nid_hybrid: '0x2F3C' + extra_nids: + old: + - implementation_version: NIST Round 2 submission + nid: '0x0210' + - implementation_version: NIST Round 2 submission + hybrid_group: secp384_r1 + nid: '0x2F10' oqs_alg: 'OQS_KEM_alg_kyber_768' bit_security: 192 - family: 'CRYSTALS-Kyber' name_group: 'kyber1024' - nid: '0x0211' - nid_hybrid: '0x2F11' + nid: '0x023D' + nid_hybrid: '0x2F3D' + extra_nids: + old: + - implementation_version: NIST Round 2 submission + nid: '0x0211' + - implementation_version: NIST Round 2 submission + hybrid_group: secp521_r1 + nid: '0x2F11' oqs_alg: 'OQS_KEM_alg_kyber_1024' bit_security: 256 - @@ -261,22 +275,43 @@ kems: - family: 'CRYSTALS-Kyber' name_group: 'kyber90s512' - nid: '0x0229' - nid_hybrid: '0x2F29' + nid: '0x023E' + nid_hybrid: '0x2F3E' + extra_nids: + old: + - implementation_version: NIST Round 2 submission + nid: '0x0229' + - implementation_version: NIST Round 2 submission + hybrid_group: secp256_r1 + nid: '0x2F29' oqs_alg: 'OQS_KEM_alg_kyber_512_90s' bit_security: 128 - family: 'CRYSTALS-Kyber' name_group: 'kyber90s768' - nid: '0x022A' - nid_hybrid: '0x2F2A' + nid: '0x023F' + nid_hybrid: '0x2F3F' + extra_nids: + old: + - implementation_version: NIST Round 2 submission + nid: '0x022A' + - implementation_version: NIST Round 2 submission + hybrid_group: secp384_r1 + nid: '0x2F2A' oqs_alg: 'OQS_KEM_alg_kyber_768_90s' bit_security: 192 - family: 'CRYSTALS-Kyber' name_group: 'kyber90s1024' - nid: '0x022B' - nid_hybrid: '0x2F2B' + nid: '0x0240' + nid_hybrid: '0x2F40' + extra_nids: + old: + - implementation_version: NIST Round 2 submission + nid: '0x022B' + - implementation_version: NIST Round 2 submission + hybrid_group: secp521_r1 + nid: '0x2F2B' oqs_alg: 'OQS_KEM_alg_kyber_1024_90s' bit_security: 256 - diff --git a/oqs-template/oqs-kem-info.md b/oqs-template/oqs-kem-info.md index 5c81f8917b88b..915166baac733 100644 --- a/oqs-template/oqs-kem-info.md +++ b/oqs-template/oqs-kem-info.md @@ -14,22 +14,32 @@ | BIKE | NIST Round 2 submission | bike1l3cpa | 3 | 0x2F07 | secp384_r1 | | BIKE | NIST Round 2 submission | bike1l3fo | 3 | 0x0224 | | | BIKE | NIST Round 2 submission | bike1l3fo | 3 | 0x2F24 | secp384_r1 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x020F | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x023A | | | CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x2F3A | secp256_r1 | | CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 1 | 0x2F39 | x25519 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 1 | 0x0229 | | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 1 | 0x2F29 | secp256_r1 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 0x0210 | | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 0x2F10 | secp384_r1 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s768 | 3 | 0x022A | | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s768 | 3 | 0x2F2A | secp384_r1 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber1024 | 5 | 0x0211 | | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber1024 | 5 | 0x2F11 | secp521_r1 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s1024 | 5 | 0x022B | | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s1024 | 5 | 0x2F2B | secp521_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 1 | 0x023E | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 1 | 0x2F3E | secp256_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 0x023C | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 0x2F3C | secp384_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s768 | 3 | 0x023F | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s768 | 3 | 0x2F3F | secp384_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber1024 | 5 | 0x023D | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber1024 | 5 | 0x2F3D | secp521_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s1024 | 5 | 0x0240 | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s1024 | 5 | 0x2F40 | secp521_r1 | | CRYSTALS-Kyber | NIST Round 2 submission | kyber512 | 1 | 0x020F | | | CRYSTALS-Kyber | NIST Round 2 submission | kyber512 | 1 | 0x2F0F | secp256_r1 | | CRYSTALS-Kyber | NIST Round 2 submission | kyber512 | 1 | 0x2F26 | x25519 | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s512 | 1 | 0x0229 | | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s512 | 1 | 0x2F29 | secp256_r1 | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber768 | 3 | 0x0210 | | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber768 | 3 | 0x2F10 | secp384_r1 | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s768 | 3 | 0x022A | | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s768 | 3 | 0x2F2A | secp384_r1 | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber1024 | 5 | 0x0211 | | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber1024 | 5 | 0x2F11 | secp521_r1 | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s1024 | 5 | 0x022B | | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s1024 | 5 | 0x2F2B | secp521_r1 | | FrodoKEM | NIST Round 3 submission | frodo640aes | 1 | 0x0200 | | | FrodoKEM | NIST Round 3 submission | frodo640aes | 1 | 0x2F00 | secp256_r1 | | FrodoKEM | NIST Round 3 submission | frodo640shake | 1 | 0x0201 | | diff --git a/oqs-template/oqs-sig-info.md b/oqs-template/oqs-sig-info.md index 5f756704a592a..554fcf081f630 100644 --- a/oqs-template/oqs-sig-info.md +++ b/oqs-template/oqs-sig-info.md @@ -1,19 +1,5 @@ | Algorithm | Implementation Version | Claimed NIST Level | Code Point | OID | |:--------------------------------------------------|:-------------------------|---------------------:|:-------------|:--------------------------| -| dilithium2 | 3.1 | 1 | 0xfea0 | 1.3.6.1.4.1.2.267.7.4.4 | -| dilithium2 **hybrid with** p256 | 3.1 | 1 | 0xfea1 | 1.3.9999.2.7.1 | -| dilithium2 **hybrid with** rsa3072 | 3.1 | 1 | 0xfea2 | 1.3.9999.2.7.2 | -| dilithium3 | 3.1 | 3 | 0xfea3 | 1.3.6.1.4.1.2.267.7.6.5 | -| dilithium3 **hybrid with** p384 | 3.1 | 3 | 0xfea4 | 1.3.9999.2.7.3 | -| dilithium5 | 3.1 | 5 | 0xfea5 | 1.3.6.1.4.1.2.267.7.8.7 | -| dilithium5 **hybrid with** p521 | 3.1 | 5 | 0xfea6 | 1.3.9999.2.7.4 | -| dilithium2_aes | 3.1 | 1 | 0xfea7 | 1.3.6.1.4.1.2.267.11.4.4 | -| dilithium2_aes **hybrid with** p256 | 3.1 | 1 | 0xfea8 | 1.3.9999.2.11.1 | -| dilithium2_aes **hybrid with** rsa3072 | 3.1 | 1 | 0xfea9 | 1.3.9999.2.11.2 | -| dilithium3_aes | 3.1 | 3 | 0xfeaa | 1.3.6.1.4.1.2.267.11.6.5 | -| dilithium3_aes **hybrid with** p384 | 3.1 | 3 | 0xfeab | 1.3.9999.2.11.3 | -| dilithium5_aes | 3.1 | 5 | 0xfeac | 1.3.6.1.4.1.2.267.11.8.7 | -| dilithium5_aes **hybrid with** p521 | 3.1 | 5 | 0xfead | 1.3.9999.2.11.4 | | falcon512 | 20201018 | 1 | 0xfe0b | 1.3.9999.3.1 | | falcon512 **hybrid with** p256 | 20201018 | 1 | 0xfe0c | 1.3.9999.3.2 | | falcon512 **hybrid with** rsa3072 | 20201018 | 1 | 0xfe0d | 1.3.9999.3.3 | diff --git a/ssl/ssl_local.h b/ssl/ssl_local.h index 4111626a45981..f25bdc7261a90 100644 --- a/ssl/ssl_local.h +++ b/ssl/ssl_local.h @@ -531,9 +531,9 @@ (nid == NID_frodo976shake ? 0x0203 : \ (nid == NID_frodo1344aes ? 0x0204 : \ (nid == NID_frodo1344shake ? 0x0205 : \ - (nid == NID_kyber512 ? 0x020F : \ - (nid == NID_kyber768 ? 0x0210 : \ - (nid == NID_kyber1024 ? 0x0211 : \ + (nid == NID_kyber512 ? 0x023A : \ + (nid == NID_kyber768 ? 0x023C : \ + (nid == NID_kyber1024 ? 0x023D : \ (nid == NID_ntru_hps2048509 ? 0x0214 : \ (nid == NID_ntru_hps2048677 ? 0x0215 : \ (nid == NID_ntru_hps4096821 ? 0x0216 : \ @@ -551,9 +551,9 @@ (nid == NID_sikep751 ? 0x0222 : \ (nid == NID_bikel1 ? 0x0238 : \ (nid == NID_bikel3 ? 0x023B : \ - (nid == NID_kyber90s512 ? 0x0229 : \ - (nid == NID_kyber90s768 ? 0x022A : \ - (nid == NID_kyber90s1024 ? 0x022B : \ + (nid == NID_kyber90s512 ? 0x023E : \ + (nid == NID_kyber90s768 ? 0x023F : \ + (nid == NID_kyber90s1024 ? 0x0240 : \ (nid == NID_hqc128 ? 0x022C : \ (nid == NID_hqc192 ? 0x022D : \ (nid == NID_hqc256 ? 0x022E : \ @@ -576,8 +576,8 @@ (nid == NID_p521_frodo1344aes ? 0x2F04 : \ (nid == NID_p521_frodo1344shake ? 0x2F05 : \ (nid == NID_p256_kyber512 ? 0x2F3A : \ - (nid == NID_p384_kyber768 ? 0x2F10 : \ - (nid == NID_p521_kyber1024 ? 0x2F11 : \ + (nid == NID_p384_kyber768 ? 0x2F3C : \ + (nid == NID_p521_kyber1024 ? 0x2F3D : \ (nid == NID_p256_ntru_hps2048509 ? 0x2F14 : \ (nid == NID_p384_ntru_hps2048677 ? 0x2F15 : \ (nid == NID_p521_ntru_hps4096821 ? 0x2F16 : \ @@ -595,9 +595,9 @@ (nid == NID_p521_sikep751 ? 0x2F22 : \ (nid == NID_p256_bikel1 ? 0x2F38 : \ (nid == NID_p384_bikel3 ? 0x2F3B : \ - (nid == NID_p256_kyber90s512 ? 0x2F29 : \ - (nid == NID_p384_kyber90s768 ? 0x2F2A : \ - (nid == NID_p521_kyber90s1024 ? 0x2F2B : \ + (nid == NID_p256_kyber90s512 ? 0x2F3E : \ + (nid == NID_p384_kyber90s768 ? 0x2F3F : \ + (nid == NID_p521_kyber90s1024 ? 0x2F40 : \ (nid == NID_p256_hqc128 ? 0x2F2C : \ (nid == NID_p384_hqc192 ? 0x2F2D : \ (nid == NID_p521_hqc256 ? 0x2F2E : \ @@ -620,9 +620,9 @@ (curveID == 0x0203 || curveID == 0x2F03 ? NID_frodo976shake : \ (curveID == 0x0204 || curveID == 0x2F04 ? NID_frodo1344aes : \ (curveID == 0x0205 || curveID == 0x2F05 ? NID_frodo1344shake : \ - (curveID == 0x020F || curveID == 0x2F3A ? NID_kyber512 : \ - (curveID == 0x0210 || curveID == 0x2F10 ? NID_kyber768 : \ - (curveID == 0x0211 || curveID == 0x2F11 ? NID_kyber1024 : \ + (curveID == 0x023A || curveID == 0x2F3A ? NID_kyber512 : \ + (curveID == 0x023C || curveID == 0x2F3C ? NID_kyber768 : \ + (curveID == 0x023D || curveID == 0x2F3D ? NID_kyber1024 : \ (curveID == 0x0214 || curveID == 0x2F14 ? NID_ntru_hps2048509 : \ (curveID == 0x0215 || curveID == 0x2F15 ? NID_ntru_hps2048677 : \ (curveID == 0x0216 || curveID == 0x2F16 ? NID_ntru_hps4096821 : \ @@ -640,9 +640,9 @@ (curveID == 0x0222 || curveID == 0x2F22 ? NID_sikep751 : \ (curveID == 0x0238 || curveID == 0x2F38 ? NID_bikel1 : \ (curveID == 0x023B || curveID == 0x2F3B ? NID_bikel3 : \ - (curveID == 0x0229 || curveID == 0x2F29 ? NID_kyber90s512 : \ - (curveID == 0x022A || curveID == 0x2F2A ? NID_kyber90s768 : \ - (curveID == 0x022B || curveID == 0x2F2B ? NID_kyber90s1024 : \ + (curveID == 0x023E || curveID == 0x2F3E ? NID_kyber90s512 : \ + (curveID == 0x023F || curveID == 0x2F3F ? NID_kyber90s768 : \ + (curveID == 0x0240 || curveID == 0x2F40 ? NID_kyber90s1024 : \ (curveID == 0x022C || curveID == 0x2F2C ? NID_hqc128 : \ (curveID == 0x022D || curveID == 0x2F2D ? NID_hqc192 : \ (curveID == 0x022E || curveID == 0x2F2E ? NID_hqc256 : \ @@ -666,8 +666,8 @@ (curveID == 0x2F04 ? NID_p521_frodo1344aes : \ (curveID == 0x2F05 ? NID_p521_frodo1344shake : \ (curveID == 0x2F3A ? NID_p256_kyber512 : \ - (curveID == 0x2F10 ? NID_p384_kyber768 : \ - (curveID == 0x2F11 ? NID_p521_kyber1024 : \ + (curveID == 0x2F3C ? NID_p384_kyber768 : \ + (curveID == 0x2F3D ? NID_p521_kyber1024 : \ (curveID == 0x2F14 ? NID_p256_ntru_hps2048509 : \ (curveID == 0x2F15 ? NID_p384_ntru_hps2048677 : \ (curveID == 0x2F16 ? NID_p521_ntru_hps4096821 : \ @@ -685,9 +685,9 @@ (curveID == 0x2F22 ? NID_p521_sikep751 : \ (curveID == 0x2F38 ? NID_p256_bikel1 : \ (curveID == 0x2F3B ? NID_p384_bikel3 : \ - (curveID == 0x2F29 ? NID_p256_kyber90s512 : \ - (curveID == 0x2F2A ? NID_p384_kyber90s768 : \ - (curveID == 0x2F2B ? NID_p521_kyber90s1024 : \ + (curveID == 0x2F3E ? NID_p256_kyber90s512 : \ + (curveID == 0x2F3F ? NID_p384_kyber90s768 : \ + (curveID == 0x2F40 ? NID_p521_kyber90s1024 : \ (curveID == 0x2F2C ? NID_p256_hqc128 : \ (curveID == 0x2F2D ? NID_p384_hqc192 : \ (curveID == 0x2F2E ? NID_p521_hqc256 : \ @@ -765,8 +765,8 @@ (cid == 0x2F04 ?25: \ (cid == 0x2F05 ?25: \ (cid == 0x2F3A ?23: \ - (cid == 0x2F10 ?24: \ - (cid == 0x2F11 ?25: \ + (cid == 0x2F3C ?24: \ + (cid == 0x2F3D ?25: \ (cid == 0x2F14 ?23: \ (cid == 0x2F15 ?24: \ (cid == 0x2F16 ?25: \ @@ -784,9 +784,9 @@ (cid == 0x2F22 ?25: \ (cid == 0x2F38 ?23: \ (cid == 0x2F3B ?24: \ - (cid == 0x2F29 ?23: \ - (cid == 0x2F2A ?24: \ - (cid == 0x2F2B ?25: \ + (cid == 0x2F3E ?23: \ + (cid == 0x2F3F ?24: \ + (cid == 0x2F40 ?25: \ (cid == 0x2F2C ?23: \ (cid == 0x2F2D ?24: \ (cid == 0x2F2E ?25: \ diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 6e8bd8bfdd910..a63162f165510 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -193,9 +193,9 @@ static const TLS_GROUP_INFO oqs_nid_list[] = { {NID_frodo976shake, 192, TLS_CURVE_CUSTOM}, /* frodo976shake (0x0203) */ {NID_frodo1344aes, 256, TLS_CURVE_CUSTOM}, /* frodo1344aes (0x0204) */ {NID_frodo1344shake, 256, TLS_CURVE_CUSTOM}, /* frodo1344shake (0x0205) */ - {NID_kyber512, 128, TLS_CURVE_CUSTOM}, /* kyber512 (0x020F) */ - {NID_kyber768, 192, TLS_CURVE_CUSTOM}, /* kyber768 (0x0210) */ - {NID_kyber1024, 256, TLS_CURVE_CUSTOM}, /* kyber1024 (0x0211) */ + {NID_kyber512, 128, TLS_CURVE_CUSTOM}, /* kyber512 (0x023A) */ + {NID_kyber768, 192, TLS_CURVE_CUSTOM}, /* kyber768 (0x023C) */ + {NID_kyber1024, 256, TLS_CURVE_CUSTOM}, /* kyber1024 (0x023D) */ {NID_ntru_hps2048509, 128, TLS_CURVE_CUSTOM}, /* ntru_hps2048509 (0x0214) */ {NID_ntru_hps2048677, 192, TLS_CURVE_CUSTOM}, /* ntru_hps2048677 (0x0215) */ {NID_ntru_hps4096821, 256, TLS_CURVE_CUSTOM}, /* ntru_hps4096821 (0x0216) */ @@ -213,9 +213,9 @@ static const TLS_GROUP_INFO oqs_nid_list[] = { {NID_sikep751, 256, TLS_CURVE_CUSTOM}, /* sikep751 (0x0222) */ {NID_bikel1, 128, TLS_CURVE_CUSTOM}, /* bikel1 (0x0238) */ {NID_bikel3, 192, TLS_CURVE_CUSTOM}, /* bikel3 (0x023B) */ - {NID_kyber90s512, 128, TLS_CURVE_CUSTOM}, /* kyber90s512 (0x0229) */ - {NID_kyber90s768, 192, TLS_CURVE_CUSTOM}, /* kyber90s768 (0x022A) */ - {NID_kyber90s1024, 256, TLS_CURVE_CUSTOM}, /* kyber90s1024 (0x022B) */ + {NID_kyber90s512, 128, TLS_CURVE_CUSTOM}, /* kyber90s512 (0x023E) */ + {NID_kyber90s768, 192, TLS_CURVE_CUSTOM}, /* kyber90s768 (0x023F) */ + {NID_kyber90s1024, 256, TLS_CURVE_CUSTOM}, /* kyber90s1024 (0x0240) */ {NID_hqc128, 128, TLS_CURVE_CUSTOM}, /* hqc128 (0x022C) */ {NID_hqc192, 192, TLS_CURVE_CUSTOM}, /* hqc192 (0x022D) */ {NID_hqc256, 256, TLS_CURVE_CUSTOM}, /* hqc256 (0x022E) */ @@ -236,9 +236,9 @@ static const TLS_GROUP_INFO oqs_hybrid_nid_list[] = { {NID_p384_frodo976shake, 192, TLS_CURVE_CUSTOM}, /* p256/384/521 + frodo976shake hybrid (0x0203) */ {NID_p521_frodo1344aes, 256, TLS_CURVE_CUSTOM}, /* p256/384/521 + frodo1344aes hybrid (0x0204) */ {NID_p521_frodo1344shake, 256, TLS_CURVE_CUSTOM}, /* p256/384/521 + frodo1344shake hybrid (0x0205) */ - {NID_p256_kyber512, 128, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber512 hybrid (0x020F) */ - {NID_p384_kyber768, 192, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber768 hybrid (0x0210) */ - {NID_p521_kyber1024, 256, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber1024 hybrid (0x0211) */ + {NID_p256_kyber512, 128, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber512 hybrid (0x023A) */ + {NID_p384_kyber768, 192, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber768 hybrid (0x023C) */ + {NID_p521_kyber1024, 256, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber1024 hybrid (0x023D) */ {NID_p256_ntru_hps2048509, 128, TLS_CURVE_CUSTOM}, /* p256/384/521 + ntru_hps2048509 hybrid (0x0214) */ {NID_p384_ntru_hps2048677, 192, TLS_CURVE_CUSTOM}, /* p256/384/521 + ntru_hps2048677 hybrid (0x0215) */ {NID_p521_ntru_hps4096821, 256, TLS_CURVE_CUSTOM}, /* p256/384/521 + ntru_hps4096821 hybrid (0x0216) */ @@ -256,9 +256,9 @@ static const TLS_GROUP_INFO oqs_hybrid_nid_list[] = { {NID_p521_sikep751, 256, TLS_CURVE_CUSTOM}, /* p256/384/521 + sikep751 hybrid (0x0222) */ {NID_p256_bikel1, 128, TLS_CURVE_CUSTOM}, /* p256/384/521 + bikel1 hybrid (0x0238) */ {NID_p384_bikel3, 192, TLS_CURVE_CUSTOM}, /* p256/384/521 + bikel3 hybrid (0x023B) */ - {NID_p256_kyber90s512, 128, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber90s512 hybrid (0x0229) */ - {NID_p384_kyber90s768, 192, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber90s768 hybrid (0x022A) */ - {NID_p521_kyber90s1024, 256, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber90s1024 hybrid (0x022B) */ + {NID_p256_kyber90s512, 128, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber90s512 hybrid (0x023E) */ + {NID_p384_kyber90s768, 192, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber90s768 hybrid (0x023F) */ + {NID_p521_kyber90s1024, 256, TLS_CURVE_CUSTOM}, /* p256/384/521 + kyber90s1024 hybrid (0x0240) */ {NID_p256_hqc128, 128, TLS_CURVE_CUSTOM}, /* p256/384/521 + hqc128 hybrid (0x022C) */ {NID_p384_hqc192, 192, TLS_CURVE_CUSTOM}, /* p256/384/521 + hqc192 hybrid (0x022D) */ {NID_p521_hqc256, 256, TLS_CURVE_CUSTOM}, /* p256/384/521 + hqc256 hybrid (0x022E) */ @@ -295,7 +295,7 @@ static const uint16_t eccurves_default[] = { 0x2F1F, /* OQS sikep434 hybrid */ 0x2F20, /* OQS sikep503 hybrid */ 0x2F38, /* OQS bikel1 hybrid */ - 0x2F29, /* OQS kyber90s512 hybrid */ + 0x2F3E, /* OQS kyber90s512 hybrid */ 0x2F2C, /* OQS hqc128 hybrid */ 0x2F2F, /* OQS ntrulpr653 hybrid */ 0x2F32, /* OQS sntrup653 hybrid */ @@ -326,12 +326,12 @@ static const uint16_t oqs_all_tls13_server_groups[] = { 0x2F04, /* OQS frodo1344aes hybrid */ 0x0205, /* frodo1344shake */ 0x2F05, /* OQS frodo1344shake hybrid */ - 0x020F, /* kyber512 */ + 0x023A, /* kyber512 */ 0x2F3A, /* OQS kyber512 hybrid */ - 0x0210, /* kyber768 */ - 0x2F10, /* OQS kyber768 hybrid */ - 0x0211, /* kyber1024 */ - 0x2F11, /* OQS kyber1024 hybrid */ + 0x023C, /* kyber768 */ + 0x2F3C, /* OQS kyber768 hybrid */ + 0x023D, /* kyber1024 */ + 0x2F3D, /* OQS kyber1024 hybrid */ 0x0214, /* ntru_hps2048509 */ 0x2F14, /* OQS ntru_hps2048509 hybrid */ 0x0215, /* ntru_hps2048677 */ @@ -366,12 +366,12 @@ static const uint16_t oqs_all_tls13_server_groups[] = { 0x2F38, /* OQS bikel1 hybrid */ 0x023B, /* bikel3 */ 0x2F3B, /* OQS bikel3 hybrid */ - 0x0229, /* kyber90s512 */ - 0x2F29, /* OQS kyber90s512 hybrid */ - 0x022A, /* kyber90s768 */ - 0x2F2A, /* OQS kyber90s768 hybrid */ - 0x022B, /* kyber90s1024 */ - 0x2F2B, /* OQS kyber90s1024 hybrid */ + 0x023E, /* kyber90s512 */ + 0x2F3E, /* OQS kyber90s512 hybrid */ + 0x023F, /* kyber90s768 */ + 0x2F3F, /* OQS kyber90s768 hybrid */ + 0x0240, /* kyber90s1024 */ + 0x2F40, /* OQS kyber90s1024 hybrid */ 0x022C, /* hqc128 */ 0x2F2C, /* OQS hqc128 hybrid */ 0x022D, /* hqc192 */ From b6f83edc139f2da25fc640289cfc1bdbcae36a8c Mon Sep 17 00:00:00 2001 From: Michael <57787676+baentsch@users.noreply.github.com> Date: Thu, 8 Jul 2021 07:20:14 +0200 Subject: [PATCH 9/9] removed first sig algorithm removing logic from doc generators --- README.md | 1 + oqs-template/README.md/list_sigs.fragment | 2 +- oqs-template/generate-oid-nid-table.py | 2 +- oqs-template/oqs-sig-info.md | 14 ++++++++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3aa61870c898c..66f062805bf5b 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,7 @@ Note that algorithms marked with a dagger (†) have large stack usage and may c The following digital signature algorithms from liboqs are supported by the fork. **Note that not all variants of all algorithms are enabled by default; algorithms that are enabled by default are marked with an asterisk, and should you wish to enable additional variants, consult [the "Code Generation" section of the documentation in the wiki](https://github.com/open-quantum-safe/openssl/wiki/Using-liboqs-algorithms-not-in-the-fork#code-generation)**. +- **CRYSTALS-Dilithium**:`dilithium2`\*, `dilithium3`\*, `dilithium5`\*, `dilithium2_aes`\*, `dilithium3_aes`\*, `dilithium5_aes`\* - **Falcon**:`falcon512`\*, `falcon1024`\* - **Picnic**:`picnicl1fs`, `picnicl1ur`, `picnicl1full`\*, `picnic3l1`\*, `picnic3l3`, `picnic3l5` - **Rainbow**:`rainbowIclassic`\*, `rainbowIcircumzenithal`, `rainbowIcompressed`, `rainbowIIIclassic`, `rainbowIIIcircumzenithal`, `rainbowIIIcompressed`, `rainbowVclassic`\*, `rainbowVcircumzenithal`, `rainbowVcompressed` diff --git a/oqs-template/README.md/list_sigs.fragment b/oqs-template/README.md/list_sigs.fragment index 77d509c4b9fa8..1cd7046b1cc49 100644 --- a/oqs-template/README.md/list_sigs.fragment +++ b/oqs-template/README.md/list_sigs.fragment @@ -1,4 +1,4 @@ -{%- for sig in config['sigs'][1:] %} +{%- for sig in config['sigs'] %} - **{{ sig['family'] }}**: {%- for variant in sig['variants'] -%} `{{ variant['name'] }}` diff --git a/oqs-template/generate-oid-nid-table.py b/oqs-template/generate-oid-nid-table.py index fd0112a8d5d2e..4733a630c4035 100644 --- a/oqs-template/generate-oid-nid-table.py +++ b/oqs-template/generate-oid-nid-table.py @@ -33,7 +33,7 @@ table = [['Algorithm', 'Implementation Version', 'Claimed NIST Level', 'Code Point', 'OID']] claimed_nist_level = 0 -for sig in sorted(config['sigs'][1:], key=lambda s: s['family']): +for sig in sorted(config['sigs'], key=lambda s: s['family']): for variant in sig['variants']: if variant['security'] == 128: claimed_nist_level = 1 diff --git a/oqs-template/oqs-sig-info.md b/oqs-template/oqs-sig-info.md index 554fcf081f630..5f756704a592a 100644 --- a/oqs-template/oqs-sig-info.md +++ b/oqs-template/oqs-sig-info.md @@ -1,5 +1,19 @@ | Algorithm | Implementation Version | Claimed NIST Level | Code Point | OID | |:--------------------------------------------------|:-------------------------|---------------------:|:-------------|:--------------------------| +| dilithium2 | 3.1 | 1 | 0xfea0 | 1.3.6.1.4.1.2.267.7.4.4 | +| dilithium2 **hybrid with** p256 | 3.1 | 1 | 0xfea1 | 1.3.9999.2.7.1 | +| dilithium2 **hybrid with** rsa3072 | 3.1 | 1 | 0xfea2 | 1.3.9999.2.7.2 | +| dilithium3 | 3.1 | 3 | 0xfea3 | 1.3.6.1.4.1.2.267.7.6.5 | +| dilithium3 **hybrid with** p384 | 3.1 | 3 | 0xfea4 | 1.3.9999.2.7.3 | +| dilithium5 | 3.1 | 5 | 0xfea5 | 1.3.6.1.4.1.2.267.7.8.7 | +| dilithium5 **hybrid with** p521 | 3.1 | 5 | 0xfea6 | 1.3.9999.2.7.4 | +| dilithium2_aes | 3.1 | 1 | 0xfea7 | 1.3.6.1.4.1.2.267.11.4.4 | +| dilithium2_aes **hybrid with** p256 | 3.1 | 1 | 0xfea8 | 1.3.9999.2.11.1 | +| dilithium2_aes **hybrid with** rsa3072 | 3.1 | 1 | 0xfea9 | 1.3.9999.2.11.2 | +| dilithium3_aes | 3.1 | 3 | 0xfeaa | 1.3.6.1.4.1.2.267.11.6.5 | +| dilithium3_aes **hybrid with** p384 | 3.1 | 3 | 0xfeab | 1.3.9999.2.11.3 | +| dilithium5_aes | 3.1 | 5 | 0xfeac | 1.3.6.1.4.1.2.267.11.8.7 | +| dilithium5_aes **hybrid with** p521 | 3.1 | 5 | 0xfead | 1.3.9999.2.11.4 | | falcon512 | 20201018 | 1 | 0xfe0b | 1.3.9999.3.1 | | falcon512 **hybrid with** p256 | 20201018 | 1 | 0xfe0c | 1.3.9999.3.2 | | falcon512 **hybrid with** rsa3072 | 20201018 | 1 | 0xfe0d | 1.3.9999.3.3 |