Field Guide · term

Also known as: encryption algorithm

A cipher is an algorithm for encryption and decryption — transforming plaintext into ciphertext under a key and back again.1 The cipher is the public, fixed procedure; the key is the secret that makes one party’s output unreadable to everyone else.

plaintext key cipher ciphertext
A cipher combines plaintext and a key to produce ciphertext; the same key reverses it.

How it works

Ciphers are classified along a few independent axes:

  • By unit of operation — a stream cipher processes data bit- or byte-at-a-time, usually by XOR with a keystream (RC4); a block cipher processes fixed-size blocks under a key (AES with 128-bit blocks, DES with 64-bit), chained together by a mode of operation.
  • By key relationship — a symmetric cipher uses the same secret key to encrypt and decrypt; an asymmetric (public-key) cipher uses a public key to encrypt and a separate private key to decrypt.
  • By eraclassical ciphers (substitution, transposition) operate on letters and fall to cryptanalysis such as frequency analysis; modern ciphers operate on bits and are designed against far stronger attacks.

A genuine cipher keeps its security in the key, per Kerckhoffs’s principle. A reversible transformation with no secret key is not a cipher but obfuscation.

Variants

Modern block ciphers rarely encrypt one block in isolation; a mode of operation turns a fixed-size block cipher into something that can protect a message of any length. Electronic Codebook (ECB) encrypts each block independently and leaks patterns, so real systems use chaining or feedback modes. P25 voice, for instance, runs DES and AES in Output Feedback (OFB) mode, which turns the block cipher into a keystream generator so it behaves like a stream cipher over the vocoder bits. Internally, block ciphers are usually built as either a Feistel network (DES) or a substitution-permutation network (AES), both relying on S-boxes for nonlinearity; stream ciphers are often built from linear-feedback shift registers.

In practice

Choosing a cipher means matching the algorithm to the channel: stream ciphers suit continuous low-latency media like voice, block ciphers suit stored data and packets, and public-key ciphers, being slow, are used to exchange the symmetric key rather than the bulk data. Getting the mode, IV handling, and key management right matters as much as the cipher itself — most real breaks target those, not the algorithm.

Relevance to SDR

Trunked-radio systems specify particular ciphers for protected voice. DMR Enhanced Privacy uses the RC4 stream cipher; P25 voice encryption uses DES-OFB, DES-XL, or AES-256 block ciphers; TETRA uses the TEA family. Recognizing which class a system uses tells GopherTrunk what to expect: a stream cipher leaves frame sizes intact while a block cipher operates on fixed blocks, and in every case the audio stays unrecoverable without the key. Transformations that carry no key — scrambling whitening, or the Motorola talker-alias obfuscation studied in issue #773 — are not ciphers and can be reversed by anyone who works out the method.

Sources

  1. Cipher — Wikipedia, for the definition and the stream/block and symmetric/asymmetric classifications. 

See also