Solitaire Cipher
Encrypt and decrypt using the Solitaire (Pontifex) cipher from Cryptonomicon. A cryptographically strong cipher using a deck of cards.
Algorithm Overview
- Move Joker A down 1 position
- Move Joker B down 2 positions
- Perform triple cut around jokers
- Perform count cut using bottom card
- Find output card (top card value as index)
- If joker, repeat; otherwise use as keystream
Note: The Solitaire cipher was designed by Bruce Schneier for Neal Stephenson's novel "Cryptonomicon". It's designed to be performed with a physical deck of cards without any electronic devices.
What is the Solitaire Cipher?
The Solitaire cipher (also known as Pontifex) is a cryptographic algorithm designed by Bruce Schneier, featured in Neal Stephenson's 1999 novel "Cryptonomicon". It's unique because it can be performed entirely by hand using a standard deck of 54 playing cards (including two jokers).
How the Solitaire Cipher Works
The Deck
- Standard 52-card deck plus two jokers (A and B)
- Cards are numbered 1-52, jokers are 53 and 54
- Clubs 1-13, Diamonds 14-26, Hearts 27-39, Spades 40-52
Keystream Generation
Each keystream letter requires these steps:
- Move Joker A: Down one position (wrapping)
- Move Joker B: Down two positions (wrapping)
- Triple Cut: Swap cards above first joker with cards below second
- Count Cut: Cut based on bottom card value
- Output: Count down from top by top card value, output that card
Encryption
Add keystream values to plaintext values (mod 26). A=1, B=2, etc.
Decryption
Subtract keystream values from ciphertext values (mod 26).
Keying the Deck
A passphrase can be used to set up the initial deck order. Each letter of the passphrase causes a round of the algorithm plus an extra count cut by the letter value.
Solitaire in Geocaching
The Solitaire cipher appears in geocaching because:
- Literary connection: Fans of Cryptonomicon
- No electronics needed: Can be done with physical cards
- Strong security: When keyed properly, very hard to break
- Thematic: Perfect for spy or crypto-themed puzzles
Security
Bruce Schneier designed Solitaire to be cryptographically secure when used properly. It's a stream cipher, and like all stream ciphers, the key must never be reused. Without the passphrase, breaking it requires analyzing the keystream for patterns.
Tips for Solving
- Look for clues about the passphrase in the puzzle
- If no passphrase, the deck starts in standard order (A-K of each suit)
- Output is typically in 5-letter groups
- Remember X is used for padding