I try to use libsodium for file encryption too. Regarding your TODO https://github.com/jpiechowka/libsodium-file-crypter/blob/master/crypto/encrypt_file.c#L16 , I've come to the conclusion that the options (salt, optlimit, memlimit, alg_num) should be stored together with the encrypted data. That is, we add a (unencrypted) header to the encrypted file. Only the password is a secret.
How do you think?
I try to use libsodium for file encryption too. Regarding your TODO https://github.com/jpiechowka/libsodium-file-crypter/blob/master/crypto/encrypt_file.c#L16 , I've come to the conclusion that the options (
salt,optlimit,memlimit,alg_num) should be stored together with the encrypted data. That is, we add a (unencrypted) header to the encrypted file. Only the password is a secret.How do you think?