diff --git a/orchard_poseidon.py b/orchard_poseidon.py index b510c2e..c091f97 100644 --- a/orchard_poseidon.py +++ b/orchard_poseidon.py @@ -254,6 +254,7 @@ ROUND_CONSTANTS = [ Fp(0x2166389a0e4e1f364627f44f183c91e19a0f302972d3b542faae23893d5f50fd), Fp(0x0ade42a791fef5cf2c386d2df993e84538576cf565d379e8a3be16b562d755c2) ] +assert len(ROUND_CONSTANTS) == (R_F + R_P) * t # MDS matrix generated by the reference implementation script, commit 659de89 # https://extgit.iaik.tugraz.at/krypto/hadeshash/-/blob/master/code/generate_parameters_grain.sage @@ -316,12 +317,12 @@ def main(): render_args(), 'orchard_poseidon', ( - ('input', '[[u8; 32]; 3]'), - ('output', '[[u8; 32]; 3]'), + ('initial_state', '[[u8; 32]; 3]'), + ('final_state', '[[u8; 32]; 3]'), ), [{ - 'input': list(map(bytes, input)), - 'output': list(map(bytes, perm(input))), + 'initial_state': list(map(bytes, input)), + 'final_state': list(map(bytes, perm(input))), } for input in test_vectors], )