poly1305

The Poly1305 message authentication code (docs.ppad.tech/poly1305).
git clone git://git.ppad.tech/poly1305.git
Log | Files | Refs | README | LICENSE

commit 9a67f66c8d0a9292aa5b86a620be6c4d8c7d66d2
parent 2f5fbdd6f748ffd0d88d66e33360e4d67a426614
Author: Jared Tobin <jared@jtobin.io>
Date:   Sat, 21 Jun 2025 14:34:16 +0400

release: v0.3.0

Diffstat:
MCHANGELOG | 4++++
MREADME.md | 13++++++-------
Mflake.lock | 8++++----
Mppad-poly1305.cabal | 2+-
4 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,5 +1,9 @@ # Changelog +- 0.3.0 (2025-06-21) + * The 'mac' function is now total, returning 'Nothing' when supplied + with an invalid-length one-time key. + - 0.2.0 (2025-03-10) * Fix a bug in which small produced MAC's were not being padded to 128 bits. diff --git a/README.md b/README.md @@ -35,16 +35,15 @@ The aim is best-in-class performance for pure, highly-auditable Haskell code. Current benchmark figures on the simple "sunscreen input" from RFC8439 -on my mid-2020 MacBook Air look like (use `cabal bench` to run the +on an M4 Silicon MacBook Air look like (use `cabal bench` to run the benchmark suite): ``` - benchmarking ppad-poly1305/mac - time 9.880 μs (9.596 μs .. 10.11 μs) - 0.995 R² (0.993 R² .. 0.997 R²) - mean 9.663 μs (9.471 μs .. 9.879 μs) - std dev 715.4 ns (629.7 ns .. 828.0 ns) - variance introduced by outliers: 77% (severely inflated) + benchmarking ppad-poly1305/mac (big key) + time 3.491 μs (3.487 μs .. 3.495 μs) + 1.000 R² (1.000 R² .. 1.000 R²) + mean 3.489 μs (3.484 μs .. 3.493 μs) + std dev 15.51 ns (12.66 ns .. 19.80 ns) ``` ## Security diff --git a/flake.lock b/flake.lock @@ -51,11 +51,11 @@ ] }, "locked": { - "lastModified": 1740802922, - "narHash": "sha256-j+sxOWxnsMgX3GHyf7Z44lvAiBkrl/p0lD0eYli6Lgo=", + "lastModified": 1741625558, + "narHash": "sha256-ZBDXRD5fsVqA5bGrAlcnhiu67Eo50q0M9614nR3NBwY=", "ref": "master", - "rev": "043c845ae7f280ddbfdb5568ea453c9943e49cf2", - "revCount": 21, + "rev": "fb63457f2e894eda28250dfe65d0fcd1d195ac2f", + "revCount": 24, "type": "git", "url": "git://git.ppad.tech/base16.git" }, diff --git a/ppad-poly1305.cabal b/ppad-poly1305.cabal @@ -1,6 +1,6 @@ cabal-version: 3.0 name: ppad-poly1305 -version: 0.2.0 +version: 0.3.0 synopsis: A pure Poly1305 MAC license: MIT license-file: LICENSE