-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Context
sigil currently signs Wasm modules via wasmsign2 custom sections. when synth transcodes Wasm to native ARM, the output is an ELF binary or raw firmware image — no more Wasm custom sections to embed signatures in.
the attestation chain needs to extend across the Wasm → native boundary:
.wasm → meld (wasm sig) → loom (wasm sig) → synth → ELF/firmware (???)
Approach
sigil needs format-aware signing backends beyond Wasm:
MCUboot TLV (primary — embedded Cortex-M targets)
MCUboot is the de facto secure boot standard for 32-bit MCUs (Zephyr, TF-M, most RTOS ecosystems). it uses a header + TLV (Type-Length-Value) structure appended to the image containing:
- SHA256 hash
- signature (ECDSA-P256, Ed25519, or RSA)
- key hash
- protected TLVs (included in hash calculation)
sigil producing MCUboot-compatible signed images means the device's existing secure boot chain can verify them without custom tooling.
ELF .signature section (secondary — Linux targets)
for ELF binaries targeting larger ARM platforms: hash the PT_LOAD segments, sign the result, embed in a .signature or .note.sigil section. the kernel binfmt_elf loader can verify at load time.
Detached attestation (already partially supported)
SLSA provenance and Sigstore bundles are format-agnostic — they link an artifact hash to the pipeline that produced it. this layer already works for any output format, but doesn't provide on-device verification at boot.
Scope
- define artifact format detection (Wasm component → Wasm module → ELF → raw binary)
- implement MCUboot TLV signing backend
- implement ELF section signing backend
- carry attestation chain metadata across the Wasm → native boundary in SLSA provenance
- ensure the full pipeline (meld → loom → synth → sigil) produces a verifiable artifact end-to-end
References
- MCUboot design
- MCUboot imgtool
- ARM TF-M secure boot
- signelf — ELF signing
- LWN — Signing ELF binaries
- feat: post-quantum signature support (SLH-DSA / FIPS 205) #46 — post-quantum signatures (SLH-DSA) relevant for both Wasm and native signing