tMention crypto parameters in cream(5) format - cream - Stream encryption utility
 (HTM) git clone git://git.z3bra.org/cream.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
 (DIR) commit dae1337a5f9ea41c1fd743d7469b6b2c936f1c82
 (DIR) parent 0893ec4e2ce023d1fc2416ed154879991dc4b8d0
 (HTM) Author: Willy Goiffon <contact@z3bra.org>
       Date:   Tue, 20 Sep 2022 16:07:22 +0200
       
       Mention crypto parameters in cream(5) format
       
       Diffstat:
         M cream.5                             |      27 +++++++++++++++++++++++++++
       
       1 file changed, 27 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/cream.5 b/cream.5
       t@@ -16,12 +16,39 @@ and a
        .Ss Encryption
        XChaCha20-Poly1305 is used to encrypt the data. It is a symetrical cipher,
        so key used to encrypt the data must be used to decrypt it.
       +.Pp
       +In order to encrypt, or decrypt a continuous stream, the input data is
       +split in chunks, and a new key is generated to encrypt it. The smaller
       +chunks are, the more keys are computed for a given amount of data.
       +.Pp
       +To lower computation cycles, or accomodate memory-constrained system,
       +the buffer size can be changed. However, this buffer size must be the
       +same for both encryption and decryption, otherwise resulting in a failure
       +to decrypt the data.
        .Ss Key derivation
        Argon2id is used to derivate the key from a password + salt combo.
        .Pp
        The master password must be known to both parties, and the salt is sent
        as the first 16 bytes of the stream. This means that the receiver must
        only know the password to decrypt the data.
       +.Pp
       +Computing an Argon2id key takes multiple factor into accounts:
       +.Pp
       +.Bl -tag -compact -width XXXXXXXXXXX
       +.It Em Time
       +Defines the amount of computation realized and therefore the execution time, given in number of iterations
       +.It Em Memory
       +Defines the memory usage, given in kibibytes.
       +.It Em Parallelism
       +Defines the number of parallel threads.
       +.El
       +.Pp
       +Changing these parameters will affect the speed at which the key will
       +be computed, but will also change the key itself.
       +.Pp
       +For use as a symmetric key, you will want to use the exact same parameters
       +for both encryption and decryption, otherwise decryption of the stream
       +will be impossible.
        .Sh SEE ALSO
        .Xr cream 1
        .Sh AUTHORS