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

Add function to get commitment from public key #873

Closed
cedoor opened this issue Oct 15, 2024 · 0 comments · Fixed by #877
Closed

Add function to get commitment from public key #873

cedoor opened this issue Oct 15, 2024 · 0 comments · Fixed by #877
Assignees
Labels
feature 🚀 This is enhancing something existing or creating something new good first issue Good for newcomers

Comments

@cedoor
Copy link
Member

cedoor commented Oct 15, 2024

Is your feature request related to a problem? Please describe.

It would be nice to create a static function in the identity package to get the commitment from a public key so that people don’t have to use the poseidon package to generate the hash. The use case can be to know which commitment is the one that goes with a signature and public key.

Describe the solution you'd like

static generateCommitment(publicKey: Point): bigint {
    return poseidon2(publicKey)
}

Context

This is part of the feedback from the ETHRome 2024 event.

@cedoor cedoor added feature 🚀 This is enhancing something existing or creating something new good first issue Good for newcomers labels Oct 15, 2024
@cedoor cedoor moved this to ♻️ Grooming in Semaphore Board Oct 15, 2024
@cedoor cedoor moved this from ♻️ Grooming to 📋 Backlog in Semaphore Board Oct 15, 2024
@vplasencia vplasencia self-assigned this Oct 16, 2024
@vplasencia vplasencia moved this from 📋 Backlog to 🗒 Tasks in Semaphore Board Oct 16, 2024
vplasencia added a commit that referenced this issue Oct 16, 2024
This static method is particularly useful after signature verification, as it allows retrieval of
the corresponding commitment associated with the public key.

re #873
vplasencia added a commit that referenced this issue Oct 17, 2024
This static method is particularly useful after signature verification, as it allows retrieval of
the corresponding commitment associated with the public key.

re #873
@github-project-automation github-project-automation bot moved this from 👀 In review to ✔️ Done in Semaphore Board Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🚀 This is enhancing something existing or creating something new good first issue Good for newcomers
Projects
Status: ✔️ Done
Development

Successfully merging a pull request may close this issue.

2 participants