úÎ#^5\³     None$-.=>?@AHMX_kpŸNaClNonce that can be used for Box.dThis type is parametrised by the actual data type that contains bytes. This can be, for example, a  ByteString.NaCl$Public key that can be used for Box.NaCl$Secret key that can be used for Box.NaClConvert bytes to a secret key.NaClGenerate a new  together with its .±Note: this function is not thread-safe (since the underlying C function is not thread-safe both in Sodium and in NaCl)! Either make sure there are no concurrent calls or see  Crypto.Init in  1https://hackage.haskell.org/package/crypto-sodium crypto-sodium1 to learn how to make this function thread-safe.NaClMake a  from an arbitrary byte array.This function returns JustV if and only if the byte array has the right length to be used as a nonce with a Box.NaClEncrypt a message.NaClDecrypt a message.NaClReceiver s public keyNaClSender s secret keyNaClNonceNaClPlaintext messageNaClReceiver s secret keyNaClSender s public keyNaClNonceNaCl Cyphertext  None$-.=>?@AHMX_kp.% NaClEncrypt a message. +encrypted = Box.create pk sk nonce message pk9 is the receiver s public key, used for encryption. sk5 is the sender s public key, used for authentication.These are generated using x and are supposed to be exchanged in advance. Both parties need to know their own secret key and the other s public key.nonce° is an extra noise that ensures that if you encrypt the same message with the same key multiple times, you will get different ciphertexts, which is required for  /https://en.wikipedia.org/wiki/Semantic_securitysemantic security1. There are two standard ways of getting it:  Use a counteru. In this case you keep a counter of encrypted messages, which means that the nonce will be new for each new message.Random·. You generate a random nonce every time you encrypt a message. Since the nonce is large enough, the chances of you using the same nonce twice are negligible. For useful helpers, see  Crypto.Random, in  1https://hackage.haskell.org/package/crypto-sodium crypto-sodium.message is the data you are encrypting.OThis function adds authentication data, so if anyone modifies the cyphertext, open will refuse to decrypt it. NaClDecrypt a message. +decrypted = Box.open sk pk nonce encrypted sk4 is the receiver s secret key, used for description.pk5 is the sender s public key, used for authentication.nonce* is the same that was used for encryption. encrypted is the output of  .This function will return NothingD if the encrypted message was tampered with after it was encrypted. NaClReceiver s public keyNaClSender s secret keyNaClNonceNaClPlaintext message NaClReceiver s secret keyNaClSender s public keyNaClNonceNaClEncrypted message (cyphertext)   None$-.=>?@AHMX_kp<à NaCl%Nonce that can be used for Secretbox.dThis type is parametrised by the actual data type that contains bytes. This can be, for example, a  ByteString. NaCl.Encryption key that can be used for Secretbox.dThis type is parametrised by the actual data type that contains bytes. This can be, for example, a  ByteString8, but, since this is a secret key, it is better to use  ScrubbedBytes. NaClMake a   from an arbitrary byte array.This function returns JustZ if and only if the byte array has the right length to be used as a key with a Secretbox.NaClMake a   from an arbitrary byte array.This function returns Just\ if and only if the byte array has the right length to be used as a nonce with a Secretbox.NaClEncrypt a message.NaClDecrypt a message.NaCl Secret keyNaClNonceNaClPlaintext messageNaCl Secret keyNaClNonceNaCl Cyphertext  None$-.=>?@AHMX_kp[ NaClEncrypt a message. /encrypted = Secretbox.create key nonce message keyW is the secret key used for encryption. There are two typical ways of creating it: Derive from a passwordC. If you want to protect a message with a password, you must use a  5https://en.wikipedia.org/wiki/Key_derivation_functionkey derivation function. to turn this password into an encryption key.Generate a random one{. This can be useful in certain situations when you want to have an intermediate key that you will encrypt and share later.The  Crypto.Key module in  1https://hackage.haskell.org/package/crypto-sodium crypto-sodium& has functions to help in either case.nonce° is an extra noise that ensures that if you encrypt the same message with the same key multiple times, you will get different ciphertexts, which is required for  /https://en.wikipedia.org/wiki/Semantic_securitysemantic security1. There are two standard ways of getting it:  Use a counteru. In this case you keep a counter of encrypted messages, which means that the nonce will be new for each new message.Random·. You generate a random nonce every time you encrypt a message. Since the nonce is large enough, the chances of you using the same nonce twice are negligible. For useful helpers, see  Crypto.Random, in  1https://hackage.haskell.org/package/crypto-sodium crypto-sodium.message is the data you are encrypting.OThis function adds authentication data, so if anyone modifies the cyphertext, open will refuse to decrypt it.NaClDecrypt a message. /decrypted = Secretbox.open key nonce encrypted key and nonce, are the same that were used for encryption. encrypted is the output of .This function will return NothingD if the encrypted message was tampered with after it was encrypted.NaCl Secret keyNaClNonceNaClPlaintext messageNaCl Secret keyNaClNonceNaClEncrypted message (cyphertext)  None$-.=>?@AHMX_kp\Ž         NaCl-0.0.3.0-inplaceCrypto.Box.Internal Crypto.BoxCrypto.Secretbox.InternalCrypto.Secretbox Paths_NaClNonce PublicKey SecretKey toSecretKey toPublicKeykeypairtoNoncecreateopenKeytoKeyversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName