V VPN Glossaryvpnglossary.com
163 entries · 2026 ed.
№ 019 / 163 C

Cipher

An algorithm for performing encryption and decryption — the mathematical procedure that turns readable plaintext into unreadable ciphertext and back.

§ 01

Definition

A cipher is the engine of encryption. It is a deterministic algorithm that, given a key, transforms plaintext into ciphertext in a way that cannot be reversed without the same key (for symmetric ciphers) or the matching private key (for asymmetric ciphers). Ciphers are categorized by structure (block vs stream), key model (symmetric vs asymmetric), and generation (modern vs historical).

§ 02

Block vs Stream

A block cipher operates on fixed-size blocks of data — AES uses 128-bit blocks, for example. A stream cipher generates a continuous keystream that is XORed with the plaintext one byte or one bit at a time — ChaCha20 is the most prominent modern example. Block ciphers must be used with a 'mode of operation' (CBC, GCM, CTR, etc.) to handle inputs longer than a single block; the choice of mode is as important to security as the choice of cipher.

§ 03

Cipher Selection in VPNs

When a VPN client connects to a server, the two endpoints negotiate which cipher and mode to use, ideally agreeing on the strongest option both support. Modern best practice is AES-256-GCM or ChaCha20-Poly1305. Older options like Blowfish, 3DES, and RC4 are now considered insecure and have been removed from up-to-date VPN software.