Add a license file

This commit is contained in:
2025-09-05 22:37:07 -07:00
parent 593a440b84
commit 671aac130f
2 changed files with 17 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
/** Ascon-Based Lightweight Cryptography
*
* Author: Eric Mertens
* Author: Eric Mertens <emertens@gmail.com>
* License: ISC
*
* Key algorithms:
* - AEAD128_encrypt/decrypt: Authenticated encryption
@@ -30,7 +31,7 @@ private
* block is empty (i.e., |𝑋̃ℓ| = 0).
*/
parse : {r, m} (fin m, fin r, r >= 1) => [m] -> ([m / r][r], [m % r])
parse (M_ # Ml) = (split M_, Ml)
parse (M # Ml) = (split M, Ml)
/** Padding rule.
*
@@ -48,9 +49,7 @@ private
* of integers using Cryptol's native big-endian representation.
*/
toBlocks : {r, m} (r >= 1, fin r, fin m) => [m] -> [m / r + 1][r]
toBlocks M = map reverse (M1 # [pad M2])
where
(M1, M2) = parse M
toBlocks M = bitsToWords (M # 0b1 # 0)
// 3. Ascon Permutations