From 88bc0aa60748405db94410c8f149e62683638f80 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 8 Jan 2023 22:15:39 +0100 Subject: MANPAGE: scryptn: list how much memory is needed Calculated acc. to https://words.filippo.io/the-scrypt-parameters/ , and add benchmarks to double-check the numbers. They match. --- Documentation/MANPAGE.md | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'Documentation') diff --git a/Documentation/MANPAGE.md b/Documentation/MANPAGE.md index 45c60c6..47092cf 100644 --- a/Documentation/MANPAGE.md +++ b/Documentation/MANPAGE.md @@ -563,15 +563,44 @@ Quiet - silence informational messages. Applies to: all actions. #### -scryptn int -scrypt cost parameter expressed as scryptn=log2(N). Possible values are -10 to 28, representing N=2^10 to N=2^28. +gocryptfs uses *scrypt* for hashing the password when mounting, +which protects from brute-force attacks. + +`-scryptn` controls the *scrypt* cost parameter "N" expressed as scryptn=log2(N). +Possible values are `-scryptn=10` to `-scryptn=28`, representing N=2^10 to N=2^28. Setting this to a lower value speeds up mounting and reduces its memory needs, but makes the password susceptible to brute-force attacks. The default is 16. +The memory usage for *scrypt* during mounting is as follows: + + scryptn Memory Usage + ======= ============ + 10 1 MiB + 11 2 + 12 4 + 13 8 + 14 16 + 15 32 + 16 64 + 17 128 + 18 256 + 19 512 + 20 1 GiB + 21 2 + 22 4 + 23 8 + 24 16 + 25 32 + 26 64 + 27 128 + 28 256 + Applies to: `-init`, `-passwd` +See also: the benchmarks in the gocryptfs source code in internal/configfile. + #### -trace string Write execution trace to file. View the trace using "go tool trace FILE". -- cgit v1.2.3