padrand(); /* random numbers from one-time pads */

Paul Koning koning at koning.enet.dec.com
Fri Sep 14 23:47:43 AEST 1990


|>...
|> The C source of the padrand() routine posted here, is hereby placed in
|> the Public Domain.  A primitive driver (main) is enclosed for convenient
|> testing.  The verbal description of the algorithm immediately below, is
|> "Copyright 1990, Istvan Mohos, All Rights Reserved".
|> ...
|> Although the text of one-time pads is non-cyclic, the byte stream is
|> subject to regularities of character distribution as the function of the
|> language.  
|> ...
|> The program is somewhat wasteful of pad text, and is intended for Unix
|> environments where on-line text is abundant (as evidenced by directories
|> /usr/dict, /usr/man, ~TeX/TeXdoc and the like) but hardware random
|> number generators are absent.  

It seems to me that you have missed the one most crucial part of the
definition of "one time pad": not only must the one-time pad be non-cyclic,
but the individual bytes must be random.

When you're talking about using text files as a source of key data, you
aren't describing a one-time pad at all.  Instead, what you have is a
"book code" or "running key cypher".  Those are easy to solve; the method
for doing so dates back to the 19th century.  (See D. Kahn, "The Codebreakers")

	paul



More information about the Alt.sources mailing list