Unveil

Classical and machine ciphers, from Caesar’s shift to Enigma, Lorenz, the VIC and Solitaire: enciphered and deciphered with a key, and many broken without one.

Solitaire

Bruce Schneier designed Solitaire for Neal Stephenson’s Cryptonomicon (1999), where it is “Pontifex”, so that an agent with nothing but a deck of cards could encipher securely. Each pass moves the two jokers, makes a triple cut and a count cut, and reads an output card; Paul Crowley found that a letter follows itself about once in 22.5 rather than 26. Checked against Schneier’s test vectors.

About this tool

History

Bruce Schneier designed Solitaire for Neal Stephenson’s Cryptonomicon (1999), in which Enoch Root describes it to Randy Waterhouse as “Pontifex”. Schneier meant it for agents who cannot rely on a computer or carry incriminating tools; by hand a message takes most of an evening. Paul Crowley found two flaws in 1999. The output is biased: a letter follows itself about once in 22.5, not once in 26. And the first step cannot always be undone, though Schneier’s page calls the cipher reversible. Daniel Shiu (2019) accounted for most of the bias in a model.

How it works

The key is the order of 54 cards. In bridge order clubs count 1–13, diamonds 14–26, hearts 27–39 and spades 40–52, either joker 53. Each pass moves the A joker one card down and the B joker two, the deck taken as a loop; swaps the cards above the first joker with those below the second; moves as many cards as the bottom card counts from the top to just above it; and counts down from the top by the top card’s value. The next card is the output, 1–26 (clubs and hearts 1–13, diamonds and spades 14–26), added to a letter of the message modulo 26; a joker gives nothing. A passphrase keys the deck from its unkeyed order, each letter a pass with a second count cut by its number in place of the output.

How it was checked

The tests follow Schneier’s worked samples step by step, jokers at the bottom and empty cuts included, and all twelve vectors of his test file: for each key, from none to CRYPTONOMICON, the outputs, joker passes included, and the ciphertext. SOLITAIRE enciphers to KIRAK SFJAN and back. Over 100,000 letters from the deck keyed by CRYPTONOMICON a letter follows itself 4.5% of the time, against 3.8% for random letters, as Crowley found; a deck with the A joker on top and the same deck with it at the bottom come out of a pass alike.

Limits

Schneier’s optional step that places the jokers by the passphrase’s last two letters is left out: his examples do not use it, and it does not say whether the other joker is counted. Only A–Z are enciphered. The tool needs the key; it does not attack a message without it. Schneier warns never to use a key for two messages and asks for a passphrase of 64 letters at least.