The Solitaire Method of Encryption

advertisement
The Solitaire Method of Encryption
Developed by Bruce Schneier
as described in Cryptonomicon by Neal Stephenson
Introduction
This method of encryption is far more complex than the methods we have
studied previously. As an overview, you perform the following steps.
1. Convert your plain text message into a series of numbers, a = 1, b = 2,
… z = 26.
2. Generate a keystream. The keystream will be a series of numbers
such that there is one keystream number for each plaintext letter.
3. Add the plain text numbers to the keystream numbers one at a time. If
the result is greater than 26, subtract 26 from it.
4. The series of numbers you produce by this method is your cypher text.
5. To decrypt, you perform the reverse of this process.
Developing the Keystream
Take a deck of playing cards including the two jokers. Designate one of the
jokers A and the other B. In a normal deck of cards, the two jokers have a
different appearance. For example, one may have a small star and the other
a larger star. Arrange the deck into a key (to be explained later).
To develop the keystream, perform the following steps in exactly the order
shown.
1. Find joker A and move it one card down. If it’s the bottom card,
move it under the top card (the second card in the deck.).
2. Find joker B and move it two cards down. If it’s the bottom card,
move it below the second card. If it’s second from the bottom, move
it under the top card. Think of the deck as a loop.
3. Perform a triple cut. Swap all the cards above the first joker (from the
top) with the cards below the second joker. Leave the cards between
the two jokers alone.
4. Perform a count cut. Look at the bottom card. Convert it to a
number. (A = 1, 2 = 2, …, K = 13, A = 14, 2 = 15, … K =
26, A = 27, 2 = 28, … K = 39, A = 40, 2 = 41, … K = 52).
Either joker = 53). Count down from the top card that number and
place those cards just above the bottom card.
5. Look at the top card and convert it to a number from 1 – 53. Count
down from the top of the deck that number and look at the next card.
That card gives you the keystream number. If the card is a joker,
repeat steps 1-5. If the number is greater than 26, subtract 26 to get
your number.
6. Repeat steps 1-5, once for each keystream number.
Where does the key come from?
The key can be any unique ordering of the deck of cards. The key is the
starting point for the process of developing a keystream as described on the
previous page. There are 54! unique orderings of a deck of playing cards
with two jokers. That is approximately 10 to the 71st power. One way of
generating a key is to use a bridge hand that has been printed in some
newspaper, say the New York Times. The hands can be put in the order,
North, East, South, West. Then the jokers can be placed after the first card
that is led for joker A, and after the card led for the second trick for joker B.
Encryption
1. Split the plaintext message into groups of 5 characters. This is
arbitrary, but conventional.
2. Generate a keystream equal to the number of letters in the message.
3. Convert the letters in the plaintext message into numbers. A=1, B=2,
etc.
4. Add the numbers produced in step 3 to their corresponding numbers
from the keystream using modulo26.
5. Convert the results from step 4 to letters. This gives the encrypted
message.
Decryption
1. Convert the encrypted message to numbers
2. Generate a keystream equal in length to the encrypted message.
3. Subtract the corresponding keystream value from the number in the
encrypted message using modulo 26.
4. Convert the result to letters.
Bridge column #1.
North
QJ9
Q7
AJ1093
1076
West
AK105
A654
East
8763
K93
Q765
A2
KQJ85
South
42
J1082
K842
943
The contract is 6 spades played by West. The opening lead (the first card
led) by North is the 6. The first card played to the second trick is the
3.
Bridge Column #2
North
854
76
KJ987
1093
West
KQ1092
KQ4
Q10
AQ8
East
76
A852
A2
K7652
South
AJ3
J1093
6543
J4
The contract is 3NT by West. The opening lead is the 8. The lead to
the second trick is the A.
Download