If you ever need to encrypt 256 MB of file data on a server, which tool finishes first? OpenSSL and GnuPG are installed on every Linux distribution I touch. I benchmarked both doing AES256 symmetric encryption and decryption on 256 MB random data.
What you need:
- A Linux machine with
opensslandgpginstalled (both ship with every distro) /usr/bin/time(fromtimepackage, also default on most)- Enough disk space for a 256 MB test file
Method. I generated 256 MB of random data from /dev/urandom, then ran each tool on encrypt and decrypt with /usr/bin/time -v for precise wall-clock and resident memory measurement. Both tools used AES256 (OpenSSL: -aes-256-cbc -pbkdf2 -iter 100000, GPG: --symmetric --cipher-algo AES256 -z 0 to disable compression). I verified integrity by comparing SHA-256 checksums of the original and decrypted files. All data is synthetic random data — reproducible results.

Commands I ran:
# Generate 256 MB random dataset
dd if=/dev/urandom of=data.raw bs=64M count=4 iflag=fullblock
# OpenSSL AES-256-CBC encrypt/decrypt
openssl enc -aes-256-cbc -pbkdf2 -iter 100000 -salt \
-pass pass:benchpass -in data.raw -out data.enc
openssl enc -d -aes-256-cbc -pbkdf2 -iter 100000 \
-pass pass:benchpass -in data.enc -out data_dec.raw
# GPG symmetric AES256 encrypt/decrypt (no compression)
gpg --batch --yes --passphrase benchpass \
--symmetric --cipher-algo AES256 -z 0 \
--output data.gpg data.raw
gpg --batch --yes --passphrase benchpass \
--decrypt --output data_dec.raw data.gpgOutput:
openssl encrypt...
0.80s user=0.48s RSS=8036KB out=268435488
openssl decrypt...
0.61s user=0.29s
gpg encrypt...
1.31s user=0.89s RSS=6260KB out=268435537
gpg decrypt...
0.88s user=0.69s
Integrity: openssl ok=True, gpg ok=TrueComparison:
| Metric | OpenSSL enc | GPG |
|---|---|---|
| Encrypt time | 0.80 s | 1.31 s |
| Encrypt throughput | 320 MB/s | 195 MB/s |
| Decrypt time | 0.61 s | 0.88 s |
| Decrypt throughput | 420 MB/s | 291 MB/s |
| Max RSS | ~8 MB | ~6 MB |
| Output size (256 MB input) | 268,435,488 B | 268,435,537 B |
| Integrity (SHA-256) | Match | Match |
| Key derivation | PBKDF2 (100k iters) | Built-in S2K |

Verdict. OpenSSL enc is 1.6x faster on encrypt and 1.4x faster on decrypt on this 2 vCPU machine. It also uses marginally more RSS (~8 MB vs ~6 MB). GPG wins on ergonomics: its output format is self-describing (OpenPGP), key derivation is handled transparently, and the tool is designed for encrypted file exchange, not just raw symmetric ciphers. If you encrypt backup files for your own offsite storage, openssl enc with PBKDF2 is faster. If you share encrypted files with others or need a standard format, use GPG.
If you work with backup pipelines, you might also find rsync vs rclone: I Benchmarked Both and gzip vs zstd: I Benchmarked Both useful. I also wrote a Python script to verify backup archives that complements these encryption tools nicely.
I used synthetic 256 MB random data for reproducibility. Your mileage will vary by CPU, AES-NI support, and dataset size. Run your own benchmark before choosing one for a production pipeline.