2024-10-02 22:55:15 +02:00
|
|
|
|
|
|
|
|
module Permutations where
|
|
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
2024-10-16 17:30:29 +02:00
|
|
|
import qualified Poseidon2.T12.Permutation as Poseidon2_T12
|
|
|
|
|
import qualified Poseidon2.T16.Permutation as Poseidon2_T16
|
|
|
|
|
import qualified Monolith.Permutation as Monolith
|
2024-10-02 22:55:15 +02:00
|
|
|
|
|
|
|
|
import Common
|
|
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
permute :: Hash -> State -> State
|
|
|
|
|
permute hash = case hash of
|
2024-10-16 17:30:29 +02:00
|
|
|
Poseidon2_T12 -> Poseidon2_T12.permutation
|
|
|
|
|
Poseidon2_T16 -> Poseidon2_T16.permutation
|
|
|
|
|
Monolith -> Monolith.permutation
|
2024-10-02 22:55:15 +02:00
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|