N.B. Asking this here instead of Movies.SE because I'm wanting to know about the cipher itself and any history, which this site is more suitable for.

In S01E05 of The Wire, at around 45:00, it's revealed that:

the gang that the cops are after encrypt their phone numbers by using a substitution cipher based on the layout of a T9 mobile phone keypad.

In more detail:

Each digit of the number, with the exception of 5 and 0, is replaced with the corresponding digit on the other side of the 5 key ("jump the five''); 5 and 0 are exchanged. Thus, 555-867-5309 becomes 000-243-0751. Devise a one-line statement to encrypt and decrypt numbers encoded in this way.

In the show, this cipher was chosen because it has to be both secure but simple enough for low-level dealers to understand. Is this something that was ever used as a real-life cipher, or anything similar to it, or was it just something devised by the writers?

  • 2
    This isn't a cipher in the sense we think of them today, since there is no key. It's more like ROT13, which is obfuscation at best. – MechMK1 Jan 12 at 19:59
  • It was my understanding that the most simple ciphers don't have keys. Wikipedia describes ROT13 itself as a simple substitution cipher, and a variant of the Caesar cipher. – Hashim Aziz Jan 12 at 20:05
  • I'm aware it's not actually a secure cipher, I just wanted to find out more about where it came from. – Hashim Aziz Jan 12 at 20:11
  • 2
    @MechMK1 I would argue that the "13" in "ROT13" is the key. – Mike Ounsworth Jan 12 at 20:37
  • "Key" in this context is not a cryptographic key but the literal "5 button" on a numberpad. Hence the 9 -> 1 substitution. – schroeder Jan 12 at 20:56

This is simply a number pad implementation of the plain old original scytale. Using the number 5 key on the pad instead of a rod.

It's a basic substitution cipher.

Was the TV show the first to use the number pad in this way? I cannot answer that. I doubt it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.