]> Cypherpunks.ru repositories - nncp.git/blob - doc/cmd/nncp-cfgenc.texi
80fab22f4f706ce4510c33739671a0335ddf5405
[nncp.git] / doc / cmd / nncp-cfgenc.texi
1 @node nncp-cfgenc
2 @section nncp-cfgenc
3
4 @example
5 $ nncp-cfgenc [options] [-s INT] [-t INT] [-p INT] cfg.hjson > cfg.hjson.eblob
6 $ nncp-cfgenc [options] -d cfg.hjson.eblob > cfg.hjson
7 @end example
8
9 This command allows you to encrypt provided @file{cfg.hjson} file with
10 the passphrase, producing @ref{EBlob, eblob}, to safely keep your
11 configuration file with private keys. This utility was written for users
12 who do not want (or can not) to use either @url{https://gnupg.org/,
13 GnuPG} or similar tools. That @file{eblob} file can be used directly in
14 @option{-cfg} option of nearly all commands.
15
16 @option{-s}, @option{-t}, @option{-p} are used to tune @file{eblob}'s
17 password strengthening function. Space memory cost (@option{-s}),
18 specified in number of BLAKE2b-256 blocks (32 bytes), tells how many
19 memory must be used for hashing -- bigger values are better, but slower.
20 Time cost (@option{-t}) tells how many rounds/iterations must be
21 performed -- bigger is better, but slower. Number of parallel jobs
22 (@option{-p}) tells how many computation processes will be run: this is
23 the same as running that number of independent hashers and then joining
24 their result together.
25
26 When invoked for encryption, passphrase is entered manually twice. When
27 invoked for decryption (@option{-d} option), it is asked once and exits
28 if passphrase can not decrypt @file{eblob}.
29
30 @option{-dump} options parses @file{eblob} and prints parameters used
31 during its creation. For example:
32 @example
33 $ nncp-cfgenc -dump /usr/local/etc/nncp.hjson.eblob
34 Strengthening function: Balloon with BLAKE2b-256
35 Memory space cost: 1048576 bytes
36 Number of rounds: 16
37 Number of parallel jobs: 2
38 Blob size: 2494
39 @end example