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

Create Foreign Keccak256 Function #1189

Closed
1 task done
Tracked by #1096
Savio-Sou opened this issue Apr 20, 2023 · 1 comment · Fixed by #1249
Closed
1 task done
Tracked by #1096

Create Foreign Keccak256 Function #1189

Savio-Sou opened this issue Apr 20, 2023 · 1 comment · Fixed by #1249
Assignees
Labels
enhancement New feature or request

Comments

@Savio-Sou
Copy link
Collaborator

Savio-Sou commented Apr 20, 2023

Problem

We already have the Keccak256 opcode in ACVM, but we're missing a Noir function to actually call it in Noir programs.

Proposed solution

Create the function in stdlib.

Additional context

From @vezenovm on Slack re how the function signature could look like:

I think there were some efficiency benefits to using a [u64] however a byte slice is more intuitive and perhaps we can add helper methods to convert between different array types

Submission Checklist

  • Once I hit submit, I will assign this issue to the Project Board with the appropriate tags.
@Savio-Sou Savio-Sou added the enhancement New feature or request label Apr 20, 2023
@Savio-Sou Savio-Sou added this to Noir Apr 20, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Apr 20, 2023
@colinnielsen
Copy link

Looking forward to this. I wrote an ECDSA recover-like circuit, using @TomAFrench's keccak function signature.
I had to manually convert my inputs to [u64;16], then pass the input bits.

It would be amazing to have a circuit signature of keccak([u64]) or keccak([u8]) that handled the input_length in bits automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants