From 64c9d4eba3c132e3a6c2c9a37f53423c3aaa9f9b Mon Sep 17 00:00:00 2001 From: Michael Savage Date: Thu, 4 Jan 2018 22:27:15 +0200 Subject: [PATCH] More .Fa, more "Length of" --- doc/man/man3/crypto_argon2i.3monocypher | 22 ++++++++++++------- doc/man/man3/crypto_blake2b.3monocypher | 7 +++--- doc/man/man3/crypto_chacha20_H.3monocypher | 2 +- .../man3/crypto_chacha20_encrypt.3monocypher | 5 ++--- doc/man/man3/crypto_lock.3monocypher | 4 ++-- doc/man/man3/crypto_poly1305.3monocypher | 2 +- doc/man/man3/crypto_sign.3monocypher | 11 ++++++---- 7 files changed, 30 insertions(+), 23 deletions(-) diff --git a/doc/man/man3/crypto_argon2i.3monocypher b/doc/man/man3/crypto_argon2i.3monocypher index 3851d2e..102653d 100644 --- a/doc/man/man3/crypto_argon2i.3monocypher +++ b/doc/man/man3/crypto_argon2i.3monocypher @@ -50,9 +50,9 @@ This is considered good enough for most purposes. The arguments are: .Bl -tag -width Ds .It Fa hash -Buffer for the output hash. +The output hash. .It Fa hash_size -The length of +Length of .Fa hash , in bytes. This argument should be set to 16, 32 or 64 for compatibility with the @@ -86,7 +86,7 @@ It should be wiped with .Xr crypto_wipe 3monocypher after being hashed. .It Fa password_size -The length of +Length of .Fa password , in bytes. .It Fa salt @@ -94,7 +94,7 @@ A password salt. This should be filled with random bytes, generated separately for each password to be hashed. .It Fa salt_size -The length of +Length of .Fa salt , in bytes. Must be at least 8. @@ -113,7 +113,9 @@ attacker were to steal the database. Note that changing the key requires rehashing the user's password, which is only possible upon user login. .It Fa key_size -The length of the key, in bytes. +Length of +.Fa key , +in bytes. Must be zero if there is no key. .It Fa ad Additional data. @@ -128,7 +130,7 @@ if .Fa ad_size is zero. .It Fa ad_size -Ahe length of +Length of .Fa ad , in bytes. .El @@ -144,8 +146,12 @@ or .Xr crypto_verify64 3monocypher to compare password hashes to prevent timing attacks. .Pp -To select the nb_blocks and nb_iterations parameters, it should first be -decided how long the computation should take. +To select the +.Fa nb_blocks +and +.Fa nb_iterations +parameters, it should first be decided how long the computation should +take. For user authentication, we recommend somewhere between half a second (convenient) and several seconds (paranoid). The computation should use as much memory as can be spared. diff --git a/doc/man/man3/crypto_blake2b.3monocypher b/doc/man/man3/crypto_blake2b.3monocypher index a28f60e..f7da1e8 100644 --- a/doc/man/man3/crypto_blake2b.3monocypher +++ b/doc/man/man3/crypto_blake2b.3monocypher @@ -93,10 +93,9 @@ in bytes. Must be between 0 and 64. 32 is a good default. .It Fa message -Message to hash. -May overlap with the -.Fa hash -argument. +The message to hash. +May overlap with +.Fa hash . .It Fa message_size Length of .Fa message , diff --git a/doc/man/man3/crypto_chacha20_H.3monocypher b/doc/man/man3/crypto_chacha20_H.3monocypher index 2201841..fcda0d7 100644 --- a/doc/man/man3/crypto_chacha20_H.3monocypher +++ b/doc/man/man3/crypto_chacha20_H.3monocypher @@ -33,7 +33,7 @@ It does not have to be random. .It Fa out A cryptographically secure random number .Em if -there is enough entropy in the input +there is enough entropy in .Fa key . X25519 shared secrets have enough entropy. .El diff --git a/doc/man/man3/crypto_chacha20_encrypt.3monocypher b/doc/man/man3/crypto_chacha20_encrypt.3monocypher index 02a2b4e..b4fe477 100644 --- a/doc/man/man3/crypto_chacha20_encrypt.3monocypher +++ b/doc/man/man3/crypto_chacha20_encrypt.3monocypher @@ -76,14 +76,14 @@ will then contain the raw Chacha20 stream. .It Fa cipher_text The encrypted message. .It Fa text_size -The size of both +Length of both .Fa plain_text and .Fa cipher_text , in bytes. .It Fa stream The raw Chacha20 stream. .It Fa stream_size -The size of +Length of .Fa stream , in bytes. .It Fa ctr @@ -95,7 +95,6 @@ The and .Fa nonce buffers may overlap. -The .Fa plain_text and .Fa cipher_text diff --git a/doc/man/man3/crypto_lock.3monocypher b/doc/man/man3/crypto_lock.3monocypher index ecde1dc..77fd8ef 100644 --- a/doc/man/man3/crypto_lock.3monocypher +++ b/doc/man/man3/crypto_lock.3monocypher @@ -99,9 +99,9 @@ See .Xr intro 3monocypher for details. .It Fa cipher_text -The encrypted message, to be transmitted over the network. +The encrypted message. .It Fa text_size -The size of both +Length of both .Fa plain_text and .Fa cipher_text , in bytes. diff --git a/doc/man/man3/crypto_poly1305.3monocypher b/doc/man/man3/crypto_poly1305.3monocypher index fc088c1..cd2ae03 100644 --- a/doc/man/man3/crypto_poly1305.3monocypher +++ b/doc/man/man3/crypto_poly1305.3monocypher @@ -60,7 +60,7 @@ May overlap with the .Fa mac argument. .It Fa message_size -Size of +Length of .Fa message , in bytes. .El diff --git a/doc/man/man3/crypto_sign.3monocypher b/doc/man/man3/crypto_sign.3monocypher index f32c007..0cda408 100644 --- a/doc/man/man3/crypto_sign.3monocypher +++ b/doc/man/man3/crypto_sign.3monocypher @@ -36,6 +36,8 @@ provide EdDSA public key signatures and verification. .Pp The arguments are: .Bl -tag -width Ds +.It Fa signature +The signature. .It Fa secret_key A 32-byte random number, known only to you. See @@ -52,14 +54,15 @@ with .It Fa message Message to sign. .It Fa message_size -Size of the message, in bytes. +Length of +.Fa message , +in bytes. .El .Pp -The .Fa signature -and the +and .Fa message -arguments may overlap. +may overlap. .Pp .Fn crypto_sign_public_key computes the public key of the specified secret key. -- 2.47.3