Decoding Tweets, Part 2

That time I solved the one from Google.

Note: This article was originally hosted on Medium.

Over the last 24 hours (at time of writing), @GoogleDesign has posted 41 tweets, each consisting of a 6-digit hex code. Googler Roman Nurik tweeted that they were in fact a secret code. I found this via the /r/android subreddit, and quickly set to work.

My initial assumption was that it was pure ASCII, with each tweet representing 3 characters. I skimmed over the values and found this not to be the case, but I stuck to my assumption that it was encoded text.

After skimming vertically through the list, it seemed that the values were localized into small groups; the first octet of each tweet would be roughly around 20–40, the second 60–80, and the third D0-F0. After running a brief analysis on it, I found that the values for each octet group would vary by 27 at most. This seemed remarkably similar to the length of the English alphabet, so I felt like I was along the right lines.

Further analysis showed that the octet groups would never have a lower value than they did in the first tweet — that is to say, the first octet would never be lower than 27, the second 6A, and the third D9. It made sense, then, that this would be the “key” from which to count letters. By subtracting this first tweet from each of the subsequent tweets, I’d get pure values for each tweet, on a zero-indexed basis.

It only remained to work out the “alphabet” that the values were indexing. This took some short trial-and-error, and I eventually settled upon the standard English alphabet, with zero representing a space, and 27 representing a full stop.

With all this in place, I ran my code, and got the output string:

“we seek to synthesize classic principles of good design with the innovation and possibility of technology and science…”

I tweeted this back at @GoogleDesign, and the favorite I received would suggest that I cracked it correctly. My code for solving it can be found here on GitHub.