Apply suggestions from code review

This commit is contained in:
str4d 2021-05-08 19:51:33 +01:00 committed by GitHub
parent bb16eca2c0
commit cb9348e7a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -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],
)