Skip to content

feat: Blake3 utility circuit #24

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

storojs72
Copy link
Member

This PR includes several utility chips for Blake3 hashing stuff:

  • u32_from_le_bytes (for correct hash value outputting)
  • u32_xor (for flags computing)

@arthurpaulino
Copy link
Member

Thanks for the implementations!
The thing that's bugging me at the moment is the replication of data across preprocessed traces from different circuits.
For example, the pair of columns accounting for all ~65k combinations of all bytes seems to be a repeating theme. We'll need to figure out a better way to structure these circuits so that we can avoid this issue.

@storojs72
Copy link
Member Author

Yeah, agree. But this is a bit out of scope of multi-stark. It is in scope of Aiur. The idea is actually having multi-stark chips at first, which contain implementation of lookups, so we don't need to keep in mind this, when implementing particular Aiur operation, since every operation involves Rust, FFI and Lean components at once.

@storojs72 storojs72 force-pushed the as/blake3-utility-chips branch from 075fb22 to dc8d5a0 Compare August 16, 2025 11:23
@storojs72 storojs72 force-pushed the as/blake3-utility-chips branch from c073e37 to 1c95b63 Compare August 16, 2025 13:33
@storojs72
Copy link
Member Author

Also added u64 to u32 conversion chips (using 32 bits right / left shifting). This is necessary for computing counter_low / counter_high in Blake3 context

@storojs72 storojs72 force-pushed the as/blake3-utility-chips branch from bf1e1a3 to 4b0fe09 Compare August 18, 2025 22:19
@storojs72
Copy link
Member Author

Added 1-bit shift right of u64 value chip. It is used in chunks processing of Blake3

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.

2 participants