NilFoundation / zkLLVM

Zero-Knowledge Proof Systems Circuit Compiler
https://docs.nil.foundation/zkllvm
285 stars 48 forks source link

[Possible bug] sha256 block type elements comparison uses vector comparison #563

Open CblPOK-git opened 7 months ago

CblPOK-git commented 7 months ago

` #include <nil/crypto3/hash/algorithm/hash.hpp>

include <nil/crypto3/hash/sha2.hpp>

using namespace nil::crypto3;

[[circuit]] bool sha256_example(typename hashes::sha2<256>::block_type block0,
                                                              typename hashes::sha2<256>::block_type block1) {

    return block0[0] < block1[0];

}`

quick fix: replace O1 with O0 in the CircuitCompile.cmake