Files
wolfssl/wolfcrypt
Daniele Lacamera 89f024f660 Falcon: address PR review feedback
- cmake/functions.cmake: remove duplicated BUILD_FALCON conditional block;
  BUILD_FALCON is now set in one place.
- wolfssl/wolfcrypt/include.am: list the internal wc_falcon_*.h headers under
  an "if BUILD_FALCON" block so they ship in "make dist" tarballs and install
  when Falcon is enabled (the public falcon.h was already listed). Automake
  distributes both branches of the conditional, so a Falcon-disabled dist
  still contains them.
- wc_falcon_fft_neon.c: fix strict-aliasing UB in falcon_FFT/falcon_iFFT.
  fpr is a word64 bit pattern; casting fpr* to double* and using
  vld1q_f64/vst1q_f64 accesses the store through the wrong type and can
  miscompile at -O2/-O3. Load/store through uint64_t (the real object type)
  and reinterpret the vector register to/from f64 via new FALCON_VLD/FALCON_VST
  macros. Verified under qemu (NEON_FFT_PASS) with fmla v.2d still emitted.
- wc_falcon_sampler.c / wc_falcon_sampler.h: falcon_prng_get_u8/get_u64 have
  no error return, so a SHAKE256 squeeze failure previously went unnoticed and
  stale buffer bytes could feed the signer. Add a sticky "err" field latched on
  the first refill failure.
- wc_falcon_sign.c: falcon_sign_core now rejects the signature when the PRNG
  latched an error, and falcon_do_sign_tree bounds its restart loop
  (FALCON_SIGN_MAX_RESTARTS) so a wedged sampler terminates instead of
  spinning forever. The bound is far beyond any legitimate restart count.
2026-07-22 09:52:26 +02:00
..
2026-07-22 09:52:26 +02:00