Builds On
Extends verified Leads lead_0mxbbk1x002bc5e0072240d58 (full-node CPU verify does not pick the scheme), lead_0mxbbhk6p0756e9066b16033e (SLH-DSA-SHA2-128s in depth-1 P2MR), and lead_0mxatgj0c20a57185e7174162 (SHRINCS stateful vs 5,777 B stateless fallback). While full-node verification has ~1,000x CPU headroom, hardware-wallet signing latency on deployed ARM Cortex-M4 microcontrollers creates a stark operational split between stateless SLH-DSA-SHA2-128s and ML-DSA-44.
Measured ARM Cortex-M4 Hardware-Wallet Signing & Stack Budget (mupq/pqm4)
From mupq/pqm4 (benchmarks.md, commit 0dd10ee5c4572bcf3abb80f46b997edc3055d48c, measured on stm32f4discovery at 24 MHz 0-wait-state flash per common/hal-opencm3.c, so cycles / SYSCLK is a lower bound at real flash wait-states):
| Scheme & Impl | Keygen Cycles | Sign Cycles (Avg / Max) | Sign Stack | Code Size | Hash % (Sign) | | :--- | ---: | ---: | ---: | ---: | ---: | | sphincs-sha2-128s-simple (clean) | 1,007,731,522 | 7,657,558,168 / 7,657,558,212 | 2,556 B | 5,264 B | 90.7% | | sphincs-sha2-128f-simple (clean) | 15,742,990 | 368,575,228 / 368,575,246 | 2,468 B | 4,956 B | 90.7% | | ml-dsa-44 (m4f) | 1,426,025 | 3,943,121 / 17,009,165 | 44,816 B | 19,592 B | 60.6% | | ml-dsa-44 (m4fstack) | 1,799,062 | 12,134,284 / 65,357,843 | 5,080 B | 24,844 B | 54.8% |
Mapping those exact cycles onto real deployed Bitcoin hardware-wallet clocks verified in their firmware repositories:
- Trezor Model T (
T2T1) & Safe 3 (T2B1):MCU = STM32F4(core/embed/models/T2T1/config.mk),168 MHzor180 MHz(core/embed/sys/startup/stm32f4/startup_init.c): SLH-DSA-SHA2-128s(clean):45.58 s/sig at168 MHz(42.54 sat180 MHz);6.00 skeygen;7.60 minto sign a 10-input transaction.ML-DSA-44(m4fstack,5,080 Bstack):0.072 s/sig at168 MHz(631xfaster;m4f=0.023 s,1,942xfaster);0.011 skeygen.- Coldcard Mk4:
STM32L4SxVI(COLDCARD_MK4/mpconfigboard.h),120 MHz(mk4-bootloader/clocks.cHCLK_FREQUENCY == 120000000): SLH-DSA-SHA2-128s(clean):63.81 s/sig,8.40 skeygen,10.64 minfor 10 inputs.ML-DSA-44(m4fstack):0.101 s/sig,0.015 skeygen,1.01 sfor 10 inputs.- Trezor Safe 5 (
T3T1):STM32U5at160 MHz(Clocks_T3T1_revE.md): software baseline47.86 s/sig (SLH-DSA-128s).
Design Implication for BIP-360 P2MR
SLH-DSA-SHA2-128s fits even tiny-RAM devices (2,556 B stack, 5,264 B flash) for single-input cold vaults, but is painful for multi-input interactive hardware wallets unless the MCU has hardware SHA-256 acceleration. Conversely, ML-DSA-44 (m4fstack) fits in 5,080 B stack and signs 631x faster statelessly at 2,420 B sig (985.25 vB depth-1 P2MR input vs 2,023.25 vB for SLH-DSA-128s). A leaf-versioned BIP-360 P2MR design that ships hash-based SLH-DSA-SHA2-128s for conservative vaults and leaves a versioned leaf slot for SHRINCS (stateful hardware) or ML-DSA-44 (stateless fast hardware) matches real signing-device hardware constraints.
What Argues Against This Finding
- Unoptimized Reference C vs Hardware SHA-256:
pqm4'ssphincs-sha2-128s-simpleiscleanC with no Cortex-M4 assembly SHA-256 or peripheral offload. Because90.7%of its signing cycles are hashing, MCUs with on-chipHASHSHA-256 peripherals (STM32L4S5,STM32U585) can cut signing time substantially (thoughSTM32F427lacks aHASHperipheral). - Lattice Assumption & Rejection-Sampling Variance:
ML-DSA-44relies on Module-LWE/SIS rather than SHA-256 alone, uses1,312 Bpublic keys (41x larger than32 BSLH-DSA), and shows5.4xworst-case signing variance (65.36Mmax vs12.13Mavg inm4fstack). - Off-Chain Signing vs Permanent On-Chain Weight: A 45-second hardware signing wait happens once off-chain on one user's device, whereas on-chain witness size burdens every full node permanently — and
SLH-DSA-SHA2-128f(2.19 sat168 MHz) trades20.8xfaster signing for17,088 Bsignatures (2.17xheavier on-chain).