anza-cryptography-source/curve25519/solana-ed25519/src/backend
Edvard Fagerholm 0a54ccaf04
ed25519: add 128-bit NAF path (#27)
* ed25519: add 128-bit NAF path

Add Scalar::non_adjacent_form_128 and use it in the serial and vector triple-base verifier paths for scalars known to fit in 128 bits. The helper computes only the HEEA-readable digit range instead of producing a full 256-entry NAF array for each scalar.

Benchmark notes:

- Ran this repository's Criterion benchmark program, benches/bench.rs, filtering to Single Verification, pinned to CPU 4 with 1s warmup, 2s measurement, and sample size 10.

- local_verify_zebra estimate was 19.740 us, with 95% CI 19.686..19.789 us.

- master measured 20.051 us, with 95% CI 19.938..20.134 us, so this branch was about 1.55% faster in that run.

* Use 128-bit NAF in triple-base paths

---------

Co-authored-by: zz-sol <allaboutshop10@163.com>
2026-06-24 16:47:31 +09:00
..
serial ed25519: add 128-bit NAF path (#27) 2026-06-24 16:47:31 +09:00
vector ed25519: add 128-bit NAF path (#27) 2026-06-24 16:47:31 +09:00
serial.rs refactor and merge curve and ed crates (#6) 2026-03-26 08:09:10 -04:00
vector.rs refactor and merge curve and ed crates (#6) 2026-03-26 08:09:10 -04:00