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

ed25519 signature verification on Hylé #9

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

ed25519 signature verification on Hylé #9

s0lness opened this issue Aug 21, 2024 · 5 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 an ed25519 signature on Hylé. This is the 1st step to supporting Cosmos-compatible wallets. You can do it in any language (Noir, Rust, Cairo).

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

I haven't found any good code in Noir or Rust for it.
Here's some Rust code that does it: https://docs.rs/ed25519/latest/ed25519/.
Here's some Circom: https://github.com/Electron-Labs/ed25519-circom.

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

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi ! I have 2+ years of experience in development in web3 with expertise in languages like rust , solidity,noir ,Huff. I would like to take up this issue.

How I plan on tackling this issue

1.Study the approproiate examples/docs to get an idea on how the signature verification works.
2. Study how to write the smart contract in Hyle.
3. Implement the verification algo in one of the 3 supported languages with tests .

@PoulavBhowmick03
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm Poulav Bhowmick, a software engineer at Invisible Studios with a robust background in TypeScript, Rust, Solidity Cairo, fullstack development and blockchain technology. My experience includes building robust applications, optimizing functionalities and blockchain integration. I have actively participated in events and open source contributions, enhancing my capability to tackle real-world tech challenges. My projects can be viewed on my GitHub Profile and OnlyDust Profile. Plus I´m active member of Starknet community🇷.

How I plan on tackling this issue

  1. Setup
    I will create a new Rust project to handle the ed25519 signature verification.
    I’ll use the ed25519-dalek crate, which is a well-maintained and secure library for handling ed25519 signatures in Rust.
  2. Basic Signature Verification Logic
    The core of the program will involve creating a function that takes a public key, a message, and a signature, and verifies the signature using the ed25519-dalek crate.
    The basic steps:
    Public Key & Signature Parsing: Convert the provided public key and signature from their byte representations.
    Message Verification: Use the verify() method to check if the signature is valid for the given message and public key.
  3. Integrating with Hylé
    Smart Contract Interaction: Once the signature verification logic is in place, I’ll integrate it with Hylé. According to the Hylé documentation:
    I’ll register a smart contract using the Hylé CLI.
    The contract will have a verifier and program ID.
    Stateless Transaction Support: I will set up a stateless transaction, as described in the documentation, to perform the signature verification off-chain. This step is essential to ensure the signature verification can be executed without altering the contract state.
  4. Testing and Debugging
    I’ll write unit tests in Rust to validate the correctness of the signature verification function.
    Additionally, I’ll deploy the contract on the Hylé devnet and test the stateless transaction to ensure it correctly verifies signatures.
    Challenges & Considerations
    Noir and Cairo Support: While my initial implementation will be in Rust, I’ll explore the potential for implementing similar functionality in Noir and Cairo. These languages are newer, and finding adequate libraries might be challenging.
    API Stability: Given that the Hylé API is currently a proof of concept, it’s likely to change. I’ll need to remain adaptable to any modifications in the API as I develop this feature.
    Timeline
    Initial Implementation: I expect to have a basic version of the Rust-based signature verification running within a few days.
    Integration with Hylé: This will follow shortly after, depending on the ease of working with the Hylé CLI and API.
    Testing and Refinement: Once the integration is complete, I’ll spend additional time ensuring everything works smoothly and is thoroughly tested.

@RajeshRk18
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have experience writing zk circuits in Noir. So, this must be approachable for me. I will create the ed25519 curve ops and implement signature verification on top of it.

How I plan on tackling this issue

Using the generic implementation of various curve types in Noir standard library, I will implement ed25519 curve ops with its parameters and constants. Then I will implement sig verification circuit.

@DiegoB1911
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm a Full Stack Developer with two years of experience. I'm also an active member of Dojo Coding, where I'm expanding my skills in Cairo and Web3 technologies. This is my first time participating in an Open Development Hackathon, and I'm eager to learn, contribute, and be part of a new project.

How I plan on tackling this issue

I will read the documentation and then proceed from there to write the program.

@wraitii
Copy link
Member

wraitii commented Aug 23, 2024

Hello all, thanks for applying 😄

Assigning this one to @RajeshRk18
We have some noir code in Vibe Check which might be worth looking at.

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.

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

6 participants