OpenZeppelin / OpenZeppelin/compact-contracts
dev: split the Jubjub key agreement Ecdh out of EcdhMask
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 29
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 25
Description
crypto/EcdhMask carries the Jubjub key agreement inline, so a consumer that needs several masks from one shared secret (the Field pad in #735) cannot reach the shared point without going through encrypt.
Move the key agreement into its own crypto/Ecdh module: deriveShared (sender side, owns the identity-key and zero-ephemeral guards), recoverShared (recipient side), and a SharedSecret struct. EcdhMask.encrypt / decrypt delegate to it and keep their ciphertexts unchanged.
Prerequisite for #735.
PR: #866
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading crypto/EcdhMask and the changes proposed in PR #866, then trace how its inline Jubjub agreement currently supports encrypt and decrypt. Done means a separate crypto/Ecdh module exposes deriveShared, recoverShared, and SharedSecret, while EcdhMask delegates to it and produces unchanged ciphertexts.
Written by the indexing model from the issue text.
Assessment
- Domain
- cryptography
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100