tsuraan / saltine-quickcheck

QuickCheck instances for the Saltine library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Saltine QuickCheck

QuickCheck implementations for Saltine. Provides Arbitrary instances for Saltine's Box and Sign keypairs, Secret Keys, as well as Box and Secret Nonces. Some examples follow:

*Crypto.Saltine.QuickCheck Test.QuickCheck> generate (arbitrary :: Gen
DeterministicBoxPair)
DBP<"5B34D2FF839A1ECE"
"307D6731AA7658ECA0876464AA95399D7A3792204630F29DF89A100056B12B06">
*Crypto.Saltine.QuickCheck Test.QuickCheck> generate (arbitrary :: Gen
DeterministicBoxNonce)
<DBN "977C2FA7A3C5AC3F8CFC3005DCA4B105EF989FBE56510351">
*Crypto.Saltine.QuickCheck Test.QuickCheck> generate (arbitrary :: Gen
DeterministicSignPair)
DSP<"B89D1BA20DFAE4C3"
"25AFA5125730F29301D780D4F4EC1763244C3D9C33B103E9754E1429914465DE">
*Crypto.Saltine.QuickCheck Test.QuickCheck> generate (arbitrary :: Gen
DeterministicSecretKey)
<DSK "EA46F21C40615F35">
*Crypto.Saltine.QuickCheck Test.QuickCheck> generate (arbitrary :: Gen
DeterministicSecretNonce)
<DSN "F14C9976B9FADFC550AC76BFA699FA0C1EBDB1B552BFA32A">

The actual Saltine types are minimally wrapped in data/newtype wrappers. Notice that none of the keys or nonces generated by this library should be used for securing actual data; everything here is ultimately rooted in the Word8 arbitrary instance, and is not in any way cryptographically sound.

About

QuickCheck instances for the Saltine library

License:MIT License


Languages

Language:Haskell 100.0%