Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

Commit

Permalink
Merge branch '255-poseidon-fixes' of github.com:NilFoundation/crypto3…
Browse files Browse the repository at this point in the history
…-zk into HEAD
  • Loading branch information
ETatuzova committed Jan 5, 2024
2 parents 0d28bdf + c287f25 commit 5a15940
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ namespace nil {
preprocessed_public_data.public_polynomial_table))

, _is_lookup_enabled(constraint_system.lookup_gates().size() > 0)
, transcript(std::vector<std::uint8_t>())
, transcript(std::vector<std::uint8_t>({}))
{
// 1. Add circuit definition to transcript
// transcript(short_description);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ namespace nil {
) {
// 1. Add circuit definition to transcript
// transcript(short_description);
std::vector<std::uint8_t> init_blob = {};
transcript::fiat_shamir_heuristic_sequential<transcript_hash_type> transcript(init_blob);
transcript::fiat_shamir_heuristic_sequential<transcript_hash_type> transcript(std::vector<std::uint8_t>({}));
transcript(preprocessed_public_data.common_data.vk.constraint_system_hash);
transcript(preprocessed_public_data.common_data.vk.fixed_values_commitment);

Expand Down
6 changes: 4 additions & 2 deletions include/nil/crypto3/zk/transcript/fiat_shamir.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ namespace nil {

template<typename InputRange>
fiat_shamir_heuristic_sequential(const InputRange &r) {
sponge.absorb(hash<hash_type>(r));
if(r.size() != 0) {
sponge.absorb(hash<hash_type>(r));
}
}

template<typename InputIterator>
Expand Down Expand Up @@ -246,7 +248,7 @@ namespace nil {
auto c = challenge<field_type>();
nil::marshalling::status_type status;

nil::crypto3::multiprecision::cpp_int intermediate_result =
nil::crypto3::multiprecision::cpp_int intermediate_result =
c.data.template convert_to<nil::crypto3::multiprecision::cpp_int>();
Integral result = 0;
Integral factor = 1;
Expand Down

0 comments on commit 5a15940

Please sign in to comment.