get the endianness working

This commit is contained in:
Eric Mertens
2025-09-03 17:01:03 -07:00
parent 2186fd610f
commit 338a68acf4
3 changed files with 1052 additions and 1042 deletions

View File

@@ -13,6 +13,16 @@ https://doi.org/10.6028/NIST.SP.800-232
*/
module Ascon where
// 2.1. Auxiliary Functions
/// Parse function.
parse : {r, n} (fin n, fin r, 0 < r) => [n] -> ([n/r][r], [n%r])
parse (M_ # Ml) = (split M_, Ml)
/// Padding rule.
pad : {r, n} (n < r, fin r) => [n] -> [r]
pad M = M # 0b1 # 0
// 3. Ascon Permutations
type constraint ValidRnd rnd = (1 <= rnd, rnd <= 16)