SecureSign — Quantum-Safe Digital Signing on a Type-C Dongle
A one-page view of the problem SecureSign solves, the proposed production architecture (a single FPGA secure element with post-quantum signing — no separate microcontroller), where the project stands today, and the decisions needed to move forward.
The problem
Three gaps in how digital signing works today — in India and worldwide — each of which SecureSign addresses directly.
1 Signing is stuck on the desktop
Hardware signing tokens — DSC tokens in India, qualified signature devices in the EU, government PKI cards elsewhere — each need their own driver or middleware (ePass2003, eToken, Watchdata …). None of it works on Android or iOS, so filing a tax return, signing a tender or approving a contract still means going back to a PC — even though most business now happens on mobile.
2 Software certificates expose the key
The common workaround — a .pfx certificate file signed in software or a cloud signing account —
takes the private key out of the user's hands. On a general-purpose device it can be copied and misused by
malware, with no tamper resistance and no proof the key stayed under the owner's sole control, which is what
the strictest signature laws (such as EU qualified signatures) require.
3 Today's algorithms have an expiry date
RSA and ECDSA, used by almost every digital signature scheme in the world, can be broken by a sufficiently large quantum computer. Signed contracts, land records and regulatory filings must stay trustworthy for 10–30 years, and regulators in the US and EU have already set migration timelines — so signing hardware sold today needs a path to quantum-safe algorithms without a complete redesign.
The solution
One generic dongle, one hardware root of trust, two signature algorithms.
1 Driverless, any platform
The dongle presents itself as a standard smart-card reader (USB CCID class), which Windows, macOS, Linux, Android and iOS already understand. Apps integrate through a thin SDK — native or WebView — with no vendor driver to install.
2 The key never leaves the silicon
A Physically Unclonable Function (PUF) in the FPGA derives a unique root key from the chip's own physical variations. Signing keys are generated on-device from that root and exist only in on-chip memory while in use — they are never stored, exported or seen by the phone or PC.
3 Quantum-safe, and compliant today
Each document can carry two signatures: ECDSA P-256, which CCA-licensed CAs and today's validators accept, and ML-DSA, the NIST post-quantum standard. Because it is an FPGA, the crypto engines can be updated in the field with a signed update as standards evolve.
Where SecureSign stands out
How SecureSign compares with the signing options available today. It is the only option that combines a hardware-held key, mobile use without drivers, and post-quantum readiness.
Based on publicly available product information; vendor capabilities change, so confirm current status before external use.
System overview
The production architecture: one FPGA does everything — protocol, policy, cryptography, key storage and secure boot — with no separate microcontroller. Glowing green blocks are the post-quantum parts.
SoC block diagram
Everything inside the dashed line is one FPGA. The CPU runs the card logic over the AHB system bus, the crypto engines sign, and the PUF key vault feeds keys to them over a private hardware bus — nothing secret ever crosses the chip boundary. The red numbers trace one signature from USB request to key wipe; the blue U-markers trace a secure post-quantum firmware update.
Planned production architecture — clock rates, memory sizes and block choices are proposed values, confirmed in the Simulator and FPGA-prototype phases. Gold = hardware-only key & entropy bus · purple dashed = clocks/resets and interrupts · red dashed = tamper zeroize · red ✕ = JTAG blocked in production · red ①–⑧ = signing flow · blue U1–U5 = secure firmware-update flow.
- APDU in. The phone/PC sends
VERIFY PINandPSO:SIGN(64-byte digest) over USB-C → PHY → USB device (CCID bulk-OUT FIFO). - Parse & authorise. The RISC-V core parses the APDU; the PIN Policy block checks the PIN against the OTP retry counter (63Cx on failure, 6983 when locked).
- Move the digest. Crypto DMA copies the digest from scratch SRAM to the engines — the CPU never handles key material.
- Derive keys. The PUF Key Vault rebuilds the root key, derives the ML-DSA seed ξ and ECDSA key d (SHAKE-256), and delivers them over the private gold key bus, with fresh TRNG randomness.
- Quantum-safe signature. The ML-DSA-65 engine (using the shared Keccak core) produces a 3 309-byte signature.
- Classic signature. The ECC engine produces the 64-byte ECDSA P-256 signature that today's CAs and validators accept.
- Reply. DMA returns both signatures to the USB bulk-IN FIFO; the 3.3 KB ML-DSA signature goes out in 61xx / GET RESPONSE chunks.
- Wipe. Key slots and scratch SRAM are zeroized. Any tamper event at any time triggers an NMI and an immediate key wipe (red line).
- Image in. The signed update package (firmware + FPGA design + ML-DSA / LMS signature + version) arrives over USB in chunked APDUs.
- Stage it. The CPU writes it to the inactive A/B slot in external SPI flash — the running image is never overwritten, so a failed or interrupted update cannot brick the dongle.
- Verify (post-quantum). On the next boot the golden boot ROM runs power-on self-tests, then verifies the image signature with the ML-DSA / Keccak engines against the update public-key hash fused in OTP.
- Anti-rollback. The image version must be higher than the OTP monotonic counter; only then is the counter advanced and the slot marked active. Older (possibly vulnerable) images are refused forever.
- Activate. The clock & reset unit restarts the device into the new image. Keys are re-derived from the PUF — no key material is ever part of an update package.
| Area | Specification |
|---|---|
| Clocks | 24 MHz crystal → PLL: core/AHB 100 MHz, USB ULPI 60 MHz, APB 50 MHz; clock-domain crossing in the AHB→APB bridge and USB FIFOs |
| Buses | AHB-Lite 32-bit system bus (masters: CPU, Crypto DMA, USB DMA) with firewall/MPU; APB3 32-bit peripheral bus; separate hardware-only key & entropy bus |
| CPU & memory | RISC-V RV32IMC, machine-mode only with PMP; 32 KB immutable boot ROM; 64 KB scratch SRAM (TCM), zeroized after every signature; PLIC with 8 IRQ inputs + NMI |
| ML-DSA-65 | NIST FIPS 204, q = 8 380 417, n = 256, (k, l) = (6, 5); public key 1 952 B, signature 3 309 B; NTT/INTT core, masked arithmetic, ≈ 24 KB polynomial BRAM; secret key re-derived from 32-byte seed ξ |
| ECDSA | NIST P-256, constant-time scalar multiplication, 64-byte (r‖s) signature over SHA-256 digest |
| Key hierarchy | SRAM PUF → fuzzy extractor → 256-bit root key → SHAKE-256 KDF → K_id (identity), ξ (ML-DSA), d (ECDSA); volatile key slots only, nothing secret stored in flash |
| Interfaces | USB 2.0 device (CCID class) via external ULPI PHY on Type-C; QSPI to external flash (certificates, PUF helper data, signed firmware); GPIO/LED; tamper sensor inputs |
| Protection | JTAG fused off, signed debug unlock; post-quantum-signed firmware updates (LMS or ML-DSA) checked by the golden boot ROM; A/B image slots; anti-rollback counter in OTP; tamper → NMI + key wipe; watchdog hang → reset + key wipe |
| Self-test & attestation | Power-on known-answer tests for ML-DSA, ECDSA, SHA-3, AES and TRNG health before any key is used; device identity key K_id (PUF-derived) signs an attestation proving the dongle is genuine |
| Board-level | USB Type-C with 5.1 kΩ CC pull-downs (device role) and ESD protection; VBUS 5 V → LDO regulators for FPGA core/IO rails; 24 MHz crystal; QSPI flash; status LED and button; tamper mesh/switch inputs |
| Requirement | Handled by | Status in design |
|---|---|---|
| Private key never leaves the dongle | PUF Key Vault, hardware-only key bus, bus firewall (no CPU/DMA read path) | Covered |
| Cryptography executed on-token | ML-DSA-65, ECC P-256, Keccak, AES engines inside the FPGA | Covered |
| PIN verified on-device with lockout | PIN Policy + OTP retry counter (63Cx / 6983) | Covered |
| Quantum-safe signatures | ML-DSA-65 engine; hybrid with ECDSA for today's CAs | Covered |
| Secure, quantum-safe firmware update | Golden boot ROM + PQC signature verify + A/B slots + OTP anti-rollback (flow U1–U5) | Covered |
| Tamper / replay / fault protection | Tamper monitor, clock/voltage glitch detect, watchdog, all → key wipe; APDU timeouts | Covered |
| Driverless on any platform | USB CCID class device (standard smart-card reader) | Covered |
| Device authenticity | K_id attestation key derived from the PUF | Covered |
| Side-channel resistance | Masked ML-DSA, constant-time ECC and PIN compare | Designed — needs lab validation |
| Certification (FIPS 140-3 / CC / CCA) | Self-tests, key hierarchy and lifecycle states are in place to support it | External lab — later phase |
Roadmap
| Phase | Scope | Outcome |
|---|---|---|
| 1 · Complete the prototype | Missing card commands, security architecture document, host SDK and demo app, Linux/macOS testing | A demonstrable, documented end-to-end product on the current board |
| 2 · Simulator | A bit-accurate software model of the whole dongle (APDU commands, PIN policy, ECDSA and ML-DSA), so the SDK and apps can be built and tested with no hardware. Every FPGA block (RISC-V core, USB/CCID, crypto engines, PUF key manager) is then checked in RTL simulation against that model and the official NIST test vectors. | The complete design verified in simulation; SDK and app development no longer wait for hardware |
| 3 · FPGA prototype | The full design running on an off-the-shelf FPGA evaluation board, connected over USB to real phones and PCs and signing real documents end to end. | The design proven on real FPGA hardware — before committing to the production FPGA and custom board |
| 4 · Production FPGA secure element | Select a non-volatile, security-grade FPGA; move everything onto it: RISC-V soft processor with the USB/CCID stack, policy engine, ECC engine, PUF key manager, TRNG, secure boot and update | A single-chip secure element with hardware-rooted keys — no microcontroller |
| 5 · Post-quantum signing | ML-DSA engine, Keccak core, chunked large responses, hybrid signing in the SDK, test CA for ML-DSA certificates | Quantum-ready dongle signing with both ECDSA and ML-DSA |
| 6 · Mobile & compliance | Android/iOS SDK and WebView bridge, CCA-licensed CA certificate, independent security evaluation | Field-ready product for mobile DSC signing |
How a signature is made
What happens when a user signs one document. The document itself never leaves the phone or PC.
Why an FPGA
| Option | Post-quantum support | Can be upgraded later | Hardware-rooted key | Verdict |
|---|---|---|---|---|
| Microcontroller only (today's prototype) | Software only, slower, harder to protect against side-channel attacks | Firmware update | No secure element on the prototype MCU | Good for proving the protocol |
| Off-the-shelf secure element chip | Depends on the chip vendor's roadmap | Rarely — fixed silicon | Yes | Fast to market, locked to a vendor |
| MCU + FPGA (two chips) | Yes, in the FPGA | Yes | Yes | Works, but keys and boot cross a chip-to-chip link that can be probed |
| Single FPGA secure element (proposed) | Dedicated ML-DSA engine, built and controlled in-house | Yes — post-quantum-signed update in the field | Yes — PUF-derived, never leaves the chip | Chosen: one chip, smallest attack surface, full ownership |
| Custom ASIC | Yes | No | Yes | Only at very high volume |
Key technical facts
| Item | ECDSA P-256 (today) | ML-DSA-65 (post-quantum) | What it means |
|---|---|---|---|
| Standard | FIPS 186-5 | NIST FIPS 204 (2024) | Both are published NIST standards |
| Signature size | 64 bytes | 3,309 bytes | Needs chunked USB responses — designed in |
| Public key size | 64 bytes | 1,952 bytes | Larger certificates (≈5–7 KB) |
| Quantum-safe | No | Yes | Why both are carried during the transition |
| Accepted by CCA today | Yes | Not yet | ECDSA keeps every signature legally valid now |
| Signing time (target) | < 1 ms on FPGA | A few ms on FPGA | Imperceptible to the user; USB transfer dominates |
| FPGA cost (estimate) | — | ≈15–30k LUTs, 10–30 BRAMs | Fits mid-range FPGAs; to confirm in synthesis |
Where we are today
✓ Proven on the prototype
Driverless USB smart-card enumeration, on-device PIN check with lockout, on-device ECDSA signing in under 700 ms, and a real PDF signed through standard tools (PKCS#11, jSignPdf) with the signature independently verified.
! Not built yet
The FPGA secure element itself (including the ML-DSA engine and PUF key manager), the Android/iOS SDK, the remaining card commands (key generation, PIN change/unblock), the security architecture document, and a CA-issued certificate. The prototype uses a fixed demo key and PIN.
Risks and how we handle them
| Risk | Impact | Mitigation |
|---|---|---|
| CCA does not yet issue post-quantum DSCs | ML-DSA signatures are not legally recognised on their own | Hybrid design: ECDSA carries legal validity now; ML-DSA is added alongside and becomes primary when CAs support it |
| Validators and PDF readers lag behind | Post-quantum signatures not shown as valid in common tools | Second signature never replaces the first; verification tooling provided in the SDK |
| Side-channel attacks on the FPGA | Key could leak through power or timing measurements | Masked, constant-time ML-DSA implementation; independent lab evaluation before launch |
| Standards keep evolving | Algorithms or parameters may change | FPGA crypto engines are field-upgradable through a signed, verified update |
| FPGA size, cost and power | The FPGA must fit the soft processor and all crypto engines | Engines share one hash core; size confirmed in synthesis before choosing the device; removing the MCU offsets part of the cost |
| Choosing the right FPGA family | Not every FPGA can hold its design securely on-chip | Short-list only non-volatile, security-grade families (on-chip configuration, bitstream encryption, tamper detection, ideally a hardware PUF) and confirm each vendor's post-quantum roadmap |
Decisions needed
- Approve the FPGA + post-quantum track as the production architecture, with ECDSA kept for CCA compliance.
- Approve a single-FPGA design (no microcontroller) and fund evaluation boards for a short-list of security-grade FPGA families, plus simulation tools and an FPGA evaluation board for the prototype, and tools for the secure-element and ML-DSA work (Phases 2–5).
- Open a conversation with a CCA-licensed CA about test post-quantum certificates and their roadmap.
- Plan an independent security evaluation of the FPGA secure element before field deployment.
Open-source code for each SoC module
Every block in the SoC block diagram has an open-source starting point. The links go to the source code. RionCore adapts and integrates these blocks rather than writing them from zero. Simulation tools, the host smart-card stack and PDF signing are in the open-source list on the Simulator tab.
| SoC module | Open-source code | How it fits |
|---|---|---|
| CPU — RISC-V RV32IMC | Ibex Apache-2.0 PicoRV32 ISC VexRiscv MIT | Ibex is the security-hardened choice (used in OpenTitan); rion_rv32 stays the in-house candidate. |
| Interrupt controller (PLIC) | OpenTitan rv_plic Apache-2.0 | Routes USB, crypto-done and tamper IRQs to the CPU. |
| Golden boot ROM · secure update (A/B) | OpenTitan rom_ctrl Apache-2.0 Caliptra ROM & firmware Apache-2.0 MCUboot Apache-2.0 | ROM integrity check plus signed A/B image swap; RionCore adds the ML-DSA signature check (U1–U5). |
| Secure scratch SRAM | OpenTitan sram_ctrl Apache-2.0 | Scrambled RAM with fast wipe after every signature. |
| Secure debug | PULP riscv-dbg Solderpad-0.51 OpenTitan rv_dm Apache-2.0 | Standard RISC-V debug module, locked by lifecycle state in production. |
| Bus firewall / MPU | Ibex PMP Apache-2.0 RionCore glue | Ibex has RISC-V PMP built in; the bus-side firewall rules are RionCore integration work. |
| AHB-Lite interconnect · AHB→APB bridge | PULP apb Solderpad-0.51 LiteX SoC builder BSD-2 Roa Logic AHB-Lite Non-commercial | OpenTitan IP uses the TL-UL bus, so a thin TL-UL↔AHB/APB adapter is RionCore work. Roa Logic is for reference only. |
| Crypto DMA | PULP iDMA Solderpad-0.51 OpenTitan dma Apache-2.0 | Moves message blocks into the engines without the CPU touching them. |
| USB 2.0 device + CCID | no2usb CERN-OHL-P / LGPL ValentyUSB BSD-3 OpenTitan usbdev Apache-2.0 usbd-ccid Apache-2.0 | Full-speed USB device core in RTL; usbd-ccid is a clean reference for the smart-card (CCID) class. |
| ML-DSA-65 engine | Adams Bridge (RTL) Apache-2.0 mldsa-native (C) Apache / ISC / MIT CRYSTALS-Dilithium ref. CC0 / Apache-2.0 PQClean CC0 / various | Adams Bridge is the closest open ML-DSA hardware starting point; the C code is the golden model for the simulator. |
| Keccak-f[1600] (SHA-3 / SHAKE) | OpenTitan kmac Apache-2.0 secworks sha3 BSD-2 XKCP CC0 (mostly) | OpenTitan KMAC is masked against side channels; XKCP gives the reference values. |
| ECC P-256 (ECDSA) | OpenTitan OTBN Apache-2.0 Caliptra RTL (ECC) Apache-2.0 Mbed TLS Apache-2.0 | OTBN is a big-number engine that runs P-256; Mbed TLS is already used in today’s prototype. |
| AES-256 · SHA-256 | OpenTitan aes Apache-2.0 OpenTitan hmac Apache-2.0 secworks aes BSD-2 secworks sha256 BSD-2 | OpenTitan AES is masked; secworks cores are small and easy to read. |
| PUF key vault + TRNG | OpenTitan keymgr_dpe Apache-2.0 OpenTitan entropy_src Apache-2.0 OpenTitan csrng Apache-2.0 secworks trng BSD-2 PUF: vendor / certified IP | Key ladder and hardware-only key bus come from keymgr; there is no production-grade open PUF. |
| NVM / OTP controller · lifecycle | OpenTitan otp_ctrl Apache-2.0 OpenTitan lc_ctrl Apache-2.0 | Anti-rollback counter, update key hash, lifecycle state and PIN retry counter. |
| Tamper monitor · alerts | OpenTitan sensor_ctrl Apache-2.0 OpenTitan alert_handler Apache-2.0 | Collects tamper inputs and triggers key zeroize; the sensors themselves are FPGA-vendor features. |
| PIN policy · card applet | trussed Apache-2.0 PIV authenticator Apache-2.0 (archived) | Reference designs for PIN retry counters and APDU handling; the RionCore applet is our own firmware. |
| SPI flash controller | OpenTitan spi_host Apache-2.0 LiteSPI BSD-2 | Quad-SPI access to firmware A/B slots and the certificate store. |
| Timer · watchdog | OpenTitan rv_timer Apache-2.0 OpenTitan aon_timer Apache-2.0 | aon_timer includes the watchdog (hang → reset + key zeroize). |
| GPIO · status LED · button | OpenTitan gpio Apache-2.0 | LED colours and the touch/confirm button. |
| Clock · reset · power | OpenTitan clkmgr Apache-2.0 OpenTitan rstmgr Apache-2.0 OpenTitan pwrmgr Apache-2.0 | The PLL and clock primitives come from the FPGA vendor. |
SecureSign Simulator — Prove the Design Before the Hardware
The plan for Phase 2 of the roadmap: a complete software model of the dongle that app teams can use from day one and that every FPGA block is verified against — followed by a live demo you can try in this page.
Why a simulator first
1 App work starts now
The SDK, demo app and PDF-signing integration can be built and tested against the virtual dongle while the hardware is still in design — the two tracks run in parallel instead of one after the other.
2 One source of truth
The simulator defines exactly what every command must return. The FPGA design is correct when its outputs match the simulator bit-for-bit — no ambiguity between the software and hardware teams.
3 Cheaper mistakes
A protocol or cryptography bug found in simulation costs minutes to fix. The same bug found on a board — or after the production FPGA is chosen — costs weeks and a hardware respin.
Simulator architecture
The simulator sits where the dongle will sit. Real signing tools talk to it through a virtual reader, and the hardware verification harness compares every FPGA block against it.
How verification flows
Each step must pass before the next starts. The last step is the entry ticket to Phase 3 (FPGA prototype).
Tools, deliverables and exit criteria
| Area | What |
|---|---|
| Tools | Python reference model; virtual PC/SC reader; Verilator and cocotb for RTL co-simulation; Yosys for early size estimates. Verilator, Yosys, Icarus Verilog and GTKWave already ship in the RionCore Tarang2p1 lab image. |
| Deliverables | Simulator package and virtual reader for the app team; regression test suite (APDU, PIN, crypto, PDF signing); RTL test benches for every FPGA block; size and timing estimates for the FPGA short-list. |
| Exit criteria | 100% of NIST vectors pass · all Testing Guide cases pass on the simulator · every RTL block matches the model · full-system RTL signs a PDF in simulation. |
Try it — live simulator demo
A small version of the simulator running in this page. It produces real ECDSA P-256
and real ML-DSA-65 (FIPS 204) signatures and shows the smart-card commands exchanged at each step.
Demo PIN: 1234.
1 Unlock with PIN
The PIN is checked inside the dongle. Three wrong tries lock it.
2 Sign a document
Only a digest of the text is sent to the dongle — never the document itself.
3 Verify both signatures
Anyone with the public keys can check the signatures. Edit the document text after signing to see verification fail.
@noble/post-quantum library (FIPS 204).
Open-source building blocks for the complete system
Mature open-source projects already cover most layers of SecureSign — from simulation and RTL verification to the RISC-V core, crypto hardware, smart-card software and PDF signing. Building on them shortens every phase of the roadmap; RionCore's own work concentrates on integration, the PUF key manager, security hardening and certification.
Python test benches that compare each FPGA block against the simulator.
Event simulation and waveform viewing for debugging.
Already in Tarang2p1 imageEarly size estimates and formal proofs of critical blocks (PIN counter, key wiping).
Yosys in Tarang2p1 imageSmall, security-focused RISC-V core used in OpenTitan — a strong fit for the card logic.
Very small RISC-V cores that fit comfortably next to the crypto engines.
SoC builder: glues the core, memory, buses and peripherals together, with USB device cores in its ecosystem.
RionCore's own RV32 core — a candidate if it meets size and security needs.
CHIPS Alliance open root of trust. Its Adams Bridge accelerator implements ML-DSA in RTL — the closest open starting point for the ML-DSA engine.
Post-quantumSilicon-proven blocks: AES, SHA-2/HMAC, KMAC (Keccak/SHA-3), big-number engine for ECC, entropy source and random generator.
Only academic open designs exist; a production PUF should come from the FPGA vendor or a certified IP supplier.
Built-in ML-DSA, ML-KEM and SLH-DSA alongside ECDSA — certificates, CSRs and verification for hybrid signing.
Post-quantumOpen Quantum Safe library of post-quantum algorithms, usable from C, Python and OpenSSL.
Post-quantumClean, portable ML-DSA C code — ideal as the simulator's reference and for the RISC-V firmware.
Post-quantumECDSA and certificate handling — already used in the current prototype.
In use todayJavaScript ML-DSA — powers the live demo on this page; useful for WebView integrations.
In use on this pagePKCS#11 / PKCS#15 middleware — already proven with the prototype (Testing Guide).
In use todayStandard smart-card reader stack on Linux and macOS — no vendor driver needed.
Virtual smart-card reader — lets the simulator appear as a real reader to every PC/SC tool.
SimulatorPDF signing and validation in Python, with PKCS#11 support — good for the SDK and automated tests.
Java PDF library for signing on Android and the server side.
Desktop PDF signing — already used to sign a real PDF with the prototype.
In use todayOfficial ML-DSA and ECDSA known-answer tests plus edge-case tests that catch subtle crypto bugs.