Cryptography-Digest Digest #937, Volume #9 Mon, 26 Jul 99 01:13:05 EDT
Contents:
Info needed on cryptography... ("Jeffery Nelson")
Re: Info needed on cryptography... ([EMAIL PROTECTED])
Re: Between Silk and Cyanide
Re: Info needed on cryptography... ("Jeffery Nelson")
Re: hush mail ([EMAIL PROTECTED])
Re: Novice question .. (fungus)
Re: hush mail (David A Molnar)
Re: hush mail (Christopher)
Re: Info needed on cryptography... (David A Molnar)
Re: randomness of powerball, was something about one time pads (Alan J Rosenthal)
Re: Novice question .. (Jim Gillogly)
Re: Between Silk and Cyanide ([EMAIL PROTECTED])
A Better Gronsfeld
Encrypting in C++ and C ("Jeffery Nelson")
----------------------------------------------------------------------------
From: "Jeffery Nelson" <[EMAIL PROTECTED]>
Subject: Info needed on cryptography...
Date: Sun, 25 Jul 1999 16:19:02 -0000
Some of the questions I'm about to ask may seem a little elementary, but you
must realize that I have learned all of this on my own, and without the help
of any other persons interested in cryptography.
I have been programming in C/C++ for about a year now, and all that time I
have been working on an encrypt\decryption program. Here are my
questions...
We all know basic math prevents you from knowing a variable in any additions
problem without first knowing two constants IE:
2 + x = 5
x = 3, because you have the constants 2 and 5... likewise:
x + y = 9
x could be 4 and y could be 5, and many other possibilities. In the same
token:
1001^0011 = x
In this, it is the same as addition in requireing two constants to find out
the third variable (1010)? Correct?
If this is all true and you wanted to keep prying eyes out of some message
to your friends, why wouldn't you just take the ASCII value of every letter
inthe message and Xor it with any random ASCII character (generated by any
means, even a time based random number generator). All you whould have to
do is send the message(XORed) through email, and hand him the disk which
stored the encrypted information on it? Correct? Or you could even have
two email addresses, and justmail him the key (random ASCII characters)
through it. Isn't that one form of SECURE encryption?
If all of this is true, and as long as you don't use a looping key (such as
"spearfish" being represented as "spearfishspearfishspea.." There would be
no way to attack the code. Tell me if I'm wrong.
I also would like to know if there is anyone out there who could help me to
understand the spearfish algorithm a little better...
-Jeff
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Info needed on cryptography...
Date: Sun, 25 Jul 1999 19:05:38 -0400
> x could be 4 and y could be 5, and many other possibilities. In the same
> token:
> 1001^0011 = x
>
> In this, it is the same as addition in requireing two constants to find out
> the third variable (1010)? Correct?
I think what you are asking is if you take a value x and xor it with another
value y (like a key) the output would be unrecoverable without both x and y?
Then no. One simple encryption algorithm (I think someone earlier called it
"Xor Encryption") works like this:
The message is: 14 36 29 59
And the key is: 6
Then:
14 ^ 6 = 8
36 ^ 6 = 34
29 ^ 6 = 27
59 ^ 6 = 61
Therefore the cipher text is: 8 34 27 61
This is easily crackable because it is just a simple substitution cipher. 16 ^
6 is ALLWAYS going to = 8.
>
>
> If this is all true and you wanted to keep prying eyes out of some message
> to your friends, why wouldn't you just take the ASCII value of every letter
> inthe message and Xor it with any random ASCII character (generated by any
> means, even a time based random number generator). All you whould have to
> do is send the message(XORed) through email, and hand him the disk which
> stored the encrypted information on it? Correct? Or you could even have
> two email addresses, and justmail him the key (random ASCII characters)
> through it. Isn't that one form of SECURE encryption?
There is one way that this is secure:
If the amount of random numbers you used for encryption equaled the amount of
plain text. That's called a one time pad that algorithm is 100% uncrackable
(assuming you use a GOOD random number generator) and 100% unpractical. You
would have to securly transfer the key (which is the same length as the cipher
text). You might as well have just used the secure channel for the plaintext.
> If all of this is true, and as long as you don't use a looping key (such as
> "spearfish" being represented as "spearfishspearfishspea.." There would be
> no way to attack the code. Tell me if I'm wrong.
Yes, that's correct.
> I also would like to know if there is anyone out there who could help me to
> understand the spearfish algorithm a little better...
Spearfish algorithm? You mean looping a key? I think this is what you mean:
Plaintext: 38 10 54 98 23
Key: 19 40
Therefore:
38 ^ 19 = 53
10 ^ 40 = 34
54 ^ 19 = 37
98 ^ 40 = 74
23 ^ 19 = 4
Ciphertext: 53 34 37 74 4
This also has flaws. Kasiski (sp?) found a method for breaking this cipher in
the 1800's...but that is too much to put here. JPeschel's web site is where I
think I got my information on that. Check his signature for the url.
------------------------------
From: [EMAIL PROTECTED] ()
Subject: Re: Between Silk and Cyanide
Date: 26 Jul 99 00:02:20 GMT
[EMAIL PROTECTED] wrote:
: I've seen one flaw in it: it shows the cipher where a text and a key are
: enciphered using a Polybius square, but then added together mod 10 instead
: of mod 5 - I think this was the "Nihilist" cipher -
Checking Gaines, it was _a_ Nihilist cipher, the filled-square
transposition being the better known one
: without noting that it
: has a weakness (it seems to be used to illustrate one-time-pads, of which
: a coherent key wouldn't be an example even if done right).
Actually, this Nihilist with a running key is noted as falling short of a
one-time-pad because of the coherency of the key. Which is what, by
implication, indicates that a Nihilist with a random literal key would be
a one-time pad, which is false (i.e. 2 implies the plain and key digits
must both have been 1, 0 implies both were 5...)
one wishes the author had been working for the Russians; the Venona
project would have been much easier.
John Savard
------------------------------
From: "Jeffery Nelson" <[EMAIL PROTECTED]>
Subject: Re: Info needed on cryptography...
Date: Sun, 25 Jul 1999 19:25:09 -0000
"I also would like to know if there is anyone out there who could help me to
understand the spearfish algorithm a little better..."
Oops, that was a typo on my part. I was in a bit of a boggled state when I
wrote the "Info needed on cryptography..." message. I intended to say
"blowfish", the algorithm, and not "spearfish" the long time overused
password. I need help understanding the basics of it. I'm 17 and just got
intested in cryptography seriously. Any help would be great!
Thanks to David Molnar and HellPhyre for their help!
-Jeff
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: hush mail
Date: Sun, 25 Jul 1999 19:38:38 -0400
David A Molnar wrote:
> I can't speak for the designers of the AES process, but I will note that
> if practical quantum computers are built, then a space of n bits may be
> searched in sqrt(n) time. In this case, a 256-bit cipher is "only" as
> difficult to brute force as a 128-bit cipher would be w/o quantum
> computers.
Eh? Wouldn't that mean that that a 256 bit encryption would be equal to 16
bit b/c sqrt(265) = 16?
------------------------------
From: fungus <[EMAIL PROTECTED]>
Subject: Re: Novice question ..
Date: Mon, 26 Jul 1999 00:11:04 -0100
Neil wrote:
>
> I am just curious...
>
> If one took a fairly long message, say 200-300 words, and enciphered
> it wwith playfair and THEN used a second encipherment with a good
> transposition cipher ... wouldn't that be very tough to break??
>
"Paper and pencil" ciphers have great difficulty in wiping out all
statistical information, and unless you do this then a computer can
break it quite easily.
> Even with multiple messages, using different keys would still make it
> pretty tough, wouln't it?
>
Codes like this were being broken regularly 50 years ago. We've got
fast computers...
--
<\___/>
/ O O \
\_____/ FTB.
------------------------------
From: David A Molnar <[EMAIL PROTECTED]>
Subject: Re: hush mail
Date: 26 Jul 1999 00:33:15 GMT
[EMAIL PROTECTED] wrote:
> David A Molnar wrote:
>> I can't speak for the designers of the AES process, but I will note that
>> if practical quantum computers are built, then a space of n bits may be
>> searched in sqrt(n) time. In this case, a 256-bit cipher is "only" as
>> difficult to brute force as a 128-bit cipher would be w/o quantum
>> computers.
> Eh? Wouldn't that mean that that a 256 bit encryption would be equal to 16
> bit b/c sqrt(265) = 16?
Er, yes. Sorry, my mistake. Rather, it takes the square root of the time
it would have taken w/o quantum computers.
searching a 128-bit keyspace, normally - 2^128 / 2 on average
square root of that : sqrt(2^127) = 2^(127 * 1/2) = 2^63.5
-David
------------------------------
From: [EMAIL PROTECTED] (Christopher)
Subject: Re: hush mail
Date: Sun, 25 Jul 1999 20:33:33 -0400
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:
_ David A Molnar wrote:
_
_ > I can't speak for the designers of the AES process, but I will note that
_ > if practical quantum computers are built, then a space of n bits may be
_ > searched in sqrt(n) time. In this case, a 256-bit cipher is "only" as
_ > difficult to brute force as a 128-bit cipher would be w/o quantum
_ > computers.
_
_ Eh? Wouldn't that mean that that a 256 bit encryption would be equal to 16
_ bit b/c sqrt(265) = 16?
I'm sure he meant that the keyspace is searchable in O(sqrt(n)) as opposed
to classical searches which require O(n). To protect against that, square
the keyspace, or double the number of bits in the key.
------------------------------
From: David A Molnar <[EMAIL PROTECTED]>
Subject: Re: Info needed on cryptography...
Date: 26 Jul 1999 00:50:01 GMT
Jeffery Nelson <[EMAIL PROTECTED]> wrote:
> Oops, that was a typo on my part. I was in a bit of a boggled state when I
> wrote the "Info needed on cryptography..." message. I intended to say
> "blowfish", the algorithm, and not "spearfish" the long time overused
> password. I need help understanding the basics of it.
Do you have a description of it lying around ? If not, the page at
http://www.counterpane.com/blowfish.html has the original paper and
several implementations. There's also a description in _Applied
Cryptography_.
Where do you start having trouble understanding? (if you can pin it down;
if you can't, just say so)
Thanks,
-David
------------------------------
From: [EMAIL PROTECTED] (Alan J Rosenthal)
Subject: Re: randomness of powerball, was something about one time pads
Date: 26 Jul 99 00:50:43 GMT
"Doug Gwyn (ISTD/CNS) <gwyn>" <[EMAIL PROTECTED]> writes:
[martingale]
>So far, I haven't seen anyone in sci.crypt come close to identifying
>the flaw in this strategy.
and later "Douglas A. Gwyn" <[EMAIL PROTECTED]> writes:
>The (presumably fallacious) argument is:
> The double-your-bet-after-a-loss strategy guarantees
> that each time you win a play, you are ahead by $1.
> There is zero probability that you will never win a
> play. Therefore, at some point in time you will be
> ahead by $1, with probability one. When that occurs,
...
Ok then, if that's an official version of the strategy, then here's my
stab at explaining the flaw.
Depending on interpretation, the flaw is either in the "zero probability"
statement or the "at some point in time" statement.
For any finite run, the probability of straight losses is not zero.
Even if someone is willing to go "as long as necessary" to achieve a win
and the house permits them to go into debt with no limit, and setting aside
things such as the player's death and the cooling of the sun and such,
still it's the case that there's always some non-zero probability of a
continued run of losses at any point.
As far as I can see the only defense of that zero value is that the *limit*
probability is zero as the length of the run goes to infinity. In this case,
the "at some point in time" clause is erroneous. Infinity is not a point
in time. But more fundamentally, in an infinite run the expectation is
the standard one regardless of martingale-like strategy. The martingale
depends on having a finite run -- on cutting the game off after a win.
So the probability of loss is not zero.
So whaddya think, do I pass?
------------------------------
From: Jim Gillogly <[EMAIL PROTECTED]>
Subject: Re: Novice question ..
Date: Sun, 25 Jul 1999 18:36:30 -0700
fungus wrote:
>
> Neil wrote:
> >
> > I am just curious...
> >
> > If one took a fairly long message, say 200-300 words, and enciphered
> > it wwith playfair and THEN used a second encipherment with a good
> > transposition cipher ... wouldn't that be very tough to break??
> >
>
> "Paper and pencil" ciphers have great difficulty in wiping out all
> statistical information, and unless you do this then a computer can
> break it quite easily.
That's pretty glib. A combined substitution and transposition can
be quite challenging, with or without computers. "Quite easily"
is an overstatement, if we assume reasonable Playfair keys (i.e.
a fairly mixed square) and a "good transposition cipher" as he
specified -- e.g. a double transposition with a long key or two.
Even if some of the statistical information shows through, just
throwing a computer at it won't exhaust the key-space, so you'll
need to do something clever.
> > Even with multiple messages, using different keys would still make it
> > pretty tough, wouln't it?
> >
>
> Codes like this were being broken regularly 50 years ago. We've got
> fast computers...
We do have faster computers, but they need to be programmed with
something better than brute force to handle this kind of thing.
--
Jim Gillogly
Mersday, 3 Wedmath S.R. 1999, 01:29
12.19.6.7.1, 6 Imix 9 Xul, Sixth Lord of Night
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Between Silk and Cyanide
Date: Mon, 26 Jul 1999 00:51:52 GMT
<< We seem to read a lot about the national history of the "winners,"
but what about the other side? And will there be other books which
show us the *people* involved, with all of their foibles as well as
their success? >>
You might be interested to know that Marks' antagonist in Holland,
Herr Giskes, wrote a book after the war about his role in the British
failure in that country. It was reprinted by Bantam Books in 1982
under the title, London Calling North Pole. The book contained an
epilogue by H. Lauwers to round out the story from the Dutch point of
view. Lauwers was quite bitter about the fact that the men who
controlled his fate after he went into action were not of "the same
efficient quality as those officers who had given us our training".
I thought it was odd that Marks, who seems to have been aware of
every postwar development in this story and who was personally
acquainted with H. Lauwers, nevertheless seems never to have read
Giskes' book. I would have thought that the book would have created
quite a stir in England when it was published in 1953 by the British
Book Centre, Inc. and by William Kimber and Co, in London.
-- Jeff Hill
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
From: [EMAIL PROTECTED] ()
Subject: A Better Gronsfeld
Date: 26 Jul 99 01:42:04 GMT
Thinking about the Nihilist cipher as an example of _defective_
polyalphabetic encryption (plaintext alphabet=key alphabet=5 elements,
cipher alphabet=10 elements) caused me to note that the Gronsfeld was also
defective, but in a less severe manner (plaintext alphabet=cipher
alphabet=26 elements, key alphabet=10 elements)...
and, since people can do base-10 arithmetic in their heads, but base-26
arithmetic requires a table or slide or disk,
I came up with a scheme that would replace the Vigenere table, yet require
only simple mental arithmetic.
Let us take the English alphabet, and apply it the scheme of representing
numbers used by the ancient Greeks and before them the Hebrews:
A 1 J 10 S 100
B 2 K 20 T 200
C 3 L 30 U 300
D 4 M 40 V 400
E 5 N 50 W 500
F 6 O 60 X 600
G 7 P 70 Y 700
H 8 Q 80 Z 800
I 9 R 90
Then, the rule for encipherment is this:
a) If the plaintext and key letters are in the same column, they are
added:
B (2) + F (6) = H (8)
L (30) + J (10) = M (40)
b) If the plaintext and key letters are in two different columns, their
nonzero digits are added, and the letter in the third column which
contains neither key nor plaintext containing the sum is taken:
D (4) + L (30) = Y (700)
W (500) + K (20) = G (7)
If we had a 27-letter alphabet, we would only have to add that when the
sum is greater than 9, subtract 9 (in the appropriate digit place):
M (40) + Q (80) = L (30)
For the 26-letter alphabet, it's easy to modify rule (a): if the two
letters are in the third column, subtract 800 instead of 900.
U (300) + Y (700) = T (200)
But what do we do with rule (b)?
I think this will work, although I'll really have to make out the complete
26 by 26 table to be sure it results in unambiguous alphabets in every row
(and, ideally, also produces a Latin square, although that isn't strictly
necessary: two key letters producing the same equivalent for one letter,
although a defect, would not render the scheme completely unusable):
always subtract 9; if the cipher letter and the key letter produce 900 as
the result, use instead the letter that would be produced by enciphering a
letter with the value 900 with the key letter. Since there is no letter
with that value, when one is produced by deciphering, decipher 900 with
the key to get the true plaintext letter.
With this scheme, here is the A alphabet in the square:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
B C D E F G H I A T U V W X Y Z J S K L M N O P Q R
Q (80) + A (1) = 900 by rule (b);
900 + A(1) = J (10); 9+1=10, so subtract 9 to get 1, and choose the unused
column.
John Savard
------------------------------
From: "Jeffery Nelson" <[EMAIL PROTECTED]>
Subject: Encrypting in C++ and C
Date: Sun, 25 Jul 1999 23:42:29 -0000
I've been working ok a "one pass pad" algorithm (if you can call it that),
in C++ and have had many many troubles with they cypher turning the EOF
character into some other letter and the other way arround. This becomes
increasingly taxing when I use the .EOF to delimit my loops because I open
the files in binary mode (although I can't open exe's for some odd reason).
Is there some way to end a loop at the END OF A FILE not useing .eof()? I
know this isn't a C++ newsgroop, but because it is the cypher that is
causing the problem, I thought someone here would have run into this. I can
give you the source to the file extractions method I use if you would like,
but I have to keep the header file I use to myself. Please HELP!
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and sci.crypt) via:
Internet: [EMAIL PROTECTED]
End of Cryptography-Digest Digest
******************************