← BACK TO BLOG

Age Encryption Benchmarks

1776646800

Test Environment

ComponentSpecification
CPUIntel Core Ultra X7 358H (Panther Lake)
Architecturex86_64
Kernel7.0.0-rc7-3-cachyos-rc
Memory62 GB
Encryptionage v1.1.1 with ChaCha20-Poly1305
Key StorageTPM 2.0 via age-plugin-tpm

Hardware Acceleration: AES-NI, VAES (AVX-512), AVX2, SHA-NI, AVX-VNNI

Methodology

Tests performed on /tmp (tmpfs) to eliminate disk I/O bottlenecks.

Test Data

Results

Encryption Performance (No TPM)

Small files (100 files batch):

file_sizetotal_msper_file_ms
1K519 ms5.2 ms
10K536 ms5.4 ms
100K558 ms5.6 ms
500K650 ms6.5 ms
1M787 ms7.9 ms
10M26 ms26 ms
50M101 ms101 ms
100M183 ms183 ms
500M665 ms665 ms

Large files:

file_sizetotal_msthroughput_mbps
1K519 ms-
10K536 ms-
100K558 ms-
500K650 ms-
1M787 ms-
10M26 ms384 MB/s
50M101 ms495 MB/s
100M183 ms546 MB/s
500M665 ms751 MB/s

Decryption with TPM

Small files (10 files sample):

file_sizetotal_msper_file_ms
1K4161 ms416 ms
10K4158 ms415 ms
100K4137 ms413 ms
10M442 ms442 ms
50M519 ms519 ms
100M614 ms614 ms

Large files:

file_sizetotal_msthroughput_mbps
1K4161 ms-
10K4158 ms-
100K4137 ms-
10M442 ms22 MB/s
50M519 ms96 MB/s
100M614 ms163 MB/s

TPM Overhead

Isolated TPM key unwrapping: 415 ms per operation

This represents the fixed cost of TPM communication regardless of file size.

Analysis

Throughput Scaling

Encryption throughput increases with file size:

TPM Impact

The TPM adds a fixed ~415 ms overhead to every decryption operation:

File SizeTPM % of Total Time
1 KB99%
100 KB99%
10 MB94%
100 MB67%

Comparison

HardwareTPM Latency
This system (fTPM)~415 ms
YubiKey 5500-2000 ms
Smart card1000-5000 ms

Raw Data

operation,file_size,file_count,total_ms,per_file_ms,throughput_mbps
encrypt,1K,100,519,5.2,
encrypt,10K,100,536,5.4,
encrypt,100K,100,558,5.6,
encrypt,500K,100,650,6.5,
encrypt,1M,100,787,7.9,
encrypt,10M,1,26,26,384
encrypt,50M,1,101,101,495
encrypt,100M,1,183,183,546
encrypt,500M,1,665,665,751
decrypt_tpm,1K,10,4161,416,
decrypt_tpm,10K,10,4158,415,
decrypt_tpm,100K,10,4137,413,
decrypt_tpm,10M,1,442,442,22
decrypt_tpm,50M,1,519,519,96
decrypt_tpm,100M,1,614,614,163

Conclusions

  1. Symmetric encryption: Sustains 400-750 MB/s depending on file size
  2. TPM overhead: Fixed ~415 ms cost per decryption
  3. Batch efficiency: Amortize TPM cost by processing multiple files per session

For interactive use (SSH keys, .env files), ~415 ms latency is acceptable. For high-throughput applications, keep decrypted keys in memory during sessions.