]> git.codecow.com Git - Monocypher.git/commitdiff
Fix formatting and typos in the man pages
authorCuleX <cculex@gmail.com>
Fri, 6 Oct 2017 11:31:56 +0000 (13:31 +0200)
committerCuleX <cculex@gmail.com>
Fri, 6 Oct 2017 11:31:56 +0000 (13:31 +0200)
doc/man/man3/crypto_aead_lock.3monocypher
doc/man/man3/crypto_argon2i.3monocypher
doc/man/man3/crypto_blake2b.3monocypher
doc/man/man3/crypto_chacha20_encrypt.3monocypher
doc/man/man3/crypto_key_exchange.3monocypher
doc/man/man3/crypto_memcmp.3monocypher

index 0db754ba076c1e087159447cbb32eeb1086e3f17..d6f8321d29c4dae03a76f278a5b0a5ee67d6bb32 100644 (file)
@@ -35,7 +35,7 @@ These functions are variants of
 and
 .Xr crypto_unlock 3monocypher ,
 permitting additional data.
-Addiional data is authenticated, but
+Additional data is authenticated, but
 .Em not
 encrypted.
 .Pp
@@ -50,8 +50,8 @@ and
 .Ef
 .Pp
 If you must send unencrypted data, remember that you cannot trust
-unauthenticated data.
-.Em Including the length of the additional data .
+unauthenticated data,
+.Em including the length of the additional data .
 If you transmit that length over the wire, you must authenticate it.
 (The easiest way to do so is to append that length to the additional
 data before you call
index 8981f3b98b8130bd422282447bbd93bf314e194f..fe4c0e8420a6463c469853dba8cf53e07b71926d 100644 (file)
@@ -99,7 +99,7 @@ is zero.
 You generally do not need this parameter, but it does have some use:
 The key is supposed to be unknown to the attacker.
 In the context of password derivation, it would stay unknown
-.Em even if an attacker steals your password database.
+.Em even if an attacker steals your password database .
 This may be possible if that key is stored separately from your password
 database (like on a separate server, and never written on the main
 server's disks).
index 9b68cb6fb34d3eb99fe3ab9a15f1dc194a73b261..5cc8b6c779a7769435a46fc986dff230b940319e 100644 (file)
@@ -51,7 +51,7 @@
 .Sh DESCRIPTION
 Blake2b is a fast cryptographically secure hash, based on the ideas of
 Chacha20.
-It is faster than md5, yet just as secure as SHA-3.
+It is faster than MD5, yet just as secure as SHA-3.
 .Pp
 Blake2b is immune to length extension attacks, and as such does not
 require any specific precautions, such as using the HMAC algorithm.
@@ -67,6 +67,8 @@ free bytes.
 .It Fa hash_size
 the length of the output hash.
 Must be between 1 and 64.
+A value of 64 is recommended.
+Values below 32 are discouraged.
 .It Fa key
 some secret key.
 May be
@@ -93,14 +95,17 @@ and
 .Fn crypto_blake2b_general .
 The
 .Fn crypto_blake2b
-is provided for convenience.
-It uses a 64 bytes hash and no key (this is a good default).
+function is provided for convenience.
+It uses a 64 byte hash and no key.
+These values are good defaults for
+.Fn crypto_blake2b_general_init ,
+too.
 .Pp
 If you use the
 .Fn crypto_blake2b_general
-function, you can specify the size of the hash (sizes below 32 bytes
-are discouraged), and use a secret key to make the hash unpredictable
-\(en useful for message authentication codes.
+function, you can specify the size of the hash, and use a secret key to
+make the hash unpredictable \(en useful for message authentication
+codes.
 .Ss Incremental interface
 Incremental interfaces are useful to handle streams of data or large
 files without using too much memory.
@@ -121,7 +126,7 @@ The invariants of the parameters are the same as for
 .Fn crypto_blake2b_init
 is a convenience initialisation function that
 specifies a 64-byte hash and no key.
-This is a good default.
+This is considered a good default.
 .Sh RETURN VALUES
 These functions return nothing.
 .Sh EXAMPLES
index 791d4e63a077dae835f23972aeb4ea2a4016966d..aa0479f4f4da3f54527f2f5ada6a3909a20df86a 100644 (file)
@@ -48,8 +48,8 @@
 .Fa "uint64_t ctr"
 .Fc
 .Sh DESCRIPTION
-These functions provides an incremental interface for Chacha20, with an
-initialisation, and as many encryption steps as you want.
+These functions provide an incremental interface for Chacha20, with an
+initialisation function, and as many encryption steps as desired.
 .Pp
 To use these functions, you must first initialize a
 .Vt crypto_chacha_ctx
@@ -105,7 +105,7 @@ with
 being
 .Dv NULL .
 This is useful as a user space random number generator.
-Do not use this as a cryptographic random number generator.
+.Sy \&Do not use this as a cryptographic random number generator .
 Still, this function can be used outside of a security context:
 deterministic procedural generation comes to mind.
 .Pp
index 09eed6ea4e0c5f5322510f94906d125049a1956a..f050ebf3e0f79936cca15a66f2d734e4c60d1bcf 100644 (file)
@@ -55,9 +55,9 @@ and
 .Xr crypto_aead_unlock 3monocypher
 functions.
 It performs an X25519 key exchange, then hashes the shared secret (with
-HChacha20) to get a suitably random-looking shared key.
+HChacha20) to get a suitably random shared key.
 .Pp
-Keep in mind that if either of your long term secret keys leaks, it
+Keep in mind that if either of the long term secret keys leaks, it
 may compromise
 .Em all past messages !
 If you want forward secrecy, you will need to exchange temporary public
@@ -87,7 +87,7 @@ This function computes a shared secret with your secret key
 .Fa your_secret_key
 and the other party's public key
 .Fa their_public_key .
-.Sy Warning: the shared secret is not cryptographically random.
+.Sy Warning: the shared secret is not cryptographically random .
 Do not use it directly as a session key.
 You need to hash it first.
 Any cryptographically secure hash will do.
@@ -158,7 +158,7 @@ function utilizes HChacha20 as well.
 .Pp
 Note that the most significant bit of the public key is systematically
 ignored.
-It is not needed, because every public key should be smaller than
+It is not needed because every public key should be smaller than
 2^255-19, which fits in 255 bits.
 If another implementation of X25519 gives you a key that's not fully
 reduced and has its high bit set, the computation will fail.
index cbe9fd99b1cdd1b775cc92255562aae3566a5b6a..4ab5e06247dd5c8c21b4793a67ed63c9e1175780 100644 (file)
@@ -12,7 +12,8 @@
 .Ft int
 .Fn crypto_zerocmp "const uint8_t *p" "size_t n"
 .Sh DESCRIPTION
-In crypto, we often need to compare secrets together.
+In cryptography, we often need to compare secrets or values derived from
+secrets.
 A message authentication code for instance:
 while the MAC sent over the network along with a message is public, the
 true MAC is secret.