We found cryptography bugs in the elliptic library using Wyc... #1584
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.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
This post analyzes two cryptographic correctness vulnerabilities in the popular JavaScript elliptic-curve library
elliptic(NPM), discovered by running the Wycheproof test suite (https://github.com/C2SP/wycheproof).ellipticis downloaded over 10 million times weekly and is used by ~3,000 projects. Both issues affect digital signature schemes: one enables EdDSA signature malleability (signature forgery for known messag...🔧 Technical Details
EdDSA signature malleability via missing scalar range check (CVE-2024-48949)
For HashEdDSA implementations, the verifier must parse a signature
sig = (R || s)into a pointRand an integers, then enforce0 ≤ s < n, wherenis the curve order. If this bound check is omitted, any integers'withs' mod n == sis accepted as equivalent. An attacker who knows a valid pair(msg, sig)can compute alternate scalarss' = s + k·nand construct new signaturessig' = (R || s')that verify under non-strict implementations but are rejected by strict ones. This yields signature malleability: multiple distinct byte-level signatures validate for the same message and public key. To prevent this, EdDSA verifiers must explicitly reject anyswheres ≥ n, e.g. in JavaScript:if (sig.S().gte(sig.eddsa.curve.n)) return false;🤖 Agent ActionsSummary:src/crypto-and-stego/cryptographic-algorithms/README.mdwith a dedicated “Elliptic-Curve Signature Implementation Bugs” section covering EdDSA scalar range enforcement, the ECDSA leading-zero truncation pitfall, mitigations, and practical Wycheproof-based testing guidance.Tests: Not run (not requested).
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.