From 4b56163ab6cc8a933da4a03c96a0d9398d9b8ad6 Mon Sep 17 00:00:00 2001 From: kevaundray Date: Sat, 14 Oct 2023 18:17:12 +0000 Subject: [PATCH] change blake3 to blake2 --- circuits/cpp/src/aztec3/circuits/kernel/private/common.cpp | 2 +- .../aztec3/circuits/kernel/private/private_kernel_circuit.cpp | 2 +- circuits/cpp/src/aztec3/utils/types/circuit_types.hpp | 2 -- circuits/cpp/src/aztec3/utils/types/native_types.hpp | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/circuits/cpp/src/aztec3/circuits/kernel/private/common.cpp b/circuits/cpp/src/aztec3/circuits/kernel/private/common.cpp index 45cba2b8af0..792b1eeb7d8 100644 --- a/circuits/cpp/src/aztec3/circuits/kernel/private/common.cpp +++ b/circuits/cpp/src/aztec3/circuits/kernel/private/common.cpp @@ -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, diff --git a/circuits/cpp/src/aztec3/circuits/kernel/private/private_kernel_circuit.cpp b/circuits/cpp/src/aztec3/circuits/kernel/private/private_kernel_circuit.cpp index 6c40768c127..3e0425ac8b5 100644 --- a/circuits/cpp/src/aztec3/circuits/kernel/private/private_kernel_circuit.cpp +++ b/circuits/cpp/src/aztec3/circuits/kernel/private/private_kernel_circuit.cpp @@ -131,7 +131,7 @@ void update_end_values(PrivateKernelInputsInner 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 = diff --git a/circuits/cpp/src/aztec3/utils/types/circuit_types.hpp b/circuits/cpp/src/aztec3/utils/types/circuit_types.hpp index 8cfb3f6977f..6a311d78f55 100644 --- a/circuits/cpp/src/aztec3/utils/types/circuit_types.hpp +++ b/circuits/cpp/src/aztec3/utils/types/circuit_types.hpp @@ -111,8 +111,6 @@ template 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 \ No newline at end of file diff --git a/circuits/cpp/src/aztec3/utils/types/native_types.hpp b/circuits/cpp/src/aztec3/utils/types/native_types.hpp index 5e725e7d00b..1fc9658fac8 100644 --- a/circuits/cpp/src/aztec3/utils/types/native_types.hpp +++ b/circuits/cpp/src/aztec3/utils/types/native_types.hpp @@ -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 \ No newline at end of file