# An odd memo to be left lying around

You encounter the following memo, left carelessly on a small table, whilst waiting for an interview.

Date: December
MemoRef: #1
Territory: UK
Department: RFC
Extension: 4648

TJEE/TIBC/UACD/ /UBFB/TGGC/UAIF/ /TJFF/UAJC/TGGC/UAIF/UAEB/./ /TGGC/UAIF/UBDI/TIBC/TGGC/TJEC/ /TJEC/TIBC/ /TIFB/UBFB/TGGC/TJEE/ /UBFB/TJEC/ /TGGC/UAIF/UBGD/UAIF/UBDI/TJEC/UAJC/TIBC/THFI/ /UBFB/THFI/UAEB/ /TJEC/UAIF/TIHC/TIHC/ /TJFF/UAIF/TGGC/ /TJEC/TJFF/UAIF/ /UBGD/TIBC/UAEB/UAIF/ /UBAB/TIBC/TGGC/UAEB/:/ /UBGD/TJFF/UBFB/TGGC/TJEC/.

What do you do?

• It appears that 4-letter sequences pertain to a single letter, possibly. Also, total letters used, excluding punctuation are: T,J,E,I,B,C,U,D,F,G,H Feb 1 '17 at 16:42
• (And, of course, the possible connection to Base64 / RFC 4648) Feb 1 '17 at 16:49
• @Khale_Kitha don't forget Base32 Feb 3 '17 at 9:24
• True - and Base16 for that matter. tools.ietf.org/html/rfc4648 Feb 3 '17 at 13:39

quipquip translated the message to:

"You are hired. Report to (M/G)ary at reception and tell her the code word: chart."

If @Gareth McCaughan's theory is correct, then the letters correspond to:

a - u151
c - u163
d - u041
e - u085
h - t955
i - u092
l - t872
n - t758
o - t812
p - u138
r - t662
t - t942
u - u023
w - u101
y - t944
m/g? - t852

I get stuck here though because there doesn't really seem to be any pattern.
In base 64, t=19 and u=20. Maybe they represent years?
If you sort the letters based on their numbers, assuming t is before u, then the ordering is
rno?ltyhudeiwpac

• Gary is not a she. Feb 1 '17 at 19:37
• @greenturtle3141 Well... perhaps Gary is a she. I can think of several reasons off the top of my head why there might be a person called Gary who uses the "she" pronoun. Feb 1 '17 at 20:16
• Regardless, I think we can safely assume that the person in question is Mary. Feb 1 '17 at 20:20
• Could also be Sary, but given the conventional mindset of the average cryptogram, yes, Mary works at reception. Feb 1 '17 at 20:31

This isn't an answer so much as it is a bunch of analysis, that should hopefully prove useful. I'll take a proper swing at it later.

