Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dev/fips202/aarch64/auto.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "x1_scalar.h"
#endif

#if !defined(MLD_CONFIG_SERIAL_FIPS202_ONLY)
/*
* Keccak-f1600x2/x4
*
Expand Down Expand Up @@ -68,4 +69,6 @@

#endif /* !__ARM_FEATURE_SHA3 */

#endif /* !MLD_CONFIG_SERIAL_FIPS202_ONLY */

#endif /* !MLD_DEV_FIPS202_AARCH64_AUTO_H */
2 changes: 2 additions & 0 deletions mldsa/src/fips202/keccakf1600.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ void mld_keccakf1600_xor_bytes(uint64_t *state, const unsigned char *data,
#endif /* !MLD_SYS_LITTLE_ENDIAN */
}

#if !defined(MLD_CONFIG_SERIAL_FIPS202_ONLY)
MLD_INTERNAL_API
void mld_keccakf1600x4_extract_bytes(uint64_t *state, unsigned char *data0,
unsigned char *data1, unsigned char *data2,
Expand Down Expand Up @@ -131,6 +132,7 @@ void mld_keccakf1600x4_permute(uint64_t *state)
mld_keccakf1600_permute(state + MLD_KECCAK_LANES * 2);
mld_keccakf1600_permute(state + MLD_KECCAK_LANES * 3);
}
#endif /* !MLD_CONFIG_SERIAL_FIPS202_ONLY */

static const uint64_t mld_KeccakF_RoundConstants[MLD_KECCAK_NROUNDS] = {
(uint64_t)0x0000000000000001ULL, (uint64_t)0x0000000000008082ULL,
Expand Down
2 changes: 2 additions & 0 deletions mldsa/src/fips202/keccakf1600.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ __contract__(
assigns(memory_slice(state, sizeof(uint64_t) * MLD_KECCAK_LANES))
);

#if !defined(MLD_CONFIG_SERIAL_FIPS202_ONLY)
#define mld_keccakf1600x4_extract_bytes \
MLD_NAMESPACE(keccakf1600x4_extract_bytes)
MLD_INTERNAL_API
Expand Down Expand Up @@ -93,6 +94,7 @@ __contract__(
requires(memory_no_alias(state, sizeof(uint64_t) * MLD_KECCAK_LANES * MLD_KECCAK_WAY))
assigns(memory_slice(state, sizeof(uint64_t) * MLD_KECCAK_LANES * MLD_KECCAK_WAY))
);
#endif /* !MLD_CONFIG_SERIAL_FIPS202_ONLY */

#define mld_keccakf1600_permute MLD_NAMESPACE(keccakf1600_permute)
MLD_INTERNAL_API
Expand Down
3 changes: 3 additions & 0 deletions mldsa/src/fips202/native/aarch64/auto.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "x1_scalar.h"
#endif

#if !defined(MLD_CONFIG_SERIAL_FIPS202_ONLY)
/*
* Keccak-f1600x2/x4
*
Expand Down Expand Up @@ -68,4 +69,6 @@

#endif /* !__ARM_FEATURE_SHA3 */

#endif /* !MLD_CONFIG_SERIAL_FIPS202_ONLY */

#endif /* !MLD_FIPS202_NATIVE_AARCH64_AUTO_H */
3 changes: 2 additions & 1 deletion mldsa/src/fips202/native/auto.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
#include "aarch64/auto.h"
#endif

#if defined(MLD_SYS_X86_64) && defined(MLD_SYS_X86_64_AVX2)
#if defined(MLD_SYS_X86_64) && defined(MLD_SYS_X86_64_AVX2) && \
!defined(MLD_CONFIG_SERIAL_FIPS202_ONLY)
#include "x86_64/xkcp.h"
#endif

Expand Down
Loading