Expand description
Vision-4 hash permutation implementation.
Core permutation functions for the Vision-4 cryptographic hash, operating on 4-element states over GF(2^128). Each round applies: S-box → MDS → constants → S-box → MDS → constants.
Functions§
- b_
fwd_ transform - Applies forward B-polynomial transformation to all elements in state.
- b_
inv_ transform - Applies inverse B-polynomial transformation to all elements in state.
- constants_
add - Adds round constants to prevent slide attacks.
- linearized_
b_ inv_ transform_ scalar - Applies linearized B⁻¹ transformation to a single field element using lookup tables.
- linearized_
transform_ scalar - Applies linearized transformation using precomputed lookup tables for efficiency.
- mds_mul
- Applies MDS matrix multiplication for optimal diffusion.
- permutation
- Main Vision-4 permutation function operating on 4-element states.
- sbox
- S-box operation: batch inversion followed by polynomial transformation.