There are 12 distinct letters used in the cipher: the letters A to J, plus T and U. There are also 16 distinct combinations of these letters (unless I've missed any):

TJEE | TIBC | UACD | UBFB | TGGC | UAIF | TJFF | UAJC | UAEB | UBDI | TJEC | TIBC | UBGD | THFI | TIHC | UBAB


The first letter of each group is either T or U, and the remaining letters are all between A and J. This has to be significant in some way.

To make the memo easier to read, here it is with each 4-letter sequence replaced with a hyphen:

--- --- -----. ------- -- ---- -- --------- --- ---- --- --- ---- ----: -----.

Now to actually begin trying to solve it:

I'm going to take a leap and say that TGGC corresponds to E, given its frequency. Which would make the memo:

--- -E- --E--. E---E- -- --E- -- E-------- --- ---- --E --- ---- --E-: ---E-.

Applying @Gareth McCaughan's theory that A through J represent decimal digits, the 16 groups become:

T944 | T812 | U023 | U151 | T662 | U085 | T955 | U092 | U041 | U138 | T942 | T812 | U163 | T758 | T872 | U101

Not too sure where to go from there; as I said, I'll do this more properly later.

• The remaining letters are not all between B and J; A occurs several times. So each quadruple is T/U followed by what might as well be three decimal digits. [EDITED to add: this was in response to an earlier version of the answer that said B to J.] Feb 1 '17 at 17:26
• Yeah, I caught that literally as soon as I pressed "Submit", I've corrected it now. Feb 1 '17 at 17:27
• I also notice that if we take T=0 and U=1 and treat these things as 4-digit decimal numbers, they lie in a range somewhat smaller than the 2000 you might expect: the smallest is 662 and the largest is 1151, I think. Feb 1 '17 at 17:29

PARTIAL SOLUTION

First, let's try solving this as a standard cryptogram, assuming each 4-letter code represents a single character of plaintext. There are 16 distinct codes. For convenience, I'll assign each one to a single letter.

• TGGC = a
• THFI = b
• TIBC = c
• TIFB = d
• TIHC = e
• TJEC = f
• TJEE = g
• TJFF = h
• UACD = i
• UAEB = j
• UAIF = k
• UAJC = l
• UBAB = m
• UBDI = n
• UBFB = o
• UBGD = p

This reduces the cryptogram to:

gci oak hlakj. akncaf fc doag of akpknflcb obj fkee hka fhk pcjk mcaj: phoaf.

## Cryptogram solution

Sorting the distict ciphertext letters in descending order of frequency gives akfcohjpbeglndim. English letter frequency order (according to the nearest e-book I have handy) is EATOHNSIRDLMFUYWCGBPVKJZXQ. Zipping those two alphabets and using it as a translation mapping gives:

LOY HEA NMEAS. EAFOET TO UHEL HT EAIAFTMOR HRS TADD NAE TNA IOSA WOES: INHET.

OK, so that's all gibberish except for the TO. I'll have to try a different approach.

The most common 3-letter word in English is THE. So let's assume it's present in the plaintext, so either gci, oak, obj, hka, or fhk is THE. But obj and especially gci can be ruled out as making the letter E too uncommon. So that leaves either oak, hka, or fhk. So let's try each of these.

• If oak=THE: --- THE --HE-. HE--H- -- -TH- T- HE-E----- T-- -E-- -EH --E ---E --H-: --TH-.
• If hka=THE: --- -EH T-EH-. EH--E- -- --E- -- EH-H----- --- -H-- THE -TH ---H --E-: -T-E-.
• If fhk=THE: --- --E H--E-. -E---T T- ---- -T -E-E-T--- --- TE-- HE- THE ---E ----: -H--T.

The first two of these generate two-letter words ending in EH, which is impossible (unless you count MEH as a word). So assume the last case.

fc = a two-letter word starting with T, so my original guess of TO is probably correct. So, c=O.

-O- --E H--E-. -E-O-T TO ---- -T -E-E-T-O- --- TE-- HE- THE -O-E -O--: -H--T.

fkee=TE--. Note the double letter at the end. Probably TELL. (Could also be the name Tess, but that's far less likely.) So e=L.

-O- --E H--E-. -E-O-T TO ---- -T -E-E-T-O- --- TELL HE- THE -O-E -O--: -H--T.

What about the longest word, akpknflcb=-E-E-T-O-? What matches that pattern, has its remaining 5 letters distinct from each other, and does not contain the letter H or L? I can find multiple matches in my dictionary, but they all end in TION. So l=I and b=N.

-O- --E HI-E-. -E-O-T TO ---- -T -E-E-TION -N- TELL HE- THE -O-E -O--: -H--T.

The next-longest word is akncaf=-E-O-T. Note that the first and fifth letters are the same and the word does not contain H, I, L, or N. In my dictionary, I found only two words matching the pattern:

REPORT and RESORT. So a=R, and n is either P or S.

So that gives us:

-O- -RE HIRE-. RE-ORT TO --R- -T RE-E-TION -N- TELL HER THE -O-E -OR-: -H-RT.

We're getting close. Filling in the rest of the letters and making the assumption that a person using a female pronoun has a traditional female name,

YOU ARE HIRED. REPORT TO MARY AT RECEPTION AND TELL HER THE CODE WORD: CHART.

## The code

OK, so the cryptogram is solved, but that doesn't explain the original code. Why 4 letters of ciphertext for each letter of plaintext?

Khale_Kitha gives a potential clue by pointing out that RFC 4648 defines the Base16, Base32, and Base64 binary-to-text encodings. The codes can't be Base16 (at least not the standard version) because that encoding does not use the letters G-Z. I tried Base64 in an earlier version of my answer but got nowhere. So let's try Base32.

I didn't get anywhere by decoding Base32 into 8-bit bytes (even with the required ==== padding at the end), so I'm just going to decode into 5-bit sequences, recalling that A=0, B=1, C=2, ... Z=25.

• A = UBFB = [20, 1, 5, 1]
• C = UBGD = [20, 1, 6, 3]
• D = UAEB = [20, 0, 4, 1]
• E = UAIF = [20, 0, 8, 5]
• H = TJFF = [19, 9, 5, 5]
• I = UAJC = [20, 0, 9, 2]
• L = TIHC = [19, 8, 7, 2]
• M = TIFB = [19, 8, 5, 1]
• N = THFI = [19, 7, 5, 8]
• O = TIBC = [19, 8, 1, 2]
• P = UBDI = [20, 1, 3, 8]
• R = TGGC = [19, 6, 6, 2]
• T = TJEC = [19, 9, 4, 2]
• U = UACD = [20, 0, 2, 3]
• W = UBAB = [20, 1, 0, 1]
• Y = TJEE = [19, 9, 4, 4]

That's still gibberish, though. Maybe the first 3 values in each set represent a year (which would make them range from 1966 to 2016). The last one could be a month (1-8 = January through August), the day of a month (I'd assume December, based on the memo header), or the score of some kind of sports championship that happened in that year. I'm sure the “UK” is relevant somehow, but I'm an American, so nothing about these numbers stands out.

• Again, why can't a woman be called Gary? Feb 3 '17 at 6:19
• @boboquack: It's possible, but the overwhelming majority of people named Gary are male. It's not a “unisex” name like Ashley, Casey, or Pat. Perhaps if the memo header gave a location of “San Francisco, CA”, I'd give more thought to non-gender-normative names, but when solving cryptograms, you go with what's statistically likely. Feb 3 '17 at 6:34
• But if it turns out that M = TIFB is inconsistent with the rest of the code if/when I figure out what the pattern is, then I'll change it. Feb 3 '17 at 6:46