mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-09 08:14:42 +00:00
Every sign/verify/key-derive site built a fresh context via Secp256k1::new(), which allocates a Secp256k1<All> and runs randomization/blinding table setup on each call. Introduce one crate-wide LazyLock<Secp256k1<All>> and reuse it across the local, peer, and auth sites (and their tests). Behavior-neutral: identical secp256k1 API calls, only the context lifetime changes, and the shared All context still performs the standard construction-time blinding.