mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[GH-ISSUE #49] [Feature request] File encryption #23
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nicolaspernoud on GitHub (Jun 17, 2022).
Original GitHub issue: https://github.com/sigoden/dufs/issues/49
Hello,
Thanks for this amazing work.
It would be nice to have an option to encrypt files in place providing a key as argument.
That should be probably achievable with something like described here : https://kerkour.com/rust-file-encryption, apart from the tricky part of working out the real file size from the encrypted file size... and to store a generated per file nonce as an encrypted file header, so that the nonce is not the same for each file, but recoverable from the file itself...
Best regards.
@sigoden commented on GitHub (Jun 18, 2022):
Thanks for your suggestion.
File encryption is too niche and too professional for a simple file server.
Object storage like s3/minio is good at this.
@nicolaspernoud commented on GitHub (Jun 18, 2022):
Ok, I understand. Thanks for your answer.
@nicolaspernoud commented on GitHub (Jun 21, 2022):
In case you could be interested anyway, I made a quick proof of concept here : https://github.com/nicolaspernoud/dufs/tree/encryption .
The key is all zeros (but easy to pass as arguments), there is lots of ugly unwraps, the non encrypted case is not catered for, the range header as well ... but the nonce is properly randomized and stored at the beginning of the file, and the decrypted file size is properly calculated...