OpenZeppelin / OpenZeppelin/compact-contracts

dev: group the crypto modules by scheme

Open
#920 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.