Permalink
Browse files

Documentation sweep. Issue #9

  • Loading branch information...
1 parent 8f27b9b commit f099e78d009da757e496ca1b8968391de854c078 @thoughtpolice committed Apr 12, 2012
View
@@ -20,11 +20,11 @@ description:
later. You won't need to do this again unless the underlying
version of NaCl changes.
.
- The current version of NaCl used in this package is @20110221@. It is patched
- to include an optimized implementation of Ed25519 for the signature API and
- use it as the default primitive. It is up to 200x faster than the old edwards
- implementation, and will be the default signature primitive in the next version
- of NaCl.
+ The current version of NaCl used in this package is @20110221@. It
+ is patched to include an optimized implementation of Ed25519 for the
+ signature API and use it as the default primitive. It is up to 200x
+ faster than the old edwards implementation, and will be the default
+ signature primitive in the next version of NaCl.
.
See more details including documentation, test coverage reports,
and benchmarks, here: <http://thoughtpolice.github.com/salt>
@@ -8,7 +8,11 @@
-- Stability : experimental
-- Portability : portable
--
--- Public-key encryption.
+-- Public-key encryption. The selected underlying primitive is is
+-- @curve25519xsalsa20poly1305@, a particular combination of
+-- Curve25519, Salsa20, and Poly1305. See the specification,
+-- \"Cryptography in NaCl\":
+-- <http://cr.yp.to/highspeed/naclcrypto-20090310.pdf>
--
module Crypto.NaCl.Encrypt.PublicKey
( -- * Types
@@ -8,7 +8,11 @@
-- Stability : experimental
-- Portability : portable
--
--- Authenticated, secret-key encryption.
+-- Authenticated, secret-key encryption. The selected underlying
+-- primitive used is @crypto_secretbox_xsalsa20poly1305@, a particular
+-- combination of Salsa20 and Poly1305. See the specification,
+-- \"Cryptography in NaCl\":
+-- <http://cr.yp.to/highspeed/naclcrypto-20090310.pdf>
--
module Crypto.NaCl.Encrypt.SecretKey
( -- * Types
@@ -8,7 +8,10 @@
-- Stability : experimental
-- Portability : portable
--
--- Fast stream encryption.
+-- Fast streaming encryption. The underlying primitive is
+-- @crypto_stream_xsalsa20@, a particular cipher specified in,
+-- \"Cryptography in NaCl\":
+-- <http://cr.yp.to/highspeed/naclcrypto-20090310.pdf>
--
module Crypto.NaCl.Encrypt.Stream
( -- * Types
@@ -68,7 +71,9 @@ streamGen (StreamNonce n) sz (SecretKey sk)
void $ c_crypto_stream_xsalsa20 out (fromIntegral sz) pn psk
{-# INLINEABLE streamGen #-}
--- | Given a 'Nonce' @n@, plaintext @p@ and 'SecretKey' @sk@, @encrypt n p sk@ encrypts the message @p@ using 'SecretKey' @sk@ and returns the result.
+-- | Given a 'Nonce' @n@, plaintext @p@ and 'SecretKey' @sk@, @encrypt
+-- n p sk@ encrypts the message @p@ using 'SecretKey' @sk@ and returns
+-- the result.
--
-- 'encrypt' guarantees the resulting ciphertext is the plaintext
-- bitwise XOR'd with the result of 'streamGen'. As a result,
View
@@ -3,18 +3,24 @@
-- Module : Crypto.NaCl.Sign
-- Copyright : (c) Austin Seipp 2011-2012
-- License : MIT
---
+--
-- Maintainer : mad.one@gmail.com
-- Stability : experimental
-- Portability : portable
---
+--
-- This module gives you the ability to create signed
-- messages and verify them against a signer's public key.
---
--- Please be cautious using this module. It will change significantly
--- in the next release of NaCl, and will be based on @ed25519@ (see
--- <http://ed25519.cr.yp.to>).
---
+--
+-- This module uses an optimized implementation of Ed25519. It is over
+-- 200x faster than the reference edwards implementation that comes
+-- with nacl-20110221. It will be the default signature primitive in
+-- the next version of nacl. You must be aware of this if you
+-- interoperate with any services that use the unpatched version of
+-- nacl-20110221.
+--
+-- For more information (including how to get a copy of the software)
+-- visit <http://ed25519.cr.yp.to>.
+--
module Crypto.NaCl.Sign
( -- * Keypair creation
createKeypair -- :: IO KeyPair

0 comments on commit f099e78

Please sign in to comment.