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

feat: integrate semaphore circuit #23

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

khayss
Copy link

@khayss khayss commented Nov 27, 2024

Description

This PR implements a zero-knowledge proof circuit for Semaphore using the BabyJubjub curve.

Changes Made

  • Added base Semaphore circuit template with configurable Merkle tree depth
  • Implemented secret validation against BabyJubjub curve order
  • Added identity commitment generation using Poseidon hash
  • Integrated BabyJubjub point generation from secret
  • Added Merkle proof verification
  • Implemented nullifier generation for unique proofs

Related Issues

Closes #16

@khayss
Copy link
Author

khayss commented Nov 27, 2024

@evgongora Kindly review. This is what I came up with. I'll be waiting for your review and suggestions.

@evgongora
Copy link
Collaborator

Hey @khayss part of what we need right now is to adjust the circuit to be handled in bls12_381, we understand there might need to be some changes on the companion curve so this won't work for now, mind if we leave research instead with a separate issue?

@evgongora
Copy link
Collaborator

Awesme job from your part!

@khayss
Copy link
Author

khayss commented Nov 29, 2024

Hey @khayss part of what we need right now is to adjust the circuit to be handled in bls12_381, we understand there might need to be some changes on the companion curve so this won't work for now, mind if we leave research instead with a separate issue?

Sure. A separate issue can be created for the research. I tried spotting as many areas that won't work with stellar but later agreed as well that it should be a separate issue with lot of consideration so I went with this basic one.
Thank you

@khayss
Copy link
Author

khayss commented Nov 29, 2024

@evgongora Is there anything else you'll like me to add so this PR can be ready for review and possible merge.

@evgongora
Copy link
Collaborator

Hey @khayss here is the issue for the doc. Will leave this as a draft
ZencypherSolutions/semaphore-stellar-docs#15

@khayss
Copy link
Author

khayss commented Nov 29, 2024

Should I apply for the docs issue? Also, will this be a draft pending the completion of the docs issue?

@evgongora
Copy link
Collaborator

evgongora commented Nov 29, 2024

Should I apply for the docs issue? Also, will this be a draft pending the completion of the docs issue?

We need to be sure how this is going to be leveraged so let's work on the docs issue for now, go ahead and apply if you want to continue with the issue :)

@khayss
Copy link
Author

khayss commented Nov 29, 2024

Okay. Thank you for the update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Semaphore Integration] Issue 6: Integrate and leverage the Semaphore circuit into the project structure
2 participants