Commit Graph

1407 Commits (master)

Author SHA1 Message Date
Eric Blankenhorn b19c64b11b Fix from review 2026-09-17 07:27:17 -05:00
Eric Blankenhorn 96410fde25 MSVC: pass SP feature defines to ml64 for sp_x86_64_asm.asm 2026-09-17 07:18:29 -05:00
David Garske ba1797509d Key the STM32CubeMX2 configuration off a macro the pack declares 2026-09-15 17:42:11 -07:00
JacobBarthelmeh fad92fa095
Merge pull request #11399 from night1rider/ecies-dev-id-change
Ecies dev id change
2026-09-15 14:31:49 -06:00
night1rider 2ed567c29c ECIES: take the device id from the context instead of the ECC key
A context starts in software and only wc_ecc_ctx_set_dev_id() sends the ECIES callback and the KDF, AES and HMAC steps to a device; tests, benchmark, docs and the os-check matrix are updated to match.
2026-09-15 10:18:02 -06:00
Aidan Garske e38894efef
Merge pull request #11296 from dgarske/stm32v8
Add STM32V8 (Cortex-M85) hardware crypto family support
2026-09-10 13:34:19 -07:00
Sean Parkinson 765d2165e3
Merge pull request #11202 from dgarske/c2000_hw_aes
TI C2000: hardware AES accelerator and oscillator-jitter entropy source
2026-09-10 09:40:37 +10:00
Sean Parkinson 734465e542
Merge pull request #11344 from dgarske/mldsa_c28x_octets
TI C2000 C28x: 16-bit-byte fixes, octet helpers, and an optional precomputed ML-DSA matrix A
2026-09-10 08:07:15 +10:00
David Garske 41a47d5784 Add STM32V8 (Cortex-M85) hardware crypto family support 2026-09-09 15:07:11 -07:00
David Garske a48ef5b880 Add TI C2000 oscillator-jitter entropy source and harden wc_RNG_TestSeed for wide bytes 2026-09-09 11:18:34 -07:00
David Garske b04084bff3 Add STM32CubeMX2 (MX2) support: conf detection, HAL2 example console, codegen assets 2026-09-09 09:51:22 -07:00
David Garske a5085bc13d Add TI C2000 AESA hardware AES port and fix CHAR_BIT!=8 AES defects 2026-09-08 18:20:12 -07:00
David Garske 39542cebe3 Add CHAR_BIT != 8 octet boundary helpers and fix the C28x SP regression 2026-09-08 16:29:14 -07:00
kaleb-himes 0d6d76c36d WIN-PQ-FIPSv7: correct project and documentation inconsistencies 2026-09-03 19:27:28 -06:00
kaleb-himes 80dddb8c21 WIN-PQ-FIPSv7: track user_settings variants as patches 2026-09-03 17:39:16 -06:00
kaleb-himes 21e9a78f9c WIN-PQ-FIPSv7: set WOLFSSL_X86_64_BUILD on the AES-NI PAA lane 2026-09-03 17:39:16 -06:00
kaleb-himes 7f0e128a1a Windows v7 support 2026-09-03 17:39:16 -06:00
night1rider ddbd4c10b0 Xilinx Versal Gen2 ASU: TRNG seed in the template, no compressed key ECIES 2026-08-21 11:58:32 -06:00
night1rider f7687b011d Xilinx Vitis SDT: make the settings template pick a random seed source 2026-08-20 16:50:26 -06:00
night1rider aa1f85114b Xilinx Versal Gen2 ASU: fix the Vitis build and correct the benchmark rows
The config probe now uses the target include path, and ARM assembly builds in
both modes. Documents the ECIES hardware path, drops a dead protocol branch,
declines a zero length message, and builds the ECC request helpers only where
they are called. Benchmark rows no longer claim hardware they cannot reach.
2026-08-20 08:14:14 -06:00
night1rider fe30f3fcf7 Xilinx Versal Gen2 ASU port: ECC, ECDH, ECIES and EdDSA offload 2026-08-19 03:07:37 -06:00
kaleb-himes 81c748110b Update README 2026-08-11 15:37:17 -06:00
kaleb-himes 43fa20b60d Remove legacy statement that no longer reflects todays design 2026-08-11 13:00:35 -06:00
JacobBarthelmeh 8f4fcf5dad
Merge pull request #10720 from MarkAtwood/fix/license-metadata-gplv3
fix: update license identifiers and copyright years to GPL-3.0+
2026-08-11 10:55:30 -06:00
Mark Atwood ec0ec04531 fix: use SPDX GPL-3.0-or-later license identifiers in metadata 2026-08-07 13:34:41 -07:00
David Garske 4f2fd9c23c test/benchmark/ci: CHAR_BIT != 8 test vectors, NO_MALLOC benchmark, TI C2000 compile CI and docs 2026-08-06 16:56:10 -07:00
Daniele Lacamera 290504d2d6 IDE/m33mu-falcon-verify: drop generated OTP binary, gitignore it
stm32h563_OTP.bin is a generated one-time-programmable flashing artifact,
not source. Remove it from the tree and add it to the directory .gitignore
alongside the other generated outputs (app-falcon.*) so a local build can
no longer re-add it.
2026-07-31 12:56:52 +02:00
Daniele Lacamera 502ebf4a5d Falcon: fold the AVX2/NEON FFT backends into the single falcon.c
Move the AVX2 (__m256d+FMA) and AArch64 NEON FFT intrinsics, plus the three
internal seam headers (wc_falcon_{fpr,fft,poly}.h), into falcon.c so the native
implementation is one translation unit -- matching how sha256.c and chacha.c
carry their SIMD backends inline (only hand-written .S stays a separate file).
The blocks are gated by WOLFSSL_FALCON_FFT_AVX2 / _NEON and need no per-file
CFLAGS: AVX2 self-annotates every function with target("avx2,fma") and NEON is
AArch64-baseline. Per-backend FPC_* macros are undef'd before redefinition, as
sha512.c does for SHA_METHOD. Only the generated fpr x86-64 asm remains a file.
2026-07-22 09:52:27 +02:00
Daniele Lacamera b3274a58b1 Falcon: consolidate the native C into a single falcon.c
Merge the nine wc_falcon_*.c cores into wolfcrypt/src/falcon.c, matching the
one-file-per-algorithm convention (ed25519.c, wc_mldsa.c). Sign and keygen are
gated internally on WOLFSSL_FALCON_VERIFY_ONLY and the internal helpers become
static. The fpr/fft/poly primitives stay external (shared with the separate
AVX2/NEON FFT backends) so their three headers are retained; the other five
internal headers are removed.
2026-07-22 09:52:27 +02:00
Daniele Lacamera 493bc46cb7 Falcon: address review feedback (zephyr sources, configure sub-options, footprint)
Four fixes from PR review:

