Sigil

A security key that still signs after quantum computers arrive.

Sigil is a FIDO2 / CTAP2 security key built on the ESP32-S3. It signs with SLH-DSA (FIPS 205), a hash-based post-quantum scheme, instead of ECDSA or EdDSA.

Why post-quantum?

Today's passkeys and security keys sign with elliptic-curve algorithms. Shor's algorithm breaks these on a large enough quantum computer, so a key's public half could be used to forge its signatures. Credentials registered now may outlive the hardware that protects them.

SLH-DSA relies only on the security of hash functions. That makes it the most conservative post-quantum choice, at the cost of larger signatures. Fitting those into a USB security key is the engineering problem Sigil explores.

Hash-based

Security rests on SHA-256, with no lattice or code assumptions.

FIPS 205

SLH-DSA-SHA2-128s and -128f are implemented from the NIST standard.

Real FIDO2

CTAP2 GetInfo, MakeCredential and GetAssertion over CTAPHID on USB HID.

Hardware aware

Uses the ESP32-S3 SHA engine, with software, driver, register and hybrid modes to compare.

How it works

Registration and authentication follow the standard FIDO2 ceremonies. The only change is the signature algorithm, and the large signature is sent in fragments through a vendor command (0x51) because a CTAPHID message has a size limit.

Registration and authentication flow between browser, relying party and Sigil
Registration and authentication flow.
Sigil device block diagram
Device schematic.

Credential wrapping

The credential ID holds the wrapped key material, authenticated with an HMAC from an eFuse key and checked in constant time.

Hedged signing

Signatures mix fresh randomness with the message, as FIPS 205 recommends.

Independent check

The server verifies with a separate Python implementation, not the firmware's C code.

Parameter sets

SetStandardProvisional COSE IDNote
SLH-DSA-SHA2-128sFIPS 205-65701Small signature, slow to sign
SLH-DSA-SHA2-128fFIPS 205n/aFaster signing, larger signature
q20Experimental-65799Reduced signature budget, not a FIPS parameter set

The COSE identifiers for SLH-DSA are not final (draft-ietf-cose-sphincs-plus), so Sigil uses private-use values for now.

Status

Verified on a PC

  • 29 automated tests pass.
  • The C implementation matches an independent Python reference bit for bit, for 128s, 128f and q20.
  • End-to-end register and login, client to simulated device to server.
  • Forged credentials, signatures, replays and wrong-RP requests are rejected (16 security checks).
  • Firmware builds without warnings in its own components.

Not done yet

  • Running the firmware on an ESP32-S3 board.
  • Measuring the hardware SHA speed-up and real USB latency.
  • Fault-injection testing.
  • NIST ACVP test vectors, required before claiming FIPS 205 conformance.
Why not webauthn.io? Browsers and public WebAuthn sites reject SLH-DSA because its COSE algorithm ID is unassigned. Sigil is exercised with a desktop app, a CLI and a simulator for now. The demo shows the standard WebAuthn flow with whatever authenticator your browser offers.

Try it

Run the standard WebAuthn registration and login against this site, and inspect the decoded authenticator data, flags and public key.