Skip to content

Commit

Permalink
Correct keccak computation #46
Browse files Browse the repository at this point in the history
  • Loading branch information
vo-nil committed Dec 7, 2023
1 parent 9dbd8b9 commit 9e02367
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/nil/blueprint/transpiler/evm_verifier_gen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,12 @@ namespace nil {
++j;
}

eta_hash::digest_type hash_result = crypto3::hash<eta_hash>(eta_buf);
result << "\t\t\t/* Check keccak(points) */" << std::endl;
result << "\t\t\tif ( bytes32(0x" << std::to_string(hash_result).data() << ") != keccak256(abi.encode(points))) {" << std::endl;
// result << "\t\t\t\temit WrongEtaPointValues();" << std::endl;
result << "\t\t\t\treturn false;" << std::endl;
result << "\t\t\t}" << std::endl;
result << "\t\t}" << std::endl;
return result.str();
}
Expand Down

0 comments on commit 9e02367

Please sign in to comment.