Theme
Why PGP is the wrong tool for a file server's at rest encryption
Pretty Good Privacy (PGP, and its variants) is a well known program that provides cryptographic privacy and authentication for data communication. It is excellent for securing emails and their attachments. Using it to encrypt the storage of a file server at rest is another matter, and this article explains why a streaming encryption method is the better alternative.
The limitations of PGP for at rest encryption
- Performance. PGP is designed to encrypt and decrypt individual files or messages, in their entirety. On a file server, every file must be fully encrypted after it is written and fully decrypted before it is read, which is slow and resource intensive with large files or many of them.
- Scalability. A file server handles large amounts of data and huge numbers of files. Encrypting each of them separately does not scale; the encrypt and decrypt passes become the bottleneck of the whole server.
- Key management. PGP relies on public and private key pairs. Managing them for the files of a file server, making sure the right key is used and kept safe, adds complexity that a server operator does not need.
- No real time encryption. PGP cannot encrypt a stream as it is written or decrypt it as it is read. A file must be fully on disk before it can be encrypted, and fully decrypted before it can be served, so files sit on the storage in clear, at least for a while. That window is a vulnerability.
- Aging public key algorithms. PGP relies on RSA and DSA, which are not considered secure against future quantum computers. Symmetric encryption with 256 bit keys, such as AES-256, is considered resistant to the known quantum attacks.
Why streaming encryption is the right tool
- Real time. A streaming method encrypts the data as it is written to the storage and decrypts it as it is read. The data is never stored in clear, not even for a moment.
- Performance. Handling the data as a continuous flow removes the extra passes over the whole file, which suits a server with high throughput.
- Scalability. Streaming encryption handles large volumes and many files without the bottlenecks of PGP.
- Simple key management. Symmetric encryption with one key per VFS, from which the per file keys are derived, replaces a keyring.
While PGP is a robust tool for individual files and communications, it is not suitable for the at rest encryption of a file server. Streaming encryption is.
How Syncplify Server! does it
At rest encryption on an SFTP and FTPS server is typically an enterprise need, so the Ultimate edition of Syncplify Server! has streaming at rest encryption built in, at the level of the virtual file system. On a Disk VFS every file is encrypted with AES-256 in GCM mode (ChaCha20-Poly1305 on CPUs without hardware AES), which is authenticated encryption: it guarantees not only that the data cannot be read, but also that it cannot be tampered with during reading or writing without the server noticing. Each file gets its own key, derived from the VFS passphrase. On the S3, Azure and Google Cloud Storage backends the provider encrypts each object with a customer supplied key derived the same way, which the provider never stores.
Encrypting a virtual file system at rest explains how to enable it and what to know before you do. The v4 and v5 encrypted VFSs used an older scheme; if you still hold data in one, see Recovering v4 and v5 encrypted VFSs.