minor doc improvements

This commit is contained in:
Balazs Komuves 2024-12-13 21:41:22 +01:00
parent 95686198f6
commit 338163f56d
No known key found for this signature in database
GPG Key ID: F63B7AEF18435562
5 changed files with 13 additions and 3 deletions

View File

@ -1,5 +1,5 @@
-- | Fiat-Shamir challenges
-- | Duplex sponge used for Fiat-Shamir challenges
{-# LANGUAGE StrictData, GeneralizedNewtypeDeriving #-}
module Challenge.Pure

View File

@ -1,5 +1,5 @@
-- | Constant's for Plonky2's version of Poseidon hash
-- | Constants for Plonky2's version of Poseidon hash
--
-- See <https://github.com/0xPolygonZero/plonky2/blob/main/plonky2/src/hash/poseidon_goldilocks.rs>
@ -40,6 +40,8 @@ fast_PARTIAL_ROUND_CONSTANTS = listArray (0,21)
, 0x1aca78f31c97c876 , 0x0
]
{-
fast_PARTIAL_ROUND_VS :: [Array Int F]
fast_PARTIAL_ROUND_VS = map (listArray (0,10))
[ [0x94877900674181c3, 0xc6c67cc37a2a2bbd, 0xd667c2055387940f, 0x0ba63a63e94b5ff0, 0x99460cc41b8f079f, 0x7ff02375ed524bb3, 0xea0870b47a8caf0e, 0xabcad82633b7bc9d, 0x3b8d135261052241, 0xfb4515f5e5b0d539, 0x3ee8011c2b37f77c ]
@ -92,6 +94,7 @@ fast_PARTIAL_ROUND_W_HATS = map (listArray (0,10))
, [0x3abeb80def61cc85, 0x9d19c9dd4eac4133, 0x075a652d9641a985, 0x9daf69ae1b67e667, 0x364f71da77920a18, 0x50bd769f745c95b1, 0xf223d1180dbbf3fc, 0x2f885e584e04aa99, 0xb69a0fa70aea684a, 0x09584acaa6e062a0, 0x0bc051640145b19b ]
]
-}
-- ^ NB: This is in ROW-major order to support cache-friendly pre-multiplication.
fast_PARTIAL_ROUND_INITIAL_MATRIX :: Array (Int,Int) F

View File

@ -1,4 +1,6 @@
-- | Hash digests consist of 4 goldilocks field elements
{-# LANGUAGE DeriveGeneric, OverloadedStrings #-}
module Hash.Digest where

View File

@ -20,7 +20,10 @@ import Hash.Digest
--------------------------------------------------------------------------------
-- | permutation of @[0..11]@
-- | KAT = Known Answer Test
--
-- This is the permutation of @[0..11]@
--
kats :: [Word64]
kats =
[ 0xd64e1e3efc5b8e9e , 0x53666633020aaa47 , 0xd40285597c6a8825 , 0x613a4f81e81231d2

View File

@ -1,4 +1,6 @@
-- | Sponge construction
module Hash.Sponge where
--------------------------------------------------------------------------------