Security
Client-side file encryption
Encrypt file names and contents on an SFTP server so only holders of your key can read them.
linscp can encrypt files on your computer before it uploads them over SFTP, and decrypt them when you download them. In linscp’s panels you work with the real names and contents. Anyone who looks at the server without your key, including its administrator, sees only scrambled names and data.
This is useful when you rent storage you do not fully trust, for example as an off-site backup target together with synchronization.
Turn it on for a site
Section titled “Turn it on for a site”- In the Site Manager, select the site and click Advanced….
- Open Environment › Encryption.
- Check Encrypt files.
- Enter an Encryption key, or click Generate Key to have linscp make a random one. The key is 256 bits, written as 64 hexadecimal characters.
- Click OK and save the site.
When linscp generates a key, it offers to copy it to the clipboard. Store a copy somewhere safe, such as a password manager.
The key is saved with the site the same way a password is. Protect it with a master password.
What gets encrypted
Section titled “What gets encrypted”- New files you upload are encrypted. To upload a particular file unencrypted, uncheck Encrypt new files in the transfer settings.
- New folders you create get encrypted names, following the same setting.
- Files you overwrite keep their state. Replacing an encrypted file writes an encrypted file; replacing a plain file writes a plain file.
- Existing plain files are not converted. To encrypt them, download them, delete them on the server, and upload them again.
A site can therefore hold a mix of encrypted and plain files. linscp shows both with their real names.
What the server can still see
Section titled “What the server can still see”Encryption hides names and contents, not everything:
- the folder structure (how many folders and files, and how they nest);
- each file’s modification time, which is stored unchanged;
- each file’s approximate size: an encrypted file is 32 bytes larger than the original, and an empty file stays empty.
Server requirements
Section titled “Server requirements”Encrypted names are longer than the originals and use both upper and lower case letters. The server’s file system must therefore:
- keep the case of names (Linux servers do; case-insensitive ones risk rare name clashes);
- allow long names. On the usual 255-character limit, original names of up
to about 165 characters fit. Encrypted names end in
.aesctr.enc.
How it works
Section titled “How it works”Contents and names are encrypted with AES-256 in CTR mode, with a fresh random salt for each file and each name. linscp uses the same format as WinSCP, so WinSCP on Windows reads the same files with the same key. Because the format is open and standard, you can also decrypt the files with other tools if you ever need to.