Merge pull request #7109 from Frauschi/falcon_compat

PQC: Update Falcon support to match OQS
This commit is contained in:
David Garske
2024-01-17 14:18:32 -08:00
committed by GitHub
4 changed files with 15 additions and 15 deletions

View File

@@ -4019,11 +4019,11 @@ static word32 SetBitString16Bit(word16 val, byte* output)
#endif /* HAVE_ED448 */ #endif /* HAVE_ED448 */
#ifdef HAVE_PQC #ifdef HAVE_PQC
#ifdef HAVE_FALCON #ifdef HAVE_FALCON
/* Falcon Level 1: 1 3 9999 3 1 */ /* Falcon Level 1: 1 3 9999 3 6 */
static const byte sigFalcon_Level1Oid[] = {43, 206, 15, 3, 1}; static const byte sigFalcon_Level1Oid[] = {43, 206, 15, 3, 6};
/* Falcon Level 5: 1 3 9999 3 4 */ /* Falcon Level 5: 1 3 9999 3 9 */
static const byte sigFalcon_Level5Oid[] = {43, 206, 15, 3, 4}; static const byte sigFalcon_Level5Oid[] = {43, 206, 15, 3, 9};
#endif /* HAVE_FACON */ #endif /* HAVE_FACON */
#ifdef HAVE_DILITHIUM #ifdef HAVE_DILITHIUM
/* Dilithium Level 2: 1.3.6.1.4.1.2.267.7.4.4 */ /* Dilithium Level 2: 1.3.6.1.4.1.2.267.7.4.4 */
@@ -4095,11 +4095,11 @@ static word32 SetBitString16Bit(word16 val, byte* output)
#endif /* !NO_DH */ #endif /* !NO_DH */
#ifdef HAVE_PQC #ifdef HAVE_PQC
#ifdef HAVE_FALCON #ifdef HAVE_FALCON
/* Falcon Level 1: 1 3 9999 3 1 */ /* Falcon Level 1: 1 3 9999 3 6 */
static const byte keyFalcon_Level1Oid[] = {43, 206, 15, 3, 1}; static const byte keyFalcon_Level1Oid[] = {43, 206, 15, 3, 6};
/* Falcon Level 5: 1 3 9999 3 4 */ /* Falcon Level 5: 1 3 9999 3 9 */
static const byte keyFalcon_Level5Oid[] = {43, 206, 15, 3, 4}; static const byte keyFalcon_Level5Oid[] = {43, 206, 15, 3, 9};
#endif /* HAVE_FALCON */ #endif /* HAVE_FALCON */
#ifdef HAVE_DILITHIUM #ifdef HAVE_DILITHIUM
/* Dilithium Level 2: 1.3.6.1.4.1.2.267.7.4.4 */ /* Dilithium Level 2: 1.3.6.1.4.1.2.267.7.4.4 */

View File

@@ -1779,11 +1779,11 @@ enum Misc {
PQC_SA_MAJOR = 0xFE,/* Most significant byte used with PQC sig algs */ PQC_SA_MAJOR = 0xFE,/* Most significant byte used with PQC sig algs */
/* These values for falcon and dilithium match what OQS has defined in their OpenSSL fork. */ /* These values for falcon and dilithium match what OQS has defined. */
FALCON_LEVEL1_SA_MAJOR = 0xFE, FALCON_LEVEL1_SA_MAJOR = 0xFE,
FALCON_LEVEL1_SA_MINOR = 0x0B, FALCON_LEVEL1_SA_MINOR = 0xAE,
FALCON_LEVEL5_SA_MAJOR = 0xFE, FALCON_LEVEL5_SA_MAJOR = 0xFE,
FALCON_LEVEL5_SA_MINOR = 0x0E, FALCON_LEVEL5_SA_MINOR = 0xB1,
DILITHIUM_LEVEL2_SA_MAJOR = 0xFE, DILITHIUM_LEVEL2_SA_MAJOR = 0xFE,
DILITHIUM_LEVEL2_SA_MINOR = 0xA0, DILITHIUM_LEVEL2_SA_MINOR = 0xA0,

View File

@@ -1136,8 +1136,8 @@ enum Key_Sum {
ED448k = 257, /* 1.3.101.113 */ ED448k = 257, /* 1.3.101.113 */
X448k = 255, /* 1.3.101.111 */ X448k = 255, /* 1.3.101.111 */
DHk = 647, /* dhKeyAgreement OID: 1.2.840.113549.1.3.1 */ DHk = 647, /* dhKeyAgreement OID: 1.2.840.113549.1.3.1 */
FALCON_LEVEL1k = 268, /* 1.3.9999.3.1 */ FALCON_LEVEL1k = 273, /* 1.3.9999.3.6 */
FALCON_LEVEL5k = 271, /* 1.3.9999.3.4 */ FALCON_LEVEL5k = 276, /* 1.3.9999.3.9 */
DILITHIUM_LEVEL2k = 213, /* 1.3.6.1.4.1.2.267.7.4.4 */ DILITHIUM_LEVEL2k = 213, /* 1.3.6.1.4.1.2.267.7.4.4 */
DILITHIUM_LEVEL3k = 216, /* 1.3.6.1.4.1.2.267.7.6.5 */ DILITHIUM_LEVEL3k = 216, /* 1.3.6.1.4.1.2.267.7.6.5 */
DILITHIUM_LEVEL5k = 220, /* 1.3.6.1.4.1.2.267.7.8.7 */ DILITHIUM_LEVEL5k = 220, /* 1.3.6.1.4.1.2.267.7.8.7 */

View File

@@ -214,8 +214,8 @@ enum Ctc_SigType {
CTC_ED25519 = 256, CTC_ED25519 = 256,
CTC_ED448 = 257, CTC_ED448 = 257,
CTC_FALCON_LEVEL1 = 268, CTC_FALCON_LEVEL1 = 273,
CTC_FALCON_LEVEL5 = 271, CTC_FALCON_LEVEL5 = 276,
CTC_DILITHIUM_LEVEL2 = 213, CTC_DILITHIUM_LEVEL2 = 213,
CTC_DILITHIUM_LEVEL3 = 216, CTC_DILITHIUM_LEVEL3 = 216,