eb9527d793
Add hardware-accelerated SHA-256 using platform crypto extensions: x86_64 (SHA-NI, Intel Goldmont+/AMD Zen+): SHA256RNDS2 — processes 2 SHA-256 rounds per instruction SHA256MSG1/SHA256MSG2 — message schedule expansion Result: SHA-256(160B) 749ns → 165ns (4.5x faster) ARM64 (Crypto Extensions, all Android ARMv8 phones): SHA256H/SHA256H2 — hash update (4 rounds per instruction) SHA256SU0/SHA256SU1 — message schedule Expected: similar 4-5x speedup on phone Impact on secp256k1 operations: signSchnorr: 33→31µs (8%, 3-4 SHA-256 calls per sign) signXOnly: 17→16µs (8%) verifyFast: 34→33µs (4%, 1 SHA-256 call) batch(200): 7.2→6.6µs/event (10%, 200 SHA-256 calls) batch(200) now 5.1x faster than ACINQ individual verify Native C-to-C (with SHA-NI + all optimizations): pubkeyCreate: ACINQ 15.9 Ours 14.9 1.07x faster sign (cached): ACINQ 17.7 Ours 15.1 1.18x faster sign (full): ACINQ 33.2 Ours 30.6 1.08x faster verifyFast: ACINQ 32.1 Ours 33.7 0.95x (tied) batch(200): ACINQ 33.5 Ours 6.6 5.1x faster https://claude.ai/code/session_011KVZhDcV2G7idNWEBz12GY