Skip to content

Commit

Permalink
Update the SIV example to avoid issue #375.
Browse files Browse the repository at this point in the history
robdockins committed Aug 23, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent cd9ffed commit 14af369
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/SIV-rfc5297.md
Original file line number Diff line number Diff line change
@@ -554,14 +554,14 @@ ctr32 : {n} (2^^39 - 128 >= n) => Key -> [128] -> [n] -> [n]
ctr32 k iv pt = pt ^ take stream
where
stream = join [E(k,v) | v <- ivs]
ivs = [take `{96} iv # cnt + i | i <- [0,1..]]
ivs = [take `{96} iv # cnt + i | i <- [0...]]
cnt = drop `{back=32} iv
ctr64 : {n} (2^^71 - 128 >= n) => Key -> [128] -> [n] -> [n]
ctr64 k iv pt = pt ^ take stream
where
stream = join [E(k,v) | v <- ivs]
ivs = [take `{64} iv # cnt + i | i <- [0,1..]]
ivs = [take `{64} iv # cnt + i | i <- [0...]]
cnt = drop `{back=64} iv
```

0 comments on commit 14af369

Please sign in to comment.