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 keccak256 hash support #62

Closed
jasongitmail opened this issue Jan 12, 2022 · 9 comments
Closed

Add keccak256 hash support #62

jasongitmail opened this issue Jan 12, 2022 · 9 comments

Comments

@jasongitmail
Copy link
Contributor

No description provided.

@imengmengda
Copy link

Hello, Jason. I'm interested in this feature.Moreover, I think it would be nice to add RSA signature verification to snarkyjs. But it's a bit difficult to implement it in existing libraries.

@jasongitmail
Copy link
Contributor Author

Hi @imengmengda! Thanks for mentioning this. It'd be great to receive a PR for this or other functionality for SnarkyJS, if you're interested.

I discussed this with one of O1's cryptographic engineers for more details, and it sounds like this will be much easier to implement after APIs exist for lookups & range checks in both Kimchi and SnarkyJS. We don't have an estimate on when those may be available yet, but I'll update here when they're available or when we have more info.

@jasongitmail
Copy link
Contributor Author

jasongitmail commented May 24, 2022

Update: O1's crypto team is adding Keccak256 to Kimchi, for optimal performance. The SnarkyJS-related portion will be very easy, once it's done within Kimchi.

@xhliu
Copy link

xhliu commented Jul 27, 2022

Is it checked in yet? Also can u add sha256 support?

@jasongitmail
Copy link
Contributor Author

@xhliu Not yet. O(1) Labs' crypto team is working to add Keccak256 within Kimchi itself, for optimal performance. Currently they're prioritizing work for launching Berkeley Testnet and then will be able to focus on this. When Keccak256 is available within Kimchi, adding this method in SnarkyJS will be very quick. They're also planning to add sha256 support within Kimchi, but that will be prioritized after Keccak256

@xhliu
Copy link

xhliu commented Jul 27, 2022

I can always code my own sha256 in Typescript using snarkyjs, right?

sha256(Field preimage): Field

It is just not as performant as adding it within Kimchi.

@xhliu
Copy link

xhliu commented Jul 27, 2022

BTW, what does this commit o1-labs/snarky#489 do, regarding sha256?

@mitschabaude
Copy link
Collaborator

mitschabaude commented Jul 28, 2022

BTW, what does this commit o1-labs/snarky#489 do, regarding sha256?

It's a 2 year old commit which deletes bindings to some C/libsnark code. We don't use libsnark anymore, and don't bind into C anymore. So I'd just ignore that commit, it's irrelevant to any functionality we can offer now.

I can always code my own sha256 in Typescript using snarkyjs, right?

Yes! I'd be really interested in how feasible this is. If you want to try, I'm happy to help wherever you get stuck

@Trivo25
Copy link
Member

Trivo25 commented Nov 29, 2023

see #964

@Trivo25 Trivo25 closed this as completed Nov 29, 2023
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

No branches or pull requests

5 participants