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

implement Keccak256 Keccak384 Keccak512 with tests #2603

Merged
merged 1 commit into from
Sep 22, 2023
Merged

Conversation

collinc97
Copy link
Collaborator

@collinc97 collinc97 commented Sep 21, 2023

This PR adds support for the Keccak hash functions.

let a: i128 = Keccak256::hash_to_i128(address_value);
let b: field = Keccak384::hash_to_field(bool_value);
let c: group = Keccak512::hash_to_group(field_value);

Related PRs
https://github.com/AleoHQ/snarkVM/pull/1911

@collinc97 collinc97 requested a review from a team September 21, 2023 22:13
@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Merging #2603 (06b52aa) into testnet3 (93597dd) will increase coverage by 0.01%.
Report is 1 commits behind head on testnet3.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##           testnet3    #2603      +/-   ##
============================================
+ Coverage     80.05%   80.06%   +0.01%     
============================================
  Files           160      160              
  Lines          5390     5393       +3     
  Branches       5390     5393       +3     
============================================
+ Hits           4315     4318       +3     
  Misses         1075     1075              
Files Changed Coverage Δ
compiler/ast/src/functions/core_function.rs 100.00% <ø> (ø)
compiler/passes/src/type_checking/checker.rs 95.90% <ø> (ø)
compiler/span/src/symbol.rs 83.33% <ø> (ø)
...er/passes/src/code_generation/visit_expressions.rs 78.48% <100.00%> (+0.41%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@collinc97 collinc97 mentioned this pull request Sep 21, 2023
Copy link
Collaborator

@d0cd d0cd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@collinc97 collinc97 merged commit 82b39a8 into testnet3 Sep 22, 2023
@collinc97 collinc97 deleted the feat/keccak branch September 22, 2023 15:31
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.

3 participants