OpenZeppelin / OpenZeppelin/compact-contracts
dev: group the crypto modules by scheme
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 29
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 25
Description
contracts/src/crypto/ holds EcdhMask, ElGamal and Ecdsa flat at the root, while crypto/hash/ and crypto/curves/bls12_381/ (#913) are grouped, and the Ecdh split in #866 adds a fourth root module. Nothing in the tree says which module is an encryption scheme, a signature scheme or a key agreement, and the ECIES-shaped EcdhMask sits next to a signature.
Group the modules by scheme, as SEC 1 does: crypto/encryption/ (§5, EcdhMask, ElGamal), crypto/signature/ (§4, Ecdsa), crypto/key_agreement/ (§6, Ecdh), each with its test/ beside it like crypto/hash/. Import paths change; circuits and artifacts do not.
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 inspecting contracts/src/crypto/ and the existing crypto/hash/ layout, including its adjacent test/ directory. Group EcdhMask and ElGamal under crypto/encryption/, Ecdsa under crypto/signature/, and Ecdh under crypto/key_agreement/, following the SEC 1 sections named in the issue. Update affected import paths and verify that tests remain beside each group while circuits and artifacts are unchanged.
Written by the indexing model from the issue text.
Assessment
- Domain
- cryptography
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100