Skip to content

Commit b2888a9

Browse files
committed
Update Falcon support to match OQS
Update the OIDs and related variables to match the current OQS values. Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com>
1 parent 089468f commit b2888a9

4 files changed

Lines changed: 15 additions & 15 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4019,11 +4019,11 @@ static word32 SetBitString16Bit(word16 val, byte* output)
40194019
#endif /* HAVE_ED448 */
40204020
#ifdef HAVE_PQC
40214021
#ifdef HAVE_FALCON
4022-
/* Falcon Level 1: 1 3 9999 3 1 */
4023-
static const byte sigFalcon_Level1Oid[] = {43, 206, 15, 3, 1};
4022+
/* Falcon Level 1: 1 3 9999 3 6 */
4023+
static const byte sigFalcon_Level1Oid[] = {43, 206, 15, 3, 6};
40244024

4025-
/* Falcon Level 5: 1 3 9999 3 4 */
4026-
static const byte sigFalcon_Level5Oid[] = {43, 206, 15, 3, 4};
4025+
/* Falcon Level 5: 1 3 9999 3 9 */
4026+
static const byte sigFalcon_Level5Oid[] = {43, 206, 15, 3, 9};
40274027
#endif /* HAVE_FACON */
40284028
#ifdef HAVE_DILITHIUM
40294029
/* 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)
40954095
#endif /* !NO_DH */
40964096
#ifdef HAVE_PQC
40974097
#ifdef HAVE_FALCON
4098-
/* Falcon Level 1: 1 3 9999 3 1 */
4099-
static const byte keyFalcon_Level1Oid[] = {43, 206, 15, 3, 1};
4098+
/* Falcon Level 1: 1 3 9999 3 6 */
4099+
static const byte keyFalcon_Level1Oid[] = {43, 206, 15, 3, 6};
41004100

4101-
/* Falcon Level 5: 1 3 9999 3 4 */
4102-
static const byte keyFalcon_Level5Oid[] = {43, 206, 15, 3, 4};
4101+
/* Falcon Level 5: 1 3 9999 3 9 */
4102+
static const byte keyFalcon_Level5Oid[] = {43, 206, 15, 3, 9};
41034103
#endif /* HAVE_FALCON */
41044104
#ifdef HAVE_DILITHIUM
41054105
/* Dilithium Level 2: 1.3.6.1.4.1.2.267.7.4.4 */

wolfssl/internal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,11 +1779,11 @@ enum Misc {
17791779

17801780
PQC_SA_MAJOR = 0xFE,/* Most significant byte used with PQC sig algs */
17811781

1782-
/* These values for falcon and dilithium match what OQS has defined in their OpenSSL fork. */
1782+
/* These values for falcon and dilithium match what OQS has defined. */
17831783
FALCON_LEVEL1_SA_MAJOR = 0xFE,
1784-
FALCON_LEVEL1_SA_MINOR = 0x0B,
1784+
FALCON_LEVEL1_SA_MINOR = 0xAE,
17851785
FALCON_LEVEL5_SA_MAJOR = 0xFE,
1786-
FALCON_LEVEL5_SA_MINOR = 0x0E,
1786+
FALCON_LEVEL5_SA_MINOR = 0xB1,
17871787

17881788
DILITHIUM_LEVEL2_SA_MAJOR = 0xFE,
17891789
DILITHIUM_LEVEL2_SA_MINOR = 0xA0,

wolfssl/wolfcrypt/asn.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,8 +1136,8 @@ enum Key_Sum {
11361136
ED448k = 257, /* 1.3.101.113 */
11371137
X448k = 255, /* 1.3.101.111 */
11381138
DHk = 647, /* dhKeyAgreement OID: 1.2.840.113549.1.3.1 */
1139-
FALCON_LEVEL1k = 268, /* 1.3.9999.3.1 */
1140-
FALCON_LEVEL5k = 271, /* 1.3.9999.3.4 */
1139+
FALCON_LEVEL1k = 273, /* 1.3.9999.3.6 */
1140+
FALCON_LEVEL5k = 276, /* 1.3.9999.3.9 */
11411141
DILITHIUM_LEVEL2k = 213, /* 1.3.6.1.4.1.2.267.7.4.4 */
11421142
DILITHIUM_LEVEL3k = 216, /* 1.3.6.1.4.1.2.267.7.6.5 */
11431143
DILITHIUM_LEVEL5k = 220, /* 1.3.6.1.4.1.2.267.7.8.7 */

wolfssl/wolfcrypt/asn_public.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ enum Ctc_SigType {
214214
CTC_ED25519 = 256,
215215
CTC_ED448 = 257,
216216

217-
CTC_FALCON_LEVEL1 = 268,
218-
CTC_FALCON_LEVEL5 = 271,
217+
CTC_FALCON_LEVEL1 = 273,
218+
CTC_FALCON_LEVEL5 = 276,
219219

220220
CTC_DILITHIUM_LEVEL2 = 213,
221221
CTC_DILITHIUM_LEVEL3 = 216,

0 commit comments

Comments
 (0)