Skip to content

Add --enable-tinytls13 TLS 1.3-only footprint profile#10751

Open
aidangarske wants to merge 2 commits into
wolfSSL:masterfrom
aidangarske:tinytls13
Open

Add --enable-tinytls13 TLS 1.3-only footprint profile#10751
aidangarske wants to merge 2 commits into
wolfSSL:masterfrom
aidangarske:tinytls13

Conversation

@aidangarske

Copy link
Copy Markdown
Member

Description

Adds --enable-tinytls13, a TLS 1.3-only footprint profile for embedded and resource-constrained targets. It is a translation layer over
existing wolfSSL macros (the WOLFSSL_TINY_TLS13 umbrella in settings.h), so it adds no new feature flags to the core library. Non-FIPS.

Profiles and adders

  • PSK floor (default): PSK + ECDHE, no X.509 (X25519, AES-128-GCM, SHA-256, HKDF). The smallest build.
  • Cert profile (cert): minimal X.509 chain verify (ECDSA P-256). A reduced-security verify (no name constraints, relaxed ASN.1, no CRL) for
    a known or pinned CA, not public-internet PKI. Surfaced in the configure output and docs.
  • Adders (comma-separated): server, mutualauth, staticmem, asm, p256, sha384, mldsa (ML-DSA-65 verify), rsaverify (RSA-PSS verify). For
    example --enable-tinytls13=cert,server,mldsa.

Footprint

Flash of the gc-sectioned linked client (-Os -flto --gc-sections), Cortex-M33:

Config Cortex-M33 x86_64 aarch64
PSK, X25519 (floor) 30.1 KB 54.8 KB 49.5 KB
PSK, P-256 36.5 KB 64.5 KB 57.9 KB
Cert, ECDSA P-256 61.3 KB 108.2 KB 93.2 KB
Mutual TLS 65.0 KB 114.1 KB 97.5 KB

Testing

The added tinytls13.yml workflow builds and tests every profile and adder on a single runner (parallel-make-check.py, ccache, same setup as
psk.yml). Stripped configs that the broad unit suite cannot gate for are build-verified with testwolfcrypt plus
examples/configs/tinytls13_smoke.c, a self-contained in-memory TLS 1.3 handshake that drives PSK, ECDSA, ML-DSA-65 and RSA-PSS chain
verification, plus forced ChaCha20-Poly1305 / AES-256-GCM / X25519MLKEM768.

aidangarske and others added 2 commits June 19, 2026 15:22
Make every --enable-tinytls13 spelling build and pass locally, and grow the
CI matrix to cover them. These are fixes found while testing the configs the
CI workflow had not actually exercised.

- internal.h, internal.c, ssl_load.c: include ML-DSA and Falcon in the
  pkCurveOID member and producer guards so the PSK plus ML-DSA build compiles.
- tls13.c: gate the DoTls13CertificateVerify definition on NO_CERTS to match
  its call site.
- settings.h: let the AES-256 adder survive the floor, default the
  user_settings path to the SHA-256 floor, make WOLFSSL_NO_MALLOC opt-in so
  the test suite still runs, and keep ML-DSA ASN.1 for the cert profile.
- configure.ac: drive ENABLED_ASM and emit WOLFSSL_NO_ASM for the small C
  floor, restrict SP math to P-256, strip ML-DSA ASN.1 only on the PSK floor,
  and print a notice for the reduced security cert verify.
- examples: guard the cert loading paths for NO_CERTS and treat NO_CERTS as
  PSK mode in echoserver and echoclient.
- Add examples/configs/tinytls13_smoke.c, an in memory TLS 1.3 handshake test
  that drives PSK, ECDSA, ML-DSA-65 and RSA-PSS chain verify, plus forced
  cipher suites, for builds with no example or unit test harness.
- certs: add ECDSA leaves signed by the ML-DSA-65 and RSA-PSS CAs so the cert
  profiles drive a real PQC and PSS chain verify in CI.
- .github/workflows/tinytls13.yml: cover every profile and adder, run the
  smoke handshake on the build verified configs, and least privilege the
  workflow token.
@aidangarske aidangarske marked this pull request as ready for review June 22, 2026 20:07
@github-actions

Copy link
Copy Markdown

retest this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants