Field Guide · term

Also known as: ALGID, algorithm ID

The P25 Algorithm ID (ALGID) is the one-byte code that names the cipher protecting a P25 call.1 It rides in the Encryption Sync word alongside the key ID and the message indicator, and it is the value a monitor reads first to decide whether traffic is clear or encrypted — and, if encrypted, which keystream generator would be needed to decrypt it. The value 0x80 is the reserved CLEAR code that unencrypted voice advertises; anything else marks the call as protected.

ALGID byte e.g. 0x84 TIA-102.AACE-A registry 0x80 CLEAR · 0x81 DES-OFB · 0x84 AES-256 0x85 AES-128 · 0x86 TDES · 0x9F DES-XL 0xAA ADP/RC4 · … (unknown ⇒ mis-decode)
The ALGID indexes a registry of ciphers; GopherTrunk only surfaces a value that is in the registry, because an off-registry ID is provably a bit-error smear rather than a real algorithm.

The registry

GopherTrunk’s AlgorithmName (internal/radio/p25/algorithm.go) covers the algorithms seen on monitored systems; the table follows the TIA-102.AACE-A registry.

ALGID Algorithm Notes
0x80 CLEAR Unencrypted voice — the absence of encryption
0x81 DES-OFB Single DES in OFB mode; legacy
0x83 TDES-2 Two-key Triple-DES (K1K2K1)
0x84 AES-256 AES with a 256-bit key
0x85 AES-128 AES with a 128-bit key
0x86 TDES Three-key Triple-DES
0x89 AES-256-OFB AES-256 in OFB framing
0x9F DES-XL Motorola DES variant
0xAA ADP / RC4 “Advanced Digital Privacy” — 40-bit RC4; the weak, common option

0x84 (AES-256) is the FIPS-grade choice for public-safety encryption; 0xAA (ADP) is a lightweight 40-bit RC4 variant that is cheap to enable and correspondingly weak; the DES family is legacy. GopherTrunk also exposes FormatAlgorithm, which renders an ID as 0x84 (AES-256), and AlgorithmName returns "unknown" for anything outside the table.

Why unknown IDs are dropped

An ALGID is only one byte inside a heavily error-protected field, but a bit-error that survives the Encryption Sync FEC smears the value roughly uniformly across 0x000xFF, with a near-random key ID beside it. Surfaced, such a garbage ALGID is downstream indistinguishable from a real key. GopherTrunk therefore gates on AlgorithmKnown: the call path omits the algorithm and key fields entirely when the ID is not in the registry, rather than emit a plausible-looking but fabricated algorithm. The set tracks AlgorithmName, so a genuinely new algorithm is admitted the moment it is added there.

Relevance to SDR

The ALGID drives everything GopherTrunk reports about an encrypted call: the CLEAR-vs- encrypted indicator in logs and the UI, the algorithm label an operator sees, and the choice of keystream generator if a key is on hand to attempt decryption. Pairing the ALGID with the key ID also lets an operator group calls by key and watch OTAR rekeying shift them over time. Getting the registry right — and refusing to guess outside it — is what keeps GopherTrunk’s encryption reporting honest.

Sources

  1. Project 25 — Wikipedia, on the P25 standard and its encryption. Algorithm IDs follow the TIA-102.AACE-A registry. 

See also