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

babyjubjub signature verification on Hylé #10

Open
s0lness opened this issue Aug 21, 2024 · 6 comments
Open

babyjubjub signature verification on Hylé #10

s0lness opened this issue Aug 21, 2024 · 6 comments
Assignees
Labels
good first issue Good for newcomers ODHack7

Comments

@s0lness
Copy link
Contributor

s0lness commented Aug 21, 2024

Write a program to verify the ECDSA signature over the babyjubjub curve on Hylé. This is a very zk-friendly curve that's great for client-side proving. Supporting this is the 1st step towards supporting verification of Jubmoji's physical NFC card signatures on Hylé!

Here's the documentation to code your 1st smart contract on Hylé.

Here's the Cursive team repo about it: https://github.com/cursive-team/babyjubjub-ecdsa/tree/main

@s0lness s0lness added good first issue Good for newcomers ODHack7 labels Aug 21, 2024
@bloomingpeach
Copy link

Hello @s0lness

I'm interested in working on this issue. I have experience with ZK fundamentals and hands-on skills in Circom development. I believe I could apply my expertise to effectively address this task.

Would it be possible for me to take on this issue? I'd greatly appreciate the opportunity.
Thank you for your consideration.

@bloomingpeach
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm interested in working on this issue. I have experience with ZK fundamentals and hands-on skills in Circom development. I believe I could apply my expertise to effectively address this task.

How I plan on tackling this issue

I will first review the BabyJubJub curve standard to refresh my understanding. Then, I'll research how to implement the smart contract on Hylé, possibly looking at previously implemented contracts for reference. After that, I'll focus on implement the contract. Finally, I'll write unit test for the contract thoroughly to ensure correct functionality.

@ShantelPeters
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have extensive experience in smart contract development and cryptographic protocols, including ECDSA and zk-friendly curves like babyjubjub. My background in Cairo and other provable languages enables me to efficiently implement and verify ECDSA signatures over the babyjubjub curve on Hylé. This expertise will ensure robust and secure integration with Hylé's smart contracts and support for Jubmoji's NFC card signatures.

How I plan on tackling this issue

To verify the ECDSA signature over the babyjubjub curve on Hylé:

  1. Understand the Curve: Review the babyjubjub curve specifications from the provided Cursive repo.

  2. Setup Development Environment: Follow the Hylé documentation to set up the development environment and smart contract framework.

  3. Implement Verification Logic: Use the provided ECDSA implementation in the repo to create a verification function in the selected language (e.g., Cairo or Rust).

  4. Integrate with Hylé: Adapt the verification logic to Hylé’s smart contract environment, ensuring compatibility and zk-friendly optimizations.

  5. Test Thoroughly: Validate the implementation with various test cases, including Jubmoji NFC card signatures, to ensure correctness and security.

@ScottyDavies
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

As an experienced blockchain developer, I have a strong background in implementing zero-knowledge proof (ZKP) systems and working with elliptic curve cryptography. The repository you've provided, "babyjubjub-ecdsa", is particularly relevant to my skill set.

How I plan on tackling this issue

I would approach this issue with following steps
Learn the Cryptographic Fundamentals: First, I would ensure I have a strong understanding of elliptic curve cryptography, ECDSA, and the specific details of the Baby Jubjub curve. This would involve studying the relevant literature and documentation to familiarize myself with the mathematical concepts and implementation details.
Set up the Development Environment: I would start by setting up a development environment that includes the necessary cryptographic libraries and tools for working with Hylé, such as the Circom circuit compiler and the snarkJS library for generating and verifying zero-knowledge proofs.
Implement the Signature Verification Logic: Using the provided repository as a reference, I would implement the core signature verification logic in JavaScript or TypeScript. This would involve writing the code to parse the ECDSA signature, the message, and the public key, and then verifying the signature against the Baby Jubjub curve parameters.
Integrate with the Hylé Smart Contract: Next, I would integrate the signature verification logic into a Hylé smart contract. This would involve designing the contract's interface, deploying the contract to the Hylé network, and ensuring that the frontend can correctly interact with the contract to verify signatures.
Build the Frontend User Interface: With the backend verification logic in place, I would focus on building a user-friendly frontend interface. This might include features like allowing users to input a message, a signature, and a public key, and then displaying the verification result.
Implement Zero-Knowledge Proof Generation: To further enhance the security and privacy of the signature verification process, I would implement the ability to generate zero-knowledge proofs on the client-side. This would involve integrating the Circom and snarkJS libraries into the frontend codebase and designing the UI flow for users to generate and submit their proofs.
Test and Optimize: Throughout the development process, I would thoroughly test the signature verification and zero-knowledge proof generation/verification functionality, ensuring correctness, reliability, and performance. I would also explore ways to optimize the circuits and the overall user experience.

@wraitii
Copy link
Member

wraitii commented Aug 23, 2024

Hello all, thanks for applying 😄

Assigning this one to @bloomingpeach
We don't have direct Circom support but you can probably get away with Gnark, or look into rust or Cairo (or other things, depending - we can update our support for ZK proofs).
We have Risc0 in Collatz and Cairo in Vibe Check.

For questions, please join t.me/hyle_org. We try to keep the docs at https://docs.hyle.eu up-to-date but things change quickly.

@bloomingpeach
Copy link

bloomingpeach commented Aug 23, 2024

Thanks for assigning me and also the information @wraitii, luckily I am also fairly experienced in Rust. I guess I will go for Risc0. For now I will research about Risc0 and looking forward to at least delivering a draft pull request early next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers ODHack7
Projects
None yet
Development

No branches or pull requests

5 participants