- zephyr/CMakeLists.txt: the native port split falcon.c into wc_falcon_*.c
  translation units; add the portable sources so a Zephyr build with Falcon
  links. x86-64 asm/AVX2 and the NEON backend are left out (not selected by any
  Zephyr config).

- configure.ac: fold the standalone --enable-falcon-{asm,double,avx2,neon}
  switches into comma-separated sub-options of --enable-falcon
  (e.g. --enable-falcon=avx2), matching the common wolfSSL idiom. avx2/neon
  imply the double backend after arch-gating so ignoring an unsupported vector
  backend does not clobber an explicit 'double'. Sweep the qemu-falcon-neon doc
  to the new spelling.

- configure.ac: align the Falcon line in the two feature summaries.

- falcon.c/falcon.h: drop the duplicate public-key copy kept behind the private
  key. Its only remaining reader was wc_falcon_check_key, whose compare was
  against a copy of the same bytes and so could never detect a real mismatch;
  wc_falcon_export_private already rebuilds the concat layout on demand. Shrink
  key->k from FALCON_MAX_PRV_KEY_SIZE to FALCON_MAX_KEY_SIZE (saves 1793 bytes
  per key at level 5). check_key now verifies both halves are present and
  documents a full cryptographic cross-check as a follow-up. Update the unit
  test that relied on the old in-memory-copy compare.
2026-07-22 09:52:26 +02:00
Daniele Lacamera effc05a171 Falcon: remove FN-DSA / FIPS 206 references from code comments and text
Scrub the temporary "FN-DSA" name and the "FIPS 206" designation from all
in-tree comments, build text, and message strings, leaving the algorithm
named only as "Falcon". The eventual standardized name is not announced.

