Repository navigation
Release 0.2.3: GLV scalar multiplication - #32
Merged
Merged
Conversation
About 50% reduction in instructions.
# Conflicts: # mops.toml # src/Hmac.mo # src/Ripemd160.mo # src/ec/Curves.mo # src/ec/Jacobi.mo
- CHANGELOG: add the 0.2.3 section; drop the stale GLV-branch entries the merge left in the published 0.2.1 section - bump version to 0.2.3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 0.2.2 → 0.2.3.
Changes
Jacobi.mul()/Jacobi.mulBase()use the GLV endomorphism on secp256k1: the scalar is split into two ~128-bit halves and both are processed in one interleaved-NAF loop.Curves.Glvtype;Curves.Curvegainsglv : ?Glv(breaking for code that builds its ownCurverecords;glv = nullkeeps the old path).[requirements] moc1.4.0).Benchmarks vs
main(instructions)mul, 256-bit scalar¹mul, k ≤ 2⁵⁷ (ec_arith)Heap falls by the same proportion (ECDSA verify 10.4 → 6.8 MiB, BIP32 depth 5 30.7 → 21.8 MiB). Every other benchmark is unchanged (within 1%).
¹ Measured ad hoc.
bench/ec_arith.bench.moonly uses scalars below 2⁵⁷, where GLV can't help (k₂ = 0) and costs ~85k instructions for the decomposition. A 256-bit column would make that benchmark representative.Checks
mops test --locked: 85 passed (same as main)mops bench --locked: no errors or warningsmoc --checkonsrc/: no warningsmops docs coverage: 100%mops publish --dry-run: OK, 35 files, release notes = 0.2.3 section🤖 Generated with Claude Code