Add CXOF128 and AEAD128
This commit is contained in:
@@ -23,6 +23,11 @@ parse (M_ # Ml) = (split M_, Ml)
|
||||
pad : {r, n} (n < r, fin r) => [n] -> [r]
|
||||
pad M = M # 0b1 # 0
|
||||
|
||||
toBlocks : {r, n} (r >= 1, fin r, fin n) => [n] -> [n / r + 1][r]
|
||||
toBlocks M = M1 # [pad M2]
|
||||
where
|
||||
(M1, M2) = parse M
|
||||
|
||||
// 3. Ascon Permutations
|
||||
|
||||
type constraint ValidRnd rnd = (1 <= rnd, rnd <= 16)
|
||||
@@ -93,5 +98,5 @@ pL [S0, S1, S2, S3, S4] =
|
||||
sigma : [64] -> [6] -> [6] -> [64]
|
||||
sigma x i j = x ^ (x >>> i) ^ (x >>> j)
|
||||
|
||||
LE : {n} (fin n, n % 8 == 0) => [n] -> [n]
|
||||
LE x = join (reverse (split`{n / 8, 8} x))
|
||||
little_bytes : {n} (fin n) => [8*n] -> [8*n]
|
||||
little_bytes M = join (map reverse (groupBy`{8} M))
|
||||
|
Reference in New Issue
Block a user