1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
ZoKrates/stdlib/hashes/sha256/1536bit.code
2019-01-31 13:29:16 +01:00

14 lines
No EOL
498 B
Text

import "./IVconstants.code" as IVconstants
import "./shaRoundNoBoolCheck.code" as sha256
// A function that takes 6 field[256] arrays as inputs
// and applies 3 rounds of sha256 compression.
// It returns an array of 256 field elements.
def main(field[256] a, field[256] b, field[256] c, field[256] d, field[256] e, field[256] f) -> (field[256]):
IV = IVconstants()
digest1 = sha256(a, b, IV)
digest2 = sha256(c, d, digest1)
digest3 = sha256(e, f, digest2)
return digest3