The differential known-answer test message ("wolfSSL FN-DSA differential
KAT") is a signed input, so the Falcon-512/1024 public keys and signatures
in wolfcrypt/test/test.c (and the mirrored Falcon-512 vector in
IDE/m33mu-falcon-verify/kat.h) were regenerated with liboqs over the new
message "wolfSSL Falcon differential KAT", preserving the differential
property (liboqs-produced signatures verified by the native verifier).

Verified: testwolfcrypt Falcon test passes; the m33mu verify-only harness
passes (BKPT 0x7f) with the regenerated vector.
2026-07-22 09:52:26 +02:00
Daniele Lacamera 84b6a59243 Falcon: AArch64 NEON (float64x2_t) vectorized FFT for signing/keygen
Add wc_falcon_fft_neon.c, the 2-wide-double counterpart of the AVX2 FFT
backend: it processes two doubles per 128-bit vector with fused multiply-add
for the complex butterflies (falcon_FFT / falcon_iFFT), over the inline-double
fpr backend. Enabled with --enable-falcon-neon (AArch64; implies
--enable-falcon-double). Advanced SIMD is part of the ARMv8-A baseline, so no
special -march is needed; the scalar FFT/iFFT in wc_falcon_fft.c are excluded
under WOLFSSL_FALCON_FFT_NEON, and only the tail level (ht/t == 1) falls back to
scalar. Like the AVX2 backend, it does not promise bit-identical (no-FMA)
results; that is safe for the signing FFT (the sampler's determinism and
verification are unaffected).

Tested under qemu-system-aarch64 -machine virt (cortex-a53) via the new
IDE/qemu-falcon-neon bare-metal harness: a full keygen -> sign -> verify
round-trip at levels 1 and 5 accepts genuine signatures and rejects tampered
ones (NEON_FFT_PASS), with vector fmla v.2d confirmed in the FFT.
2026-07-22 09:52:26 +02:00
Daniele Lacamera 0fa4e0d160 Falcon: ARM DSP (SMLA*/SMUAD) accelerated verify NTT + norm
Add an optional Cortex-M (ARMv7E-M / ARMv8-M) DSP-accelerated verify path,
auto-enabled on cores with the DSP extension (__ARM_FEATURE_DSP; Cortex-M4/M7/
M33). It is bit-identical to the scalar Barrett path (validated over 40k random
polynomials per level) and controlled by WOLFSSL_FALCON_NTT_DSP /
WOLFSSL_FALCON_NO_NTT_DSP.

  - NTT/iNTT butterflies process two packed 16-bit coefficients per iteration:
    SMLABB/SMLATB 16x16 twiddle multiplies (values are < q < 2^14), SADD16/
    SSUB16 packed adds, and a USUB16+SEL packed conditional subtract of q.
  - The pointwise multiply packs two coefficients per iteration (SMLABB/SMLATT).
  - The squared l2-norm accumulates two coefficients per SMUAD (a.lo^2+a.hi^2).

Tested on the STM32H563 (Cortex-M33) emulator m33mu via the new
IDE/m33mu-falcon-verify harness: the DSP path accepts a genuine Falcon-512 KAT
signature and rejects a tampered one (BKPT 0x7f), with SMUAD/USUB16/SEL/SMLABB
confirmed present in the image.

Also fixes three latent verify-only (WOLFSSL_FALCON_VERIFY_ONLY) build issues
surfaced by the embedded target:
  - falcon.h: include random.h unconditionally so WC_RNG is visible for the
    always-declared wc_falcon_sign_msg prototype.
  - falcon.c: define falcon_store_pub_behind_priv unconditionally
    (wc_falcon_import_public, a verify-only op, calls it).
  - falcon.c: silence unused inLen/rng in the verify-only sign stub.
2026-07-22 09:52:26 +02:00
Daniele Lacamera 509b29bc9c Remove liboqs dependency
Falcon was the last algorithm backed by liboqs; now that wolfCrypt has a
native Falcon implementation, liboqs is no longer needed. Remove the
integration entirely so liboqs does not appear as a build or SBOM dependency:

  - configure: drop --with-liboqs (and the -loqs link), the BUILD_LIBOQS
    conditional and the summary line.
  - CMake: drop WOLFSSL_OQS, the duplicate liboqs-backed WOLFSSL_FALCON
    option, the OQS cross-validation / find_package(OQS) block, the
    FindOQS.cmake module, BUILD_OQS_HELPER, and HAVE_LIBOQS from options.h.in.
  - Remove the wolfcrypt/src/port/liboqs port layer (liboqs.c/.h) and its
    wolfSSL_liboqsInit/Close calls in wc_port.c.
  - settings.h: drop HAVE_LIBOQS from the asym key import/export aggregates
    (HAVE_FALCON already covers them) and from the experimental gate; add
    HAVE_FALCON to the experimental gate so the unstandardized Falcon requires
    WOLFSSL_EXPERIMENTAL_SETTINGS in every build system.
  - Drop liboqs.c from the VS/Zephyr/INTIME project files, remove the liboqs
    install from Docker, and update INSTALL/tls.c text (Falcon is native now).

No functional change to non-Falcon builds; the library links no liboqs.
2026-07-22 09:52:26 +02:00
Tobias Frauenschläger 29506d2cac build: distribute IDE project trees per-directory to fix "make dist"
The non-recursive automake "distdir" recipe inlines the entire $(DISTFILES)
list into a single shell command. Enumerating every IDE integration file
individually made that list large enough (~123 KB) that the recipe exceeded
the Linux MAX_ARG_STRLEN (128 KB) single-argument exec limit, so "make dist"
failed with:

    /bin/bash: Argument list too long
    make[2]: *** [distdir-am] Error 127

Replace the per-file EXTRA_DIST enumeration of the IDE directories with one
wholesale "EXTRA_DIST += IDE/<dir>" entry per directory (automake copies the
tree recursively). This collapses ~745 file entries into ~52 directory
entries and shrinks the top-level DISTFILES from ~123 KB to ~97 KB, well
under the limit.

The set of distributed IDE files is unchanged: a before/after "make dist"
diff shows no project file added or removed (only the now-unused include.am
build fragments are gone). Three directories that intentionally omit some
tracked files (apple-universal, MPLABX16, Renesas - private IDE configs,
.gitkeep placeholders, helper scripts) stay enumerated file-by-file.
2026-07-20 17:22:10 +02:00
Tobias Frauenschläger 673d8d00bb
Merge pull request #10778 from SparkiDev/time_stamp_protocol
Time-Stamp Protocol (RFC 3161)
2026-07-08 17:43:38 +02:00
Sean Parkinson ae023a5643 Time-Stamp Protocol (RFC 3161)
Implementation in wolfCrypt
OpenSSL compatibility layer in wolfSSL
Added tests, certificates, examples.
2026-07-08 09:33:47 +10:00
David Garske a296ac07fc
Merge pull request #10842 from miyazakh/f6162_tsiphash
[Renesas RX72N] RX72N TSIP fixes and command-line build/flash/UART tooling
2026-07-07 16:17:30 -07:00
Ruby Martin 3cc906f5d1 Rework fail cleanup (GCC-ARM) 2026-07-06 16:27:01 -06:00
Ruby Martin 1cad9fb5b6 IDE examples: fix ssl double-free and unsafe connd close in servers 2026-07-06 16:27:01 -06:00
Ruby Martin e54ef44870 Fix ssl double-free and accepted-socket leak in Azure Sphere server
Set ssl = NULL after the per-connection free so the final util_Cleanup
no longer double-frees it; close(connd) on post-accept error paths.
2026-07-06 16:27:01 -06:00
Ruby Martin f5610a8a76 Jump to exit on error paths to free resources before returning
iotsafe-raspberrypi: goto exit on cert-load failure (was return -1).
MQX server: replace bare return -1 with goto exit + guarded cleanup.
QNX client: correct cleanup-ladder jump targets to unwind properly.
initialize ctx and ssl to NULL
validate wolfIoTSafe_GetCert's int return before casting to uint32_t
2026-07-06 16:27:01 -06:00
Hideki Miyazaki 954c342c53 trailing whitespace 2026-07-05 12:09:47 +09:00
Hideki Miyazaki 0910472a34 addressed review comments 2026-07-03 18:41:59 +09:00
Hideki Miyazaki d4762ef138 addressed review comments 2026-07-03 15:30:26 +09:00
Hideki Miyazaki 55c2bc5271 fix tsip hashinit return value(f6162)
- Add GCM_TABLE_4BIT
  - Add build.bat for command line build
  - f5419 mutex
  - f6163 AES aadBuf
  - Add debug_run.bat to write and run the example from CL
  - Add UART message
  - Messages are routed sci2_uart_charput(). To get back to Virtual Consol, it takes BSP_CFG_USER_CHARPUT_ENABLED 0.

f1535 error messaages typo
2026-07-03 13:38:22 +09:00
Emma Stensland 92e76d4667 updated email to facts@wolfssl.com 2026-06-26 14:44:16 -06:00
jordan 0fe21bbcd5 prepare for release 5.9.2 2026-06-24 12:01:51 -05:00
Daniel Pouzzner 513bbccf9d
Merge pull request #10574 from embhorn/zd21918
Fix in IoTSafe RaspPi client example
2026-06-03 22:36:51 -05:00
Daniel Pouzzner c96da9a002
Merge pull request #10581 from miyazakh/ra6m4_update
Removes the legacy ASN parser override (`WOLFSSL_ASN_ORIGINAL`) from …
2026-06-03 20:42:46 -05:00