giampaolo / pyftpdlib

Extremely fast and scalable Python FTP server library
MIT License
1.65k stars 266 forks source link

Built-in cryptographic implementation of pyftpdlib.filesystems.AbstractedFS #552

Open Perzan opened 3 years ago

Perzan commented 3 years ago

This would be similar to eCryptfs, for it would use a directory in the underlying real filesystem to manage the encrypted files. Filenames could be encrypted similar to eCryptfs as well. The open method for pyftpdlib.filesystems.AbstractedFS objects would pretty much support all the file modes that the builtins.open function supports (i.e. r+, r, w, etc). This would allow the FTP to efficiently seek/skip to any position in the encrypted file without having to decrypt the entire file.

I think this would be super useful because unlike eCryptfs, this would also work on Windows. A Windows or Linux user could then mount the FTP on their system. For Windows, users could map it as a network drive. Linux users could use curlftpfs.

I also think it would be unique in regards to alternatives for Boxcryptor in order to establish client-side encryption for drives in the cloud (a lock file would have to be created in case multiple instances are running).

One idea for the location of the class would be in the filesystems submodule: pyftpdlib.filesystems.CryptographicFilesystem.