Deck cipher basics
- Cem Bagdatlioglu
- Nov 14
- 3 min read
Updated: Nov 21
A deck cipher is a deck of cards where each card in the deck can be put into a specific arrangement by the owner. The four sides around the deck are used to hold secret information. Since the sides of the deck where the secret is written is made of the edges of the cards, shuffling the cards “encrypts” the secret.


Why deck ciphers?
Secret information you want to keep can be stored in a deck cipher. For example, the 12 to 25 word bitcoin wallet seed phrase backups can be stored on deck ciphers.
What is a "chain" of cards?
Each unique arrangement of cards is called a chain. While typically only the sort order of the cards are relevant, for deck ciphers the specific rotation (upright or upside down) and flip (front or back) of all the cards are equally significant for the chain of cards.
How to make a deck cipher
It is possible to use a regular deck of cards as a deck cipher. The owner must be able to recreate a specific chain of cards to write the secret and to later retrieve it.
For example, a basic chain can be used such as Ace to King, first spades ♠️, then hearts ♥️, then clubs ♣️, then diamonds♦️, i.e.: ♠️A, ♠️2, ♠️3, ... , ♠️10, ♠️J, ♠️Q, ♠️K; ♥️A, ... , ♥️K, ♣️A, ..., ♣️K, ♦️A, ... , ♦️K. All cards facing front and rotated upright.
It should not be possible for some cards to be accidentally upside down. Cards in some decks may be symmetric, or it simply may not be possible to easily distinguish if a card is upside down. For example the Ace of spades (♠️A) card has an obvious right side up rotation. However, the Ace of diamonds (♦️A) may not. If this is the case, at a minimum each ambiguous card should be marked to show the arbitrarily assigned up direction.

Which chain to use
There are many ways to pick a chain from a regular deck of cards. Magicians who work with cards have contributed a lot in this area. There are ways with increasing complexity to set up a deck of cards so that when shown to an audience it looks randomly shuffled, but the order is known to the magician. However, the cards are always flipped to their front side and rotation of the card usually doesn't matter. This is where a deck cipher is different.
It is better to have a chain that also flips and rotates the cards. This will make the deck cipher more secure. Similarly, the more random the chain of cards looks, the more secure it will be in general.
There are however drawbacks that should be considered if a custom method for creating a chain of cards will be used. The ability to remember the method years later is a risk. When more than one person should be able to access the secret phrase, such as in instances of inheritance planning, clear instructions would have to be written.
Here is are some methods to create a chain:
A “regular” chain the owner can easily remember, such as a chain from an unopened box of playing cards. The drawback is that these chains are easy to guess. There are no upside down cards, and no flipped over cards facing back.
Shuffling the cards (and recording the chain to be able to recreate it).
Using a custom method, such as systematically grouping and reordering the cards.
Using a lookup table based on some information the owner remembers, such as a PIN, passphrase, personal info, etc.
Method for recording a chain
There needs to be an easy system for recording the chain of cards from a regular 52-card deck, where the relative sort order of each card, along with the flip and rotation are written down. We use a system where each card is listed one after the other to indicate the sort order. Each card is indicated with two characters, first one for the suit (S, H, D, C) and the second for the number (A, 1, 2, …, 9, J, Q, K). Next,‘T’ and ‘U’ are used for "Top" and "Upside-down" indicating the rotation of the card. Finally ‘F’ and ‘B’ are used for "Front" and "Back" to indicate the flip. For example, H3TB would be 3 of hearts, right side up but flipped back. All possible characters are: [SHDC] [A23456789JQK] [TU] [BF] (+[RL], Right and Left rotation if square cards).



Comments