Using playing cards to store hidden data:

The implied card method for

encoding data into playing cards

encoding data into playing cards

Using the method without cards:

The Implied Method of hiding messages in packs of playing cards might not be particularly useful. It is a way of concealing short hidden messages and data, or performing very laborious magic tricks. However, the concept also lends itself to situations outside of the world of cards. The Implied Card method works well with playing cards because playing cards have a set order. Similarly, any group of items that has a set order can also have data encoded into it.

Numbers:

At its most basic, we could encode data into everyday numbers. An exact parallel to using cards would be using a list of the numbers 1 to 52. If we encode the data from the very first example (i.e. the 4-bit binary numbers 0001b up to 1111b, and then 0000b to 1010b), the resulting encoded numbers would look like this: 4, 7, 11, 12, 14, 18, 20, 22, 23, 26, 27, 28, 29, 33, 36, 37, 39, 41, 43, 44, 45, 46, 49, 50, 52, 1, 2, 3, 6, 8, 9, 10, 25, 32, 40, 42, 48, 15, 17, 21, 24, 34, 35, 38, 47, 16, 31, 51, 13, 30, 5, 19.

[If we were doing this with cards, the cards would be: 4S, 7S, JS, QS, AC, 5C, 7C, 9C, 10C, KC, AH, 2H, 3H, 7H, 10H, JH, KH, 2D, 4D, 5D, 6D, 7D, 10D, JD, KD, AS, 2S, 3S, 6S, 8S, 9S, 10S, QC, 6H, AD, 3D, 9D, 2C, 4C, 8C, JC, 8H, 9H, QH, 8D, 3C, 5H, QD, KS, 4H, 5S, 6C].

The encoded numbers can be plotted on a graph to make it easier to visualise what is happening. The y-axis is the number; the x-axis is its new position after encoding:

The original numbers used for the encoding do not have to be sequential - they could be any list, as long as they have a known (or previously agreed) set order without any repetition. For example, the list of prime numbers, the list of squares, the Fibonacci sequence ignoring the first 1, and so on.

If we wanted to have encryption, we could start with a randomly sorted list of numbers, and then encode the data into that. One problem with this is that it is considerably harder to get a genuinely random list of numbers than it is just to shuffle some cards. Shuffled cards would create an unpredictable, irreproducible one-time pad (or at least one where the odds of recreating it are 1 in the factorial of 52); computer generated random numbers are only as good as the algorithm used to create them, which may, or may not, have known, or as yet undiscovered, flaws.

Once we consider the Implied Card idea without cards, there is more freedom in what we can do. For example, we could use 1000 numbers instead of 52. For recursive encoding, we can now repeatedly use the number zero instead of being limited by having only two Jokers in a pack. If we ignore recursive encoding, we can use the number zero as a marker to indicate what would essentially be a second or third pack. For example, we could encode into multiple groups of 20 ordered numbers, and demarcate the groups with a zero. Such an encoding might resemble something like this when portrayed in a graph:

Using numbers instead of cards allows the resulting encoded data to be altered further by other mathematical transformations, which means the data can be hidden and encrypted even more.

Other ordered objects:

Ignoring cards and numbers, the encoding method works with any objects that have a set order. As an example, we could use the letters of the alphabet. With the English alphabet, we could use 26 letters or 52 letters if we distinguish between upper and lower case. One point is that we do not have to use the whole alphabet (just as we never really needed to use a whole pack of cards). If our message is short, we can use just a handful of letters.

If we encode the 16-bit binary string 1000 1001 1010 1111 into the first ten letters of the English alphabet, we end up with the letters "aehibdfgjc". (The number equivalent from 0 to 9 would be: 0, 4, 7, 8, 1, 3, 5, 6, 9, 2).

To show how abstract the encoding method can become when picking ordered objects to use, here are some other examples:

Our 16-bit number (1000 1001 1010 1111) encoded into their names is as follows: William I, Henry II, Henry III, Edward I, William II, Stephen, Richard I, John, Edward II, Henry I.

Our number encoded into their names is as follows: Apu, Lisa, Nelson, Otto, Bart, Krusty, Maggie, Marge, Troy, Homer. We could create a drawing of them standing in line that contained the message. We could also have ordered them by height or age.

For shorter messages, it becomes apparent that the ordered objects would not need to be specifically moved to fit the encoding, but could be found already in the order that matched the required encoding. In this way an old photograph of, say, differently sized mountains could be chosen to match a brand new encoded message. Likewise, a portion of already existing text from a book could be used.

Decoding as a pastime

In a way, every existing set of ordered entities can be decoded to find a "message" using the same method we used to decode the data in the playing cards. The message will of course be a result of random chance and so will not have any real meaning, but there could be a pastime in "decoding" words and objects in much the same way that people search for anagrams. A lot of the time the decoded message will not be of any interest at all, but sometimes it might produce something apt or interesting.

As a (not very good) example, take the word "mouse". We can "decode" it by first writing out the letters in alphabetical order in a row at the top of a piece of paper: "e m o s u", we then go through the row marking 0s for letters that do not appear in order, and 1s for letters that do. When we get to the end of the row, we create a new row underneath consisting of the letters marked with 0s in the first row, and we continue marking and creating rows until we are done.

After decoding, we read off the binary numbers to reveal 0110 1011 (0x6b in hex), which happens to be the ASCII code for the letter "k". Of course in this case the result is completely meaningless and not that interesting. However, there will be some words, or sequences of words, that create interesting solutions.

Conclusion:

So, that's my method for storing and encrypting data into a pack of cards. It might not be useful in everyday life, but it could definitely be useful for some people sometimes. Even if there is no point to it at all, it is still a fun puzzle to play with.

Tim Warriner, 2nd March, 2014.

[Minor edits in July 2015 and July 2016. Improved grammar and punctuation in September 2021]

Previous page Main page