Skip to content

[2.11.1] Implement Blake2s Compress Libfunc #1148

@JulianGCalderon

Description

@JulianGCalderon

Cairo version 2.11.1 introduces a new libfunc that we should implement:

/// The blake2s compress function, which takes a state, a byte count, and a message, and returns a
/// new state.
/// `byte_count` should be the total number of bytes hashed after hashing the current `msg`.
pub extern fn blake2s_compress(
    state: Blake2sState, byte_count: u32, msg: Blake2sInput,
) -> Blake2sState nopanic;

See casm lowering for more information: https://github.com/starkware-libs/cairo/blob/1a531143af0066d3d9141d63dfbfba2e293ff8f0/crates/cairo-lang-sierra-to-casm/src/invocations/blake.rs#L21-L25

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions