Skip to content

Commit 00dc283

Browse files
committed
Merged PR 14866524: Update service indicator for PQC algorithms
## Description: Update FIPS 140 approved services indicator for the next round of certifications ## Admin Checklist: - [ ] You have updated documentation in symcrypt.h to reflect any changes in behavior - [ ] You have updated CHANGELOG.md to reflect any changes in behavior - [ ] You have updated symcryptunittest to exercise any new functionality - [ ] If you have introduced any symbols in symcrypt.h you have updated production and test dynamic export symbols (exports.ver / exports.def / symcrypt.src) and tested the updated dynamic modules with symcryptunittest - [ ] If you have introduced functionality that varies based on CPU features, you have manually tested with and without relevant features - [ ] If you have made significant changes to a particular algorithm, you have checked that performance numbers reported by symcryptunittest are in line with expectations - [ ] If you have added new algorithms/modes, you have updated the status indicator text for the associated modules if necessary
1 parent 15d6933 commit 00dc283

3 files changed

Lines changed: 215 additions & 55 deletions

File tree

inc/symcrypt_internal.h

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3485,6 +3485,7 @@ typedef enum _SYMCRYPT_SI_TYPE {
34853485
SYMCRYPT_SI_TYPE_DRBG = 0x05,
34863486
SYMCRYPT_SI_TYPE_ASYM_ALG = 0x06,
34873487
SYMCRYPT_SI_TYPE_KAS = 0x07,
3488+
SYMCRYPT_SI_TYPE_KEM = 0x08,
34883489

34893490
// Other types where elements are a bitmask
34903491
SYMCRYPT_SI_TYPE_ECURVE = 0x40,
@@ -3494,6 +3495,7 @@ typedef enum _SYMCRYPT_SI_TYPE {
34943495
// Non-bitmask types
34953496
SYMCRYPT_SI_TYPE_INTRANGE = 0x80,
34963497
SYMCRYPT_SI_TYPE_INTPAIR = 0x81,
3498+
SYMCRYPT_SI_TYPE_SIZERANGE = 0x82,
34973499

34983500
SYMCRYPT_SI_TYPE_MAX = 0xFF
34993501
} SYMCRYPT_SI_TYPE;
@@ -3508,11 +3510,12 @@ typedef enum _SYMCRYPT_SI_TYPE {
35083510

35093511
#define SYMCRYPT_SI_INTRANGE(Low, High) (((UINT64)SYMCRYPT_SI_TYPE_INTRANGE << 56) | SYMCRYPT_SI_INTPACK(High, Low))
35103512
#define SYMCRYPT_SI_INTPAIR(X, Y) (((UINT64)SYMCRYPT_SI_TYPE_INTPAIR << 56) | SYMCRYPT_SI_INTPACK(Y, X))
3513+
#define SYMCRYPT_SI_SIZERANGE(Low, High) (((UINT64)SYMCRYPT_SI_TYPE_SIZERANGE << 56) | SYMCRYPT_SI_INTPACK(High, Low))
35113514

35123515
#define SYMCRYPT_SI_CHECK_INT(L) C_ASSERT(L <= SYMCRYPT_SI_INTMASK)
35133516

3514-
#define SYMCRYPT_SI_KEYBITS(L) SYMCRYPT_SI_INTRANGE(L, L)
3515-
#define SYMCRYPT_SI_MODULUS(L) SYMCRYPT_SI_INTRANGE(L, L)
3517+
#define SYMCRYPT_SI_KEYBITS(L) SYMCRYPT_SI_SIZERANGE(L, L)
3518+
#define SYMCRYPT_SI_MODULUS(L) SYMCRYPT_SI_SIZERANGE(L, L)
35163519
#define SYMCRYPT_SI_DSAPARAMS(N, L) SYMCRYPT_SI_INTPAIR(N, L)
35173520

35183521

@@ -3528,6 +3531,8 @@ typedef enum _SYMCRYPT_SI_TYPE {
35283531
#define SYMCRYPT_SI_SVC_SECRET_AGREEMENT 0x00000800
35293532
#define SYMCRYPT_SI_SVC_SIGNATURE_GENERATION 0x00001000
35303533
#define SYMCRYPT_SI_SVC_SIGNATURE_VERIFICATION 0x00002000
3534+
#define SYMCRYPT_SI_SVC_KEY_ENCAPSULATION 0x00004000
3535+
#define SYMCRYPT_SI_SVC_KEY_DECAPSULATION 0x00008000
35313536

35323537
// Ciphers
35333538
#define SYMCRYPT_SI_AES_CBC SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_CIPHER, 0)
@@ -3633,11 +3638,27 @@ typedef enum _SYMCRYPT_SI_TYPE {
36333638
#define SYMCRYPT_SI_KAS_FFC_SSC SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 21)
36343639

36353640
// PQ Algorithms
3636-
#define SYMCRYPT_SI_MLKEM SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 22)
3637-
#define SYMCRYPT_SI_MLDSA SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 23)
3638-
#define SYMCRYPT_SI_XMSS SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 24)
3639-
#define SYMCRYPT_SI_XMSS_MT SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 25)
3640-
#define SYMCRYPT_SI_LMS SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 26)
3641+
3642+
// Asym Alg IDs for PQC algorithms in range 22-26 are replaced with more granular
3643+
// algorithms as below.
3644+
// Keeping this range reserved until there's a need to use it in the future.
3645+
3646+
#define SYMCRYPT_SI_MLDSA_KEYGEN SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 27)
3647+
#define SYMCRYPT_SI_MLDSA_SIGGEN SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 28)
3648+
#define SYMCRYPT_SI_MLDSA_SIGVER SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 29)
3649+
#define SYMCRYPT_SI_LMS_KEYGEN SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 30)
3650+
#define SYMCRYPT_SI_LMS_SIGGEN SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 31)
3651+
#define SYMCRYPT_SI_LMS_SIGVER SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 32)
3652+
#define SYMCRYPT_SI_XMSS_KEYGEN SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 33)
3653+
#define SYMCRYPT_SI_XMSS_SIGGEN SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 34)
3654+
#define SYMCRYPT_SI_XMSS_SIGVER SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 35)
3655+
#define SYMCRYPT_SI_XMSS_MT_KEYGEN SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 36)
3656+
#define SYMCRYPT_SI_XMSS_MT_SIGGEN SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 37)
3657+
#define SYMCRYPT_SI_XMSS_MT_SIGVER SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_ASYM_ALG, 38)
3658+
3659+
#define SYMCRYPT_SI_MLKEM_KEYGEN SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_KEM, 0)
3660+
#define SYMCRYPT_SI_MLKEM_ENCAPS SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_KEM, 1)
3661+
#define SYMCRYPT_SI_MLKEM_DECAPS SYMCRYPT_SI_CREATE_ID(SYMCRYPT_SI_TYPE_KEM, 2)
36413662

36423663

36433664
// Elliptic Curves
@@ -3718,6 +3739,8 @@ SymCryptDeprecatedServiceIndicator(
37183739
// SYMCRYPT_SI_KAS_ECC_SSC SYMCRYPT_SI_ECURVE_XXX SYMCRYPT_SI_SCHEME_XXX
37193740
// SYMCRYPT_SI_KAS_FFC SYMCRYPT_SI_SPG_XXX Hash Alg Id
37203741
// SYMCRYPT_SI_KAS_FFC_SSC SYMCRYPT_SI_SPG_XXX SYMCRYPT_SI_SCHEME_XXX
3742+
// SYMCRYPT_SI_LMS_SIGVER SYMCRYPT_LMS_XXX -
3743+
// SYMCRYPT_SI_XMSS_SIGVER SYMCRYPT_XMSS_XXX -
37213744
//
37223745
//
37233746
// Return value:

0 commit comments

Comments
 (0)