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

Commit

Permalink
Return empty vector to transcript initialization#255
Browse files Browse the repository at this point in the history
  • Loading branch information
ETatuzova committed Jan 5, 2024
1 parent a420ecf commit 20df0f1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ namespace nil {
N_rows, table_description.usable_rows_amount, max_gates_degree, vk
);

transcript_type transcript;
transcript_type transcript(std::vector<std::uint8_t>({}));
transcript(vk.constraint_system_hash);
transcript(vk.fixed_values_commitment);

Expand Down
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()
, transcript(std::vector<std::uint8_t>({}))
{
// 1. Add circuit definition to transcript
// transcript(short_description);
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 20df0f1

Please sign in to comment.