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

chore!: Change blake3 to blake2 in private kernel #2861

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion circuits/cpp/src/aztec3/circuits/kernel/private/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ void common_contract_logic(DummyBuilder& builder,

// compute contract address nullifier
auto const blake_input = new_contract_address.to_field().to_buffer();
auto const new_contract_address_nullifier = NT::fr::serialize_from_buffer(NT::blake3s(blake_input).data());
auto const new_contract_address_nullifier = NT::fr::serialize_from_buffer(NT::blake2s(blake_input).data());

// push the contract address nullifier to nullifier vector
array_push(builder,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void update_end_values(PrivateKernelInputsInner<CT> const& private_inputs, Kerne

// compute contract address nullifier
auto blake_input = CT::byte_array(contract_address.to_field());
auto contract_address_nullifier = CT::fr(CT::blake3s(blake_input));
auto contract_address_nullifier = CT::fr(CT::blake2s(blake_input));

// push the contract address nullifier to nullifier vector
CT::fr const conditional_contract_address_nullifier =
Expand Down
2 changes: 0 additions & 2 deletions circuits/cpp/src/aztec3/utils/types/circuit_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ template <typename Builder> struct CircuitTypes {
};

static byte_array blake2s(const byte_array& input) { return plonk::stdlib::blake2s(input); }

static byte_array blake3s(const byte_array& input) { return plonk::stdlib::blake3s(input); }
};

} // namespace aztec3::utils::types
2 changes: 0 additions & 2 deletions circuits/cpp/src/aztec3/utils/types/native_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ struct NativeTypes {
auto res = blake2::blake2s(input);
return byte_array(res.begin(), res.end());
}

static byte_array blake3s(const byte_array& input) { return blake3::blake3s(input); }
};

} // namespace aztec3::utils::types