diff --git a/zokrates_stdlib/stdlib/hashes/sha256/embed/1024bitPadded.zok b/zokrates_stdlib/stdlib/hashes/sha256/embed/1024bitPadded.zok index 5d764ca7..20f54590 100644 --- a/zokrates_stdlib/stdlib/hashes/sha256/embed/1024bitPadded.zok +++ b/zokrates_stdlib/stdlib/hashes/sha256/embed/1024bitPadded.zok @@ -10,7 +10,7 @@ def main(bool[256] a, bool[256] b, bool[256] c, bool[256] d) -> (bool[256]): bool[256] dummyblock1 = [true, ...[false; 255]] // Total length of message is 1024 bits: 0b10000000000 - bool[256] dummyblock2 = [...[false; 245], ...[true, ...[false; 10]]] + bool[256] dummyblock2 = [...[false; 245], true, ...[false; 10]] bool[256] digest = sha256(a, b, c, d, dummyblock1, dummyblock2) return digest \ No newline at end of file diff --git a/zokrates_stdlib/stdlib/hashes/sha256/embed/256bitPadded.zok b/zokrates_stdlib/stdlib/hashes/sha256/embed/256bitPadded.zok index d2382760..383009e9 100644 --- a/zokrates_stdlib/stdlib/hashes/sha256/embed/256bitPadded.zok +++ b/zokrates_stdlib/stdlib/hashes/sha256/embed/256bitPadded.zok @@ -7,7 +7,7 @@ def main(bool[256] a) -> (bool[256]): // Hash is computed on 256 bits of input // padding fits in the remaining 256 bits of the first block // add dummy block (single "true" followed by "false" + total length) - bool[256] dummyblock1 = [...[true, ...[false; 246]], ...[true, ...[false; 8]]] + bool[256] dummyblock1 = [true, ...[false; 246], true, ...[false; 8]] bool[256] digest = sha256(a, dummyblock1) return digest \ No newline at end of file diff --git a/zokrates_stdlib/stdlib/hashes/sha256/embed/512bitPadded.zok b/zokrates_stdlib/stdlib/hashes/sha256/embed/512bitPadded.zok index 63ecf72e..b594e691 100644 --- a/zokrates_stdlib/stdlib/hashes/sha256/embed/512bitPadded.zok +++ b/zokrates_stdlib/stdlib/hashes/sha256/embed/512bitPadded.zok @@ -10,7 +10,7 @@ def main(bool[256] a, bool[256] b) -> (bool[256]): bool[256] dummyblock1 = [true, ...[false; 255]] // Total length of message is 512 bits: 0b1000000000 - bool[256] dummyblock2 = [...[false; 246], ...[true, ...[false; 9]]] + bool[256] dummyblock2 = [...[false; 246], true, ...[false; 9]] bool[256] digest = sha256(a, b, dummyblock1, dummyblock2) return digest \ No newline at end of file