Replies: 2 comments 5 replies
-
Thank you for this important reminder. That's a very valid point and something worth changing in v4. I say that just using a keyfile is less secure on the website here, but I should probably add a similar note to the Best practices page. I'm not aware of a standard approach for dealing with keyfiles. My reasoning for Argon2 was because the first 64 bytes were being read from the keyfile previously rather than the entire file being hashed using BLAKE2b-512. If everything was indeed randomly generated, then I would use the keyfile bytes as input to a KDF, with a random salt per file. Three questions I'd love your feedback on would be:
Lots of changes are planned for v4, but it's going to take a long time due to university work and me having to finish my own libsodium binding. If you spot any other design decisions that you think are worth changing, please get in touch. |
Beta Was this translation helpful? Give feedback.
-
What if I want to use a not randomly generated file? The key file does not always have high entropy. I believe that the KDF should apply to the final key (passphrase + keyfile digest), not to just the passphrase. Every piece of user input must be protected by KDF. |
Beta Was this translation helpful? Give feedback.
-
I raise concerns about using a key file without a password, but if it's already being used that way, why is there a time and memory intensive function being performed afterwards? At least a randomly created key file should have enough entropy to use its hash as key. And if an attacker gets access to the key file, Argon2 is of no use either. Otherwise, the key-file-only scheme would at least have a performance advantage to compensate for the security disadvantage.
Beta Was this translation helpful? Give feedback.
All reactions