Skip to content

feat!: var message size for keccak in stdlib#1481

Merged
kevaundray merged 6 commits intoacvm-0.13.0from
gd/keccak-var
Jun 1, 2023
Merged

feat!: var message size for keccak in stdlib#1481
kevaundray merged 6 commits intoacvm-0.13.0from
gd/keccak-var

Conversation

@guipublic
Copy link
Copy Markdown
Contributor

Description

Problem*

Resolves #1399

Summary*

This PR sets out to specify the message length for keccak256.

Example

Before:

std::hash::keccak256([1,2,3,4]);

After:

std::hash::keccak256([1,2,3,4], 4);

Documentation

  • This PR requires documentation updates when merged.

    • I will submit a noir-lang/docs PR.
    • I will request for and support Dev Rel's help in documenting this PR.

Add a new parameter specifying the size of the message for keccak256

Additional Context

Should we constrain the message size to be less than the size of the message (i.e the input array)?

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@kevaundray kevaundray marked this pull request as ready for review June 1, 2023 13:09
@kevaundray kevaundray merged commit 9ed1068 into acvm-0.13.0 Jun 1, 2023
@kevaundray kevaundray deleted the gd/keccak-var branch June 1, 2023 13:09
vezenovm added a commit that referenced this pull request Jun 1, 2023
* chore!: Update to ACVM 0.12.0

* feat: adapted to heterogeneous bb calls

* chore: update cargo tomls

* test: re enabled sort test

* fix: improve variable resolution

* feat: use dummy constructor for bb call

* updates for latest

* feat!: Move WitnessMap type into ACVM to avoid leaking BTreeMap type

* feat(nargo): Consume CommonReferenceString functions & manage caching (#1348)

* switch to published acvm and backend

* fix compilation issue

* chore: Remove usage of `acvm::default_is_opcode_supported` (#1366)

Co-authored-by: Blaine Bublitz <blaine.bublitz@gmail.com>
Co-authored-by: Tom French <tom@tomfren.ch>

* add issue numbers to TODOs

* chore: update to ACVM 0.13.0

* chore: fix broken import

* chore: bump commit

* chore: Update Acvm 0.13.0 branch  (#1465)

have acvm-backend-bberg patch reference new branch with additional crate-type

* Update Cargo.toml

* Update Cargo.toml

* update flake.lock

* feat!: var message size for keccak in stdlib (#1481)

* Var message size for keccak in stdlib

* fix the build:
remove aes blackbox
add domain separator for pedersen

* pedersen with domain separator

* chore: update pedersen test case for domain separator (#1482)

pedersen with domain separator

* chore: add pedersen hash with domain separator in stdlib (#1483)

* pedersen with domain separator

* separator for pedersen

* update to acvm 0.13.0 and new acvm-backend-bberg

* update cargo lock

* update MockBackend in sort test

* update merkle_insert and simple_shield for updated pedersen in bberg

* try ubuntu-large

* remove patch and update to acvm-backend-bberg 0.3.0

* cargo.lock

---------

Co-authored-by: Blaine Bublitz <blaine.bublitz@gmail.com>
Co-authored-by: sirasistant <sirasistant@gmail.com>
Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
Co-authored-by: kevaundray <kevtheappdev@gmail.com>
Co-authored-by: guipublic <47281315+guipublic@users.noreply.github.com>
@Savio-Sou
Copy link
Copy Markdown
Collaborator

Savio-Sou commented Jun 5, 2023

@kevaundray is this going into v0.7.0?

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.

Add foreign Keccak256 function that accepts variable message size at prover time

3 participants