Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(rln): use zerokit extended_key_gen in place of key_gen #1459

Merged
merged 7 commits into from
Dec 14, 2022

Conversation

s1fr0
Copy link
Contributor

@s1fr0 s1fr0 commented Dec 13, 2022

This PR addresses #1450 by deprecating in nwaku the zerokit API key_gen to use instead extended_key_gen.

Their difference is:

  • in key_gen identity secret is random and identity commitment is the Poseidon hash of identity secret;
    -extended_key_gen identity trapdoor and nullifier are random, identity secret is the poseidon hash of [identity trapdoor, identity nullifier] and identity commitment is the Poseidon hash of identity secret;

This will make nwaku RLN identity credentials implementation compliant with 32/RLN-SPEC and credentials will result compatible with Semaphore.

This PR also renames all variables/comments previously referring to keypairs to identity credentials. Data structures are changed accordingly to the new API requirements.

This PR is based on the rln-relay-mounting branch which introduces many likely conflicting changes on the RLN module. Will be rebased on master after the latter is merged.

rymnc and others added 4 commits December 9, 2022 11:31
refactor(rln): rename membershipKeyPair to identityCredential

update zerokit submodule

refactor(rln): use extended_key_gen; rebrand keypairs to idCredentials

refactor(rln): rename mountRlnRelay memKeyPair argument
@s1fr0 s1fr0 added the track:rln RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications label Dec 13, 2022
@s1fr0 s1fr0 requested review from LNSD and rymnc December 13, 2022 02:02
@s1fr0 s1fr0 self-assigned this Dec 13, 2022
@s1fr0 s1fr0 linked an issue Dec 13, 2022 that may be closed by this pull request
1 task
Base automatically changed from rln-relay-mounting to master December 13, 2022 09:26
@status-im-auto
Copy link
Collaborator

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 0247d19 #1 2022-12-13 23:04:21 ~17 min macos 📦bin

Copy link
Contributor

@rymnc rymnc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

waku/v2/protocol/waku_rln_relay/utils.nim Outdated Show resolved Hide resolved
Co-authored-by: Aaryamann Challani <[email protected]>
Copy link
Contributor

@LNSD LNSD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

@s1fr0 s1fr0 merged commit 226b44c into master Dec 14, 2022
@s1fr0 s1fr0 deleted the use-extended-keygen branch December 14, 2022 11:28
@s1fr0 s1fr0 mentioned this pull request Jan 12, 2023
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
track:rln RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore(rln-relay): update key_gen with extended_key_gen logic
4 participants