crypto-sodium
Easy-and-safe-to-use high-level cryptography based on Sodium
This is a collection of high-level cryptographic primitives based on
<https://libsodium.io/ Sodium>, spiced up with extra type-safety
of the Haskell type system.
__Note: this package is experimental and WIP.__
= Why
Cryptography is hard to do right and you should never try to implement it
on your own, even if you have access to safe and secure cryptographic
primitives. Luckily, D. J. Bernstein created <https://nacl.cr.yp.to/ NaCl>.
NaCl was designed specifically to make it hard to use it incorrectly and
thus save you from a disaster. It exposes high-level cryptographic
algorithms with underlying implementations chosen for you, so you do not
get flexibility, but you get security, which is more important.
= What
<https://libsodium.org Sodium> is a reimplementation of NaCl
with the goal to make it more portable across different platforms.
With time, it started providing more than the same interface as NaCl.
Nowadays it implements additional primitives and utility functions.
= How
== Library initialisation
* "Crypto.Sodium.Init"
== Secret-key cryptography
* Authenticated symmetric-key encryption: "Crypto.Sodium.Encrypt.Symmetric"
* Message authentication codes: "Crypto.Sodium.Mac"
== Public-key cryptography
* Authenticated public-key encryption: "Crypto.Sodium.Encrypt.Public"
* Public-key signatures: "Crypto.Sodium.Sign"
== Additional primitives
* Key derivation and generation: "Crypto.Sodium.Key"
* Cryptographically-secure random: "Crypto.Sodium.Random"
* Hashing: "Crypto.Sodium.Hash"
| version | uploaded | uploader | changes | |
|---|---|---|---|---|
| 0.0.5.0 | 2021-11-22 17:48 UTC | kirelagin | 2 revisions | +3157/−1665 lines, 47 filesdep ~basedep ~bytestringdep ~memoryPVP: major bump suggested |
| 0.0.4.0 | 2021-07-30 03:23 UTC | kirelagin | +825/−234 lines, 22 filesdep +base16dep +deepseqdep +randomdep −base16-bytestringdep ~NaClPVP: major bump suggested | |
| 0.0.3.1 | 2020-06-12 11:36 UTC | kirelagin | +7/−3 lines, 4 filesPVP ok | |
| 0.0.3.0 | 2020-06-12 11:20 UTC | kirelagin | +987/−31 lines, 14 filesdep +base16-bytestringdep +cerealdep +hedgehogdep −gdpdep ~libsodiumdep ~memoryPVP ok | |
| 0.0.2.0 | 2020-05-24 18:37 UTC | kirelagin | +591/−0 lines, 8 filesdep +HUnitdep +NaCldep +base |
Dependencies of crypto-sodium-0.0.5.0
HUnit >=0 1.6.1.0 → 1.6.2.0
| 2021-01-19 18:27 UTC | 1.6.2.0 | +48/−42 lines, 5 filesdep ~call-stackPVP: major bump suggested |
| 2020-10-31 12:09 UTC | 1.6.1.0 | +35/−21 lines, 4 filesPVP ok |
| 2017-03-20 01:42 UTC | 1.6.0.0 | +9/−5 lines, 4 filesdep ~basePVP ok |
| 2016-10-16 03:35 UTC | 1.5.0.0 | +47/−27 lines, 5 filesPVP ok |
| 2016-10-07 03:13 UTC | 1.4.0.0 | +761/−778 lines, 12 filesdep +call-stackPVP ok |
showing 5 of 22 versions
NaCl >=0.0.4.0 && <0.1 0.0.4.0 → 0.0.5.0
| 2021-11-22 17:46 UTC | 0.0.5.0 | +11/−13 lines, 6 filesdep ~basedep ~bytestringdep ~memoryPVP ok |
| 2021-07-30 03:15 UTC | 0.0.4.0 | +2194/−711 lines, 30 filesdep +base16PVP: major bump suggested |
| 2020-06-12 11:36 UTC | 0.0.3.1 outside bounds | +3/−2 lines, 2 filesPVP ok |
| 2020-06-12 11:20 UTC | 0.0.3.0 outside bounds | +387/−24 lines, 6 filesdep −gdpdep ~libsodiumPVP ok |
| 2020-05-24 18:35 UTC | 0.0.2.0 outside bounds | +114/−147 lines, 8 filesdep −textdep ~memoryPVP: major bump suggested |
showing 5 of 6 versions
base >=4.10 && <4.18 4.17.2.1 → 4.22.1.0 newer than bounds
| 2026-12-01 12:38 UTC | 4.22.1.0 newer than bounds | +388/−6 lines, 9 filesdep ~ghc-internalPVP: major bump suggested |
| 2025-12-19 11:52 UTC | 4.22.0.0 newer than bounds | +886/−215 lines, 28 filesdep ~ghc-internalPVP ok |
| 2026-03-27 12:26 UTC | 4.21.2.0 newer than bounds | +10/−3 lines, 4 filesdep ~ghc-internalPVP ok |
| 2025-12-27 10:31 UTC | 4.21.1.0 newer than bounds | +17/−5 lines, 4 filesdep ~ghc-internalPVP ok |
| 2024-12-16 09:24 UTC | 4.21.0.0 newer than bounds | +1170/−396 lines, 39 filesdep ~ghc-internalPVP ok |
showing 5 of 61 versions
base16 >=0.1.1 && <0.4 0.3.2.1 → 2.0 newer than bounds
| 2026-10-19 17:45 UTC | 2.0 newer than bounds | +1944/−464 lines, 27 filesdep ~basedep ~textPVP ok |
| 2023-06-22 21:04 UTC | 1.0 newer than bounds | +703/−198 lines, 21 filesdep ~basedep ~bytestringdep ~deepseqsetup-changedPVP ok |
| 2022-11-16 21:08 UTC | 0.3.2.1 | +67/−11 lines, 5 filesdep ~basedep ~primitivePVP: minor bump suggested |
| 2022-03-28 19:27 UTC | 0.3.2.0 | +14/−14 lines, 5 filesdep ~basedep ~textPVP ok |
| 2021-12-26 23:45 UTC | 0.3.1.0 | +14/−6 lines, 2 filesdep ~basePVP ok |
showing 5 of 16 versions
bytestring >=0.9 && <0.12 0.11.5.4 → 0.12.2.0 newer than bounds
| 2024-12-06 21:41 UTC | 0.12.2.0 newer than bounds | +538/−437 lines, 44 filesdep ~QuickCheckdep ~basePVP ok |
| 2024-02-16 03:27 UTC | 0.12.1.0 newer than bounds | +3398/−1642 lines, 37 filesdep +sybdep ~basePVP: major bump suggested |
| 2023-08-16 01:53 UTC | 0.12.0.2 newer than bounds | +16/−2 lines, 3 files |
| 2023-08-05 00:03 UTC | 0.12.0.1 newer than bounds | +47/−9 lines, 3 files |
| 2023-07-07 01:45 UTC | 0.12.0.0 newer than bounds | +1459/−520 lines, 21 filesdep +data-array-bytePVP ok |
showing 5 of 49 versions
cereal >=0.1 && <0.6 0.5.8.2 → 0.5.8.3
| 2022-08-09 18:33 UTC | 0.5.8.3 | +9/−1 lines, 3 filesdep ~basePVP ok |
| 2021-11-04 19:42 UTC | 0.5.8.2 | +12/−7 lines, 3 filesdep ~basePVP: major bump suggested |
| 2019-05-31 15:45 UTC | 0.5.8.1 | +7/−1 lines, 3 filesdep ~basePVP ok |
| 2019-01-07 17:32 UTC | 0.5.8.0 | +24/−14 lines, 4 filesPVP: major bump suggested |
| 2018-08-07 16:23 UTC | 0.5.7.0 | +28/−1 lines, 4 filesnew-uploaderPVP: major bump suggested |
showing 5 of 25 versions
deepseq >=0 1.5.2.0 → 1.6.0.0
| 2024-09-08 16:18 UTC | 1.6.0.0 | +5/−14 lines, 3 filesdep ~basePVP ok |
| 2025-06-14 22:25 UTC | 1.5.2.0 | +13/−4 lines, 3 filesPVP: major bump suggested |
| 2024-09-09 12:48 UTC | 1.5.1.0 | +69/−14 lines, 3 filesdep −arraydep ~basePVP: major bump suggested |
| 2023-07-27 19:32 UTC | 1.5.0.0 | +619/−532 lines, 5 filesdep ~basePVP ok |
| 2022-12-18 00:14 UTC | 1.4.8.1 | +34/−9 lines, 3 filesdep ~basePVP: major bump suggested |
showing 5 of 26 versions
hedgehog >=0 1.6 → 1.7
| 2025-09-22 20:47 UTC | 1.7 | +50/−26 lines, 5 filesdep ~lifted-asyncdep ~template-haskelldep ~timePVP ok |
| 2025-09-08 12:45 UTC | 1.6 | +87/−63 lines, 4 filesPVP ok |
| 2024-07-24 13:51 UTC | 1.5 | +255/−78 lines, 5 filesdep ~containersdep ~randomdep ~template-haskellPVP ok |
| 2023-08-06 21:48 UTC | 1.4 | +138/−64 lines, 7 filesdep ~ansi-terminaldep ~barbiesdep ~bytestringPVP ok |
| 2023-06-22 11:22 UTC | 1.3 | +152/−29 lines, 11 filesdep +safe-exceptionsdep ~ansi-terminalPVP ok |
showing 5 of 28 versions
libsodium >=1.0.11 && <2 1.0.18.2 → 1.0.18.3
| 2023-03-06 16:51 UTC | 1.0.18.3 | +2326/−1750 lines, 10 files |
| 2021-07-28 09:07 UTC | 1.0.18.2 | +11/−1 lines, 3 files |
| 2020-05-18 13:59 UTC | 1.0.18.1 | +152/−13 lines, 4 filesPVP: minor bump suggested |
| 2020-05-08 12:59 UTC | 1.0.18.0 | +1672/−0 lines, 7 filesdep +basedep +hedgehogdep +libsodium |
memory >=0.14.15 && <0.19 0.17.0 → 0.18.0
| 2022-09-05 01:54 UTC | 0.18.0 | +14/−5 lines, 5 filesdep ~basedep ~ghc-primPVP ok |
| 2022-03-10 01:00 UTC | 0.17.0 | +157/−162 lines, 10 filesdep ~basedep ~ghc-primPVP ok |
| 2021-05-08 14:19 UTC | 0.16.0 | +26/−112 lines, 10 filesdep ~basedep ~ghc-primPVP ok |
| 2019-09-05 04:24 UTC | 0.15.0 | +14/−7 lines, 3 filesdep ~basedep ~basementPVP ok |
| 2018-09-30 16:18 UTC | 0.14.18 | +35/−10 lines, 5 filesPVP ok |
showing 5 of 36 versions
random >=1.0 && <1.3 1.2.1.3 → 1.3.1 newer than bounds
| 2025-04-04 14:25 UTC | 1.3.1 newer than bounds | +15/−6 lines, 3 filesPVP ok |
| 2025-01-06 04:03 UTC | 1.3.0 newer than bounds | +2410/−538 lines, 16 filesdep +data-array-bytedep ~basedep ~transformersPVP ok |
| 2024-12-14 20:31 UTC | 1.2.1.3 | +22/−37 lines, 3 filesdep −doctestdep −mwc-randomdep −unliftiodep ~basedep ~containersdep ~primitivePVP ok |
| 2024-02-04 16:26 UTC | 1.2.1.2 | +17/−12 lines, 2 filesdep ~doctestdep ~tastyPVP: major bump suggested |
| 2022-05-09 02:32 UTC | 1.2.1.1 | +8/−9 lines, 3 filesdep −ghc-byteorderdep ~bytestringdep ~doctestdep ~mtlPVP ok |
showing 5 of 15 versions
safe-exceptions >=0.1 && <0.2 0.1.7.3 → 0.1.7.4
| 2023-06-26 17:37 UTC | 0.1.7.4 | +143/−65 lines, 3 filesdep ~deepseqPVP: major bump suggested |
| 2022-05-22 08:14 UTC | 0.1.7.3 | +6/−2 lines, 2 filesdep ~transformersPVP ok |
| 2021-07-09 06:46 UTC | 0.1.7.2 | +103/−47 lines, 5 filesdep ~basedep ~exceptionsdep ~transformersPVP: major bump suggested |
| 2020-08-23 13:52 UTC | 0.1.7.1 | +19/−6 lines, 5 filesPVP: major bump suggested |
| 2018-01-18 15:32 UTC | 0.1.7.0 | +31/−18 lines, 3 filesdep ~basedep ~exceptionsPVP: major bump suggested |
showing 5 of 12 versions
tasty >=0 1.5.4 → 1.5.5
| 2026-10-20 23:13 UTC | 1.5.5 | +53/−26 lines, 7 filesdep +terminal-sizePVP ok |
| 2026-03-25 20:04 UTC | 1.5.4 | +332/−166 lines, 22 filesdep −semigroupsPVP ok |
| 2025-01-05 19:52 UTC | 1.5.3 | +36/−11 lines, 3 filesdep ~containersdep ~optparse-applicativePVP: major bump suggested |
| 2024-11-03 00:34 UTC | 1.5.2 | +22/−5 lines, 4 filesdep ~basePVP ok |
| 2024-06-22 10:14 UTC | 1.5.1 | +131/−63 lines, 10 filesdep ~basePVP: major bump suggested |
showing 5 of 76 versions
tasty-hedgehog >=0 1.4.0.1 → 1.4.0.2
| 2023-08-07 06:43 UTC | 1.4.0.2 | +10/−4 lines, 3 filesdep ~basedep ~hedgehogdep ~tastyPVP ok |
| 2023-03-15 09:39 UTC | 1.4.0.1 | +11/−6 lines, 3 filesdep ~basedep ~hedgehogPVP ok |
| 2022-10-24 17:53 UTC | 1.4.0.0 | +23/−15 lines, 3 filesdep ~hedgehogPVP ok |
| 2022-10-05 08:58 UTC | 1.3.1.0 | +18/−11 lines, 3 filesnew-uploaderPVP ok |
| 2022-08-23 06:50 UTC | 1.3.0.0 | +13/−10 lines, 4 filesdep ~hedgehogPVP ok |
showing 5 of 15 versions
tasty-hunit >=0 0.10.1 → 0.10.2
| 2024-06-22 10:14 UTC | 0.10.2 | +15/−7 lines, 4 filesPVP ok |
| 2023-09-10 00:12 UTC | 0.10.1 | +30/−52 lines, 5 filesdep ~basedep ~call-stackdep ~tastynew-uploaderPVP ok |
| 2020-12-18 09:42 UTC | 0.10.0.3 | +55/−10 lines, 4 filesdep ~basePVP ok |
| 2019-05-15 05:50 UTC | 0.10.0.2 | +38/−8 lines, 3 filesdep ~tastyPVP: major bump suggested |
| 2017-12-01 19:24 UTC | 0.10.0.1 | +51/−29 lines, 4 filesPVP: major bump suggested |
showing 5 of 15 versions
Reverse dependencies
1 packages depend on crypto-sodium