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.
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 era — classical 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.
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 or AES-256 block ciphers. 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.