]> git.codecow.com Git - Monocypher.git/commitdiff
Described key and ad arguments in a separate list
authorLoup Vaillant <loup@loup-vaillant.fr>
Sat, 27 Jan 2018 22:50:15 +0000 (23:50 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sat, 27 Jan 2018 23:02:18 +0000 (00:02 +0100)
Suggested by @mikejsavage
Related to #58

doc/man/man3/crypto_argon2i.3monocypher

index 102653dd741b8b9498ec394eed5c2a1fa9f0ff31..b0ed7ed41a54890dc0398a4e5aa142a3028f255e 100644 (file)
@@ -47,7 +47,9 @@ The version provided by Monocypher has no threading support, so the
 degree of parallelism is limited to 1.
 This is considered good enough for most purposes.
 .Pp
-The arguments are:
+The arguments of
+.Fn crypto_argon2i
+are:
 .Bl -tag -width Ds
 .It Fa hash
 The output hash.
@@ -93,12 +95,29 @@ in bytes.
 A password salt.
 This should be filled with random bytes, generated separately for each
 password to be hashed.
+See
+.Xr intro 3monocypher
+for advice about generating random bytes (use the operating system's
+random number generator).
 .It Fa salt_size
 Length of
 .Fa salt ,
 in bytes.
 Must be at least 8.
 16 is recommended.
+.El
+.Pp
+The output hash must not overlap with the work area, or it will be
+wiped along with it.
+Any other overlap is permitted.
+.Pp
+.Fn crypto_argon2i_general
+is a variant of
+.Fn crypto_argon2i ,
+that hashes a secret key and additional data, in addition to the
+password and salt.
+The arguments are:
+.Bl -tag -width Ds
 .It Fa key
 A key to use in the hash.
 Can be
@@ -133,12 +152,9 @@ is zero.
 Length of
 .Fa ad ,
 in bytes.
+Must be zero if there is no additional data.
 .El
 .Pp
-The output hash must not overlap with the work area, or it will be
-wiped along with it.
-Any other overlap is permitted.
-.Pp
 Use
 .Xr crypto_verify16 3monocypher ,
 .Xr crypto_verify32 3monocypher