Solitaire is an encryption algorithm designed by Bruce Schneier and was featured in Neal Stephenson’s Cryptonomicon under the name Pontifex. It is an output-feedback stream cipher which involves manipulation of a deck of cards to produce a keystream of numbers between 1 and 26. This keystream is added modulo 26 to the letters of the plaintext message to produce the ciphertext.
To begin, a deck of cards (including 2 differentiable jokers designated joker A and joker B) is placed face-up in an order (one of 54!, or about 2.31*10^71, possible permutations) known only to the sender and receiver. Schneier describes several ways of achieving this initial keying, including identically shuffled decks, using a bridge ordering (yielding 95 bits of entropy), or a using a 64-80 character passphrase (with standard English text yielding about 1.4 bits of randomness per character).
To produce keystream output, the following procedure is repeated until the required quantity of keystream numbers are produced:
- Move Joker A down by one card (the card is treated as a loop – so if the card is on the bottom, it is placed on the top),
- Move Joker B down by two cards,
- Perform a triple cut, swapping the cards above the top joker with the ones below the bottom joker,
- Perform a count cut, by converting the bottom card to a number from 1 to 53 (jokers are 53), counting down that amount from the top of the deck, then cutting the deck after that point.
- Find the output card, by converting the top card to a number as before, counting down that amount from the top of the deck. Note the card after that point.
- The card found is converted into a value between 1 and 26 and that value outputted, unless it is a joker, in which case no value is outputted.
Schneier has designed Solitaire to be secure against well-funded and resourced adversaries, such as the NSA, with the only required secret being the key. Several analyses of the security of Solitaire have been published, including Properties of the Transformation Semigroup of the Solitaire Stream Cipher by B. Pogorelov and M. Pudovkina, and Problems with Bruce Schneier’s “Solitaire” by Paul Crowley.
The post The Solitaire Encryption Algorithm by Bruce Schneier appeared first on Calcatraz Blog.