/ reference / haskell / src / Poseidon2 / Example.hs
Example.hs
 1  
 2  module Poseidon2.Example where
 3  
 4  --------------------------------------------------------------------------------
 5  
 6  import ZK.Algebra.Curves.BN128.Fr.Mont (Fr)
 7  
 8  import Poseidon2.Permutation
 9  
10  --------------------------------------------------------------------------------
11  
12  -- BN254 example test vector
13  exInput, exOutput :: (Fr,Fr,Fr)
14  exInput = (0,1,2) 
15  exOutput = 
16    ( 0x30610a447b7dec194697fb50786aa7421494bd64c221ba4d3b1af25fb07bd103 
17    , 0x13f731d6ffbad391be22d2ac364151849e19fa38eced4e761bcd21dbdc600288 
18    , 0x1433e2c8f68382c447c5c14b8b3df7cbfd9273dd655fe52f1357c27150da786f 
19    )
20  
21  kats :: Bool  
22  kats = permutation exInput == exOutput 
23  
24  --------------------------------------------------------------------------------