1996-11-16 - Re: Playing Cards

Header Data

From: Hal Finney <hal@rain.org>
To: ph@netcom.com
Message Hash: a499e37939499425030c21fc5b8112661d705c492a64f00e659959cf95b93d2a
Message ID: <199611160304.TAA00446@crypt.hfinney.com>
Reply To: N/A
UTC Datetime: 1996-11-16 04:34:34 UTC
Raw Date: Fri, 15 Nov 1996 20:34:34 -0800 (PST)

Raw message

From: Hal Finney <hal@rain.org>
Date: Fri, 15 Nov 1996 20:34:34 -0800 (PST)
To: ph@netcom.com
Subject: Re: Playing Cards
Message-ID: <199611160304.TAA00446@crypt.hfinney.com>
MIME-Version: 1.0
Content-Type: text/plain


From: ph@netcom.com (Peter Hendrickson)
> A well shuffled deck of 54 cards has about 237 bits of entropy.  This
> is easy to use: the program asks the order of the cards, converts this
> to a string, and runs it through a one-way hash.  (Entering the cards
> is a bit of a nuisance.  Is there an easy way to have them read
> automatically?)

I heard that Bruce Schneier has devised a cryptosystem based on a card
deck for a future book by Neal Stephenson.  It is supposed to be simple
enough for a person to use manually, but complicated enough that it can't
be broken by computer.  Your idea of using cards as a one time pad is
somewhat similar, maybe, although I think Bruce's was designed to be
useful for long messages, providing computational rather than unconditional
security.

> How the Lisp Code Works
> -----------------------
>
> Let's use as an example a deck of five cards numbered from 0 to 4.
> There are 5! = 120 combinations of these cards.  We can think
> of each card as a "digit" in a slightly odd numbering system.

This is very interesting; I've never seen this algorithm before.  It
is a nice way to turn a number into a permutation, and vice versa.

> For an exercise, what is the value of (4 2 1 3 0)? (Answer at end.)

This would be 4*4! + 2*3! + 1*2! + 1(was 3)*1! + 0*0!, or as you say:

> ;; (Exercise Answer: (4 2 1 3 0) = 111)

Hal





Thread