[{"thread": "KHWssx9WV4I", "msg": "jErwZjCvJRoJ", "author": "David Hopwood", "date_disp": "Jan 29, 1996, 3:00:00\u202fAM", "subject": "IBM gives Lotus Notes Key to Feds", "body_html": "In article <david-26019...@lax-ca9-25.ix.netcom.com>,
David Sternlight <da...@sternlight.com> wrote:

>> Let's play a game.
>

>Let's not. If you've been reading the traffic here and thus had your brain
>in gear before engaging your fingers, you'd know that the WSJ got it wrong
>and 24 bits of the key are not constant. The entire 64 bit RC4 message key
>is generated for each message, and 24 bits of it (different for each
>message) are encrypted with the NSA's public key and passed along with the
>message.

Assuming the above description is correct, what's to stop someone using trial
encryptions of every 24-bit number to find 24 bits of the key?

Maybe the 24 bits are padded with random data before encryption - does
anyone know (and if so, is it random enough?)

David Hopwood
david....@lmh.ox.ac.uk


", "url": "https://groups.google.com/g/sci.crypt/c/KHWssx9WV4I/m/jErwZjCvJRoJ", "n_sections": 61}, {"thread": "LIsB8h7xgx0", "msg": "KZrtrNoZCUoJ", "author": "David Hopwood", "date_disp": "Feb 4, 1996, 3:00:00\u202fAM", "subject": "First Virtual's Attack", "body_html": "In article <4eu22q$d...@server.cntfl.com>,
Roger Books <bo...@rtssec1.dms.state.fl.us> wrote:
>Mike D. Kail (mdk...@fv.com) wrote:
>
>> Q12. IS THIS ATTACK REALLY TRACELESS?
>
>> A. Several people have questioned First Virtual's claim that, once
>> stolen, a credit card number can be transmitted back to the criminal
>> completely tracelessly.
[snip]

>> Among the techniques that have been pointed out in that manner are:
>
>> \t-- use steganography to hide it in broadcast pictures or audio
>
>Hey now, this is a good one. Here is one to think about. :)

Using this technique is extremely simple. For example, this post
contains a 20-digit number, encoded in such a way that I wouldn't
notice it if some trojan had attacked my posting software.

David Hopwood
david....@lmh.ox.ac.uk

", "url": "https://groups.google.com/g/sci.crypt/c/LIsB8h7xgx0/m/KZrtrNoZCUoJ", "n_sections": 65}, {"thread": "LIsB8h7xgx0", "msg": "1pvPj--IIc8J", "author": "David Hopwood", "date_disp": "Feb 14, 1996, 3:00:00\u202fAM", "subject": "First Virtual's Attack", "body_html": "
In article <DMpKL...@hplb.hpl.hp.com>,
Stefek Zaba <sj...@hplb.hpl.hp.com> wrote:
[snip]

>The above *does* represent a sensible, feasible, on-line use of CC#-related
>payment accounts. I'll repeat the scheme in easy steps:
>
[snip]

> The certificate includes {CC#}CNDKey, your credit card number encrypted
> under a key known only to a CND, a Card Number Decoder: the obvious
> organisation for this function is the appropriate card association
> (VISA, M/C, etc.). All the CND needs is the decoding key for getting
> CC# out of {CC#}CNDKey, and keys for ENcoding CC# for every relevant
> acquirer.
>
> (1) When making your payment, you send {CC#}CNDKey in place of your CC#.
> The merchant presents this as part of their message to their acquirer.

Then anyone who intercepts {CC#}CNDKey can use it to make purchases. I don't
see that this is any more secure than sending the CC itself.

There is no way around it; the endpoints of the transmission (i.e. the
customer and merchant's computers) _must_ be trustworthy.

This can be ensured, but it requires either
- additional hardware (e.g. a separate keypad and crypto card), or
- a secure operating system, or
- that no untrusted code is ever executed on those machines.

David Hopwood
david....@lmh.ox.ac.uk

", "url": "https://groups.google.com/g/sci.crypt/c/LIsB8h7xgx0/m/1pvPj--IIc8J", "n_sections": 65}, {"thread": "SDog4NFGRFc", "msg": "vrKpVsndp9AJ", "author": "David Hopwood", "date_disp": "Jan 16, 1996, 3:00:00\u202fAM", "subject": "Brain teaser (problem only)- Zero key exchange encryption?", "body_html": "
In article <4dejhj$e...@inet-nntp-gw-1.us.oracle.com>,
Mark Warren <mwa...@gatekeeper.us.oracle.com> wrote:
>
>You want to send a valuable object to a friend. ...

>
>Solution (read from right to left):
>
>eht ot kcol a hcatta dna xob eht otni tcejbo elbaulav eht ecalP
>dnes dna kcol nwo rieht hcatta yehT .dneirf ruoy ot xob eht dneS .gnir
>!kcab xob eht dnes dna kcol ruoy evomer uoY .uoy ot kcab ti

This relies on the fact that locking with A, locking with B and then unlocking
with A followed by B yields the original object.

i.e. Binverse (Ainverse (B (A (x)))) = x
or B (A (x)) = A (B (x))

Although they are not exactly analogous, several protocols rely on a similar
property (e.g. see the description of diffie-hellman key exchange at
http://dcs.ex.ac.uk/~aba/perl-dh.html).

David Hopwood
david....@lmh.ox.ac.uk

", "url": "https://groups.google.com/g/sci.crypt/c/SDog4NFGRFc/m/vrKpVsndp9AJ", "n_sections": 9}, {"thread": "W5XFNk0krG0", "msg": "oowx9pvrf00J", "author": "David Hopwood", "date_disp": "Feb 4, 1996, 3:00:00\u202fAM", "subject": "RC2 Source Code - Legal Warning from RSADSI", "body_html": "In article <david-03029...@lax-ca10-07.ix.netcom.com>,

Ah, but it's not RSADSI's source - it's reversed engineered from the binary.
(Effectively, it's a new program that was written by observing the behaviour
of RSADSI's version). So they can't possibly have a copyright on the source
that was posted.

David Hopwood
david....@lmh.ox.ac.uk

", "url": "https://groups.google.com/g/sci.crypt/c/W5XFNk0krG0/m/oowx9pvrf00J", "n_sections": 42}, {"thread": "bQhjZLlnjlo", "msg": "Hz3UfbKMOdMJ", "author": "David Hopwood", "date_disp": "Jan 20, 1996, 3:00:00\u202fAM", "subject": "Microsoft's CAPI", "body_html": "In article <4dj69h$1...@ground.cs.columbia.edu>,
Matt Blaze <m...@research.att.com> wrote:
[snip]

>The OS will not load just any old CSP. CSPs have to be signed by
>Microsoft. The kernel contains a (hardcoded?) 1024 RSA public key
>that it uses to check the signature when the user tries to load a CSP.
>If the signature check fails, the CSP won't load. Microsoft says it
>will sign any CSP from anyone AS LONG AS THEY CERTIFY THAT THEY WILL
>FOLLOW THE EXPORT RULES.

So what's to stop someone outside the US from implementing the standard,
getting it signed by MS, and then asking users to get the result from
their non-US ftp site?

>Despite all this, I think it will be easy to get around the CSP
>signature requirements and use homebrew, unsigned crypto even with
>pre-compiled .exe files from other sources.

No doubt. But people can already use homebrew crypto; it's the mass market
that's more important.

>I haven't tried any of this out yet, but they say they will have beta
>versions of the API and CSP developers kits out in a few weeks. They
>say that the API kit will not be export-controlled but the CSP kit
>will be.

Ah, I see. Still, you can presumably export documentation sufficient to
reimplement the API; that's not covered by ITAR.

David Hopwood
david....@lmh.ox.ac.uk

", "url": "https://groups.google.com/g/sci.crypt/c/bQhjZLlnjlo/m/Hz3UfbKMOdMJ", "n_sections": 17}, {"thread": "5-iXzsJviqs", "msg": "7rnPcgeWPzUJ", "author": "David Hopwood", "date_disp": "Jun 8, 1996, 3:00:00\u202fAM", "subject": "MD5 collisions", "body_html": "

In article <wuT7oD...@tanda.on.ca>, Marc Thibault <ma...@tanda.on.ca> wrote:
>pa...@lcs.mit.edu (Patrick J. LoPresti) writes:
>
>> This attack on MD5 *is* significant, and *does* argue against its
>> continued use for digital signatures.
>
> Oops! That doesn't follow at all. The ability to generate
> pairs of related documents with the same MD5 hash does not
> invalidate MD5. As soon as the existence of such a pair comes
> to light, the author can be assumed to be doing research or
> attempting some kind of fraud, since generating such a pair
> requires a very non-accidental procedure.
>
> So far we've only seen highly contrived scenarios for putting
> Dobbertin to use, all of which ignore important facets of how
> the real world operates.

Assume this is a couple of years from now, and executable programs are
routinely signed and checked.

Take a signed executable from a widely trusted source, e.g. a web browser.
Change some instruction or constant so that it makes the program exploitable
(for example, change a conditional jump that makes a security check so
that it always succeeds). This assumes that you can choose which bit gets
inverted; I'm not sure whether this is true for Dobbertin's attack, but it's
not implausible.

Then distribute the hacked executable, and write an untrusted program (e.g.
in Java, or Safe-TCL or whatever) that exploits the change.

I'm sure there are lots of other instances where signatures are used for
applications where a change would not be immediately obvious to the user.

David Hopwood
david....@lmh.ox.ac.uk


", "url": "https://groups.google.com/g/sci.crypt/c/5-iXzsJviqs/m/7rnPcgeWPzUJ", "n_sections": 96}, {"thread": "7JFpBjFu88o", "msg": "GEuyLoH3bSkJ", "author": "David Hopwood", "date_disp": "May 30, 1996, 3:00:00\u202fAM", "subject": "Backdoor in RSA Discovered", "body_html": "
In article <17796CEB5...@ibm.rhrz.uni-bonn.de>,

Jo Schueth <UNQ...@ibm.rhrz.uni-bonn.de> wrote:
>In article <19960529T09...@chanur.imf.unit.no>
>han...@imf.unit.no (Harald Hanche-Olsen) writes:
>>Um. Isn't the Subject a bit overstated here? As far as I read the
>>paper, it says that a program generating and using RSA keys can be
>>doctored to provide a hard to detect backdoor, not that RSA per se has
>>a backdoor in it. Or did I miss something?
>
>I too think it's overrated. I thought of weakening PGP key
>generation myself, but in a somewhat simpler way: Only use
>a small random seed in the generation of p and stretch it
>out to the required length using a pseudorandom generator.
>Then choose q such that the least significant bits of n=pq
>contain the seed used in the generation of p (use the method
>known as "deadbeef"-attack to construct q).
>
>Why should one want to write a paper on that?

Because the proposed attack also makes the message secure from
anyone except the attacker and the intended recipient (whereas
the scheme you describe enables the message to be found by
anyone who reverse-engineers the pseudorandom generator).

However, I would also agree that it is not a backdoor in RSA.

David Hopwood
david....@lmh.ox.ac.uk


", "url": "https://groups.google.com/g/sci.crypt/c/7JFpBjFu88o/m/GEuyLoH3bSkJ", "n_sections": 5}, {"thread": "_xoBiYrgsQU", "msg": "1V07isAlTGoJ", "author": "David Hopwood", "date_disp": "May 21, 1996, 3:00:00\u202fAM", "subject": "Authenticated Cancels", "body_html": "
In article <7o39ND...@bwalk.dm.com>,
Dr. Dimitri Vulis <d...@bwalk.dm.com> wrote:
[...]

>This is what needs to be done with the newsreader; and now I'll describe
>how INN or a similar NNTP server needs to be patched to authenticate
>cancels/supersedes:
>
>Whenever news server software sees an article with either "Control:
>cancel <X>" or "Supersedes: <X>", it should do the following:
>1. If the cancel doesn't contain a "Cancel-key: M1" header, drop it
> (don't propagate it, and don't process it)
>2. Else compute MX = H(M1 + message-id).
>3. Retrieve the original article <X> and looks for the "Cancel-lock: M2 ..."
> header in it. (If the article is not available, drop the cancel.)
>4. If MX matches one of the M2's in the header, then cancel X and
> propagate the cancel.
>5. If no match is found, then drop the cancel. (Don't process it,
> and don't propagate it.)

This sounds like a good idea, however, to fix the problem of cancels
arriving before the original article, I'd suggest:

3. Try to retrieve the original article <X>. If found, look for the
"Cancel-lock: M2 ..." header.
If not found, store the cancel but don't propagate it. Put <X> and the
ID of the cancel in a hashtable. When each article comes in, check it
against the hashtable, and if it matches, process as above.
When a cancel expires, remove it from the hashtable. Propagate the
cancel only when it has been acted on.

I think it would also be a good idea to put the name of the hash algorithm
in the Cancel-lock header, for example:

Cancel-lock: <SHA1> M2 ...

Allow different Cancel-locks to have different hash algorithms. Propagate
but don't act on cancels with an unrecognized hash algorithm.

This way, if SHA1 is cracked, for example, the basic mechanism will still
work.

David Hopwood
david....@lmh.ox.ac.uk


", "url": "https://groups.google.com/g/sci.crypt/c/_xoBiYrgsQU/m/1V07isAlTGoJ", "n_sections": 2}, {"thread": "i7_eE8RklaY", "msg": "jiLJ6tOuei4J", "author": "David Hopwood", "date_disp": "Jun 17, 1996, 3:00:00\u202fAM", "subject": "MAJOR LOSS FOR U.S. IN INTERNET PRIVACY WAR", "body_html": "

In article <4q2g10$l...@zap.io.org>, Mark Terka <were...@zap.io.org> wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>
> MAJOR LOSS FOR U.S IN INTERNET PRIVACY WAR
>
> by Brock Meeks
>
>- From CyberWire Dispatch and reprinted from NOW Magazine (Toronto) 6/13/96
> Edit.
[...]

>The key length stuff is just so much gibberish to those playing without a
>score
>card, so let me drill down it for you. Basically, the longer the key length,

>the harder it is for a message to be broken by "brute force" automated


>attackes. Current U.S. laws prohibit the export of any encryption device with
>a key length longer than 40 bits, roughly the equivalent of a Captain Crunch
>decoder ring. For hardcore math types, I'm told that a 1024-bit key length is
>10 to the 296 power more difficult to break than 40 bits.

Apples and oranges, anyone?

[The 1024 bit figure is for public key encryption (RSA in this case, I think);
40 is for symmetric encryption.]

David Hopwood
david....@lmh.ox.ac.uk

", "url": "https://groups.google.com/g/sci.crypt/c/i7_eE8RklaY/m/jiLJ6tOuei4J", "n_sections": 5}, {"thread": "jC7sPqiVpzI", "msg": "Pcbrzov-HKYJ", "author": "David Hopwood", "date_disp": "Apr 17, 1996, 3:00:00\u202fAM", "subject": "Cost of attacks", "body_html": "In article <padgett.12...@goat.orl.mmc.com>,

Padgett 0sirius <pad...@goat.orl.mmc.com> wrote:
>Have been assigning a "cost to attack" of $500 to 40 bit symmetric keys
>(e.g. RC4-40), i.e. if the value of the message is under $500, then 40 bits
>is enough. [...]

This type of statistic could be rather misleading. Why does it imply that
40 bits is "enough", given that in most cases it is not difficult to make the
cost of decryption much higher than the value of the message?

David Hopwood
david....@lmh.ox.ac.uk

", "url": "https://groups.google.com/g/sci.crypt/c/jC7sPqiVpzI/m/Pcbrzov-HKYJ", "n_sections": 3}, {"thread": "kOOLjuaCjeI", "msg": "n7nY6K7jSx8J", "author": "David Hopwood", "date_disp": "Jun 12, 1996, 3:00:00\u202fAM", "subject": "UK Government to Licence Encryption", "body_html": "
In article <BZVOACAm...@reporters.net>,

T Bruce Tober <octob...@reporters.net> wrote:
>In article <96061123...@election.demon.co.uk>, David Boothroyd
><da...@election.demon.co.uk> writes
>>
>>The UK Government today published a paper on the provision of encryption
>>services, which proposes to introduce licensing of 'Trusted Third Parties'
>>(TTPs) to provide encryption services.
>>The DTI press release and paper will be available through the internet
>>via http://www.coi.gov.uk/coi/depts/. The paper is also available through
>>the DTI Commercial IT Security Unit (tel. 0171 215 1399 or fax 0171 931
>>7194). Public enquiries may be directed to the DTI at 0171 215 5000.
>
>More specifically it's at http://www.coi.gov.uk/coi/depts/GTI/coi9303bi.
>ok

That's http://www.coi.gov.uk/coi/depts/GTI/coi9303b.ok
(no i).

David Hopwood
david....@lmh.ox.ac.uk
http://ferret.lmh.ox.ac.uk/~david/

", "url": "https://groups.google.com/g/sci.crypt/c/kOOLjuaCjeI/m/n7nY6K7jSx8J", "n_sections": 100}, {"thread": "kOOLjuaCjeI", "msg": "qC4ZUp0MK04J", "author": "David Hopwood", "date_disp": "Jun 13, 1996, 3:00:00\u202fAM", "subject": "UK Government to Licence Encryption", "body_html": "
In article <96061123...@election.demon.co.uk>,

David Boothroyd <da...@election.demon.co.uk> wrote:
>
>The UK Government today published a paper on the provision of encryption
>services, which proposes to introduce licensing of 'Trusted Third Parties'
>(TTPs) to provide encryption services.
[...]

>
>The government paper envisages organisations with existing customers,
>such as banks, network operators and associations, becoming TTPs. It does
>not intend to regulate the private use of encryption, but will ensure that
>organisations and bodies who want to provide encryption services will be
>licensed.

"does not intend to" - why does that send a chill down my spine?

David Hopwood
david....@lmh.ox.ac.uk

", "url": "https://groups.google.com/g/sci.crypt/c/kOOLjuaCjeI/m/qC4ZUp0MK04J", "n_sections": 100}, {"thread": "vprvQjT4dPM", "msg": "Z5WDIn_tOFsJ", "author": "David Hopwood", "date_disp": "Jun 20, 1996, 3:00:00\u202fAM", "subject": "The slippery slope (was Re: New British Crypto Policy)", "body_html": "

In article <Dt7ot...@world.std.com>, Will Ware <ww...@world.std.com> wrote:
>Along with most posters to this thread, I'm concerned that the recent UK govt
>announcement about trusted third parties and voluntary key escrow is the
>beginning of a slippery slope that will probably end in the unescrowed crypto
>by British citizens within the UK (and eventually by U.S. citizens within
>the US). But I'm having trouble seeing one part of it. Ideally the UK and
>US govts would like the slippery slope to be as smooth and continuous as
>possible, but it seems to me there's a necessary discontinuity, at precisely
>the point that govt force comes into the picture.
>
>Eventually they have to outlaw private crypto.

No, they're cleverer than that. The goal is not to ban private strong crypto,
but to make sure that sufficiently few people use it that they can be detected,
and traffic analysis used on them.

When people say that civil disobedience will be sufficient to prevent this,
they are missing at least part of the point. The government also wants to be
able to tap business transactions.

They may well get away with this, since respected businesses are hardly going
to use the latest shareware stego algorithm, whether their IS managers believe
in it or not. The easiest option, i.e. the default, is to use whatever the
government says, especially if there is no alternative interoperable standard.

(This is the same principle that stops Netscape using strong encryption in its
export products, even though individuals can easily break the export laws and
not get caught).

I think there is also a deliberate attempt to implicitly threaten the worst
case scenario (legally enforced key escrow), with the intention that when it
is _not_ enforced, everyone (well, some people) will heave a sigh of relief,
and carry on using their 'voluntary' TTPs. They'll do this because TTPs are
built into the most widely used standards, not because they actually agree with
escrow. (Of course this is just as insecure as anything else, if the 'T'TPs
are not really trusted).

The talk about terrorists, etc. is concious doublespeak; the government knows
that they will not use escrow. Some people will believe it, some won't, but
it doesn't do any harm to wave this argument from a government's point of view.

Am I paranoid? No...

David Hopwood
david....@lmh.ox.ac.uk

", "url": "https://groups.google.com/g/sci.crypt/c/vprvQjT4dPM/m/Z5WDIn_tOFsJ", "n_sections": 59}, {"thread": "-JaJ5je6xu8", "msg": "OwoZJ5xNGKIJ", "author": "David Hopwood", "date_disp": "Jan 22, 1997, 3:00:00\u202fAM", "subject": "Top-level CA (was: Verisign/Authenticode) security weakness?", "body_html": "
In message <1997Jan21.101253.1@eisner>
kilg...@eisner.decus.org (Larry Kilgallen) writes:

> In article <VA.00000083.00e1989d@p00247>, Matt Stupple
<matt.s...@reuters.com> writes:

> > "The Certification Authority's pubic key might be the target of an
> > extensive factoring attack. For this reason, CAs should use very long
> > keys ... [and] change keys regularly. Top-level CAs [such as VeriSign]
> > are exceptions: it may not be practical for them to change keys
> > frequently because the key may be written into software used by a large
> > number of verifiers."
> >
> > Now, is this not a relatively sizeable security hole. Given enough
> > time and resources I can factor VeriSigns public key and then proceed
> > to issue certificates and sign applets (or anything else for that
> > matter) which when downloaded will appear to have been authorised by
> > VeriSign....

> The general technique is to choose a key sufficiently long enough
> that the "enough time" required exceeds your lifetime, the lifetime
> of the universe, or some other large number. In practice, it need
> only exceed the useful lifetime of the data being secured.

That isn't the only issue, though - what if the key is compromized by an
insider at Verisign, or a security break-in, or poor key management? I've
always thought that having heavily relied-upon root keys, no matter how
difficult they are to break computationally, is a particularly bad idea.

I would hope that a root key is held in some black box device that doesn't
allow it to be easily copied (even by an insider), but it still seems to
be a considerable risk.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/-JaJ5je6xu8/m/OwoZJ5xNGKIJ", "n_sections": 3}, {"thread": "0dxqnQ6g6ic", "msg": "7ND3pFdHMMwJ", "author": "David Hopwood", "date_disp": "Feb 12, 1997, 3:00:00\u202fAM", "subject": "Decrease in \"randomness\" through hashing?", "body_html": "
In message <01bc1845$6b93a720$2864370a@janeway>
"Bill Wade" <bill...@stoner.com> writes:

> Let us suppose that the SHA has a few cycles of length 1 (there exist a few
> x s.t. SHA(x) == x) and that all initial sequences eventually lead to one
> of those few cycles (there aren't any big cycles). If so, repeatedly using
> SHA causes loss of information, eventually collapsing into one of the few
> 'final' results.

> If SHA is anywhere near as random as I think it is then my supposition is
> wrong. [...]

If we only consider 0 <= x < 2^128, and if SHA can be modelled as a random
function, we would expect

p(SHA(x) != x for all x) = ((z-1)/z)^z
where z = 2^128

2^128 is pretty large, and I think I'm correct in saying that

limit of ((z-1)/z)^z as z -> +infinity = 1/e

which means the probability that there are no cycles of length 1 would be
roughly 1/e, or 0.368, under the assumption of randomness. The expected number
of cycles of length 1 is 1.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/0dxqnQ6g6ic/m/7ND3pFdHMMwJ", "n_sections": 1}, {"thread": "38mLMNGw8VY", "msg": "YnlooVimRMAJ", "author": "David Hopwood", "date_disp": "Jan 29, 1997, 3:00:00\u202fAM", "subject": "When Can a One-Time Pad be Broken? (wildly off-topic)", "body_html": "
In message <5cpj2u$2...@gannett.math.niu.edu>
c...@baker.math.niu.edu (Xcott Craver) writes:

> I understand what you're saying, but I should point out
> (before a nit-picking flamewar erupts)

Oh, but Usenet was built for nit-picking.

> that you can generate uniformly
> distributed random numbers from 1..26 with a 6-sided die, as long as
> the 6-sider itself is fair. [...]
> The process is not guaranteed to terminate, but probabilistically
> it does quickly. [...]

> There was an associated puzzle posted to rec.puzzles && sci.math
> a bit ago: you have a 12-sided die (a regular dodecahedron, with
> labeled faces, in case you're wondering what one looks like) and a
> 10-sided die (Like a 12-sider, but... well, I'll spare you the details).
> Can you simulate the 10-sider with the 12-sider in a fixed FINITE number
> N of rolls (i.e., using at most N rolls)? I can do it in 1. No special
> gimmicks or tools allowed, other than you, the die, and a flat rolling
> surface.

Are you sure you stated the problem correctly? I claim it isn't possible
(assuming unbiased dice, and assuming we can't just make up unbiased
random numbers).

Proof: Without loss of generality, assume that exactly N rolls are made.
The problem is then splitting the probability space of 12^N alternatives
into 10 exactly equal parts - which is equivalent to finding an integer
N > 0, for which 12^N = 0 (mod 10).

However, there is no such N - doing all arithmetic mod 10, we just consider
what happens to the last digit when repeatedly multiplying by 12:

<pre>
2 * 2 = 4 (mod 10) <-.
4 * 2 = 8 " |
8 * 2 = 6 " |
6 * 2 = 2 " ------'
</pre>

In other words, the last digit of any power of 12 (except 12^0) is either
2, 4, 6, or 8, so none of them are divisible by 10.

I.e., it isn't possible to simulate a fair 10-sided die using a fair
12-sided die, in a fixed maximum number of rolls, in such a way that you
get an _exactly_ uniform distribution (obviously, you can get arbitrarily
close to uniform).

The same applies for simulating a 26-sided die using a 6-sided one in a
fixed maximum number of rolls:

<pre>
6 * 6 = 10 (mod 26) <-.
10 * 6 = 8 " |
8 * 6 = 22 " |
22 * 6 = 2 " |
2 * 6 = 12 " |
12 * 6 = 20 " |
20 * 6 = 16 " |
16 * 6 = 18 " |
18 * 6 = 4 " |
4 * 6 = 24 " |
24 * 6 = 14 " |
14 * 6 = 6 " ------'
</pre>

For the purpose of the original OTP question, this is no problem, of course;
just increase the size of the alphabet (still doing addition mod the alphabet
size), and ignore the fact that some symbols aren't used.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/38mLMNGw8VY/m/YnlooVimRMAJ", "n_sections": 2}, {"thread": "3g8DnnEkv5A", "msg": "a26mLrwfjiMJ", "author": "David Hopwood", "date_disp": "Mar 18, 1997, 3:00:00\u202fAM", "subject": "removing need for rng in signatures", "body_html": "
In message <3330d8bc...@news.dial.pipex.com>
george....@dial.pipex.com (George Barwood) writes:

> On 19 Mar 1997 15:02:05 GMT, jw...@ecs.soton.ac.uk (John Wigley) wrote:
[...]
> >1)Hash the message to be signed as usual and use that as the message in
> >the signature algorithm.
> >2)hash the private key using the chaining variable state left by the
> >previous hash, and use that as the random number.
> >
> >This ensures that you use a unique apparently random number for each
> >signature, except when you resign the same message when it doesn't matter.
> >You also don't have to keep any random state in the system which can be of
> >benefit to both software and hardware, and you don't need any external
> >sources of variables i.e. system date / time / key timings etc.

> It seems sensible and efficient to me, and I believe secure (provided
> the hash function used is secure). I have posted before here on this
> subject, with no response. I have not seen it described elsewhere,
> although the IEEE P1363 draft now hints at it.

It means that it's essential that the hash function be collision-free.
Normally, if a hash function used for a signature algorithm is one-way
but not collision-free, an attacker can find two messages with the same
hash, and ask you to sign one of them. The same signature will work for
the other message, which is bad, but only allows a single forgery.

However, if you use this scheme for DSA, a similar attack might allow
someone to get the private key (because they would have two messages
signed using the same random number) [*]. That means the output of the
hash function had better be long enough to prevent a birthday attack, or
else each message that is signed must contain some random bits (which
rather defeats the purpose of avoiding an RNG).

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

[*] According to Applied Cryptography 2nd ed. page 492, which references
G.J. Simmons, "The Subliminal Channels of the U.S. Digital Signature
Algorithm (DSA)", Proceedings of the Third Symposium on State and Progress
of Research in Cryptography, Rome: Fondazone Ugo Bordoni, 1993, pp 35-54.

", "url": "https://groups.google.com/g/sci.crypt/c/3g8DnnEkv5A/m/a26mLrwfjiMJ", "n_sections": 11}, {"thread": "3zmFQSgSuC4", "msg": "xMa6Z3YQelkJ", "author": "David Hopwood", "date_disp": "Mar 18, 1997, 3:00:00\u202fAM", "subject": "Good client-server secure protocol?????", "body_html": "
In message <slrn5j2kt...@sol4.ebi.ac.uk>
m...@sol4.ebi.ac.uk (Mark Wooding) writes:

> Tom L. Tran <to...@metainfo.com> wrote:

> > I'm looking for a secure client-server key exchange protocol, which does

> > not use "patent" public-key, using password as initial secret key. [...]

> I'll have a quick stab at defining a protocol. Please embarass me by
> pointing out its weaknesses.

> Alice wants to log into a server, which knows her (hashed) password P.

> 1. Alice sends the server her name.

> 2. The server finds P, generates a key K_S, and sends Alice E_P(K_S).

> 3. Alice decrypts the key with her password, generates a key K_A, and
> sends the server E_{K_S}(K_A).

> 4. Both sides calculate a hash of K_A and K_S, and use the result as
> an encryption key for subsequent communication.

> 5. The two sides perform some kind of exchange of random numbers to
> ensure that they've got the same key. Maybe the server sends
> E_K(R_S), Alice responds with E_K(R_S + 1, R_A) and the server
> replies with E_K(R_A + 1).

> Someone who doesn't know P has a real problem, because they can't
> decrypt E_P(K_S) and the rest is a mystery. Even if you somehow break
> the encryption on the subsequent communication, I think you've got to
> reverse the hash to get any known plaintext for testing the password.

This seems to be resistant to replay and man-in-the-middle; the most
effective attack I can find is the following off-line password guessing
attack:

record steps 1 to 5 in a session between Alice and Bob.
for each likely password 'guess' {
set P to the hash of guess
set K_S = D_P(value from step 2)
set K_A = D_{K_S}(value from step 3)
find K from K_S and K_A
decrypt the messages from step 5 to check whether they are
consistent; if so, guess is the correct password.
}

I can't immediately think of any way to prevent that using only secret-key
cryptography (and hash functions). It may be impossible; an attacker can
always record a session, and then step through both sides of the protocol
for each possible value of the shared secret - can anyone confirm this or
find a counterexample?

You can try to make testing each guess more expensive, but there's a
limit to how secure that can be against an attacker with more computing
resources (or more time available) than Alice or Bob. The same problem
normally doesn't arise in protocols where public-key cryptography is
available, because it isn't necessary to have an initial shared secret,
and you can introduce steps into the protocol where an eavesdropper will
have less information than either Alice or Bob.

In any case, this means that P shouldn't be the hash of a simple password;
at the very least an arbitrary-length passphrase should be used. Note that
an attacker only needs the hash, not necessarily the password or passphrase
itself.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/3zmFQSgSuC4/m/xMa6Z3YQelkJ", "n_sections": 12}, {"thread": "3zmFQSgSuC4", "msg": "PmXDanl7fycJ", "author": "David Hopwood", "date_disp": "Mar 19, 1997, 3:00:00\u202fAM", "subject": "Good client-server secure protocol?????", "body_html": "
In message <slrn5j4qt...@sol4.ebi.ac.uk>
m...@sol4.ebi.ac.uk (Mark Wooding) writes:
[...]
> 1. Alice sends her name to the server.
> 2. Server replies with a randomly generated R_S.
> 3. Alice sends the server a randomly generated R_A.
> 4. Both sides calculate K = H(R_A, R_S, P) and use it as a session
> key.
> 5. The two sides ensure that they have the same key. Alice sends
> E_K(H(R_S, P)) and the server replies with E_K(H(R_A, P)).

> As far as I can tell, this has all the desirable properties of the
> previous version, and it's slightly simpler. The final stage provides
> less useful known plaintext for an attacker seeking to discover K, too
> -- I think that he now needs to run a known plaintext attack against the
> symmetric cipher for every password guess, unless he finds something
> simpler later on in the communication.

Well, for general-purpose protocols it's usually assumed that an
attacker _will_
have some known plaintext from later in the session.

In any case, here's an off-line password guessing attack that doesn't require
known plaintext. [The three password-guessing attacks by me and Lewis McCarthy
against protocols in this thread, and against the protocol described earlier by
Tom Tran in comp.lang.java.security, all use basically the same idea. I think
it will work against any protocol that uses a password to derive a
shared secret,
and only secret-key crypto.]

record a session between Alice and Bob
set R_S and R_A to the recorded values


for each likely password 'guess' {

set P = hash of guess
set K = H(R_A, R_S, P)
check whether the messages sent in step 5 are consistent, i.e.
D_K(1st message) = H(R_S, P) and D_K(2nd message) = H(R_A, P)


if so, 'guess' is the correct password.
}

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/3zmFQSgSuC4/m/PmXDanl7fycJ", "n_sections": 12}, {"thread": "7uA1y4DZe_U", "msg": "RUSqFVXE6EQJ", "author": "David Hopwood", "date_disp": "Jan 30, 1997, 3:00:00\u202fAM", "subject": "Generating Random Text and Identifying It...", "body_html": "
In message <32F006...@ix.netcom.com>

"Bryan G. Olson" <bgo...@ix.netcom.com> writes:

> That depends what problem you are trying to solve. Given an
> English/stego-ish distinguisher, I think we can construct a
> generator which would beat it. But given a stego-ish generator,
> we can also construct the distinguisher. If I'm right
> then the widely distributed stego programs all fall easily,
> partly because they're widely distributed.

> The state of the art in stegonography can't beat a known-generator
> attack.

It can, at least if you don't restrict the discussion just to text-
stego. For example, a covert channel in, say, a signature algorithm
is a special case of steganography. It can be made as hard to _detect_
as it is to break the algorithm being used to encrypt the hidden data.

The idea is that signed messages have some redundant information that
is genuinely random (because some of the parameters to the algorithm
are random, and they appear unchanged in the output). So, you can
choose the parameters based on the encrypted message that you want to
hide. The bandwidth is relatively low, but you could always use more
than one message.

Providing that the encryption algorithm you're using produces uniformly-
distributed output, no-one will be able to either detect or read the
hidden message without either breaking the algorithm, or knowing the key.

If you are talking only about text messages, then yes, it is difficult to
guarantee that steganography can't be detected, because you can't identify
very rigorously where the redundancy lies in text. However, covert
channels are a case where there is a _guaranteed_ amount of redundancy
that can be exploited, and graphics are another where you can probably
get away with it.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/7uA1y4DZe_U/m/RUSqFVXE6EQJ", "n_sections": 4}, {"thread": "Ct6daD0TtOw", "msg": "A4fVbz2nrtQJ", "author": "David Hopwood", "date_disp": "Feb 12, 1997, 3:00:00\u202fAM", "subject": "48-bit RC5 cracked--more info", "body_html": "
In message <5dt7g5$f...@tools.bbnplanet.com>
bar...@tools.bbnplanet.com (Barry Margolin) writes:

> Even with the 40-bit key having been cracked in 3.5 hours, I'm not too
> worried (yet) about sending my credit card numbers over the Internet using

> SSL. If we increase key sizes by 1 bit (and therefore doubling the
> cracking work) every year we should stay ahead of Moore's Law -- I believe
> it says that computing power doubles about every 1.2 years. If we increase
> key sizes by 2 bits/year we'll gain a big lead (we can then stop and catch
> our breath occasionally -- just don't forget what happened to the hare when
> he was racing the tortoise).

Alternatively, we can go to 128-bit keys now and eliminate the problem (*).
The only reasons for not doing that are political, not technical - the
performance of 128-bit encryption is perfectly adequate for most, if not
all applications, and it is no more difficult to implement.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

(*) almost; you still have to worry about cryptanalytic attacks that reduce
the size of the keyspace that needs to be brute-forced.

", "url": "https://groups.google.com/g/sci.crypt/c/Ct6daD0TtOw/m/A4fVbz2nrtQJ", "n_sections": 62}, {"thread": "Ng1mgVhBkxk", "msg": "qptYpD18PHEJ", "author": "David Hopwood", "date_disp": "Feb 9, 1997, 3:00:00\u202fAM", "subject": "Are these violation of US ITAR restriction ? ( More questions )", "body_html": "
In message <3304280f...@news.loxinfo.co.th>
kra...@my.email.address (krakan) writes:

> On Sat, 08 Feb 1997 19:37:48 +0100, Marcio Henrique Leiner
> <mar...@prz.tu-berlin.de> wrote:

> >Preston Wilson wrote:
> >> >5-) I'm [a] USA-citizen and live in [the] USA. I ... download
> >> >[a] crypto engine, and one part or all [of it] need[s] to go out
> >> >from the USA, because the Net's conection [had a] problem and my
> >> >point-to-point network protocol made [a] path with [a] few node[s]
> >> >in Mexico (e.g.).
> >> >Is that one [of] ITAR's violations?

Who knows? In practice, you can probably safely assume that you won't
be prosecuted for this.

> >> I'm not sure I understand the question. I'll assume you're
> >> asking if a U.S. citizen can download from outside of the U.S..
> >> That's not in violation of ITAR; U.S. citizens can download from
> >> anywhere. They can't upload to a foreign site, nor can a
> >> foreign individual download from an American site (as far as
> >> crypto is concerned).

If I understand the situation correctly, that's not quite true. It is
illegal under US law for a US citizen to make crypto software available
for download, without a license.

However, it isn't illegal under (for example) UK law for a UK citizen
to actually _download_ the program. US law doesn't apply to the UK
citizen, assuming they aren't on US soil at the time. This probably
applies to most countries, at least those outside NAFTA that don't have
restrictions on the use of cryptography.

Take another example: there is a hypothetical US company Microscape, who
want to export software covered by the regulations. Microscape applies for
and gets an export license, based on it doing filtering of the client's
domain when they try to download, and requiring users to agree to a license
agreement which prohibits using the software outside the US. As a foreign
citizen on non-US soil, I manage to bypass the filtering, and download the
software anyway.

Now I have broken a law (I've breached the license agreement), but as far
as I can see, this is a civil offence against Microscape, not a criminal one.
Microscape needn't take me to court, and they can only be held responsible
if it is proven that they colluded with me to export the software against
the export regulations.

Disclaimer: IANAL.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/Ng1mgVhBkxk/m/qptYpD18PHEJ", "n_sections": 24}, {"thread": "QQiyqsaoXco", "msg": "DlzEP4x_e_wJ", "author": "David Hopwood", "date_disp": "Mar 18, 1997, 3:00:00\u202fAM", "subject": "Patent law (was Re: \"Experts slam PGP encryption\")", "body_html": "
In message <5greiq$a...@sun001.spd.dsccc.com>
jmcc...@sun1307.spd.dsccc.com (Mike McCarty) writes:

> In article <332FAC...@sternlight.com>,
> David Sternlight <da...@sternlight.com> wrote:
> )Robert I. Eachus wrote:
> )> Of course this dance takes almost a year, and the final
> )> cross-licensing agreement weighs three pounds, but that is how it is
> )> done. The original patent holder CAN'T use his patent to deny
> )> improvements to the public--see the Constitution.
> )
> )That's flat wrong. He has a monopoly according to the Constitution and
> )the Constitution says nothing about the licensing terms. Taking the
> )Constitution literally, one can refuse to license anyone, and make the
> )patented object only oneself. That's what a monopoly means.

> Not true. The purpose of a patent is to -disclose- new inventions, thus
> -allowing- people to find out how to make and use them, while still
> providing economic incentive to the inventor.

While that was the original purpose of patents, current patent law (and
also its implementation) is IMHO very broken. The patent term has not
changed to take into account an increased rate of invention, or (in
some fields more than others) a decrease in the useful lifetime of ideas.
Arguably a 17 to 20 year monopoly for the original inventor now impedes
progress more than it encourages it.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/QQiyqsaoXco/m/DlzEP4x_e_wJ", "n_sections": 9}, {"thread": "R3SD7PP6zvU", "msg": "PEfGB8bAs6cJ", "author": "David Hopwood", "date_disp": "Feb 8, 1997, 3:00:00\u202fAM", "subject": "Simple secure connection establishment protocol", "body_html": "
In message <5dhom4$hf2$1...@scream.auckland.ac.nz>
pgu...@cs.auckland.ac.nz (Peter Gutmann) writes:
[...]

> Setup/Update Negotiation
>
> It is assumed that the client obtains a copy of the client software
and initial
> set of server keys through some out-of-band mechanism such as being
mailed the
> software on disk or CDROM or (less satisfactorily) obtaining it
from a trusted
> distribution site. In any case the client is assumed to start with a genuine
> copy of the client software and an initial set of server keys.
>
> When the server receives the initial connect request, it responds with the
> following information:
>
> Step1: Server -> Client:
>
> Sign:
> Last server update time
> Current server time
> Server cookie
> Server information (preferred algorithms, key size, etc)
[...]

> Step 2: Client -> Server:
>
> Last client update time
> Server cookie
> Client cookie: Hash of previous fields

Trivial point here: since the client cookie can be calculated from
the other two
fields, there's no need to send it over the wire.

> Once the server receives the clients update request message, it replies with:
>
> Step 3: Server -> Client:
>
> Sign:
> Server cookie
> Client cookie
> Update information

[lots snipped - looks OK on first reading]

> Once all revocations and updates are created, they are transmitted to the
> client who then uses them to update their own information.

Yes, I like this protocol, and I can't immediately see anything wrong with it.
Does anyone know of other comparably simple protocols that allow updating
server keys without the use of client public keys?

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk


", "url": "https://groups.google.com/g/sci.crypt/c/R3SD7PP6zvU/m/PEfGB8bAs6cJ", "n_sections": 2}, {"thread": "WbNOp57dEME", "msg": "1cpena1yXb8J", "author": "David Hopwood", "date_disp": "Feb 8, 1997, 3:00:00\u202fAM", "subject": "Applied Cryptography", "body_html": "
In message <01bc1621$dbd17380$8e12...@IBM.IBM.NET>
"Isaac Rubinstein" <is...@royal.net> writes:

> LAST PAGE OF THE BOOK:

> The MS_DOS disks are available from the author, and will be updated twice a
> year. Cost is $40 for a set, and $120 for a two-year subscription.
> [address snipped]
> This should be enough to enable you to put your fingers on the disks.

For those of us international terrorists, drug-dealers, and researchers who
find getting crypto code from the US slightly inconvenient, I suggest doing
an Infoseek search for "Applied Cryptography source code", which turned up
this:

http://www.fou.telenor.no/brukere/oyvind/applied_cryptography.html

> It would sure make me sad to see anyone get his hands on the great
stuff Bruce
> made available, without letting him enjoy a small fee.

You can always download it and then send Bruce the money anyway, of course.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/WbNOp57dEME/m/1cpena1yXb8J", "n_sections": 15}, {"thread": "YO_WqbHTRhk", "msg": "f9-HstPv8zsJ", "author": "David Hopwood", "date_disp": "Feb 1, 1997, 3:00:00\u202fAM", "subject": "When Can a One-Time Pad be Broken? (wildly off-topic)", "body_html": "
In message <5d114m$c...@gannett.math.niu.edu>
c...@baker.math.niu.edu (Xcott Craver) writes:

> David Hopwood <hop...@zetnet.co.uk> wrote:
> >I.e., it isn't possible to simulate a fair 10-sided die using a fair
> >12-sided die, in a fixed maximum number of rolls, in such a way that you
> >get an _exactly_ uniform distribution (obviously, you can get arbitrarily
> >close to uniform).

> Think about what is physically happening when you roll the die.

Ah, got it. (I was oversimplifying before, by assuming that a die is a black
box where you can only observe the final result).

Look at the last two faces the die rests on. They will be adjacent, so there
are 12*5 = 60 possibilities, which is divisible by 10.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/YO_WqbHTRhk/m/f9-HstPv8zsJ", "n_sections": 1}, {"thread": "Z63Eo6zj4iQ", "msg": "JIGtW9ns8XgJ", "author": "David Hopwood", "date_disp": "Mar 31, 1997, 3:00:00\u202fAM", "subject": "Q: Brute-Force Attack: How do you know when you've succeeded?", "body_html": "
In message <3335DB...@frontiernet.net>
Frank Montmarquet <mo...@frontiernet.net> writes:

> Bob Silverman wrote:
> >
> > "Robert Kaufman" <rkau...@mail.idt.net> wrote:
> >
> > >While reading Bruce Schneier's book, I was wondering: given that you're
> > >going to try every possible key until you succeed, how do you _know_ when
> > >you've stumbled upon the correct key?
> >
> > You either get a match with some fragment of known plaintext, or the result
> > yields readable English (or language being used).

> And if the paintext is, or has been preprocessed to appear as random
> bytes, then a Brute-Force attack is impossable, right?

> I recall reading a recent paper about a plain text recongnizer for
> brute-force attacks. It needed several blocks of data and worked for most
> data types including programs. It did not work with compressed data, and

> compressed data is not random.

Then probably
- it was doing some nonobvious cryptanalytic attack, not a straightforward
brute-force attack, or
- it was a demonstration program not intended for use in real attacks, or
- it wasn't very good.

Assuming the decompression algorithm is known, this will work:

for each possible key K {
decrypt the ciphertext using K
decompress the result
if the decompressed data contains recognisable plaintext, K is the key.
}

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/Z63Eo6zj4iQ/m/JIGtW9ns8XgJ", "n_sections": 29}, {"thread": "_iwU2g2lJco", "msg": "Kw5w_YN_2EoJ", "author": "David Hopwood", "date_disp": "Jan 27, 1997, 3:00:00\u202fAM", "subject": "Are there any encryption algorithms that are already legal for export?", "body_html": "
In message <01bc0c8b$eb4e5ca0$ca61...@DCorbit.solutionsiq.com>
"Dann Corbit" <dco...@solutionsiq.com> writes:

> I know this is related to a FAQ. It says that encryption algorithms must
> be approved by the state department. My related question (which I could
> not find a direct answer to) is, "Are there any encryption algorithms that
> have ALREADY been approved for export?" For example, are simple algorithms
> like 3-way legal?

Algorithms that can be cracked using brute force in 2^40 operations or less
are usually exportable.

However, if you want real security, why not include a simple HTTP or FTP
client in the program (or its setup routine), get it to download a .dll or
.so library implementing the algorithm from a non-US web site, and check
that the library's SHA and/or MD5 hash is as expected. Then no crypto
algorithm will have been exported from the US.

Of course, certain organizations will not _like_ you doing this, but is there
anything they can do about it?

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/_iwU2g2lJco/m/Kw5w_YN_2EoJ", "n_sections": 13}, {"thread": "oQ2mR8JC6Pg", "msg": "5AIyzHMDNF8J", "author": "David Hopwood", "date_disp": "Feb 18, 1997, 3:00:00\u202fAM", "subject": "Alternatives to Diffie-Hellman with DSS using RSA", "body_html": "
In message <32FF56...@sm.luth.se>
Lars Nilsson <d91...@sm.luth.se> writes:

> My RSA protocol would look like this:
> Alice picks a random number (key).
> Alice encrypts the key using Bob's public key.
> Alice signs the encrypted key with her private key.

> By doing the encryption and signing in this order she makes it
> impossible for Bob to use the key later and impersonating Alice.

There's a replay attack: Eve can intercept Alice's message, and use it
later to make a connection with the same session key. That means that

a) Eve can do off-line attacks on the session key.
b) Eve can repeat the whole session (and depending on the rest of the
protocol, possibly selected parts of it in a different order).

b) is particularly nasty for any protocols that have permanent side-effects,
rather than just being used to exchange information (for example payment
protocols). Using Diffie-Hellman ensures that session keys will not be
reused.

(There are more complicated ways of using RSA that prevent replay attacks,
but they're probably slower than DH).

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/oQ2mR8JC6Pg/m/5AIyzHMDNF8J", "n_sections": 4}, {"thread": "-f2B-gkr--o", "msg": "Pak1a8PyVdoJ", "author": "David Hopwood", "date_disp": "Apr 25, 1997, 3:00:00\u202fAM", "subject": "java.security.SeedGenerator (was Re: DieHard / Random Number Analysis)", "body_html": "
geof...@jcp.co.uk wrote:
> One of the generators I'm evaluating is the Java [java.security].SecureRandom

The source code (with comments) for the seed generation routine is in the
file java/security/SeedGenerator.java, from the src.zip file that comes with
the JDK.

One of the things that struck me about it was that it is a little slow for
what it does (enough to be annoying in practice); you could get comparably
secure random numbers using faster techniques. I also don't like the fact
that it relies on only one method of obtaining randomness. The output of
several different methods stirred using a hash function (see Applied
Cryptography 2nd ed. section 17.14, or the PGP source code for examples of
how to implement this) would give me a warmer, fuzzier feeling.

If you want to write your own seed generator for Java, remember that getting
unpredictable information is possibly more difficult when untrusted code
is running in the same VM, than it would be for a stand-alone application
(for example, untrusted applets also have access to mouse position and
keypresses).

RFC 1750 (if I remember correctly) is an excellent source of information
about generating random seeds.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/-f2B-gkr--o/m/Pak1a8PyVdoJ", "n_sections": 2}, {"thread": "-fOockRCaO4", "msg": "_1ZOutlX3GoJ", "author": "David Hopwood", "date_disp": "May 14, 1997, 3:00:00\u202fAM", "subject": "Possible failing of Scott*", "body_html": "
In message <5l9v2f$7...@news.ysu.edu>
an...@yfn.ysu.edu (David A. Scott) writes:

> In a previous article, dfor...@st.nepean.uws.edu.au (? the
platypus {aka David Formosa}) says:

> >On Mon, 12 May 1997, "David Scott" <dsc...@ridgecrest.ca.us>
> >
> >> ? the Platypus {aka David Formosa}
<dfor...@st.nepean.uws.edu.au> wrote in article
> >> <Pine.LNX.3.93.970510192751.468C-100000@shirley>...
> >
> >> > If you have two decryption tables D D' one which is correct and a
> >> > table that is similar but has a few different enters. Now if we are
> >> > lucky when using D' to decrypt the cyrptotext we will not need
to use the
> >> > entries that are incorrect.
> >>
> >> The problem is how do you get D' in the first place.
> >
> >You guess it, the whole problem with this is that it makes searching the
> >keyspace easyer. When your talking about the size of of the keyspace you
> >will have to warn users about this when you bost about the keysize.
>
> I think you are confused guess a D' correctely is like guess the key
> correctly. This key is so large you might as well try guessing a
> key to something that was encrypted with IDEA you would have a better chance

You missed his point. Consider a 6-byte file encrypted with Scott16 using 17
rounds. At most 3*3*17 of the key entries will be used (because there are
three lookups for each of the three words in each round); that makes the
effective key length log2(65535! / (65535-3*3*17)!) = just under 2448 bits
at most (for that file), not 900,000.

Another potential problem is the simplistic method of generating a key from
a passphrase, which if I'm correct allows you to find parts of the
substitution table by guessing parts of the passphrase (rather than having
to know the full passphrase, as would be the case if it were hashed).

> >The question the NSA or some other athorty will ask is "Why are you
> >sending meaningless ascii to each outher?"

I have only one thing to say to that:
296132950429725290565851556969237434577916012985.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk


", "url": "https://groups.google.com/g/sci.crypt/c/-fOockRCaO4/m/_1ZOutlX3GoJ", "n_sections": 1}, {"thread": "-kOr1JHDbJA", "msg": "_dCkbphPPxQJ", "author": "David Hopwood", "date_disp": "May 29, 1997, 3:00:00\u202fAM", "subject": "Solving Shamir's secret sharing scheme", "body_html": "
In message <01bc6b67$350ed7e0$0bcd...@bcouillard.chrysalis-its.com>
"Bruno Couillard" <bcoui...@chrysalis-its.com> writes:

> I've looked through most of the math books I had and
> found numerous references explaining how to solve a set of equations using
> matrix solving algorithms, but all of them where using very simple examples
> and none of them had anything to do with modulo "p" calculations.

As long as you do all scalar arithmetic in the field of integers mod p, the
same algorithms should work.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/-kOr1JHDbJA/m/_dCkbphPPxQJ", "n_sections": 8}, {"thread": "164W3aIZ8F0", "msg": "wSninRy-bX4J", "author": "David Hopwood", "date_disp": "Jun 21, 1997, 3:00:00\u202fAM", "subject": "RSA's DES Crypto Challenge DONE!", "body_html": "
In message <33AADC...@NOSPAMSun.Com>
Michael Sierchio <Michael....@NOSPAMSun.Com> writes:

> IBM's original DES key length was 128 bits.

I believe it was 112 bits of independent key information (with 16 parity bits).

David Hopwood
david....@lmh.ox.ac.uk, hop...@lmh.ox.ac.uk

", "url": "https://groups.google.com/g/sci.crypt/c/164W3aIZ8F0/m/wSninRy-bX4J", "n_sections": 17}, {"thread": "18_wceqcTag", "msg": "T2uHgEQXA5oJ", "author": "David Hopwood", "date_disp": "May 28, 1997, 3:00:00\u202fAM", "subject": "a key exchange problem", "body_html": "
In message <338b6389...@snews.zippo.com>
jwil...@secnet.com (Jonathan Wilkins) writes:

> My company is working on a secure key exchange system.. we have a
> product that does network security auditing. We have many clients
> that purchase licenses from us so that they can do a complete audit on
> a network for their clients. Some of our clients don't wish to reveal
> the identity of the companies that have hired them to do such an
> audit. We do our licensing based on an IP address range.

> We currently use an algorithm (which shall not be named) to transform
> some piece of text that includes the IP address, and some other
> information to generate a key file.

> Basically we need a way to have the client give us an IP address in
> such a way as to limit our ability to know the IP address while
> retaining the secrecy of our key generation system

The problem with the obvious approach (put the address through a one-
way hash function) is that your program could easily send you the
full IP addresses via some covert channel. In order to convince your
clients that the program doesn't have such a covert channel, you would
need to give them source code and have them compile it themselves. But
in that case they can easily remove any license checks.

About the best you can do is have the source for the program looked at
by some independent, widely trusted organisation, and have them certify
that it does only what it says it does.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/18_wceqcTag/m/T2uHgEQXA5oJ", "n_sections": 8}, {"thread": "6chlw_YC22o", "msg": "BGcpY6jLjQAJ", "author": "David Hopwood", "date_disp": "May 22, 1997, 3:00:00\u202fAM", "subject": "Does MD5 really have a weakness?", "body_html": "
", "url": "https://groups.google.com/g/sci.crypt/c/6chlw_YC22o/m/BGcpY6jLjQAJ", "n_sections": 25}, {"thread": "6chlw_YC22o", "msg": "52HGyxXfV_sJ", "author": "David Hopwood", "date_disp": "May 24, 1997, 3:00:00\u202fAM", "subject": "Does MD5 really have a weakness?", "body_html": "
In message <5m1qbq$r...@camel3.mindspring.com>

pa...@wp-lag.mindspring.com (James Pate Williams, Jr.) writes:

> David Hopwood <hop...@zetnet.co.uk> wrote:

> >In message <5lq5ka$od8$1...@nntp.ucs.ubc.ca>
> > un...@physics.ubc.ca (Bill Unruh) writes:

> >> In <5lp6nu$4...@news.ox.ac.uk> pat...@gryphon.psych.ox.ac.uk
> >(Patrick Juola) writes:

> >> >I think you overlook the power of a birthday attack.

> >> >I read the primary threat as not that of someone being able to
> >> >duplicate the existing signature for PGP v7.11, but of being able
> >> >to produce a program for which both a safe and a malicious version
> >> >have identical hashes.

> >> Somewhat impractical. the hash is 128 bits long so a birthday attack
> >> needs at least 2^ 64 attempt and then a search through those 2^64 to find
> >> which two are the same (ie 2^127 or so comparisons).

> >Finding a collision in a 2^64-entry table doesn't take 2^127 comparisons.
> >At most it takes the number of comparisons needed to sort the table, which
> >is O(n log n) for n entries. (If I remember correctly there are also better
> >methods, depending on how much memory you have.)

> Perhaps you were thinking of ultrasort, a sorting method based on


> frequency counting that has worst-case performance of O(n).

I was thinking of a bucket sort, in which the domain of the values
(in this case, the integers from 0 to 2^128-1) is split into regions
called 'buckets', and each value n is put into bucket number
(n div bucket_size). Then each bucket is sorted individually.

The performance depends on the expected number of entries in a bucket,
but usually you choose that to be small, so that (for a uniformly
distributed set of values, which is presumably true for the output of
a hash function) the expected time is proportional to n.

If the bucket size is 1, this is equivalent to ultrasort. However,
ultrasort would be impractical in this case, because it would require
an array of 2^128 frequency counts. I'm guessing that slightly less than
2^64 buckets (say 2^62) would be optimal, because then you would expect
just a few hash values in each bucket.

The problem with a birthday attack on a 128-bit hash function is having
enough random-access memory, not the time needed to find collisions
once all the hashes have been calculated.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/6chlw_YC22o/m/52HGyxXfV_sJ", "n_sections": 25}, {"thread": "9uJb-AYaKqI", "msg": "Qlv_I5sPoUEJ", "author": "David Hopwood", "date_disp": "Jun 24, 1997, 3:00:00\u202fAM", "subject": "Hashing passphrases (was Re: Novell (In)security)", "body_html": "
In message <5okogd$c...@snews1.zippo.com>
hedg...@photobooks.com (James Brokaw) writes:

> David Hopwood (hop...@zetnet.co.uk) wisely posted to sci.crypt:

> >No, I think they should type in the phrase (of any length), and
the computer
> >should hash it for them. Wasn't that obvious from context?

> Erm, not really. One can't always alter the OS to allow different lengths of
> passwords, but its generally pretty easy to alter the passwords
users are allowed
> to use.

The original question was

Chuck Willis <cfwi...@uiuc.edu> wrote:
# [...] I think that people would have a lot easier time
# remembering passphrases rather than passwords. You could still have
# checks to make sure that it isn't anything obvious, but the 8 character
# restriction makes users come up with gibberish that the machine will
# accept and they have to write down. Is there any good way to hash a
# passphrase (which is quite short compared to a email message)? I assume
# there is because PGP uses it.

I took that as meaning from the point of view of someone designing an
authentication system (either for an OS or for some other kind of application),
which is obviously not how other people took it. Note that PGP does use a
cryptographic hash for this purpose (MD5).

In any case, it isn't necessarily difficult to change an OS to accept
arbitrary-
length passphrases. On Unix, for example, if a package to do this was
available,
installing it would be approximately the same amount of work as
installing shadow
passwords.

> The point of the hashes we were describing were to reduce a
passphrase to a valid
> password. The point of a hash like you describe is to prevent
someone with the
> password file from obtaining the passwords.

There's nothing to prevent using a strong cryptographic hash for the first
purpose, or for both purposes simultaneously. The most straightforward way of
implementing both at the same time would simply be to use SHA-1, say, in place
of crypt(3) or equivalent. You might want to iterate the hash function so that
dictionary attacks are more computationally expensive.

However, doing the hash in two stages, i.e. storing

salt, hash2(salt, hash1(passphrase))

in the shadow password file, has some advantages over that: it means that
operating system APIs that assume a password can be represented as a fixed-
length array do not need to be modified. An application which would have
called a function with the password as an argument just uses hash1(passphrase)
instead.

Also, some cryptographic login protocols assume a fixed-length initial
shared secret, rather than a variable-length one.

I'd suggest specifying that passphrases are encoded in UTF8 before they are
hashed (even if it isn't practical to implement Unicode passphrases now, this
makes it easier to do so in the future).

> You should have realized this - if a
> computer used our hash for your purpose, then my passphrase "I
Really Like Taking
> Cold Showers" (hash - IRLTCS) would be useless once anyone obtained
the password
> hash list. "I Really Like Taking Controlof Systems" is equally
valid, from the
> computers point of view, as is "I R L T C S". A computer must
store passwords
> under a strong cryptographic one-way hash - to think that we were
all sugggesting
> that the first letter of each word qualifies as a secure
cryptographic hash is
> not exactly, erm, accurate.

That wasn't my point. I was saying that taking initial letters is a poor hash
for the purpose of crunching a variable-length passphrase to a fixed-length
password, because it loses much of the entropy that was in the original phrase.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/9uJb-AYaKqI/m/Qlv_I5sPoUEJ", "n_sections": 1}, {"thread": "AsffdPLmSkI", "msg": "HeUT3H_W1vIJ", "author": "David Hopwood", "date_disp": "Apr 10, 1997, 3:00:00\u202fAM", "subject": "covert channels in key agreement algorithms", "body_html": "
In message <5i9bbt$5mf$1...@newsd-4.alma.webtv.net>
Peter williams <pet...@webtv.net> writes:
[...]

> The whole area of covert channel avoidance when deploying public key is
> looking scientifcally interesting, not only in math-related procedures
> but also in key management areas, directories and revocation
> procedures..

I think that in practice, preventing covert/subliminal channels is pretty
much impossible. While some "subliminal-free" signature schemes, etc.
exist, it isn't sufficient to avoid channels in only signatures, or
only key-exchange, or whatever: you have to look at every part of the system
(possibly including parts that are not obviously related to cryptography),
because an attacker can try to encode information almost anywhere.

That's a losing battle, and may actually decrease security (avoiding
random padding, for example, eliminates far too many useful protocols
and standards). I would much rather have a very secure algorithm/protocol/
standard that has a covert channel, than a less secure one that does not.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/AsffdPLmSkI/m/HeUT3H_W1vIJ", "n_sections": 8}, {"thread": "CdvXmSezn4A", "msg": "4Z1Hhi9LbyoJ", "author": "David Hopwood", "date_disp": "Apr 23, 1997, 3:00:00\u202fAM", "subject": "OK SCOTT8 CONTEST ON", "body_html": "
In message <5jhd2o$s...@news.ysu.edu>

an...@yfn.ysu.edu (David A. Scott) writes:

> Considering how easy Paul found an attack on the structure
> of the method some one might actually solve this contest in
> a week or less. If you can't get scott8.zip it is just like
> scott16 except 8 bit table has 256 entries instead of
> 65536 entries in scott16 also used only 11 rounds instead of
> 17.

Then clearly it is also crackable using much the same method
that Paul Onion used, but with 257-byte chosen plaintext files
(and Scott24 defined similarly would be crackable with
3*(2^24+1) = 50331651-byte files, although you might need a
machine with >100MB physical memory for that).

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/CdvXmSezn4A/m/4Z1Hhi9LbyoJ", "n_sections": 2}, {"thread": "DGI47vkxYKY", "msg": "o3CAFLdYQfMJ", "author": "David Hopwood", "date_disp": "May 26, 1997, 3:00:00\u202fAM", "subject": "Break of scott16 with two chosen plaintexts", "body_html": "
In message <5mauie$q...@gazette.loc3.tandem.com>
rpa...@loc3.tandem.com (parker_rob) writes:

[description of a possible attack using 65536 chosen plaintexts snipped]

> In any case, this attack seems quite manageable, even when the
> actual value of X for which table[X] = 0 is not known.

> This attack won't work if X = 0, but it should be possible to create a


> simlar attack for a value other than 0.

X can't be 0, because then { 0 } would be a cycle, and 'table' is a
single-cycle permutation.

Note that given the method of creating the table from a passphrase in
David Scott's code, the first two characters of the passphrase can be
used to find the value of X[0]. It would probably be useful to consider
chosen plaintexts that alternate between 0 and likely values of X[0],
based on the passphrase starting with English (or whatever) text.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/DGI47vkxYKY/m/o3CAFLdYQfMJ", "n_sections": 11}, {"thread": "FLbPNUhtEIA", "msg": "h2wpT9g7cZQJ", "author": "David Hopwood", "date_disp": "Apr 22, 1997, 3:00:00\u202fAM", "subject": "Possible cryptanalysis of SCOTT16", "body_html": "

In message <m33esmn...@endjinn.prestel.co.uk>
p...@endjinn.prestel.co.uk (Paul Onions) writes:

[...]


> Now for the interesting bit. If we set the plaintext file to a constant
> word value, that is Mi = c for i = 0...n-1 then we get
> Mn = E(Mn-1 xor M1 xor M0) = E(c)

> Mn+1 = E(Mn xor M2 xor M1) = E(E(c)) = E^2(c)

> ...
> Mn+i = E^(i+1)(c) for i <= n-2

> ...
> M2n-1 = E(M2n-2 + Mn + Mn-1) = E(E^(n-1)(c) + E(c) + c)

> up until now n has been arbitrary, but if set n = 2^16 + 1 then because
> E is single-cycle this gives E^(n-1)(c) = c

> therefore M2n-1 = E^2(c).

Arrgh - I got this far using exactly the same approach, and then gave up
because I couldn't get past two rounds. In fact I'd only made a simple
arithmetic error <sigh>.

I've written about 80% of the code needed to exploit this (in Java), but at
the moment I've got too much other work on to finish it, so if anyone wants
to look at the code, send me an email.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/FLbPNUhtEIA/m/h2wpT9g7cZQJ", "n_sections": 11}, {"thread": "FLbPNUhtEIA", "msg": "HaARHsKbJKYJ", "author": "David Hopwood", "date_disp": "Apr 23, 1997, 3:00:00\u202fAM", "subject": "Possible cryptanalysis of SCOTT16", "body_html": "
In message <01bc4df0$204ae400$519678c7@dscott>
"David Scott" <dsc...@ridgecrest.ca.us> writes:

> At this point I think a fast fix for future release
> is to reaplace the encrytion
> Cn=e[ Cn-1^Cn^Cn+1]

> with
>
> Cn=e[ Cn-1 ^(Cn + Cn-1)]

I haven't fleshed this out yet, but here's something that might be useful
as part of an attack: suppose

e[e[i] ^ (e[i] + e[i])] = e[i]

for some i.

Unless there are some weird correlations going on, I think the probability
of there being no such i for a given key is roughly (65535/65536)^65536 =
approx 1/e (that's the constant e = 2.718..., not the function), so about
63% of keys should have at least one i with this property. OTOH I could well
be talking nonsense, so check this first.

Now suppose you have 65536 chosen plaintexts (of any length), each
containing a different repeated 16-bit value. The above implies that for
about 63% of keys, one or more of these chosen plaintexts will encrypt to
themselves. In each case that gives you one element of the key permutation.

Is this useful to crack the whole permutation? I've no idea, but it is
probably not a property that a secure algorithm should have.

David Hopwood
david....@zetnet.co.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/FLbPNUhtEIA/m/HaARHsKbJKYJ", "n_sections": 11}, {"thread": "O_uU3NiGruk", "msg": "Lb2xrXJ613QJ", "author": "David Hopwood", "date_disp": "Jun 20, 1997, 3:00:00\u202fAM", "subject": "Draft AES Announcement", "body_html": "
In message <ADRIAENA.97...@bthp07.rsd.bel.alcatel.be>
adri...@bthp07.rsd.bel.alcatel.be (Fons Adriaensen) writes:

> In article <5o9o4h$o...@news.ysu.edu> an...@yfn.ysu.edu (David A.
Scott) writes:

> > What the hell is wrong with a straight acsii text file.

> For once I agree with David. The Word 7 format is proprietary AFAIK,
> so in order to be able to submit, you are first forced to by from a
> monopoly.

> Indeed, what is wrong with a plain text file for a simple technical
> proposal ? And even if that is too 'primitive', the whole scientific
> community can read TeX, and print or view Postscript. I see no reason
> why NIST should be different.

Since format converters are readily available, personally I don't see
why NIST can't accept submissions in any of {TeX, HTML, plaintext, Word},
and make them available to others in at least all of
{PostScript, PDF, HTML, plaintext, Word}.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/O_uU3NiGruk/m/Lb2xrXJ613QJ", "n_sections": 1}, {"thread": "OoR2pdirDvU", "msg": "pnPQz92u9YgJ", "author": "David Hopwood", "date_disp": "Apr 14, 1997, 3:00:00\u202fAM", "subject": "A potential attack on David Scott's cipher ?", "body_html": "
In message <5isntr$o...@news.ysu.edu>

an...@yfn.ysu.edu (David A. Scott) writes:

> In a previous article, d...@joseph.cs.berkeley.edu (David Wagner) says:

> >In article <01bc46a5$91499cc0$1a9678c7@dscott>,
> >David Scott <dsc...@ridgecrest.ca.us> wrote:
> >> I have bad news for you since you admit this cipher is really
one huge big
> >> super block. To get these 5 character units that you are talking
about would
> >> require several hundred thousand SEPERATE files exactly 5 characters long
> >> each encoded with same key.
> >
> >Yes, I know.
> >
> >It sounds like you're saying your cipher does not provide security against
> >that sort of attack, and wasn't intended to.
> >
> >Do you agree?
>

> No I don't agree. But you do not know what a chosen plain text attack
> is all about.

You won't get very far in this group by claiming, despite evidence to the
contrary, that posters don't understand basic cryptanalytic attacks.

A chosen plaintext attack with a few million plaintexts would be a significant
weakness that (as far as is publically known) IDEA does not have. A reasonable
response might have been something like:

"OK, I see that small file sizes may be a problem. Consider a slightly
modified version in which the file size is padded to <insert number here>
bytes using random data if necessary (but in fairness, I will continue to
offer the $whatever challenge for the original version)."

> I wrote more from that ridgecrest newsreader if it ever gets
> out here. But what you did was to try to use my minimum file size allowed

> to say you could attack it at that point. First of all I could change my


> program to make files 8 characters long as minimum so that the
> smallest size file is a one IDEA block length.

Fine: so change the program to do that (personally I would pad to 16
characters, not 8), and repost an URL for it. But your original challenge,
which I assume stands, was to attack the algorithm in scott16.zip, and
a chosen plaintext attack is a perfectly reasonable way of attempting to
do so.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/OoR2pdirDvU/m/pnPQz92u9YgJ", "n_sections": 22}, {"thread": "QBPJu0ujFn8", "msg": "1OLOVam94sAJ", "author": "David Hopwood", "date_disp": "Jun 15, 1997, 3:00:00\u202fAM", "subject": "Commonly available computing speeds", "body_html": "
In message <33A1AC...@sternlight.com>
David Sternlight <da...@sternlight.com> writes:

> Andrew Haley wrote:
> >
> > David Sternlight (da...@sternlight.com) wrote:
> >
> > : It's starting to look REALLY bad for 512 keys, and 1024 may be
> > : getting a wee bit shaky (though the factoring time is currently
> > : thought to go up exponentially with key length).
> >
> > The factoring algorithms used against RSA keys are much better than
> > that, with GNFS the best at approximately
> > O(exp((c + o(1)).(ln N)^a.(ln ln N)^(1-a))), where c ~ 1.9 and
> > a = 1/3. As a < 1, this is subexponential.
> >
> > Andrew.

> What follows is a sketch, not a tight argument. Comments and refinements
> are welcomed. Herman Kahn's disclaimer applies--the writer reserves the
> right to expand, amend, withdraw, or attack the following:

> Putting it another way, the key length that can be factored for a fixed
> dollar resource goes up faster than computing power, if computing power
> per dollar increases exponentially with time, yes?

No, under these assumptions the key length that can be factored for a
given monetary resource goes up faster than linearly, but nowhere near as
fast as computing power. Since the algorithms for encryption and decryption
have polynomial complexity, the time needed to perform an encryption or
decryption with a key that provides a given level of security will
decrease, unless there is a _really_ major breakthrough in factoring
(or a way of breaking RSA that does not depend on factoring).

[...]


> The output measures should include something like:
> 1. a notion of the security of the "standard length key of the
> year"--the key length that takes the same time to use in its year as,
> say, a 1024 bit RSA key does today, each on the "standard desktop" of
> its year. Security might be measured in terms of time to factor under
> the above assumptions. If my resoning is correct, this measure of
> security will decrease with the years.

> 2. The time to use (encrypt or decrypt a standard message, or generate a
> key pair) whatever key length provides the same degree of security as,
> say, today's 1024 bit RSA key. If my reasoning is correct, this time
> will increase with the years.

Your reasoning is incorrect in both cases.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/QBPJu0ujFn8/m/1OLOVam94sAJ", "n_sections": 22}, {"thread": "Rp84ZgmNbCo", "msg": "vx32cSYu5IYJ", "author": "David Hopwood", "date_disp": "Apr 29, 1997, 3:00:00\u202fAM", "subject": "Encryption and error-correction", "body_html": "
In message <wtshaw-2704...@207.101.116.68>
wts...@itexas.net (W T Shaw) writes:

> In article <199704271...@zetnet.co.uk>, David Hopwood
> <hop...@zetnet.co.uk> wrote:

> > [...] Given that it is relatively simple to
> > ensure that errors in the ciphertext (both malicious and otherwise) are
> > detected at little cost, there seems to be no advantage in not doing so.
> >
> > In message <wtshaw-2504...@207.101.116.61>
> > wts...@itexas.net (W T Shaw) writes:
> > > Let's say
> > > that the plaintext said something like credit the account with $100,
> > > previous balance was $99.50, new balance will be $199.50. It would take
> > > three rather specific changes to make things *add up* and there could be
> > > more *check sums* aimed just at the important areas in the message.
> >
> > If you CRC everything, it isn't necessary to worry about what needs to
> > be CRC'd, or what you may have missed. It is good for there to be one less
> > thing to worry about.
>
> That's fine given a perfect two-way link with no noise, but such is
> sometimes not the case. It is in the breakdown of perfect communications
> that all-or-nothing crypto fails.

If you have a two-way link with (some reasonable level of) noise, it's not
difficult to construct from that a two-way link without any significant noise.

One-way links are often constructed from a series of two-way links (email
tranfer using SMTP, for example), in which case error correction can be
done in the communications protocol at each stage.

You may have misunderstood what I mean by "CRC everything". That could
involve splitting the message into blocks and including a CRC with each
block, but _all_ blocks should have CRCs. Trying to decide for each message
type which parts are important and which are not is a bad idea, for several
reasons:

- the analysis is specific to that message type; it cannot be used for
unanticipated message types.
- it takes effort to analyse possible failures due to this kind of error
(whether malicious or accidental) that could be better spent elsewhere.
- what if the analysis is wrong? In your example, what about rounding,
multi-currency transactions, etc.?
- you cannot feed an incomplete message into any automated procedure and
expect it to produce a sensible result. Humans may be able to process
incomplete messages; programs in general should not be expected to, and
a large proportion of encrypted messages are processed partly or
completely by programs. (Note also that the protocol designer may not
know that processing will at some point be automated.)

> In the examples, a financial
> transaction is mentioned; in certain parts of the world, communication is
> still done on what we would consider the most obsolete teletype gear. A
> wire transfer under those conditions needs to be handled by hand, perhaps
> even typed in and delivered on paper.

What does this have to do with how error-correction is handled? If the
wire transfer is received incorrectly, it should be re-sent. CRCs are just
as applicable to protocols in which one step of the communication is done
by hand, as they are to entirely computer-based protocols (consider ISBN
numbers and bar-codes, for example). As in other cases, an error in
_any_ part of the message should be detectable.

> Routine problems in these networks
> introduce noise almost sporatically. No, functionality in the real world
> is a killer for many underconsidered bright ideas.

Suppose that you have only unreliable one-way communications, or an
unreliable storage medium where it is necessary to be able to retrieve
incomplete messages. That still does not mean that invariants specific to
particular applications (as in the example of an account having to balance)
should be relied on. It should be possible to analyse the correctness of
the encryption and error-correction independently of the application.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/Rp84ZgmNbCo/m/vx32cSYu5IYJ", "n_sections": 2}, {"thread": "W34_NB-GlhU", "msg": "LI3OC1NMoOsJ", "author": "David Hopwood", "date_disp": "May 22, 1997, 3:00:00\u202fAM", "subject": "List of attacks", "body_html": "
In message <jo7mgu9...@orchard.east-arlington.ma.us>
Bill Sommerfeld <somme...@orchard.east-arlington.ma.us> writes:

> > 1. ciphertext-only attack
> > 2. known-plaintext attack
> > 3. chosen-plaintext attack
> > 4. adaptive-chosen-plaintext attack
> > 5. chosen-ciphertext attack

Also adaptive-chosen-ciphertext.

> > 6. chosen-key attack
> > 7. rubber-hose cryptanalysis

> there are also:

> related-key attacks

> i think these are generally variants of the above..

"related-key" is another (more accurate, IMHO) name for "chosen-key".

There is also "related-plaintext" (e.g. consider the attack on RSA if
you encrypt e(e+1)/2 linearly dependent messages, where e is the public
exponent), and presumably "related-ciphertext".

Any of these can be combined, for example an attack might need n known
and m chosen ciphertext blocks.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/W34_NB-GlhU/m/LI3OC1NMoOsJ", "n_sections": 10}, {"thread": "XaSuw80J3b4", "msg": "ei2fyvSa-6AJ", "author": "David Hopwood", "date_disp": "May 31, 1997, 3:00:00\u202fAM", "subject": "Quicken makes new advances in Cryptography!", "body_html": "
In message <5mm0nt$i6t$1...@falcon.pacit.tas.gov.au>
ro...@police.tas.gov.au (Roger Fleming) writes:

> Footnote: Attack on 3 key 3DES with same work factor as 3DES-2.
> _______________________________________________________________

> Let C = E(k1,E(k2,E(k3,P))). For 2^^56 trial values of k1, form a
sorted table
> of D(k1,C) and D(k1,~C) (work ~ 57*2^^57). (What high speed medium
you use to
> store this rather large table is left as an exercise). For 2^^110
> non-complementary pairs (k2,k3) find E(k2,E(k3,P))and check the table for a
> match (work 2^^55 + 2^^110). When a tentative match is found, two more
> plain/cipher pairs must be checked to eliminate chance matches
(work ~2^^103).
> The total work factor is negligibly more than 2^^110 encryptions and table
> lookups; 3 key 3DES has an effective keyspace of 110 bits, not 168.

This is the work factor, not the keyspace; they are not the same thing. 3-key
3DES with independent random keys does have a 168-bit keyspace; that just
doesn't necessarily mean that it takes 2^168 encryptions to break.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/XaSuw80J3b4/m/ei2fyvSa-6AJ", "n_sections": 2}, {"thread": "XwpPEWHd9SM", "msg": "09O3URbESZsJ", "author": "David Hopwood", "date_disp": "May 26, 1997, 3:00:00\u202fAM", "subject": "PGPMail 5.0 Now in Beta", "body_html": "
In message <3387D9...@sternlight.com>
David Sternlight <da...@sternlight.com> writes:

> Bryan Olson wrote:
> >
> > David Sternlight wrote:
> >

> > > I stated explicitly that I assumed the were using "Key Exchange
> > > Without Exchanging Keys" as described in Schneier (2nd ed, p.515).
> > > As near as I can tell that is so [...]


> >
> > Did you look up what ElGamal encryption is? (See page 478 of the same
> > book.)

[...]


> PGP says it uses an El Gamal modification of D-H. Schneier's p.478
> speaks of what I read as "pure" El Gamal. It is clear from the p.478
> description that PGP 5.0 does not use that method, since there are no
> options in PGP 5.0 for sharing of what Schneier calls p and g in Table
> 19.6.

p and g are part of the public key. From table 19.6 in A.C. 2nd ed.:

Public Key:
p prime (can be shared among a group of users)
g < p (can be shared among a group of users)
y = g^x mod p

Private Key:
x < p

So, either p and g can be distributed just like an RSA public key would be
(together with y), or they can be fixed for a given key length; it doesn't
really matter.

> What is more, the p.476 method generates ciphertext twice as long

> as the plaintext [...]

Why would that be a problem?

> FInally, in the p.476 method, contrary to what you say, decrypting
> requires knowledge not only of the encrypted text, but also the SENDER's
> private key "x" and p.

I've no idea where you got that idea. x would be the _recipient's_ private
key.

I don't know whether ElGamal encryption is actually used in PGP 5.0
(as you say, the source code isn't available, and the documentation is not
conclusive). However, your objections that it _could not_ be used do not
stand up.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/XwpPEWHd9SM/m/09O3URbESZsJ", "n_sections": 61}, {"thread": "YJsPQWc7PJs", "msg": "mfF-f-plkhIJ", "author": "David Hopwood", "date_disp": "Apr 9, 1997, 3:00:00\u202fAM", "subject": "help with cryptanalysis", "body_html": "
In message <5ibeer$6...@news.ysu.edu>

an...@yfn.ysu.edu (David A. Scott) writes:

> Just remember that all these groups in the US may have to bow to
> the FEDS. So you will not see encryption programs like mine there.
> Mine uses a key that is to long 900,000 bits at least. They want
> you to be happy with 128 bits. Also mine is very easy to implement
> and is free. I also may offering a 200 dollar prize useing it in
> its least secure mode. It is scott16.zip at
> http://www.sni.net/~mpj/crypto.htm

Your web page doesn't contain a separate description of the algorithm,
and to get the implementation requires a return email address with a
domain used in the U.S. (although I could get one of those fairly
easily, I'm not going to the trouble of doing so just for this).

Make a description of the algorithm available separately from the
implementation, and I might have a look at it.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/YJsPQWc7PJs/m/mfF-f-plkhIJ", "n_sections": 11}, {"thread": "ZZe2m1OpgLo", "msg": "ISNGMk6m6q4J", "author": "David Hopwood", "date_disp": "Apr 23, 1997, 3:00:00\u202fAM", "subject": "Is it random?", "body_html": "
In message <wtshaw-1804...@207.101.116.61>
wts...@itexas.net (W T Shaw) writes:

> On the question of randomness, at the NIST conference, Miles Smid stated
> that only random keys should be considered in evaluation of algorithms.

> I then asked what might be considered a stupid question, but I had my
> reasons: "What do you mean by randomness?" I was not trying to be funny,
> but really wanted a clear definition of what he had in mind.

For cryptographic purposes you usually want either or both of two
properties: that the keys should be "unpredictable" and (in some cases)
that they be "uniformly distributed".

These properties apply to a process for generating random numbers, not
the numbers themselves, and they are relative to the knowledge of a
potential attacker (if you know the seed of a PRNG, its output is obviously
predictable, and has only one possible value).

Informally, a process is unpredictable against an attacker, iff given the
knowledge and resources of that attacker, it is infeasible to determine
any part of the output of the process.

A process is uniformly distributed against an attacker, iff from the point
of view of that attacker each output is equally probable.

Sometimes a uniform distribution is not necessary. For example if you are
generating a DES key, and exclude a _small_ proportion of the key space,
this helps an attack slightly but not significantly.

If, OTOH, you are generating a stream for use as a one-time-pad, it needs
to be both unpredictable and uniformly distributed. Suppose that an
attacker knows that the plaintext contains a long sequence of the same
character, and that the distribution of the pad is skewed in a particular
way. That could allow him/her to determine what the character is.

Other definitions such as algorithmic complexity, or "true" randomness (for
example, whether a process is based on quantum-mechanical effects) are not
really important in the context of cryptography, IMHO.

> He might be expressing the idea for any key to work equally well.

Not necessarily; suppose an algorithm has a small number of weak keys, but
the proportion of the key space they take up is small (say less than 2^-64).
Then the algorithm is still secure if keys are chosen randomly.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/ZZe2m1OpgLo/m/ISNGMk6m6q4J", "n_sections": 2}, {"thread": "eZepPdxBt-I", "msg": "0md8wJ3oj6UJ", "author": "David Hopwood", "date_disp": "Apr 29, 1997, 3:00:00\u202fAM", "subject": "SID - a protocol for secure communication", "body_html": "
I've recently completed most of the documentation for a protocol that can
be used to provide a secure, authenticated communication channel, and I'd
like to invite comments on its security. I will be writing an implementation
in Java, which should hopefully be available within a month or so. The
protocol will not be patented, and the implementation will be freely
redistributable (internationally, since I'm based in the U.K.).

Here is an excerpt from the web page, at
http://www.users.zetnet.co.uk/hopwood/crypto/sid/

(note that the page is written as if the protocol has no flaws; don't take
that too seriously, since obviously one of the reasons I'm posting here is
so that people can try to find flaws in it).
----

SID authentication
~~~~~~~~~~~~~~~~~~

SID is a method for handling authentication using public key
cryptography. Each user has a public key, but each pair of users who
communicate regularly also know each other by separate "pseudo-public"
keys. A pseudo-public key is a public key that is treated as a shared
secret.

The name SID stands for "Security in Depth", i.e. the principle that secure
systems should be layered, in such a way that breaking one layer does not
automatically allow any of the others to be broken. For example, in
protocols that use session keys, breaking a session key normally only
compromises the data sent in that session, not other sessions. This is
obviously a good thing, and the protocol described later tries to extend
similar properties to other kinds of attack.

Suppose that Alice communicates regularly with Bob. SID has the
following properties that are not true in general of protocols that provide
authentication and secure channels:

o Alice requires a private key in order to connect to Bob. Suppose
that Eve has captured this private key, and has used it to pretend to
be Alice. The next time the real Alice attempts to connect to Bob,
she will detect that someone has impersonated her (and similarly
with Alice and Bob exchanged).
o Even if both current private keys have been compromised, if the
real Alice and Bob communicate using this protocol at a later time
without a man-in-the-middle, they will detect whether one or both
of them was impersonated.
o A passive attack on the protocol, i.e. eavesdropping a session and
attempting to determine what was sent over it, requires breaking
either a random public key or the session key, for each session.
This applies even if all the keys that have ever been stored by Alice
and Bob (as opposed to temporary keys held in memory) are
known to the attacker.
o Alice does not possess the information necessary for anyone to
fool her into thinking they are Bob, or vice-versa.
o The key exchange protocol is designed not to encrypt any plaintext
that could be known to an attacker, with any key. Each block of
input to the public key algorithm is unpredictable and uniformly
distributed. Also, nothing is encrypted using a private key, so no
additional information about any private key is available to a
cryptanalyst.
o For the body of the session, after key exchange, an encryption
mode is used that combines a block cipher and a stream cipher to
make known or chosen plaintext attacks much more difficult. A
more detailed analysis of this mode is given here [link].
o In order to perform a man-in-the-middle attack, i.e. where Alice is
connected to Bob but an attacker can intercept and change
messages, knowledge of two private keys is required, one that is
normally held only by Alice and one normally held only by Bob.
o After Alice and Bob's first session, the corresponding
pseudo-public keys are themselves secret. I.e. without
eavesdropping the first session, even someone who can easily
break the public-key algorithm cannot get any farther without
breaking a session key, or finding the pseudo-public or private
keys by non-cryptanalytic means.
o Pseudo-public keys are changed once per session, so the previous
statement can be generalised: without eavesdropping session n,
even someone who can easily break the public-key algorithm
cannot attack sessions n+1 or later, except by breaking their
session keys or obtaining keys by non-cryptanalytic means.
o Because separate pseudo-public keys are used between each pair
of users, Bob cannot cheat and impersonate Alice to another user,
even if he finds the private key Alice uses to connect to him.
o The time between sessions can be used to determine a level of
paranoia against attacks on the public-key algorithm (for example,
factoring the modulus in the case of RSA). If the time between two
sessions exceeds the paranoia setting, a dummy session can be
inserted to change the current keys. This means that the time
available to crack a pseudo-public key in order to try to
impersonate Alice or Bob, or to perform a man-in-the-middle
attack, can be limited to whatever is desired.
o To try to make man-in-the-middle attacks using compromised
private keys more difficult, there is a protocol (which can be
initiated at any time during a session) that forces communication to
take place in simultaneous rounds. For example, Alice and Bob
can simultaneously pose a list of questions to each other, then
simultaneously answer them. This prevents automated MITM
attacks using a simple computer program, since the
man-in-the-middle needs to guess Alice and Bob's responses
sufficiently well to fool both of them.
o Optionally, protection against limited denial of service attacks can
be implemented. If an attacker can insert records, change them, or
cause them to be dropped, but some proportion of records get
through correctly, the connection can continue uninterrupted using
the remaining bandwidth. For this to be useful, other
denial-of-service attacks on the underlying transport should also be
plugged.
o Any combination of public key encryption algorithm, block cipher,
and stream cipher may be used. Algorithms and key lengths can be
different from session to session. For example, this allows the
pseudo-public key length to be increased over time, to take into
account improvements in computing power or factoring algorithms.
It also allows algorithms (either public- or secret-key) whose
security has been found to be in doubt to be dropped with a
minimum of hassle or risk.

These statements rely on each user's software being worthy of that user's
trust. A cryptographic protocol cannot prevent, for example, a Trojan
being installed on a user's machine that captures the plaintext of every
transmission, or modifies the user's keys. Given that assumption, though,
few if any other authentication systems provide comparable security
against attacks that involve private keys being compromised.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk
http://www.users.zetnet.co.uk/hopwood/crypto/


", "url": "https://groups.google.com/g/sci.crypt/c/eZepPdxBt-I/m/0md8wJ3oj6UJ", "n_sections": 1}, {"thread": "fqUlqAGB2d4", "msg": "Yp6rO8Z3-ywJ", "author": "David Hopwood", "date_disp": "Jun 2, 1997, 3:00:00\u202fAM", "subject": "Implementing ElGamal encryption and signatures", "body_html": "
I'm currently writing an implementation (in Java) of the ElGamal encryption
and signature algorithms described in Applied Cryptography 2nd edition,
section 19.6.

I have several questions:

1. The base g and private key x are chosen randomly. Should I simply choose
integers uniformly distributed on 1..p-1, or are some values better
(for either speed or security) than others? What about small values of
g that result in quicker modular exponentiations, like 3, 257 or 65537?

2. The code will contain optional defaults for the p and g parameters at
various lengths of p, to speed up key generation. Is there a way to prove,
to someone who reads and compiles the source code, that these are not
cooked in some way? I'm thinking of giving a procedure for generating
these parameters using Java's SecureRandom class, and a fixed seed taken
from the bits of pi - any problems with this?

3. What lengths of p give comparable security to, say, 1024-bit and 2048-bit
RSA moduli?

4. Are there any published standards for padding in ElGamal, or encoding of
ciphertext blocks? Is it necessary to pad the plaintext, or the hash to
be signed using random bytes, as it is for RSA?

Thanks in advance,

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk


", "url": "https://groups.google.com/g/sci.crypt/c/fqUlqAGB2d4/m/Yp6rO8Z3-ywJ", "n_sections": 6}, {"thread": "fqUlqAGB2d4", "msg": "1nlQMnwkrEMJ", "author": "David Hopwood", "date_disp": "Jun 5, 1997, 3:00:00\u202fAM", "subject": "Implementing ElGamal encryption and signatures", "body_html": "
In message <33939B...@csi.po.my>
Ming-Ching Tiew <mct...@csi.po.my> writes:

> David Hopwood wrote:
> >
> > I'm currently writing an implementation (in Java) of the ElGamal encryption
> > and signature algorithms described in Applied Cryptography 2nd edition,
> > section 19.6.

Here it is:

void rawEncrypt(BigInteger M,BigInteger[] ab){BigInteger k;do{k=new
BigInteger(p.bitLength()-1,rng).setBit(0);}while(!(k.gcd(p.subtract(ONE)).
equals(ONE)));ab[0]=g.modPow(k,p);ab[1]=y.modPow(k,p).multiply(M).mod(p);}
BigInteger rawDecrypt(BigInteger a,BigInteger b)throws ArithmeticException
{return b.multiply(a.modPow(x,p).modInverse(p)).mod(p);}

Only joking; I usually put in more comments than this - still, it makes
a neat .sig.

> I offer no answer but in fact would like to know if you've found
> anything useful.

Wei Dai has an implementation in the file "elgamal.cpp" in the Crypto++
library (find your nearest mirror using a search engine).

Daniel Bleichenbacher has a paper about some weaknesses of ElGamal and
how to fix them:

"Generating ElGamal signatures without knowing the secret key"
Daniel Bleichenbacher. Institute for Theoretical Computer Science,
ETH Z rich.
Lecture Notes in Computer Science: Advances in Cryptology - EUROCRYPT '96.
Vol. 1070. Springer Verlag. Pages: 10-18. (corrected version)
http://www.inf.ethz.ch/department/TI/um/publications.html

which I'll read as soon as I can get Ghostscript working.

David Wagner says that the description of ElGamal in Menezes et al's
"Handbook of Applied Cryptography" is better than the one in Schneier, and
suggests the following variant for encryption: "e.g. 3-DES encrypt m using
the key SHA-1(g^{xy})". I haven't had time to look at this in detail yet.

I'm still getting conflicting advice about the choice of g (whether it can
be small, what properties it should have related to the group, etc.)

> Also, is there a standard way to use the typical big number functions to
> solve "extended Euclidean algorithm" which is required of ElGamal
> Signature ?

There is: to solve

M = (x.a + k.b) mod (p-1)

note that

k.b mod (p-1) = (M - x.a) mod (p-1)

b = (inverse of k mod (p-1)).(M - x.a) mod (p-1)

The extended Euclidean algorithm is a way of calculating the inverse of
k mod p-1 (assuming there is exactly one inverse, as there is for this
application).

However, we don't need to worry about that directly, because the method
BigInteger.modInverse(BigInteger modulus) calculates modular inverses.
(I believe the bignum library by Colin Plumb used to implement this does
use the extended Euclidean algorithm.)

> Ming-Ching

> p/s: BTW, how's your JCE coming along ? The last time I read that
> you are nearing completion and will publish sources as well. Could
> I download it from somewhere ?

http://www.users.zetnet.co.uk/hopwood/crypto/

Version 2.20a of Cryptix contains the JCE code from about two weeks ago. It
isn't really a public release, but the next version probably will be.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/fqUlqAGB2d4/m/1nlQMnwkrEMJ", "n_sections": 6}, {"thread": "mEkIrGRUbvo", "msg": "XuGfLo119ukJ", "author": "David Hopwood", "date_disp": "Apr 21, 1997, 3:00:00\u202fAM", "subject": "Please Break This", "body_html": "
In message <VA.000006c...@mergent.demon.co.uk>
Simon Hunt <sh...@mergent.co.uk> writes:

> To transmit the key between parties, simply 3DES encrypt it, and pass
> the 3DES key to the other party using suitable public Key technology.
> There is no need to exchange the whole 100k using RSA!

Then you cannot assume any greater security than the weaker of 3DES and
Scott16; much better to use 3DES alone in that case.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk


", "url": "https://groups.google.com/g/sci.crypt/c/mEkIrGRUbvo/m/XuGfLo119ukJ", "n_sections": 7}, {"thread": "mEkIrGRUbvo", "msg": "A84BLqo-spgJ", "author": "David Hopwood", "date_disp": "Apr 21, 1997, 3:00:00\u202fAM", "subject": "Please Break This", "body_html": "
In message <5j19oo$8...@news.ysu.edu>
an...@yfn.ysu.edu (David A. Scott) writes:

> You have to look at the code to see what happens to odd length files
> at the time the C code that I used seemed obvious.

Obvious? It's obscure to the point of incomprehensibility, not to mention
breaking on big-endian machines, and architectures that require aligned
memory accesses (including most RISC architectures).

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/mEkIrGRUbvo/m/A84BLqo-spgJ", "n_sections": 7}, {"thread": "mEkIrGRUbvo", "msg": "nr-rgaQ678QJ", "author": "David Hopwood", "date_disp": "Apr 23, 1997, 3:00:00\u202fAM", "subject": "Please Break This", "body_html": "
In message <01bc4e25$040193e0$0e9678c7@dscott>
"David Scott" <dsc...@ridgecrest.ca.us> writes:

> David Hopwood <hop...@zetnet.co.uk> wrote in article
> <199704210...@zetnet.co.uk>...

> > Obvious? It's obscure to the point of incomprehensibility, not to mention


> > breaking on big-endian machines, and architectures that require aligned
> > memory accesses (including most RISC architectures).

> Sorry I was only thinking about my machine when I designed it. I hope this


> forces the NSA to use PC's if they can't get it to run on the big machines.

This thread could almost be a troll. If it is, congratulations; you can
stop now.

> And thanks for the compliment I hope that it does what I want efficiently but
> I also like the fact that some might find it obscure to the point of
> incomprehensible I hope this adds to the security.

From Applied Cryptography, preface, first two paragraphs:

# There are two kinds of cryptography in the world: cryptography that will
# stop your kid sister from reading your files, and cryptography that will
# stop major governments reading your files. This book is about the latter.
# If I take a letter, lock it in a safe, hide the safe somewhere in New
# York, then tell you to read the letter, that's not security. That's
# obscurity. On the other hand, if I take a letter and lock it in a safe,
# and then give you the safe along with the design specifications of the
# safe and a hundred identical safes with their combinations so that you
# and the world's best safecrackers can study the locking mechanism -- and
# you still can't open the safe and read the letter -- that's security.

David Hopwood
david....@zetnet.co.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/mEkIrGRUbvo/m/nr-rgaQ678QJ", "n_sections": 7}, {"thread": "mlF1Y-J5JcA", "msg": "lbVVieldseQJ", "author": "David Hopwood", "date_disp": "May 22, 1997, 3:00:00\u202fAM", "subject": "RSA(help)", "body_html": "
In message <5ltkb9$g...@netnews.upenn.edu>

gemi...@blue.seas.upenn.edu (Geoffrey B Milord) writes:

> 1) Since n and P{a} are publicly known, the eavesdropper encrypts several
> words, w_0,w_1,w_2 ... w_j using P{a}. C_0=w_0^{Pa} mod n.

> 2) since it is known that Alice and Bob are communicating using RSA
> the eavesdropper searches for d by finding integers i such that
> C_0^{i}=w_0.

That's the discrete logarithm problem, and is difficult for the lengths of
n and d normally used with RSA.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk


", "url": "https://groups.google.com/g/sci.crypt/c/mlF1Y-J5JcA/m/lbVVieldseQJ", "n_sections": 2}, {"thread": "p19asd6UDqA", "msg": "bVY6xK7a0ikJ", "author": "David Hopwood", "date_disp": "Apr 29, 1997, 3:00:00\u202fAM", "subject": "Public key that cannot be inferred from the private key?", "body_html": "

I'm looking (mostly out of curiosity) for a public key system, in which the
public key cannot be inferred from the private key.

A public key encryption algorithm must have at least the following
properties:

- there is an algorithm to determine P (the public key) and Q (the private
key) from a random seed.
- for all M, D[Q](E[P](M)) = M
- without Q, M cannot be determined from P and E[P](M).
- without the seed, Q cannot be determined from P.

I'd like to know about systems that satisfy both of these additional
properties:

- without Q, P cannot be determined from M and E[P](M).
- without the seed, P cannot be determined from Q.

There is no special requirement that the system be commutative
(i.e. D[P](E[Q](M)) = M) or non-commutative.

--
Here's my attempt to construct such a system from RSA (or any other commutative
public key algorithm):

To generate a key pair, first generate two RSA key pairs, (P1, Q1)
and (P2, Q2).

Let P = (P1, Q2) (the new public key)
Q = (P2, Q1) (the new private key)

Define E[P](M) = E_RSA[P1](E_RSA[Q2](M))
D[Q](C) = D_RSA[P2](D_RSA[Q1](C))

where E_RSA and D_RSA denote RSA encryption and decryption.

Does this satisfy the properties above, assuming that messages are
always padded
with, say, at least 128 random bits before encryption? Is there a
more efficient
method?

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk


", "url": "https://groups.google.com/g/sci.crypt/c/p19asd6UDqA/m/bVY6xK7a0ikJ", "n_sections": 4}, {"thread": "p19asd6UDqA", "msg": "cuVouUjSkFQJ", "author": "David Hopwood", "date_disp": "Apr 30, 1997, 3:00:00\u202fAM", "subject": "Public key that cannot be inferred from the private key?", "body_html": "
In message <5k69a4$8...@gazette.loc3.tandem.com>
rpa...@loc3.tandem.com (parker_rob) writes:

> David Hopwood (hop...@zetnet.co.uk) wrote:

> >I'm looking (mostly out of curiosity) for a public key system, in which the
> >public key cannot be inferred from the private key.

[...]


> >- without Q, P cannot be determined from M and E[P](M).
> >- without the seed, P cannot be determined from Q.

[...]


> Hmmm, I think RSA would fit these requirements. If a user knows Q but
> not P (and not the factors of n), then they can't determine P any more
> than another user who knows P could determine Q (without knowing the
> factors of n).

Yes, I see. I was thinking of the private key as including the factors of n
(so that the Chinese Remainder Theorem can be used), but it doesn't have
to. Thanks.

> Determining P from M and E[P](M) requires computing a discrete logarithm.

> So if the factors of the modulus are discarded by the key-generation
> program and not revealed, RSA should fit your requirements. Of course,
> if someone who knows P gets with someone who knows Q (for the same
> modulus, n), they could easily factor n and then could compute the
> inverse key for any other exponent under that same modulus.

Yes (but moduli are not supposed to be re-used for RSA, so that shouldn't
be a problem).

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/p19asd6UDqA/m/cuVouUjSkFQJ", "n_sections": 4}, {"thread": "rrOKRDzCZYI", "msg": "5nlYP2MEiNIJ", "author": "David Hopwood", "date_disp": "Apr 27, 1997, 3:00:00\u202fAM", "subject": "Innocent question: why isn't a pseudo-random stream-cipher sufficient?", "body_html": "

In message <wtshaw-2504...@207.101.116.61>


wts...@itexas.net (W T Shaw) writes:

> In article <5jqp3a$6...@news.ysu.edu>, an...@yfn.ysu.edu (David A.
Scott) wrote:

> > In a previous article, wts...@itexas.net (W T Shaw) says:
> >
> > >In article <335e18a...@nntp.netcruiser>, sew...@netcom.ca (John
> > >Savard) wrote:
> > >>
> > >> One problem, though, is that if someone already knows that the
> > >> plaintext of a message is "Credit Bill's account with $100", then they
> > >> might be able to flip certain bits to change "100" to "999".
> >
> > If you use a data encryption that spreads data through the whole
> > file. There would be no way to make a small change in the encrypted
> > to make a small changes in the plain text. If one used an error corrected
> > type of encryption this kind of thing may occur.
> >
> It comes back to the old question of how much attention needs to be spent
> on such errors. It could be too little, and perhaps too much.

IMHO, a great deal of attention. Given that it is relatively simple to
ensure that errors in the ciphertext (both malicious and otherwise) are
detected at little cost, there seems to be no advantage in not doing so.

> Let's say
> that the plaintext said something like credit the account with $100,
> previous balance was $99.50, new balance will be $199.50. It would take
> three rather specific changes to make things *add up* and there could be
> more *check sums* aimed just at the important areas in the message.

If you CRC everything, it isn't necessary to worry about what needs to
be CRC'd, or what you may have missed. It is good for there to be one less
thing to worry about.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/rrOKRDzCZYI/m/5nlYP2MEiNIJ", "n_sections": 31}, {"thread": "sBDYy949vyQ", "msg": "9xhfOgngQj8J", "author": "David Hopwood", "date_disp": "Jun 13, 1997, 3:00:00\u202fAM", "subject": "help about EL GAMAL algorithm", "body_html": "
In message <01bc74a7$6a9bff20$1aa54fc2@dmcwnjdz>
"alex" <alexan...@hotmail.com> writes:

> I have a problem to understand the decryption process of EL GAMAL system :
[...]
> EXAMPLE :

> p = 11
> g = 7
> x = 2
> k = 3

> M = 6 ( plain text )
[...]
> To decrypt :

> M = ( b / ( a power x ) ) mod p

> M = ( 2 / ( 2 power 2 ) ) mod 11
> M = ( 2 / 4 ) mod 11

Here you have to calculate the multiplicative inverse of 4, mod 11, which
is 3, because (3 * 4) mod 11 = 1.

i.e. M = (2 * 3) mod 11
= 6

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/sBDYy949vyQ/m/9xhfOgngQj8J", "n_sections": 1}, {"thread": "svXuKRGWNUY", "msg": "0-zOqmxZxRwJ", "author": "David Hopwood", "date_disp": "Apr 14, 1997, 3:00:00\u202fAM", "subject": "Scott16 outside the USA (was Re: Scott16.zip on ftp)", "body_html": "
In message <335357...@mad.scientist.com>
Sigbjoern Revheim <sigb...@mad.scientist.com> writes:

> I found a easier way to get scott16.zip. The file lies on ftp:
> ftp://ftp.csn.net/mpj/USA/-RXUv/file

That directory appears to have been removed. Never mind; I've put
a copy at http://www.users.zetnet.co.uk/hopwood/crypto/scott16/

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk


", "url": "https://groups.google.com/g/sci.crypt/c/svXuKRGWNUY/m/0-zOqmxZxRwJ", "n_sections": 7}, {"thread": "wUpGRyFhd4g", "msg": "n0Rn-CN14_kJ", "author": "David Hopwood", "date_disp": "Jun 1, 1997, 3:00:00\u202fAM", "subject": "2-key and 3-key triple DES [was: Re: Quicken makes new advances in Cryptography!]", "body_html": "
In message <338FC7...@cs.umass.edu>
Lewis McCarthy <lmcc...@cs.umass.edu> writes:

> Roger Fleming writes:
> [...]
> # That is, until quite recently when a new attack showed that 3DES-2 is
> # in fact slightly weaker than 3DES-3 (except that 3DES-3 can be weaker
> # against related key attacks!!). The best method seems to be to supply
> # two keys (of 56 bits each) to an algorithm which expands them to 168
> # bits in a complex way.

> Albert P. Belle Isle writes:
> > Why would any serious cryptosystem designer want to "supply two keys
> > (of 56 bits)," rather than do a 160-bit SHA-1 hash on a (physical)
> > stochastic process and add a byte?

> This question seems to compare apples and oranges, and I'm none too
> clear about the intended implications. The effective strength of 3-key
> 3-DES against meet-in-the-middle attacks is only about 2*56 bits,

I don't know where you got this from; you probably mean a work factor
of 2^110.

> so
> it's a waste to consume more than 112 bits of entropy when deriving
> the keys.

That doesn't follow. To do the meet-in-the-middle attack with a 2^110
work factor, you need on the order of 64 * 2^56 bits (524,288 terabytes)
of _random-access_ memory, which is not something that you can easily
buy off the shelf.

Also, how do you know that there aren't better unknown attacks on
2-key 3DES that don't apply to 3-key 3DES with independent keys? (this
possibility worries me much more than the straightforward
meet-in-the-middle attack).

Using 112 bits of entropy cannot be more secure than using 168 bits
of entropy, so why do it?

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/wUpGRyFhd4g/m/n0Rn-CN14_kJ", "n_sections": 41}, {"thread": "2DzosHfDYts", "msg": "oTnGEAWTK9oJ", "author": "David Hopwood", "date_disp": "Jul 14, 1997, 3:00:00\u202fAM", "subject": "Encryption Export Restrictions", "body_html": "
In message <33C93B...@ciphile.com>

Anthony Stephen Szopa <ant...@ciphile.com> writes:

> If a foreign corporation or individual were to decompile an export
> restricted American encryption software product then patent the software
> outside the United States, the American inventor would have no recourse
> against them. (Correct me if I'm wrong.)

You can't patent implementations of software. More to the point, there's no
need to decompile U.S. software (except to determine an algorithm, as in the
case of RC4, for example), since there is plenty of high-quality non-U.S.
crypto software.

> [...] Then no one could have encryption software just like in Russia.

In Russia, encryption software must be licensed, but there is no blanket ban
(see http://cwis.kub.nl/~frw/people/koops/lawsurvy.htm).

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/2DzosHfDYts/m/oTnGEAWTK9oJ", "n_sections": 2}, {"thread": "2Y_vdy7Tprk", "msg": "d8A_1bwUrToJ", "author": "David Hopwood", "date_disp": "Jul 24, 1997, 3:00:00\u202fAM", "subject": "Need best encryption program there is", "body_html": "
In message <5r614b$i...@news.ysu.edu>

an...@yfn.ysu.edu (David A. Scott) writes:

> In a previous article, kl...@wxs.nl () says:

> >I am looking for a very good encryption utulity to encrypt several
> >files. Where can I download this program? How save is it, can I trust
> >it?

[...]


>
> Look below go to hopwood site. The SCOTT16U.ZIP is
> currently the best most secure file encryption program
> out there.

That does it. scott16u and variants (apart from Leslie McBride's x8 ciphers)
have been removed from my site. Apologies to anyone who genuinely wanted
them available for study, but this "best most secure" nonsense is getting
on my nerves.

And no David, I haven't been got at by the NSA.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/2Y_vdy7Tprk/m/d8A_1bwUrToJ", "n_sections": 24}, {"thread": "2Y_vdy7Tprk", "msg": "B0G8GkeLGMcJ", "author": "David Hopwood", "date_disp": "Jul 25, 1997, 3:00:00\u202fAM", "subject": "Need best encryption program there is", "body_html": "

In message <5r7k96$3l0$1...@gannett.math.niu.edu>
c...@baker.math.niu.edu (Xcott Craver) writes:

> David A. Scott <an...@yfn.ysu.edu> wrote:
> >
> > hopwood put it there for some reason not sure way he
> >did but appearantly he got pissed at my free speech. Of
> >course I think mine is best from what I have seen. But

> You didn't say "I think" or "In my opinion." you said


> that your SCOTT16U.ZIP is "currently the best most secure file
> encryption program out there." You don't know this, and have no
> way to prove it. BUT YOU KEEP SAYING IT.

That pretty much sums up my reasons for removing it, yes. Nothing to
do with free speech, or even with the security of the algorithm
(ciphers and protocols proposed by amateur cryptographers can contain
interesting and valuable ideas, even if they are not secure).

The point is, scott16u hasn't really been analysed by a significant
number of people, so how can it realistically be claimed to be the
"best most secure file encryption ever"? I suggested to David Scott in
private email that he avoid making statements like this, but that
advice didn't appear to have any significant effect. I hope that other
amateur cryptographers will learn something.

Incidentally, anyone who wants a copy of scott* _for the purpose of
cryptanalysis only_ can email me for it.

> Unless the NSA has a secret quantum-mechanical factoring machine, RSA
> can be made as strong as you want, just by choosing a longer key.

This is certainly not proven.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/2Y_vdy7Tprk/m/B0G8GkeLGMcJ", "n_sections": 24}, {"thread": "3YhFJJooBbY", "msg": "XLymwkUFCDgJ", "author": "David Hopwood", "date_disp": "Sep 22, 1997, 3:00:00\u202fAM", "subject": "Diffie-Hellman in Java", "body_html": "
In message <34248da...@news.tiac.net>
po...@tiac.net (Jeff Macdonald) writes:

> Hi,
> I've implemented Diffie-Hellman in Java, and would like someone to
verify that
> I've done it right. I know the Random object in java is not the
best, so please
> no comments on that.

Why not use java.security.SecureRandom?

> However, I picked an x with only 160 bits, please let me
> know if it should be bigger.

Depends what degree of security you want. I would make it 256 bits, but I'm
more paranoid than most.

> The algos are based on _Applied Crytpography_ 2nd
> Ed. Many thanks goes to Andrew Kuchling for help with the algos. This
> implementation was suppose to be done in Python, however, I was not
able to do
> that as easily as Java makes it.

[...]


> BigInteger one=new BigInteger("1");
> BigInteger two=new BigInteger("2");
> BigInteger prime;
> BigInteger sub_prime;
> BigInteger generator;
>
> while(true) {
> sub_prime=new BigInteger(bits-1,1,new Random());
> prime=sub_prime.multiply(two);
> prime=prime.add(one);
>
> if(prime.isProbablePrime(1)) {
> break;
> }
> }

Three problems here:

1. You should be aware that there is a bug in the isProbablePrime method
(at least in JDK 1.1.2); it doesn't meet the documented spec when the
certainty parameter is odd. In particular, x.isProbablePrime(1) will always
return true independent of x.
I reported this to JavaSoft, but it's probably not a good idea to assume
that it is fixed in whatever VM your program will run on.

2. It looks like you're trying to speed up strong prime generation by using
low certainty parameters in an inner loop, then doing a more expensive
primality check on "prime" and "sub_prime" in an outer loop. If so, where's
the outer loop?

3. Passing in a low certainty parameter doesn't help with the speed
in practice,
because the BigInteger(int length, int certainty, Random random) constructor
calls a native function ('plumbGeneratePrime' in Colin Plumb's library),
which _always_ tries to ensure that the result is prime with a high degree
of certainty.
The only way to speed it up substantially would be to have strong prime
generation implemented in native code.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/3YhFJJooBbY/m/XLymwkUFCDgJ", "n_sections": 9}, {"thread": "3YhFJJooBbY", "msg": "lhyXM8XdKT8J", "author": "David Hopwood", "date_disp": "Sep 23, 1997, 3:00:00\u202fAM", "subject": "Diffie-Hellman in Java", "body_html": "
In message <342669dd...@news.tiac.net>
po...@tiac.net (Jeff Macdonald) writes:

> David Hopwood <hop...@zetnet.co.uk> wrote:
> >[code snipped]

> The code block above refers to Schneier's _Applied Cryptography_, 2nd ed.,
> '(p-1)/2 should also be prime for security.'

> So we can write this like so: (prime-1)/2=sub_prime ->
prime-1=2(sub_prime) ->
> prime=2(sub_prime)+1.

> I believe this just helps us generate a prime with known factors.
So to answer 2
> below, there is no outer loop.

OK, but in that case 1 would be far too low as the certainty parameter.
50 is more reasonable (or 80 if you're paranoid).

> >2. It looks like you're trying to speed up strong prime generation by using
> > low certainty parameters in an inner loop, then doing a more expensive
> > primality check on "prime" and "sub_prime" in an outer loop. If
so, where's
> > the outer loop?

> >Three problems here:
> >
> >1. You should be aware that there is a bug in the isProbablePrime method
> > (at least in JDK 1.1.2); it doesn't meet the documented spec when the
> > certainty parameter is odd. In particular, x.isProbablePrime(1)
will always
> > return true independent of x.
> > I reported this to JavaSoft, but it's probably not a good idea to assume
> > that it is fixed in whatever VM your program will run on.

> Ok, I'm using jdk 1.1.3, so I'll check the eratta...

Better to check the source code - the errata normally aren't complete. In
the incorrect version, BigInteger.isProbablePrime starts with

int n = certainty/2;
if (n <= 0)
return true;

(although this bug isn't really significant unless certainty is low, or
you're relying on the behaviour to be exactly as specified).

If your code only needs to do a simple key exchange, it's fine to use
precomputed parameters as Chuck Willis suggests. Here's some code to
demonstrate that the 1024-bit prime and generator from
draft-ietf-ipsec-photuris-02.txt are OK:

import java.math.BigInteger;

class DHCheck {
public static void main(String[] args) {


BigInteger prime = new BigInteger(

"a4788e2184b8d68bfe02690e4dbe485b17a80bc5" +
"f21d680f1a8413139734f7f2b0db4e253750018a" +
"ad9e86d49b6004bbbcf051f52fcb66d0c5fca63f" +
"bfe634173485bbbf7642e9df9c74b85b6855e942" +
"13b8c2d89162abeff43424350e96be41edd42de9" +
"9a6961638c1dac598bc90da069b50c414d8eb865" +
"2adcff4a270d567f", 16);

BigInteger generator = new BigInteger("5");

BigInteger one = new BigInteger("1");
BigInteger two = new BigInteger("2");

BigInteger subprime = prime.subtract(one).divide(two);
if (!(prime.isProbablePrime(80) &&
subprime.isProbablePrime(80))) {
System.out.println("Not a strong prime!");
return;
}

// Test for generator based on Applied Cryptography 2nd edition
// section 11.3 page 254, optimized for the case of a strong prime.
if (generator.modPow(two, prime).equals(one) ||
generator.modPow(subprime, prime).equals(one)) {
System.out.println("Not a generator!");
return;
}

System.out.println("OK");
}
}

Personally I would use a 2048-bit prime, if the performance is acceptable
for your application.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/3YhFJJooBbY/m/lhyXM8XdKT8J", "n_sections": 9}, {"thread": "3rJJkT865bc", "msg": "F8x2mYKobLYJ", "author": "David Hopwood", "date_disp": "Sep 18, 1997, 3:00:00\u202fAM", "subject": "Just starting looking at crypto....", "body_html": "
In message <342045f7...@news.qbc.clic.net>
dra...@clic.net (Sir Zifnab) writes:

> On Wed, 17 Sep 97 09:49:45 GMT, ro...@police.tas.gov.au (Roger
Fleming) wrote:
[...]
> >2. Posting files of plaintext and ciphertext is even more
pointless; for some
> >of the reasons why, read the FAQ.

> I do feel dumb for not having read the FAQ. Where can i get it?

ftp://rtfm.mit.edu, or (if I remember correctly) http://www.faqs.org, have
all Usenet FAQs.

> >3. Be patient, and expect people to be terse or even slightly
hostile; this is
> >because we are now getting posts similar to yours about every 3 weeks, and
> >many of these posters are rude, arrogant, and too stupid to even
read the FAQ.
> >They seem to think they can dictate conditions to others about how
they should
> >perform the favour of analysing an algorithm for free (when many
could charge
> >a fortune to do so), and become childishly peeved if the result is
not fulsome
> >praise. However, don't regard criticism of your algorithm as an attack;
> >criticism is the whole point of publishing it, and is intended in a
> >constructive sense.

> I'm expecting it to be torn apart and laughed at (:

Don't worry, you haven't used Usenet properly until you've had a "grand
idea" torn apart; it's highly instructive.

> So, here. Take a look.

Here's a more concise description of the algorithm, if I'm interpreting
the code correctly:

Suppose k[i] is the (i+1)th character of the key
p[i] " " " " " " plaintext
c[i] " " " " " " ciphertext
len(k) is the key length
/+/ is the rotation implemented by the Case statement in the
program (the detailed definition doesn't really matter)
/-/ is inverse of /+/, i.e. (x /+/ y) /-/ y = x
% means modulo

There are two cases:

if len(k) <= 5,
c[i] = p[i] /+/ (i % 6) /+/ k[i % len(k)]

if len(k) > 5,
c[i] = p[i] /+/ (i % len(k)) /+/ k[i % len(k)]

To break this for the first case, calculate c' so that

c'[i] = c[i] /-/ (i % 6),

and treat c' as the ciphertext for a simpler algorithm, which would
normally be called "/+/ with a repeated key". The FAQ describes how to
break this kind of cipher when /+/ is XOR; the principle is exactly the
same when /+/ is a rotation.

In the second case, just treat the cipher as "/+/ with a repeated key"
directly, since
c[i] = p[i] /+/ k'[i % len(k')]

where k'[i] = i /+/ k[i], and len(k') = len(k)

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/3rJJkT865bc/m/F8x2mYKobLYJ", "n_sections": 1}, {"thread": "3w47OqHR3kQ", "msg": "Jg0xobmJAmUJ", "author": "David Hopwood", "date_disp": "Aug 2, 1997, 3:00:00\u202fAM", "subject": "BER in Java?", "body_html": "
In message <33DC7CF5...@munich.ixos.de>
Tom Wagner <thomas...@munich.ixos.de> writes:

> Hi guys,
> does anyone know a free Java class which encrypts and decrypts BER
> octets.

You mean "encodes and decodes".

There will be one in Cryptix version 2.2.2 (which is not yet released,
but should be released fairly soon).
See http://www.systemics.com/docs/cryptix/

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/3w47OqHR3kQ/m/Jg0xobmJAmUJ", "n_sections": 4}, {"thread": "5Aa5k1ESMmQ", "msg": "EKJoapCVJK8J", "author": "David Hopwood", "date_disp": "Jul 6, 1997, 3:00:00\u202fAM", "subject": "Generating p and g parameters for El Gamal", "body_html": "
First some background: the El Gamal encryption and signature
algorithms require parameters p and g as part of the public
key. p is a large prime, and g should be a generator in the
field GF(p).

Schneier gives an algorithm in section 11.6, page 262 of
Applied Crypto 2nd ed. for determining whether g is a generator,
but it requires the factors of p-1 to be known. Currently I'm
using the following algorithm to find a suitable p and g:

1) Generate a random prime, p, of the required length.
2) Find the small factors of p-1 by trial division; call them
q1, q2 ... qn.
3) Let r = (p-1)/(q1 * q2 * ... qn).
4) If r is composite, go back to step 1.
5) The factors of p-1 are q1 ... qn and r, so use these in the
algorithm from Applied Crypto to test possible values of g.

This works in a reasonable time for p up to about 384 bits, but
for larger values r seems to be composite most of the time. For
example, this is a typical output (each line starting "p-1 = "
is for a different value of p):

bits = 401
p-1 = 2.2.2.2.2.2.3.11.(390-bit composite)
p-1 = 2.2.7.1249.(386-bit composite)
p-1 = 2.2.2.17.(394-bit composite)
p-1 = 2.31.53.269.(381-bit composite)
p-1 = 2.2.11.31.269.11777.(369-bit composite)
p-1 = 2.2.3.3.5.5.7.(388-bit composite)
p-1 = 2.2.2.9419.11261.(372-bit prime)
g = 3?.... OK
p = 365623599267996622654451015630285566214465830692764691164074
468967771602565311536291458592080035990046638009733015350393
g = 3

I suspect that a better factoring algorithm, in addition to trial
division would help to reduce the number of iterations needed.

So, I have two questions:

- is there an easier or more efficient approach to this problem?
- can anyone give references, or point me to an implementation of
factoring algorithms that would work better than trial division
alone?
(I vaguely remember Pollard's rho method was one of them; any
others?)

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/5Aa5k1ESMmQ/m/EKJoapCVJK8J", "n_sections": 6}, {"thread": "9IjD0KXzdPo", "msg": "ZAZAMc1r0p0J", "author": "David Hopwood", "date_disp": "Sep 22, 1997, 3:00:00\u202fAM", "subject": "Why AES?", "body_html": "
In message <602sea$s...@basement.replay.com>
nob...@REPLAY.COM (Anonymous) writes:

> Hello people.
> I have heard and read that the replacement for the DES, is the AES
> (Advanced Encryption Standard) with an 80 bit key.

AES submissions must support 128, 192 and 256 bit keys (with a 128 bit
block size).

> The question that
> immediately comes to mind is why triple-DES was not adopted as the
> replacement?

Because it's slow, especially in software, and has a 64 bit block size
(potentially allowing codebook attacks when large amounts of known
plaintext are encrypted under the same key).

[...]


> There is one other thing that has just occured to me. It is that the US
> govt uses (or used) DES for non-classified traffic only, that leads me to
> believe that the algorithms used for higher security traffic must be beyond
> anything the academic cryptolography world can even imagine.

No, they normally use Triple DES for higher security traffic.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/9IjD0KXzdPo/m/ZAZAMc1r0p0J", "n_sections": 27}, {"thread": "9IjD0KXzdPo", "msg": "zPEy3AMEbv0J", "author": "David Hopwood", "date_disp": "Sep 27, 1997, 3:00:00\u202fAM", "subject": "Why AES?", "body_html": "
In message <342b6368...@news.io.com>
rit...@io.com (Terry Ritter) writes:

> On Tue, 23 Sep 1997 03:48:45 GMT, in
> <34273a7f...@nntp.netcruiser> in sci.crypt sew...@netXYZcom.ca
> (John Savard) wrote:

> >rit...@io.com (Terry Ritter) wrote:
> >
> >>The analogy is flawed because cryptography *restricts* communications
> >>to only the select group which has the key, and standards *expand*
> >>communications to arbitrary users.

The Internet is based on, and has become successful largely because of,
the use of open standards (that is, standards that are designed and intended
to be able to have more than one independent implementation). The advantages
of open standards don't go away simply because they involve cryptography.

> >>Just as we now accept that a key can be arbitrary, the cipher, too,
> >>can be arbitrary. The cipher name -- or the cipher itself -- is
> >>simply delivered along with the key.
> >
> >You are correct in what you say. However, it is also correct that a
> >cryptographic standard, where only the key - a fixed length string of
> >random bits, letters, or digits, and thus easy to generate - sets apart a
> >unique group of communicating parties makes it easier for people to open a
> >secure conversation.

> The issue under discussion is the supposed need for a standard cipher.

A good reason for a standard cipher is interoperability. Suppose that a
protocol includes a cipher negotiation mechanism; each party supplies
a list of supported ciphers, and one is chosen that is common to both
lists. If each list includes the standard cipher, then there will not
be a problem due to lack of cipher support by either party's software.

Clearly it's important that the standard cipher should be strong if this
is to be useful.

> One way to support arbitrary ciphers is to use the transported message
> key in a default cipher;

Therefore a standard cipher would still be useful for the default...

> then send under that cipher the source code
> or object code for the desired data cipher, plus a new message key.

This is a really bad idea; an attacker can just send the target a message
containing a trojan "cipher".

Earlier it was suggested that JVM bytecode could be used for the cipher
implementation. Having personally found several holes in the security of
JVM implementations, I don't agree that it is trustworthy enough to be
used for this purpose. For the current state of development of Java VMs,
it would be easily the weakest point of the system.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/9IjD0KXzdPo/m/zPEy3AMEbv0J", "n_sections": 27}, {"thread": "9tPwFqpHQck", "msg": "z_YKOEeS37oJ", "author": "David Hopwood", "date_disp": "Aug 4, 1997, 3:00:00\u202fAM", "subject": "SRP-2 as zero-knowledge ID protocol", "body_html": "

> Well, to authenticate a user a good identification scheme should, in my
> opinion, have the following properties:-

> 1. Completeness. A genuine user (one who knows the secret x) should


> always be accepted by the host.

> 2. Soundness. A dishonest user (one who doesn't know the secret x)
> should, with high probability, be rejected by the host when he tries to
> masquerade as a legitimate user.

> 3. Leakproofness (probably not the right word but it'll do for now :-).
> A genuine user participating in the protocol does not leak information
> about his secret x.

> With SRP-2, point 1 is easily verified, and I think I showed in my
> previous post that point 3 is also true. This just leaves point 2.

> Another way of saying 2 is that, if there is a way for a dishonest user
> to subvert the system with non-negligable probability, then this method
> can be used in some way by the dishonest user to recover the secret x.
> i.e. if the protocol is sound then any method of breaking it ultimately
> leads to a method of recovering the secret x.

That's not correct (the last paragraph). As a trivial counter-example,
consider a protocol where nothing is sent apart from the user ID, and the
user is always accepted as legitimate. In that case 1 and 3 are satisfied,
the attacker cannot recover x (because it is never used!), but 2 is not
satisfied.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/9tPwFqpHQck/m/z_YKOEeS37oJ", "n_sections": 28}, {"thread": "9tPwFqpHQck", "msg": "rR3xHn_00PQJ", "author": "David Hopwood", "date_disp": "Aug 5, 1997, 3:00:00\u202fAM", "subject": "SRP-2 as zero-knowledge ID protocol", "body_html": "
In message <5s5ek7$g...@drn.zippo.com>
p...@endjinn.prestel.co.uk writes:

> In article <199708041...@zetnet.co.uk>, David says...
> >

> >> 2. Soundness. A dishonest user (one who doesn't know the secret x)
> >> should, with high probability, be rejected by the host when he tries to
> >> masquerade as a legitimate user.

[...]


> >> Another way of saying 2 is that, if there is a way for a dishonest user
> >> to subvert the system with non-negligable probability, then this method
> >> can be used in some way by the dishonest user to recover the secret x.
> >> i.e. if the protocol is sound then any method of breaking it ultimately
> >> leads to a method of recovering the secret x.
> >
> >That's not correct (the last paragraph). As a trivial counter-example,
> >consider a protocol where nothing is sent apart from the user ID, and the
> >user is always accepted as legitimate. In that case 1 and 3 are satisfied,
> >the attacker cannot recover x (because it is never used!), but 2 is not
> >satisfied.

> Eh, what? Hold on a minute, what's going on here?

I thought you were saying that it was sufficient to prove that the secret
x could not be recovered, in order to prove 2, but on closer inspection I
just misread the paragraph.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/9tPwFqpHQck/m/rR3xHn_00PQJ", "n_sections": 28}, {"thread": "9vBLUtriq-4", "msg": "BDOU-04okrAJ", "author": "David Hopwood", "date_disp": "Sep 30, 1997, 3:00:00\u202fAM", "subject": "I Dood It!", "body_html": "

> On Sun, 28 Sep 1997 22:51:29 -0700, Anthony Stephen Szopa
(ant...@ciphile.com), waived his fifth amendment rights and wrote:
> :
> : Who said the array set of 3,628,800 arrays was to be shuffled only ONCE
> : using a 14 number sequence of the numbers 1 - 14? You did. I did not.

> : If one were to look at the web page, "What's It All About" one would
> : know the truth that the array set can be shuffled any number of times.
> : It is up to the user to determine the security level they feel
> : comfortable with.
> :
> : What if I shuffle each array set 10 times using a different sequence of
> : 14 numbers 1 - 14 with no repeats each of the ten times. Is this still
> : equivalent to about 40 bit encryption?

Yes. 10 permutations are no more secure than one permutation against a
brute-force search. Why? Because the set of permutations forms a group [*],
and therefore any number of permutations are equivalent to a single
permutation with some key. That is, there are only 14! (14 factorial
= less than 2^37) possibilities that need to be searched.

Now, I know that your full cipher is more complicated than that (in fact,
it seems to get ever more complicated, and less efficient, as people find
further attacks :-) However, if you don't understand the idea that
simple repetition of operations does not necessarily add to security,
I don't think much of your ability to design a secure cipher.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

[*] A mathematical concept, despite the claim that your cipher does
not depend on "mathematical formulae".

", "url": "https://groups.google.com/g/sci.crypt/c/9vBLUtriq-4/m/BDOU-04okrAJ", "n_sections": 100}, {"thread": "D6FA70dl44g", "msg": "hnzC2eGo2zsJ", "author": "David Hopwood", "date_disp": "Sep 12, 1997, 3:00:00\u202fAM", "subject": "Question : Which Operating System and download method.", "body_html": "
In message <34186020...@flash.net>

"Charles R. Lyttle" <lyt...@flash.net> writes:

> I am writing a crypto page for my web site. My IP says that they cannot
> support ftp for downloads due to bugs in Microsoft products. They
> indicated that the "prefered" download method was to use "save as" from
> a browser, or post only *.exe files that Windows will download. (The
> "save as" doesn't work for me when downloading *.Z files)

> Can anyone give me any hints on the best method to post files that


> _this_ group might be interested in downloading? I mostly use Unix
> variants, and my kids usually prefer Mac's.

Use ZIP format. Almost all browsers will handle this correctly, and it's
easy to find ZIP decompression programs for almost any OS. For example,
many Unix variants come with InfoZip's 'unzip' pre-installed, and if not
it's easy to give a link to it (I forget the URL; use a search engine).
For Windows, give a link to www.winzip.com. I believe StuffIt Expander
can also handle .zip files (I don't use Macs personally).

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk


", "url": "https://groups.google.com/g/sci.crypt/c/D6FA70dl44g/m/hnzC2eGo2zsJ", "n_sections": 6}, {"thread": "DQ3871faCCA", "msg": "O_B94TU4pXAJ", "author": "David Hopwood", "date_disp": "Sep 23, 1997, 3:00:00\u202fAM", "subject": "Oxley/Manton amendment to \"SAFE\" (was Re: Bernstein/Patel: 1. Government: 0.)", "body_html": "
In message <342626...@ciphile.com>
Anthony Stephen Szopa <ant...@ciphile.com> writes:

> W T Shaw wrote:
> >
> > Ann Beeson of the ACLU [...]
> > further said in conversation during a break, that with regards to
> > crypto, the government will probably claim national security interests and
> > the courts tend to bow to this.
> >
> > Personally, I don't like that forecast. It may well be that attempts to
> > limit particular individuals' free speech rights, like in the Bernstein
> > decision, are a means that we can use to bring this censorship problem
> > repeatedly before the court with specifics that have to be addressed by
> > the government. It is a question of validity of their reasons for claiming
> > national security, which they are not going to reveal for reasons of
> > national security. We all know that they are just hiding behind a veil
> > that Little Egypt would have been ashamed to try to use.
> > --
> > wts...@itexas.net--still programming crypto
> >
> > Have you bought your "Made in China" Jeffersonian Cylinders yet?
> > Be they only toys, they are novel to own, and can be modified.

> If it is a national security issue, then they could just as well outlaw
> private conversation spoken between face-to-face individuals, too: for
> national security reasons, of course.

> I don't think this argument will hold water against a free speech right
> guaranteed by the US Constitution.

Your faith in the constitution is touching, but from a non-U.S. point of
view, it's a rather flimsy document to be relying on, bearing in mind that
U.S. laws will inevitably influence encryption policy in the rest of the
world.

If the Oxley/Manton amendment to "SAFE" gets through, for instance,
importing those Jeffersonian Cylinders, or any other non-escrowed
encryption to the U.S. will be illegal.

Here's the text of the amendment from www.crypto.org, with my comments
preceded by "**".

----- start of quote

AMENDMENT OFFERED BY MR. OXLEY OF OHIO
AND MR. MANTON OF NEW YORK

TO THE AMENDMENT IN THE NATURE OF
A SUBSTITUTE OFFERED BY ___________

[decryption requirements and liability]

Page 2 of the amendment, after line 17, insert the following new paragraphs
(and redesignate the succeeding paragraph accordingly):

(3) DECRYPTION REQUIREMENTS FOR ENCRYPTION PRODUCTS AND SERVICES.

(A) RECOVERABLE PRODUCTS -- Notwithstanding
paragraph (1), effective January 1, 1999, no
person may manufacture, sell, or offer to the public,
in interstate commerce, or import into the United States,
any product or service that can be used to encrypt communications
or electronic information, unless such product or service
includes features --

(i) that permit immediate access to the plaintext of
such encrypted communications or electronic information without
the knowledge or cooperation of the person using such product
or service; or

(ii) that can be used only on systems or networks that include
such plaintext access features described in clause (I).

**
** "Manufacture, sell, offer to the public, or import". If your job
** involves selling strong, unescrowed cryptography, or if any of your
** products rely on it, better look for something else to do after 1999
** if this amendment gets through.
**
** Also note the complete lack of safeguards - it isn't even specified
** under what circumstances your communications can be read. This amendment
** effectively gives carte blanche to intercept anything.
**

(B) RULEMAKING -- Within 90 days after the date of enactment of the
Security and Freedom Through Encryption (SAFE) Act, the Attorney General
shall initiate a rulemaking proceeding to implement this paragraph. The
Attorney General shall complete such rulemaking proceeding within 1 year
after such date of enactment.

(C) CRIMINAL PENALTY -- Any person who violates this paragraph shall be
fined under title 18, United States Code, or imprisoned for not more than 5
years, or both.

(4) LIABILITY LIMITATIONS -- No person shall be subject to civil or
criminal liability for providing access to plaintext of an encrypted
communication or an encrypted electronic information or any other
assistance, to any law enforcement official or authorized government
entity, pursuant to a lawful request.

**
** This isn't even saying that access to plaintext requires a "lawful request"
** (whatever that is) - it is just authorizing people to act as informants
** without any fear of reprisals, in the case that there was a
"lawful request".
** Does this remind anyone of examples from history?
**

Page 3 of the Amendment, after line 12, insert the following new
subparagraphs (and redesignate seceding subparagraphs accordingly):

(C) ELECTRONIC INFORMATION -- The term 'electronic information' means
any signs, signals, writing, images, sounds, date, or intelligence of any
nature stored in whole or in part by a wire, radio, electromagnetic,
photo-electronic, or photo-optical system.

**
** In other words, any machine-assisted communication or stored data.
**

(D) PLAINTEXT -- The term 'plaintext' means, with respect to electronic
information or a communication, the form of the information or communication
before it has been encrypted or, if encrypted, the form after it has been
electronically transformed into its original form.

------- end of quote

Now tell me whether you think the proponents of this amendment have any regard
whatsoever for the U.S. constitution? See the post by Peter Trei with title
starting "Please CALL CONGRESS NOW", for how to protest against it.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/DQ3871faCCA/m/O_B94TU4pXAJ", "n_sections": 2}, {"thread": "DVSWBTKSVsg", "msg": "bGLvp6Ykv88J", "author": "David Hopwood", "date_disp": "Sep 9, 1997, 3:00:00\u202fAM", "subject": "Elliptic Curve SRP", "body_html": "
In message <341442...@neurophys.wisc.edu>

Medical Electronics Lab <ros...@neurophys.wisc.edu> writes:

> Thomas Wu wrote:
> > I'm not sure what you meant by 'time out', since the guessing attack
> > with x'' takes place completely offline. One of our objectives is to
> > protect users with easily guessable passwords from a dictionary search.

> A login fails if it times out. A dictionary attack won't work the


> first time. What you are saying is you don't care. The bogus host
> sends enough to get data, then doesn't bother with the rest of the
> login. This means the bogus host could find the password x and then
> login to the real system later. So the User->Bogus data path sends
> enough info for Bogus to become the User at some later time. I would
> hope that User's would notice when a bogus host shows up, but given
> the flash interfaces of the time, it's a bit much to ask.

A disconnection can easily be made to look like a network failure. In
general it's best to assume when designing protocols, that any party can
terminate the connection at any point without raising suspicion.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/DVSWBTKSVsg/m/bGLvp6Ykv88J", "n_sections": 13}, {"thread": "D_bs1Z9m04o", "msg": "N8rHDKXJlJEJ", "author": "David Hopwood", "date_disp": "Jul 4, 1997, 3:00:00\u202fAM", "subject": "Exporting a hash-based CFB/OFB cipher?", "body_html": "
In message <slrn5rmpp...@tjwhost.stanford.edu>
t...@tjwhost.stanford.edu (Tom Wu) writes:
[...]

> Let A(0) = 0'128 (128 bits worth of zeroes)
> A(n+1) = H(S, A(n))
[...]

> Most of you will probably recognize this as a crude stream cipher
> constructed from a hash function and running in OFB mode. This
> construction probably isn't particularly secure, since it's off the
> top of my head, but what I'm wondering is what the export status of
> something like this is.

It's an encryption algorithm, so it would be covered by the same rules
as other encryption algorithms.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/D_bs1Z9m04o/m/N8rHDKXJlJEJ", "n_sections": 2}, {"thread": "EZOMP9e6h6Y", "msg": "26fpsjbsp2kJ", "author": "David Hopwood", "date_disp": "Sep 6, 1997, 3:00:00\u202fAM", "subject": "Stream ciphers keyed using passwords", "body_html": "

In message <5uq8nk$2bj$1...@nntp.ucs.ubc.ca>
un...@physics.ubc.ca (Bill Unruh) writes:
[...]
> RC4 is a stream cypher so a password can NEVER be reused.

More precisely, it can't securely be re-used if you use the hash of a
password directly as a key - but that's not really a good idea anyway,
even for block ciphers. Instead a salted hash should be used, e.g.

encrypt(password, plaintext) = salt, E[H(salt, password)](plaintext)

where H is a collision-resistant hash function,
E[K](P) is encryption of P with key K,
salt is a random number that must not be repeated, and should be
long enough that an impractical amount of storage would be
needed to pre-calculate all possible hashes of a dictionary.

Better still is to make the hash function computationally expensive.
For example:

encrypt(password, plaintext) =
n, salt, E[H'(n, salt, password)](plaintext)

H'(n, salt, input) = input, if n = 0
= H'(n-1, salt, H(n, salt, input)), if n > 0

where n is a security parameter that should be as large as practical
(this ensures that the hash stays reasonably expensive as hardware gets
faster).

It's also a good idea to include integrity checks to prevent changes
to the ciphertext from resulting in undetectable changes to the plaintext.

Unfortunately, there are many released products that just do simple
encryption with H(password), without considering these kinds of issues
:-(.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/EZOMP9e6h6Y/m/26fpsjbsp2kJ", "n_sections": 1}, {"thread": "F_Ol2e9tzws", "msg": "e3LsyH2BB64J", "author": "David Hopwood", "date_disp": "Jul 17, 1997, 3:00:00\u202fAM", "subject": "SRP: A Proposal for Strong Password Authentication", "body_html": "
In message <slrn5spil...@tjwhost.stanford.edu>

t...@tjwhost.stanford.edu (Tom Wu) writes:
[...]
> The SRP-1 authentication and key-exchange protocol
> --------------------------------------------------
> N A large safe prime (N = 2q+1 where q is prime).
> All arithmetic is done modulo N.
> g A primitive root of GF(N). Also known as a "generator".
> s User's salt
> u Username
> P Cleartext Password
> H() One-way hash function
> ^ (Modular) Exponentiation
> Ws,Xs,Ys Secret values
> Wp,Xp,Yp Public values

> The host stores passwords using the following formula:

> Xs = s * H(P) (s is chosen randomly)
> Xp = g ^ Xs (computes password verifier)

> The host then keeps {u, s, Xp} in its password database.

> The authentication protocol itself goes as follows: [...]

There are two problems that I can see:

1. the server is not authenticated.

If a fake server knows Xp and s, that it all that is required is to pretend
to be the real server; just run through the protocol as normal.

If it does not know Xp, note that if the server sends a small N, there are
only N possible values of S. (There is a 1/N probability of the session
aborting because Z = 0, but let's assume that doesn't happen). The fake
server just finds H(S') for S' = 0..N-1, and tries each of these as session
keys (they can be verified against the H(Z, K) value sent by the user, for
example).

Not authenticating the server is a serious problem, since the user might
give away information when connected to the fake server, that would allow
the real account to be compromised.

2. H(P) can be found using an expected number of sessions proportional to the
number of bits in H(P). In each of these sessions, the user must be
connected to the attacker's server. The attacker does not need to know Xp.

Let i be the number of this session. Choose Ni to be a prime small
enough that
it is practical to do on average Ni modular exponentiations in GF(Ni), in a
reasonable time (but as large as possible within that constraint). Set s and
g to be any convenient values.

The session goes like this:

User -> Attacker: u (identifies self)
Attacker -> User: Ni, g, s (replies with fake parameters)
User -> Attacker: Wp = g ^ Ws (Ws = random number)

The attacker now calculates the discrete log Ws, which is easy because Ni is
small.

Attacker -> User: Z (any Z will do)

User: Xs = s * H(P) (user enters password)
User: Xp = g ^ Xs (computes verifier)

User: Yp = Z - Xp
= Z - (g ^ Xs)


User: S = Yp ^ (Ws + Xs) (computes session key)

= (Z - (g ^ Xs)) ^ (Ws + Xs)
User: K = H(S)

User -> Attacker: X = H(Z, K)

At this point the attacker brute-forces S, by testing whether X =
H(Z, H(S'))
for each S' = 0..Ni-1 (there is unlikely to be more than one match - that
would be a collision for the hash function).

Then, he or she brute-forces Xs by testing whether
S = (Z - (g ^ Xs')) ^ (Ws + Xs') for each Xs' = 0..Ni-1.

I think (I'm not entirely sure about this, so correct me if I'm wrong) that
any 'accidental' matches can be modelled as if the right-hand-side of this
equation is a random function of Xs'. In that case there will be one correct
match, and the number of accidental matches will follow a Poisson
distribution (the expected total number of matches is 2). Each candidate
for Xs gives a candidate for H(P) mod Ni, since s is known.

By repeating for various Ni, s, and Z, the attacker can gain more
information about H(P). Finding a unique value of H(P) (using a combination
of brute-force and the Chinese Remander Theorem) is left as an exercise for
the reader, since I've spent far too much time on this already :-)

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/F_Ol2e9tzws/m/e3LsyH2BB64J", "n_sections": 33}, {"thread": "F_Ol2e9tzws", "msg": "qCwKaJ7UfNMJ", "author": "David Hopwood", "date_disp": "Jul 19, 1997, 3:00:00\u202fAM", "subject": "SRP: A Proposal for Strong Password Authentication", "body_html": "
In message <slrn5sspi...@tjwhost.stanford.edu>
t...@tjwhost.stanford.edu (Tom Wu) writes:

> I'm also interested in knowing what people think about where a strong
> protocol like SRP fits into the scheme of things. I claim that it has
> all the advantages and strengths of the EKE protocols (e.g. DH-EKE, SPEKE)
> like resistance to dictionary attacks and forward secrecy, plus some
> resistance to stolen verifiers. That would make it more like A-EKE and
> related protocols, but with significantly better performance.

For another protocol (called SID) inspired by EKE et al, see
http://www.users.zetnet.co.uk/hopwood/crypto/sid/

It's not a password-based protocol; it requires key information to be stored
at both ends. I'm in the process of modifying it to use Diffie-Hellman (in
a similar way to DH-EKE) as a simplification and to improve efficiency,
but that version isn't on the web yet. A full description would probably be
too long to post here, but these are the goals:

--- begin quote from web page

Suppose that Alice communicates regularly with Bob. SID has the
following properties that are not true in general of protocols that provide
authentication and secure channels:

<ul>
<li> Alice requires a private key in order to connect to Bob. Suppose that
Eve has captured this private key, and has used it to pretend to be
Alice. The next time the real Alice attempts to connect to Bob, she will
detect that someone has impersonated her (and similarly with
Alice and Bob
exchanged).

<li> Even if both current private keys have been compromised, if the
real Alice and Bob communicate using this protocol at a
later time without a man-in-the-middle, they will detect whether one
or both of them was impersonated.

<li> A passive attack on the protocol, i.e. eavesdropping a session and
attempting to determine what was sent over it, requires breaking either
a random public key or the session key, <em>for each session</em>.
This applies even if all the keys that have ever been stored by
Alice and Bob (as opposed to temporary keys held in memory) are known
to the attacker.

<li> Alice does not possess the information necessary for anyone to fool
her into thinking they are Bob, or vice-versa.

<li> The key exchange protocol is designed not to encrypt any plaintext
that could be known to an attacker, with any key. Each block of
input to the public key algorithm is unpredictable and
uniformly distributed. Also, nothing is encrypted using a private
key, so no additional information about any private key is available
to a cryptanalyst.

<li> For the body of the session, after key exchange, an encryption mode
is used that combines a block cipher and a stream cipher to make
known or chosen plaintext attacks much more difficult. A more detailed
analysis of this mode is given [link].

<li> In order to perform a man-in-the-middle attack, i.e. where Alice is
connected to Bob but an attacker can intercept and change messages,
knowledge of two private keys is required, one that is normally held
only by Alice and one normally held only by Bob.

<li> After Alice and Bob's first session, the corresponding pseudo-public
keys are themselves secret. I.e. without eavesdropping the first
session, even someone who can easily break the public-key algorithm
cannot get any farther without breaking a session key, or finding
the pseudo-public or private keys by non-cryptanalytic means.

<li> Pseudo-public keys are changed once per session, so the previous
statement can be generalised: without eavesdropping session n, even
someone who can easily break the public-key algorithm cannot attack
sessions n+1 or later, except by breaking their session keys or
obtaining keys by non-cryptanalytic means.

<li> Because separate pseudo-public keys are used between each pair of
users, Bob cannot cheat and impersonate Alice to another user, even
if he finds the private key Alice uses to connect to him.

<li> The time between sessions can be used to determine a level of paranoia
against attacks on the public-key algorithm (for example, factoring
the modulus in the case of RSA, or calculating discrete logarithms
for El Gamal). If the time between two sessions exceeds the paranoia
setting, a dummy session can be inserted to change the current keys.
This means that the time available to crack a pseudo-public key in order
to try to impersonate Alice or Bob, or to perform a man-in-the-middle
attack, can be limited to whatever is desired.

<li> To try to make man-in-the-middle attacks using compromised private
keys more difficult, there is a protocol (which can be initiated at any
time during a session) that forces communication to take place in
simultaneous rounds. For example, Alice and Bob can simultaneously pose
a list of questions to each other, then simultaneously answer them.
This prevents automated MITM attacks using a simple computer program,
since the man-in-the-middle needs to guess Alice and Bob's responses
sufficiently well to fool both of them.

<li> Optionally, protection against limited denial of service attacks can
be implemented. If an attacker can insert records, change them, or
cause them to be dropped, but some proportion of records get through
correctly, the connection can continue uninterrupted using the
remaining bandwidth.
For this to be useful, other denial-of-service attacks on the underlying
transport should also be plugged.

<li> Any combination of public key encryption algorithm, block cipher, and
stream cipher may be used. Algorithms and key lengths can be
different from session to session. For example, this allows the
pseudo-public key length to be increased over time, to take into account
improvements in computing power or factoring algorithms. It also
allows algorithms (either public- or secret-key) whose security has
been found to be in doubt to be dropped with a minimum of
hassle or risk.
</ul>

These statements rely on each user's software being worthy of that
user's trust. A cryptographic protocol cannot prevent, for example, a Trojan
being installed on a user's machine that captures the plaintext of every
transmission, or modifies the user's keys. Given that assumption, though,
few if any other authentication systems provide comparable security against
attacks that involve private keys being compromised.

--- end of quote

> I'm exploring the possibility of using something like this to upgrade
> /etc/passwd and other remote password auth mechanisms. Storing Xp in a
> file like /etc/shadow would not only slow down local dictionary attacks
> greatly (expmods are slow compared to one-way hashes), but it would also
> seal off the network completely from traditional dictionary attacks.
> Since it does a secure key exchange for free, session encryption and
> protection from TCP/IP hijacking could be added easily. Comments?

I think the requirement for the client not to store any information other
than the passphrase limits the degree of security that can be achieved.
Strong server authentication is needed just as much as strong client
authentication.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/F_Ol2e9tzws/m/qCwKaJ7UfNMJ", "n_sections": 33}, {"thread": "LYiDL2Y3M1s", "msg": "2WBvgQCNsyMJ", "author": "David Hopwood", "date_disp": "Sep 8, 1997, 3:00:00\u202fAM", "subject": "Prove Who the Fool Really Is", "body_html": "
In message <34135F...@ciphile.com>

Anthony Stephen Szopa <ant...@ciphile.com> writes:

> I know you are all very busy.

> I would be happy to send you all the information you'd like including
> the software. But let's hear what Bill Clinton has to say about
> exporting it first.

If you have any crypto code that you want to make its way out of the U.S.,
that's very simple - just put it on an "export-controlled" web site, and
post where it is.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/LYiDL2Y3M1s/m/2WBvgQCNsyMJ", "n_sections": 44}, {"thread": "WMcxcAo3QFY", "msg": "UNHEr-hqNhoJ", "author": "David Hopwood", "date_disp": "Jul 9, 1997, 3:00:00\u202fAM", "subject": "Java and Cryptography", "body_html": "
In message <33C27297...@DeletethiS.aros.net>

"Peter K. Boucher" <pbou...@DeletethiS.aros.net> writes:

> Steve Gilham, Informatix Software International, Ltd. wrote:

> > capk...@aol.com (CAP K9 SAR) asked
> >

> > >Has Java been used in cryptography at all?
> >

> > Yes; there is the Cryptix freeware library which has been around for a
> > while now, and in the last few days, there has been some discussion of
> > the subject on this newsgroup.
> >

> > >Namely have any Algorithms been created in Java?
> >

> > Java is just another programming language; the implementation of an
> > algorithm is essentially independent of the creation of the algorithm.

> There are two crypto issues raised by the fact that Java is interpreted
> by the JVM:
> 1) It's way too slow.

I don't agree.

For symmetric crypto, here are some performance figures, all for pure-
Java implementations:

[From Raif Naffah, re a not-yet-released version of Cryptix. Performance
of the actual release may differ either way, but probably not by a large
amount.]

# Symmetric block cipher (BC) performance tests
# -------------------------------------------------
# I downloaded the latest JDK 1.1.3 and the preview JIT from Sun (made
# I believe by Symantec). I already had a test class for the BCs so I
# updated it to include Loki and ran it with and without the JIT. Here
# are the results (on my P133/W95) for encrypting 1 Mega-bytes.
#
# Without JIT With JIT
# Cipher Time* Rate Time Rate
# -------------------------------------------------------
# Blowfish 10,820 757 1,870 4,380
# CAST5 13,020 629 2,520 3,250
# RC2 19,550 419 2,220 3,723
# IDEA 21,200 385 3,240 2,528
# SAFER 27,350 299 3,290 2,489
[earlier versions of LOKI omitted]
# LOKI91 1.1 (fast) 14,440 567 2,530 3,237
#
# * Times are in millis and Rates in Kilo-bits/sec.

This list doesn't include SPEED and RC4, which if I remember
correctly are faster than the above ciphers. 250-500+ Kbytes/sec on
typical end-user hardware is easily sufficient for a large number
of applications.

Public-key crypto using modular bignum arithmetic is not significantly
slower than an implementation in C, since all the hard work is done in
the native code for java.math.BigInteger. (BigInteger could be
implemented partly in assembler if necessary; that's a quality-of-VM
issue).

In any case, concentrating mainly on speed misses several advantages
of Java over other languages:

- Java has a standard object-oriented API, the Java Cryptography
Extension, for using cryptography and for providing cryptographic
services. Although it's currently in alpha, this is likely to be part
of the standard library provided by all implementations in Java 1.2.

- It has built-in support for multi-threading, which makes it much easier
to hide cryptographic processing in user pauses, or to exploit
parallelism on multiprocessor machines.

- It is considerably harder to write code with unintentional security
bugs (for example buffer overflows), that may be exploited to compromise
keys or data. This is particularly significant for network servers.

- It has dynamic linking mechanisms that make it easy to plug in crypto
providers from different sources (useful for legally bypassing export
or patent restrictions).

These advantages also apply when the algorithms are written as native
code and called from Java (Cryptix will support this in a future version,
incidentally - most of the native code is already written).

It is certainly possible to implement some of the features above in other
languages, but not without expending a considerable amount of effort that
would not be necessary in Java. In general, I would consider Java to be an
excellent language for writing cryptographic applications.

> 2) The exportability of otherwise exportable stuff (e.g., 40-bit crypto)
> is questionable because it's much easier to decompile and modify Java
> byte-code than optimized, stripped binary executables.

The difficulty or otherwise of decompiling code doesn't make any difference
to whether it is exportable. Also, 40-bit crypto doesn't provide adequate
security (a lot of people have access to a few hours on a lab of workstations,
which is all that you need for a brute-force attack), so it doesn't really
matter whether or not it is exportable.

If export restrictions are a problem, ask users to link with a cryptography
library from outside the US. There are several of them available for Java
(for example, as well as Cryptix, there is a commercial library from
Baltimore Technologies, based in Ireland).

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/WMcxcAo3QFY/m/UNHEr-hqNhoJ", "n_sections": 8}, {"thread": "cvRiECU8pw4", "msg": "RDvUXdko_HYJ", "author": "David Hopwood", "date_disp": "Jul 19, 1997, 3:00:00\u202fAM", "subject": "C code in Applied Cryptography (was Re: Why is IDEA only 128 bits)", "body_html": "
In message <5qoli4$flg$1...@news.cis.ohio-state.edu>
car...@brain.cis.ohio-state.edu (mark carroll) writes:

> In article <5qnppb$ek1$1...@nimble.mta.ca>,
> Michael C Taylor <mcta...@fractal.mta.ca> wrote:
> >David A. Scott (an...@yfn.ysu.edu) wrote:
> >
> >: In a previous article, car...@eye.cis.ohio-state.edu (mark carroll) says:
> >
> >: >Portable C crypto stuff: also, you could check out part five of
> >: >Schneier's "Applied Cryptography" for a good example.
> >
> >I disagree. The example C code in AC does not work "out of the box" for
> >a 64-bit little-endian processor. Not all programming is done on Intel
> >x86.

> It doesn't? There are '#ifdef LITTLE_ENDIAN' lines and things (at
> least in the second edition), which suggest some concerns about
> endian-ness...

#ifdef LITTLE_ENDIAN isn't used consistently; the code for some of the
algorithms requires you to comment out various lines. Also the set of
typedefs used to provide types of known lengths is different for each
algorithm.

A suggestion to Bruce for the next edition: use the same macros and
typedefs between algorithms, and consistent naming conventions for
encryption, decryption, key setup, etc.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/cvRiECU8pw4/m/RDvUXdko_HYJ", "n_sections": 1}, {"thread": "fDcdxekhHrw", "msg": "fTgwVL_9vz0J", "author": "David Hopwood", "date_disp": "Aug 21, 1997, 3:00:00\u202fAM", "subject": "A Little PGP Attacker", "body_html": "
In message <33FB29...@afit.af.mil>
"KELCE S. WILSON" <kwi...@afit.af.mil> writes:

> Jonathan wrote:
> > Or are you drawing a distinction between n and phi(n)?

> In this case, he was referring to the size of PHI(n). In my
> posts I have alternated between using PHI(n) as the SET
> of all integers up to n not including and factors of p and q,
> and the SIZE of the set.

> Really, I wish there was better notation. Perhaps from now
> on I'll use PHI(n) as the SET and phi(n) as the SIZE of the
> set.

A more common notation is to use |S| for the size of S (assuming
S is a finite set). So in this case it would be phi(n) and |phi(n)|.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/fDcdxekhHrw/m/fTgwVL_9vz0J", "n_sections": 31}, {"thread": "gWpFkLTRwLA", "msg": "TOMt8pGZ_VAJ", "author": "David Hopwood", "date_disp": "Jul 17, 1997, 3:00:00\u202fAM", "subject": "Why is IDEA only 128 bits", "body_html": "
In message <5qiing$f...@news.ysu.edu>

an...@yfn.ysu.edu (David A. Scott) writes:

> In a previous article, pat...@gryphon.psych.ox.ac.uk (Patrick Juola) says:

> > David Scott wrote:
> > >But be careful the old crypto people think [scott16u] is weak


> >
> >Only because Paul Onions cracked the first version in a week.

> True the first version was cracked because Paul Onions had found
> a plain text attack and I never considered that before. However it was


> not a week the contest was old then

It was about two weeks - and the fact that you hadn't considered plaintext
attacks doesn't inspire confidence.

> and people saying key to long. By the

> way the contest as never been sloved yet. When I release the next contest


> for scott16u.zip I will allow plain texts attacks. I just have to find
> a way to test it with out anwsering hunreds of plaintext things. As far
> as I know no one has ever ofered a contest where plain text attacks allowed.

There have been several contests that offered money for any attack at all
(Dr. Dobbs Journal offered this for Blowfish, IIRC, although there was some
controversy about the payout for someone who found a set of partially weak
keys).

> Any one have bright ideas how to do it so I don't have to run my program
> several times over and over?

That's no problem; when someone is testing an attack they can use their own
plaintext, so you will only have to do this in order to confirm attacks that
are already known to work. Just make sure that you provide source-code for an
implementation in _portable_ C (i.e. no reliance on byte order, unaligned
memory accesses, etc.), or Java.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/gWpFkLTRwLA/m/TOMt8pGZ_VAJ", "n_sections": 54}, {"thread": "geVjUutTHHY", "msg": "4pGoJDZByFAJ", "author": "David Hopwood", "date_disp": "Jul 12, 1997, 3:00:00\u202fAM", "subject": "Random Numbers", "body_html": "
In message <33C548...@NOSPAMSun.Com>
Michael Sierchio <Michael....@NOSPAMSun.Com> writes:

> [...] I assume that a "random" stream of bits is one that


> meets the criteria in my earlier post: in addition to the
> various statistical and heuristic tests, the most general
> properties are:

> 0 and 1 are equally expected as the next bit

> no amount of previous data will be of any
> value in predicting the next bit

Depending on the application, that may be enough, or the following
additional property may be required:

no amount of future data, apart from the next bit itself, will
be of value in predicting the next bit

That is, if s is a sequence of bits, then it should be
computationally infeasible for a potential attacker, who knows s[i]
for all i != k (but does not a priori know s[k]), to predict s[k]
with significantly more than a 50% probability of success.

[The definition of "significantly" depends on the application; for
example, if an attacker has a 50.00001% probability of predicting
s[k], that may or may not be important.]

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/geVjUutTHHY/m/4pGoJDZByFAJ", "n_sections": 17}, {"thread": "geVjUutTHHY", "msg": "77b3JSKsoPgJ", "author": "David Hopwood", "date_disp": "Jul 15, 1997, 3:00:00\u202fAM", "subject": "Random Numbers", "body_html": "
In message <33CA43...@qanv.pbz>
Michael Sierchio <xh...@qanv.pbz> writes:

> Patrick Juola wrote:
> >
> > In article <33C955...@qanv.pbz> xh...@qanv.pbz writes:
> > >David Hopwood wrote:
> > >
> > >> > 0 and 1 are equally expected as the next bit
> > >>
> > >> > no amount of previous data will be of any
> > >> > value in predicting the next bit
> > >>
> > >> Depending on the application, that may be enough, or the following
> > >> additional property may be required:
> > >>
> > >> no amount of future data, apart from the next bit itself, will
> > >> be of value in predicting the next bit
> > >
> > >Same as #2, if you think about it. Today is yesterday's tomorrow....
> >
> > Not true.

> Stop. Think. There's no such thing as "future data". Datum means something
> that has been given (capta are what you got, data are what were sent).

The original statement I replied to was expressed in terms of 'previous'
and 'next' bits. In context, 'previous' clearly meant bits generated earlier
in the sequence than the one that was to be predicted.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/geVjUutTHHY/m/77b3JSKsoPgJ", "n_sections": 17}, {"thread": "h3mSCl46QkM", "msg": "84B9zuV2Gg8J", "author": "David Hopwood", "date_disp": "Jul 16, 1997, 3:00:00\u202fAM", "subject": "Multiplication in El Gamal (was Re: don't use PGP 5 ...)", "body_html": "
In message <wimlEDD...@netcom.com>
wi...@netcom.com (Wim Lewis) writes:

[re: El Gamal as described in Applied Cryptography 2nd ed. Section 19.6]

> ElGamal is essentially Diffie-Hellman turned sideways. The public key
> consists of the shared information (p, g) and the first part of the
> key-exchange (y=g^a). The encrypted message has two parts: the second
> part of the key exchange (g^b) and the message multiplied by the
> newly-shared DH key (M*y^b = M*g^(ab)). To decrypt, the recipient
> uses the first part of the encrypted message to complete the D-H protocol,
> recovers the shared key, and recovers the plaintext from the second part
> through a simple act of division. You could presumably replace the
> multiplication with a more secure symmetric cipher...

I was wondering about that - any particular reason why multiplication is
specified? It gives me a decidedly cool, unfuzzy feeling to think of all
the algebraic properties of multiplication in GF(p) that might be
exploited...

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/h3mSCl46QkM/m/84B9zuV2Gg8J", "n_sections": 7}, {"thread": "h3mSCl46QkM", "msg": "-8Kbw5hnw0EJ", "author": "David Hopwood", "date_disp": "Jul 19, 1997, 3:00:00\u202fAM", "subject": "Multiplication in El Gamal (was Re: don't use PGP 5 ...)", "body_html": "
In message <5qm7h2$a...@news.ysu.edu>

an...@yfn.ysu.edu (David A. Scott) writes:

> In a previous article, d...@joseph.cs.berkeley.edu (David Wagner) says:

> >All in all, I think the cautious way to implement El Gamal is to hash
> >g^{ab} mod p, and encrypt M using 3-DES keyed by the hash output.

> What is wrong with dropping El Gammal altogether and just using
> straight Diffie-Hellman to form the session key?

Diffie-Hellman isn't a public-key encryption algorithm; it's a key-exchange
algorithm. That means it can't be used directly in non-interactive protocols
(although the variant described by David Wagner above is probably about as
near to straight Diffie-Hellman as you can get in a non-interactive protocol).

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/h3mSCl46QkM/m/-8Kbw5hnw0EJ", "n_sections": 7}, {"thread": "h3mSCl46QkM", "msg": "52UpxzIlw-gJ", "author": "David Hopwood", "date_disp": "Jul 19, 1997, 3:00:00\u202fAM", "subject": "Multiplication in El Gamal (was Re: don't use PGP 5 ...)", "body_html": "
In message <5qlvhl$2...@joseph.cs.berkeley.edu>
d...@joseph.cs.berkeley.edu (David Wagner) writes:

> In article <199707162...@zetnet.co.uk>,
> David Hopwood <hop...@zetnet.co.uk> wrote:

> > It gives me a decidedly cool, unfuzzy feeling to think of all
> > the algebraic properties of multiplication in GF(p) that might be
> > exploited...

> Your intuition is good. Wei Dai has pointed out one attack based on


> the use of multiplication; and Hal Finney has pointed out a similar concern.

> Wei Dai notes that you can easily recover ab mod q for all small prime
> divisors q | p-1. (In particular, q = 2 means that you can recover the
> quadratic reciprocity of g^{ab} mod p.) Given M * g^{ab} mod p, this
> lets you recover M mod q for all such q; now you can use the Chinese
> Remainder Theorem to recover a number of bits of M.

Ouch, this on its own is enough to convince me not to use multiplication.

> Hal Finney also pointed out a concern with using PKCS padding and El
> Gamal encryption -- with PKCS padding, M will have a very simple structure,
> which might be exploitable.

> All in all, I think the cautious way to implement El Gamal is to hash


> g^{ab} mod p, and encrypt M using 3-DES keyed by the hash output.

Let me write that out in full so that I'm sure I understand it.

E is a symmetric encryption algorithm (in some secure mode, probably
not ECB), and H is a cryptographic hash function. The output of H should
be usable as a key for E, truncated if necessary.

The public key is:
p prime (can be shared among a group of users). For maximum security
(p-1)/2 should also be prime.
g a generator of GF(p) (can be shared among a group of users).
y = g^x mod p

The private key is:
x < p

Encryption of M:
choose k < p, relatively prime to p-1
a = g^k mod p
b = E[H(y^k mod p)](M)
C = (a, b)

Decryption of C = (a, b):
M = D[H(a^x mod p)](b)

x and k need not be as long as p (table 19.7 in Schneier seems to suggest
160 bits; is that reasonable?)

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/h3mSCl46QkM/m/52UpxzIlw-gJ", "n_sections": 7}, {"thread": "hD7shGe3EfE", "msg": "2dsppm_O3Q4J", "author": "David Hopwood", "date_disp": "Jul 2, 1997, 3:00:00\u202fAM", "subject": "Draft AES Announcement", "body_html": "
In message <33b8a3d7...@news.io.com>
rit...@io.com (Terry Ritter) writes:

> >>Java bytecodes represent a virtual stack machine, but our CPU's
> >>are register-based. This is an architectural mismatch which takes a
> >>toll in execution overhead: most bytecodes do not have a
> >>single-instruction equivalent on the register machine.
> >>
> >>One might argue that a better compiler could provide a better match,
> >>which is true enough, but when a Java compiler produces bytecodes, it
> >>discards a lot of useful information which subsequent compilation can
> >>no longer use in optimization.

Actually almost no information is lost (as should be clear from the fact
that you can fairly easily decompile bytecode to source that is similar
to the original). DEC's JIT implementation apparently does a good job of
converting bytecode to native instructions with efficient register
allocation.

Also note that Java bytecodes do not correspond to a pure stack machine;
it is a hybrid, with local variables referred to using registers.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/hD7shGe3EfE/m/2dsppm_O3Q4J", "n_sections": 27}, {"thread": "iLRbN6inu9k", "msg": "2q0ALZ3l4kAJ", "author": "David Hopwood", "date_disp": "Jul 20, 1997, 3:00:00\u202fAM", "subject": "Multiplication in El Gamal (was Re: don't use PGP 5 ...)", "body_html": "
In message <199707190...@zetnet.co.uk>, I wrote:

> In message <5qlvhl$2...@joseph.cs.berkeley.edu>
> d...@joseph.cs.berkeley.edu (David Wagner) writes:

> > All in all, I think the cautious way to implement El Gamal is to hash
> > g^{ab} mod p, and encrypt M using 3-DES keyed by the hash output.

> Let me write that out in full so that I'm sure I understand it.
[...]
> The public key is:
> p prime (can be shared among a group of users). For maximum security
> (p-1)/2 should also be prime.
> g a generator of GF(p) (can be shared among a group of users).
> y = g^x mod p

> The private key is:
> x < p

> Encryption of M:
> choose k < p, relatively prime to p-1
> a = g^k mod p
> b = E[H(y^k mod p)](M)
> C = (a, b)

Why does k have to be relatively prime to p-1? I just copied that restriction
out of Schneier, but I haven't seen it in any other descriptions of Diffie-
Hellman or El Gamal.

If k should be relatively prime to p-1, does that also apply to x (since
they are just the two Diffie-Hellman exponents)?

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/iLRbN6inu9k/m/2q0ALZ3l4kAJ", "n_sections": 3}, {"thread": "jUPCW3P-l5o", "msg": "dN4-azVDMR0J", "author": "David Hopwood", "date_disp": "Aug 25, 1997, 3:00:00\u202fAM", "subject": "SRP-3: Improved Strong Password Authentication", "body_html": "
In message <5trirk$ked$1...@Radon.Stanford.EDU>
t...@cs.Stanford.EDU (Thomas Wu) writes:
[...]
> The authentication protocol itself goes as follows:

> User -> Host: u (identifies self)
> Host -> User: s (replies with salt)
> User -> Host: Wp = g^Ws (Ws = random number)

> Host -> User: Z = Xp + g^Ys, U (Ys = random number,
> U = t-bit random number)

Since Wp does not depend on s, and s does not prove anything to the
user, the number of round-trip messages can be reduced without any
effect on security:

User -> Host: u, Wp = g^Ws (identifies self,
Ws = random number)
Host -> User: s, Z = Xp + g^Ys, U (replies with salt,
Ys = random number,
U = t-bit random number)

> Software that implements the SRP-3 protocol in the form of Telnet and FTP
> extensions is also downloadable (available on six platforms and Java).

If this protocol survives sci.crypt, would you mind if the Java
implementation is included with the Cryptix freeware library
(http://www.systemics.com/docs/cryptix/)?

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/jUPCW3P-l5o/m/dN4-azVDMR0J", "n_sections": 14}, {"thread": "jUPCW3P-l5o", "msg": "PIcBIv0ZMAAJ", "author": "David Hopwood", "date_disp": "Sep 1, 1997, 3:00:00\u202fAM", "subject": "SRP-3: Improved Strong Password Authentication", "body_html": "
In message <3409CC...@cs.hope.edu>
John Krueger <kru...@cs.hope.edu> writes:

> I know I'm probably missing something obvious here, but what
> advantages does SRP have over the following protocol?

> N=large safe prime
> g=generator mod N
> U=Username
> S=salt value
> p=hashed, salted user password
> P=g^p=password verifier
> h=Hosts's private key
> H=g^h=Host's public key
> y,z=secret ephemeral values
> Y,Z=public ephemeral values
> K=session key

> Host stores U, P, S for each user
> h, H
> User remembers password

> User->Host: U, Y=g^y (y is randomly generated)
> Host->User: S, H, Z=g^z (z is randomly generated)

> Host: K=hash(Y^h, P^z)
> User: K=hash(H^y, Z^p)

In this protocol, if an attacker pretending to be the host chooses
Z = 0 or Z = 1 (and any consistent values for h and H), he/she doesn't
need to know P.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/jUPCW3P-l5o/m/PIcBIv0ZMAAJ", "n_sections": 14}, {"thread": "jUPCW3P-l5o", "msg": "6tQGey_ImRQJ", "author": "David Hopwood", "date_disp": "Sep 7, 1997, 3:00:00\u202fAM", "subject": "SRP-3: Improved Strong Password Authentication", "body_html": "

In message <34116C...@cs.hope.edu>
John Krueger <kru...@cs.hope.edu> writes:

> Thomas Wu wrote:
> >
> > John Krueger (kru...@cs.hope.edu) wrote:
> >
> > : David Hopwood wrote:
> > : > In this protocol, if an attacker pretending to be the host chooses
> > : > Z = 0 or Z = 1 (and any consistent values for h and H), he/she doesn't
> > : > need to know P.
> >

> > : OK, that's one obvious thing I missed. [...]


> > : Anything else?
> >
> > Er, it's still broken, since any impostor host can perform a dictionary
> > attack against the password if SHA(H) is not predistributed like you

> > suggest. [...]
[...]


> Without any way of verifying H, we might as well leave it out of the
> protocol:

> User->Host: U
> Host->User: S, Z=g^z (z is randomly generated)

> Host: K=hash(P^z)
> User: K=hash(Z^p)

[I assume you mean that hash implicitly uses the salt S?]

> (User checks that Z!={-1, 0, 1} and, of course, they both verify K.)

> If there's a problem with this, I don't see it.

An eavesdropper records a session, then

for each guessed password p':
K' = hash(Z^p')
check whether K' verifies correctly, or whether the data sent makes
sense when decrypted using K'. If so p' is almost certainly the
password.

This protocol is also broken because S is not verified, so an active
attacker can choose the salt value, making pre-computation attacks
possible.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/jUPCW3P-l5o/m/6tQGey_ImRQJ", "n_sections": 14}, {"thread": "lmiA-ZDxNKU", "msg": "Nyq87AUiyzMJ", "author": "David Hopwood", "date_disp": "Jul 9, 1997, 3:00:00\u202fAM", "subject": "Hardware random number generator!", "body_html": "
In message <5pu1rr$1...@sun001.spd.dsccc.com>
jmcc...@sun1307.spd.dsccc.com (Mike McCarty) writes:

> In article <33b92aa7....@news.pipeline.com>,
> <DESPAM...@pipeline.comDESPAM> wrote:

> )If I flip a coin in a cup into which you
> )cannot see and I look at the outcome but you cannot, there is nothing
> )random about the outcome for me, given my state of information.
> )However, given your state of information, the outcome is purely random
> )and you may as well guess heads as tails. For practical purposes,
> )randomness is in the eyes of the beholder.

> Ultimately you have fallen into a common trap. You think of the
> -outcome- as being random. This is not the case. The -outcome- is not
> what is random or non-random or biassed or whatever. It is the
> -process- which is random etc. Since the rest of your argument was based
> on this flawed premise, I cut it.

I can't see anything wrong with his argument. For cryptography it doesn't
matter so much whether the _process_ is random; it matters whether an
attacker can distinguish the output from that of a random process (i.e.
what is the best model available to that attacker to predict properties
of the output?)

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/lmiA-ZDxNKU/m/Nyq87AUiyzMJ", "n_sections": 95}, {"thread": "m1qu-nBnyDA", "msg": "4rGPklovbpsJ", "author": "David Hopwood", "date_disp": "Jul 6, 1997, 3:00:00\u202fAM", "subject": "Does this suck?", "body_html": "
In message <33BEB0...@nextek.net>
frank <fr...@nextek.net> writes:

> This is basically it, you enter in which file you want to encrypt and
> name an output file, which it creates. Then you enter the keyspace and
> each digit of the key. It then cycles through the key, using each one
> 100 times, adding it to 100 bytes drawn from a file stream, putting each
> one in the new file as it goes. At the end of the key, it goes back to
> the first digit of the key and starts again. Then the decryption program
> asks again how many digits in the keyspace, and asks for the digits. It
> then goes through the same process, subtracting from each byte instead
> of adding.

You mean something like this?

// Java code
byte[] crypt(byte[] plaintext, byte[] key1, byte[] key2) {
int i = 0; // index into key1
int j = 0; // index into key2
byte[] ciphertext = new byte[plaintext.length];

for (int p = 0; p < plaintext.length; p++) {
ciphertext[p] = (byte) (plaintext[p] + key1[i] - key2[j]);
i = (i+1) % key1.length;
j = (j+1) % key2.length;
}
return ciphertext;
}

This is basically addition mod 256 (or mod whatever the alphabet size
is) with a repeated key of length equal to the lowest common denominator
of key1.length and key2.length.

Addition with a repeated key can be easily broken in much the same way
as XOR with a repeated key - see the sci.crypt FAQ, for example.

OTOH I may have misinterpreted your description - if so try expressing
it using mathematics or in a programming language.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/m1qu-nBnyDA/m/4rGPklovbpsJ", "n_sections": 3}, {"thread": "odQ7EH10V8E", "msg": "UOjlqpmD6XIJ", "author": "David Hopwood", "date_disp": "Aug 28, 1997, 3:00:00\u202fAM", "subject": "RC4 - license from RSA req.?", "body_html": "
In message <34042EAB...@utimaco.co.at>
Michael Schmidt <Michael...@utimaco.co.at> writes:

> Hi,

> Can anybody tell me how the current situation of licensing RC4 is?

> I want to use a public domain implementation of RC4 for a commercial
> product. I'm basically interested in a distribution out of the US.

> Do I need a license from RSA[DSI]???

My understanding is no: since RC4 is not patented in any country, you
aren't legally required to have a license from RSADSI.

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/odQ7EH10V8E/m/UOjlqpmD6XIJ", "n_sections": 3}, {"thread": "tU9OWjOjcqk", "msg": "jdfNTgFotMwJ", "author": "David Hopwood", "date_disp": "Jul 24, 1997, 3:00:00\u202fAM", "subject": "Which type of encrypttion was used?", "body_html": "
In message <5r1ent$iih$1...@ousrvr3.oulu.fi>
la...@stekt.oulu.fi (Lauri Pirttiaho) writes:

> Gerry Brown (ge...@apple.com) wrote:
> > I'm new at the crypto stuff and was wondering if it is possible to
> > determine which method was used to encrypt a public key? Is there an
> > "agreed upon" header with that kind of information? (My gut feeling is
> > "no" since it would give an attacker information.)

> Why would you bother to encrypt a public key?

That probably wasn't what the original poster meant, but there are valid
reasons for doing this - see for example the description of EKE in Section
22.5 of Applied Crypto 2nd edition, or
http://www.users.zetnet.co.uk/hopwood/crypto/sid/

David Hopwood
david....@lmh.ox.ac.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/tU9OWjOjcqk/m/jdfNTgFotMwJ", "n_sections": 6}, {"thread": "-Qw8-NObmWg", "msg": "c24y94GT-xAJ", "author": "David Hopwood", "date_disp": "Dec 8, 1997, 3:00:00\u202fAM", "subject": "Real Random Number Generator Algorithm Publication", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <66ctd8$ej8$1...@samba.rahul.net>
c.c....@72.usenet.us.com (Rahul Dhesi) writes:

> In <66bdsi$sl$1...@news.ox.ac.uk> pat...@gryphon.psych.ox.ac.uk (Patrick
> Juola) writes:

> >>Has it been shown that given a random stream of digits, it's impossible
> >>to guarantee that some PRNG exists that will generate the stream?

> >Quite the contrary -- for any finite random stream of digits, it's
> >easy to construct a PRNG that generates such a stream.

> let's combine this with what rckt...@ix.netcom.com said:

> We decided that you cannot employ PRNGs to make an OTP, no matter
> what you did to "randomize" the output. If you used any kind of a
> PRNG, you did not have an OTP, you had a stream cipher.

> We conclude that every one-time-pad is a stream cipher.

False - the premises are correct but the reasoning and conclusion are not.
By "OTP", rcktexas means a nondeterministic source (_not_ a specific
output of the source).

What Patrick Juola said applies to any specific, finite output. It's
equivalent to saying that for every finite sequence (of integers or bits),
there exists a program (computable function) that outputs that sequence.

[Obviously, if you include infinite sequences, there are as many such
sequences as real numbers, and there are only countably many programs,
so there can't be programs to output every infinite sequence.]

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNIwYdjkCAxeYt5gVAQFZmQf/dII0JLOyCTeq0uFeEl2iEtN2s6io9MQG
ng4JLFLTL4zTZJzdPf5VEFHYhe9ZT+gz/06v1UeWuvWsPka7EdN6mBd5uLFQdR65
lei1kfybaCujsCoLUne88xG13yQiuhTxgC5eVYqwwtGZNFQ8i8uNfWslAlOhYp6y
u8+nw7gWPfqoZ4LQiCa89N3T9WFu78l7d0rri9Dxspyt3e+K00ZFMQl9O1/d5XGV
8hFCS7/fYZXvloj9KfuiLTAXXVRAh8ff6aCt6BZOBVKwjqjlHnSCEkFq4FYn0BSA
ujRhxVUzhA4r8kt2nBKlzV03na/M02nSnGgKogYLs9kqjs0s5yVCrA==
=V30/
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/-Qw8-NObmWg/m/c24y94GT-xAJ", "n_sections": 100}, {"thread": "1WZXVWovCXc", "msg": "0fCH1MeEBV8J", "author": "David Hopwood", "date_disp": "Oct 6, 1997, 3:00:00\u202fAM", "subject": "Character encoding (was Re: Character frequency in Spanish)", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <wtshaw-0310...@207.101.116.64>


wts...@itexas.net (W T Shaw) writes:

> I myself find 27 a nice number of allowed elements to design

> [crypto]systems around.

> However, in Spanish and German, amongst others, you have addition
> meaningful characters, more than the basic 26, so for a particular use in
> a specific language, a custom approach would probably be the most
> efficient. With the wide variations in symbols and punctuation for
> different language, there is considerable room for opinion as to what
> should be included, but all possible characters is surely a waste.

I disagree entirely - what if users need to write more than one language
in a single message, or receive a message without knowing which coded-
character-set it is in, or interoperate easily with other systems that
may use different coded-character-sets?

A more sensible way of approaching this is precisely to allow all possible
characters (or at least all those that have been standardized). For example:
encode a Unicode string as UTF8, compress using the DEFLATE algorithm, then
encrypt. If the ciphertext is required to have only printable characters,
encode it as BASE64 (or whatever).

This may be a little more complicated to implement initially, but it is
easy to describe, avoids re-inventing any new standards, is efficient in
the size of the output, and is considerably more useful in an
international setting.

The ability to interoperate with existing standards is for me the most
important reason why modern ciphers should be defined to have binary
input and output (regardless of what base(s) are used internally).

- --
David Hopwood <hop...@zetnet.co.uk>
Public key: http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x98B79815
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNDhdSzkCAxeYt5gVAQFzEwf/RkcB4NZQo+JPeFVyPfgSU6aGOjN2Y1Ig
hoR3J8EAFMPWZ6GpGBohrHAW/35Wr6iCtdfU+42fZtD+tUxbO4JsxbXjzrbX4zl+
PImfXbEaXR8jW4GQmTJSab+9r9GD2qENMIuTdCrz9kknlBzA8+YoQermJ6eJoFBL
lbeVLAxBhUm2HSLOT5A21S2w7j6hlrLYsoq9j7RZPgFNmd7wieGkimHbiVfMFShn
Sx0FXR02Y1p6tNBqsVZWYBUfzq+5W2PKMga5dj0yLWrfUjFzSfvuNhML96myY+LN
V511ek1I3x2og5wvRMWlaZxldQoZpZx1C3aQ7c9I/mch65vm//NNAw==
=bR3g
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/1WZXVWovCXc/m/0fCH1MeEBV8J", "n_sections": 19}, {"thread": "1WZXVWovCXc", "msg": "LsKyS0KeHGQJ", "author": "David Hopwood", "date_disp": "Oct 23, 1997, 3:00:00\u202fAM", "subject": "Character encoding (was Re: Character frequency in Spanish)", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <wtshaw-0610...@207.101.116.54>


wts...@itexas.net (W T Shaw) writes:

> In article <199710060...@zetnet.co.uk>, David Hopwood
> <hop...@zetnet.co.uk> wrote:
>
> > In message <wtshaw-0310...@207.101.116.64>
> > wts...@itexas.net (W T Shaw) writes:
> >

> > > I myself find 27 a nice number of allowed elements to design

> > > [crypto]systems around.


> >
> > > However, in Spanish and German, amongst others, you have addition
> > > meaningful characters, more than the basic 26, so for a particular use
> > > in a specific language, a custom approach would probably be the most
> > > efficient. With the wide variations in symbols and punctuation for
> > > different language, there is considerable room for opinion as to what
> > > should be included, but all possible characters is surely a waste.
> >

> > I disagree entirely - what if users need to write more than one language
> > in a single message, or receive a message without knowing which coded-
> > character-set it is in, or interoperate easily with other systems that
> > may use different coded-character-sets?

> There is no universal standard, but be my guest to figure out how many
> characters one might possess; don't forget the Chinese.

My point is precisely that there _is_ a standard character repertoire that
attempts to be as universal as possible: ISO-10646, and in my opinion it
does a very good job of it. See http://www.unicode.org, or do a web search
for "internationalization" or "unicode".

I ceratinly couldn't do any better if I tried to invent my own "custom"
coded-character-sets, and in practice I would do considerably worse.

BTW, it's not just "the Chinese" that need to use characters from Chinese
alphabets; it's anyone who understands Mandarin, Cantonese, etc. The idea
that users can be partitioned into disjoint groups that each require only
one small character set, is one of the misconceptions that Unicode tries to
counter.

> > A more sensible way of approaching this is precisely to allow all
> > possible characters (or at least all those that have been standardized).
> > For example: encode a Unicode string as UTF8, compress using the DEFLATE
> > algorithm, then encrypt. If the ciphertext is required to have only
> > printable characters, encode it as BASE64 (or whatever).
> >
> > This may be a little more complicated to implement initially, but it is
> > easy to describe, avoids re-inventing any new standards, is efficient in
> > the size of the output, and is considerably more useful in an
> > international setting.

> You make the big mistake of assuming that this is right, but it is not
> convenient, efficient, universal, nor acceptable to many, which is the
> final hurdle.

Your proposed alternative, to use small custom character sets, is not
convenient, efficient, universal or acceptable to _most_ of the world's
population. Coded-character-sets with 128 or 256 elements have been
inadequate for many purposes ever since they were introduced [*]; now
you're proposing using sets with 81 or 27 elements? Sounds like a giant
leap backwards to me.

[*] For example: "naive", "facade", "tete a tete", "foetus", "archaeology",
"5 UK pounds." And that's just English!

> > The ability to interoperate with existing standards is for me the most
> > important reason why modern ciphers should be defined to have binary
> > input and output (regardless of what base(s) are used internally).

> Spoken like a true 1950's protocomputer engineer. Such exclusive ideas
> serve to limit rather than expand, like only making one color of paint.

Nonsense. Specifying that the input and output is binary (by a standardized
conversion to and from some other base, if necessary) does nothing to limit
the design of the cipher. Having a confusing mishmash of conflicting
character encodings, or not being able to guarantee interoperability between
independent cipher implementations, or plug any cipher into a general-
purpose protocol, OTOH -- that would "limit rather than expand".

> Humans make computers nowadays to serve them and facilitate flexibility
> and creativity. Making humans and their acts conform to a computer
> oriented set of standards for convenience sake of men in IBM attire is
> rather friendly to fiting into some sort of a imaginary functional new
> world order, however.

I suppose TCP, HTTP, HTML, NNTP, and various other computer-oriented open
standards are part of this great conspiracy, then :-).

> Variety and non-comformaty make live unpredictable and worth living.

"Variety and non-conformity" in computer-based standards, in practice
simply means that the standards don't work as the user would want them to.
IME, users want interoperability.

> Do your thing, and I'll do mine.

- --


David Hopwood <hop...@zetnet.co.uk>
Public key: http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x98B79815
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNE6OxTkCAxeYt5gVAQH3hgf/d9ajDWgiyPQWx54MruuSPKV543/Z5txv
q6RV/SXbh1/E3E/N6VQekIe80JG0HBbysgV0R0J5nHDXFB3WyyjZaff34+5js6/s
/ZTcnJL860WbPxWXKJjtNg13AYZVI4QPg3df4rONE8U/sQXISOY7Ia9WV/BZaKEf
QuS93xmK9wvmXDl6s99UVhElr0/S6Fu15Vp/HNtEmiw2subeAX1tx6+CQTdGaj+9
oLYMg9sWYexxZjerYaO3MoyB7JFlLgqgDL3YBhf/ESNym6ewBIVwMTADw5jwBOQC
8Gt0gM1T/uV7xPsbYGnW1pHiuOFRWnVBDsr69IlxLrrnGaMq6loMpw==
=N40j
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/1WZXVWovCXc/m/LsKyS0KeHGQJ", "n_sections": 19}, {"thread": "539ZjE2-kc4", "msg": "kLUBeqDLIqgJ", "author": "David Hopwood", "date_disp": "Nov 24, 1997, 3:00:00\u202fAM", "subject": "PGP attack FAQ", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <65a78l$i...@newslink.runet.edu>
ibel...@runet.edu (Ilya) wrote:

> -----BEGIN PGP SIGNED MESSAGE-----

> [ The Feasibility of Breaking PGP ]
> [ The PGP attack FAQ ]
>
> 2/96 v.50 [beta]
>
> by infiNity [dae...@netcom.com / ro...@infonexus.com]

[snipped]

I'll repeat my comment on the previous post of this FAQ, which doesn't
appear to have changed:

You could also add the attacks described by Gary Howland at
http://www.hotlava.com/doc/fag-pgp/ (in particular, creating a key with a
given ID, and creating distinct keys with the same fingerprint).

These IMHO constitute potentially very practical attacks on the current
PGP keyserver network, especially if users are not aware of them.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNHnlBjkCAxeYt5gVAQGYmQf/eQDF6GXaJ53UGYK/EFZg5v7d0sOIpFtP
4+S3WDBo6yH1d12y0ari0YFkYNWV/vaiCp4Fct3Bnkx/PrS4C1cCCDMA/cgPFxOK
cwy4y7g2vPpm++PPNSEV0U1Jst24GmjwzfCD/AYgfaj7Ig1QpttMJ7M5ZvB1yKDR
IsXfzE2Va45zoyn/TqV5sDqvX9f5GXMTZKrzeiODvTWQj8D2PO0ppSMOxroQIRhe
PbyFRYgMCk3o7PDnRoUl58LQNMkXd0SZG2tcJrIjZs4x+MIAXmDfM8ufguqsop5z
ricYamFbK15CYqj0DmaxMC6LW7L8UNSLNA0WLYjOhf8PgwLBGccKMg==
=gIRn
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/539ZjE2-kc4/m/kLUBeqDLIqgJ", "n_sections": 2}, {"thread": "5O6L1hyDaLU", "msg": "gcIAx8bWQqAJ", "author": "David Hopwood", "date_disp": "Nov 27, 1997, 3:00:00\u202fAM", "subject": "Chinese remainder theorem", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <01bcfa8a$9b969860$d450...@phma.trellis.net>
"Pierre Abbat" <ph...@pop.trellis.net> wrote:

> I think Sun Tse who discovered [the Chinese Remainder Theorem] is the


> same Sun Tse who wrote The Art of War,

No, Sun Tzu wrote The Art of War.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNH2NtTkCAxeYt5gVAQEKzAf+J8YXf8iqzKytZe6z+KemUWAPzlGxVAxK
3uoHdm0j5z6TzKMkd4hIezECaIiGAxAFUaDEWfw8qneIcdLiVbQ1yj9sP+87Hqh9
Z5za1dpn8vmCYmLhioFnHv5C9Oht9VePzQ4WbcvxbQt9dNeW9tLKfy4Vgx8wBIQv
kwxnRtWUYDKJaLO585mV2b8bepq8ZODh1QAQeLeWMfKcEQW+po4d3ani5T0P/cls
SmGL1OxfV8JNpijg4BxYjN5/tSC0nQzes8YhBARsC1LRwm7rrx+YgDDU741eWzJ2
utH9zI6lD1bayUA/8yLzOXy6UcAdQCQsiX77f4t+JmRs1evLykROaw==
=py+f
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/5O6L1hyDaLU/m/gcIAx8bWQqAJ", "n_sections": 15}, {"thread": "AX9jumq8meM", "msg": "zQozCSX0HrIJ", "author": "David Hopwood", "date_disp": "Nov 26, 1997, 3:00:00\u202fAM", "subject": "SHA-1 with unknown random IV", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <347B88...@sky.net>
Mark Andreas <voya...@sky.net> wrote:

> Bryan Olson wrote:
> [snip]
> > Just wondering, are attacking SHA-1 or do you have some
> > application that requires these properties?

> No, I'm not trying to attack SHA-1. I was wondering about
> the possibility of using SHA-1 as a method of identification
> across an insecure channel. If SHA-1 does have the property
> of making it difficult to discover an unknown initial IV,
> SHA-1 could be used to securely identify someone across an
> insecure channel. By using a shared-secret as the 160-bit
> IV, the other party could prove his identity similar to:

> A -> B - sends unique string across public channel
> - B uses Secret-IV-SHA to calculate hash output
> B -> A - sends hash output
> - A calculates hash output and verifies it is
> same as the answer received from B

You're looking for a Message Authentication Code (MAC). They can
be constructed from hash functions or block ciphers - e.g. see
Applied Crypto section 18.14.

Your key-as-IV scheme looks at first sight to have the same problem
as H(K, M) described by Schneier: an attacker can add blocks to
the end of a message. This may not be a problem if the message
is fixed-length, but I would choose an established MAC instead.
SSL v3 uses one that looks fairly reasonable -
see http://home.netscape.com/eng/ssl3/

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNHxIYjkCAxeYt5gVAQGZNQgA0fBB+SZ7aP8htjR1H+Y+Sgr8uph+6q3H
huhVboiOrDTeAYHH7yWClDTTXLiKQQol4cUEph3fYwJkskg049oj+8SrikCUMJoO
U/xz4XKUuKtIK84k8h0uIAWHSxUjvj/auvQnJuoFyBov/Q3TJk6LGj6CUkpNgnLC
PY2X/ftVWSGy0V408eGYpPteVRCns4xhOQ/qddnHv5b6XlnAkNT033vUK89vjmik
FrftlKx+geIjhW3ht69Uw12F4rgUsc+zH5RvAIKzfQAfumwhQEICdDPN1teGb58q
R2yHe6SJUSlkHZrf2rqMxPYQ1OtqsYQjsvZijbdn3aKxMBilwEl68Q==
=yiYV
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/AX9jumq8meM/m/zQozCSX0HrIJ", "n_sections": 7}, {"thread": "At1Mbnj2H6Q", "msg": "ozlVBdXOhWUJ", "author": "David Hopwood", "date_disp": "Dec 15, 1997, 3:00:00\u202fAM", "subject": "On weak RSA-keys produced from Pretty Good Privacy", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <4465.728...@erols.com>


rhe...@erols.com (Rhett R. Rodewald) wrote:

> BM> However, the advise from the comment appears sound: You don't have
> BM> to search for the so-called strong primes; the important thing is to
> BM> choose the primes _long_ enough.

> Choosing a longer prime obviously makes the chances for a small factor of
> p +- 1 less, but if there is no check made (the "strong prime" type check), you
> _could_ generate a key with a very small factor of p +- 1. While this may not
> help an attacker using an eliptical attack, it could make even very long keys
> succeptible to a p+1 / p-1 attack. Choosing larger primes will only make the

> before stated 0.3% of "poor" keys somewhat smaller, but never 0%. As noted
> earlier, the length of a search using a p+1 attack is roughly proportional to
> the size of the smallest factor of p+1.

No, that's wrong. The smallest factor of p+1 is always 2, because p is odd.
(The same applies to p-1, of course). I was under the impression that these
attacks were only practical if p-1 or p+1 are smooth, i.e. have _only_
(relatively) small factors.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNJWOUDkCAxeYt5gVAQFe1AgAh5NZFB6Fcz3fCZwSMXr6AHzAZ7x+Fffe
bqN/AtRFMv95gXTIrVlI2pbqM/xPtK1cuzQr2//2z6TpXxWGf0FWyiiua611dOUU
vHDP8jIFbcsF9y3+LGvT8ncR1Hl6kOjddUfViuDQNSwP2XpdXNng7Ijdb7Q2s8Ew
VIgJtF3HioUvM9QS/XDzN43Frz8RJQkSTWFqhmLD43cilsngoXR1a32vlt3C3N9W
XGB2cVWORJ7vT+hR+BP0HL9ngCmLwLkBnxqlkIsS6OLzQl2RlQh5bEUiOZr3HLfi
v2qm3NJNC8evoKF6JZg9+zZM7VsdZIXbyisM4N+73IUOew7ETqI4LQ==
=PMv3
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/At1Mbnj2H6Q/m/ozlVBdXOhWUJ", "n_sections": 26}, {"thread": "FGQoPlCpkM0", "msg": "2FNAgGMkR7QJ", "author": "David Hopwood", "date_disp": "Oct 1, 1997, 3:00:00\u202fAM", "subject": "A RANDOM NUMBER GENERATOR FOR C", "body_html": "
In message <34315E12...@stat.fsu.edu>
George Marsaglia <g...@stat.fsu.edu> writes:

> Frequent posts to math and stat news groups seek
> sources for good random number generators in C.
> There seems to be as much interest in RNG's in
> this news group---although often for different reasons.

[...]


> #define znew ((z=36969*(z&65535)+(z>>16))<<16)
> #define wnew ((w=18000*(w&65535)+(w>>16))&65535)
> #define IUNI (znew+wnew)
> #define UNI (znew+wnew)*2.328306e-10
> static unsigned long z=362436069, w=521288629;
> void setseed(unsigned long i1,unsigned long i2){z=i1; w=i2;}
>
> Whenever you need random integers or random reals in your
> C program, just insert those six lines at (near?) the beginning
> of the program. In every expression where you want a random real
> in [0,1) use UNI, or use IUNI for a random 32-bit integer.

This isn't a secure cryptographic PRNG, if only because it has only
32 bits of hidden state (i.e. given an output value x, there are only
2^32 combinations of z and w (= x-z) that could have produced that
value). Also it looks like w and z evolve independently, which is
probably not a good idea.

David Hopwood
david....@zetnet.co.uk, hop...@zetnet.co.uk

", "url": "https://groups.google.com/g/sci.crypt/c/FGQoPlCpkM0/m/2FNAgGMkR7QJ", "n_sections": 14}, {"thread": "KN7VRd6_l_E", "msg": "aKpv6tKhX9MJ", "author": "David Hopwood", "date_disp": "Dec 14, 1997, 3:00:00\u202fAM", "subject": "HELP: can anybody tell me the algorithm used here ?", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <6639b9$hns$1...@talia.mad.ibernet.es>


"XipXop" (Alfred Roig <gt...@filnet.es>) wrote:

> Hi!

> I've this name of company and the crypted string, please can anybody tell-me
> which is the crypting algorithm?

> ABB FLEXIBLE AUTOMATION, S.A.

> \u0444\u042b\u0435\u0437\u0411\u0433\u0428\u041b\u0414\u041e\u041a\u041a\u040e\u0416 \u044c\u0425\u042d\u0444\u042d\u0414\u0415\u041e\u0441\u040e\u0415\u0440\u0419\u044b\u0429\u040e\u0457\u0449\u0437\u0443\u0429\u040e\u0457\u0449\u0437\u0443\u0429\u040e\u0457\u0449\u0437\u0443\u0429\u040e\u0457\u0449\u0437\u0443\u0429\u040e\u0457\u0449\u0437\u0443\u0429\u040e\u0457\u0449\u0437\u0443

> As you can see, they repeat a sequence when the rest string is blank.

It's not XOR or addition modulo 256 with a repeated 6-character key,
but it looks like something similar. For example, the first 'A' in ABB
and the second 'A' in AUTOMATION occur in the same position modulo 6,
and they encrypt to the same ciphertext character. Similarly for all
the spaces (counting positions after the end of the plaintext as spaces).
If that's always true then

C_i = f(i % 6, P_i)

If you have any more known plaintext, it shouldn't be too difficult to
build up most of a complete table for f, like this:

f(0, 'A') = '\u0444'
f(1, 'B') = '\u042b'
f(2, 'B') = '\u0435'
f(3, ' ') = '\u0437'
f(4, 'F') = '\u0411'
f(5, 'L') = '\u0433'
f(0, 'E') = '\u0428'
f(1, 'X') = '\u041b'
etc.

[Apologies to anyone who can't see the ciphertext characters because
their news software strips out non-ASCII.]

Alternatively you can do a frequency analysis on ciphertext characters
that are in each position mod 6:

// Java code
//
// 'ciphertext' is assumed to be aligned on a 6-byte boundary.
void frequencyCount(byte[] ciphertext) {
int[][] counts = new int[6][256];

for (int i = 0; i < ciphertext.length; i++)
counts[i % 6][ciphertext[i]]++;

// print 'counts' as a table
}

The most frequent character for each position will be the one corresponding
to a plaintext ' ' (which you already know from the above sample), the next
will probably be for 'E' if it is English or Spanish uppercase text, and
so on.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNJMoojkCAxeYt5gVAQFW0Af+MeRl0hPwptjDXF+VYaz4Y5fvG4oLlNLC
qsi0yPxnS+W7VcBHUd3fAIF4T1Fla/D2XkpnusId7ap+1GysLGORyd+JZS3EKcaj
crZcRlvbYXAQmRttiF3Ij7EenghqfAoGUh1ssI5oUXUXOH96B8TpfEJi/EZWE/72
Eu43uTb/Z0zAHJsr2LBWnzQZ225DuErIDtG6JTjG0DEWW/49u7C8eL7zzf+RoTTp
gLjj4TT5liA+X2uZR8bIxWKCmqznBsqILwraoD8FXO3pF+1bDgx6yOvpHI/7Ot2r
mcJILQ17qgjv5H/sZxOlumwzj4UNi7KKFygChXD75j+QpIGGM1+VJQ==
=ZLzp
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/KN7VRd6_l_E/m/aKpv6tKhX9MJ", "n_sections": 2}, {"thread": "N1rTyBMtCBM", "msg": "Jl7aDh4UIGgJ", "author": "David Hopwood", "date_disp": "Nov 24, 1997, 3:00:00\u202fAM", "subject": "Cryptography problem : Compromised Keys", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <87g1opy...@enterprise.ufp.com>
Richard Levenberg <rich...@enterprise.ufp.com> wrote:

> Is there a protocol which can detect a compromised key. Say Mallory
> figures out what Alice's key is but Alice doesnt tell anyone for some
> reason. Is there some way to detect that the key has been compromised?

With limitations, yes. The SID protocol attempts to do this in as many
situations as possible. It is described here (the description is a
work-in-progress):

http://www.users.zetnet.co.uk/hopwood/crypto/sid/

If an attacker has continued read/write access to the key databases
maintained by each user, or if he/she can perform a man-in-the-middle
attack on every communication between two users, and impersonate each to
the other (as well as having compromised the key), then little can be
done. If an attacker is less powerful than this, though, it can be made
_very_ difficult to use compromised keys without detection.

I would appreciate constructive review and criticism of this protocol
from readers of sci.crypt.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNHjZuzkCAxeYt5gVAQHYjwgAx+hQhZU4b7IzMK3GGJyfrQ+bW09fJ1qZ
fdaQeA/+msGc/i1+tiGlqac3SLZ8vL1+W9jIK2bR22E+rHst6QY8rnSi1CabSj+/
lkSjV+8tloWDfHTsx61mnzlK+1YWvUnOfpKxwpQ/MwfXl+3mmlvdYI6QrYqBVahN
hizSCfPnrn2mweikxTtYkqslRmA2//1JoJvkyVVhnowsStbU1IaVmL0TjcZuG+gM
NYkhAitbqjmankkswK90fsLdTSdVhumA/rh7w26B2nL2LgUujTyywz9D9qeQ/XMy
dGix5GlbdT3kZZze94AvPoWqA8O3at6onOilWaNyY/msoaRVbdJ+qA==
=+dKg
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/N1rTyBMtCBM/m/Jl7aDh4UIGgJ", "n_sections": 7}, {"thread": "N1rTyBMtCBM", "msg": "_foAZt08k0QJ", "author": "David Hopwood", "date_disp": "Nov 24, 1997, 3:00:00\u202fAM", "subject": "Cryptography problem : Compromised Keys", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <656m0n$k4f$1...@news.ox.ac.uk>
pat...@gryphon.psych.ox.ac.uk (Patrick Juola) wrote:

> In article <87g1opy...@enterprise.ufp.com> Richard Levenberg <rich...@enterprise.ufp.com> writes:

> >Is there a protocol which can detect a compromised key. Say Mallory
> >figures out what Alice's key is but Alice doesnt tell anyone for some
> >reason. Is there some way to detect that the key has been compromised?

> Not in general, no. If one is using a normal encryption method,


> e.g. one not based on quantum interference techniques or something,
> and Mallory doesn't *do* anything with the key or the information he
> receives, then there's no way to tell.

If Mallory doesn't do *anything* with the key or information he receives,
then the fact that he has them is arguably not a problem :-)

In practice most attackers want to use compromised keys to decrypt either
past or future sessions (assuming we're talking about a secure channel
protocol, rather than stored encrypted data). Not being able to read past
sessions using compromised keys is called "perfect forward secrecy";
several protocols have this property.

In addition, if the public/private key pair of each user (not just the
session key) automatically changes on every session, then knowing a single
private key doesn't help the attacker very much. In this case we can force
him/her to do an active attack in order to be able to read future sessions,
and potentially detect that attack. This is basically how the SID protocol
works (http://www.users.zetnet.co.uk/hopwood/crypto/sid/).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNHjhxDkCAxeYt5gVAQFflgf+PvfXcaq7TAJK4J+xnPETDpcl6Dqg53Wb
2oy5aJrac/Qmep4y4CfjVR+SrZqpY1X9/JrjfOaNvp63300NgTz3uKiqzUqyXy5r
0f8hNM9LD9XGg9Y+vSySjIZYmafNl8CReKkMM9bYQV0x7Qe9Q3CoHlwXjMBcnKze
H4Q9hh1aulKDOw6klNqOtA+4TiPeF0nFqOpAtlX77W8mDZE71vPc89gZdqQspdwD
Qq+vdC/KhLEvOFG48gS/t/OOgRp5pFU1zV3ELWu2AxntkeSpwp8zQL8aRiAGz2VR
+v2euOEXJEbgblk31t3OwmezJ3RA4/YjOwqBeap8p9mWPxfsn7Cq+w==
=RfaP
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/N1rTyBMtCBM/m/_foAZt08k0QJ", "n_sections": 7}, {"thread": "N1rTyBMtCBM", "msg": "uXn_XHx4SSUJ", "author": "David Hopwood", "date_disp": "Nov 24, 1997, 3:00:00\u202fAM", "subject": "Cryptography problem : Compromised Keys", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <65bj2p$a7t$1...@news.ox.ac.uk>
pat...@gryphon.psych.ox.ac.uk (Patrick Juola) wrote:

> In article <199711240...@zetnet.co.uk> David Hopwood
> <hop...@zetnet.co.uk> writes:
> >-----BEGIN PGP SIGNED MESSAGE-----
> >
> >In message <656m0n$k4f$1...@news.ox.ac.uk>
> > pat...@gryphon.psych.ox.ac.uk (Patrick Juola) wrote:
> >
> >> In article <87g1opy...@enterprise.ufp.com> Richard Levenberg
> >> <rich...@enterprise.ufp.com> writes:

> >> >Is there a protocol which can detect a compromised key. [...]


> >
> >> Not in general, no. If one is using a normal encryption method,
> >> e.g. one not based on quantum interference techniques or something,
> >> and Mallory doesn't *do* anything with the key or the information he
> >> receives, then there's no way to tell.
> >
> >If Mallory doesn't do *anything* with the key or information he receives,
> >then the fact that he has them is arguably not a problem :-)

> Unless Mallory is saving up his information for later.

If he gets plaintext, then he can save it for later without detection, yes.
But if he only gets a key, that key is not useful *in itself*; it is only
useful when employed in a cryptographic protocol. If the protocol requires
the participation of either Alice or Bob, or both, then use of the key can
potentially be detected.

The question then becomes, "how do you design a protocol that requires the
participation of Alice or Bob, even when one or both of their key databases
have been compromised?". This *is* possible; one way of doing it is to make
sure that continued use of the protocol involves each user writing to a
local key database, as well as reading from it. Now suppose that Alice's
database is compromised once by Mallory, but we make the assumption that he
cannot update that database at will. The SID protocol is designed so that:

- - Mallory must use the compromised key in an active attack on the very next
session. If he does not, the key will never be of any use to him.
- - if Mallory does this active attack, then when Alice next tries to initiate
the protocol with Bob, it will not complete successfully (even if Mallory
is acting as a man-in-the-middle). Assuming the network and the disks
used to store keys are reliable, Alice should conclude that either her
key has been compromised, or an active attack is taking place.

This is the situation when only one user's database has been compromised;
SID also has weaker, but still useful security properties when both key
databases are compromised at the same time.

> The difficulty is that key compromise is (at least) a four-stage process.

> [1] Mallory obtains keys
> [2] Mallory obtains messages
> [3] Mallory acts on the contents of the message
> [4] Alice and Bob realize that Mallory has acted.

> The time lag between stages 2 and 3 (and arguably between 3 and 4) is,
> unfortunately, something that Alice/Bob have no way of predicting.

Correct - but the maximum lag between 1 and 2 *can* be determined by Alice
or Bob, because they have control over which protocol is used to relate keys
to messages. If that protocol is chosen carefully, and if Alice and Bob
permanently delete keys that are no longer needed, Mallory can be forced to
make his attack detectable within a specified period of time, in order to
get from stage 1 to stage 2.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNHniJTkCAxeYt5gVAQHlRQf+LSO+TzSiwXCjublFDteI/MmyQc9exR2b
wFPP72pf1Y+2cMUt/z6Nm/j1e1ZZdLsHYYrwJ3iEc83djdvlgSO6O6jDpQxlMro3
wxNz2nYK6aSNofvYuhgc/7pH4LE+TDnmU96ZCNuGHMdX2CBOZXb1WhGuQmW2psvU
dvkK50/x8nKCbbBjwYP3qijVmpAon8AxSUvTA1z2h4wJN7pwDSjSxdpZqxWdd9Pa
qcKPlbPPLdXFoedtEPSleuWOC5hcb3czs2WLXXKb2fUrmalubwGkYtzMDZbvQUyz
YiKhmpn4chWmcpuSYUSbMYLxSvbzUQWD7lbtRPmkxbcbHDl8VMLVHA==
=83Ja
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/N1rTyBMtCBM/m/uXn_XHx4SSUJ", "n_sections": 7}, {"thread": "N48Bbvd8Wg0", "msg": "k-BPp9UBHXQJ", "author": "David Hopwood", "date_disp": "Dec 27, 1997, 3:00:00\u202fAM", "subject": "D. Bernstein Case", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <34A171...@ciphile.com>


Anthony Stephen Szopa <ant...@ciphile.com> wrote:

[...]


> If the government wins the Bernstein case then encryption within the US
> is not protected either and will be restricted, if not eliminated like
> in France, Britain, etc. (?)

Just to correct this point, there are no restrictions on the use of
cryptography in Britain.

In theory licenses are required to export cryptography from the UK (and I
think also Eire). In practice that isn't enforced, and I've never heard of
any British person or company that has done this without obtaining a license
being officially told that they should not have done so.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNKSAgzkCAxeYt5gVAQE/XAgAwBsiwBv0RHPBoki8XfCnyevM89IMEe9X
oCUrG/icS7K9Ok1PMb1bDCEA/hdKoNZn3qLhZFTia6L1TjfS2kWVX5J9gBHuWGti
hwEMqdTLwP/UfRnnDB6OxNm8DARmJcCOCk9r8vyVM7B0Co5YOjbmGel2j5xzTHx7
aewOq9p/6lJdxt8sWAuXgv6772sGhfWhLkP38Y6rYimylwPsr+CgFJ6F6qrQnXoN
Ol1LeLushBz8RR4Ni81S+k1hAkZpDVPdT+LYTvgVGTXdD/gAdf6Rtbzby5mJmKfJ
WQ6N+iO6SP64YwN04tmJO/itOWMNzfp5TuxtAItjUEHZbWsda2FtUQ==
=iOkQ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/N48Bbvd8Wg0/m/k-BPp9UBHXQJ", "n_sections": 32}, {"thread": "NLmG6XaZxYM", "msg": "_8uYZX2MDXAJ", "author": "David Hopwood", "date_disp": "Dec 10, 1997, 3:00:00\u202fAM", "subject": "Proposed authentication system. Will this work?", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <3493151c...@news.ihug.co.nz>
ro...@ihug.co.nz (Ross Keatinge) wrote:

> We want the system to be 'commercial strength' but without going
> overboard.

> I suspect that proper digital signing like PGP has is the real answer


> but I need something I can easily integrate transparently into my
> Visual Basic 5 code at both client and server.

Is it a requirement to use Visual Basic 5? If you were using Java,
the Cryptix library (http://www.systemics.com/docs/cryptix/) allows
creating and parsing PGP-compatible messages. There are also PGP
libraries for C.

> My intended solution is to have a sequence of codes (strings or
> numbers) that both the client and server knows about.

That's a secret key system. How would you securely exchange the initial
seed for the sequence?

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNI4ZFDkCAxeYt5gVAQE/MAgAxei5njpu5zZu7kzcE41GRaO5HDVodx2m
cL4++oAFM51mQhX+q9Re2YxGbI8QOYluZSaYnorJecbYKyzChBn6hjEYIB4FD2kL
x7WX7Mtfpz6FdH3vUSNZMWNmdFtVSSHZ9tb2D1qoT7OdpMcvZdIdXabPIn1VeO9K
4JEuUO/Gw6MGIRmEeft/X8myF0zOhLryQDIV63+1x20V74R/b+XtIVWOGUsakU+5
4z8PajDyG8q8DJSZ/j+JrgPFYpA6JDN6c0VUM+YBBktVWQYuSJP1LYWvUeQd03Nq
xqlzzsxlrqZiIiGmPBsMZ24kZXATMsm2olISEFzpBSfR9a+FpP+9Gg==
=kXdJ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/NLmG6XaZxYM/m/_8uYZX2MDXAJ", "n_sections": 10}, {"thread": "Nlq_x9ua-D8", "msg": "EBz6E-Q3IssJ", "author": "David Hopwood", "date_disp": "Dec 12, 1997, 3:00:00\u202fAM", "subject": "SALT DOUGH", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <348e71a...@news.indigo.ie>
awh...@indigo.ie (Andrew White) wrote:

> Hi All,

> I cant find a salt dough specific group, so I'm hoping somebody in
> this group can help me.

> I've just tried my hand at salt dough, I've been careful with the
> flour, and I've tried baking at even lower temperatures than the book
> says,

Applied Cryptography 2nd ed. (English version) p165:

"Decoherence will make a quantum computer running at 1 Kelvin fail after
just one nanosecond."

I think this is probably your problem. Try turning up the power on your
refrigeration unit.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNJAlDTkCAxeYt5gVAQHqhwf/cqbU6bv3X6XPm6XZtJk9NLWXFIIvaNfp
r1PFP7gGrgS2GcSJPlapxlRReo8Nbm5wuUNn9+3hOiFU5P+gNgLX2ijrf8Vx0BlT
SnMTzOQntRxMlc8j0Mg+k1hZZMiAD+stcwjBDe9dPLobRmWq5gYxuLx2vNVSsywI
NWsNK0jDD5gBHpurQB8VNu3hJGxB1M9R45pc4vPe9qylqbFdZiR0ARt43C/s6TDk
O+eXjwl322nqjqKmtWvkKymSFf0oBPPNsDFFXwB07ihfps6H1iY0Rg/1R14kE6Z8
HwVox4api+GBc7YOyxb3zW9hl8xPL0O5S73daR7lHZdof/Pt/G7Y5g==
=YkOR
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Nlq_x9ua-D8/m/EBz6E-Q3IssJ", "n_sections": 10}, {"thread": "Pp5A-2wRw88", "msg": "voof3Mu0gywJ", "author": "David Hopwood", "date_disp": "Dec 20, 1997, 3:00:00\u202fAM", "subject": "Are US export products unsafe in general?", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <01bd0baa$59cbb470$c901a8c0@comm>
"Thomas Maierhofer" <Tho...@maierhofer.de> wrote:

> Bruce Schneier wrote in applied cryptograpy, that the NSA allows


> exportation of cyptographic products only in the case, that some kind of
> backdoor may exist ?

I'm sure the NSA would like to do that, but fortunately they are not in a
position to do it in general.

To answer the question in the subject, there are at least two categories
of U.S. cryptography products that are not (a priori) unsafe.

- - products that at one time or another have been exported illegally.
This does not necessarily mean that using the product is illegal, or even
that the export was intentional on the part of the exporter ("export-
controlled" web sites are usually trivial to bypass).

- - products that have been exported in printed form on paper, and re-typed
or scanned in. (The idea that 'freedom of speech' applies differently
to printed and electronic media is obviously absurd, but that doesn't stop
it from being a useful loophole.)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNJshQDkCAxeYt5gVAQFTGQf+IdisF2nRgkBxmaXierqUj+uetQD5tckG
0DJSH0B12rSz7+ld3gPB68WN2sfblSQoayr3WQX1p+3JGk9Q8kqNvBNPJQ6JCL/W
y6e3ipfXAt9Dcx0TThqgHpm3/8xzNZd8ou7t/do+CC5Zbsc1VsJaj+yMmLDac0tT
rqgSCa/cPn0u+Mn1RaDbqm3jnUN2Qk6vIHzq20KEdIJXrVxPLry7QpA4Okt5bd9z
FmLDQsxmql+Volm7aA6zYkyT7M3RB6Fcqzo0JMyzxlcjeFeTaC6YAqd1R3NGEJAM
JzACyvInx2iZo6rxduoCwQBkJXbo6zdg1Ih3Do/aCUjevAtMTvaR7w==
=KPph
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Pp5A-2wRw88/m/voof3Mu0gywJ", "n_sections": 9}, {"thread": "RAOBwaxdwP8", "msg": "f4qaprxoFN0J", "author": "David Hopwood", "date_disp": "Nov 10, 1997, 3:00:00\u202fAM", "subject": "Multiple Encryptions With Small Keys", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <346365b3...@nntp.ix.netcom.com>
rckt...@ix.netcom.com (R. Knauer-AIMNET) wrote:

> Let's say I want to use a small key for whatever reasons (maybe I want
> to use the unsigned long int data type and avoid having to mess with
> large number handlers).

> If I have M different keys each of length N, and use each key once to


> perform multiple encryptions with the same encryption method, is it
> correct to say that my ciphertext is as secure as if I used one large
> key of M*N bits?

Not in general. However, in practice this is how most block ciphers work:
the key is expanded to a sequence of subkeys (usually chosen to be small
enough that each fits in a typical processor word), and these subkeys are
used in turn as inputs to each round. DES, Blowfish, and IDEA are examples.

Whether this is secure depends entirely on how the key expansion is done,
what the round operation is (and what algebraic properties it has), how
many rounds there are, etc.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNGZf5jkCAxeYt5gVAQFzKAf/f0EPfQumduFgdLtM5sgxJd+eKR21LK7v
QgyAsq8golD9Tu3QeGmLinXGJ5ZUJEcO4RnhBSo66W/JOCxLvpZjhVXKsh0HVw+S
bh4koVBEBf4FGBH9WaKBDKuvT2Sm75OrxFVPLbmyBmL4X3oqL9++BxseRUsuNHmD
mgoNbHFza3G3lAVZREC+mOYyYgzoho1qL5SeJj7bqYtByuvBpY8/0ItP5XNP5r4m
B2bbIZLljmAKe0/hPQVIrmJzf2TQQuk9i49s30PW4n57YAOrt3qticCMzl8Q+Wmt
WapbvJai+tJ8b5N1zX+/HUcO8jNSZx1/gcfmUP4RhtFYNHnCRvBUXA==
=1YSI
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/RAOBwaxdwP8/m/f4qaprxoFN0J", "n_sections": 65}, {"thread": "RAOBwaxdwP8", "msg": "afXhbLFR72gJ", "author": "David Hopwood", "date_disp": "Nov 11, 1997, 3:00:00\u202fAM", "subject": "Multiple Encryptions With Small Keys", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <646tqr$igt$1...@news.ysu.edu>


an...@yfn.ysu.edu (David A. Scott) wrote:

> In a previous article, hop...@zetnet.co.uk (David Hopwood) says:

> >In message <346365b3...@nntp.ix.netcom.com>
> > rckt...@ix.netcom.com (R. Knauer-AIMNET) wrote:

> >[...]


> >> If I have M different keys each of length N, and use each key once to
> >> perform multiple encryptions with the same encryption method, is it
> >> correct to say that my ciphertext is as secure as if I used one large
> >> key of M*N bits?
> >
> >Not in general. However, in practice this is how most block ciphers work:
> >the key is expanded to a sequence of subkeys (usually chosen to be small
> >enough that each fits in a typical processor word), and these subkeys are
> >used in turn as inputs to each round. DES, Blowfish, and IDEA are examples.
> >
> >Whether this is secure depends entirely on how the key expansion is done,
> >what the round operation is (and what algebraic properties it has), how
> >many rounds there are, etc.

> This idea of yours is an entirely bad idea.

What "idea of mine"? It was invented before I was born.

> It would be far
> better to fill the subblocks of idea with a random long key

Which is a special case of the above procedure, where the key expansion is
particularly simple. You need to be careful to avoid related-key attacks if
this is done.

> than to use straight Idea if one wants even a better method that
> is secure and uses long keys try "scott16u.zip"

You have absolutely no idea how secure scott16u is; hardly any serious
analysis has been done on it (most people here did not consider it worth
their time after the original scott16 proved so easy to break).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNGfDejkCAxeYt5gVAQFQbwf/eVKbB37VS0CIOGZu2aZPUPpR51w7YzoT
jqvnhtEp8yi+RDGXcqkQAjLYnFM1whRZVySHsrO0WlpQPiO6Q6lRImpGSTa8gNFa
TER0hWfStmCLgXxk2HMC5O1fYzyTV0LoiCY4wmV6Q1xJkdvdvIQFQskbhhwiSON2
CPCExUKrSd1QZ02+3ABi1c/fGInZsP8pAkY4k54yMgLk7/Y3dM5ElpkxYflHeZlE
M0CIBfD+swIGHIm20qdaJhVRTj4W6Q7nNDeGY752OzB7XUOWkF0Ias9yABIKvouN
+7ieI3g9UIOJh+D3mjM0iPC2tohn1B6brSyscwWxnYW2ATpVEFKQTQ==
=jYGJ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/RAOBwaxdwP8/m/afXhbLFR72gJ", "n_sections": 65}, {"thread": "SU45BdDw5xA", "msg": "kbb1Fan0zAEJ", "author": "David Hopwood", "date_disp": "Dec 28, 1997, 3:00:00\u202fAM", "subject": "ANNOUNCE: Cryptix 3.0 Java cryptography library released", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

[An earlier post of this announcement doesn't appear to have shown up -
apologies if this is a duplicate.]

Cryptix 3.0 - the International JCE

23 December 1997 -- A major new release of Cryptix is now available on web
sites around the world. Cryptix V3.0 includes the International Java
Cryptography Extension (IJCE).

The cleanroom implementation of the JavaSoft specification was built by
David Hopwood and Raif Naffah, and also includes new algorithms by the team,
including the long-awaited unencumbered ElGamal public key algorithm.

Cryptix includes the strong cryptography that is needed to protect privacy
and electronic commerce on the Internet. With this release, the Cryptix
Development Team is maintaining its committment to quality, freeware
cryptography.

In full, the Cryptix International JCE release supports:

Symmetric encryption Blowfish, CAST5, DES, Triple DES, IDEA,
LOKI'91, RC2, RC4, SAFER, SPEED, Square

Message digests HAVAL, MD2, MD4, MD5, RIPEMD-128, RIPEMD-160,
SHA-0, SHA-1
Public-key encryption RawElGamal GF(p), RSA
Public-key signatures RawElGamal GF(p), RSA
Padding PKCS#5, PKCS#7, OneAndZeroes, NONE
Modes ECB, CBC, CFB, CFB-PGP, OFB
Miscellaneous Base64 encoding

Cryptix now offers the widest choice in Java cryptographic solutions. These
benefits can be downloaded from the international mirror index listed below.

A design goal of maintaining compatibility with Java 1.0.2 has been
substantially achieved, although specific Java 1.1 features and some of the
new algorithms (ElGamal and KeyGenerators) are not available when using the
older standard. This provides a smoother upgrade path to full J1.1 and JCE
functionality.

The international download mirror index is located at
http://www.systemics.com/software/cryptix-java/ The Cryptix Development Team
acknowledges the kind assistance of the many mirror sites that permit
widespread and free distribution of the product, to maximum benefit of the
Internet community.

David Hopwood <hop...@zetnet.co.uk>, Raif S. Naffah <ra...@fl.net.au> and
Ian Grigg <ia...@systemics.com> are available to answer questions on this
release of Cryptix.

----------------------------------------------------------------------------
Cryptix is a trademark of Systemics Ltd.
Java is a trademark of Sun Microsystems, Inc.
Sun Microsystems does not endorse this release,
and are not involved in any way with the product.

--
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNKZzIzkCAxeYt5gVAQFwaQgAqezWVIjkteJxhS7DNZ9y/J+fLpIz+AD8
zAGTT9EfFSbdd6VSESlOnL8JORv0puC7AO6mkm1sqAbbMHGFBMVaPsetUOA9nXbc
cBo5udZzDNYGpgz+P5GM78365msZbemwA7rPH1Zo/3wjsTsCJXbi2MGGChJqVk0z
J2ewi2loO49qqVlpP7YG1KTGeEgdUdWxr/WA6l9ALFVmCHwuhRCURQj7zE09jfgk
Xx+PrQBnzfvHB0rqp7YmR3GU8MrgWCm4MPZQ52Riomh2wgC2PXTDelMYkVoVmsbc
++OhbmJp8aPxjWl3pBUbvjhW4z2HNmPm2iO8+m6TBWERp672/XqFUg==
=6oQn
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/SU45BdDw5xA/m/kbb1Fan0zAEJ", "n_sections": 2}, {"thread": "V9xDUKhZeb0", "msg": "1LmZGzO4C1oJ", "author": "David Hopwood", "date_disp": "Nov 26, 1997, 3:00:00\u202fAM", "subject": "TinyIDEA implementation (was Re: Blowfish)", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <347A5D...@sky.net>
Mark Andreas <voya...@sky.net> wrote:

> The TinyIDEA homepage is at:
> http://www.dcs.rhbnc.ac.uk/~fauzan/tinyidea.html

> Before anyone uses this program, be aware of the following:

> 1) Because of the nature of CFB feedback, encrypting a file twice
> using the same key results in decrypting the 1st 8-byte block.

> 2) TinyIDEA uses a fixed IV of all 0x00's, so unlike PGP, encrypting
> a file with the same passphrase will always result in
> identical ciphertext.

This is terrible. Suppose an attacker has two files encrypted with the
same passphrase - he/she can determine without any effort at all whether
the files have a common header, and if so how long that header is (rounded
down to a multiple of the block size).

> Programs which increase the filesize are
> often using the extra bytes to store the unique IV, which allows
> the recipient to re-generate the unique session-key.

> To prevent any weakness due to having many different files encrypted


> with the same IDEA key, it should be secure enough to use a system such
> as the CRYPTIT.BAT at: http://www.afn.org/~afn21533/rgdprogs.htm

> This uses the filename as a unique IV, which it hashes with the
> passphrase to create a unique IDEA key for each file. The IV
> doesn't need to be secret or random, merely unique.

Hashing the filename and the passphrase does not necessarily result in
a unique IV. It's very common for files that have different contents to
have the same filename.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNHuhaTkCAxeYt5gVAQGIHggAwbSQJ994dOdNpL4ogYV2qi72SBPreoYm
97YK19pDNGdZSlxOiWvkxBRGOLp3A6tnAqwGIq2G46xtNMbswjkciu05e6VoSG1Y
QC/JDUl33rb4y8ZYskQD678sTilj2d6GR5a/v+gBvN3lw8sNjp2CbXyIGKF8oj1Q
KjZPsFD+jHsNlPegAaztBihorNbAFDqaN049BP5VLWE+34uKVXI5gJZXZK+t/QUw
j3IMUl3SXT18rXoGvFxoHclwDRNKSLOq02vdU0LqU2cajrYG6uFNldpZIsWCxJWr
5UgDi+fcxLbMpON89Qr00MqJP49SCqgJS7W/6hifFwJP9P1Bo2mPTg==
=lws3
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/V9xDUKhZeb0/m/1LmZGzO4C1oJ", "n_sections": 33}, {"thread": "XQt3nhYnT7M", "msg": "f-TpgrGGwJwJ", "author": "David Hopwood", "date_disp": "Nov 11, 1997, 3:00:00\u202fAM", "subject": "PGP attack FAQ", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <643kbd$s...@newslink.runet.edu>
ibel...@runet.edu (Ilya) wrote:

> -----BEGIN PGP SIGNED MESSAGE-----

> [ The Feasibility of Breaking PGP ]
> [ The PGP attack FAQ ]
>
> 2/96 v.50 [beta]
>
> by infiNity [dae...@netcom.com / ro...@infonexus.com]

[snipped]

You could also add the attacks described by Gary Howland at
http://www.hotlava.com/doc/fag-pgp/ (in particular, creating a key with a
given ID, and creating distinct keys with the same fingerprint).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNGd9WjkCAxeYt5gVAQEUMAgApYVerYxK/KIEfVnBb0NCIbmoyzHApJkQ
8U2h82d1B9qmyQZZDn3f6LmvPZCP4PyOjXAWbPVLVxj/iPwexwoFRDbwaFCytI5Q
V4tVSd+K5bClrIj0+oR3+ggTn6YUjZ1X8ey7lWDRkQjN2m8kiv6eWu4vkPKd9sUh
ocsFw/jLLZQANwJTmFQGQx8slxDKVTFFf+wQud+ceuyspo5Pu5ySv+3cPHju89vu
NqBfKnsnfUxlJ7RTo6JHhsefsO0nDa2SnZrRPEB+5JRT9vEaangI7O6C9mvUkqXg
/HCpn83A/wnJpXgRYBMoOlGXRGfLzWLLy/f90KzF5DKqWXNK2Ej15A==
=Miux
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/XQt3nhYnT7M/m/f-TpgrGGwJwJ", "n_sections": 2}, {"thread": "_OoIRRbqXhM", "msg": "EL8ghLaO_XYJ", "author": "David Hopwood", "date_disp": "Oct 21, 1997, 3:00:00\u202fAM", "subject": "Improving the security of SSL (40 bit RC4) [repost due to newsreader error]", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <344490E2...@izone.israel.net>
Gadi Guy <garg...@izone.israel.net> writes:

> Suppose I created a process that acts as an SSL encrypted
> transparent tunnel over TCP. In other words, I have a deamon
> on machine A that has an SSL link to the same daemon on machine B.

> Now that I have an SSL tunnel using a pair of daemons,
> I run another pair, and create a new SSL tunnel THORUGH
> the first, transparent, SSL tunnel.

> This gives me a tunnel that is encrypted _TWICE_, once using
> the second SSL and then using the first one.

There would be recognizable plaintext from the key exchange of the
inner SSL connection, that would enable you to break the outer one
as an independent step. I'm pretty sure the work factor to break this
is only 2^41.

In any case, why do you need to export crypto from the US in order to
use strong SSL? Just get an SSL implementation written outside the US
(e.g. SSLeay from ftp.mincom.oz.au, which can be plugged into Apache).
There are no restrictions on sending encrypted data between countries.

- --
David Hopwood <hop...@zetnet.co.uk>
Public key: http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x98B79815
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBM/TjDTkCAxeYt5gVAQG7CQf9F9KS4Gz0GTsXOFXTUCv/t9SbGH+QShLv
Xi8BXlm50/9T25YiqNUHc2RWDkTDytMmr08qqwf0e999R3+uHpJ6QHRxc5IsQdth
Hq/HiU0z5yxDZpnLI1LOaT28xG2ngOmUBNHR7FSE9KP2jXn7wEPgXd1dnGye6XMJ
ATdpReBvHCYra/OZDDQpVzAopWHOoO+UGs6Dr1DZtKpwJn+z/u70RvfN8tZaSYCc
6X7BOSBQ3EoWlJz0KRPqfdpZkspTCu7wgOLPJDPGC3H9hKfYRb0I+Vvl8vjSWPeV
WdvFzX/dQiJjTjZyYZPme+wAHIAWOTlGlyHf/AW22/mfDn0M/4tFUg==
=QA9q
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/_OoIRRbqXhM/m/EL8ghLaO_XYJ", "n_sections": 6}, {"thread": "_OoIRRbqXhM", "msg": "IIIbLwQ1kb4J", "author": "David Hopwood", "date_disp": "Oct 21, 1997, 3:00:00\u202fAM", "subject": "Improving the security of SSL (40 bit RC4) [repost due to newsreader error]", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <344B97E6...@izone.israel.net>
Gadi Guy <gagr...@izone.israel.net> writes:

> EKR wrote:
> >
> > Gadi Guy <garg...@izone.israel.net> writes:

> > > Hmmm, RC4 being a _stream cipher_, there seems to be no good reason
> > > for any kind of header to exist! You're encrypting a TCP byte-stream
> > > with a stream cipher, why add a header???

> > So you can packetize it.

> ??? Why would I?

So that you have somewhere to put a MAC (i.e. one per packet), and so that
you can support block ciphers.

> [ EKR wrote: ]
> > This has a number of advantages, including allowing you to have a per
> > packet checksum.

> Nah. I have a per packet MAC (message authentication code), which is a
> hash of the the session key + message sequence number + payload. Much
> better than CRC or checksum.

"checksum" is a general term for any kind of check value that depends on
a message, cryptographically secure or not. I expect EKR knows perfectly
well that the checksum used by SSL is a variant of a MAC.

> And the good thing: It doesn't help attackers, because


> if they don't know the session key, they cannot use it to find out
> if the key they're trying out is the real one.

Of course it helps attackers, if you're using a weak cipher that can be
brute-forced:

for each possible key k,
trial-decrypt using k
check whether the MAC would be correct for the resulting plaintext; if
so, report k as the probable key.

As long as the MAC length is significantly longer than the key length (as it
will be for a 40-bit cipher), this will almost always produce the correct
key.

Solution: don't use a weak cipher. If export restrictions are a problem,


get your SSL implementation from outside the U.S.

> So, it doesn't give away anything,
> and my encryption is still an 80 bit cipher.

Even if SSL did not use a MAC, the cipher negotiation and key exchange for
the inner SSL connection would still give recognisable plaintext that is
encrypted using the outer connection's session key.

> Get it?

Have you got it?

> > Moroever, remember that SSL works with other
> > algorithms besides RC4.

> Yes, but I can tell it which algorithm to use, and I CHOOSE to use RC4.

If you CHOOSE RC4, then either you've included the ID of RC4 as the only
acceptable cipherspec in the headers (which is more recognisable plaintext),
or you're not talking about SSL any more.

> > > Unfortunately, I think you're probably right Chuck. The designers of SSL
> > > might have added a header just to prevent a trick like I described, and
> > > make it easier for them to export the product.

This "trick" would not work even without a header (because of the MAC). I doubt
export restrictions had anything to do with it.

> > There certainly is such a header. Though I can't speak for the
> > designers of SSL, I'm fairly confident it's not there to prevent
> > superencryption. There are lots of good reasons to have one.

> I can't think of any, nor has anybody come up with one.

1. SSL is designed for use between parties that may not know each other in
advance. Pre-agreeing ciphers would be impractical.
2. Allowing multiple ciphers means that the protocol is still secure if a
cipher is broken, and caters for differing opinions about which ciphers
are secure.
3. You need a header to distinguish protocol versions and options, providing
for forward-compatibility.
4. How do you do a key exchange without some kind of header?


Incidentally, another post in this thread claimed that nesting 40 SSL tunnels
gives a work factor of 2^80. The work factor to break this by brute force is
actually only 2^40 * 40, because you can break each tunnel independently.

- --
David Hopwood <hop...@zetnet.co.uk>
Public key: http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x98B79815
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBM/tvhjkCAxeYt5gVAQGSYgf/TA+nIDjoEMOrcFXWljBgA+x+qVscD0h2
hrki/juezRxPWDQW7nelkfat1ul3MMa+qtWyYldWt2aNf62B3V5njOCbWiZCKIBI
2kdvtd/abdRHNxCghKFFWeBAHnGJ6coL66H5+sQ3g+wj4J+4hZD2IdTfvOO768+w
OJtk/Su42c99C1hqd9jsLjRzYG11XTNGBkuNrFaCJyMAbUY7NMOdG+Ua88Eguu9+
yG46VXYpuULwIa9Z0owsNdpPTHdNZ0us6TchiS/F7CRPxGGxKYwbE4vyi4KnhLCB
K0owRDOPSJIjn9/n3D0XTRO/LUjcdyLP+nVqV6X7tLouGJoV3NNb7w==
=gaJJ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/_OoIRRbqXhM/m/IIIbLwQ1kb4J", "n_sections": 6}, {"thread": "_OoIRRbqXhM", "msg": "WqQLQ1p4hT0J", "author": "David Hopwood", "date_disp": "Oct 23, 1997, 3:00:00\u202fAM", "subject": "Improving the security of SSL (40 bit RC4)", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <33elud...@kmac.terisa.com>
EKR <e...@terisa.com> writes:

> David Hopwood <hop...@zetnet.co.uk> writes [re: breaking 40-bit SSL based
> on the MAC, as opposed to using recognisable plaintext]:
[...]


> > for each possible key k,
> > trial-decrypt using k
> > check whether the MAC would be correct for the resulting plaintext; if
> > so, report k as the probable key.
> >
> > As long as the MAC length is significantly longer than the key
length (as it
> > will be for a 40-bit cipher), this will almost always produce the correct
> > key.

> Actually this won't work with SSL, because the relationship between
> the MAC key and the encryption key is that they're both digests
> of some salt and a master key, so to compute the MAC key from the
> encryption key would involve reversing the digest, which is presumably
> intractable.

Sorry, yes, you're right. If I remember correctly, this was introduced
in SSL 3.0, as part of some changes to make sure that the authentication is
strong even when using a weak cipher.

- --
David Hopwood <hop...@zetnet.co.uk>
Public key: http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x98B79815
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNE6nqDkCAxeYt5gVAQFg4ggApjlp+fuqtwhiiDA7TA/S09QGBC0A0mLe
VUXvsGB5AHD+/V7vlNhuuO51z4ht7yvUjH9LrrCtCrfIIe3Kkvs2X8vi2VI3FtDk
XTG+LOWL4ZdbqapNOMldoUvwH04LIzXo2ClcWUsTBq3vbYeZ6Ludy1EGCZrCWJk1
jx6IWMkDdTHlqtzvMYUGJhbGHsFlS/zfreaTGP02FR2AqZJAFfquV3vM3UhtvFTT
zQaBMWVmgCepLpB8cKvJYa33ieLppLo0WrDiXQyN+XJM+N1/o4KYtXbr8FDE6IiQ
/WjTGchX4fSM3JBE1G5hVI6ImGIsuCTz92432Pn9D+jXtcVDtDdR9A==
=GGFX
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/_OoIRRbqXhM/m/WqQLQ1p4hT0J", "n_sections": 6}, {"thread": "bhEBQKRyhqE", "msg": "y634tXgMtE0J", "author": "David Hopwood", "date_disp": "Nov 24, 1997, 3:00:00\u202fAM", "subject": "ONE TIME PAD?", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <3474a93f...@nntp.ix.netcom.com>
rckt...@ix.netcom.com (R. Knauer-AIMNET) wrote:

> On 20 Nov 1997 18:47:52 GMT, pat...@gryphon.psych.ox.ac.uk (Patrick
> Juola) wrote:

> >Let's look at it another way. I only need to burgle your office
> >every three months.

> >Bingo.... instant OTP failure.

> Bingo - instant *any* cryptosystem failure.

No, not at all. Consider an office that uses SSL, PGP, and disk encryption
on each machine:

- - the SSL communications use transient session keys that are not stored
permanently on disk (hopefully the implementation takes care not to write
them to the swapfile).
- - the PGP private keys are protected by passphrases that are only known
to each user.
- - similarly, each disk is protected by a passphrase.

So we have at least three examples of cryptosystems, all in widespread
use, that are not vulnerable to the "burgle the office every n months"
attack. The passphrases may be vulnerable to a dictionary attack, but a
well-chosen passphrase can prevent this, whereas an OTP would simply
fall immediately.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNHjoeDkCAxeYt5gVAQEYAwf/ZbZIC3DZGr7DJ1DyugpSPBJgvrO8qHUL
PDsJ6VEfpFdz6ekvB2Q+y+6XeFfXYU27OyIce+JVyqIcczTswLLRAMlMxswEHwIH
7y3EL7AyjTwyAGHy21m+WrIU357uwReLnakmPJs2gNnBOc5VJdxm6OsAGO93xBoC
EmNkkxXRGkUiLUK4F04m+aQr1hN9B6xEEf9eoqGMTtJ6ZjpMpoGissznDvxhm4ag
ZNIYBSuAnLh6qIF+mFFWJrr2dEYTpzB7a+Vo/OJBJfEXgbVdhyhFSg70LxQFph4y
CSmdr91H/lnbsk1XhvjggJDNFWjl/GS7K0F2sjNLzsqPfkrwDUDrKQ==
=ejOM
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/bhEBQKRyhqE/m/y634tXgMtE0J", "n_sections": 100}, {"thread": "dx-Xu8zL-fA", "msg": "drdMmdbYSYEJ", "author": "David Hopwood", "date_disp": "Oct 21, 1997, 3:00:00\u202fAM", "subject": "Weak IDEA keys [repost due to newsreader error]", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <Pine.SOL.3.91.97100...@ux8.cso.uiuc.edu>
Chuck Willis <cfwi...@students.uiuc.edu> writes:

> > From reading the paper (which I don't understand completely) I have
> > gathered the following. The IDEA key is considered an array of bits 0 to
> > 127 with 0 being the most significant bit. There are THREE classes of
> > weak keys:
> >
> > 1. Keys with zeros in bit positions 0-25, 29-71, and 75-110 (inclusive)
> > and any value in bits 26-28, 72-74, and 111-127. There are 2^23 weak
> > keys in this class.
> >
> > 2. Keys with zeros in bit positions 0-25, 41-71, 77-107, and 123-127 and
> > any value in bits 26-40, 72-76, and 108-122. There are 2^35 weak keys in
> > this class.
> >
> > 3. Keys with zeros in bit positions 0-25, 41-71, 84-98, and 123-127 and
> > any value in bit positions 26-40, 72-83, and 99-122. There are 2^51 weak
> > keys in this class.
> >
> > Obviously, number 2 above is included in number 3 so one need only check
> > that a given key is not in number 1 or number 3. Or, it may be easier to
> > just check to make sure that there is at least one non-zero value in
> > 0-25, 29-71, 75-110, and 123-127. This will eliminate some
> > non-weak keys as weak, but it may be easier than two separate checks.
> > Does this seem right, or am I missing something?
> > Chuck

[...]
> What I will probably do is check bytes rather
> than bits, so if key is of form 000???000??0???? (in bytes) it is
> potentially weak. This will call A LOT of actually strong keys weak, but
> still, the possibility of hitting a "weak" key of this form is 1 in 2^56
> (incidently the odds of brute forcing DES in one try) so I think that the
> overhead of redoing key generation in this unlikely event is much smaller
> than the overhead of doing extra bit manipulations for every key
> generated.

If you do the simple check first, any overhead is only incurred in rare
cases. In case it helps anyone, here's what I ended up with based on your
description (in Java, but most of it is also valid C/C++). Check it before
you use it.

/**
* Returns true iff the byte array <i>key</i> represents a
* weak IDEA key.
* <p>
* IDEA has two non-overlapping classes of weak keys (bit numbering
* is from left to right, e.g. 0 denotes the most significant bit of
* the first byte):
* <ul>
* <li> Keys with zeros in bit positions 0-25, 29-71, and 75-110
* (inclusive) and any value in bits 26-28, 72-74, and 111-127.
* There are 2^23 weak keys in this class.
* <p>
* <li> Keys with zeros in bit positions 0-25, 41-71, 84-98, and
* 123-127 and any value in bit positions 26-40, 72-83, and
* 99-122. There are 2^51 weak keys in this class.
* </ul>
*
* @param key the byte array containing user key data.
*/
public boolean isWeak (byte[] key) {
// keys with any 1 in bits 0-25, 41-71, or 84-98 are OK.
if (key[0] != 0 || key[1] != 0 || key[2] != 0 || (key[3] & 0xC0) != 0 ||
(key[5] & 0x7F) != 0 || key[6] != 0 || key[7] != 0 || key[8] != 0 ||
(key[10] & 0x0F) != 0 || key[11] != 0 || (key[12] & 0xE0) != 0)
return false;

// keys additionally with all 0s in bits 29-71 and 75-110 are weak.
if ((key[3] & 0x07) == 0 && key[4] == 0 && key[5] == 0 && /* 6,
7, 8 done */
(key[9] & 0x1F) == 0 && key[10] == 0 && /* 11 done */ key[12] == 0 &&
(key[13] & 0xFE) == 0)
return true;

// keys additionally with all 0s in bits 123-127 are weak.
if ((key[15] & 0x1F) == 0)
return true;

// otherwise OK.
return false;
}

- --
David Hopwood <hop...@zetnet.co.uk>
Public key: http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x98B79815
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBM+zuQDkCAxeYt5gVAQGzXAf/Y8O5SULNz+1OFmgrtutLMKFCb8Fv5OoD
poC5emRjfqD4v1jILloxYVsI1sXXFs8ubh9H6V3kmag/rPG4lGGcwO4GlolADbb8
Z2lOLpISLdWodApfffHegoF4qdzREcivTy5B/CHf8Oc9QT0umGdFpOdwpa1maxsa
slliEBJct4wQb21r7GRfIErLK1H9DFx1K3HTDdiJ8gi8KUVA2c77UBiPfs8GLPnr
l3R3BZKPL+ZNgf6a0rneQWoSatqrLOycgDYMh9ivNKB+fhcZs/6KOGNZWTtKLJ+5
7X/RiN9rrbiD4TCgSnnBg83ULoWezOIaUFGK5EsfeHQRJV6T6fqQ4A==
=ydDV
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/dx-Xu8zL-fA/m/drdMmdbYSYEJ", "n_sections": 1}, {"thread": "nTmsCpeBKjw", "msg": "J0a1pLrtAGcJ", "author": "David Hopwood", "date_disp": "Nov 18, 1997, 3:00:00\u202fAM", "subject": "rc5", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <346DCD62...@acm.org>
Jim Gillogly <j...@acm.org> wrote:

> Tobin Fricke wrote:

> > The RC5 algorithm takes as its parameters block size, key size, number of
> > rounds, and plaintext in order to generate ciphertext..
> >
> > ciphertext:=rc5enc(plaintext,key,blocksize,keysize,rounds)
> > plaintext:=rc5dec(ciphertext,key,blocksize,keysize,rounds)
> >

> > Is there such a function where:
> >
> > key:=function(plaintext,ciphertext,blocksize,keysize,rounds)

> Certainly.

To be pedantic, actually no. If keysize > blocksize, we would expect there
to be multiple keys that relate the same plaintext and ciphertext blocks,
so in general this is a relation, not a function.

> However, with currently known algorithms
> the function is computationally infeasible when keysize
> is large enough. Which is the whole point of modern crypto algorithms, of
> course.

> See www.rsa.com/rsalabs/97challenge and www.distributed.net
> for information on what constitutes a "large enough"
> keysize.

And then double it (paranoia costs little in cryptography :-)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNHD9ejkCAxeYt5gVAQGz1QgAu2SYNClnKnvG2RvX5VnCu2ougkV3YyVi
c+nwT4i1au4PCsGSpLQSUER13Kij4Vly7NuOcyYLUEfKy4+hA6S7M+eQJkc06u7/
IsmKesA83f1ZC5eA3qh0T4xKxrrQ5IdboMqwb9j5i7YY/X7MO4g7jkd+O1Lf7wid
RSlCFBk8XD51bs9y7idWhXMf1BpwBlYHHOyVw9g0khSKmQXCQBsfpGLJ9TwInm7j
s0Lj5KS37/IP2jDS0CSbvAtW16FYyWg6LmzkTyrzV3UAAek2UBsmkLk6A7GTnX9o
Wj7rWjZ/7R9z3lpoGVib+ILdt5HOXR/Oh9JXJDvkYvICzVfFeAYLSw==
=m7l3
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/nTmsCpeBKjw/m/J0a1pLrtAGcJ", "n_sections": 5}, {"thread": "rpiLDKM2hWs", "msg": "UBX-GWcBlOUJ", "author": "David Hopwood", "date_disp": "Nov 10, 1997, 3:00:00\u202fAM", "subject": "Use of non-cryptographically-strong CRCs", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <34590ab...@news.io.com>
rit...@io.com (Terry Ritter) wrote:

> On Thu, 30 Oct 1997 20:12:43 GMT, in
> <3458e9fe...@nntp.ix.netcom.com> in sci.crypt
> rckt...@ix.netcom.com (R. Knauer-AIMNET) wrote:

> >On Thu, 30 Oct 1997 16:49:31 GMT, rit...@io.com (Terry Ritter) wrote:
> >

> >>I have often argued that a CRC is ideal in this work.
> >

> >Would the CRC-16 suffice for cryptographically secure hashing, in your
> >opinion?

> No, no, no! All CRC's are linear operations. They essentially have
> no strength at all! But in many applications -- even in cryptography --
> no strength is needed.

Agreed.

> One example is the hashing of variable-length user key
> phrases into the fixed-length arbitrary values needed to key a random
> number generator.

I disagree with the example. It's desirable that an attacker should not be
able to gain information about how a user chooses passphrases, by brute-
forcing or compromising a key. That means the hash function should be
difficult to invert.

Choosing a non-secure hash because it is easier to compute can be a false
economy; the time to calculate the hash will be negligable compared to the
time for the user to enter the passphrase, and often you want to make the
hash _more_ expensive to compute than necessary, in order to discourage
dictionary attacks.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNGZ5FzkCAxeYt5gVAQElWgf+La9J2GpIax6sdFqYMDFQ0BzMssErM2vy
L/zm072J9MuSZvdWKV4Zr9LLtSQOK0t0S0QdvmDcxIqTleiIr2dG0E5xPpmQM+Hp
8He3k0P8E6KpRMJooNLXJ0H14omw3mloIkj6xAOVQ1MclQ1vl5klzMTIKxUkXkau
w42+lW11c/xBrqnaeBiC84lp9OyR+3ImKNejF9i4EflErUyy9K503bCuRqJig37a
3tATsJghGsyvDaAko26fL9UbFh296dpNVpn8LvN/cF3hXCZTOH4Lp/3a/7eJ7MV7
aIRQw0fW3ZaxSnc/Zg1LOo08ttHgc6t0GclksUdnn2ReUW5ZmTX4Mw==
=XbUl
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/rpiLDKM2hWs/m/UBX-GWcBlOUJ", "n_sections": 36}, {"thread": "v6V3pOsA-Ig", "msg": "7efWTp5b4jIJ", "author": "David Hopwood", "date_disp": "Nov 10, 1997, 3:00:00\u202fAM", "subject": "RSA Blows Standards (S/MIME) Smoke", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <david-07119...@lax-ca66-11.ix.netcom.com>
da...@sternlight.com (David Sternlight) wrote:

> In article <34657cef...@news.mcs.com>, hei...@falkor.chi.il.us (Ron
> Heiby) wrote:

> >da...@sternlight.com (David Sternlight) wrote:
> >>I have done so and you ignore it. PGP uses 128 bit IDEA for message
> >>encryption. Netscape S/MIME uses 168 bit DES EDE3 in CBC mode. Check the
> >>"security" box under "Messenger" for yourself in a US version of Netscape.
> >
> >Excuse me for interrupting a really fine argument....
> >
> >Is the Netscape "168 bit DES EDE3 in CBC mode" using independent keys for
> >each of the EDE cycles?

DES-EDE3 uses three independent DES keys; that's what the "3" signifies.
The corresponding form of Triple-DES with two independent keys is called
DES-EDE2.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNGZ5hTkCAxeYt5gVAQGqYQf/RQNVYNVBrdXmtDi4BLbR2PVQRyacAGb3
VRMJTCutOYNAEYXnI56sTvhHwJR9p3Tl+E6yTYyBqVNRdW5gtnsUns4Oq/72xDaZ
SSj9UCpUNwRIfzCKRPW92ZeOBJJo8nMxIxneeAdH6rG9txvp3ZPMaDNZtir+OpNJ
JXzqJRmcjkfjNhZYpbqQxaYWaSJBrBtMqKdmhl6RLCKzhbTD2qxoEX/d0dLObdRB
faqqj98MvOqHCY1MKN6aPS7XtJGA4CTLX2ZKbKI+v06HfCFzj8mP15wumjTs41p0
F0C8hmIJLePEoOizFzIKT2f8fivmj39MLbMH8UUS/gEWQYrhYRwjIg==
=Fu2a
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/v6V3pOsA-Ig/m/7efWTp5b4jIJ", "n_sections": 5}, {"thread": "zkIhAcgXneg", "msg": "KSbmm-eOXrkJ", "author": "David Hopwood", "date_disp": "Dec 28, 1997, 3:00:00\u202fAM", "subject": "safe primes", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <67scra$28s$1...@scream.auckland.ac.nz>
pgu...@cs.auckland.ac.nz (Peter Gutmann) wrote:

> "Michael Scott" <msc...@indigo.ie> writes:

> >Having negotiated a mutual key, take the middle 128 bits and use those
> >to bootstrap into IDEA (or Blowfish, or triple DES.....) for subsequent
> >communication.

> One small comment on this, a better way is to use some transformation to
> take the full exchanged secret value (of which some bits will be less
> secret than others) down to the size of the required key.

Agreed.

> X9.42 uses some form of
> hashing (I haven't seen X9.42 so I'm not sure of the exact process used),
> in cryptlib I use 100 iterations of an SHA-based transformation which I
> posted here about a year ago.

Is there some specific reason why several iterations are used? (as opposed
to applying the hash once, perhaps with additional salt)

Or are you just taking into account that there may be some weakness in SHA-1,
and doing the transformation 100 times doesn't take a significant time
compared to the rest of the key exchange? I wouldn't have thought that any
collision attacks on the hash function would be significant for this
application, though, since it's only being used to distil entropy.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNKWY1jkCAxeYt5gVAQE2Tgf/Xj3hL4M+FmHfF3aGSPwCBvDKtC72t7dM
h4RnjxCgra6Td/PvGgMwby19kTqhdcCgqRPlWz1U5KeFXvW23E2HLeQOaiZ+HGab
GjvbZnaRyDPKA04cVkML8oia/ACpykFzCu76Y5gAwvp/oD+blB5he7ZhNO5e8dPc
6JXfMfC5qMzuVvagczKndtjX4wJoA3pCbwOhRh6Azi6cjpWbGwwR4CNf95tbftw9
1lMGLdJmUPSSzRvTImkHMN8aV9lDXtA5veKncLrEmdZP3ohFd9sK7QKGU2acGLla
/hb7JCcyTKipBOLArpaUK+KcV7sQLVqJ9n51hUl1LW1EZkLE9DApog==
=4XgN
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/zkIhAcgXneg/m/KSbmm-eOXrkJ", "n_sections": 23}, {"thread": "-nBMoBA5Fs0", "msg": "y0M3f4hg6KYJ", "author": "David Hopwood", "date_disp": "Mar 28, 1998, 3:00:00\u202fAM", "subject": "Another Reason for an NSA AES Submission", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <6ffplp$d...@dfw-ixnews5.ix.netcom.com>
Douglas A. Gwyn <gw...@ix.netcom.com> wrote:

[...]


> Again, NSA did not design DES. The only "suspicious" aspect of
> their involvement in the selection process was the reduction of
> the key from 64 bits to 56 bits,

Actually from 112 bits to 56 bits (the key was 16 bytes, each with
a parity bit).

> but when you consider that
> many of its anticipated uses would have the key supplied via a
> 7-bit ASCII path, that was not actually a reduction in strength.

Of course it was a reduction in strength in the algorithm. It may
not have been a reduction in strength for systems that used ASCII
keys, but only because directly using ASCII keys is a bad idea for
any cipher.

If the key length of DES had been 112 bits, the best publically
known attacks today would still have been mostly-impractical ones
(requiring 2^47 chosen plaintexts or 2^55 known plaintexts, the
last time I looked).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNR0zfjkCAxeYt5gVAQFkRQgAwenqHEBfuQdeypO8GU/zY/3ZOzvUJ4vx
9P3TaVVt/XfHUxuI0kHTXPRj+QcCV2TZ0/uRE7l7+PS00WN9bE7su5onKCnXOJUX
/BdInYLQEDoDdJkuwfl33uSfkiaPE3m2UFPjsuVNlMVWmobl7MXv0Z9hbLqYi1ly
L8evvhW9dpyg7hXhJ5dRFuB2dqu3dkT/1JP59a+55QwR1d24TwxEx4/o4fxUjDKX
p+UY8vePVJgrv/MZtEBPyzZ6V0Ei3j0oIXk/mmcc0XT3Q5e4iyeJsmTcaaQcMBrQ
wP/Bhgmu9Eu0Z0gT7Ps/DdpkW+duBsIR6871kWLJ865qL7n4/EFnOg==
=FhMV
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/-nBMoBA5Fs0/m/y0M3f4hg6KYJ", "n_sections": 39}, {"thread": "1eIVmbE-_Fc", "msg": "QqVpQWebDCoJ", "author": "David Hopwood", "date_disp": "Mar 15, 1998, 3:00:00\u202fAM", "subject": "Q: ElGamal - creating a private key", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <35003418...@news.cica.es>
gurr...@address.uy (Gurripato) wrote:

> On Fri, 06 Mar 1998 13:22:06 -0400, "James C. Grant"
> <nos...@cyberus.ca> wrote:

> >I want to create a private/public key pair using one of
> >the C++ creator functions (class ElGamalPrivateKey).
> >The comments say it is slow. It sure is.
> >
> >1) How long does it take on a PC?
> >
> It depends (original answer, huh?). I just made a 2048 bit DH
> key on PGP (DH = Diffie-Hellman, ElGamal Variant). It took me about
> 5-10 minutes on a 133 MHz PC.

This is presumably for generating new parameters, as well. Generating
a key given existing shared parameters is only one modular exponentiation,
and took me 0.6 seconds using Java's BigInteger class (also on a 133 MHz
Pentium, with 2048-bit prime and 160-bit exponent). The BigInteger class
uses assembler code from Colin Plumb's bignum library.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNQtnHjkCAxeYt5gVAQFVCwgAutadiY01GIE5vzpSVyjbBvJ/I8cUc/P+
wqykfn+xXwBQC4Jdn6hk6X2yt+EfHyPr3eIcuajCk5wiMBqawZHcCFk+6Ycq4AnP
837AUdS0gM9s8vlRlndGYyTlZYsIvKi7ZD5Y6m/2uy480qdRnT/qU+Zda/4cFHYZ
UukEI9wNM+UqpbfVrDIuSAccRccE9mz+KN1RjDIOjAVm+zBPQY4BRJdLikB7xxsa
sexYbH8TJK7GHMCDWd7xXo3vFTxpdECYrKolS6StCgPvUlxUTybEHYEeEVhr0Aut
w2S71vaDCkTrelZ1ZzvvlgqQhkvGYLW4Nb4QlR6huJNswYiJ+CQmyw==
=eh8e
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/1eIVmbE-_Fc/m/QqVpQWebDCoJ", "n_sections": 3}, {"thread": "7OIQ0efcQBo", "msg": "c8l5dm6iowwJ", "author": "David Hopwood", "date_disp": "Feb 12, 1998, 3:00:00\u202fAM", "subject": "What's your favourite free stream cypher? (WAS Re: Stream cipher)", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

> Colin Dooley wrote:
> >
> > I like RC4, mainly because the source code is small and *cute*!
> >
> > There is no known way to break it if a few minor precautions are taken*,
> > and key size is easily variable anywhere up to 1024 bits.

> This is something I haven't seen anywhere yet. Is 1024 bit the
> actual maximum keysize? The number of ways an n-element array
> can be re-arranged is n!, i.e. 1*2*3*...*(n-1)*n. 256! is
> approximately 2^1684, so the keyspace would be no larger than
> 1684 bits.

> How much further reduced is the actual maximum keyspace
> strength reduced by things like avoiding 1-in-256 keys, etc.?

log2(255/256) = approx -0.005647. So the keyspace is reduced by 0.005647
bits.

That's insignificant in itself, but having to filter out weak keys can
still be very inconvenient sometimes.

For example, if you have a protocol that creates a symmetric key as a hash
of something agreed in a key exchange, it's not easy to avoid weak keys.
The key must be a deterministic function of the agreed secret, and the
method for calculating it must be the same for both ends of the connection.
So, it's not possible to avoid 1 out of 256 keys when RC4 is used in
protocols like SSL or SSH (at least, not if you want to be compatible with
standard SSL and SSH clients/servers).

If the probability of getting a weak key was negligable (say < 2^-64),
that wouldn't matter. A 1 in 256 chance does matter; it's entirely possible
that the advantage for an attacker in gaining information about 1 session
could be more than the cost of attempting to do so for 256 sessions.

Similar compatibility problems apply to the approach of discarding part of
the output. If you discard the first n bytes of the output, you have
effectively created a new cipher that isn't interoperable with any existing
implementation of RC4, unless it uses the same technique with the same n.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNOJAojkCAxeYt5gVAQHdKQgAsSMhCEk/LnU2OHvwlAdxJz4Wd/8rsrmb
sp1a908xXZv+PSBpsZgCL7E8wFkmtRlMOd+J3inKVhKdJCG6AB7T5BHuIS3qRjfg
ytPvBBAPeiz1OMagH7roBqnIBJWzAIOmJJNrEJsDeLPYyr2expT1no9zyBUvLDZ4
vquGMZ9KrAzRv8zQDogonY9j3ORh/m0NC/YguTQOPsHsuHtwNAKz2bQSFc8CAW2A
EVTfodF6X7r6a/Xt/bnRO+klJo1zxaPHJOvLoHJhRem5RPbfaVOzRgFT3tjoZUuS
3I30Jgml701F/wCLmz07fB1niip5hHE68yGGgQ5yz/hb17MLUXMTDQ==
=sCI2
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/7OIQ0efcQBo/m/c8l5dm6iowwJ", "n_sections": 51}, {"thread": "7OIQ0efcQBo", "msg": "zbseJNLHAbEJ", "author": "David Hopwood", "date_disp": "Feb 21, 1998, 3:00:00\u202fAM", "subject": "Stream cipher", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <34E4B9D9...@Sun.COM>
Michael Sierchio <Michael....@Sun.COM> wrote:

> Colin Dooley wrote:
> > The legal issues are as stated. RSA could conceivably take you
> > to court if you openly use RC4 and appear to be making money.

[...]


> RC4 is a trademarked name. There is no "Trade Secret" because it's
> not a secret. Trade secret law really only offers recourse against
> disclosure by a trusted party - I'd say that's already happened.

> You may use the algorithm openly if you call it something else -
> and I suspect that you may even claim that it's compatible with
> known implementations of RC4, but you need to be sure to avoid
> trademark infringement in the reference.

AFAIK, it's sufficient to refer to it as "RC4(TM)" in documentation,
with a footnote "RC4 is a trademark of RSA Data Security, Inc."

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNO4vEjkCAxeYt5gVAQHEzAf+K060hvoGbrNnMsep8jlZxrxacL76rYXj
z7H5KpUxdWTtjJXbqA2lJ1WYLI7H3srrY7ryKtWf/rl+9SScW7CwjDqd4mVu6ZiC
iNiHkB2WOjC2/oE/IwCHbV+k17a8xcgucTWHQitSprwu+QdUCWyPfMpSaOhSNaeR
ZkpzfkbDdq4ZSNyeuB4/sXiac2LRAnkMrTzQqgZvYpDCuiQzbSGTCFgQfACe5fpT
B1VodhWkDlvjlLq3iA7wNcqDaECXNJLhEQbGxNjXeA3MZnd56RbPeK2QlYtVF28n
6Jb2dYWodKmPTQowyA6eM/lz8j3DJiAoe/Y2vulbagF11bvX6ryKLg==
=CBwp
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/7OIQ0efcQBo/m/zbseJNLHAbEJ", "n_sections": 51}, {"thread": "8CWT2Dwp2Cs", "msg": "CxXPDY6adBcJ", "author": "David Hopwood", "date_disp": "Mar 15, 1998, 3:00:00\u202fAM", "subject": "128-bit Block Cipher Ideas", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <6ee8md$g12$1...@news.sas.ab.ca>
jsa...@freenet.edmonton.ab.ca () wrote:

> Back when I first heard about the AES effort, I was interested. However,
> the current requirements for a reference implementation in Java 1.1 are
> just a bit too daunting, although I must admit these requirements are
> (only just) within the reach of a dedicated amateur and don't, strictly
> speaking, require corporate level resources.

The project described below may help. The support code has been written
and is available from http://www.systemics.com/software/cryptix-java/.
At the moment we are handling the Java implementations of four algorithms:

LOKI97 Lawrence Brown (ADFA),
Josef Pieprzyk,
Jennifer Seberry (UOW)

Pentagon Joan Daemen, Algorithm name is likely to
Vincent Rijmen change.

Algorithm C confidential Public announcement scheduled
for the FSE (Paris, March 1998).

Blowfish II Bruce Schneier


========
AES Quest - Cryptix to Support Cryptographers

19 January 1998 -- The Cryptix Development Team announces a
support program for International submitters in the Advanced Encryption
Standard Quest currently being conducted by the National Institute of
Standards and Technology of the U.S. (NIST). The Quest is specified in a
Request published in the Unites States Federal Register [1].

The team behind Cryptix [2], the leading Java cryptographic library, will
provide all support necessary to fulfill the the Java portions of the NIST
Quest specification. This support will be provided on a first-come-
first-served basis to International cryptographers who would otherwise not
have had a chance to meet the strict requirements.

Package Requirements

Submitters (cryptographers) should read the Quest specification carefully
[1]. Submitters will be responsible for submitting everything listed.

Cryptix Development Team (the team) will provide to the submitter the
requirements of the Java optimised version, as specified in section 2.C.2 :

1. Java implementation of the cipher algorithm (a Cipher subclass) that
complies with SUN's published JCE (1.1 preview) API and tested
with the clean room implementation of it known as the International
JCE.

2. Java implementation of the algorithm secret key generator (a
KeyGenerator subclass) that handles the different allowed sizes of
user-supplied key material. Implementations to include:

128-128
192-128
256-128

key-block combinations as required in [1]. Others may be
supported, depending on resources and provision of test data.

3. The above classes grouped and installable as a Security Provider
according to [3].

4. A data file skeleton for use with the Maker simple test data
interpreter and a special version of the latter that will conduct the
KAT and MCT tests [4]. Running the Maker tools with the fully
populated test data file will generate AES required tests and format
the results according to [5].

Note that [1] requires the cryptographer to submit the package and
confirm the contents. We interpret this to mean that the submitter
must enter the data and confirm the proper workings of the code. In
practice, the team would like to see the data in advance for testing
of the code.

5. Optimisation of the Java code, resources permitting.

The team may provide other assistance, as agreed, and as efficient. This
support is a technical programme for the preparation of submissions,
rather than support for the cryptographic evaluation and analysis of
algorithms.

As such the team will be working to meet the 15 June 1998 milestone.
Where other programming support requirements exist in the future, the
team will be anticipating providing similar support as and when they arise.

Conditions of Support

In order to provide support, the team asks submitters to take note of these
conditions:

1. Submitters are under no compunction to use our code. Indeed,
submitters are free to modify it further and submit their own
versions.

2. Submitters should be aware that optimisations within the Java
implementations of the algorithms will be conducted within a team
environment for all contended algorithms. That is, there will be no
chinese walls, and improvements for one implemented algorithm will
commonly be applied to another.

3. The Cryptix Development Team maintains copyright on the code
supplied to submitters, and implementations will be published under
the Cryptix General License. For this purpose, submitters grant a
worldwide, non-exclusive, royalty-free license to all users of the
Cryptix implementation, and any later derivative published within
Cryptix. This is within the spirit of the Quest (see [1] 4. Cost (i))
where NIST requires such a license of the eventual winner.

4. Implementations will from time to time be published in the general
Cryptix distribution in order to generate awareness and enthusiasm
for the Quest and the algorithms [6].

Programmers

Java programmers who are not current members of the team are kindly
invited to volunteer their support, efforts and resources for the execution
of this project. They should look at a companion document [7].

Raif S. Naffah <ra...@fl.net.au> and Ian Grigg <ia...@systemics.com> are
available to answer questions on this project.

References

[1] Federal Register, "Announcing Request for Candidate Algorithm Nominations
for the Advanced Encryption Standard (AES)," September 12, 1997 (Volume 62,
Number 177)
http://csrc.nist.gov/encryption/aes/aes_9709.htm

[2] Cryptix Development Team, Cryptix-Java 3.0, V3.0 December 1997.

[3] Sun Microsystems, "Java Cryptography Architecture API Specification &
Reference," 2 May 1997.
http://www.javasoft.com/security/JCE1.2/earlyaccess/index.html

[4] Maker, is a Cryptix tool for testing algorithms.

[5] AES Home Page, http://csrc.nist.gov/encryption/aes/aes_home.htm
"Known Answer Test (KAT) and Monte Carlo Test (MCT) Information,"
7 January 1998
http://csrc.nist.gov/encryption/aes/katmct/katmct.htm

[6] The Cryptix mirror index is at
http://www.systemics.com/software/cryptix-java/ .
The Cryptix Development Team acknowledges the kind assistance of the many
mirror sites that permit widespread and free distribution of the product,
to maximum benefit of the Internet community.

[7] Cryptix Development Team, "AES Quest - Request for Programmers,"
20 January 1997, is located on the mirror sites above [6].

----------------------------------------------------------------------------
Cryptix is a trademark of Systemics Ltd.
Java is a trademark of Sun Microsystems, Inc.
Neither NIST nor Sun Microsystems endorse this release,
and neither are involved in any way with the Cryptix product.

--
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNQuBmDkCAxeYt5gVAQFblQf/WUvQzdkeBUut3UbRtdHrj+/PRrkotm1U
2qg9qfbRcYBipSGEhiUHa92MzwockrzVMU5bLd+mYFLsnvto3dILFqQ0RS87untk
SjJymHBDZa0AcYpmWvWZKe056L7uShNKVAI+oUkKbXBNa2/YW7SfiGv6lGm/Cbom
2f//cy5MFmGlMOaaq07sLo/2ScSn2ocaTzc2asNKUfJkoufE55WBkz0vQHiEIeMJ
S+1mr15YcP7TZC6ELjpbXA53kojoSkXWkv7ygwk7KA6VXg9Ei15V3AmWStu1vCK8
UoIpvvgLBrpWDG7+qsHb9k6JhsCalgzkaE6APhHkKd7m7zH8NUjjzQ==
=JjTx
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/8CWT2Dwp2Cs/m/CxXPDY6adBcJ", "n_sections": 3}, {"thread": "Eg05isf5yfw", "msg": "O7lxh5oQPzUJ", "author": "David Hopwood", "date_disp": "Mar 18, 1998, 3:00:00\u202fAM", "subject": "DES/CBC/PKCS#5 and Cryptix V3.0", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <350CB70D...@cs.adelaide.edu.au>
Duncan Grove <dun...@cs.adelaide.edu.au> wrote:

> Hi,
> I have written some code to encrypt and then decrypt streamed data.
> I am using DES/CBC/PKCS#5, which seems to garble the first 8 bytes of a
> new stream.

This sounds very much like an incorrect IV. The code should look something
like this:

For encryption:
Cipher cipher = Cipher.getInstance("DES/CBC/PKCS#5");
cipher.initEncrypt(key);

byte[] iv = new byte[cipher.blockSize()];
new SecureRandom().nextBytes(iv);
((FeedbackCipher) cipher).setInitializationVector(iv);
// save or transmit IV with stream (in the clear)

[...]

For decryption:
Cipher cipher = Cipher.getInstance("DES/CBC/PKCS#5");
cipher.initDecrypt(key);

byte[] iv = new byte[
((FeedbackCipher) cipher).getInitializationVectorLength()];
// read IV from stream
((FeedbackCipher) cipher).setInitializationVector(iv);

[...]

> I gather this would be something to do with uninitialised


> padding information, or maybe the cipher chaining mode, but I got the
> impression that the CipherInputStream was supposed to handle this.

The documentation for CipherInputStream (or CipherOutputStream) doesn't
say that it handles this, so it's news to me if it does. I agree that it
would make sense if this were done automatically, so I'll raise it with
the other JCE implementors (IAIK, JCP, etc.)

> Does anyone know anything about this, and what to do about it?

If the example above doesn't solve the problem, please post or send me
some source code that reproduces it, and I'll have a look what is wrong.

Incidentally, the best place to post this kind of question is on the
cryptix-java mailing list (see the Cryptix FAQ or README for how to
subscribe).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNQ8cVTkCAxeYt5gVAQHJ3Qf/bvXd2fM6Uqx/P2JsD6jC4OgXHs05BOSe
JCIgXP/qLUdrnTPzeWMgDURlBMivrLThD6QNBcQq/ef6vmmdurEP6Qkux4zcbdM5
+0BLNYbbqYIcipK8XPD9/gM5D4vVuTLfHrfu2+rtW/CkCxva6/pwJm8TTltPvhAs
S1Zbt3ANuQCHd+/yeq5dE9TKb5r3ixMyxySBWcR4F9FPQnctTJcWOBJHhQHppbcP
1KYALwwiZjjnyCWtYrrGcrfAdFIz+gB69bAD+znv51hqtAGVDD1nl5fcSpEdsh+F
OqXV2pQ8P6Q/pdAkC5yfq/EpNc5uQqi2akGTdvWKJiNtM2AZB3wR5g==
=HgMG
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Eg05isf5yfw/m/O7lxh5oQPzUJ", "n_sections": 2}, {"thread": "HurzacQkbYw", "msg": "9hEN_RDA3WUJ", "author": "David Hopwood", "date_disp": "Feb 4, 1998, 3:00:00\u202fAM", "subject": "Plotting Elliptic Curves", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <6b76ne$2id$1...@rzsun02.rrz.uni-hamburg.de>
Safuat Hamdy <ha...@informatik.uni-hamburg.de> wrote:

> Hi folks,

> I need a way to plot elliptic curves, preferably like Silverman and Tate

> did in their book "Rational Points on Elliptic Curves". The plot program


> should emit something suitable for postprocessing with xfig. I played a
> little bit with gnuplot, but that seems to be not very nice, since I cannot
> simply tell gnuplot to plot y^2 - x^3 - a*x - b, it needs an explicit

> formula, so I had to split the curve into an upper and a lower half, the
> result was not very satisfying.

> So has anybody some experience with this?

Certicom have some neat Java applets (in the tutorial on www.certicom.com)
that plot these curves. Most X implementations allow you to capture screen
output in a format that can be read by xfig, if that would give sufficient
resolution. I don't think source is available for the Certicom applets,
though.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNNj3UTkCAxeYt5gVAQEZ9Af+KzMI8CkWko236WathREXg11u1RBDuTZm
viHLB3nUsR/1Yc5bf+P4QvyU9x8efGzkMnsY8fAvUQvoMGKK2vzRoGhcBbTeYVc1
Vlww7AISzKmplPV2H2X+iPQ0UP3DnIHBo8zvhZurf4A9zC8eTE0tZPceK2EJLtM1
ZB9s43oZdG6Bsz0PFX5lQ4rtGe43cJBP42ZThaUIT1sv64ttKYtvXdBh7eqaGksE
6zMjIVkn/jNZ5Y4ubgqoQGn41ympQgShXM2Rq+7zqxCwQXij458k4a/FRQ5Dhlce
ibJaVrPtVfnDyRmmfUF/Ync3wuatzKwllfvG2CN4LLq1b/axSuqP8A==
=pDiO
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/HurzacQkbYw/m/9hEN_RDA3WUJ", "n_sections": 6}, {"thread": "IZWRtnJIkuY", "msg": "6McUzwFCRDkJ", "author": "David Hopwood", "date_disp": "Jan 22, 1998, 3:00:00\u202fAM", "subject": "AES Quest - Cryptix to Support Cryptographers", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

For immediate release.

AES Quest - Cryptix to Support Cryptographers

19 January 1998 -- The Cryptix Development Team announces a
support program for International submitters in the Advanced Encryption
Standard Quest currently being conducted by the National Institute of
Standards and Technology of the U.S. (NIST). The Quest is specified in a
Request published in the Unites States Federal Register [1].

The team behind Cryptix [2], the leading Java cryptographic library, will
provide all support necessary to fulfill the the Java portions of the NIST
Quest specification. This support will be provided on a first-come-
first-served basis to International cryptographers who would otherwise not
have had a chance to meet the strict requirements.

Package Requirements

Submitters (cryptographers) should read the Quest specification carefully
[1]. Submitters will be responsible for submitting everything listed.

Cryptix Development Team (the team) will provide to the submitter the
requirements of the Java optimised version, as specified in section 2.C.2 :

1. Java implementation of the cipher algorithm (a Cipher subclass) that
complies with SUN's published JCE (1.1 preview) API and tested
with the clean room implementation of it known as the International
JCE.

2. Java implementation of the algorithm secret key generator (a
KeyGenerator subclass) that handles the different allowed sizes of
user-supplied key material. Implementations to include:

128-128
192-128
256-128

key-block combinations as required in [1]. Others may be
supported, depending on resources and provision of test data.

3. The above classes grouped and installable as a Security Provider
according to [3].

4. A data file skeleton for use with the Maker simple test data
interpreter and a special version of the latter that will conduct the
KAT and MCT tests [4]. Running the Maker tools with the fully
populated test data file will generate AES required tests and format
the results according to [5].

Note that [1] requires the cryptographer to submit the package and
confirm the contents. We interpret this to mean that the submitter
must enter the data and confirm the proper workings of the code. In
practice, the team would like to see the data in advance for testing
of the code.

5. Optimisation of the Java code, resources permitting.

The team may provide other assistance, as agreed, and as efficient. This
support is a technical programme for the preparation of submissions,
rather than support for the cryptographic evaluation and analysis of
algorithms.

As such the team will be working to meet the 15 June 1998 milestone.
Where other programming support requirements exist in the future, the
team will be anticipating providing similar support as and when they arise.

Conditions of Support

In order to provide support, the team asks submitters to take note of these
conditions:

1. Submitters are under no compunction to use our code. Indeed,
submitters are free to modify it further and submit their own
versions.

2. Submitters should be aware that optimisations within the Java
implementations of the algorithms will be conducted within a team
environment for all contended algorithms. That is, there will be no
chinese walls, and improvements for one implemented algorithm will
commonly be applied to another.

3. The Cryptix Development Team maintains copyright on the code
supplied to submitters, and implementations will be published under
the Cryptix General License. For this purpose, submitters grant a
worldwide, non-exclusive, royalty-free license to all users of the
Cryptix implementation, and any later derivative published within
Cryptix. This is within the spirit of the Quest (see [1] 4. Cost (i))
where NIST requires such a license of the eventual winner.

4. Implementations will from time to time be published in the general
Cryptix distribution in order to generate awareness and enthusiasm
for the Quest and the algorithms [6].

Programmers

Java programmers who are not current members of the team are kindly
invited to volunteer their support, efforts and resources for the execution
of this project. They should look at a companion document [7].

Raif S. Naffah <ra...@fl.net.au> and Ian Grigg <ia...@systemics.com> are
available to answer questions on this project.

References

[1] Federal Register, "Announcing Request for Candidate Algorithm Nominations
for the Advanced Encryption Standard (AES)," September 12, 1997 (Volume 62,
Number 177)
http://csrc.nist.gov/encryption/aes/aes_9709.htm

[2] Cryptix Development Team, Cryptix-Java 3.0, V3.0 December 1997.

[3] Sun Microsystems, "Java Cryptography Architecture API Specification &
Reference," 2 May 1997.
http://www.javasoft.com/security/JCE1.2/earlyaccess/index.html

[4] Maker, is a Cryptix tool for testing algorithms.

[5] AES Home Page, http://csrc.nist.gov/encryption/aes/aes_home.htm
"Known Answer Test (KAT) and Monte Carlo Test (MCT) Information,"
7 January 1998
http://csrc.nist.gov/encryption/aes/katmct/katmct.htm

[6] The Cryptix mirror index is at
http://www.systemics.com/software/cryptix-java/ .
The Cryptix Development Team acknowledges the kind assistance of the many
mirror sites that permit widespread and free distribution of the product,
to maximum benefit of the Internet community.

[7] Cryptix Development Team, "AES Quest - Request for Programmers,"
20 January 1997, is located on the mirror sites above [6].

----------------------------------------------------------------------------
Cryptix is a trademark of Systemics Ltd.
Java is a trademark of Sun Microsystems, Inc.
Neither NIST nor Sun Microsystems endorse this release,
and neither are involved in any way with the Cryptix product.

--
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNMa9DzkCAxeYt5gVAQGotQgAs6f3MfeSNd1n7yQ586eOsIeqbExfZlbJ
IPu5JDObP2BpuoOFoVbA5AbuVcJ7qB5ulwz5C9PourMsxaQ844HbbrpAvZHipF0T
bh11xgjXhaATk/eJLvSGG4uapJFtsmWGi43Qmvy7k5Sm7lt1/VX1iSGq9jOqztTs
4sWsrTa69E01QeksYkpbuF/hxRFFw/jnbPOhYOFsUwIVrI0Gx/TePYYW26IHvcgu
i6zgQq5XEsDHaLatHLDDcflJgp3coU2FQ37czFCR0jVzdSMXxSCk33FSgE2hYwrQ
X+lE30lLVqUIVLPPJBDISI6wHgR7UyXuj35FNvcaJw9DP8Xv0RMqvQ==
=5Gso
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/IZWRtnJIkuY/m/6McUzwFCRDkJ", "n_sections": 1}, {"thread": "K-9fsOjHPZY", "msg": "3vS9JVaz6vEJ", "author": "David Hopwood", "date_disp": "Feb 26, 1998, 3:00:00\u202fAM", "subject": "need simple free perl El Gamal", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <6cslat$fg8$1...@samba.rahul.net>
c.c....@73.usenet.us.com (Rahul Dhesi) wrote:

> I am looking for short, simple, free perl code to do public key

> encryption and decryption using El Gamal. If people can sell T-shirts


> imprinted with implementations of RSA, surely somebody has done El Gamal

> in a dozen or so lines of perl? It would be sufficient if the code
> created an encryption or decryption key that could then be fed a
> separate DES program.

> I downloaded the Cryptix perl library from http://www.systemics.com/ ,
> but unfortunately (a) the C parts won't compile on my SunOS systems even
> using gcc and (b) the El Gamal parts don't seem to exist separately, but
> require quite a few other files.

Can't help you with Perl, but here is ElGamal encryption/decryption (raw,
without any padding) in 6 lines of Java 1.1:

import java.math.*;import java.security.*;class Elg{static BigInteger B(String
x){return new BigInteger(x);}public static void main(String[]a){boolean e=a[0].
equals("e");BigInteger o=B("1"),p=B(a[1]),q=B(a[2]),r=B(a[3]),s=B(a[4]),k=o;if(
e){do k=new BigInteger(p.bitLength()-1,new SecureRandom()).setBit(0);while(!(k.
gcd(p.subtract(o)).equals(o)));}System.out.println(e?q.modPow(k,p)+" "+r.modPow
(k,p).multiply(s).mod(p):""+s.multiply(r.modPow(q,p).modInverse(p)).mod(p));}}

Encryption:
java Elg e <p> <g> <x> <plaintext>

Decryption:
java Elg d <p> <y> <ciphertext-a> <ciphertext-b>

where p is a large prime (preferably a 'safe prime', i.e. (p-1)/2 is also
prime)
g is a generator in GF(p) (in the case of a safe prime, neither g^2
nor g^((p-1)/2) should be 1, mod p)
x is a random private value (typically about 256 bits)
y = g^x mod p

and all values are in decimal.

It is loosely based on cryptix.provider.elgamal.ElGamalAlgorithm, from
Cryptix-Java 3.0.3 (http://www.systemics.com/software/cryptix-java).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNPOqVjkCAxeYt5gVAQFjjAf/Zkpyhg2rBIfauCCcNGVCLjSTsWhdrU34
XQ1lcuq8hNCw33WTBSqDRIlEs1wM42is+ECZi/abbmTnG7nXtof23h2MJ4NrTvu7
QGiBCl/KMDXNOO81W+yy4O5w3H1OWffaPT3YBeOkrd4G1g+H8pZSkhXtu+Og46eC
x78od7GExoQtzDvR9rKYlu9S+owb/Eam2H9+elNoBBOyQ2po1p18AkKfLk+5x+fB
IzEImsix2HW+5lQml2TUKRRs+LgtNzAdfYlkyGxUazjVY+8K0R9yRnQbfkW2/3wr
E3KCmlhvVQUxbQ0g43l/ylXTGVflxhPJgxpnnTSE7f+7Uf2MWAbfmQ==
=1u+o
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/K-9fsOjHPZY/m/3vS9JVaz6vEJ", "n_sections": 3}, {"thread": "KlVL4IpJsAE", "msg": "Nxqzrd9Z8AQJ", "author": "David Hopwood", "date_disp": "Mar 27, 1998, 3:00:00\u202fAM", "subject": "DES key recovery mechanisms?", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <3511310C...@datacomm.ch>
Thomas Studer <tst...@datacomm.ch> wrote:

> What does it mean if a vendor obtained their approval for DES export

> under the Department of Commerce\u2019s License Exception Key Management


> Infrastructure by agreeing to incorporate key recovery mechanisms?

It means that they have caved in, in the interest of short-term
profits, to the FBI, NSA, GCHQ, and various other intelligence
agencies' goals of being able to continue doing blanket surveillance
of communications - and that you should consider avoiding their
software as a protest.

> How much more vulnerable becomes DES under these circumstances?

DES itself doesn't become any more or less vulnerable (i.e. it still
has too short a key length).

The license exception doesn't necessarily mean that the licensed
version of the software includes key escrow, so it's impossible to
say in general whether that software will be any more vulnerable.
However, you may not wish to become dependent on software which is
likely to have key escrow added to it in future versions.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNRsB0jkCAxeYt5gVAQEGuAgAxL16jP57Q1SUwBXTHgAWL4RD33LC7EsK
ZrcqUeGOvAITNEQPjMQqntFu5CYO5OmzFgF5l/i4ahTv6cdEb9QdOm9FYrnfREHR
TSmF4lnuAuqt5muB23WkFUH+61tVCd/JJ/0EKpCNxa/PulqzxdLTHqvTFvzUFaU5
8/DyvaCAAf4NWpzk9Z75Jup2wcZacNXJA/MmqeM3mLHwuPb6U9fy8hasaFdl+6aR
oLUE/DnJ52c/YxGNu30i5AZmDkDkCz1lZPls1n+NGjf8eyw3qddi9SQ7nk3K5z+w
yP+rvkFHiwYxgZ/9WBfhpJm/PK9ghFDh9pn9/XpjP7CvG+IwigMI7Q==
=C+LP
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/KlVL4IpJsAE/m/Nxqzrd9Z8AQJ", "n_sections": 10}, {"thread": "TnVZoD8gfIs", "msg": "hgcIS7RA5OgJ", "author": "David Hopwood", "date_disp": "Feb 18, 1998, 3:00:00\u202fAM", "subject": "PRNG is this any good?", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <88744740...@wagasa.cts.com>
jdco...@cts.com (J. D. Cooley) wrote:

[description snipped; see previous article]
> Would this PRNG be any good? Would it be good enough for a stream cipher?

No. Secure stream ciphers must have a hidden state; that is, state that
cannot be determined easily from the output. In your PRNG, each block
depends only on the previous output block (actually, 26 digits from that
block in the example, because 6 digits are not used).

So, if an attacker has sufficient known plaintext to determine that much of
the output, subsequent blocks can be found easily.

The shuffling effectively makes no difference to security (because again,
it's based on previous output, not on hidden state).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNOonNTkCAxeYt5gVAQGJcwgAnWoHb8Ht27oSTEFNCl/Sl1SCONPXQmHm
krLVaVqwsO2zG8n2ajA+ulw16eOSnJujDBFEyF3bZjx3mZyR88GMSmdwjqI8JLpC
yGNq+4Jj1Y9PFygXCLW9826WELZk271IO/4mk8GRoLU/gFkCGc/xMILqGy64mRDz
RJ1Oc9ZbTVDir8RyxhWmb/1tn7pyIowXJ1XD2YngVvGKFm73cecGu/xojnyFe+rh
ueOFTd2WKvCcUfHfnW8u4gGAk6LsS8XfnxVUGoui4SMHeG4Wvrkmdpgoy7x98twB
E9acZcaHP5R5MadiPwkDdcE6Jvnaa/29XMmDKJdxn6dFmO65Z6pAwg==
=fbNd
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/TnVZoD8gfIs/m/hgcIS7RA5OgJ", "n_sections": 1}, {"thread": "aXG5Ps9D9Zs", "msg": "JVe-nYN2kl8J", "author": "David Hopwood", "date_disp": "Mar 15, 1998, 3:00:00\u202fAM", "subject": "Public Domain Public-Key Algorithms", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <350a04da...@news.nodak.edu>
jhowar59@nospam!.mailcity.com wrote:

> On Fri, 13 Mar 1998 19:59:24 GMT, mark.va...@morgansw.com (Mark
> VanTassel) wrote:

> >RSA seems to be the industry leader in this realm, but they want BIG
> >bucks!!! Diffie-Hellman seems to be a more-or-less equivalent
> >algorithm (at least for our purposes), but I've been unable to find
> >any definitive information on whether or not the applicable patents
> >have expired (or, more to the point, whether or not the un-expired
> >patents are applicable)... can anyone shed any light on this
> >situation?

> According to "Applied Cryptography, 2nd Edition" by Bruce Schneier
> (p. 516), the Diffie-Hellman key-exchange algorithm is licensed in the
> U.S. by Public Key Partners. Their patent (#4,200,770) expired on
> April 29, 1997 and the algorithm is now in the public domain.

It's pretty academic now, but actually it expired some time in October,
1997 (I forget the exact day). There was a change to the rules for patent
terms after Applied Cryptography was published. Also, the Merkle-Hellman
patent that was claimed by Cylink to cover all of public-key cryptography
expired at around the same time. There are no other patents applicable to
Diffie-Hellman.

Remember that plain Diffie-Hellman is vulnerable to a man-in-the-middle
attack, so you should be looking at implementing some variant like the
Station-To-Station protocol (also unpatented AFAIK).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNQtwWTkCAxeYt5gVAQEjjAgAp4Amk5p4dY14kGnV5YVyGFOoOT0OsLFQ
3QMQjyhqNyhQSBEL0Ozce2I4U2g4yOxvcKqBAf/mKPg647gXxGf1N2XfznJ/6QlU
EHgfSbrNeeNeeG5tzYXadczN8n5CmUrsXca8glBE3sSDQf/LhlCV51maCnIgRKJ5
/zLEJpziYCZdD2DTMA3LIJdefl0l7EXyV+hk0ggghgrJq+wDW0TDIUAdpejgHq3Y
W+hwM7io7jiT6IPsByHlLNpw43OswKpGbJIU7PSJDea12hW8PjS62YfD70/zs/+6
BFIW46M5VX7Jvur6/pqqNjDyFITyQFB3yoJ2XuUEmTaStgtlvlFgbg==
=/yiy
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/aXG5Ps9D9Zs/m/JVe-nYN2kl8J", "n_sections": 7}, {"thread": "d3VTjrTgDRg", "msg": "MuqEmqEbuEcJ", "author": "David Hopwood", "date_disp": "Feb 26, 1998, 3:00:00\u202fAM", "subject": "Attack on Diffie-Hellman", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <6d113n$prh$1...@news01.iafrica.com>
"Andrew Roos" <and...@exinet.co.za> wrote:

> I've found a simple attack on Diffie-Hellman key exchange. The results of
> the attack are:

> Given
> m - A (prime) Diffie-Hellman modulus
> g - the generator
> p - a public key, where p = g ^ s (mod m) with s a secret key

> If one can find
> f - a small factor of (m-1)

> One can determine
> s (mod f)

[...]

Actually that isn't specific to Diffie-Hellman; it's really an attack on
the discrete log problem over GF(p).

In any case, the prime used for Diffie-Hellman should preferably be a safe
prime (i.e. (m-1)/2 is also prime). In that case, this attack doesn't help
much, because you can only find one bit of s. I know that the SKIP Diffie-
Hellman parameters use safe primes, for example, and IIRC the P1363 draft
standard also recommends it.

The fact that the symmetric key is supposed to be a hash of the agreed
value, rather than the value itself, also probably helps (because if the
agreed value has any structure, that won't be useful in a related-key
or brute force attack on the symmetric key, after it has been through
the hash).

> Does anyone know whether this result has been published?

I'm pretty sure I have heard about it before, but I can't remember where,
sorry.

> If not, I'll post details to sci.crypt.

Do that anyway; it's a lot more interesting than endless threads about OTPs.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNPUcVzkCAxeYt5gVAQHBiggAgf8YmHxXfUk05mkp93bdCA/FcLJkwMhs
ODOnuDjv/TW2gmQDA0bqGZcnnXmVrw2o5+UTtghnAhcUOjeimwGcrtB5r3XQ47W6
UB628t7RmxS1qJCtfVYjCdWmD2fuIfl8uU7GrhmfCo1P3z3JT1o4v15G30ST1O/Q
isuyR8aDMe2qwYZzuI80fft1+e4/mN/aciUHgbEFeaXhmnE3eyybVU7raics8fwW
mFIbmxaFZgiMQ8Cy8ofVZLY8PQUIZsbTScBLkINidHZZw/O1PjYfsVx5E9tL57pb
cOy1UarCi/SNelDqzBzmb68QUA+kZvhziWqVn358d23YH65HOSh+XA==
=avGu
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/d3VTjrTgDRg/m/MuqEmqEbuEcJ", "n_sections": 12}, {"thread": "epPC-xt9Yws", "msg": "V0-X9VTHxAgJ", "author": "David Hopwood", "date_disp": "Jan 29, 1998, 3:00:00\u202fAM", "subject": "Function F in Blowfish", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <34CFE0C7...@inside.com.tw>
Nathan Kennedy <ken...@inside.com.tw> wrote:

F(xL) = (((((S1,a) + (S2,b)) mod 2^32) XOR (S3,c)) + (S4,d)) mod 2^32

['^' means 'raised to the power']

I've confirmed this against a working Blowfish implementation.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNNACXTkCAxeYt5gVAQGMAQgArT0efHIOqMz6TN0cCYwNtCWGXoIBoZqs
xCcQt5lAKcpSM30DzKRG37IREmx+lVX92ObQgQJOSbwOv6PqbfzebA+bdtk4wD0c
IhuxPsakvCw20YMxIK9xewntBzGcnbupg4sUas3Evech6GbLuTAU/MG3uILtHZ+h
mRv4xi05RNy4mZmqrhyExwOcAIpXuhk13G8/QmW6P6zI9jFQ1v2YIiH6Lg7iMBSE
nTKCqF77+snz66/1aPjVYsKohwlJ0NVEYd+4ezT0+H3F1bLqANVsSYIDIbiySpk0
M+N+qPLpSckdekFmxjaRB3iErioRJk0Kf85YxMEBDPesz7YwWN/O2A==
=pE7Q
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/epPC-xt9Yws/m/V0-X9VTHxAgJ", "n_sections": 2}, {"thread": "j8HpyBPvcSI", "msg": "Uv4xy8XhpCwJ", "author": "David Hopwood", "date_disp": "Mar 15, 1998, 3:00:00\u202fAM", "subject": "hashing passphrases", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <jc254.8...@newton.newton.cam.ac.uk>


jc...@newton.cam.ac.uk (Jonathan H N Chin) wrote:

> "I'll use a passphrase!" says I, then begin to worry that since I know
> eff all about crypto, I'll be weakening things severely if I don't use
> a sensible hash function.

> So, what decent hash (message digest(?)) functions exist?

SHA-1, RIPEMD160, HAVAL, for example. See PKCS #5 (on www.rsa.com) for a
method of deriving the key from the passphrase.

> In particular, are there any good ones that can be expressed in a few
> handfuls of lines of code, in keeping with the spirit of the exercise?

Not really (actually, I'm a bit skeptical about TEA, anyway).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNQtojjkCAxeYt5gVAQEROQf8CnY6xk0053HMkkABkgDLKU3n8pvqGSWF
B7/x65RdMRjhy/N6BTbI+h1MwJSQCWhykEktfka1VgA8NdJ6XNhV43l089822emt
mOEVVBWE3NDthrFJ2oj5AcZOrlHzOhkm6CYxgRvnr6sfSczJ2vGG3jKDTNhZOdUd
fo7zrzdcZJuthpch1UCeJJ3KSJWRmXOefxm/hcpvcADSmfFUE6CTMLaHFQKhyn3v
kBWZDP+aa/2JL7AhdGwUjt5aiVUkfsiDv0v2ApiZAsrx66Zi9TEvu3tgX1aiUvLi
VeXk/b4WHS5BsoeqO+fM/++Rrl2HyxXJoussJP+QV5GRzWRkbUlBCg==
=xAYi
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/j8HpyBPvcSI/m/Uv4xy8XhpCwJ", "n_sections": 4}, {"thread": "pASDPoiO16U", "msg": "ucD6qrGb0ScJ", "author": "David Hopwood", "date_disp": "Feb 9, 1998, 3:00:00\u202fAM", "subject": "Are PGP keys interchangeable ?", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <6bgqtr$6...@news2.snet.net>
"Kilrogg2_GS" <kilr...@mindless.com> wrote:

> Hi all !

> I want to know if in PGP algo (IDEA to be more accurate)
> the private and public keys are interchangeable ?

IDEA isn't a public key algorithm. Perhaps you meant RSA?

> I mean that is it possible to use the private key to crypt
> a message and use after the public key to decrypt the same
> message ?

As it is used in PGP, no, not securely. The value of e is fixed at
17, and you can't keep a fixed value private. This would be possible
for RSA in general given a suitable key pair generator, though.

> Also could anyone tell me what are the advantages of DSS
> against RSA ?

+ It's not patented (probably). RSA is patented until 20th September
2000.
+ DSA [*] signing can be faster than RSA signing if you use a
precomputation (which isn't always possible, and it is always
slower for verification).
+ A DSA library can be written not to be useful for encryption, so
it's possible that the US government might give you less hassle
about exporting it.
+ Key pair generation, excluding generation of parameters, takes
less time for DSA.

On the other hand:

+ RSA is faster than DSA in most cases.
+ RSA is more commonly used, and therefore you can be compatible with
a wider range of software by implementing it.
+ RSA is slightly simpler to implement.

[*] DSA is the algorithm; DSS is the standard that defines that
algorithm.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNN66HDkCAxeYt5gVAQEWkQf/QBrZHYdm7ruFfkv+rLMZbnYL17+gek4f
5LB3f+r2fa7W7Y71KkHztw5k8lHxsspD27I9x5eOK2LAgIvHbG1zaGitGfZ982B6
xRiQ5RaVwXWpgbZW2elefxXhs/Pz+hsUDfCg/L3+qe7epnNEi7sKHW7vPdOBY+mN
pJpyV0VRq9lSp8Qox5GwlPsObWLG8hMMfneTnGgxWdnMczpximT1A3xpz81ebLwG
czPimnTjg5SoJqGFoGRgG5OHYyYdtQqaqZvxhla3f4rVESydoIIid/xOQPcSwhMX
0TE32GOSsXBlyH1NNOkTO9fqhTbxNIaoha4ZCjOd7lfgdkb4CnTqoA==
=4kfb
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/pASDPoiO16U/m/ucD6qrGb0ScJ", "n_sections": 4}, {"thread": "tHxdGpbWOiQ", "msg": "UlIsNLFgMQAJ", "author": "David Hopwood", "date_disp": "Jan 22, 1998, 3:00:00\u202fAM", "subject": "AES Quest - Request for Programmers", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

For immediate release.

AES Quest - Request for Programmers

20 January 1998 -- The Cryptix Development Team is issuing a call for Java
programmers to help support cryptographers in the Quest for a new
cryptography algorithm. Called the Advanced Encryption Standard (AES), this
algorithm is planned to replace DES and be approved for service in time for
the next millenium.

In the first phase of the Quest, as sponsored by NIST, cryptographers around
the world are invited to submit algorithms and implementations in C and in
Java. NIST will conduct testing and coordinate public review [1].

In the second phase, up to five algorithms will be selected for in-depth
analysis, public scrutiny and eventual selection of the algorithm.
Cryptographer Bruce Schneier estimates that the eventual AES algorithm will
be securing Internet transactions for the next 60 years [2].

Your Internet Needs You!

The Cryptix Development Team has to date produced in excess of a hundred
thousand lines of quality freeware code, and has blazed the trail in Java
cryptography [3]. Cryptix-empowered applications have protected Internet
transactions for 2 years, almost as long as Java has been a publicly
available system.

For a challenge of the size of the AES Quest, the team needs more talent. In
order to provide a quality implementation of a secret key cipher, it is
estimated that approximately a month of part-time effort is required for
coding, testing, packaging and supporting of a professional security
provider to support the needs of AES cryptographers.

Top Experience

The team has to date produced implementations for these algorithms:
Blowfish, CAST5, DES, Triple DES, IDEA, LOKI'91, RC2, RC4, SAFER, SPEED, and
Square [4]. This unequalled experience will be poured into the AES quest as
assistance and guidance.

You can help! Deep experience with Java or cryptography is not entirely
necessary. Indeed, as most of the code is simple mathematical manipulation,
and using the 'provider' templates, a good grounding in C or assembler is as
useful as basic knowledge of Java.

The most important thing is the desire to understand and code up complex
manipulations, and a keenness to deliver a well thought out, quality and
completed result.

Flexibility is also possible, and necessary. With approval of the final
algorithm not expected before the year 2000, this is a long-term project.
There is plenty of time to move through different phases of the Java
experience of cryptographic testing, optimisation, packaging and support.

For points on the Curriculum Vitae, building a cryptographic provider to
NIST standards cannot be beaten. For an understanding of how Java
cryptographic applications are built, the Quest will be an apprenticeship
that can't be missed.

Join the Team that Protects the Net

As a member of a project that will reach out into the next millenium of
Internet transactions, your employment desirability is enhanced!

The AES team will be a part of the Cryptix Development Team. Project Leader
Raif Naffah will work with all programmers to provide an interface to the
cryptographers and the NIST panel.

Cryptix Fills the Gap

Java is the immensely successful Internet language by Sun Microsystems [5].
Whilst its popularity grows without bound, Java has not yet filtered into
all walks of life.

The team behind Cryptix, the leading Java cryptographic library, is seeking
to provide all the Java cryptographic support necessary to International
Cryptographers. Due to export regulations, we are not looking for residents
of the US at this stage.

The Cryptix Development Team will maintain its priority of supporting the
needs of International users in all countries. Cryptographers are encouraged
to contact the team, and to look at a companion release describing the
cryptographers' side of the Quest [6].

Raif S. Naffah <ra...@fl.net.au> and Ian Grigg <ia...@systemics.com> are
available to answer questions on the AES support project.

References

[1] Federal Register, "Announcing Request for Candidate Algorithm
Nominations for the Advanced Encryption Standard (AES)," September 12, 1997
(Volume 62, Number 177)
http://csrc.nist.gov/encryption/aes/aes_9709.htm

[2] Bruce Schneier, Meeting Report: "Developing the Advanced Encryption
Standard" Workshop, 15 April 1997.
http://jya.com/aesmeet.htm

[3] Cryptix Development Team, Cryptix-Java 3.0, V3.0 December 1997.

[4] All mentioned algorithms are available at a mirror site near you. The
Cryptix mirror index is at http://www.systemics.com/software/cryptix-java/ .
The Cryptix Development Team acknowledges the kind assistance of the many
mirror sites that permit widespread and free distribution of the product, to
maximum benefit of the Internet community.

[5] Sun Microsystems, "Java Cryptography Architecture API Specification &
Reference," 2 May 1997.
http://www.javasoft.com/security/JCE1.2/earlyaccess/index.html

[6] Cryptix Development Team, "Cryptix Support for AES Quest," 19 January
1997, is located on the mirror sites above [4].

----------------------------------------------------------------------------
Cryptix is a trademark of Systemics Ltd.
Java is a trademark of Sun Microsystems, Inc.
Neither NIST nor Sun Microsystems endorse this release,
and neither are involved in any way with the Cryptix product.

--
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNMa+UDkCAxeYt5gVAQHBHAgArtcqCKPnNpXllVvQ0UxQJMteRmw0HciH
RGfeX94VhWNPr+H8mV7Jrwx1XsJ9JzgaEq5XL5nNkHfsuPpVHCVWLGUkFSjW8WcG
vuYhW0qT12NkS4IriDhEqLU4GcD1+jMiM4Ha1PRJjvUMqj/u4Xo51zRK292Zc4lt
cPAH52Y+928UefVp0FQEwdyOS2M1Lksi+YHALqfXo8564a4qrUf8frVjrK6WvWOI
EqXtFxKAKg3NQZxCJ03I7RY75mxRm/tqufRpr1ZGC9DKWAe1C2OwbhzHr6KICc14
vFYt6LWbIpIneTkLXD9S3baBoJqmUfXdDdcbCqC7xNRVR4vS0V9JsQ==
=XzOp
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/tHxdGpbWOiQ/m/UlIsNLFgMQAJ", "n_sections": 1}, {"thread": "uBtjh6GjVTY", "msg": "fKMWLseCQ8EJ", "author": "David Hopwood", "date_disp": "Jan 2, 1998, 3:00:00\u202fAM", "subject": "patent-free royalty-free strong encryption", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <hinks-ya02408000...@news.netspace.net.au>
hi...@netspace.net.au (Adam) wrote:

> Hi

> I'm looking for source code to patent-free royalty-free strong encryption.

Blowfish, CAST5, Triple DES, LOKI91, RC2, (possibly) RC4, SAFER SK-128,
SPEED, and Square probably meet your criteria - the most conservative
choices being Blowfish and Triple DES.

If you're programming in Java, try http://www.systemics.com/docs/cryptix/

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNKxDQTkCAxeYt5gVAQFt6wf/YNi9NK6dgNYhcsZnvaL7Lh/CPATxlU3b
sPEmPcZ9+8vOUZOEuBEIrAE/hnvxpOgrozZ10eAkFz8XsEinPqdUriKwbMdo7cKt
XJ7Bswof1RX/3//cW+mZjj7kjdofNy7VWbJZRJBUSrlR17gqwEdbhN2zbvrq1K+V
L7BYTDKAOOJJRYRRWwDQm2BdoZyvI6dVCrgx5HPmX8Y7eC+bSV+RhlRPFi5Gl1VC
lLP4ktF8qZUhCWKH6ptjCpDs70FI30MCjZc8vGqsSqXBwrp+iTQIxIbixWnIeB37
9MBD+QdfR1QE9o9SH3lAHEQpUqT2l6ioytL5VnFkmWCEl36jGT8/Aw==
=7dnR
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/uBtjh6GjVTY/m/fKMWLseCQ8EJ", "n_sections": 62}, {"thread": "usJBREaPw5g", "msg": "36_7l4BE8gUJ", "author": "David Hopwood", "date_disp": "Jan 3, 1998, 3:00:00\u202fAM", "subject": "New : RC4 in Feedback mode", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <01bd185d$4013b360$451065c3@osgzfqel>
"a" <alexanderm...@hotmail.cm> wrote:

> THIS PAPER DESCRIBES
> THE RC4 CIPHER
> IN PFB MODE
> ( PLAINTEXT FEEDBACK MODE )

> The rc4 cipher was designed for use the OFB Mode ( Output Feedback Mode ).

It doesn't really correspond to OFB mode as used for block ciphers; I'd
refer to it as something like 'keystream mode'.

> This mode produce a stream cipher XORed with the plaintext. It can be used
> if the session key is totally random and UNIQUE for each encrypted file.
> The plaintext or ciphertext don't affect the stream cipher.

> A lot of implementations of rc4 use the clock's timing of the computer to
> produce a random session key. It's not secure. One should use the user
> keystroke timing to produce random session key.

> To not rewrite these implementations of rc4, one can use the rc4 in PFB
> Mode.

If the session key generation is broken, fix it. A new mode would only be
worthwhile if it provided a significantly better trade-off between security
and speed.

> It frustrate the known plaintext attack against OFB Mode.

PFB mode appears to xor the current plaintext byte with each byte of the
RC4 state on each iteration. How do you know that it isn't facilitating a
chosen-plaintext or adaptive-chosen-plaintext attack? (This kind of attack
would enable an attacker to influence the internal state of the cipher,
which would not normally be possible for RC4.)

I'm not saying that this makes the mode insecure, but I'd have to see much
more analysis before trusting it.

[...]


> int s[256],k[256],i,j,tmp,t,q;
> short c;

[...]


> void rc4pfbmode()
> {
> for (tmp=0;tmp<=255;tmp++)
> {
> s[tmp] = s[tmp] ^ c;
> }
> }

[...]
> main()
> {
[...]


> while ( (c=fgetc(in)) != EOF)
> {
> codeabyte();
> rc4pfbmode();
> fputc( (c^q), out);
> }

[...]

Using global variables like this makes the code inflexible and more
difficult to understand. An English description would have been more
useful.

BTW, if I sound critical, it's because I think that new algorithms should
have a high entry barrier before they are considered for use. The onus
should be on their inventors to provide arguments for why they are secure,
or why they satisfy any other design criterion, rather than for anyone
else to demonstrate why they do not.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNK6p9DkCAxeYt5gVAQGQkgf9GupVhSciExHQ0ANO7KZN8axN2vU4GPZI
svQdoc/rDfO8b73BW69fZlez3YDaUhIhfJ/u0nQJKTwdfFHaLQZkMSltAabPvBPP
sM9EI8rg8JGzPJ2mbmX27pRLA8d+YhPui0D3++q4PY5mxPDKKLAJVEGMPO748oUV
/DLillJTPedw20dfRwSwnEroiL/3ALTrs8LNtXscCDOUd588RQ5AbZmgC5tymVNC
JPNxmvBDY4HYELPic1J9xwM8hm4x/S8/w/NQXH4jiY7EUTOLh8rs6uzh9AY81d2V
TIOaKh0Jij5b0vpbzqWA+wM+JBe5sS/fUSHsLlbMS4iQT/CTrTFMDQ==
=fpk2
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/usJBREaPw5g/m/36_7l4BE8gUJ", "n_sections": 3}, {"thread": "wCXwXqGA018", "msg": "R29sjhalpsIJ", "author": "David Hopwood", "date_disp": "Feb 2, 1998, 3:00:00\u202fAM", "subject": "OTP questions.", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <886285590....@dejanews.com>
pmu...@shrike.depaul.edu wrote:

> I am looking at the OTP system. I can't understand something.

> First, I will enumerate some of the requirements of OTP as
> I understand them.

> 1. a Random bit/number generator
> 2. you can never use a (the) random key sequence again
> 3. destroy the pads after usage.

> What does requirement #2 mean ?

> Do we simply discard any pad produced


> by our RNG that has been produced previously ?

[...]


> Its clear that if I my spies recover plaintext
> that corresponds to a given message... I can
> recover a key, a key that I know for certain
> will never be used again.

[...]


> I may be completely wrong here, I may have
> missed something, or misinterpreted the
> second requirement.

You've misinterpreted the second requirement. It means (loosely speaking)
that previous output cannot be reused, if the reason why it is being
reused is that it was previous output.

If output is generated randomly (with a uniform distribution) but
repeats by coincidence, that is fine, and the repeat should not be
discarded. More formally, all subsequences of a given length should be
equally probable.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNNUUYjkCAxeYt5gVAQFDLAgAyxpC+6kj26JaU7zpB3VIGvO1pPCwlmC+
iHu1cXjCByA0ix4CqbXwHkryP9aat5Q3HD0ihVu4eENXmaOyJGYUuzGGyXKgA9UE
VoBcKINObyUAnaES64M94JxA6p6yleEg+ngvsAEfqWQbYnCtn0JgtrKzhUqmUAaU
GJRDe+pH/NlnVhYFDNaGokWvh5JGHMiYNK9OgcNryw+ChukpC8N8mxAxlPlv+GeA
YO2+Vl1X8jK9su02sNKjabYM0FLnGZ29+N9gRMQVgHZIj4FeR3DxhDQpIiHly7LD
i4h3YltRufOOGzaE1n78lygC/PxV4TiHYWxwG8HwCl+iqzMArMZNOA==
=PUHc
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/wCXwXqGA018/m/R29sjhalpsIJ", "n_sections": 74}, {"thread": "zyjTMGIagjo", "msg": "MMxubX0pmu8J", "author": "David Hopwood", "date_disp": "Mar 27, 1998, 3:00:00\u202fAM", "subject": "saferk-128", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <6ep8v2$o0$1...@camel18.mindspring.com>


pa...@mindspring.com (James Pate Williams, Jr.) wrote:

> "noname00" <po...@internetmci.com> wrote:

> >Is there a saferk-128 I have the 64 bit version.
> >thanx

> Yes there is a 128-bit version of SAFER called SAFER K-128 by


> the developer of SAFER K-64 Massey. Also, there is SAFER SK-64
> which is a strengthened key schedule version of SAFER K-64.
> See _Handbook of Applied Cryptography_ by Alfred J. Menezes et
> al page 280 for the references to the original papers.

There is also an SK-128, which should be stronger than the other
three variants. If you are using Java, the Cryptix-Java library
(http://www.systemics.com/software/cryptix-java/) has an
implementation of all 4 variants.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNRr+FjkCAxeYt5gVAQGcnwf5AYJMIuOMSW1EeYmGs7I03vyUcOVJYmqI
mWQJOsz63FTnPT3HQw/2c23ZNfelajNzW06GySx+GSxmHfalxj1QGCBJZ5j8Nuta
HMM3AS7p6KmOHuatqlTTzUhyNL/5bL8jwx3AtEBJSzqOc+RzgGtoGHbBaqTFmBOh
ma2Z6rGfA2TJR575BkJ1wX+rOno5vOox8U8ZgvuM9WR7X0O0eB9rB/HzczphvtOG
Xtstpw7pOa0Hu+AO594fXbQYxUcP07kyrA2cQbSTz2hswLMCSZG/SemVfe6GrO95
jJqpnjXtep7UiARKkOEKR6qUEjfByIRa6SOE4S5AYhLJbeeH8t5qiQ==
=s3i7
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/zyjTMGIagjo/m/MMxubX0pmu8J", "n_sections": 5}, {"thread": "1mcImPdJv0c", "msg": "Gybu2Ffp2aYJ", "author": "David Hopwood", "date_disp": "Apr 25, 1998, 3:00:00\u202fAM", "subject": "A5 cellular phone algorithm.", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <353B0BE7...@atos-ods.com>
Luis Saiz <LS...@atos-ods.com> wrote:

> Jeffrey Tong wrote:
> > They suspect the programmers left the last 10 digits of the 64-bit
> > A5key as zeros to weaken the code and allow fast government computers to
> > eavesdrop. No comment here.

> This last attack was not related to A5 (encryption) but A3/A8
> (authentication)

> See: http://www.isaac.cs.berkeley.edu/isaac/gsm.html

Actually it was related to both. The output of A8 is used as the key
to A5. Here is a post by Marc Briceno <ma...@scard.org>, reproduced at
http://jya.com/crack-a5.htm; in particular note points 2 and 3.

# Date: Sun, 19 Apr 1998 16:01:12 +1000 (EST)
# From: Marc Briceno <ma...@scard.org>
# To: John Young <j...@pipeline.com>
# cc: interc...@ii-mel.com
# Subject: Re: Masson
#
# This list apparently has seen some posts about A5 lately. I don't have the
# time to write a paper on this topic at the moment, so here is a list of
# facts known to be true.
#
# 1. I discovered COMP128. COMP128 is widely used as the GSM authentication
# algorithm (A3) and session key generating algorithm (A8).
#
# 2. The 64 bit output of A8 is used as the session key for A5 (including
# all A5 variants), a 64 bit cipher
#
# 3. A8 has been _deliberately_ weakened to provide only 54 bits of entropy.
# This is done by setting the last 10 bits of the A8 output to be always 0.
#
# 4. Assuming the cipher used is COMP128, the output of A3 and A8 is
# determined by exactly two factors:
# - The SIM's internal key Ki.
# - The random challenge sent by the base station.
#
# 5. We showed how to extract Ki from a SIM in our posession. A rogue base
# station could perform the same extraction of all the Ki's from all the GSM
# phones within the area covered by the rogue base station.
#
# 6. The challenge can be intercepted off the air.
#
# 7. From 2. and 4. follows that an attacker that knows the challenge
# (obtainable over the air) and the SIM's internal key Ki (obtainable over
# the)

[sic; I assume this was meant to be something like "(obtainable over the
air by a rogue base station)"]

# can determine the session key used by the on-the-air voice privacy
# algorithm A5.
#
# 8. Assuming the attacker knows A5, the attacker can therefore decrypt the
# voice privacy features.
#
# 9. Note that given the above facts, no cryptanalysis of A5 is required to
# compromise the voice privacy features of the GSM call of interest.
#
# -- Marc Briceno <ma...@scard.org>
# Director, Smartcard Developer Association
# http://www.scard.org

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNUEtbzkCAxeYt5gVAQEpbgf5AWkxAzn7dxCb0A6Z31bFUctnfK7LG6bQ
S9qMoA/tox5jhZcw0q+RD/Be4dYTgeFIecHy9xhg1u3dGDgDFHagGNeg5aAW++6V
52nJJNQesiynKACuol7CnsuiXjNRXI3omeT/xAFoZZBcgKjmd/mcFUnFuD4ngGj4
7WeOhBzVOjGQkE2bgbbVxygOUjAOr0m5c5KBhSvYncWmz0qvSDOrWjo7KC3Ezv1Z
D5NbAX7po9T5X1SxXcnRvRaEGNWQyniEVDGcFdTbZFiDeTE/30U5Eigl9a4qS+0a
LIsoy4qFN3o+q43V6U0T5ZrW1vAJ1phgAROPjvGb8mnDysmdT8w5JQ==
=3m5h
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/1mcImPdJv0c/m/Gybu2Ffp2aYJ", "n_sections": 6}, {"thread": "EyjApF5O9N0", "msg": "2yj8_5qwtNEJ", "author": "David Hopwood", "date_disp": "May 3, 1998, 3:00:00\u202fAM", "subject": "Someone Please Try to Beat the Challenge", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <6hvqro$ok$1...@news.ysu.edu>


an...@yfn.ysu.edu (David A. Scott) wrote:

> In a previous article, log...@aol.com (LogixR) says:

> >The challenge can be found at http://members.aol.com/sqmafia/main.htm.
> >The challenge involves decrypting a message encrypted by a program I
> >wrote using a very simple algorithm. It my first program, don't expect
> >much. I want to find security holes in it and improve upon it.
> >

> >Thank you.
>
> Don't expect much I had a contest where I used a single 4 bit table to
> encrypt and no one was able to break it.

More precisely, no-one bothered to break it.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNUycFjkCAxeYt5gVAQHTBAgAyLO+PbmisHOwM2i8MeNaBO5CyDSLtjvb
NCg2WzEeevqLRRvFcvLqAKBjh2IOOY3EpLbYySASC1FaabU3dH6jHydItup/MiBk
tRPU4HF5WhNM8ODcId/rd27CsRobXjuWGkOY6UKmbeN1J6Nf9oqVd7DLxIQYQIos
oicTfMWPZ/GUeR2QPiof0UUxdr3sziHv4EhuJClkhfKgb9v+Bd6R5GmLhBoDBgPG
0l9EhVPKd110rJ/TY7be1BippOD70zlt/Eb6zbZhvk1kW90RvqgeKn5X2z2UwVHq
2crJDdVI62Qi1pb2mKpuihgwElvWu6TBOmbyju10BAR6wuNFQi6k8A==
=5LTW
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/EyjApF5O9N0/m/2yj8_5qwtNEJ", "n_sections": 11}, {"thread": "QnM1QPag0wI", "msg": "dOX_377zmAUJ", "author": "David Hopwood", "date_disp": "Apr 25, 1998, 3:00:00\u202fAM", "subject": "16-bit/32-bit sub-blocks", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <199804192019...@ladder01.news.aol.com>
timot...@aol.com (TimothyWoo) wrote:

> In article <01bc4c1b$ef6605c0$163b...@virgin.virgin.net>, "Emrul Islam"
> <emr...@virgin.net> writes:

> >Hi,
> > Does anyone know an efficient way to convert 4 8-bit ASCII


> >characters into one 32-bit integer?

You don't specify which language you are using; the discussion below
applies only to languages based on C.

> unsigned int convert(char cptr[4])
> {
> return(*(unsigned int *)cptr);
> }

Bear in mind that on some processors, this will either not work at all, or
will be highly inefficient when cptr is not aligned on a 4-byte boundary.
(On an Alpha under Digital Unix, IIRC, this case is handled by a software
trap, and a warning is printed on stderr, which can take millions of
cycles.)

If you must cast between pointers to different types, declare an array
of the longer type, and cast it to a pointer to the shorter type, e.g.:

uint32_t iptr[...];
uint8_t cptr = (uint8_t *) iptr;

This ensures that the compiler can align iptr correctly. The result will
still depend on the processor's byte order, though, and in most cases
where this type of conversion is used in cryptography, a specific byte
order is needed.

It's probably much easier to do something like:

uint8_t * cptr = ...;

// for a big-endian conversion:
uint32_t i = (c[0] << 24) |


(c[1] << 16) |
(c[2] << 8) |

c[3];

// for a little-endian conversion:
uint32_t i = (c[3] << 24) |
(c[2] << 16) |
(c[1] << 8) |
c[0];

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNUEkSDkCAxeYt5gVAQHkYQgAnUeuScNPryb/j4Q60fHi2XrbpBtCW5TK
KPyUyj3KNvRA9Spl5P6YNtgq7AMZHf5P24f/7AJwOVW4kvX0dII/RIPN2OoLwBb8
D75IfXmdrdiCdBec98uCQf2Is+5+HXb7slyTfc5UL612Hpe73HYoksAbxvfUrF2/
ajvgAUfKSJ0bsbP2ihLH9/zU2msTs+IzHm9ZUCHCPSrI8STVZq6Pan0iGyhEkTox
PM+t30BwoVrNgoIxe81LRCAYJKwKd/0M5de4iVW9TV+T1/4/XtiUHKc8juqbNcD9
QTmZzjeBJy1lA30K4aDQ3lR64HFHBhPj6mB47FV1M7VWCm/m7Q/U7A==
=xTge
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/QnM1QPag0wI/m/dOX_377zmAUJ", "n_sections": 5}, {"thread": "W9aHVxB6K3Q", "msg": "yy1m4_Z-UpYJ", "author": "David Hopwood", "date_disp": "Apr 21, 1998, 3:00:00\u202fAM", "subject": "WTB: review this protocol!", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <6h2jqf$q90$1...@news.datakom.su.se>
Leif Johansson <le...@trurl.matematik.su.se> wrote:

> Hello,

> A local group of developers has come up with their own


> security protocol. I would appreciate this groups opinion

> on the validity of the protocol, possible attacks etc etc.
> I am well aware that in most cases, "home-spun" protocols
> are a bad idea, but in this case I need something more
> tangible. Here is a description of the procotol. C is the
> client, S is the server. S(P) means Server at port P.

First, what is the secret that is being agreed on? It's not sufficient
to just authenticate the session, because it doesn't prevent an attacker
from changing the data sent after a successful authentication. The usual
way of doing that is to have the protocol agree on a shared secret,
which is then used to derive a MAC key (and an encryption key if
necessary). The data is then split into blocks, each having a unique
sequence number, and MAC[key](data, sequence_no) is sent with each block.

> C -> S(P): auth id The authentication identity (login name)
> is transmitted to the server. P is a
> well-known port.

> S -> C: AS AS = MD5(spwd) XOR (S1,P1,S2,AuSekv)

MD5 is no longer recommended by its inventors, RSADSI, for use in new
protocols. SHA-1, RIPEMD-160, or HAVAL would be better.

> where spwd is the user password as known
> by the server, S1 and S2 are random
> numbers, P1 is the port number where the
> service for which the authentication is
> beeing done lives, and AuSekv is another
> random number. The total length of both
> arguments to the XOR operation is 16
> bytes.

An eavesdropper can do an off-line dictionary attack, by calculating
(S1',P1',S2',AuSekv') = AS XOR MD5(pwd) for each potential password pwd
from a dictionary, and checking whether the value of P1' corresponds to
the port that is connected to by the client. This may not provide a unique
value for the password, but each remaining password can be checked using
the next message:

> C -> S(P1): AS2 AS2 = MD5(MD5(tpwd),AuSekv + 1)

by testing whether AS2 = MD5(MD5(pwd),AuSekv' + 1).

Also, the host is not authenticated, which is a pretty fatal flaw. The
easiest attack against the real host, though, is probably to wait until a
legitimate user has been authenticated, and then hijack that session.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNTwszTkCAxeYt5gVAQGllQgApWCSeEsX5Sjq8Fcc4K85g4nXLCvAQRsK
+EK7ZFHnpTXJUq4/QP8g5jWoqbJ1nC5g/mDau+u13qrnQ58PAmLCZTkTsZSXD0nO
ItYVVnXoCyFdMVclZx4Uw06PSQFl+EXwg63LFaIrLXwXSrUwn/d7I7doV82rBouy
143N509L9dHAQ8LQCM24KKA8Jdp/EBixPw/FrEaBxhTZJblUmHyBYAHw1o2kOe4i
4Y87w3w4lYbGZ2ofGRKwT98z7NKxXAf6IIxlhOsR3f7f+AOXCUILWYJ5nSKkDFEh
RjZyJ9vOT3sMRVuFThcvPsh1Xhig4IC5D4Ee0ZTW7Gw3DIPVvwF/sw==
=uaV7
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/W9aHVxB6K3Q/m/yy1m4_Z-UpYJ", "n_sections": 10}, {"thread": "XeAqqJGkm9M", "msg": "W3IC-8vJEBkJ", "author": "David Hopwood", "date_disp": "May 15, 1998, 3:00:00\u202fAM", "subject": "Sending OTPs using OTPs (was Re: keys, escrow and legality)", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <355858b1...@nntp.jaring.my>
nos...@pd.jaring.my (Lincoln Yeoh) wrote:

> I was wondering what happens if you send OTPs using OTPs?

> Is it easy to extract the OTP if it's repeated to transfer a bigger
> OTP?

You don't gain any significant extra security by use of the short OTP.

> OTP1 length = 600MB (CDROM)
> OTP2 length = 1200MB

Suppose the ciphertext is given by

C[i] = OTP1[i mod k] XOR OTP2[i] XOR P[i]

If an attacker intercepts OTP2 only, he/she can cancel out the
effect of that pad, and break OTP1 separately:

C[i] XOR C[i+k] XOR OTP2[i] XOR OTP2[i+k] = P[i] XOR P[i+k]

The plaintext can fairly easily be retrieved from the right-hand-
side of this equation.

Of course if OTP2 is not intercepted, then perfect secrecy is retained
for messages shorter than (in this case) 1200MB - but that would also be
true when encrypting with OTP2 alone.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNVuYJzkCAxeYt5gVAQG4gwgAybYZzAIM1C3KsvcGX7xDujdDvcusuKbF
ykjc7rzOcaCj3iDmTyb0ZHqisKMFylVTiaODnXryXx3jQofz3XZp+tlrR51v8lM8
OIUHOYDsw4Nk/uSBmYu2dXgwPGK0QDQOqTFIiX+s9Trn6GRhRPXj8LuEpgeTErrO
Ipvs+YSji8ToWZ5Jj9CzZn0izkw09a2v10X9BDgAdzXxQXxbwClkaQyfMG7zlq6O
uTACi+zW8tginmO5DwvBJHcI4bsRtvOl8BuZSHpqjS+HCNTCWlUCcoNHECTUM2PY
cOxeNQCZgYMqcoH6g5ufQqcAlVSMN/hz7tjiGBD4u9ALr1p5ILuwrw==
=iFz0
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/XeAqqJGkm9M/m/W3IC-8vJEBkJ", "n_sections": 25}, {"thread": "ghAihiTk-5Y", "msg": "usxVT0OAIVcJ", "author": "David Hopwood", "date_disp": "May 15, 1998, 3:00:00\u202fAM", "subject": "CAST5-128 Java+C source", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <35599A18...@Xdebis.com>
Ulrich Schonhardt <USch...@Xdebis.com> wrote:

> Hello Cryptofreaks,

> can anyone please give me a pointer to the source of
> CAST5-128 in Java _and_ C (ciphertext being interoperable)?

For Java, see Cryptix-Java 3.0.3, at
http://www.systemics.com/software/cryptix-java/

For C, I know that Andrew E. Mileski <a...@netcom.ca> has an
implementation.

> I've found the RFC 2144 but no ref implementation :(

> Is it true that CAST is not vulnerable to these cute
> attacks from Mr Schneier and his folks?? Gee...

If you mean related-key cryptanalysis, resistance to that was one
of the design criteria for CAST5, yes - although I haven't looked
at the design in any great detail.

In any case, it's a good idea to only use the output of a hash
function or a strong cryptographic PRNG as key material (e.g. never
directly use user input as a key, and don't apply arithmetic
or boolean logic operations to keys). That normally makes it
difficult or impossible to apply related-key attacks, even if
the cipher itself is vulnerable to them.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNVxTQjkCAxeYt5gVAQHFKwf/caDyOI1LPfUPUJTYTAy/ObfBzk+rMuMg
6sVqHJfDrEn7YEHMpb/IdxeMVvT/ewbLIWtZDdgmyagDPnqtvOTDagF/czpWDEkz
dSBwse2ZKejC+GiJ5NNJICurtVFbJnR/3Soesl0DmeQ0aoLNskW3w1mwIZeJRRb5
nA+ZK9AS5Qb0xPBNseZjff+hobPTfIDsGYlLta2sDh9claZkc4R/QyMA+XtRcWGi
tRx4DYxXLvc/z1qUV9S8Cf7BxOe/c+Rir8ceHI8jm6k+bO8ya2DkVUlLfhcUnUDO
OQ+pOTUQpJsHK3lFqjp4Wqaz6QEmxrhCoEZk1rKgVFPFIcOtu5t8lQ==
=W8cG
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ghAihiTk-5Y/m/usxVT0OAIVcJ", "n_sections": 2}, {"thread": "gpPDchkXAEM", "msg": "q_-K6JOOmQIJ", "author": "David Hopwood", "date_disp": "May 15, 1998, 3:00:00\u202fAM", "subject": "Q: (from Newbie) re decryption algorithm for the following code...", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <6janjf$2...@bgtnsc03.worldnet.att.net>
NO-SPAM....@att.net (CCSystems) wrote:

> The following snippet (x86 code) pre-tests a supplied password for
> validity. (It is checked twice again to eliminate false passwords.) I
> wrote some code to brute-force test this but for long passwords it
> takes forever.

> What I want to do is generate, "in reverse", all possible passwords
> and then test those with the rest of the code to eliminate the false
> ones.

If, hypothetically, someone was trying to break a password-based copy
protection scheme, wouldn't it be simpler for them to replace the jnz
instruction with nops? :-)

> Since I know very little about cryptography where do I begin?
>

> (ds:[si] = Password)
> ...
> mov cx,[Password_Length]
> xor dx,dx
> xor ax,ax
> L1: shl dx,1
> lodsb
> xor dx,ax
> loop L1
> cmp dx,777B
> jnz Bad_Password
> ...

If I'm not mistaken, this corresponds to something like:

bool is_good_password(unsigned char * password) {
uint16 hash = 0;
unsigned char * p;

for (p = password; *p; p++)
hash = (hash << 1) ^ (*p);

return hash == 0x777B;
}

This is just a security-through-obscurity measure; at most
it would take about 2^16 tries to find a password that hashes
to 0x777B, but in fact in can be done much more easily than that:

First note that 0x777B is 0111011101111011 in binary. For each
password character, the hash is shifted left by one bit, and the
low byte XOR'd with the character code. To keep the password to
printable ASCII characters, we'll use '@' (0100000) and
' ' (0010000) only, until the last character.

Password Hash (binary)

"@" 01000000
"@@" 011000000
"@@@" 0111000000
"@@@ " 01110100000
"@@@ " 011101100000
"@@@ " 0111011100000
"@@@ " 01110111100000
"@@@ @" 011101110000000
"@@@ @;" 0111011101111011

So is_good_password("@@@ @;") returns true. (Generalising this to
produce many equivalent passwords is very easy, so I won't give any
more hints.)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNVsSjzkCAxeYt5gVAQH6MQgAyXPAXt04nCCcSVT4+C3kLtKlBpwn1ziO
b8oGXYQR574ad0WeVZNAcxXVqE8VAxlFI3GZdlN1Tfg1Thv94CBmWm4WYtRmzc+2
Xzre19naeZA0Mjh0pn9UpuKFYYjerSK14RGcoTHV4zqBH977Wv/3dD/HfBwL3bLh
u5J2TAnu4bc1VxSCaCZTh2jah4ZFj5j2jaRWPQI0Yv2wwXPavD6PyHjUHcZCZKGG
UF5aMw/eVnk/yWiSmsj/QiADHG64Lssq2bNw7STKzEkdRw3vpcS0slJF7w7eN1p9
YeXqAbVmCx92EaMmWC0pZTJOWrd77vMNxuKkp92YIcB1DoJKNIbEBg==
=ldGZ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/gpPDchkXAEM/m/q_-K6JOOmQIJ", "n_sections": 3}, {"thread": "k0j8wE8YGck", "msg": "LL5xp3iJNkoJ", "author": "David Hopwood", "date_disp": "Apr 25, 1998, 3:00:00\u202fAM", "subject": "Break This 8-Bit Block Cipher (long)", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <353a6292...@news.io.com>
rit...@io.com (Terry Ritter) wrote:

> THE PROBLEM

> We have a block cipher composed of four shuffled substitution

> tables and a linear Balanced Block Mixer. [...]


> We assume that we know every possible plaintext and ciphertext
> pair, plus the everything about the mixer. The goal is to develop
> the table permutations -- the internal key -- from the known
> information, using some sort of scalable algorithm.

That is _a_ goal, but not necessarily the goal. It would also be a
weakness in the cipher if it were possible, given some subset of the
plaintext/ciphertext pairs, to find other plaintext/ciphertext
pairs that were not given (using a scalable algorithm).

This might not require finding the internal key, and in fact this
8-bit cipher construction is a good example of that; see below.

> A MIXING OVERVIEW

> The orthogonal Latin squares in the BBM are developed algorithmically
> as follows:

> X = 3A + 2B (mod 2)(mod p), p = 10011
> Y = 2A + 3B (mod 2)(mod p)

[table snipped]

> This mixing structure is clearly weak: it is in fact *linear*.
> But it is intended to be used with very *non*linear tables, and
> the resulting cipher is *not* linear. We can implement the mixing
> structure as two 2-dimension indexable arrays L0 and L1, which we
> fill by computation.

> This means that the whole cipher can be expressed as just 2 input
> substitutions, 2 mixings, and 2 output substitutions:

> // input substitutions
> A = TA[ InA ];
> B = TB[ InB ];

> // BBM mixing
> X = L0[A][B];
> Y = L1[A][B];

> // output substitutions
> OutX = TX[ X ];
> OutY = TY[ Y ];

I.e.
OutX = TX[ 3 TA[InA] + 2 TB[InB] (mod 2)(mod p) ]

Suppose we vary InA while keeping InB fixed. Then

OutX = TX[ 3 TA[InA] + constant (mod 2)(mod p) ]

Since TA, multiplication by 3 (in the relevant ring), addition
of a constant, and TX are all permutations, their composition is
also a permutation. This means that when InB is held constant and
InA is varied from 0 to 15 (i.e. a column in the output table),
OutX will take on each value from 0 to 15 exactly once. The same
applies to OutY in each column, and to OutX and OutY in each row.

Here is a sample output table; the fact that X and Y are permutations
within each row and column stands out clearly once you know what to
look for:

0 1 2 3 4 5 6 7 8 9 A B C D E F
0 E2 48 3C 70 D9 95 2B 1E 5D A4 BF 01 F6 67 8A C3
1 47 E1 B4 25 FA 50 7D AF 9B 1C 3E 68 D3 02 C9 86
2 84 CE 57 13 6D B6 AA 78 39 22 91 FF 05 DC EB 40
3 BD 35 4A D1 74 88 F7 66 C2 09 E3 A0 2E 1B 9C 5F
4 71 27 FE ED B3 6B 45 8C 00 CF D4 52 3A 98 16 A9
5 28 72 DF 4B 36 0D E0 C4 65 8E FC 97 B9 51 A3 1A
6 5A 93 8D 0E A7 4F 64 F0 EC DB C5 76 11 29 32 B8
7 F5 DD 73 37 4E A2 B1 59 18 96 2A 8B E4 C0 0F 6C
8 3B B0 E9 F8 2C C1 D2 03 87 6A 46 15 7F AD 54 9E
9 D0 FB 26 B2 EF 17 38 9A A1 53 79 CD 4C 85 6E 04
A 99 56 CB 6F 12 EE 0C D5 44 FD 80 23 A8 7A B7 31
B CC 8F 92 A6 0B 33 19 21 BA 77 58 DE 60 F4 4D E5
C 63 0A A5 94 81 7C 5E BB 2F 30 1D 49 C7 E6 D8 F2
D 06 69 10 5C C8 24 9F 3D 7E B5 AB EA 82 43 F1 D7
E AE 14 61 CA 55 F9 83 42 D6 E8 07 BC 9D 3F 20 7B
F 1F AC 08 89 90 DA C6 E7 F3 41 62 34 5B BE 75 2D

This is a significant weakness because it leaks information about
plaintext/ciphertext pairs that would not otherwise be known. For
example, suppose that an attacker knows the ciphertext for input
blocks 00 to 0E inclusive in the above table. He/she can infer that
the ciphertext for 0F is C3, and can decrypt this ciphertext if it
is encountered.

Alternatively, probabilistic information can be obtained. E.g. if
the attacker only knows blocks 00 to 0D inclusive, and encounters
one of {83, 8A, C3, CA} as a ciphertext, there is a 50% chance that
the corresponding plaintext is 0E or 0F; much higher than for a
random function.

Actually, there is also another attack that gives key information,
but I thought I'd point out this pattern first, as a demonstration
that not all attacks necessarily involve obtaining the key.

> COMMENTS

> The model is a single linear mixing with unknown tables on both the
> input and output. This seems to be the ultimate simplification of
> both the Mixing and VSBC ciphers, and in fact may be a step too far.

Yes, it is; the linear BBM is not sufficiently well hidden by the
tables. Consider

OutX = TX[ 3 TA[InA] + 2 TB[InB] (mod 2)(mod p) ]

Suppose we have two plaintext blocks, (InA1 InB1) and (InA2 InB2),
that map to the same value for OutX (e.g. 0B => 01 and 1D => 02 in
the sample table given above).

Then we can write (taking all arithmetic to be implicitly
(mod 2)(mod p)):

TX[ 3 TA[InA1] + 2 TB[InB1] ] = TX[ 3 TA[InA2] + 2 TB[InB2] ]

Since TX is a permutation, this implies

3 TA[InA1] + 2 TB[InB1] = 3 TA[InA2] + 2 TB[InB2]
or
3 TA[InA1] + 2 TB[InB1] - 3 TA[InA2] - 2 TB[InB2] = 0

which is a linear equation with the table entries as variables.
For the example of 0B => 01 and 1D => 02, we would get

3 TA[0x0] + 2 TB[0xB] - 3 TA[0x1] - 2 TB[0xD] = 0

Blocks that map to the same value for OutY can also be used; they
will yield equations of the form

2 TA[InA1'] + 3 TB[InB1'] - 2 TA[InA1'] - 3 TB[InB2'] = 0

If we can find 32 suitable linearly independent equations (which
simply requires having enough known or chosen text), we can solve
for the 32 unknowns TA[0]..TA[15] and TB[0]..TB[15]. Once the TA
and TB tables are known, it is trivial to find TX and TY.

I haven't implemented code to solve the system of equations (my
linear algebra is a little rusty), but here is the rest as a Java
program:

import java.util.Random;
import java.util.Vector;
import java.util.Enumeration;

/**
* The 8-Bit Block Cipher in Java. For research analysis; not a useful
* cipher.
*
* @author Terry Ritter (C implementation)
* @author David Hopwood (Java conversion)
*/
public class EightBit {
// BBM by lookup
private static int[][] L0;
private static int[][] L1;

public static int[][] getL0() { return L0; }
public static int[][] getL1() { return L1; }

// BBM by computation

public static int FL0( int a, int b ) {
int t = (a^b) << 1;
if ((t & 0x10) != 0)


t ^= 0x13;
return a^t;
}

public static int FL1( int a, int b ) {
int t = (a^b) << 1;
if ((t & 0x10) != 0)


t ^= 0x13;
return b^t;
}

static {


// use computed BBM to fill global lookup

initLS(15);
}

private static void initLS( int lastel ) {
int size = lastel+1;
L0 = new int[size][size];
L1 = new int[size][size];

for (int a = 0; a <= lastel; a++) {
for (int b = 0; b <= lastel; b++) {


L0[a][b] = FL0( a, b );
L1[a][b] = FL1( a, b );
}
}
}

// keyed tables
private int TA[];
private int TB[];
private int TX[];
private int TY[];

public int[] getTA() { return TA; }
public int[] getTB() { return TB; }
public int[] getTX() { return TX; }
public int[] getTY() { return TY; }

private static void initTab( int tab[], int lastel ) {
for (int i = 0; i <= lastel; i++) {
tab[i] = i;
}
}

private static Random random = new Random();

/**
* Return an integer from 0..N, N < 256.
* mask MUST be 2**n - 1 for some n.
*/
private static int rand0thruN( int mask, int N ) {
int b;
do {
b = random.nextInt(); // 32-bit value


b ^= b >> 16;
b ^= b >> 8;
b &= mask; // b is 0..mask
} while (b > N);
return b;
}

/**
* Shuffle the table.
* mask MUST be 2**n - 1 for some n.
*/
private static void shufTab( int tab[], int mask ) {


int nxtmsk, N, rand, by;

do {
nxtmsk = mask >> 1;

for (N = mask; N > nxtmsk; N--) {

rand = rand0thruN( mask, N );


by = tab[N];
tab[N] = tab[rand];
tab[rand] = by;
}

mask = nxtmsk;
} while (mask != 0);
}


// object state ciphering

private int InA, InB, A, B, X, Y, OutX, OutY;

public void setInput(int a, int b) { InA = a; InB = b; mix8(); }
public int getInA() { return InA; }
public int getInB() { return InB; }
public int getA() { return A; }
public int getB() { return B; }
public int getX() { return X; }
public int getY() { return Y; }
public int getOutX() { return OutX; }
public int getOutY() { return OutY; }

private void mix8() {


A = TA[ InA ];
B = TB[ InB ];
X = L0[ A ][ B ];
Y = L1[ A ][ B ];
OutX = TX[ X ];
OutY = TY[ Y ];
}


// functional ciphering

public int mix8X( int ina, int inb ) {


return TX[ L0[ TA[ina] ][ TB[inb] ] ];
}

public int mix8Y( int ina, int inb ) {


return TY[ L1[ TA[ina] ][ TB[inb] ] ];
}


/**
* Constructor for an EightBit cipher. The keying tables are set
* randomly.
*/
public EightBit() {
// initialise and shuffle the 4 keying tables
TA = new int[16]; initTab( TA, 15 ); shufTab( TA, 15 );
TB = new int[16]; initTab( TB, 15 ); shufTab( TB, 15 );
TX = new int[16]; initTab( TX, 15 ); shufTab( TX, 15 );
TY = new int[16]; initTab( TY, 15 ); shufTab( TY, 15 );
}
}

/**
* Demonstration of attacks against the 8-Bit Block Cipher.
*
* @author David Hopwood
*/
class EightBitDemo {
private static final String[] hexDigits = {
"0", "1", "2", "3", "4", "5", "6", "7",
"8", "9", "A", "B", "C", "D", "E", "F",
};

public static void main( String[] args ) {
EightBit cipher = new EightBit();


int ina, inb, outx, outy;

boolean seenXinThisRow[], seenYinThisRow[],
seenXinCol[][], seenYinCol[][];

Vector[] plaintextsForX = new Vector[16];
Vector[] plaintextsForY = new Vector[16];
for (int i = 0; i <= 15; i++) {
plaintextsForX[i] = new Vector();
plaintextsForY[i] = new Vector();
}
int[] pt;

// show every possible plaintext and ciphertext, and demonstrate
// that no X or Y output is repeated within a row or column.

// first print the inb column labels
System.out.print(" ");


for (inb = 0; inb <= 15; inb++)

System.out.print(" " + hexDigits[inb]);

seenXinCol = new boolean[16][16]; // all false
seenYinCol = new boolean[16][16]; // all false

for (ina = 0; ina <= 15; ina++) {

seenXinThisRow = new boolean[16]; // all false
seenYinThisRow = new boolean[16]; // all false

// start row with ina label

System.out.print("\\n " + hexDigits[ina]);

for (inb = 0; inb <= 15; inb++) {
cipher.setInput(ina, inb);
outx = cipher.getOutX();
outy = cipher.getOutY();

System.out.print(" " + hexDigits[outx] + hexDigits[outy]);

if (seenXinThisRow[outx] || seenXinCol[inb][outx])
throw new Error(
"X output was repeated; prediction failed");

seenXinThisRow[outx] = seenXinCol[inb][outx] = true;

if (seenYinThisRow[outy] || seenYinCol[inb][outy])
throw new Error(
"Y output was repeated; prediction failed");

seenYinThisRow[outy] = seenYinCol[inb][outy] = true;

pt = new int[] { ina, inb };
plaintextsForX[outx].addElement(pt);
plaintextsForY[outy].addElement(pt);
}
}

System.out.println("\\n\\nNo X or Y outputs were repeated in a " +
"row or column.\\n");

// find linear equations that can be solved to reveal the 32
// TA and TB entries

Enumeration e;
int ina1, inb1, x1, y1;
int[][] L0 = EightBit.getL0();
int[][] L1 = EightBit.getL1();
int[] TA = cipher.getTA(); // for checking only
int[] TB = cipher.getTB(); // for checking only

for (int a = 0; a < 16; a++) {
e = plaintextsForX[a].elements();
pt = (int[]) (e.nextElement());
ina1 = pt[0];
inb1 = pt[1];
x1 = L0[TA[ina1]][TB[inb1]];

while (e.hasMoreElements()) {
pt = (int[]) (e.nextElement());
System.out.println("3 TA[0x" + hexDigits[ina1] + "] + " +
"2 TB[0x" + hexDigits[inb1] + "] - " +
"3 TA[0x" + hexDigits[pt[0]] + "] - " +
"2 TB[0x" + hexDigits[pt[1]] + "] = 0");

if (x1 != L0[TA[pt[0]]][TB[pt[1]]])
throw new Error("incorrect X equation");
}

e = plaintextsForY[a].elements();
pt = (int[]) (e.nextElement());
ina1 = pt[0];
inb1 = pt[1];
y1 = L1[TA[ina1]][TB[inb1]];

while (e.hasMoreElements()) {
pt = (int[]) (e.nextElement());
System.out.println("2 TA[0x" + hexDigits[ina1] + "] + " +
"3 TB[0x" + hexDigits[inb1] + "] - " +
"2 TA[0x" + hexDigits[pt[0]] + "] - " +
"3 TB[0x" + hexDigits[pt[1]] + "] = 0");

if (y1 != L1[TA[pt[0]]][TB[pt[1]]])
throw new Error("incorrect Y equation");
}
}

System.out.println("\\nAll equations were correct.");
}
}

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNUGy/zkCAxeYt5gVAQFPcQgAhMQ71kDKK0RqC5a7JJDD1wf6klWSIagZ
GN8AmXs64Ir7pDZ3sBX9+4T88zV4RcRbxOy7QbZRk8QzfLLTFirMO63iU2FqDAxV
xHVyvOH9nYQl65QHVhF/bzeuyWWBfTwMYl7fJeWNwXliaXK0cxLQeeJVffj7CNJ3
hsrq6g79Gq400vy50Tc9IRy2Aa2wC7v6HSDPxvdmk7Q5vLuGnCyXhEXxSjiTsKLl
FMgPXD73uZYzRaHDY5FVjEJOtDU51iVKGv0VNI98ByroqfDMjRZuoAwhSyjF7B61
5NFhsfe5qddb/Oyv8I5ta1fNAsgBrpaD7Mw43l7xA2Tg/NsNeM05Ww==
=VFWB
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/k0j8wE8YGck/m/LL5xp3iJNkoJ", "n_sections": 21}, {"thread": "k0j8wE8YGck", "msg": "C35N6UXANR8J", "author": "David Hopwood", "date_disp": "May 3, 1998, 3:00:00\u202fAM", "subject": "Break This 8-Bit Block Cipher", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <199804251...@zetnet.co.uk> I wrote:

[...]


> Blocks that map to the same value for OutY can also be used; they
> will yield equations of the form

> 2 TA[InA1'] + 3 TB[InB1'] - 2 TA[InA1'] - 3 TB[InB2'] = 0

^
This line had a typo; it should be:

2 TA[InA1'] + 3 TB[InB1'] - 2 TA[InA2'] - 3 TB[InB2'] = 0

I'll answer Terry Ritter's reply to my attack in a separate article (there
isn't sufficient information to solve the equations immediately; some
brute force is also required).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNUyaMzkCAxeYt5gVAQEm4wf/eiZOVhAiZRVhdVkNOhZ/AKyYHvVlOoTY
ESXxDfAMXFcbLupUzv2VWk1nHgTUbhfvjea7XfmSgP/DdugbuBNQvYrDPILs9CDH
TESoas2ETpsScAX5HwEw/3QyUfDgAMhy4kgKfdpaYdcHN53FFm+yZvswntA66ff+
/+yjR7Q2aABovSMbNGFIXV3YKDmAQcnDyCtWS00zfQ+91RU3LgrvGHfrok2uKD0X
xPkqqWH2QX7fOg6BdzPnH+IVAhNAw7KgnDjgMzyqMsm9/Js8oOy2iv98Z8Qa6MRq
9OhMsm33CckGMUO4EVO6ajivKoiYYXW4mvgleg4MWh1jY3zvhXfqXQ==
=kk6u
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/k0j8wE8YGck/m/C35N6UXANR8J", "n_sections": 21}, {"thread": "k0j8wE8YGck", "msg": "dIvPopz1P9IJ", "author": "David Hopwood", "date_disp": "May 15, 1998, 3:00:00\u202fAM", "subject": "Break This 8-Bit Block Cipher (long)", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <35474c6...@news.io.com>
rit...@io.com (Terry Ritter) wrote:

> OK, I've looked at the attack, and I'm having trouble getting it to
> work.

Yes, so did I when I looked at it more closely, but I've now fixed it.

There is not enough information to uniquely determine the table
entries; however the key space is divided into classes of equivalent
keys, and it is possible to find which equivalence class was used
(which is all that a cryptanalyst needs). I've written a Java program
to implement this, at

http://www.users.zetnet.co.uk/hopwood/crypto/ritter/kBit.zip

Try "java kBitDemo -known -showtables 8 19", for example (you will
need to install the JDK from www.javasoft.com, if you don't already
have it).

Instances with a block size of up to 20 bits can be solved in less
than a minute on a PC (providing the -lowmemory option is used).
The attack requires more known plaintext than I originally thought
would be needed, though (the number of plaintexts required is a
roughly constant fraction of the number of possible input blocks,
although it may be possible to improve that).

> On Sat, 25 Apr 1998 10:59:13 +0100, in
> <199804251...@zetnet.co.uk> in sci.crypt David Hopwood
> <hop...@zetnet.co.uk> wrote:

> >[...]


> >the linear BBM is not sufficiently well hidden by the
> >tables. Consider
> >
> > OutX = TX[ 3 TA[InA] + 2 TB[InB] (mod 2)(mod p) ]
> >
> >Suppose we have two plaintext blocks, (InA1 InB1) and (InA2 InB2),
> >that map to the same value for OutX (e.g. 0B => 01 and 1D => 02 in
> >the sample table given above).
> >
> >Then we can write (taking all arithmetic to be implicitly
> >(mod 2)(mod p)):
> >
> > TX[ 3 TA[InA1] + 2 TB[InB1] ] = TX[ 3 TA[InA2] + 2 TB[InB2] ]

> Yes.

It turns out to be easier to handle a single equation for each
plaintext/ciphertext pair, with entries in the inverse tables for
TX and TY (call them ITX and ITY) as additional unknowns:

3 TA[InA] + 2 TB[InB] + ITX[OutX] = 0
2 TA[InA] + 3 TB[InB] + ITY[OutY] = 0

The advantage of doing this is that the full set of these equations
completely characterise the overall permutation, so a key is equivalent
to the original key if-and-only-if it is a solution to the equations.

[...]


> >If we can find 32 suitable linearly independent equations (which
> >simply requires having enough known or chosen text), we can solve
> >for the 32 unknowns TA[0]..TA[15] and TB[0]..TB[15].

> OK, this seems to be the problem: The apparently reasonable idea that


> 32 such equations exist (or that even 2 equations exist with the same
> 2 unknowns) appears false.

Yes, you're right. That's a consequence of the balanced mixing structure;
if no variables are known initially, any linear combination of the
equations will have at least three unknown terms.

However, it turns out that the equations have m*m*(m-1) solutions
(where m is 2^(k/2), i.e. the size of a table, or equivalently the number
of elements in the field). Since we only need one of those solutions,
it's possible to give fixed values to some of the table entries (in
practice, 3 of them), and then solve for the rest.

First, here's an argument for why there are at least (and I think
always exactly) m*m*(m-1) solutions:

Let s, t and u be constant elements in the field, with s != 0
f(x) = sx + t
g(x) = sx + u
u(x) = (x + 3t + 2u)/s
v(x) = (x + 2t + 3u)/s

'.' denotes functional composition.

For all a and b,
TX.u[L0(f.TA[a], g.TB[b])]
= TX.u[3s TA[a] + 3t + 2s TB[b] + 2u]
= TX[((3s TA[a] + 2s TB[b] + 3t + 2u) + 3t + 2u)/s]
= TX[3 TA[a] + 2 TB[b]]
= TX[L0(TA[a], TB[b])]
and
TY.v[L1(f.TA[a], g.TB[b])]
= TY.v[2s TA[a] + 2t + 3s TB[b] + 3u]
= TY[((2s TA[a] + 3s TB[b] + 2t + 3u) + 2t + 3u)/s]
= TY[2 TA[a] + 3 TB[b]]
= TY[L1(TA[a], TB[b])]

I.e. if (TA, TB, TX, TY) is a solution, then so is (f.TA, g.TB, TX.u, TY.v)
for each s != 0, t, and u. These represent equivalent keys (in the usual
sense of representing the same mapping from plaintext to ciphertext).

There are m possibilities for each of t and u, and m-1 possibilities
for s, so this proves that the number of solutions is either zero, or at
least m*m*(m-1). We know that there is at least one solution (the original
key), so there must be at least m*m*(m-1). [I can't immediately see how to
show that there are no more than that, but it's not really critical.]

This means that without loss of generality, we can set

f.TA[i] = 0
f.TA[j] = 1
g.TB[k] = 0

for any indices i, j and k where i != j.

[There will always be an equivalent key that satisfies the above, since
the equations

s TA[i] + u = 0
s TA[j] + u = 1
s TB[k] + t = 0

always have a solution.]

======
Let's try an example by hand with 4-bit blocks:

0 1 2 3
0 00 23 31 12
1 32 11 03 20
2 13 30 22 01
3 21 02 10 33

The original table entries are:

TA[0] = 0, TB[0] = 0, TX[0] = 0, TY[0] = 0
TA[1] = 1, TB[1] = 1, TX[1] = 1, TY[1] = 1
TA[2] = 2, TB[2] = 2, TX[2] = 2, TY[2] = 2
TA[3] = 3, TB[3] = 3, TX[3] = 3, TY[3] = 3

We'll use the names TA', TB', ITX' and ITY' for the tables that will be
found by cryptanalysis (i.e. f.TA, g.TB, (TX.u)^-1 and (TY.v)^-1)).

Arbitrarily pick i = 1, j = 3, k = 2. (If doing a known plaintext attack,
we could choose these values to correspond to the terms of the first
available equation, so that additional variables can be found as quickly
as possible.)

Set TA'[1] = 0, TA'[3] = 1, TB'[2] = 0.

I can't work out GF(2^k) multipliction in my head, so here is a table for
multiplication:

* 0 1 2 3
0 0 0 0 0
1 0 1 2 3
2 0 2 3 1
3 0 3 1 2

Now repeatedly pick equations for which all but one term is known:

3 TA'[1] + 2 TB'[2] + 1 ITX'[0] = 0
=> ITX'[0] = 0

3 TA'[3] + 2 TB'[1] + 1 ITX'[0] = 0
=> 2 TB'[1] = 3
=> TB'[1] = 2

3 TA'[1] + 2 TB'[1] + 1 ITX'[1] = 0
=> ITX'[1] = 3

2 TA'[3] + 3 TB'[2] + 1 ITY'[0] = 0
=> ITY'[0] = 2

2 TA'[2] + 3 TB'[1] + 1 ITY'[0] = 0
=> 2 TA'[2] = 3
TA'[2] = 2

3 TA'[2] + 2 TB'[3] + 1 ITX'[0] = 0
=> 2 TB'[3] = 1
TB'[3] = 3

3 TA'[0] + 2 TB'[3] + 1 ITX'[1] = 0
=> 3 TA'[0] = 2
=> TA'[0] = 3 (check: TA entries sum to 0)

3 TA'[0] + 2 TB'[0] + 1 ITX'[0] = 0
=> 2 TB'[0] = 2
TB'[0] = 1 (check: TB entries sum to 0)

3 TA'[0] + 2 TB'[1] + 1 ITX'[2] = 0
=> ITX'[2] = 1

3 TA'[0] + 2 TB'[2] + 1 ITX'[3] = 0
=> ITX'[3] = 2 (check: ITX entries sum to 0)

2 TA'[0] + 3 TB'[2] + 1 ITY'[1] = 0
=> ITY'[1] = 1

2 TA'[0] + 3 TB'[3] + 1 ITY'[2] = 0
=> ITY'[2] = 3

2 TA'[0] + 3 TB'[1] + 1 ITY'[3] = 0
=> ITY'[3] = 0 (check: ITY entries sum to 0)

In summary:

TA'[0] = 3, TB'[0] = 1, ITX'[0] = 0, ITY'[0] = 2
TA'[1] = 0, TB'[1] = 2, ITX'[1] = 3, ITY'[1] = 1
TA'[2] = 2, TB'[2] = 0, ITX'[2] = 1, ITY'[2] = 3
TA'[3] = 1, TB'[3] = 3, ITX'[3] = 2, ITY'[3] = 0

Invert ITX' and ITY':

TX'[0] = 0, TY'[0] = 3
TY'[1] = 2, TY'[1] = 1
TY'[2] = 3, TY'[2] = 0
TY'[3] = 1, TY'[3] = 2

which gives the same output table as for the original key:

0 1 2 3
0 00 23 31 12
1 32 11 03 20
2 13 30 22 01
3 21 02 10 33

Voila.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNVs3mTkCAxeYt5gVAQEj7wgA0ExYH2VRhBVruCoVX7tJkIauTWzTkgiH
/OyPrLdf3D2V8/m+gm5sGZI95jVe9aRDFuQ1/kfNJC7s8YcjDRIw68NE5VGUTRBc
z7YAvJa290WnquiBlIcD92KINWD0f3Em3Z1x88ohMd9CJY5xXC3HZnTi+spQIVJ2
SUyrpj+a+KKsWb+/hKEEcEFq/sUul2BbuD0mq7h+SHJ3IiqAVZ8cSRTnYcdljQXt
AAmeOHLkQQ/iXARaJucJAuqoTViIrJRVzR1JnSmhBMcr8Ax6BF0Z4QGTJ0qTvwtZ
8pSFQFBSaGZapHPNLDocrLFEhbSfkgLVIPZcnH+gxzetZojvAv1dhA==
=5Ucy
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/k0j8wE8YGck/m/dIvPopz1P9IJ", "n_sections": 21}, {"thread": "l16qzYOxvBo", "msg": "jcoJICmNXO0J", "author": "David Hopwood", "date_disp": "Apr 26, 1998, 3:00:00\u202fAM", "subject": "Number of Algorithms is Countable (?)", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <6hrrvj$p...@news.asu.edu>
eme...@aztec.asu.edu (MARK ADKINS) wrote:

> Jeff Erickson <je...@cs.duke.edu> wrote:

> >If infinitely long inputs were allowed, then yes, there would be
> >uncountably many of them. However, Turing machines compute functions
> >on -finite- (but arbitrarily long) strings. (More formally, the tape
> >alphabet has a special "blank" character, and all but a finite number
> >of cells in the tape are "blank".) So the set of possible inputs to a
> >Turing machine is also only countably infinite.

> In a binary alphabet there are only zeroes and ones.

A Turing machine cannot use {0, 1} as the tape alphabet; blank must be
included, and Jeff Erickson's argument is perfectly correct. I think
perhaps you need to revise the formal definition of a Turing machine
(e.g. see http://www.netaxs.com/people/nerp/automata/turing2.html).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNUKaQzkCAxeYt5gVAQHbPQf8CfXewcf1XlDBEbY6qCXl8TAa3auUeKT+
J13ZeO/LUG/2/A1GtqreyDbXWTyYsxqjxgQc2b+Kc4DQwarDE2BhUjTqVSLcaAbg
EHIdQTIrZHKNNO5KULib2o3RFDuUK2Bkk3A+Dvv/AIrzE8/+Hmznha1bLkejmTur
duYtfMGyT6NRHEChLAPP+W+sPPddjqVPMmCVr+mtt/6b6FTkEzq5q8y26x54cx1L
9H2UNHpGtm2yHydckh3AslLBvjDsNREa27fXJyjA2B9+FzBbmGD1POAdcxtctlVO
V5iEdgNgziGtZFxgodxly2gxeSeKEL5/e2POkQ1Ku7KQwaJfhePwTA==
=3n/Q
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/l16qzYOxvBo/m/jcoJICmNXO0J", "n_sections": 91}, {"thread": "lnpMjffV-dg", "msg": "dZp6ZPwaxR8J", "author": "David Hopwood", "date_disp": "May 15, 1998, 3:00:00\u202fAM", "subject": "NSA Supercomputer Strength", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <35584...@news1.mid-ga.com>


"Merell L. Matlock, Jr." <mer...@hom.net> wrote:

> I watched a very interesting show last night on Discovery Channel about
> the NSA.

> At one point the show's narrator had said that the NSA computers could
> "check 70 quadrillion keys in a few minutes."

1 (US) quadrillion is 10^15. 70*10^15 = 2^55.958.
Sounds like someone has worked this out based on cracking a single DES
key in a few minutes (which is if anything slower than I would have
expected them to be able to do it, but not by much).

> If this is in fact true (or even a low-ball figure) doesn't this make
> a brute force attack on PGP a trivial exercise?

No, not even close.

> DH/DSS KeyID: 0xC1D6E2FD
> RSA KeyID: 0x57C48403

> -----BEGIN PGP SIGNATURE-----
> Version: PGP 5.5.5
> Comment: PGP encrypted email preferred.

> iQA/AwUBNVhKp98/ayjB1uL9EQIH8wCfTewqNzLai/mklicPDGIay2suvR8AnRdF
> DrTfwmw0v01Cu0iQXrnUEzb8
> =uix1
> -----END PGP SIGNATURE-----

This RSA key, OTOH, is far too short.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNVuZdTkCAxeYt5gVAQHH1QgAiUY6Hvx9jY+6xxys+7lS+lyJ+pBTkMBN
Ur5ifV8V8TYy6ME+zZinrBJrINWJ1pCrw/HneznfIKESFeHDfcwJrxl/7n/+QmP9
WaiK3X8+3Dt4G2X9B0uz3wGFAC45DoKP+55CazNS2U3FOVV/+K8Sn+mFpGWtYgv2
yilJ8+6jHkgKjlbPjNltI06sx/pUg0W0JPJbQTspwUK/c1rm/Hz+EiInx5d+bnUa
SxPPNiCXq5SOPGua2r798Izf55f0uAMDw7+7spt8pBohfF2RDYDkdVNWD+Gpzsbw
LDTCy4MozyvWPdlvkjczJxPsM/2IH/ybuX5307V1/tFFqMpiMN2bTw==
=0Q6i
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/lnpMjffV-dg/m/dZp6ZPwaxR8J", "n_sections": 100}, {"thread": "s3l5mCo4UZ0", "msg": "tFnkCk_jls0J", "author": "David Hopwood", "date_disp": "Apr 21, 1998, 3:00:00\u202fAM", "subject": "Computation Theory and Can Software Keep a Secret?", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <3536529C...@dwpalm.jf.intel.com>
David Palmer <dwpa...@dwpalm.jf.intel.com> wrote:

> Here's a toy problem I've been thinking about for a while, but
> unfortunately my computation theory is a little rusty.

> Lets say I have an algorithm f that computes f(a,b) for all integers a


> and b. I would like to construct f' such that f'(a) = f(a,b) for all
> integers a, and for some fixed integer b. Is it computationally
> reasonable to recover b from arbitrary choices of f'?

Depends what f is. To take a trivial example, f(a,b) = 0 does not allow
recovering b :-)

> Methods in Computation Theory usually approach such problems with the
> halting problem. Unfortunately, in this case we know that f'(a) will
> always halt by the definition that f is an algorithm. Also, it would be
> good enough if the problem requires exponential time or space to recover
> b from f'.

> In reality, my choice of a and b is a little more restricted. If f is
> the RSA encryption algorithm, then a is the plain text message and b is
> the private key. Public key algorithms have one very attractive
> property: given the output of f'(a) for any a, you can not reasonably
> compute the private key b.

That's describing a chosen plaintext attack, and if f is raw RSA (as
opposed to RSA with a padding scheme such as PKCS#1 or OAEP), it may be
feasible to recover b by such an attack. (It is certainly possible to
use it to decrypt other messages; see 'Scenario 1' in Applied
Cryptography section 19.3, page 471.) Protocols that use assymetric
algorithms are usually designed not to allow a chosen plaintext attack
to be mounted (e.g. by only directly encrypting random session keys).

> The best known methods require exponential time.

Factoring is sub-exponential.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNTwUijkCAxeYt5gVAQHaNgf7Bo2cG4/cALrev8fdcHWlNxD0CtA/Msdf
j99uOhD8s0/ayRABntlhAkguUBcWEfsPyIqvG4IU8GODu8NIGhDu5jV4CS9m2f3U
vkHR9Pgbh9pxAyuPQfEU9zv3cikzz6Eny6/mDW7z4YQvZTYbh7n4ANNb3aQmDoCY
XSQmnO08HvE1Oz7pVWov9uDVCksWkUC2YJvK5bUqxSAfIdDtPZDNWdIW1ed6MqiI
1Lk4eAvapAI3sLamjkjasCOw1SX1QkKcxf+FcYSxyE82wrMNLr+p2+scXcOEWpYc
rSO+U67idtsl+Pp5HSWKhEYin/MGnwQ61F4E0Lkn9yCT9EPyUkLlWg==
=zb54
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/s3l5mCo4UZ0/m/tFnkCk_jls0J", "n_sections": 26}, {"thread": "s3l5mCo4UZ0", "msg": "ZvTJ1sBIMF0J", "author": "David Hopwood", "date_disp": "Apr 25, 1998, 3:00:00\u202fAM", "subject": "Computation Theory and Can Software Keep a Secret?", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <199804210...@zetnet.co.uk> I wrote:

> In message <3536529C...@dwpalm.jf.intel.com>
> David Palmer <dwpa...@dwpalm.jf.intel.com> wrote:

> > In reality, my choice of a and b is a little more restricted. If f is
> > the RSA encryption algorithm, then a is the plain text message and b is
> > the private key. Public key algorithms have one very attractive
> > property: given the output of f'(a) for any a, you can not reasonably
> > compute the private key b.

> That's describing a chosen plaintext attack, and if f is raw RSA (as


> opposed to RSA with a padding scheme such as PKCS#1 or OAEP), it may be
> feasible to recover b by such an attack.

Sorry, I'm talking nonsense above. It is always possible to do a chosen
plaintext attack given the public key; it is chosen ciphertext attacks
that may cause problems.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNUEeqzkCAxeYt5gVAQEHpggAj3MEJ5WwdWWcJfcywirXrr4zhhEm0Nn2
OV4URF7ite2rE3JFX5pZL2ixgIgUraH/7uUJoPh5ILJb9Cjq+8dyo25b9rR7IeX6
h3DaSnfIwCUNfBeo+Ti07eIWjHBjkAncdi8EwfbqSGtjJaWk7TSXD/BOILnJ6uKc
b6ov2Dh/60I2ib/tQE6eeZG1bbGim+PYPJGzeNIxIhRW6meHiyYKqBiI/lkJ1RpV
+IpLytL/dthiDC8qT2bYDkDVGhSLTpNMuwLaQz9+I0Xxqx3s6sAgZcsfVPHz5AaI
zyucAh65VvCPFwI69F/CBOiZYsxLfZscUMw944dAW4/WcMejpsfTPQ==
=OX76
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/s3l5mCo4UZ0/m/ZvTJ1sBIMF0J", "n_sections": 26}, {"thread": "umTJ2G9As3c", "msg": "DdAwlGL76OIJ", "author": "David Hopwood", "date_disp": "May 15, 1998, 3:00:00\u202fAM", "subject": "Detecting encrypted data on the network", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <6ir1e2$9g4$1...@nimble.mta.ca>
mcta...@mta.ca (mctaylor) wrote:

> In article <3550f649...@news.erols.com>, zapa...@erols.com wrote:
> >Has anyone thought about the problem of people using encrytion
> >software on a network and how to detect that.
> >
> >I guess what I'm asking is, is it possiable to detect thru some type
> >of "sniffer" device that looks for signitures of all well know
> >encrytion devices i.e. PGP, RSA RC4 etc...

> A "sniffer" or fireware could detect application standard headers,

Yes.

> but encrypted data is mathematically indestingiousable from random data.

Not necessarily. There are plenty of algorithms in common use, especially
stream ciphers, that have detectable biases in the output (RC4, for
example).

For block ciphers it depends which mode is being used, but ECB used on
non-random plaintext may be distinguishable from random data (ciphertext
blocks will repeat slightly more often than expected, although it
probably requires a lot of data to detect this).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNVuTVjkCAxeYt5gVAQFKmAgAqbBJnXr+3Kfh9cTceuFi0GzEdhSv2Kb2
4cYZe1bomEPjrqtSm4Eh201uv8zaqQ0LVcRnXG2oVHJjPkweY+YsgIHGfjFKypsn
y+NJzhri9fLb17jSNhZSyW+6l2wQtEsgtoYh6ZCWpEeqJVz3HhpwNgPAOSwkuAGZ
sMucNjUwHmjZFCdsSppmQFSDCIWDoJjNtRzlBk85cnSjB/d/CUGO3HPC7/9QemiY
X4ni52Nyg9pvUg+BWglnU7vN4wjGakz/y3+3uyXUAogwQmGvguo0CVxIkJptCRLp
rCe7wxX/OjMh/ogK/LwGWPZHD+CUchmvIDQOG6kI9OyTa4DEToQSWQ==
=JGCD
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/umTJ2G9As3c/m/DdAwlGL76OIJ", "n_sections": 7}, {"thread": "w1cYsdX95PA", "msg": "iCTS2_QZVegJ", "author": "David Hopwood", "date_disp": "Apr 25, 1998, 3:00:00\u202fAM", "subject": "Wrong [OTPs and active attacks]", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <353F8CE1...@frankfurt.netsurf.de>
Joachim Wesner <joachim...@frankfurt.netsurf.de> wrote:

> Mark Tillotson wrote:
> >
> > timot...@aol.com (TimothyWoo) wrote:
> >
> > | There are two "sides" T and U for them and us.
> > |
> > | Assume that the satellite belongs to U and the only information
> > | that T has on what messages cause what effects is gained by
> > | eavesdropping on messages sent to the satellite i.e. T does not
> > | possess detailed plans about the satellite.
> >
> > Well, given this scenario, say T guesses or finds out the structure of
> > the plaintext, and next time U transmits to the satellite T intercepts
> > this transmission and resends (at greater power and with no delay)
> > with certain bits flipped, and observes the behaviour of the
> > satellite. This enables T to determine the validity of their guesses
> > as to which bits in the message serve which purpose, and hence to
> > control the satellite.
> >
> > OTPs are fundamentally weak to _active_ attacks of this kind, unless
> > you take suitable precautions. So their "perfect" security is only
> > "perfect against passive attack".

> NOPE, you are reusing keys here. Per "OTP" definition (see *ONE TIME*)


> the satellite should switch keys (from a prepared, secret list, not a
> PRNG) on any message it receives, so you have *NEVER* a chance to tell
> what a certain bit does by flipping it, you can't compare the results
> to two (slightly) different messages !!! So, then, it's nomo an OTP

You're misunderstanding Mark's point. T can compare what the satellite
actually does when a bit is flipped, with what would be sensible
behaviour for the satellite at that time. This doesn't require knowing
what message is being sent.

Suppose, for example, T chooses a time when he/she knows that the
satellite is likely to remain inert, and flips a bit in the
transmission as described by Mark above. If T observes, say, that a
particular thruster has fired, then with high probability, the bit
that was flipped controls that thruster. (U is likely to put the
unexpected firing down to some temporary fault.) Later, at some more
critical time, T can flip that bit again, and cause havoc for U.

In practice something like a satellite is likely to have a checksum
on each transmission, which complicates the issue, but relying on
that to provide additional security would be relying on an algorithm
other than the OTP; the OTP itself does not protect against active
attacks.

(Note that the same situation can occur for any stream cipher, and to
some extent also for block ciphers, since causing a block to decrypt
to a 'random' value can sometimes be useful to an attacker.)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNUFJ+jkCAxeYt5gVAQER2wf+LJBSDxBgMG85QkWhyNssf5ledXCOhCq/
/aaDxUI+ANXpawlS0GZYhGa92zudtZbAXLQ74Jim9f3Iu6BuO2wseFW4yGhh7ETS
dBLVMDjPkG4FvbjoAG3xSRuo9oxmunAyzJleeucAwwPyNcFsyXRe5Y6+6O8udUVb
fNV8QEc044qPpMNjRdQFqDGYcv10D/I6lniCEYUxsWi4YWjkMRz0Gm2JEqpObTsn
/Tr2kstPgMZCiKkxu0xzSLqdIZALa56v8HEAo7XAMC6nT8t4LcpfJwGpDupU+Cjn
0cns/3X98H6P/ThqftnEzIClTKInx5sLAnH8ul1XkkAJQEC53mg19w==
=pEnJ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/w1cYsdX95PA/m/iCTS2_QZVegJ", "n_sections": 43}, {"thread": "w1cYsdX95PA", "msg": "RSIySxkNvTYJ", "author": "David Hopwood", "date_disp": "May 3, 1998, 3:00:00\u202fAM", "subject": "Wrong [OTPs and active attacks]", "body_html": "
-----BEGIN PGP SIGNED MESSAGE-----

In message <uwwcbw...@ncipher.com>
Alan Braggins <ar...@ncipher.com> wrote:

> David Hopwood <hop...@zetnet.co.uk> writes:
> > behaviour for the satellite at that time. This doesn't require knowing
> > what message is being sent.
> >
> > Suppose, for example, T chooses a time when he/she knows that the
> > satellite is likely to remain inert, and flips a bit in the
> > transmission as described by Mark above.

> Isn't there a partial contradiction here? If you know that the
> satellite is likely to remain inert, you do know that the message
> (or at least the thruster control part) is likely to be a no-op.

But you don't get that information from the transmitted message; you get
it out-of-band (e.g. by looking at the satellite with a telescope).
The OTP still provides perfect secrecy, so there is no contradiction.

> If you observe a thruster firing, you know that either the bit you
> flipped fired it or the original message was intended to fire the
> thruster. If you have no idea whether the message was intended to
> fire it, you have no idea what your bit-flip did.

If you observe it firing at a time when the satellite was previously
doing nothing, and you have just changed the message, then there is a
high probability that your change caused the firing. An attacker doesn't
require 100% certainty.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
Key fingerprint = 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Key type/length = RSA 2048-bit (always check this as well as the fingerprint)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBNUybtzkCAxeYt5gVAQEl/gf/TjBPslKImTcDnISLSXAGYmXNWlpvDcCQ
dExnj/2Jcu9+VDO/+gtG1A93MkyenjfJme1Dac/5YBDgThyT41n5iHcZkO1QFS8r
PO8II9P3VwUl3v3RL3jXvjHlrrtmMSpLQi6hARpgSGJqdHX+C+MMPEmZmxMaGtzj
PTJYj3wAEHR5O45emImfJgV4kXiN+7D47DOzS1R209HIu4WPhLOkYi+xOSOVakTf
nftTEl7HevJuaakAFffZd73yTRc1Z0uwzWVGPhtE2vjdHL4f+qNCNtM4Chbrq/uY
7HpCRoZQXmpbaQ3lRHfWXrQ10Njz8ra5IBoqwVn4iePxMD3nV17YPg==
=fFAA
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/w1cYsdX95PA/m/RSIySxkNvTYJ", "n_sections": 43}, {"thread": "1B0K35X5hf4", "msg": "kq-MegjmD8gJ", "author": "David Hopwood", "date_disp": "Dec 13, 1999, 3:00:00\u202fAM", "subject": "An attack on the WTLS SHA_XOR_40 MAC algorithm", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

WTLS, "Wireless Transport Layer Security", is the security layer of the
WAP protocol suite (www.wapforum.org). It is loosely based on TLS, with
modifications to allow running on datagram transports, removing
dependencies on ASN.1, support for elliptic curve key exchange, and
various other tweaks.

The latest proposed spec (for version 1.2) is in PROP-WTLS-19991105.pdf
in the technical docs section of the WAP forum site. For the MAC
algorithms (which have not changed from the previous version, 1.1),
it lists
- a null algorithm that provides no authentication (not a good idea
IMHO, but at least it's documented as such),
- four algorithms based on HMAC-MD5 and HMAC-SHA1 truncated to 40
and 80 bits,
- and the following algorithm, which I've just broken:

# SHA_XOR_40 (4)
#
# A 5-byte XOR checksum. The input data is first divided into the
# multiple blocks of 5 bytes. Then all blocks are XOR'ed one after
# another. If the last block is less than 5 bytes, it is padded with
# 0x00. SHA is much stronger than XOR for generating MAC's,
# although there were no significant attacks reported on XOR MAC's,

[Note that this is *not* the XOR MAC described in "XOR MACs: New Methods
for Message Authentication Using Finite Pseudorandom Functions," by
Mihir Bellare, Roch Gue'rin and Phillip Rogaway; it is an ad-hoc
construction that I haven't seen used anywhere else.]

# which must be encrypted and is [sic] only used for CBC mode block
# ciphers. XOR is only intended for some devices with very limited
# CPU resources.
# Warning: XOR can not provide as strong message integrity
# protection as SHA can. It is recommended that the security
# consequence should be carefully evaluated before XOR
# MAC is adopted. In other than MAC operations for message
# integrity (eg., PRF) the full-length SHA-1 is used.

In fact there is an easy attack on SHA_XOR_40 (when used with a block
cipher in CBC mode). First note that if the MAC size were equal to the
block size, then rearranging the order of the ciphertext blocks would
not affect the XOR of the decrypted plaintexts:

Let P[0..n-1] be the plaintext, of length n blocks.

Encryption:
C[-1] := IV
P[n] := XOR[j = 0..n-1](P[i])
C[i] := E[K](C[i-1] XOR P[i]), for i = 0..n

Decryption:
C[-1] := IV
P[i] := D[K](C[i]) XOR C[i-1], for i = 0..n
X := XOR[j = 0..n](P[j])
:= IV XOR C[0] XOR ... XOR C[n-1] XOR D[K](C[0]) XOR ... XOR D[K](C[n])
Accept iff X = 0.

X does not depend on the order of the blocks C[0..n-1]. If an attacker
swaps two regions of ciphertext blocks, for example, the effect will
be to swap the corresponding regions of plaintext (apart from errors
at the beginning and just after the end of each region).

The fact that the checksum is calculated in 5-byte chunks that do not
match the cipher block boundaries, might appear to prevent this attack,
but in fact it just means that we are only able to reorder chunks of
size LCM(cipher block size, 5 bytes). For the currently-defined WTLS
ciphersuites, this is always LCM(8, 5) = 40 bytes.

To demonstrate this, let Z(a, b, c, d, e) be the exclusive-or of the
eight 5-byte blocks that result from splitting cipher blocks a..e. Then
the first few terms of the X calculation are:

X = XOR[j = 0,5,..)](Z(P[j], P[j+1], P[j+2], P[j+3], P[j+4])
= Z(IV , C[0], C[1], C[2], C[3]) XOR
Z(D[K](C[0]), D[K](C[1]), D[K](C[2]), D[K](C[3]), D[K](C[4])) XOR
Z(C[4], C[5], C[6], C[7], C[8]) XOR
Z(D[K](C[5]), D[K](C[6]), D[K](C[7]), D[K](C[8]), D[K](C[9])) XOR
Z(C[9], C[10], C[11], C[12], C[13]) XOR
...

= Z(IV , 0, 0, 0, 0) XOR Z(0, C[0], C[1], C[2], C[3]) XOR
Z(D[K](C[0]), D[K](C[1]), D[K](C[2]), D[K](C[3]), D[K](C[4])) XOR
Z(C[4], 0, 0, 0, 0) XOR Z(0, C[5], C[ 6], C[ 7], C[ 8]) XOR
Z(D[K](C[5]), D[K](C[6]), D[K](C[7]), D[K](C[8]), D[K](C[9])) XOR
Z(C[9], 0, 0, 0, 0) XOR Z(0, C[10], C[11], C[12], C[13]) XOR
...

which is also independent of the ordering of the 40-byte chunks,
excluding the last chunk containing the encrypted MAC.

So, SHA_XOR_40 is insecure for plaintexts exceeding 80 bytes (so
that there are at least two chunks to reorder), with an attack
requiring negligable work.

My recommendation is that SHA_XOR_40 be dropped from WTLS 1.2.
The argument for including it was based on processing speed
limitations, but IMHO that doesn't stand up very well to closer
examination. Although the processing speed of many wireless devices
may be fairly limited, so is the available bandwidth (the maximum
bandwidth currently available on any WDP-supporting network is
64 kbit/sec). As bandwidth increases, so will processing speed.
[Note that a device's HMAC implementation only has to be able to
keep up with its own maximum bandwidth, taking into account any
other work being done at the same time. It doesn't have to be able
to keep up with the maximum bandwidth of its peer or of the network,
if that is greater.]

If SHA_XOR_40 is dropped, then to prevent any confusion and to
simplify security analysis, the number that was allocated to
it should not be re-used for any future algorithms. For example:

# DO_NOT_USE (4)
#
# This number was previously allocated to a 5-byte XOR-based
# checksum [WTLS 1.1]. However, that algorithm was found to be
# insecure [Hopwood99].
# New implementations of WTLS MUST NOT suggest (for clients)
# or accept (for servers) this algorithm.
#
# [Hopwood99] - this post, submitted as a formal comment if necessary.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOFRJ8jkCAxeYt5gVAQGoDQf/dDuiONMcnE943kNM+GG+RRVePg/ucogR
SlbcFcAJjjiFTVu930reK5CDMf05eRR0OveZbJMk7q0GSQiNIfjrGu9IAC+4wB3f
eaOGN05R53MhpuBkIahh2sscU1kCWEoB9lIWkA1gUUglu090tMWT7ATWl51OsJvQ
Lacne7WP6SfUTpXbpCYcI5vUZ8/lp4NbJZ3xiN3LZarydWgnzMgRBik4lh47ch7/
ISh/P5UkH6bvY6+lXhpzqUICmF+X0sLjTOltKrTcUKcU4mgOePbQN+iXAcoYN8zd
RxMFdJSajnBHDtLZYx24cP1nl0wxGqVvRaSQP4ygDdUsEyeE3G+Xyw==
=kuQz
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/1B0K35X5hf4/m/kq-MegjmD8gJ", "n_sections": 4}, {"thread": "1B0K35X5hf4", "msg": "yjLUgzYhFdIJ", "author": "David Hopwood", "date_disp": "Dec 20, 1999, 3:00:00\u202fAM", "subject": "An attack on the WTLS SHA_XOR_40 MAC algorithm", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Wagner wrote:
>
> Good catch. Yeah, I agree: the so-called WTLS 'XOR MAC' is seriously
> flawed, and definitely should be eliminated with all possible haste.
>
> Submitting your result to WAP might be useful, to keep them honest.

I have done; I'll also point them to Saarinen's paper and outline your
repeated ciphertext attack.

> Last I heard, they were a semi-secret design committee, and one always
> has to wonder about the effects of secrecy & politics on the resulting
> standards.

Yes, the telecoms industry doesn't exactly have a sterling record in that
respect :-(. It could be much worse, though; unlike GSM, the flaws seem
to due to cluelessness, rather than deliberate attempts to weaken the
protocols.

> You might also be interested in the following paper:
> Markku-Juhani Saarinen, ''Attacks against the WAP WTLS protocol.''
> 1999 Communications and Multimedia Security conference.

Thanks, that's useful (I got a copy from the author).

Has anyone checked whether the elliptic curves that do not have seeds given
for them are of any special form, BTW?

> This paper shows some different attacks on the 'XOR MAC', and also
> describes several other security misfeatures of WTLS.

[...]


> If you repeat a ciphertext block that corresponds to some known plaintext
> block (perhaps because it is part of a predictable TLS header or guessable
> HTTP request or somesuch), you can even control the inserted plaintext
> block to some extent.

Note that it's quite easy to get known plaintext for the WAP protocols;
because they are datagram-based, any headers automatically line up with
the WTLS packets.

> You can also apply similar tricks to any sequence of consecutive
> ciphertext blocks, if you like.
>
> You can use this trick to do cut-and-splice attacks, a la Bellovin's
> IPSEC work. For instance, suppose we have the ciphertext U V W that we
> want to get decrypted for us. We wait until we get ahold of the channel,
> perhaps using an echo feature in some application like suggested in
> M.-J. Saarinen's paper. Then, when we see ciphertext X Y Z, we modify
> it to become X (10 copies of U V W X) Y Z.

At first I didn't see how this could be applied in practice, but in fact
there's a echo feature in HTTP (and whatever the WAP equivalent is).
Suppose you have an <a href="http://..."> in a page delivered over WTLS.
If the user clicks on the link, the URL will be revealed as plaintext
in a new request. If the attacker inserts the ciphertext blocks in the
page at the right place, the corresponding plaintext will be included
in the URL.

(Note that this doesn't necessarily require much guesswork; often the
attacker can access the same pages, apart from any user-specific secret
information, as the legitimate user. He/she might be able to tell which
page is being viewed by length or timing information.)

> This attack will not be detected by the XOR MAC, and it lets us read any
> traffic we like.

Very neat (and an excellent demonstration of why it's so important to
have strong integrity protection as well as confidentiality). This also
applies to the null MAC, of course.

You don't even need to actually do an active attack that modifies the
packet contents, I think; just sending extra packets with a forged source
address at approximately the right time will work, because the receiving
WTLS stack will discard the packets with the same sequence numbers from
the real sender.

> At this point I would claim it should be clear that the 'XOR MAC' is
> fatally and fundamentally flawed.

Yes, although it appears that the best I'll be able to get is a "SHOULD NOT"
use, rather than "MUST NOT" (a bit wishy-washy if you ask me, but better
than nothing).

Also, in order to change anything, I have to submit a formal Change Request
via an employee of one of the WAP forum member companies. Someone has
volunteered, but it seems to be a rather heavyweight process. (The more
standards bodies I see, the more the IETF seems like a breath of fresh air.)

So, does anyone reading this know of any other problems with WTLS that
can be fixed at the same time? I already know about the ones in Saarinen's
paper, which were:

- A chosen plaintext attack against low-entropy blocks, using the fact
that the IVs are known or predictable.
- SHA_XOR_40 with a stream cipher (already fixed).
- Exportable DES keys had only 35 effective key bits (already fixed).
- Bleichenbacher's attack against PKCS #1 (already fixed by replacing
the master secret with random bytes when the PKCS padding is invalid).
- Unauthenticated alert messages; this also allows blocks to be deleted
without detection.
- For exportable keys, the IV of any block is known exactly.
- record_type is not encrypted.
- PKCS #5 padding provides guaranteed known plaintext.

The spec is at http://www.wapforum.com/what/technical.htm#Proposed

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOF29HDkCAxeYt5gVAQEbYgf/c3cfgP91kmqAzkHqjkHUQ3DiOm6RxjpE
L52OSxSJFo60YwiDwmNhJlmuQ36Mrq6Mt2PyFSjyrlNpV5AcHi1/9kDOdU5LwCkO
AAiusCRLuuwdQoA20HWBK9WvxIYGloVmA/os4nxWvw4VfLTK4lM8dPWzkP/Pp1Dj
UUJYcFp5lQNb47PxD/MRjnQY/Q2kvsdV24huiNaTNZ3DjqhiMsAnuVmWWDTbYSry
huEdLETDdRl6G+DrgyL2lQnZSp/j5TrrQ1tub/yuuJ536itEzfUjuEwJYuX39iTg
hCr4GvjRf9LQRbkjAePgb2wBI/U2M4aUCYq/tPG6G1zS7n+6kFKSGg==
=iz5G
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/1B0K35X5hf4/m/yjLUgzYhFdIJ", "n_sections": 4}, {"thread": "5vf8hSjDzfc", "msg": "QSNIcA8P5dcJ", "author": "David Hopwood", "date_disp": "Dec 6, 1999, 3:00:00\u202fAM", "subject": "iaPCBC: confidentiality and integrity in one shot (long)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

James Muir wrote:
>
> iaPCBC stands for integrity aware plaintext ciphertext block chaining.
> It's been proposed as a new mode of operation for block ciphers. It
> claims to provide data confidentiality and integrity with one
> cryptographic operation. See
>
> http://www.research.att.com/~smb/papers/iapcbc.ps
> http://www.research.att.com/~smb/papers/draft-bellovin-iapcbc-00.txt
>
> for a complete description.
>
> Has anyone analyzed iaPCBC yet? If so, can someone point me to the
> analysis?

I had a look at this, and found a potential avenue of attack (perhaps
somewhat impractical, but I think it's sufficient to show that iaPCBC is
not as strong as the existing IPsec integrity mechanism, HMAC).

Here's the description of the algorithm from draft-bellovin-iapcbc-00,
edited slightly:

# [Assume a cipher with block size B >= 64 bits. Encryption is denoted
# by E(K, P); decryption D(K, P). Keys are N bits.]
#
# The iaPCBC algorithm requires two keys. The first, KD, is used for
# confidentiality of the payload. Per [RFC2401], KD is taken from the
# first N bits of negotiated keying material. The second, KI, is used
# to generate and protect P[0] and C[0]. The next N bits of the
# negotiated keying material are used for KI.
#
# When keys are changed, a new value for R[0] MUST be generated. This
# MUST be a secret, per-key unique number. If a pseudo-random number
# generator is used to produce R[0], it MUST be strongly seeded; i.e.,
# per the suggestions of [RFC1750]. Implementors MAY use extra bits of
# keying material as part of the seed.
#
# The first cipher block contains C[0]; see the description below for
# its generation. C[0] transports, in effect, IV material to the far
# end. C[0] is not encrypted with KD.
#
# The usual ESP packet layout, including padding and the Next Header
# indicator, come next. This is followed by a duplicate copy of the
# SPI [Security Parameters Index] and the packet sequence number,
# padded out with 0-bits if necessary to fill the cipher's block size.
# [snip possible padding variant for block sizes > 64 bits]
# This last block acts as the authentication data; the receiver MUST
# verify that the contents of these fields is as expected.
#
# To encrypt a packet of plaintext blocks P[1..M], arranged as above
# including the duplicate SPI and sequence number, the following
# algorithm is used:
#
# C[0] = E(KI, R[0]);
# P[0] = E(KI, R[0] + 1);
# for (i = 1; i <= M; i++) {
# R[i] = R[i-1] + P[i-1] + C[i-1];
# C[i] = E(KD, R[i] ^ P[i]);
# }
# R[0] = G(R[0]);
#
# All additions used are computed modulo 2^B.
#
# The blocks C[1..M] are the ciphertext. (Note that the above
# algorithm assumes an empty block P[0] before the plaintext.)
#
# The value R[0] is a per-key variable, and [is either retained
# between packets, or a CSPRNG is used to generate a fresh R[0]
# for each packet].

I.e. as a diagram:

<pre>
ADD means addition mod 2^B.
XOR means exclusive or.

P1 P2 PM = SPI, seq#
| | |
+-->ADD 1-->E_KI--+ +----+ +----+ |
| v | v | v |
R0-->-+--------------->ADD->-+---)-->ADD->-+---)-->ADD-> ... ->-+ |
| | ^ | v ^ | v ^ | v
| +------>-----+ | +->XOR | +->XOR | +->XOR
| v | v | v | v
| E_KI | E_KD | E_KD | E_KD
v | | | | | | |
G +----+ +----+ +----+ |
| v v v v
| C0 C1 C2 CM
|
v
R0 for next packet (or generate randomly)

</pre>

# To decrypt a packet of ciphertext blocks C[1..M], the following
# algorithm is used:
#
# R[0] = D(KI, C[0]);
# P[0] = E(KI, R[0] + 1);
# for (i = 1; i <= M; i++) {
# R[i] = R[i-1] + P[i-1] + C[i-1];
# P[i] = D(KD, C[i]) ^ R[i];
# }
#
# All additions used are computed modulo 2^B.
#
# The plaintext will be in P[1..M-1].
#
# Following the decryption, the encrypted copies of the SPI and
# sequence number in block P[M] MUST be compared against the plaintext
# ones; in addition, any constant padding MUST be checked for
# correctness. If any of these checks fail, an integrity failure has
# occurred; this is an auditable event, and must be handled
# appropriately.

Now for the attack. First, note that any integrity mechanism should be
secure even in the case where the plaintext is known by the attacker.
So we can assume that P[1..M] are known (P[M] is a copy of the
SPI and sequence number, which is sent in the clear).

The security of the algorithm depends on the intermediate values R[i]
being secret. If we had the plaintext and a single R[i] for some i >= 1,
then we would have enough information to solve for any R[i], i >= 1
(using R[i] := R[i-1] + P[i-1] + C[i-1] to go forwards in the sequence,
and R[i-1] := R[i] - P[i-1] - C[i-1] to go backwards). We would also
know the inputs and outputs of all the encryptions using KD.

In that case we could forge a message that would pass the integrity check,
as follows:

1. Rearrange the ciphertext blocks in some order, possibly repeating
some blocks and dropping others.
2. Recalculate the plaintext, including the final check block. This
can be done without knowing KD, by making use of the fact that the
block cipher is a fixed permutation (i.e. the rearranged ciphertext
blocks will decrypt to the same values that they decrypted to in
the original packet).
3. Repeat from step 1 until a favourable plaintext and final block
is found.
4. [For IPsec] Resend the packet, with an SPI and sequence number
taken from the new final block (the SPI would have to correspond to
the same key as before).

Breaking iaPCBC by this method therefore boils down to finding an
intermediate R[i] value.

Suppose that, by coincidence, a ciphertext block repeats within a
single packet (i.e. C[i] = C[j] for i < j). The probability of this
happening is small, but not insignificant, at least for 64-bit
blocks (especially if we are comparing iaPCBC to HMAC, which seems
to be able to handle very large amounts of data without any security
problem). Also note that for applications of iaPCBC other than
IPsec, the message may be of arbitrary length.

Anyway, assuming that a ciphertext block is repeated, the corresponding
inputs to the block cipher will also be equal:

R[i] XOR P[i] = R[j] XOR P[j]

Let X = sum[k = i..j-1](P[k] + C[k]) (using mod 2^B addition)

- From the definition of the sequence R, we have
R[j] = R[i] + X

Substituting for R[j],
R[i] XOR P[i] = (R[i] + X) XOR P[j]

Let Y = P[i] XOR P[j], then

R[i] XOR Y = R[i] + X, where X and Y are known.

XOR and addition are very similar, but the difference in the treatment
of carry allows us to solve for some of the bits of R[i]. Let the suffix
"_k" denote bit k of any value (numbering from 0 for the least significant
bit).

Bit 0: R[i]_0 XOR Y_0 = R[i]_0 XOR X_0
(this doesn't help much)

Bit 1: let C_1 = R[i]_0 AND X_0 (carry from previous bit)
R[i]_1 XOR Y_1 = R[i]_1 XOR X_1 XOR C_1
C_1 = R[i]_0 AND X_0 = X_1 XOR Y_1
therefore if X_0 = 1, we know that R[i]_0 = X_1 XOR Y_1
if X_0 = 0, we gain no information

["a ? b : c" is the boolean conditional operator,
"if a is true then b, otherwise c"]

Bit 2: let C_2 = C_1 ? (R[i]_1 OR X_1) : (R[i]_1 AND X_1)
R[i]_2 XOR Y_2 = R[i]_2 XOR X_2 XOR C_2
if C_1 = 1, then C_2 = R[i]_1 OR X_1 = X_2 XOR Y_2
therefore if X_1 = 0, we know that R[i]_1 = X_2 XOR Y_2
if X_1 = 1, we gain no information
if C_1 = 0, then C_2 = R[i]_1 AND X_1 = X_2 XOR Y_2
therefore if X_1 = 1, we know that R[i]_1 = X_2 XOR Y_2
if X_1 = 0, we gain no information

and so on. After generalising this for any bit position and then
simplifying, we end up with:

R[i]_k = { X_{k+1} XOR Y_{k+1}, if Y_k = 1
{ unknown, otherwise

for k = 0..B-2 (R[i]_{B-1} is always unknown).

If all bits of Y (which is the XOR of two plaintext blocks) are random and
unbiased, the attacker will find on average (B-1)/2 of the bits of R[i].
For a chosen plaintext attack, the attacker could arrange that the
plaintext consists of only two blocks that are complements of each other,
and are repeated about the same number of times, so that with probability
1/2 Y would be all ones, and all of the bits of R[i] would be retrieved.

In conclusion, and assuming I haven't made a mistake, iaPCBC does not
guarantee integrity for messages that have a repeated ciphertext block.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOEsrOjkCAxeYt5gVAQHJvwf+O0qOXXcAG/Ygj8dXjYRn4d5XVZvlz2pi
bqnuQcer79Zrbm0coiRjxn58/AgY24VKxKWFhCNKXQjfSYy4cnlVauTT7TcGDIwe
LmeNDNFyX+XYIQ1Mg28EF0KHfKNLoPI0ttcLSI9QbPb9akIn1bAl/pR2vwLPDLQe
J67FkreB++Mj0zk/zBhCeXGzM4yQ6Flp1wa3njppkB1euYlfCRrd3CPEMRoeOsQa
aLJ+/6bhzStOWlPUer99l5Q5tyAjk5T4L3Yq2B/VhNbpMY1gBXWcBL7oRXNLMnHU
wccLQi3iWweY1IWzaSnGi1s34PSFqu4n5pO9877Yy/sOQKe7/bQg0A==
=5SMN
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/5vf8hSjDzfc/m/QSNIcA8P5dcJ", "n_sections": 2}, {"thread": "8qVCJSfss2A", "msg": "xtA-2Wg4j2cJ", "author": "David Hopwood", "date_disp": "Nov 24, 1999, 3:00:00\u202fAM", "subject": "RC4 in Kremlin US version 2.21 to tom st denis", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
>
> In article <817c4l$i1$1...@gannett.math.niu.edu>,


> c...@baker.math.niu.edu (Xcott Craver) wrote:
> > Finally, RC4 is a cryptosystem. It is not a RNG, because
> > no algorithm is an RNG unless it has access to a source of
> > real entropy; it is not merely a PRNG either, but can be
> > used as one.
>

> I will argue this to the end of the earth. All stream ciphers are


> simply secure PRNG or RNGs.

Not so; a stream cipher with feedback cannot be used directly
as a PRNG.

I'd also agree with Xcott Craver's use of terminology; RC4 is a
stream cipher constructed from a PRNG (which allows the algorithm
to be used as either). Considering RC4 to be simply a PRNG ignores
the fact that there is a fixed and precise specification of how
to use it as a cipher (so a cipher constructed from the same PRNG,
but with addition mod 256 rather than XOR as a combiner, for
instance, would not be RC4).

> SEAL, RC4, WAKE are all PRNGs where the output is xored with
> plaintext/ciphertext.

SEAL and RC4 operate as simple keystream generators (i.e. "the
output is xored with plaintext/ciphertext"), but WAKE doesn't -
it uses ciphertext feedback. Please check your assertions before
posting them.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBODoAzzkCAxeYt5gVAQG6vQf/VJqCMy7FRgN/3K3M7r3dH8R60obOpCjK
wC5tZ3mSg/bJhFjjSOktLqMhJGoD2h7FPBT8fRQqTQ2lj6f0uADDU0IuMMtnBqen
gYGeGkp6EcTIp6jospxpCeYvvP3wYUtkBXf/sDd/yvplvt6GqaiVO1AHbHDn+D/k
K3ylW3BURtHIazgBdr5F7TWETGg/0DztaT2yjxi2D8SDg0dfiPjsFr1w97RRGYll
1X9dUB16atHcgHPzv5v1RD78wCGT6rW8W0YGdIbX2e7xcDAvwVKNKtJ4lGRME/oF
gtN2yzho4iBC/O/g0Pq9yzgS8RgbNwz7jyiy1loVlEgoga1VYx8cWw==
=4M3P
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/8qVCJSfss2A/m/xtA-2Wg4j2cJ", "n_sections": 14}, {"thread": "C22sXutv36Q", "msg": "BvlyU3BA0c8J", "author": "David Hopwood", "date_disp": "Dec 1, 1999, 3:00:00\u202fAM", "subject": "Open BCRYPT/1 brute-force analysis", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

At <http://members.tripod.de/privacy/>, there are some documents
analysing the security of "Open BCRYPT", which implements passphrase-
based symmetric encryption, by the program's author.

However, there is a serious error in the analysis of brute force
cracking times, at <http://members.tripod.de/privacy/cracking.txt>.
The page says:

# the assumptions are based on RFC 1810, Report on MD5 Performance,
# June 1995, from which i quote:
#
# "MD5 cannot be implemented in existing technology at rates in excess
# of 256 Mbps in hardware, or 86 Mbps in software."

This is for a *single instance* of MD5. A brute force attack on a
passphrase hash allows effectively unbounded use of parallelism, so
these rates must be multiplied by the number of instances.

That means that the times estimated for a brute force crack (for example,
360 years for an 8-character random alphanumeric password, although
I haven't checked the other assumptions that is based on) must be divided
by the number of hash instances the attacker can afford to implement and
run in parallel.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOESbYjkCAxeYt5gVAQEwAAgAiF403i5eSkJAnSVTYsPZ1mm84g5OGHJc
sNxg8bjv9L9nb/81W5b5+3t0FRYn7gj0OsRY9EG+oKSlRoXp27kvCNg6/ZYD8EzH
PnYC+118VmvsCd4LutVDzkmFLhT7up3IT9TKxVB5aXUyu38kqvdOCwSCdAF6rvMj
6UOvaKp0P4TigC2rNnH4TVhb9HSbqphv11aJwieUoEe3IuO2Nk6rILdjSxg07cD9
8X7hxpOsB2iXSPuP0676d9y36gxy8MOfeIzqSyfUZpEX9nyfqHj7L6mgGzxRP92K
pFIRfVzC8a2gxiZinG44PRwPGgXqzQvITDUV37NleszmKFfbL9lbcg==
=IsMS
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/C22sXutv36Q/m/BvlyU3BA0c8J", "n_sections": 2}, {"thread": "DM1sbbsiMTM", "msg": "X_zyZOmclhUJ", "author": "David Hopwood", "date_disp": "Nov 20, 1999, 3:00:00\u202fAM", "subject": "Apparently, Hushmail does work", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

John Savard wrote:
>
> A posting in
>
> jyu.ohjelmonti.coderpunks
>
> mentions
>
> http://www.hushmail.com/how_it_works.htm
>
> which seems to indicate that the resident application from Hushmail
> works basically the same way that PGP did; thus, except for the fact
> that its source isn't available,

Isn't that a big enough problem in itself?

Incidentally, although Hushmail is derived from code copyrighted by the
Cryptix Development Team (www.cryptix.org), as can be seen by decompiling
the classes that implement Blowfish and SHA-1, there is no acknowledgement
of that as required by the Cryptix General License. (It's not as if the
license is at all unreasonable - just standard Berkeley open-source.)

> and worries of that nature, there is no reason to believe that it doesn't
> "work".

I can see the following problems:

1. It requires Java to be enabled. Having had experience both of breaking
various amateur cryptosystems, and finding implementation and design
bugs in Java, I can assure you that the latter is *much* easier. Also,
the attacks you end up with are more practical (i.e. instead of
requiring lots of known plaintext to break a single message for a
cryptanalytic attack, the conditions for a Java attack are usually
easy to arrange, and the result is that you can take over the user's
machine completely).

2. At http://www.hushmail.com/tech_description.htm, it says:
# A secure one-way hash of the users passphrase (using SHA) is also
# partially sent to the HushMail server, for validation of the user at
# a later date.

This is sufficient to do an off-line dictionary attack on the passphrase.
(Compare to PGP, where the attacker has to first get a copy of the
user's keyring file.) There are protocols which could be used to avoid
this weakness (SNAPI, SRP-3, etc.), but obviously the designers aren't
aware of them, or don't appreciate that off-line dictionary attacks are
a big problem. (Also, SHA-1 is quite fast, and there doesn't appear to
be any attempt to slow it down or to use any salt.)

3. At http://www.hushmail.com/about_hushmail.htm:
# Our patent-pending, state-of-the-art technology...

A substantial portion of the cryptographic community (myself included)
won't touch anything patented if they can help it, for very good reasons
that I won't go into here. It therefore has very little chance of becoming
a standard.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBODYypTkCAxeYt5gVAQEOvgf/RsWYG5FxriT/64bg3XyDQFohMXTzppFI
dCGQn/ZxP9IWgJwVPu8hhkF3Zs8453jO48N+Asw63Kg4S1PXqDFgSdhC0cOrEoBF
BzGWMkeCBQ4YzOP0AvduAKSOw/7ZPoSU3mVtw2PFARqE/ZUcXxDquBoHts7YTB7z
pDcJSFN5ELd40IljK4tUAHt6TebWyuZPwDP8oHptcWomJPE6KEYht0MFU4fhpM2b
YSoosb/JAIHNu+BWFVwqem/CBMs1i8v3cbALpb2gLJVgERuB6svPsiE0zxreqolL
R/CV+Z9bY5Msjb+HuKT/SHXsW2kg1PHWacTYFPi9/6cC8LNRLlQDgg==
=Lyfb
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/DM1sbbsiMTM/m/X_zyZOmclhUJ", "n_sections": 8}, {"thread": "DM1sbbsiMTM", "msg": "t1_thFA0TpIJ", "author": "David Hopwood", "date_disp": "Nov 20, 1999, 3:00:00\u202fAM", "subject": "Apparently, Hushmail does work", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

I wrote:
> I can see the following problems:
>

> 1. It requires Java to be enabled. [...]
> 2. [Sending a hash of the passphrase] is sufficient to do an off-line
> dictionary attack [...]
> 3. # Our patent-pending, state-of-the-art technology...

I've just noticed something else:

4. At http://www.hushmail.com/faq.htm:

# 29.Internet Explorer is asking me security questions. What should I tell
# it?
#
# Depending on security setting in Microsoft Internet Explorer, users may
# be prompted at certain points while they check their HushMail. Setting
# the security level to medium will eliminate all these warnings.

It'll also completely eliminate your security (such as it is, if you're using
Windows and IE). Don't set IE's security level to anything other than High
(or Custom with everything disabled), for each security zone.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBODY2LzkCAxeYt5gVAQHYHAgAlWUU9nWmo5kw5wKKd9Uso74gwud9BMb2
2uZa2jZt6xRakyHiO6bA5Ygi149NWFJz0fbBYF/nC1fHZTrfWeloUS3XMFfCsCHY
P4W/CTek1QM4MmaZq18wgHvSlJy61jhZYijBO0T/2WWWZ0lMhJFkhV+cFw3Myh1T
WJglc2wBg4GP0Wc8BWBiDNakcqeGCdnn1o8aooQmvr9n5sTL+DrFGOMA0gWk1IKH
jGTtA4wG65vJQHdHjmN5V/1rglNtJCd1ESTq6PhYCMy2dYRNOQWwPJ65q4pYjaCE
LfaxtTzIGCYO42xU+xdNfS6X3NuGZbtgWlkyLGClwikAaGF+smTv2Q==
=xQ3W
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/DM1sbbsiMTM/m/t1_thFA0TpIJ", "n_sections": 8}, {"thread": "HnSr9iLsJFM", "msg": "l60CJLoj2OYJ", "author": "David Hopwood", "date_disp": "Nov 28, 1999, 3:00:00\u202fAM", "subject": "Secretly Obscured Subset", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Gary wrote:
> Entity 'A' creates a function F mapping 2^N, N bit numbers INTO 2^(N/K), N
> bit numbers (K>1). For example with N=160, K=8. All 160 bit numbers are
> mapped into a subset with only 2^20 elements. The function is disguised so
> that only 'A' knows every element in the small subset. 'A' publishes the
> function.
>
> Entity 'B' on receiving the function generates a random N bit number R and
> uses the function on it to create R'=F(R). R' will be the secret session key
> he wishes to share with 'A'. 'B' one way hashes R' to produce R''=H(R'), and
> sends this hash to 'A'.
>
> Since 'A' knows all the one way hashes of the small subset, he can easily
> find the R' that hashes to R'', and thus shares the secret R'. For example
> with N=160 and K=8, 'A' needs only to search 2^20 hashes.

This can be broken by evaluating F on random inputs until you hit a number
that hashes to R''. Because each trial has a 1 in 2^(N/K) chance of hitting
the correct R', the expected number of evaluations of F and H is 2^(N/K);
i.e. not much more work than A has to do.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOEEJEjkCAxeYt5gVAQETMwgAxWmZ2y3r8s6BYW9OkA1BhGU6MtikS/Tp
/AYOlgB0LAEAamAHvbsmYZ4GPrANLcC7GHt6d/IZ/83NqC96Z9h4vrigYU4FKFlt
r0/f6CD7/bRTM403Nuftx2UAig9mDKyXY1gaNxzyil147UhA5Ea58XV/9JFyHDrG
9dEsfzCvTO7NjNF+r+PL9xi07lqSEjAXLm0C6jlPsRN54SoRX7DjVs3bqMXiTa+G
gtXsVX7Ta66mLRKnVdqe/FDYCbE6AT9ZoreZPeeeqhqH5+1K6X8LoFZ6PqwTh0H0
XmfHn0FaDwyjp6hJSRfaqzIHZSg7ojdJ7Bs43yOq9DlG5yXZWyRbAg==
=fdPJ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/HnSr9iLsJFM/m/l60CJLoj2OYJ", "n_sections": 2}, {"thread": "NYFqa49Z11w", "msg": "yk7MFvYr4jcJ", "author": "David Hopwood", "date_disp": "Nov 20, 1999, 3:00:00\u202fAM", "subject": "bits of diffiehellman private key", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

In message <814gea$b07$1...@nnrp1.deja.com>


Tom St Denis <std...@compmore.net> wrote:

> Let's say you have a random 1024 bit private exponent, and only 128 of
> those bits are random [not clumped together]. Let's say for any random
> key you could tell which bits were not random but their position is not
> fixed in the exponent. This means 1024-128=896 of the bits are known.

> Could any sieving method take advantage of this?

You wouldn't use sieving (i.e. index calculus-based algorithms) to attack
this; you'd use a "baby-step giant-step" algorithm modified to work on a
restricted exponent space. The following algorithm, which finds
x = log_g(y) given g and y, is adapted from [HAC]:

1. Split the random bits of the exponent into two halves, and let m
be the weight of the least significant bit in the upper (most
significant) half.

For example if . represents a fixed bit, * a random bit, and | the
position of the split:

...*..*|*...*
^------- weight of this bit = m = 2^5

2. Construct a table with entries (j, g^j), for j := each possible value
for the lower half of the exponent. Sort this table by second component.
(Alternatively, use conventional hashing on the second component to
store the entries in a hash table; placing an entry, and searching for
an entry in the table takes constant time.)

3. Compute g^-m and set gamma := y.

4. For i := each possible value for the upper half of the exponent,
4.1. Check if gamma is the second component of some entry in the table.
4.2. If gamma = g^j then return (x = im + j).
4.3. Set gamma := gamma * (g^-m).


The work factor is given by the square root of the number of possible
exponents (i.e. 2^64 if 128 bits are random). There may be better
attacks if the prime modulus p is not chosen carefully - ideally it
should be a safe prime, and (if I remember the most up to date advice
correctly) the base g should generate the subgroup of size (p-1)/2.

If you use a 1024-bit safe prime modulus with about 256 bits of the
exponent random, and g chosen as above, that should be secure against
passive attacks. (As always for Diffie-Hellman, protecting against
active attacks requires additions to the protocol.)


[HAC] A. Menezes, P.C. van Oorschot, S.A. Vanstone,
Handbook of Applied Cryptography,
"Algorithm 3.56: Baby-step giant-step algorithm for computing
discrete logarithms,"
[Also see Note 3.59 (restricted exponents), and the discussion at
the top of page 128.]
CRC Press, 1997.
http://www.cacr.math.uwaterloo.ca/hac/about/chap3.pdf

(Congratulations to the authors and publisher for putting this book
on the web, BTW. It's still well worth buying the paper version for
convenience.)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBODYktjkCAxeYt5gVAQG8zAf9FBDfqeu4VKr9DX1a1te8b0rrAOxryV21
4EZoeNiZQjQAoMIDSWzUE/semC7kOMO/OBcDo7lnIYCTikDDioJkvXBmaZ+FkUbk
r/xXi2CZ2oVxjamc1R/gicMrX1sqxPoZc+5Q7ey+OKVoXE+9AvjwY6zFQ2IykwVs
l3n9+SrQcIWzhnBHPGRdxYk3DgBQATvJiyEKXPs4eTBtF63ne0syMOyulTZdw12D
EaqFbevmtr2w79tiFiX+WK6cHlYxJjN3m8jlcZ+R/Tlk1CcInNUV4Z5cCyOXRARV
dIYrHCp0b5J1oQ6116ODNfGwNHHrwGhFX3cWm+VdH62WYL2/2REXUw==
=/ZYY
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/NYFqa49Z11w/m/yk7MFvYr4jcJ", "n_sections": 27}, {"thread": "NYFqa49Z11w", "msg": "mJKT790b2jMJ", "author": "David Hopwood", "date_disp": "Nov 24, 1999, 3:00:00\u202fAM", "subject": "bits of diffiehellman private key", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

In message <814gea$b07$1...@nnrp1.deja.com>
Tom St Denis <std...@compmore.net> wrote:

> Let's say you have a random 1024 bit private exponent, and only 128 of
> those bits are random [not clumped together]. Let's say for any random
> key you could tell which bits were not random but their position is not
> fixed in the exponent. This means 1024-128=896 of the bits are known.
>
> Could any sieving method take advantage of this?

and I replied:


> You wouldn't use sieving (i.e. index calculus-based algorithms) to
> attack this; you'd use a "baby-step giant-step" algorithm modified to
> work on a restricted exponent space. The following algorithm, which
> finds x = log_g(y) given g and y, is adapted from [HAC]:
>

> 1. Split the random bits of the exponent into two halves, and let m
> be the weight of the least significant bit in the upper (most
> significant) half.
>
> For example if . represents a fixed bit, * a random bit, and | the
> position of the split:
>
> ...*..*|*...*
> ^------- weight of this bit = m = 2^5
>
> 2. Construct a table with entries (j, g^j), for j := each possible
> value for the lower half of the exponent. Sort this table by second
> component. (Alternatively, use conventional hashing on the second
> component to store the entries in a hash table; placing an entry,
> and searching for an entry in the table takes constant time.)
>
> 3. Compute g^-m and set gamma := y.
>
> 4. For i := each possible value for the upper half of the exponent,
> 4.1. Check if gamma is the second component of some entry in the
> table.
> 4.2. If gamma = g^j then return (x = im + j).
> 4.3. Set gamma := gamma * (g^-m).

I made a mistake here: the original algorithm maintains the invariant
gamma = y * g^-im, and I didn't preserve that when modifying the
algorithm to search for i in a different set of values. It should be:

3. Precompute powers of g needed to calculate step 4.1 below efficiently.

4. For i := each possible value for the upper half of the exponent,

4.1. Set gamma := y * g^-im.
4.2. Check if gamma is the second component of some entry in the
table.
4.3. If gamma = g^j then return (x = im + j).

[Step 4.1 can be optimised to calculate the new value of gamma from the
previous value, using only one modular multiplication and no modexps.
In step 3, precompute g^-k and g^k for k := each bit position in the
upper half of the exponent, and set gamma initially to y. Then in
step 4, search for i in grey code order; since only one bit of im
changes in each iteration (say bit k), then gamma can be calculated
by multiplying its previous value by g^-k or g^k, according to whether
the changed bit is now 1 or 0. A similar optimisation can also be
used for step 2.]

Baby-step giant-step requires quite a lot of memory and is hard to
parallelise, but there are other algorithms (for example Pollard
lambda), that require negligable memory, roughly the same work factor,
and can be parallelised more easily. Pollard lambda was designed
only for the case where the exponent is in a specified *interval*,
but it may be possible to generalise it to other types of restricted
exponent.

> The work factor is given by the square root of the number of possible
> exponents (i.e. 2^64 if 128 bits are random). There may be better
> attacks if the prime modulus p is not chosen carefully - ideally it

> should be a safe prime, and (if I remember the most up to date advice

> correctly) the base g should generate the subgroup of size (p-1)/2.

I did remember the advice correctly. Note that there is only one
subgroup of that size, in the case of a safe prime. It doesn't matter
which of the possible g's that generate that subgroup you use, so use
one that is convenient for optimising the arithmetic.

> > The following algorithm,
> > which finds x = log_g(y) given g and y, is adapted from [HAC]:
>
> Thanks for the info I will look it up in more detail.
>
> My question is however does it work if the bits known [or biased] are
> not clumped together?

Yes if they are known; see below if they are unknown but biased.

> I am taking this to the extent of peekboo with the timer rng.

I haven't studied the design of peekboo. Perhaps you can give more
detail about the protocol you were intending to use?

If you were intending to create a discrete-log private key from a
passphrase, or something else that necessarily has limited entropy,
make sure that you expand it to double the number of bits
corresponding to your desired security level, using a PRF (Pseudo
Random Function). For example, if you're expecting to get 128 bits
worth of security from the symmetric cipher, expand the passphrase
to a 256-bit exponent.

Two possible ways of doing this are:
- - use an iterated, salted hash function with a 256-bit output
(HAVAL, for instance).
- - use an iterated, salted hash function with a smaller output to
get an intermediate result x, and then let the exponent be
H(x | passphrase) | H((x | passphrase) XOR mask), where mask is a
fixed constant non-zero string.

If, OTOH, you're not using a passphrase and are just worried about
the possibility of your RNG output being biased, I'd concentrate on
trying to process the output so that it is sufficiently unbiased
for any cryptographic use, rather than specifically for generating
Diffie-Hellman exponents.

> My question is basically if say some parts of the bits
> are biased but not fixed [thus not always known, thus the known bits
> are not always clumped] does it work?

Yes, although not necessarily as well. If some of the bits that can
change are biased, but not completely known, the attack can be modified
as follows:

1. Identify which bit positions are unknown, and sort them so that
the bits you have least information about (i.e. that have greatest
entropy) are first.
2. Split this list of bit positions so that the number of bits
in the first half is (approximately) equal to the amount of
entropy, measured in bits, in the second half.
3. Apply the attack as described earlier, with the following changes:
- Remove the use of m (so that i takes the place of im).
- In step 2, j takes on each possible value for the bits in the
first section of the list.
- In step 4, i takes on each possible value for the bits in the
second section of the list, in order from most likely combination
to least likely combination.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBODtQhjkCAxeYt5gVAQHFBAf7B1zaN+0kVd5ucws79Tv6psRgleTfo3Zo
F84/g94FOYBtU8UyUSPofYFBAgYezIY5ovauMnyr0abiO0u9W32MFLqCEB9+cEnC
2tfpSPsV5/s7cK1QH43yTjJsokZ4U/Gsf4zwEzIkoZVo60OKvM44+eNhzTxplMCM
VX4IyR5GI5tkJx09PSFfAgJWjimbQyl+cAaq+aYxX17OM8kHNfvGZW9oDXBRje0c
q0cL5NDza2grs5t4T4Za8KxsTivvK/vDUqW1+vzGRPwO5chvnTTUQVEdsjAD1Tt7
W9bDB3Rn2YX+kcxOU5QrVpkgWbAMWu8JznEDLgVZzdUW2qwDc8xXOQ==
=2sqZ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/NYFqa49Z11w/m/mJKT790b2jMJ", "n_sections": 27}, {"thread": "NYFqa49Z11w", "msg": "ZQumPHtz4hIJ", "author": "David Hopwood", "date_disp": "Dec 1, 1999, 3:00:00\u202fAM", "subject": "bits of diffiehellman private key", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
>
> In article <19991124113820...@ng-fz1.aol.com>,
> djohn...@aol.com (DJohn37050) wrote:
> > All generators are equal in that if you can solve for one, you can
> > solve for any. But there are some concerns if a bad guy could PICK
> > a generator that is in a known relationship (known only to the bad
> > guy) to another generator.
> >
> > And the generator should generate a prime order subgroup, else you
> > may be open to small subgroup attacks, see IEEE P1363.
>
> By small subgroup attacks you are refering to the giant-step, baby-step
> algorithm right?

No. A small subgroup attack is an active attack where the agreed value
is forced to lie in a small set, which can then be brute-forced. In
the general case, this could happen because one or both of the public
keys used are not valid, or because one or both of the values sent in
the protocol are chosen to be g^((p-1)/k) for some small k.

In itself this isn't very significant for plain, unauthenticated
Diffie-Hellman, because:
a) the legitimate parties Alice and Bob gain nothing from forcing the
secret value to lie in a small set (since they could just as easily
leak the session key).
b) plain Diffie-Hellman has other active attacks against it (e.g. man-in-
the middle) which are usually no harder to apply than a small subgroup
attack.

The P1363 annex talks about it in the context of MQV (an authenticated
protocol based on Diffie-Hellman), where it is significant.

> Does anybody have [the baby-step giant-step algorithm for discrete logs]


> in .ps or .pdf format somewhere? I would love to read about it.

http://www.cacr.math.uwaterloo.ca/hac/about/chap3.ps or .pdf

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOESeBTkCAxeYt5gVAQGjcAf/bJ650EiwSXoxu8MqlH+bk9fv0sQVBlXp
PsldnDagFMMmGug9trXj5fHoE6tZF9twCvQ+4zZwqOEMyuz0wVWZzgt4jOaJpWsG
ufxF24S3LSM5+283lqlNSyEtuzJOhCXIC/7L/bPt2oc3aW/8DeP1UgrfcXyBlEPP
xRgBuvLpDQZ3VNCcssbWq09xKjlOjtFOw8RAbT5cQ7K95IOSgKbZK/D2cdhsOnT9
fQaYeiJf9yfeANeQfNWLupjOO7TmlvnfV6Z5/yqfIasBv3x21iBFGa4k50BonkCN
VtR1dgar8N3pWjQuHYTSDu1p5lKfM56ECA/R4uGdgOKioL/7Fjb2Ag==
=VwxF
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/NYFqa49Z11w/m/ZQumPHtz4hIJ", "n_sections": 27}, {"thread": "NYFqa49Z11w", "msg": "QAMX_f3ljNAJ", "author": "David Hopwood", "date_disp": "Dec 1, 1999, 3:00:00\u202fAM", "subject": "bits of diffiehellman private key", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

DJohn37050 wrote:
>
> No, that is not small subgroup. See IEEE P1363 security considerations
> annex for DH.

In case anyone has difficulty finding this, the P1363 home page is at
http://stdsbbs.ieee.org/groups/1363/index.html

(To get the username and passphrase, subscribe to the stds-p1363 mailing
list; you can then unsubscribe if you like. I don't really know why they
bother with this, but I suspect I would be told off for publishing the
username/passphrase here.)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOESefzkCAxeYt5gVAQHmnAf/dmmeUj5w21YHLuZg0Kz4klpTQpkYrXJF
ZUBi+z8c7dEQRdBEUl0qw59clA0Anz7xzsWzxbEEEcs2osj1GaVqSiDruH21RE/H
Jl1G1eQgCuhAsBqiyVt1xb0Nu88rYd5HuiBNxR/+Xd3IYr7cW+JmQWzCNaNWqO1U
WeXRHnfyDZ/nWPw0L6kj5e/IdxRw/giHXMEhUWiPly5BbSGtkWjDlk1IXCi0Pa/o
ZkKBpQKktOSY5ZT9MunwOqDk4KITcASBNbeTrNiwEnzy+UgCDe7yt4NAkP8igCjB
WzcIrqQYYAtux8iUDCdDH9WcPiL4ALCloNBDjjOlceOOfWKj6/DrnQ==
=7CvS
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/NYFqa49Z11w/m/QAMX_f3ljNAJ", "n_sections": 27}, {"thread": "QHDX1V1smYk", "msg": "redsNvt_f2AJ", "author": "David Hopwood", "date_disp": "Dec 6, 1999, 3:00:00\u202fAM", "subject": "DES ECB vs CBC", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Terry Powell wrote:
>
> I was wondering if anyone could help me with this problem.
>
> I've working on adding DES encryption to a wireless system.

Why DES? It's slow and vulnerable to brute-force. Use something like
Blowfish or CAST-128 instead. Also think about whether you need an
authentication mechanism; don't assume that is automatically provided
by encryption.

> Messages transmitted on this system are generally short, 1 to 256
> blocks. A lot of the messages are state-of-heath messages from the

> system thus there will be a lot of repetition in the plaintext data.


> My approach has been to use DES in CBC mode and transmit a 64 bit
> IV ahead of the encrypted message.

Sounds reasonable to me, as far as it goes.

> There has been some debate over using CBC mode in this system. The
> main objection is the addition of the IV.

Is the objection on grounds of bandwidth/message size? If so, you could
consider using an implicit IV generated from the message sequence number
(e.g. IV = Encrypt[K'](sequence #), where K' is a second key independent
of the encryption key). That assumes that the transmitter and receiver
will always be able to keep their sequence numbers synchronised, of
course.

> The alternative design presented to me is DES using EBC mode

I assume you mean ECB.

> and placing


> a varying sequence number in the plaintext. The proponents of this mode
> state that it is just as secure as CBC with a plaintext IV (some claim
> it to be "equivelent").

It isn't (equivalent, or as secure). It will not have the desired effect
of disguising patterns in the plaintext, other than in the specific block
where the number is added.

> I'm having trouble buying their argument. I can understand that adding

> the sequence to the plaintext in [ECB] mode enhances that mode's security,


> but it seems to me that every block in a message would need to treated
> in this manner to keep it secure.

Yes, you're right.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOEs/FjkCAxeYt5gVAQGC7Af/XjDp9i0yNflMVKdZsFpB05/pCgM7qR0J
nbzThty/XXM6k5Kn+8f2ELMSA82z+KLJ/i9/rndGyBuB/ozWsQizl7QtWVO+lGKs
UTOgatyAfvzdDImboEO72GSP+ek3ONRvC7J40NRI6jDe7KmrVglSiUcG9YEUn1ca
iqcMcEp1JrPL7LyFtArL0rOADkhSrA+Ns+HIyJT6JBEFTgVIs0wzev7GqXA1ukuk
A6kUtUyTpO1/HrtXiSxuenqjgfD4OMZ/2poXEw5qjAAP7aOzcLtgED+c0H5lXzRB
QzIVjoTG4MzsQySWQp2dc0DVQ16RUbNyPK3iXdEGpuEOwrq5Tuk8aQ==
=r5gB
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/QHDX1V1smYk/m/redsNvt_f2AJ", "n_sections": 4}, {"thread": "V2zW8wyTCqE", "msg": "tmQOWehu4wIJ", "author": "David Hopwood", "date_disp": "Dec 30, 1999, 3:00:00\u202fAM", "subject": "Data Encryption in Applet?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Law Wun Suen, Brian" wrote:
>

> Tim Wood wrote:
>
> > wrote in message <384BE1D4...@singnet.com.sg>...
> > >Hi
> > >
> > >I am looking for a way to encrypt data through an applet using symmetric
> > >(or asymmetric) encryption. I thought of sending an applet containing a
> > >symmetric key to a client.
> >
> > How? If the symmetric key is not encrypted when you send it, it could be
> > intercepted and used to read the, client side encrypted, data.
>
> I think if the application have to consider about the performance, better
> to use both (symmetric and asymmetric) encryption together. It really look
> like how the SSL work. You generate a random key (secret key) for the
> symmetric encryption and encrypt this securet key with your own private
> key. The client program receive the key and decrypt it by the public key.
> Then use that secret key for that sesssion communication.

This is no more secure than sending the applet containing a symmetric key.
If the applet can decrypt the key, so can an eavesdropper who decompiles
the applet.

Using SSL (both to load the applet and to send data back to the site) would
solve this problem, *provided* you trust that the browser root CAs will only
sign certificates from legitimate site owners, that include the correct
domain name.

(The user can, at least in principle, tell that a man-in-the-middle attack
has not occurred by looking at the site certificate. Unfortunately most
users don't look at this certificate, so the actual level of security
against active attacks is somewhat dubious. It should be secure against
passive attacks, though.)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOGrPDjkCAxeYt5gVAQEvTQgAuJSXL3cFbU/Uvwmgrnca2r2+7b7WIQMW
Ncs6r/yMm2A8r2kLoPFwmUINgyLbin/i4mM+qJf7OhHr3mKhGU+mXlUDEune34Zy
ws9OKNa4rymQfOZh3qhVh+mf6qeCnl1U9d/Nd9Hn/nvHB8O0oj/WdhwlbHkTslAj
ry5J0/ANo9+SC05YaPCsKL5InHeMveUft2Tv0y6RWCTrwnGVX4zMoP68Iyw+vhT1
8mkgtNllFH8JUrVItROyKX0eB5T+9vOqB1tWmrZeBsap/b0MBAW54VRee3tztDuK
C/byEcIDCWgHz32Nn56rQMpRSC7Id6TwJN78XMBiGjSZOrfmMoh/+A==
=DmHD
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/V2zW8wyTCqE/m/tmQOWehu4wIJ", "n_sections": 12}, {"thread": "YEzo1N3uIkk", "msg": "jxjQvqe4tr0J", "author": "David Hopwood", "date_disp": "Nov 21, 1999, 3:00:00\u202fAM", "subject": "REVIEW - Vulnerability of \"Password Protection\" Applets", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

[cross-posted to sci.crypt from comp.lang.java.security]

Michel Dalle wrote:
>
> You probably all know how insecure client-side applets can be. Here is
> a review of 14 so-called "Password Protection" applets that are supposed
> to protect access to webpages :
>
> http://gallery.uunet.be/Michel.Dalle/passappl.htm

[which says:]

# The following list contains a few of the readily available applets that
# are supposed to protect access to webpages from the client side, rather
# than from the server side. As you can imagine, they are all more or less
# easily broken into, so do not use them (unless you really have no other
# alternative on the server side).

Yep, I find it difficult to believe that people actually ask for real money
for these.

# And always remember that access to your 'hidden' pages is NOT protected
# on the server side, so don't use URLs that are too easy to guess !

Also note that every now and again someone finds another bug in some
commonly-used web server (IIS seems to be particularly susceptible), that
allows listing the contents of any directory.

# The vulnerability rating (V.R.) is given based on my personal perception
# of their vulnerability to hacking (-5 = too easy / -1 = OK for semi-
# private pages). For instance, applets where passwords and URLs are sent
# in clear text are given a rating of -5, applets where you need to guess
# the URL get a rating of -4, etc. For what it's worth, I could use some
# help from an amateur cryptographer to figure out how the applets with a
# rating of -1 could be broken :-)

Certainly :-). The only applet with a rating of -1 is PageSecure, which
is broken below:

import java.io.*;
import java.net.*;

/**
* A program to demonstrate the weakness of the URL encryption
* algorithm used by PageSecure (http://www.4cm.com/pagesecure/).
* <p>
* Usage:
* <pre>
* java PageSecureBreaker "resource file" ["prefix*suffix"]
* </pre>
*
* where "prefix" is a guess for the first three characters of the
* password, followed by the start of the secret URL to be found, and
* "suffix" is a guess for the end of this URL (e.g. ".html"). Use
* '?' for any characters that are not known. For example:
* <pre>
* java PageSecureBreaker "http://www.site.com/foo.rsc"
* "???http://www.site.com/*.html"
* </pre>
* <p>
* Technical description:
* <p>
* PageSecure uses a resource file containing an encrypted URL.
* This file normally has filetype .rsc, and is read from the
* URL given in the 'resourcename' parameter of the applet. Suppose
* the contents of the resource file have been read into the array
* 'filecontents'. The first step performed by the PageSecure applet
* is to undo some trivial obfuscation:
*
* <pre>
* byte xb = 0;
* for (int i = 0; i < filecontents.length; i++)
* xb ^= filecontents[i];
*
* for (int i = 0; i < filecontents.length; i++)
* filecontents[i] ^= xb;
*
* int len = (filecontents[4] << 8) + filecontents[5];
*
* // discard first 6 bytes, and truncate at the last null
* for (int i = len-1; i >= 0; i++) {
* if (filecontents[i+6] == 0) { len = i; break; }
* }
*
* byte[] encrypted = new byte[len];
* System.arraycopy(filecontents, 6, encrypted, 0, len);
* </pre>
*
* Since it is not password-dependent, the obfuscation adds no
* security; we just add the deobfuscation code to the attack.
* <p>
* The applet then calculates a weak hash of the password entered by
* the user (which will be used as a key for the URL encryption):
*
* <pre>
* byte[] password = ...;
* int key = 0xFFFAF14E;
* for (int i = 0; i < password.length; i++) {
* key = (key >>> 21) | (key << 11);
* key += password[i] *
* (((i + 14) % 11) - ((i + 17) % (7 << 19)));
* }
* </pre>
*
* [Note that the value of the expression involving i sometimes has
* trailing zeroes, so the LS bits of some of the password characters
* are ignored. However, the key is password-equivalent, and the
* encryption algorithm which uses this key is so weak that it isn't
* worth attacking the hash :-)]
* <p>
* The strength of the URL encryption is limited by the hash
* output size (i.e. at most 2^32 keys are possible), although
* there is a known plaintext attack much better than brute force,
* described below.
* <p>
* The URL decryption is done using code equivalent to:
* <p>
* <pre>
* for (int i = 0; i < len; i++) {
* int t = (encrypted[i] & 0xFF) - (key & 0x1F);
* if (t < 32) t += 95;
* decrypted[i] = t;
*
* key = (key >>> 29) | (key << 3);
* }
* </pre>
*
* I.e. for character index i, the key is rotated left by 3*i bits,
* and the low 5 bits are subtracted from the code of the ciphertext
* character. Obviously this is reversible: if we know the
* plaintext and ciphertext characters, we can find 5 bits of
* the key. (The adding of 95 for character codes below 32 just
* has the effect of shifting the plaintext alphabet so that
* it contains lower-case characters, but not control codes.)
* <p>
* In order to allow the entered password to be checked for
* validity, the plaintext starts with the first three characters
* of the password, i.e. the URL itself begins at index 3. [This
* is not a very good method of password checking, and may help us
* in the attack; see later.]
* <p>
* To break the encryption, we will use a known plaintext attack.
* Each known plaintext character at index i, yields the 5 bits
* of the key starting at bit position -3*i mod 32 (although for
* a string of consecutive characters, 2 bits per character will
* overlap).
* <p>
* For example, if the first three password characters are unknown,
* but the URL is 23 characters long, starts with "http://", and
* ends with ".html", then we can infer the key bits at the
* following positions (all ranges are inclusive):
* <pre>
* 'h' => bits 23..27 (index is 3; -3*3 mod 32 = 23)
* 't' => bits 20..24
* 't' => bits 17..21
* 'p' => bits 14..18
* ':' => bits 11..15
* '/' => bits 8..12
* '/' => bits 5.. 9
*
* '.' => bits 10..14 (index is 3+23-5 = 21; -3*21 mod 32 = 10)
* 'h' => bits 1.. 5
* 't' => bits 30..31 and 0..2
* 'm' => bits 27..31
* 'l' => bits 24..28
* </pre>
*
* I.e. all bits of the key are revealed, with overlaps that allow
* confirming that the known plaintext guess was correct. Sometimes
* we will not be as lucky as this, and some bit positions will be
* missing. (For example, if the URL is relative then the "http://"
* crib will not be available.) In that case, for each unknown
* character, the program will print all possibilities for that
* character, enclosed in curly brackets {}. It may then be possible
* to guess further plaintext, and repeat the attack. Note that the
* first three characters are the start of the password, which may
* also help in the guessing process.
* <p>
* Copyright (c) November 1999 David Hopwood.
* This code may be freely redistributed or modified for any purpose
* provided that this comment, including the technical description
* above, is retained in full.
* <p>
* Based on a decompilation of PageSecure.class by JAD v1.5.5.3.
* JAD is copyright 1997-98 Pavel Kouznetsov, and is available from
* http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
*
* @author David Hopwood
*/
class PageSecureBreaker {
private static final boolean DEBUG = false;

public static void main(String[] args) {
if (args.length < 1) {
System.out.println("Usage: java PageSecureBreaker " +
"\\"resource file\\" [\\"prefix*suffix\\"]\\n" +
"See source comments for more details.");
return;
}

String resource = args[0];
String pattern = args.length >= 2 ? args[1]
: "???http://*.html";
String prefix, suffix;

int star = pattern.lastIndexOf('*');
if (star == -1) {
prefix = pattern;
suffix = "";
} else {
prefix = pattern.substring(0, star);
suffix = pattern.substring(star+1);
}

DataInputStream dis;
byte[] filecontents;

try {
dis = new DataInputStream(new FileInputStream(resource));
} catch (IOException ioe) {
try {
URL url = new URL(resource);
dis = new DataInputStream(url.openStream());
} catch (Exception e) {
ioe.printStackTrace();
e.printStackTrace();
return;
}
}
try {
filecontents = new byte[dis.readInt()];
dis.readFully(filecontents);
} catch (IOException ioe) {
ioe.printStackTrace();
return;
} finally {
try { dis.close(); } catch (IOException e) {}
}

attack(filecontents, prefix, suffix);
}

public static void attack(byte[] filecontents, String prefix,
String suffix) {
if (DEBUG) System.out.println("filecontents = " +
toHex(filecontents, 0, filecontents.length));

byte xb = 0;
for (int i = 0; i < filecontents.length; i++)
xb ^= filecontents[i];

for (int i = 0; i < filecontents.length; i++)
filecontents[i] ^= xb;

int len = (filecontents[4] << 8) + filecontents[5];

// discard first 6 bytes, and truncate at the last null
for (int i = len-1; i >= 0; i++) {
if (filecontents[i+6] == 0) { len = i; break; }
}

byte[] encrypted = new byte[len];
System.arraycopy(filecontents, 6, encrypted, 0, len);

byte[] known = new byte[len];
int plen = prefix.length(),
slen = suffix.length();

if (plen + slen > len) {
System.out.println("Known plaintext pattern is too " +
"long (should be " + len + " characters).");
return;
}

prefix.getBytes(0, plen, known, 0);
for (int i = plen; i < len - slen; i++)
known[i] = (byte)'?';

suffix.getBytes(0, slen, known, len - slen);

System.out.println("encrypted = " + toHex(encrypted, 0, len));
System.out.println("known = \\"" + new String(known) + "\\"");

int key = 0; // inferred key (unknown bits are 0)
int mask = 0; // records which bits are known
int inconsistent = 0; // number of inconsistent characters

for (int i = 0; i < len; i++) {
if (known[i] != (byte)'?') {
int t = (encrypted[i] - known[i]) & 0xFF;
if (t >= 32) t = (t + 95) & 0xFF;

if (DEBUG) System.out.print("i = " + i + ", t = " + t + ",\\tkey = " +
toBinary(mask, key) + " => ");
if (t >= 32 || (key & 0x1F) != (t & mask)) {
// inferred bits do not match bits that are
// already known.
inconsistent++;
if (DEBUG) System.out.println("inconsistent = " + inconsistent);
} else {
mask |= 0x1F;
key |= t;
if (DEBUG) System.out.println("key = " + toBinary(mask, key));
}
}

key = (key >>> 29) | (key << 3);
mask = (mask >>> 29) | (mask << 3);
}
mask = (mask >>> (3*len)) | (mask << (-3*len));
key = (key >>> (3*len)) | (key << (-3*len));

System.out.println("key = " + toBinary(mask, key));

// decrypt using the inferred key.
for (int i = 0; i < len; i++) {
if ((mask & 0x1F) == 0x1F) {
int t = (encrypted[i] & 0xFF) - (key & 0x1F);
if (t < 32) t += 95;
System.out.print((char) t);
} else {
System.out.print("\\n{");
for (int k = 32; k < 127; k++) {
int t = (encrypted[i] - k) & 0xFF;
if (t >= 32) t = (t + 95) & 0xFF;

if (t < 32 && (key & 0x1F) == (t & mask))
System.out.print((char) k);
}
System.out.print("}");
}

key = (key >>> 29) | (key << 3);
mask = (mask >>> 29) | (mask << 3);
}
System.out.println();

if (inconsistent > 0)
System.out.println(inconsistent +
" inconsistent characters in known plaintext.");
}

public static String toBinary(int mask, int value) {
StringBuffer sb = new StringBuffer();

for (int b = 0; b < 32; b++) {
if ((mask >>> 31) == 0) {
sb.append('?');
} else {
sb.append((char)('0' + (value >>> 31)));
}
mask <<= 1;
value <<= 1;
}
return sb.toString();
}

private static final char[] hexDigits = {
'0','1','2','3','4','5','6','7',
'8','9','A','B','C','D','E','F'
};

public static String toHex(byte[] ba, int offset, int length) {
char[] buf = new char[length * 2];
int j = 0;
int k;

for (int i = offset; i < offset + length; i++) {
k = ba[i];
buf[j++] = hexDigits[(k >>> 4) & 0x0F];
buf[j++] = hexDigits[ k & 0x0F];
}
return new String(buf);
}
}

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBODenITkCAxeYt5gVAQFzkAf6AhfoNf8rGYru6GieShsn8WAeD/3JSQhg
gtZpsdTk7PXsf7xX6QmfpHeEynKNpfDAlBEOpDfWMhBp3ja8JTF/pjNtZvk87F7C
cMJ9AOZCvQYn+6hvm0GiB2CAN2EqkleOrgI0J5WwOsmx7IcKpxz49ZOrYZPCXAv+
LAjVC7q2Rx6I6/Ow6fZp2DAzxq0ELgSY9T3hdfNkr8wsY7OZbvl1sYzSAcextjIx
wpgxhKNQBhbnQAQWW8OFzumZpeM7w5udZQJ5cWBf7/GO1J7Jv4S5eWDFdf+J5gse
7esMhKW85BPcjmCCXm2E/B2+TTwWr9PagSyEEl86M3HZT8rlsuB96A==
=83+Y
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/YEzo1N3uIkk/m/jxjQvqe4tr0J", "n_sections": 1}, {"thread": "YxOfLPo969o", "msg": "MmO6BFcgXpcJ", "author": "David Hopwood", "date_disp": "Dec 30, 1999, 3:00:00\u202fAM", "subject": "Ellison/Schneier article on Risks of PKI", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tim Wood wrote:
>
> I have found that you can enter a trusted root authority into Internet
> Explorer by simply adjusting the NT System Registry at
>
> HKEY_CURRENT_USER/Software/Microsoft/SystemCertificates/Root/Certificates

> ...
> then the fingerprint of the certificate.

The default registry permissions in NT Workstation are a joke. It's not
just CryptoAPI; effectively any process with INTERACTIVE permissions
(i.e. anything running in a login session, including such things as
ActiveX controls and code that runs as a result of buffer overflows,
Java exploits, macro viruses, etc.) is allowed to do anything it likes.

In general, you should assume that NT provides no more security than
Win95/98, and that this is never likely to improve (the problems have
actually got considerably worse since 3.51, and are now deeply embedded
in the design).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOGrIHTkCAxeYt5gVAQH+ewf/doBIpn8CxZgmU/zihtQhzvXmvE4OiUo/
3vYsmFG9HxbdI358qNfWmRmvmpk+YrtfOSUIr7zKm6hYKokDqCJPq1LzXHcKrwuR
oHYmws9DOmEgAzCw/3Zig7xWfwrhubcqzIFq9N1dBTiClwfqOJkGRYD+oqshk/hi
eLv4KOt3J/rmF7BbUfOPaYHu7C7r6e10Xfs/Wzjx3LSgKQ3XAO5+4ilO35TGiSXN
k6V2zZmhlE7pQBPEmh08R50qwIYdtqwKrSuAChPvJmtGU8J9/hYdHkuKLFsTMId1
2OpSqvaSvtJZsFXpG2KUzti6husuvXwkWByf4wDC4IWMkQ1X23POoA==
=2d7M
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/YxOfLPo969o/m/MmO6BFcgXpcJ", "n_sections": 13}, {"thread": "d9qyPs4bdTM", "msg": "dAanCk8yvHQJ", "author": "David Hopwood", "date_disp": "Dec 17, 1999, 3:00:00\u202fAM", "subject": "The Code Book", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Warner wrote:
>
> The first sentence of Simon Singh's _The Code Book_ is, "On the morning
> of Wednesday, 15 October 1586, Queen Mary entered the crowded courtroom
> of Fotheringhay Castle". The calendars I have referred to give this date
> as being on a Saturday. I'm interested in hearing comments on this
> apparent inconsistency or references to such.

Are you sure that the calendars you referred to are using Julian dates?
(Most of Europe changed to the Gregorian calendar in 1582; Britain waited
until 1753, IIRC.)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOFnE1TkCAxeYt5gVAQFdbggAp1bWm5/K4YeXCHCvsRaWAP/nBlWMws8w
DIvr1L+00Qb83f2rP+UZ6Q8KDw+j8E1sxB8ZPTiSSk9Hxbj9DAzcg3/xGLP/2qsA
8zWr/8Whwoc5sNgZoPrc9SgNCI8dWG76fh8UcvyD3dV9keULA30VjBjzwaMaq2EK
CFsiniZd+xwfQn2NPeILkQeqKX5wO2RTjI59G9hqjs9vHEes9hVTRy+UhNXla3mw
ARKdmZTxXJXqpGTCiR49Mus7aR95GtaObFwxupZ4ybkgagB1VjujbPBwXj8/noox
t+yBepbhx45eUl2SUk4JCd/2ZTE5WLc7vkbLwOl++TWAGYrez3JHaA==
=XxFC
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/d9qyPs4bdTM/m/dAanCk8yvHQJ", "n_sections": 9}, {"thread": "hY7zYICK2BM", "msg": "dWW1Sfh-DIoJ", "author": "David Hopwood", "date_disp": "Dec 1, 1999, 3:00:00\u202fAM", "subject": "Cryptological discovery, rediscovery, or fantasy?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Lyal Collins wrote:
>
> It's also very easy to use on-time symmetric keys that can never be
> recovered even if the user does provide the password.
>
> If every use of the password results in a new key, then the password
> is of no use in recovering prior messages.

That doesn't necessarily follow. It is true only for cryptosystems that
provide perfect forward secrecy.

> If only the recipient can decode the message, then you need to trust
> your recipient to not disclose the contents.
>
> And, this is easy to achieve by either symmetric or public key based
> techniques without the overhead of handshaking.

Perfect forward secrecy is typically only achievable in systems that use
public key techniques, and some kind of handshaking (i.e. two-way
communication) - although the handshaking may be spread over more than
one message not sent at the same time.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOESdZTkCAxeYt5gVAQEUYwgAwzujkKBTZZ5eualvHxkQbAVW9B4H0j7w
71Kc9tBfhYtC1fRkxWACzGMakqbMI2gmUojC5LiMgIhHyNrPu0svamKm8bEorFum
lGPtI/JfNGdwgyh5BXnvfGEfutSiUYWRIDu9+REWzj9kHRRMtDLFy4y9vNvsrMVT
VwLGYlSWQizEH22jM+PrPC/3GRGbMjVmNdsQ9G6xrvUZztDKo1dhx92K3ZfqRL8C
+681nRiUYxCsZF0RguT8PA87KloaG28lCS1UW+sm5I4pZfOnV3cwSwHAx+1QA8BL
sGVBEFYDX7nGVvNO55H3AgJcu+ex3r16793QCE9b2p9dK1e3ksHDSA==
=X34i
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/hY7zYICK2BM/m/dWW1Sfh-DIoJ", "n_sections": 18}, {"thread": "s3-t2GCn19w", "msg": "XeWImVUoyacJ", "author": "David Hopwood", "date_disp": "Dec 30, 1999, 3:00:00\u202fAM", "subject": "Questions about message digest functions", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tim Tyler wrote:
>
> In sci.crypt, lordcow77 wrote:
> > <t...@cryogen.com> wrote:
>

> > > Hash functions may be made from block cyphers.
> > > Block cyphers are reversible. Consequently,
> > > a message hash of a message with the hash
> > > size, the block size and the message size all

> > > equal will be a bijection. [...]
[...]


> > The construction that transforms a block
> > cipher cryptographic primative into a hash
> > function should destroy the bijectiveness of
> > the block cipher.

This is correct.

> No. You are mistaken.
>
> Consider a common technique of transforming a
> block cypher into a hash:
>
> Apply the block cypher in a chaining mode to
> the message. Take the last block of cyphertext as
> the hash.

I don't know about it being "a common technique", but I
certainly wouldn't use it.

You're presumably using the block cipher with a known
key, K (otherwise it would be a MAC, not a hash). For
concreteness assume CBC as the chaining mode. Suppose the
attacker wants to find a plaintext M' similar to M, which
hashes to a predetermined value R. For this hash he/she
can use M' = M || (D[K](R) XOR H(M)). That doesn't look
like a good property for a hash to have, to me.

> When applied to a single block, this *retains* the
> bijective nature of the block cypher. This
> is, in fact, a useful thing for it to do.

Why? Just because there are no collisions between
messages of a specific length, doesn't mean that it is
difficult to find collisions between messages of that
length and a different length. I can't think of many
applications where this limited form of collision-freedom
would gain you anything.

> > A hash function should be indistinguishble from
> > a random function, not random permutation.
>
> No. You are mistaken.
>
> No hash function should *ever* be
> indistinguashable from a random function.
>
> If it /does/ have the characteristics of a random
> function, this means hash collisions are more likely
> to occur - and consequently easier to find - than
> they could be.
>
> The whole point of hashing is to make finding hash
> collisions as difficult as possible.

No it isn't. "lordcow77" is perfectly correct; a hash should
approximate a PRF (Psuedo Random Function). Also, there are
other desirable properties of a hash than collision resistance
(notably pre-image and 2nd pre-image resistance).

If for some application we needed a function that, when applied
to fixed-length inputs, *cannot* result in collisions, we should
use a PRP, not a hash.

[...]


> Can you remember how you arrived at the mistaken
> idea that hashes should simulate random functions?
>
> Has anyone else apart from you ever claimed this?

See, for example:

M. Bellare and P. Rogaway,
"Random Oracles are practical: a paradigm for designing efficient
protocols",
1st ACM Conference on Computer and Communications Security,
62-73, ACM Press, 1993.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOGrN5DkCAxeYt5gVAQGUeggAhST//vpr8xDymYe+NlxjwY9HvRfQMt9T
1rMDkNMVwpADXGmnUIZ/7egptDBkc26ixHRZbkhQAc+Vi2N8Mg/3T6Z//IgKRFJz
3xf88SYxW958ztBH9/JmcvQskyBWq8EKSEZVqCxlyZLioi6UZ2hJQEYzXF2y4uQZ
KLU1xF/Gq5/7nLVij5ejEVdCwxbN41fao54oKh81b4GYlYcWBl0iu0r8+TLq9MBR
X7i0UFaOZzaeBWkRCnSFoRBmduUnrhr8sJCi2K0PgwaSG5YvarODAn6ii8bFF8K4
qzWvKk9BucFXmiXh3tuqrkbSyFEMeEBEhxMK+jPtdaNH+jrjHAZYIQ==
=1UpT
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/s3-t2GCn19w/m/XeWImVUoyacJ", "n_sections": 55}, {"thread": "s3-t2GCn19w", "msg": "eV4NoPbUSFQJ", "author": "David Hopwood", "date_disp": "Jan 11, 2000, 3:00:00\u202fAM", "subject": "Questions about message digest functions", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tim Tyler wrote:
>
> Matt Timmermans <mtim...@opentext.nospam-remove.com> wrote:
>
> : I missed the start of this thread, but as far as I know, there are no

> : known one-way permutations that can be shown to be permutations -- do


> : you actually know of one, Tim?
>

> What about the one I propsed in a post on this thread in which I quoted
> from section 18.12 of Schneier's "Applied Cryptography"?
>
> : For instance: If I publish an RSA modulus and public exponent as a PRP,
> : how do I show that it _is_ a permutation without revealing private
> : information, at which point it would cease to be one-way?
>
> As I understand it, RSA-based block cyphers can losslessly encode
> information from a message in the same number of bits as are present in
> the message.
>
> I don't see how can this fail to be a bijection when used as a hash (i.e.
> by destroying the private key) - when hash size, message size and block
> size are all equal?

You're missing Matt Timmerman's point. The person who generated the
RSA modulus and exponent may know that this is a PRP, but no-one else is
able to verify that a valid RSA public key is being used (specifically,
they cannot check that gcd(e, phi(n)) = 1 because they don't know phi(n)).

In general, a trapdoor function with the trapdoor information discarded
is *not* necessarily usable in the same contexts as a public function.

> When you use RSA to encrypt, you can decrypt again and recover the
> original message. If you can do this for all possible files of a given
> length, and the size of the domain is equal to the size of the range,
> what other possible maps could there be, besides a bijection?

Think about what happens if e and phi(n) are not relatively prime.

> Also, (to answer your question another way) hashes of individual messages
> could be computed with the public key.
>
> In principle this would allow a demonstration that the map was a
> permutation by exhaustively going through all the possible messages
> of the given length, and seeing if there are any hash collisions.

Cough, splutter! That's rather a lot of messages.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOHq8RDkCAxeYt5gVAQE8KQgAko2GXlTRFXNiz48Y+Jo+AXDwiE96mmi+
33Xf1AwOAEDfqJMgZvDZsdDRtUi1+DgmxAGXUJdZuwK8cNn1EMvHryMWfP92XehK
Ej6sn4FND1pf39BlIMXgYKCafB1NC2lE53d8BQf6b75e3ODAoDbdcU0GTqzY8dQg
+81egrlLWe3fo28zKA/+B3vl5Ne1YRN+0NADplBubxMde0DpTNmDKX7aoRfDUCb4
4aQGYyn+JqwJdSY6x4v81w4hMLWboOqqh1/jBQBFFBN/o+NWbsDYubv1pwyNlMHu
JBZHeg8aG/IghUZ5U0JQtg9wnKp5MoGo8R2FphQuWBxxOc/awiwOJA==
=LH9h
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/s3-t2GCn19w/m/eV4NoPbUSFQJ", "n_sections": 55}, {"thread": "voZeeAfH1zo", "msg": "Su9_p4s95WUJ", "author": "David Hopwood", "date_disp": "Dec 20, 1999, 3:00:00\u202fAM", "subject": "Cryptanalysis", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

steve.b...@altavista.net wrote:
>
> I'm doing a paper on Cryptography and It's Affect On The Information

^^^^ should be Its


> Age. It's mostly about crypto in regards to current US law,

Now is not a particularly good time to do that, bearing in mind that the
law appears to be going to change quite radically in January (although
we don't have the full details yet).

> however, I have a brief primer on crypto in the first few pages.

> I need to source everything that is not an opinion. I remember reading
> something a few weeks ago about how cryptosystems are often created to


> meet a purpose and you wouldn't use a difficult cryptosystem to apply
> to a message to send info that will expire in one week.

You may have read that, but you should also be aware that many practicing
cryptographers strongly disagree with it. Here are five reasons why:

1. The length of time to break an algorithm (if it is feasible to break)
depends on how much processing power the attacker has, which in
general you don't know. It's not possible to create a cryptosystem
that is 'only just strong enough' to last a particular length of time.
We (that is, the public cryptographic community, and probably the
private one as well) don't even know how to create a system that is
'only just strong enough' to require a given amount of work to break.
In that situation, the only sensible strategy is over-engineering.

2. Historically, algorithms that were not designed from the start to have
conservative security goals have fared very poorly. If they are broken,
they tend to be broken catastrophically.

3. For symmetric crypto, in particular, it costs very little if anything
to use a very strong algorithm as opposed to a weak algorithm, or as
opposed to one that seems to be on the edge of being breakable. For
public key algorithms, longer keys do require more processing time,
but you can choose *very* conservative key lengths and well-respected
algorithms, and still have the encryption (or signature verification,
or whatever) taking only a small fraction of a second per message on
a low-end PC.

4. Often parts of cryptosystems are re-used for a different purpose to the
one the designer or specifiers originally intended, or the value of the
messages that are sent increases, or their value was underestimated in the
first place. It is more productive to design general purpose protocols,
algorithms, key management systems, etc., and to apply the limited amount
of available time and expertise of cryptanalysts on those relatively
few systems, than for every application writer to "roll their own" - and
it is a demonstrable fact that the results are usually more secure. (This
approach also has other advantages such as promoting interoperability
between applications.)
A general-purpose system must be capable of protecting data of very high
value and long lifespan, but it seems to be much easier to do this than
to design and analyse lots of application-specific systems independently.

5. Part of the value of crypto is determined by the trust that its user
base places in it. It's not sufficient for a system to be 'secure enough'
in the designer's opinion; it has to be *demonstrably* secure to the
satisfaction of its users (who, unless there is only one user, will have
different levels of paranoia or security awareness).
If you design a cryptosystem that is less secure than you could have
made it, you are asking for someone to point out, often loudly and
publically, that it is not secure enough for them - or even worse, to
claim that you deliberately weakened it.


For providers of cryptography who are:
- based in the U.S., and
- want to export their product, and
- are not prepared to jump through the hoop of printing out source and
getting it scanned overseas, or who have a closed-source product, and
- accept that their export market is going to be limited by the fact
that us foreigners are well aware that crypto that goes through the
current U.S. export process is weak,

there was possibly an argument for using crypto that is "not difficult".
But it looks as though even that argument might go away soon.

> My line is "The basic theory is to make a cryptosystem which can be
> applied with the least amount of effort but is impractical to break
> before the information becomes irrelevant using the currently available
> equipment."

As a general strategy this is a fundamentally bad idea. To summarise the
most important (IMHO) of the reasons above:

- You may overestimate how impractical the cryptosystem is to break. It
is very easy to do this unless you apply a generous safety margin,
paying particular attention to possible weak links.
- The amount of effort needed to make it impractical to *ever* break
the cryptosystem (at least by a cryptanalytic or brute-force attack)
is probably not much greater than the "least amount of effort" as
defined above.

> I need to source that, anyone know a web page, book, magazine article,
> etc which covers the above? I can't remember for anything where I saw
> that info.

I've noticed that there are far too many papers recently that decide
what the conclusion should be before doing any research. :-(

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOF2qazkCAxeYt5gVAQF4kgf/U5QS9P8ZdnxM5UAA8f7RgwrhO0tHvR+z
IwMlPF3Lj47rY4A1xl9eljrnt97P/tLB7Fl4jtWvBDKCjP9menJMqlvqMefBF1jP
UULr099jH4Rj1WrcGqkybTknbSkkPzK4iktvVsc4rU+cFoRXDIInS7t2jUVsWlzG
qiNy7AGLHM9lTDPdL9zVo8neg+wZ0XXEyoZ2mhM1g729Bam4GMxRlqvxaWxbF8kP
ghG0/mFJKIclupKqiSj9fLpVYta7ZD0eEgxYqgjZwppr/ajkCuGgWTgCtECAOcby
qnQolfnrcYnn4o7PfVYin2Bd+BSGAf2am8yGbkn59TUPA6ZcdMhSqA==
=WFeP
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/voZeeAfH1zo/m/Su9_p4s95WUJ", "n_sections": 11}, {"thread": "2eqY5CelrAU", "msg": "5H6RxlJhPs4J", "author": "David Hopwood", "date_disp": "Feb 20, 2000, 3:00:00\u202fAM", "subject": "EOF in cipher???", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Trevor Jackson, III" wrote:


> "Douglas A. Gwyn" wrote:
> > "Trevor Jackson, III" wrote:

> > > Mok-Kong Shen wrote:
> > > > I am ignorant of what the C standard specifies. Question: Does
> > > > 'binary' require the file to be multiple of words or just any
> > > > multiple of bytes will do? Thanks.

> > > Neither. The elements written to files are characters. Sometimes
> > > (usually) that means bytes.
> >
> > Wrong. Bytes are written to binary files, characters to text files.
>

> Interesting. Tell me, just how do they do that on a machine that doesn't
> _have_ bytes?
>
> Don't go so far out of your way to "correct" me that you end up asserting
> something completely stupid.

*All* machines that support C and its file I/O libraries use bytes, in the
sense that C programs running on that machine (and programs in other
languages with similar file semantics) are guaranteed to be able to write
sequences of 8-bit bytes - capable of representing integers from 0..255 -
to a file in binary mode and read them back again.

Note that this is true regardless of the size of char and unsigned char, or
the sizes of integers that can be manipulated by the processor(s), or what
character encoding(s) are supported by the C compiler and operating system.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOK9b1DkCAxeYt5gVAQEhNwf/e9guoJl0/bqW/EMnewyu3zJxMN3huMTE
dSVCMNoLDGc3/GraleeK7mN/o7Z55txSjhZfMpLmAFWZv6KsY1B3C/WgJ/WyRq9g
85BgQT5UU8zB96AEgyj7wvxETLBfd0ilaB+dqVkzOMO0By9GObcYZ4q3aSNXzqCj
CYRxi6M8/DcLZ5w1seOEaakKuOGJXdMb+A/QYa3Q1oiONHXsKMSyDRZRgycfekKk
RpoMOS55tLtuuNXOMvEMpBUv7md+fnSDIuSmCYYeHvQdSlru+vHdobDTgQCoB9Wc
u5Nn6tN2kCOfCqyBmfERR28RJRnQCWAhxvhbW8fYInp3NtugzSLVHA==
=ON7G
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2eqY5CelrAU/m/5H6RxlJhPs4J", "n_sections": 77}, {"thread": "2eqY5CelrAU", "msg": "R9SJN6-dGm8J", "author": "David Hopwood", "date_disp": "Feb 20, 2000, 3:00:00\u202fAM", "subject": "EOF in cipher???", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Trevor Jackson, III" wrote:
> Mok-Kong Shen wrote:
> > Stephen Houchen wrote:
> >
> > > If you're programming in C, open the file as "binary" (mode "rb", for
> > > example).


> >
> > I am ignorant of what the C standard specifies. Question: Does
> > 'binary' require the file to be multiple of words or just any multiple
> > of bytes will do? Thanks.

The latter.

> Neither. The elements written to files are characters.
> Sometimes (usually) that means bytes.

The elements written to files in binary mode are required to be able
to represent the values 0..255, and are not required to be able to be
able to represent any other values. In that sense they are (always)
8-bit bytes.

Technically, it would be possible for a conforming C implementation to
map a binary file to a sequence of storage elements of size > 8 bits, but
even in that case, the specified abstraction is still a sequence of 8-bit
bytes. I.e. whenever the file is read back in binary mode by a C program
(or a program written in a language with similar file semantics, such as
C++, Java, etc.), the elements are only guaranteed to be read correctly
as 8-bit values.

This is not just a semantic issue: there are some standards which do use
sequences of characters (e-mail and Usenet messages, for example), as well
as those that use bytes (TCP/IP, ASN.1, etc.), and the differences are
quite significant.

It is implementation-defined what the maximum file length is, and whether
zero-length files exist.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOK9s8TkCAxeYt5gVAQFRLQgAwPNezg4eUX3uyZI42dlKRCvbmVwFOF4W
cqS4MqFxSpy++0G4C99Fnma1E1tSCOiYZe342HW++78M/BwuptnlyneJqrqd17Gm
mhVOgplUJU0PCV0iZb23gdF9llG2Lp0YwXVP1YjHD9UJP5mLqNFRIwzWi+3E2cIS
CQSPOAdx9exK7PINEPHDMdOBhi1WEpXtpnROE5u4pW0+HKHPFuB/lGbt8CZ51PkU
XfIiqiIjqT1BW3LQpVQByr6okRW4++THqtEnePNywso2i/tyWBZqKeauNbqzBBzp
3QTMiFnva0aHEH/n2lkaj8njgG1te1cUiOGf1DaA2uIsRZnzzd10Ng==
=P/V/
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2eqY5CelrAU/m/R9SJN6-dGm8J", "n_sections": 77}, {"thread": "2eqY5CelrAU", "msg": "IrJdJb4GWgAJ", "author": "David Hopwood", "date_disp": "Feb 20, 2000, 3:00:00\u202fAM", "subject": "EOF in cipher???", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Runu Knips wrote:
> "Trevor Jackson, III" schrieb:


> > "Douglas A. Gwyn" wrote:
> > > "Trevor Jackson, III" wrote:

> > > > Runu Knips wrote:
> > > > > EOF works well, because EOF is defined to be -1, while all
> > > > > characters are returned as nonnegative values.

> > > > This is _completely_ off topic. But the last statement is
> > > > completely false. The signedness of characters is implementation
> > > > defined. Thus on some systems characters are signed.
> > >
> > > No, first of all you mean char type, not characters.
> > > Secondly, the standard I/O functions such as getc deal with
> > > the data as unsigned char. So long as sizeof(char) < sizeof(int),
> > > which is practically always the case, EOF (-1) can never result
> > > from inputting any data value, even when char is a signed type.
> > >
> > > Please stop giving bad C advice!
> >

> > You are out of line again. The original statement was that "all
> > characters are returned as nonnegative values". That statement was
> > false.
>

> That statement is true. It's exactly what the standard says.

Yes (characters returned from getc, that is).

> > And there are machines where EOf != -1 and some where sizeof(char) ==
> > sizeof(int). I've worked on them.
>

> That's both against the standard. ISO specifies that int must be at
> least 16 bit (i.e. it says short must be 16 bit, and sizeof(int) >=
> sizeof(short), which means int is also at least 16 bit). A character


> value, however, is the smallest type which has at least 7 bit.

No, this is wrong (apart from the second sentence).
unsigned char must be able to represent at least the values 0..255,
so it cannot be 7 bit. Also, the sizes of char and unsigned char could
be >= 16 bit, and equal to that of int.

However, on all machines, *it is only possible to rely on files being
able to represent sequences of unsigned 8-bit values*. Therefore, the
issue of whether putc(...) ever returns < 0 for a valid input character
would not arise in any well-designed system, regardless of the sizes
of int, char, and unsigned char, and however obscure or broken the C
implementation.

[Technically it might be possible to construct, perhaps using operating
system tools, a file containing elements that will be read from getc in
binary mode as values outside the range 0..255. However, since no sane
design would generate such files deliberately, it doesn't really matter
how this is interpreted, as long as the program doesn't do something
insecure as a result. Treating the first such element as equivalent to
end-of-file would be perfectly reasonable, as would taking the least
significant 8 bits.]

IOW, all of the following code snippets will work, regardless of the
compiler (although the first is probably the clearest in terms of style):

1. int c;
while ((c = getc(in)) != EOF) ...

2. int c;
while ((c = getc(in)) >= 0) ...

3. int c;
while ((c = getc(in)) >= 0 && c <= 255) ...

FWIW, the only other person who has consistently given sound advice and
error-free information in this subthread is Doug Gwyn. It's easy to see
how newbies could get into bad programming habits by listening to advice
given on Usenet.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOK9t7DkCAxeYt5gVAQHLhQf8DMeYnRjkF7WXa+xiSFHqFER+qIp7LN4k
YwjMcK8G14uaSrPJJAxjSNJobE+aj35hpe/yTHg46fEyanJU8OntWcPhMz0Vm++j
DAdYZ+EA1GkL8JTixq43Hd0hQxtDx7NqZZb2MeUxb7COj5PxT31K6p6jH2I2FmZ3
Orj0gQpNkw3B90TAn6ALE0iZtFNFeESU4rogw0WIuZ5UT0M3zM00y3jh/iRuus6J
FlpHR3KpmXFpXlCO4ItQiS/g/o7lftZBqJaCg6dD3FApMSMwXnf4LIGHnHV2R5Yz
d8kdX1VbPpftB/zP0FOXf0ZH8pz5MtfBERhfZ2NUTX3bqdS01shjlQ==
=Dy57
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/2eqY5CelrAU/m/IrJdJb4GWgAJ", "n_sections": 77}, {"thread": "9nbHmm50ch8", "msg": "pjQiUTfh_fcJ", "author": "David Hopwood", "date_disp": "Feb 24, 2000, 3:00:00\u202fAM", "subject": "US secret agents work at Microsoft claims French intelligence report", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Dave Hazelwood wrote:
> According to the report, "it would seem that the creation of Microsoft
> was largely supported, not least financially, by the NSA, and that IBM
> was made to accept the (Microsoft) MS-DOS operating system by the same

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> administration".

So the NSA really are the bad guys :-)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOLSpiDkCAxeYt5gVAQG8wAf+OFb3uxGtyx6ziqR3Wbv4t6tny1vP8GNL
W+vQigp20ZdC+hWSJW7MSZO3IkgMO9pcsMtuonD+qdFPDyO5ex9QMlrY0j2Bk8he
B8QkQ5iVXo6E0ERk9qDuXga94ohdwL2WnQFmtNz1bnCPQJUbP8Kv4d0LQjpy72Gp
wCyafm0wIpLIpY638nLGad2N1ylPV9HAVKMaMpo5pdUw9RamJxXDs7qVWq7Gh8m+
nzZEtWlkH18Kx7WjaAmHLduKaAYvZNPmt0ZKHeRI5khNGw6tXvF9UoMysUY+zS3L
1gZ72vVv79Qa0EBUrn9by2Hex69vNkt0RdTRyrhREkZH3QDVt7LjFw==
=4eGe
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/9nbHmm50ch8/m/pjQiUTfh_fcJ", "n_sections": 16}, {"thread": "BDCdcdH4eNo", "msg": "mbjL4D4QOQAJ", "author": "David Hopwood", "date_disp": "Mar 10, 2000, 3:00:00\u202fAM", "subject": "SHA-1 and Patents confusion with Hitachi", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Gittins wrote:
> I am somewhat confused.
[...]


> Hitachi, Ltd., Intellectual Property Office
> http://grouper.ieee.org/groups/1363/letters/Hitachi.txt

Ignore Hitachi's patent claims on SHA-1; they are thoroughly bogus.

> similar issue with RIPEMED-160 by its authors.
> http://grouper.ieee.org/groups/1363/letters/Bosselaers.txt

Again, the Hitachi claim doesn't appear to me to have any relation
to RIPEMD-160.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMlB9TkCAxeYt5gVAQEPWQgAiEGz3Zki70CkOLMYIUPz7nRfy/s3foVQ
us3fz+KqrFOru8o0KE3g6xHqMlREwPVDKynbEI0D/pRHq+50GsvDOrgsI6fP6N65
DaUQVBYngIlgyrwTTDceRvq++O0TLwNVNzIjv+5bUz0/NNe8hINcUX3oS3ZXj1z2
sVgVPNoKST8l/7nRv9yhQJdI13Q/xcZxLEWUzm4Etdd2A3WLve5cdVeOyt7p0PTi
thZ2djZnSYFZXHfELkiYPQo7GalvM0cgljFo3iWGWc6UAm63Emfiy1A0z5xeYfyH
f+gmjaoxgeUf6Z5TFGdz0C3VXhtt5XcITHFwXl4LO96/PV3X8DmAcQ==
=KLO6
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/BDCdcdH4eNo/m/mbjL4D4QOQAJ", "n_sections": 5}, {"thread": "BTTsXiPJ69Y", "msg": "g9Y_rsQ93mIJ", "author": "David Hopwood", "date_disp": "Mar 10, 2000, 3:00:00\u202fAM", "subject": "I have found that RC4 stinks..", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Nemo psj wrote:
>
> Recently i have been working on a stream cypher i have created this
> cyphers strength comes from parts of the enigma machines setup and part of the
> programs ability to change the password after encrypting each letter. So i
> decided along with some suggestions from people to include in the password
> change a more well tested and known algy. So i pick up an implementation of
> RC4 and try to incorpaereate it. Unfortunatly i find it has a giant flaw if
> your try to continuasly encrypt something like "&#$#!!~$\u00d76\u00ec" with somehting
> like "))_+{}<?><@(^\u00bc" it will eventually return "".

I'm not certain how VB6 stores strings, but I suspect that they are null-
terminated. Therefore, whenever the ciphertext includes a zero byte (which
will happen with 1/256 probability for each byte), the string is truncated.
Eventually (when the first ciphertext byte is zero) it will be truncated
to "".

If this is the right explanation, it means that you can't use a string in VB
to represent a byte sequence, so whoever wrote the code you posted didn't
know what they were doing.

It certainly isn't a problem with RC4 itself.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMiZ8jkCAxeYt5gVAQEVmQf+NOtuzLuuooKTHEboec1gV934AuppzQ42
BiILGd3ATwrB+P0pfmzgTc5ewYntoOUa6wpp/JWkQ1bZTotLD2lsrnWCyLW+WvH+
sUIVhDLKl5pSrCPjP6PL9nm0yLzVFlE9tUeocAZfOmQ1vI3nvkPEiA51vfczZS4J
402zzA7cxozvzmEoXDVxc6L3HM6dNw3fB4LPxgHQvt3ksdqVe0HPe8TuhV2QLBWn
p+M4DNjTFKZjjVpCqdFZiO7hwVBgTdOHfXnAcMg6hBvnQmd7Iquj96V4PUaeS2M4
UnA3625C826Gxx71oUEX/swNiw3Bpw8UX+pcOE45l3xuaOuRg1JqJA==
=OnGl
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/BTTsXiPJ69Y/m/g9Y_rsQ93mIJ", "n_sections": 3}, {"thread": "DQAiPLydNCQ", "msg": "FXI6oV9ZTyAJ", "author": "David Hopwood", "date_disp": "Mar 10, 2000, 3:00:00\u202fAM", "subject": "encrypting to unknown public key?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

A stated requirement was
# The blinding function B() "looks random" - it should be
# infeasible to guess any other BK or any other F given one
# (BK, F) pair. It should be infeasible to create another BK
# or another F given only BK but not the original PK.

The DH-based scheme above doesn't fulfil that requirement, because if
(u^b, v^b) is a public key, then so is ((u^b)^b', (v^b)^b'). I can't
immediately think of any way to fix that; it seems to be quite difficult.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMl9ZTkCAxeYt5gVAQHOvgf/RJwavkh1Qh3n62AgkUFS4PH2gOYJdquo
8E+N6e3TEUi1IHifZFPpOtZOh8q6DQ5mrXcU8fzT8P42mvxXzXd4GRUKaTJN6Z4l
pwPgi/3LV9cpi+HP0OXG8Cz5KjjGNjrxo+Wx/pPmQOui1CireI27j+P5LF3+aatx
xu3fc4XvxzNwleRlKnw/oTAXy0aM+xsNuYKwcn/xOf6Xgwgatn0aUsgPKK/Vk4F5
89wqssZqFI08GY3rVMOuqD+Q6If4LyWfHUhvMN0WwYAf1x5NOi93SxhayAndXMIs
cZwgjvEbjslchNcatzki7yr3GTKrtce81I62ytNTYI9+MQIxHoAIVQ==
=e3/f
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/DQAiPLydNCQ/m/FXI6oV9ZTyAJ", "n_sections": 24}, {"thread": "DQAiPLydNCQ", "msg": "UsJ8nSDoDTsJ", "author": "David Hopwood", "date_disp": "Mar 11, 2000, 3:00:00\u202fAM", "subject": "Blind-recipient-hiding (was Re: encrypting to unknown public key?)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David A Molnar wrote:
> John Myre <jm...@sandia.gov> wrote:
>
> > Is there any reason why you require the decryption function to
> > work with both a blinded key and the original public key? It
> > would seem easier (i.e., to admit more solutions) without that
> > restriction.
>
> Well, if the same decryption function works in both cases, the
> decryptor may not be able to distinguish between messages encrypted with
> a normal public key, and those encrypted with a blinded public key.
> I have the feeling that this indistinguishability may be a useful
> property, but no concrete protocols as yet.
>
> That being said, what originally motivated the question was that I
> wanted servers in a chain of anonymous remailers to create receipts
> encrypted with the sender's public key. Clearly if they have an
> unblinded public key, then all servers know who the sender is and there
> is no point to using more than one server. With blinded public keys,
> each server can create receipts encrypted with the sender's public key
> without knowing who the sender is. Then these receipts can be posted
> to usenet or something.

For this application, you need both the blinding feature that you've just
described, *and* the "recipient hiding" property described in a sci.crypt
thread from February (ah, I see that you initiated that thread as well :-),
in the same algorithm. Maybe this could be called something like
"blind recipient hiding".

Adding blinding effectively strengthens the original recipient hiding
property, because even the sender does not need to know the recipient
(although we have to trust someone to blind the keys correctly).
It doesn't appear to be important to prevent keys from being blinded
more than once, AFAICS, as long as it isn't possible to infer that two
given public keys are equivalent (i.e. they are blinded versions of the
same key), with non-negligable probability.

There is an attack that appears to apply to all such schemes, although
it could be mitigated by careful protocol design: if Bob and Robert
(possibly the same user) have blinded public keys BK_Bob and BK_Robert,
then Alice could send a message encrypted using BK_Bob to Robert, and
observe from his actions whether he has been able to read it. If he can,
then Bob and Robert are the same. Therefore it's important that recipients
not give any indication of whether they have been able to read a message
or not. Remailer protocols are normally designed so that messages aren't
acted upon for a random length of time after being received (to prevent
correlating inputs and outputs), which would help against this attack.
Using a broadcast channel, rather than point-to-point messages would
also probably help.

Given that we need both blinding and recipient hiding, I would suggest
John Savard's scheme with DHAES, using a common modulus (or a common
elliptic curve, or whatever). The random blinding value b should be
uniformly distributed on [1, |G|], where G is the group or subgroup being
used, and |G| is its order. It's important that the group or subgroup be
cyclic (as it is required to be for DHAES), since otherwise some
information is leaked. The common modulus (or curve) is needed so that an
attacker can't distinguish between the distributions of ciphertexts sent
to different users, as we discussed in the earlier thread.

The sender should also do public key validation: if (g, y) is purported
to be a blinded public key, check that both g and y are actually elements
of G (the description of G should be a fixed parameter).

Using different generators for different users doesn't break the basic
recipient hiding property, because g^u (using the notation from the DHAES
paper) is expected to have a uniform distribution on the elements of G,
from the point of view of an attacker; this is true regardless of the
value of g, provided that the public key is valid.

It looks as though it should be quite feasible to create a formal model
of the properties required for a blind recipient hiding PK encryption
algorithm, and prove that this special case of DHAES satisifies it (under
the same assumptions used in the existing DHAES security proofs).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMm5/zkCAxeYt5gVAQHxXgf/Yx+rLXoyQGBLKjTxqCtYhVI1AM7gh/Jy
qW+eyPPVF6NhsJ1QtjJl70tGy7UwJZWuxsYWvQGeBwuxJKWhzSkcKWkAsAKhETh/
ftn18yDKDxD4emRrLa3z/f4EXRqCw5+z/5c8UXTWnG03cnyK+nYSbPDVFvW5FNUj
st+t6PKbwbayUgPM+mVbCFMwJ1aO0KMs8KnVHPLNbK9T5lPOBfBcMwoiss10rPZv
/WfGThqzyEBsJrsHrLtfqmd+aQV8Weafb1HQ1gBVcFMh5FqOihVr+VxLQv2+XVbT
XMdJWJBHmRaiXBHKamkZtOlcr5QrvrYWoUjvUmZCvdvjzTNAy1OIEQ==
=mDKV
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/DQAiPLydNCQ/m/UsJ8nSDoDTsJ", "n_sections": 24}, {"thread": "DQAiPLydNCQ", "msg": "X5r51CYZGMcJ", "author": "David Hopwood", "date_disp": "Mar 11, 2000, 3:00:00\u202fAM", "subject": "Blind-recipient-hiding (was Re: encrypting to unknown public key?)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

I wrote:
> Given that we need both blinding and recipient hiding, I would suggest
> John Savard's scheme with DHAES, using a common modulus (or a common
> elliptic curve, or whatever). The random blinding value b should be
> uniformly distributed on [1, |G|], where G is the group or subgroup being
> used, and |G| is its order. It's important that the group or subgroup be
> cyclic (as it is required to be for DHAES), since otherwise some
> information is leaked. The common modulus (or curve) is needed so that an
> attacker can't distinguish between the distributions of ciphertexts sent
> to different users, as we discussed in the earlier thread.
>
> The sender should also do public key validation: if (g, y) is purported
> to be a blinded public key, check that both g and y are actually elements
> of G (the description of G should be a fixed parameter).

I should have said, "elements of G other than the identity".
(For GF(p), or a subgroup of GF(n) the identity is 1; for an elliptic curve
it is the point at infinity.)

Also, the blinding function should technically do key validation on the
blinded key, and repeat with a different b if it fails - although the
probability of that is so small if the input key was valid, that it should
never happen in practice.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMnYBTkCAxeYt5gVAQEopgf+LqrENhPFHkNJYZqMFVAajl4s6lZPpkLs
XRaxmmcRCLJtdTjHJHxKK8++eiFcdeTmtiho2Kzb6O2gPNBTtI4jJyMNc8g8EkNH
NhFea4F69JxJglJ7ZYiiPFkXupOtENQom6bM2vD0sq/MzBvFtdjGTR81ak8Ot4QP
U0vGhiPJr/ti5c/HPjnPmmAvAiQdc1qqUOT8yNKC5yDCCVQVHs3R09qQ1fpinfTg
gpi+NFkf2utRomXNdv3G8H6+nHbhbRNuTrrW2njkmmDxBwg6r3UBD23+afTEtwtD
swn07/3skLXqFgXjw8KAIdO/L14RuqapjPAtLcIxybn1ynxEVnxAUQ==
=brvh
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/DQAiPLydNCQ/m/X5r51CYZGMcJ", "n_sections": 24}, {"thread": "DQAiPLydNCQ", "msg": "Q30AznHO3mUJ", "author": "David Hopwood", "date_disp": "Mar 11, 2000, 3:00:00\u202fAM", "subject": "Blind recipient hiding (was Re: encrypting to unknown public key?)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David A Molnar wrote:
> David Hopwood <hop...@zetnet.co.uk> wrote:
> > # (BK, F) pair. It should be infeasible to create another BK
> > # or another F given only BK but not the original PK.
>
> > The DH-based scheme above doesn't fulfil that requirement, because if
> > (u^b, v^b) is a public key, then so is ((u^b)^b', (v^b)^b'). I can't
> > immediately think of any way to fix that; it seems to be quite difficult.
>
> Argh. You're right, and so is John Myre. I will say right now that
> I thought I was thinking of non-malleability when I stated this
> requirement. That is, when we have ciphertexts, we generally want it to
> be infeasible to create a new ciphertext just by applying some function
> (other than the encryption function) to a current ciphertext we have.

More precisely, non-malleability means that it is not feasible to create
ciphertexts which, when decrypted, give a plaintext that is related to
but not equal to some other target plaintext, when only an encryption of
that target plaintext is known. It is usually required that this be true
under adaptive chosen-ciphertext attack.

(Obviously, it's always possible to create new valid ciphertexts for a
public key algorithm, when the public key is known.)

I think the property you wanted was probably something like this:

Define a blinding tree as a tree with an initial public key at the root,
such that the children of a key are the keys that can be formed from
that key by blinding.

A blind PK encryption scheme has "public key anonymity" if an attacker
cannot feasibly obtain any information (that was not known a priori)
about whether two blinded public keys are in the same blinding tree.

I don't think this is possible under chosen ciphertext attack, because
of the problem of an attacker seeing whether the owner of some public
key can decrypt messages encrypted using a different blinded key, but
it seems to be possible under less powerful attacks. Also, you could
possibly weaken the notion of a (maybe adaptive) chosen ciphertext
attack just enough that this property would be possible under the
weakened version.

For the scheme I described in my other post based on John Savard's
suggestion (call it BRH-DHAES), two keys are in the same blinding tree
if-and-only-if they are equivalent keys, in a particularly strong sense:
the corresponding encryption functions produce exactly the same
distribution of ciphertexts for a given plaintext.

This has some advantages - for example, it means that anyone who is given
a public key can create an arbitrary number of equivalent blinded public
keys from it, and pass them on to other parties, without those parties
being able to tell that they have been given equivalent keys (even if
they collude). Also, the recipient of a message cannot tell which blinded
key the sender used, unless that can be inferred from the contents of the
message.

For other blind encryption schemes, two keys in the same blinding tree
might not be equivalent, because they might require different encryption
and/or decryption functions.

> Might as well play with the mistake, though :
>
> IF you can somehow acheive this requirement, then it seems you can have
> a situation in which parties are "marked" by which blinded key they use
> to encrypt messages. This would be useful in the case of referrals,
> for instance -- if Alice gives Bob a blinded key, and Carol later uses
> the same blinded key, Bob and Carol may be linked. Alice knows she
> gave the key to Bob, so she infers that Bob referred Carol to Alice.
>
> This assumes, *contrary to what I had previously thought*, that someone
> can distinguish encryptions due to blinded public keys from those due
> to normal public keys.

It depends on the specific algorithm. For BRH-DHAES they cannot (but
BRH-DHAES is an "unlimited blinding" scheme, by your definitions below).

> Otherwise the only way to carry out this linking
> seems to be to actually interrogate senders as to what public key they
> use.
>
> So on reflection, there seem to be several choices at least we can make
> about such a "blind encryption" scheme :
>
> (btw, if my terms change from previous messages or if you have better
> terms, please yell)
>
> * "single-blinding" vs. "unlimited blinding"
>
> Whether a blinding of a blinded key produces a valid
> public key ("unlimited blinding") or does not ("single
> blinding").

A single-blinding algorithm has blinding trees that are limited to a
depth of 2 (i.e. the root and its children).

> * Whether or not the sender knows he is using a blinded
> public key. Is there a single E() which takes
> both PK and BK, or are there separate E() for PK and
> for BK?

For BRH-DHAES, no; there is a single E.

> * Whether or not the recipient *knows* a message was
> encrypted with a blinded key. Is there a single D()
> which takes messages encrypted with both PK and BK, or
> is there a separate D'() for BK??

For BRH-DHAES, no; there is a single D (and in fact the distribution
of possible encryptions of a message is provably identical, for
different but equivalent blinded keys). This suggests an additional
choice/property:

* Whether the recipient can distinguish which blinded key
was used to encrypt a message.

> * Whether or not the party which created the blinded key
> can determine which messages were encrypted with that
> key. He can't necessarily see the content - he can just
> see which used "his" value of BK.

For BRH-DHAES, no.

> This might be useful in case Alice is contracting out
> work using both Bob and Carol as agents. Bob and Carol
> give out blinded keys to customers. Then they can simply
> sniff Alice's link to see how much of her traffic is
> due to buisness that they brought in, but can't actually
> read any of Alice's traffic.
> Note that Bob and Carol may not even know that the other
> exists.

I can't see any way to construct a scheme where blinded keys can be
traced in this way using Diffie-Hellman-type keys. Maybe it could
be done using a factorisation-based trapdoor, but it's too early in
the morning for me to think about that now.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMnh/TkCAxeYt5gVAQHpDAf/XjFQb3+PmnsLas7c2KOZMRVCiYqZZ5z7
RQF0pzIskr0XrvI+bPM3O5qV9iNXUkmcfWaaM46CRUDwj+Tii2MP3eliG5QEFFYO
vYj/WQ4uCND8esxVazMb8ShZFXRx1cl46eojHjK9Bq8F+u7Jx0hJVkdna3ANcYq4
RHda55OesqM/fNzZtQJwLeM8e/sEfKgb0gKPe0Ih5Exz+f59ofBcvraOFV9pFWWB
cj/lY5W3Agu1cewmkasqLuIc6nhsJ1kyG3tLibuaw/N3Gn7Cp8PGxIIt1QmtWk+Q
DaneORxk9U3n+fG/NmHei6yktafpjtRFJ4aVcRAV25vLo9DfqXvOZA==
=a7Y1
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/DQAiPLydNCQ/m/Q30AznHO3mUJ", "n_sections": 24}, {"thread": "DQAiPLydNCQ", "msg": "6Geo_uBeejUJ", "author": "David Hopwood", "date_disp": "Mar 15, 2000, 3:00:00\u202fAM", "subject": "Blind recipient hiding (was Re: encrypting to unknown public key?)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Hopwood wrote:
> For the scheme I described in my other post based on John Savard's

> suggestion (call it BRH-DHAES), [...]

I meant David Wagner's suggestion, sorry.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOM7t9jkCAxeYt5gVAQHQSAgAj6n2G/635xgEu6e7imhARW2sVnq9U7F2
KFmGTWj6NBm94xPXbJg6IOwpx0m1zxsdgqokmmQhZR5Z8qA+HhxB9dqLNdca2Xn0
lTflKV+cho2gOFgP9nU6+Z1Tplhui6kWPSOE0UK2ubbzGqxQwBl4jqPMmYcZdftS
bu4Jv6QEs5h5b5R+AROHnUA9u+etg84Vo1o0m7/yXkjGxJnhBLrrOW5ttKcHw/Jo
5ponYZzUfpyMgmrwfIe2jDLMjPunJEAu0CwhsAIuVqFvKjwR12SRaXPHfzXa5Go1
352OcjqW+KKWEinJJUaW5r/bsOCpJOe4wxz2+2J171ipLZPGTNOKAg==
=NRIM
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/DQAiPLydNCQ/m/6Geo_uBeejUJ", "n_sections": 24}, {"thread": "DQAiPLydNCQ", "msg": "jZ1Xk0MBw2QJ", "author": "David Hopwood", "date_disp": "Mar 15, 2000, 3:00:00\u202fAM", "subject": "Blind recipient hiding with RSA (was Re: encrypting to unknown public key?)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mike Rosing wrote:
> David A Molnar wrote:

> > Yes. If F [i.e. the random input to blinding] affects the


> > decryption algorithm, then it seems that the secret key holder
> > would need to know something about F. I would like it to be the
> > case that blinded keys can be created without any coordination
> > with the secret key holder at all.
>
> That's pretty tough. Basicly, F doesn't do anything.

It's not a problem provided that the blinded public keys fall into
equivalence classes, with one equivalence class per private key.
Then F determines which blinded key from a particular equivalence
class is chosen.

[...]


> I suppose there's some high level math that would allow a "unitary"
> transform so F acts like multiplication by the identity, but gives
> a random looking result.

In a loose sense, this is how BRH-DHAES works: (g, y) -> (g^b, y^b)
preserves the relation y = g^x, where x is the private key. The maths
can be relatively simple, though.

To make this work for other trapdoor functions than discrete log, we
have to find a similar transformation that obscures the public key,
but maintains the relation between public and private keys that
allows decryption to work.

For example, for integer factorisation based schemes, we could
blind a public key by multiplying the modulus by a third factor.
In the case of RSA, the result of blinding a public key (n = p.q, e)
would be (n' = p.q.r, e, bitlength(n)), where the exponent e is
fixed for all users. The private key would include p, q, and
d = e^-1 mod phi(n).

Note that decryption reconstructs the plaintext modulo n (not n'),
so the encrypted blocks must be less than n (hence the need to
include the bitlength of n in the blinded public key). There should
be a minimum value for the bitlength parameter.

If the factors p, q, and r were chosen to be of roughly equal length,
and the blinded modulus n' the same length as would be chosen for
RSA, then this would probably be comparably secure to RSA, and as
fast for encryption (but see the notes below). It would be slightly
faster (using Garner's CRT algorithm) than standard RSA for decryption.

The moduli n' should be chosen so that the most significant 128 bits
or so, and the length, are common to all users. This ensures that the
scheme is recipient hiding, i.e. it is not possible to use the
distribution of ciphertexts to distinguish between public keys (as
discussed in the earlier sci.crypt thread in February).

This scheme seems to have similar security properties to BRH-DHAES:

- it's not possible to link equivalent blinded keys, with significant
probability;
- no-one (including the private key holder), can tell from a
ciphertext, with significant probability, which public key it was
encrypted with;
- when used with OAEP or a similar encoding method, it can be proven
semantically secure and non-malleable, under fairly reasonable
assumptions (that RSAP is hard with the same parameters, in the
random oracle model);

but with some disadvantages relative to BRH-DHAES:

- it is possible to blind a key more than once, but this slows down
encryption, because the modulus length increases each time a key is
blinded;
- it's not possible to rule out special purpose factorisation methods
for moduli of this form, although I don't think that is likely
provided n' is at least 1024 bits;
- low exponent attacks may apply. Normally this would not be a problem
when using OAEP padding, but for this scheme the most significant
third of the bits of the input block (compared to the size of n')
must be zero. I'm not sure how the low exponent attacks on RSA
generalise to moduli with three factors, but it would be prudent to
use e >= 65537;
- the unblinded public key is more vulnerable to factorisation than
the blinded keys (this can be compensated for by increasing the
modulus size, but at the expense of encryption speed relative to RSA).
- RSA is patented until October this year;
- it's not obvious how to do key validation;
- it's mathematically less elegant, IMHO.

I'll call this scheme BRH-RSA-* (e.g. BRH-RSA-OAEP, when used with OAEP
padding).

======

I think it's also interesting that blind PK encryption can be thought of
as a dual to the proposal made by me and (independently) Adam Back, of
encryption schemes that provide non-interactive forward secrecy.

In that proposal, a single public key corresponds to many private keys,
whereas in a blind encryption scheme, a single private key corresponds
to many public keys. Non-interactive forward secrecy seems to be harder
to make secure and practical, though, because it also requires that the
private keys not be equivalent.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOM7ugTkCAxeYt5gVAQHCqAgAyAffoArdz6lLbxcIdgwi5hKhoLNpmxRd
Mn558PkJCxmrd5IP/bIcGnNwPZPlrLk15pN5GA9GlU3cVGpNCZ/kbClh0jpMMqCq
LEU6+EPmxMUKEsLLKI9FcJoub7vY62uW0kz7AVYpoJdJHAyiqqWw8U6P02ejHZsh
2Q2UOWBrl1m0Xo15WLdQY11H+LDtm3kXMMvCAw/8OCzteXeiX3BYPWvZktBRTPf7
rYdDtLrBGJN0iPqQ5BakPnp5ShnxipMyhuu6qXUiXftim3jJhP9tC5yFAdoOH7It
7UYdHG0rZYAh+98daF+hpdgy8yAUkyssktF5UpF8WKNE+j1DLZjHYQ==
=/CCe
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/DQAiPLydNCQ/m/jZ1Xk0MBw2QJ", "n_sections": 24}, {"thread": "DQAiPLydNCQ", "msg": "YVbQ9P9Z8agJ", "author": "David Hopwood", "date_disp": "Mar 15, 2000, 3:00:00\u202fAM", "subject": "Blind recipient hiding with RSA - correction", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

I wrote:
[...]
> This scheme [BRH-RSA-OAEP] seems to have similar security properties
> to BRH-DHAES:

Sorry, no, it's possible to link blinded keys. If n1 and n2 are the
moduli of two equivalent blinded keys, then gcd(n1, n2) = n (the
modulus of the unblinded key). Scratch this scheme, it's insecure.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOM8mUDkCAxeYt5gVAQGR7Qf/Q1F1kbp8RfZHdRXDfQjrbJIMIrx/RWOs
Xm9LhqK8BpF8cD2H0wI9+hNfiMfM3jdZtyZ+APxXKvOe80GcNjL4Sw4La9Kmi9ZR
MWnuQE9eRkaoi8nKawVw6480bN0V8WCwM3ieFtM3m0G5Ju9eB1Do3rDjFV0OQgjQ
BITUYZVMazhvo7ZN+BElyCW5LX9b51iQhyF9VtyMYQDc4HcP5yvIjVfG7SHksun6
V6oAeGd+QH4q9s2PP1iPxfkS4MjAvvXo7PLKwuiB1aRD3XePrKUbs7yEdNob81WX
03atoqS6voTAEH/WbccxV0/kfxQusOJxD5gF00WN+Ju/RtBcaFYoSg==
=6Dn7
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/DQAiPLydNCQ/m/YVbQ9P9Z8agJ", "n_sections": 24}, {"thread": "DQAiPLydNCQ", "msg": "memDvm5nv3gJ", "author": "David Hopwood", "date_disp": "Mar 16, 2000, 3:00:00\u202fAM", "subject": "Blind recipient hiding with RSA", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David A Molnar wrote:


> David Hopwood <hop...@zetnet.co.uk> wrote:
> > - low exponent attacks may apply. Normally this would not be a problem
> > when using OAEP padding, but for this scheme the most significant
> > third of the bits of the input block (compared to the size of n')
> > must be zero. I'm not sure how the low exponent attacks on RSA
> > generalise to moduli with three factors, but it would be prudent to
> > use e >= 65537;
>

> It seems worse than that - now there is a special form for correct
> decryptions. This is the problem that allowed Bleichenbacher to
> break PKCS 1.5.

That attack doesn't work in this case, because the recipient will only
retrieve the plaintext mod n, and all values on [0, 2^(bitlength(n)-1))
are possible. Also, even if that wasn't the case, the definition of OAEP
unpadding requires that decryptions outside this range result in an
"invalid" output, which can't be distinguished from the output due to
any other incorrectly padded decryption.

However, it's fairly academic, because of the attack that allows linking
two blinded public keys by taking the gcd of their moduli (see my other
post).

> An RSA approach was the first thing I thought of, but I couldn't make it
> work.

Given the gcd attack, I also can't think of any way to make this work for
RSA. However, I've made some progress on security proofs for BRH-DHAES,
and I'll post the results here when they're finished.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBONEj6jkCAxeYt5gVAQGHUQf/Qita98KnPhbY8EUqzLZbZMSVXJJqiHow
vIyB+6leDZLET86uqTp+1/JDdJXBiToJH2tWG6S00pBnXflRj3u9Hpz+rcVn2pj4
Glw/bO3sM+xLP74IznNjDY0HJutSIl3jzT0rijUQiDS++LXXe7GBx/GdxMpYSi+q
JryT26gT6aGsyD7l0tVfFab5QYUBvpNH1nmM7fzeTvUpcLWw78jaaiZPZ9Sj98Y2
IM6yGn9qW1dfQsH0LpqMkVTfBVj4LqbBuKeD1vfSx4rrEf2sG6VVrhLxUvj+rldK
3hhvJDP1iYOim6UHVbs07h6U9kQZ2ppzQsBl9fgEvC/OjQERwMjHHg==
=CM0G
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/DQAiPLydNCQ/m/memDvm5nv3gJ", "n_sections": 24}, {"thread": "DQAiPLydNCQ", "msg": "JUtcaV6538oJ", "author": "David Hopwood", "date_disp": "Apr 9, 2000, 3:00:00\u202fAM", "subject": "Security model for blinded-key recipient-hiding encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Here's an attempt at a formal security model for blinded-key
recipient-hiding encryption schemes (borrowing heavily from the models
used in Bellare and Rogaway's papers, e.g. [DHAES] and [CONCRETE]).


PK is the set of public keys (blinded or not).
SK is the set of private keys.
PT is the set of possible plaintexts.
CT is the set of possible ciphertexts.
Coins is the set of possible random inputs, used to model
non-deterministic functions. Coins arguments are omitted when
that does not cause ambiguity.

A blinded-key asymmetric encryption scheme ASYM is modelled by a tuple
(ASYM.encrypt, ASYM.decrypt, ASYM.keygen, ASYM.blind, ASYM.TIMES):

ASYM.encrypt : PK x PT x Coins -> CT
ASYM.decrypt : SK x CT -> PT union {INVALID}
ASYM.keygen : Coins -> SK x PK
ASYM.blind : PK x Coins -> PK
ASYM.TIMES : a set (normally a range) of non-negative integers

Iff n is in ASYM.TIMES, then it is valid for a public key generated
by ASYM.keygen to be blinded (using ASYM.blind) n times, and the
resulting public key used for encryption.

[For example, if a scheme EXAMPLE allows keys to be blinded any number
of times, but an initial public key generated by EXAMPLE.keygen cannot
be used for encryption, then EXAMPLE.TIMES will be the set of all
integers >= 1.]


Correctness.

ASYM is correct if it can accurately decrypt any ciphertext that could
be produced by encryption using a public key that has been blinded a
number of times n, for all n in ASYM.TIMES:

forall (sk, pk_0) <- ASYM.keygen,
forall n <- ASYM.TIMES,
forall { pk_i <- ASYM.blind(pk_{i-1}): i = 1..n }
forall P <- PT,
(ASYM.decrypt(sk, ASYM.encrypt(pk_n, P)) = P)

(This is also implicitly quantified over all the possible random choices
for the Coins arguments.)


Message Privacy under Chosen-Plaintext Attack.

The advantage of an adversary A in attacking ASYM under chosen plaintext
attack is defined as

Adv_CPA(A, ASYM) = max {2.Pr[(sk, pk_0) <- ASYM.keygen;
pk_i <- ASYM.blind(pk_{i-1}), for i = 1..n;
(P_0, P_1, state) <- A.find(pk_<0..n>);
b <- {0, 1};
C <- ASYM.encrypt(pk_n, P_b);
A.guess(pk_<0..n>, state, C) = b] - 1
: n <- ASYM.TIMES}

Explanation

This definition is based on definition 6 from [DHAES] (but with slightly
different notation).

The advantage of the attacker A is calculated based on the following
experiment:
- generate a key pair (sk, pk_0).
- blind the public key pk_0 n times, to create a chain of n+1 keys,
pk_<0..n>.
- call the attacker's function "A.find(pk_<0..n>)", which chooses
two plaintexts (P_0 and P_1) that it will try to distinguish between.
The find function also returns a state for later use by the attacker.
- choose one of the plaintexts, P_b, according to a fair coin toss
(i.e. b = 0 or 1).
- encrypt P_b using pk_n to give C.
- call the attacker's function "A.guess(pk_<0..n>, state, y)", which
tries to guess which plaintext was encrypted.

The "advantage" of the attacker is dependent on the probability of it
succeeding in its guess (taken over the random choices in key generation,
blinding, and encryption). Since the attacker can achieve a success
probability of 1/2 by random guessing, the probability is scaled by
multiplying by 2 and subtracting 1, to give an advantage ranging from 0
(maximum security) to 1 (maximum insecurity). Adv_CPA(A, ASYM) is defined
as the maximum advantage of A against ASYM in a chosen plaintext attack,
over all possibilities for n (the number of blinded keys in the chain),
i.e. all values of n from the set ASYM.TIMES.

Note that it is important for the attacker to be given the whole chain
of blinded public keys, rather than just the one that is being used for
encryption. As a somewhat artificial, but concrete example to motivate
this, consider modifying a proven-secure blinded-key encryption scheme
as follows:
- add to the public key of a generated key pair, a random DHAES public
key (g, y) (for which the private key is not known).
- add to ciphertexts produced by the scheme, the encryption of the
plaintext using DHAES with public key (g, y).
- when a key is blinded, set y := g^y.

This is insecure if the attacker is given the "previous" public key in
the chain (and therefore insecure in practice), but can be "proven
secure" in a model where the attacker is only given the public key
used for encryption - so such a model would obviously be inadequate.

As in [DHAES], the security of ASYM against chosen plaintext attack is
defined by the function

InSec_CPA(ASYM, t, m) = max_A {Adv_CPA(A, ASYM)}

where the maximum is taken over all adversaries A running in time +
code size at most t, and whose outputs P_0 and P_1 have length at most
m bits.


Message Privacy under Non-Adaptive Chosen-Ciphertext Attack.

The advantage of an adversary A in attacking ASYM under non-adaptive
chosen ciphertext attack is defined as

Adv_CCA1(A, ASYM) = max {2.Pr[(sk, pk_0) <- ASYM.keygen;
pk_i <- ASYM.blind(pk_{i-1}), for i = 1..n;
(P_0, P_1, state) <-
A.find(ASYM.decrypt_sk, pk_<0..n>);
b <- {0, 1};
C <- ASYM.encrypt(pk_n, P_b);
A.guess(pk_<0..n>, state, C) = b] - 1
: n <- ASYM.TIMES}

The security of ASYM against non-adaptive chosen ciphertext attack is
defined as

InSec_CCA1(ASYM, t, q, mu, m) = max_A {Adv_CCA1(A, ASYM)}

where the maximum is taken over all adversaries A running in time + code
size at most t, making at most q queries to its decryption oracle, these
queries totaling at most mu bits, and whose outputs x_0 and x_1 have length
at most m bits.

The only difference from the chosen-plaintext-only case is that the attacker
is given a decryption oracle (ASYM.decrypt_sk) in the find stage. This is
based on definition 7 from [DHAES], adapted for blinded keys.


Message Privacy under Adaptive Chosen-Ciphertext Attack.

The advantage of an adversary A in attacking ASYM under adaptive chosen
ciphertext attack is defined as

Adv_CCA2(A, ASYM) = max {2.Pr[(sk, pk_0) <- ASYM.keygen;
pk_i <- ASYM.blind(pk_{i-1}), for i = 1..n;
(P_0, P_1, state) <- A.find(pk_<0..n>);
b <- {0, 1};
C <- ASYM.encrypt(pk_n, P_b);
A.guess(pk_<0..n>, state, C) = b] - 1
: n <- ASYM.TIMES}

The security of ASYM against adaptive chosen ciphertext attack is

InSec_CCA2(ASYM, t, q, mu, m) = max_A {Adv_CCA2(A, ASYM)}

where the maximum is taken over all adversaries A running in time + code
size at most t, making at most q queries to its decryption oracle, these
queries totaling at most mu bits, and whose outputs P_0 and P_1 have length
at most m bits.

Again, this is a straightforward adaption from definition 8 of [DHAES].

Now we define new security properties for blinded-key encryption and
recipient hiding (based on the same approach to modelling security):


Security of public key blinding.

Informally, an attacker is able to break the security of the blinding
function if it can determine with non-negligable probability whether
two given keys are blinded versions of the same public key (or
equivalently, that they correspond to the same private key).

Note that giving the hypothetical attacker the blinded public keys
directly results in a stronger security property than giving the attacker
only ciphertexts, because given the public keys, the attacks can generate
its own ciphertexts corresponding to arbitrary chosen plaintexts.

However, we must be careful to account for all possibilities in the
relationship between the public keys involved. In the diagram below,
X and Y are the public keys of two newly generated key pairs, A and B
are keys obtained by blinding X and Y some number of times, and Z is
a blinded version of *either* A or B. Loosely speaking, the attacker's
advantage is based on the probability of it being able to guess which
key Z was blinded from.

A
X o --->o --->o -------->-
\\
?-->o Z
B /
Y o --->o --->o --->o -->-

Only one possible case is shown in the diagram; it is also possible
for Z to be one of the original keys X or Y, if keys generated by
ASYM.keygen can be used directly for encryption (i.e. when 0 is an
element of ASYM.TIMES). In general, all valid combinations for the
number of steps between X and Z, and between Y and Z must be
considered; the overall advantage of the attacker is the maximum
advantage for any of these combinations.

More precisely, for each combination, the attacker's advantage is
calculated based on the following experiment:

- generate two key pairs (skX, pkX_0) and (skY, pkY_0).
- blind pkX_0 and pkY_0, nX and nY times respectively, to give two
chains of keys pkx_<0..nX> and pky_<0..nY>.
- let pkZ be either pkX_nX or pkY_nY, according to a fair coin
toss.
- call the attacker's function
"A.guess(pkX_<0..nX-1>, pkY_<0..nY-1>, pkZ)", which tries to
guess which chain of keys pkZ belongs to.
(Note that nX or nY can be zero; in that case pkX_<0..-1> and
pkY_<0..-1> are of zero length.)

Note that unlike the definitions for message privacy, there is no
"find" stage. The reason why a "find" stage is needed for those
definitions is that there could be a subset of messages for which
a scheme is insecure, but which are a negligable proportion of all
possible messages. This should count as a security weakness, and
therefore it's necessary to allow the attacker to choose the messages
that it will try to distinguish. In constrast, key pair generation
and blinding do not require any non-random input, so there is no
input that could be influenced by an attacker (assuming that the
RNG is secure). "Weak keys" may be possible, but they are only a
security weakness if they occur with non-negligable probability,
and so it's sufficient to randomly choose the chains of keys that
are to be distinguished in the experiment.

[In all of these security definitions, random number generators are
not modelled explicitly, and are assumed to produce output that is
indistinguishable by an attacker from a uniformly random independent
distribution. Modelling them explicitly probably wouldn't help
much: we already know that the RNG has to be secure, and it would
complicate the definitions considerably.]

For this security property the attacker is not given a decryption oracle
(i.e. cannot perform chosen ciphertext attacks). If a decryption oracle
were allowed, then it would not be possible to prove the security of
public key blinding for any scheme, because that would enable asking the
owner of one of the private keys whether a message can be validly
decrypted - which would immediately give away whether the public key used
for encryption corresponds to that private key. I.e. this type of attack
must be prevented at the protocol level, rather than by the encryption
scheme. This should not be too much of a problem for protocols that
are specifically designed to support anonymity.

[It is still useful for chosen ciphertext attacks to be considered for
message privacy, since that protects the confidentiality of messages
even when the anonymity of a recipient has been broken, or the mechanism
for preventing chosen ciphertext attacks at the protocol level fails
(i.e. it provides defense in depth).]

The advantage of an adversary A in attacking the public key blinding
of ASYM is therefore defined as

Adv_Blind(A, ASYM) = max {2.Pr[(skX, pkX_0) <- ASYM.keygen;
(skY, pkY_0) <- ASYM.keygen;
pkX_i <- ASYM.blind(pkX_{i-1}),
for i = 1..nX;
pkY_i <- ASYM.blind(pkY_{i-1}),
for i = 1..nY;
b <- {0, 1};
pkZ <- { pkX_nX, if b = 0
{ pkY_nY, if b = 1
A.guess(pkX_<0..nX-1>, pkY_<0..nY-1>, pkZ)
= b] - 1
: nX <- ASYM.TIMES, nY <- ASYM.TIMES}

The security of ASYM for public key blinding is

InSec_Blind(ASYM, t) = max_A {Adv_Blind(A, ASYM)}

where the maximum is taken over all adversaries A running in time + code
size at most t.


Recipient hiding under Chosen Plaintext and Adaptive Chosen
Ciphertext Attack.

A blinded-key encryption scheme is recipient-hiding, if given two
blinded key chains, at the ends of which are two keys pkX and pkY,
and oracles that encrypt chosen plaintexts or decrypt chosen ciphertexts
with either pkX or pkY (always the same one), it is not possible to
guess which key is being used for encryption, with probability
significantly higher than 1/2.

The security definition for this property has two differences from that
for key blinding:
- the attacker is given oracles that encrypt and decrypt with the
randomly selected key, rather than the key itself.
- the blinded key chains include both of the end keys (pkX and pkY).

We use the following experiment:

- generate two key pairs (skX, pkX_0) and (skY, pkY_0).
- blind pkX_0 and pkY_0, nX and nY times respectively, to give two
chains of keys pkx_<0..nX> and pky_<0..nY>.
- let (skZ, pkZ) be either (skX, pkX_nX) or (skY, pkY_nY), according to a
fair coin toss.
- call the attacker's function
"A.guess(pkX_<0..nX>, pkY_<0..nY>, ASYM.encrypt_pkZ,
ASYM.decrypt_skZ)", which tries to guess which chain of keys
pkZ belongs to (by use of the oracles, rather than by knowing
pkZ directly).

The advantage of an adversary A in attacking the recipient-hiding
property of ASYM is defined as

Adv_Hide(A, ASYM) = max {2.Pr[(skX, pkX_0) <- ASYM.keygen;
(skY, pkY_0) <- ASYM.keygen;
pkX_i <- ASYM.blind(pkX_{i-1}), for i = 1..nX;
pkY_i <- ASYM.blind(pkY_{i-1}), for i = 1..nY;
b <- {0, 1};
(skZ, pkZ) <- { (skX, pkX_nX), if b = 0
{ (skY, pkY_nY), if b = 1
A.guess(pkX_<0..nX>, pkY_<0..nY>,
ASYM.encrypt_pkZ, ASYM.decrypt_skZ)
= b] - 1
: nX <- ASYM.TIMES, nY <- ASYM.TIMES}

The insecurity level of ASYM for recipient hiding is

InSec_Hide(ASYM, t, q, mu) = max_A {Adv_Hide(A, ASYM)}

where the maximum is taken over all adversaries A running in time + code
size at most t, making at most q queries in total to its encryption and
decryption oracles, these queries totaling at most mu bits.


An encryption scheme need not be blind to be recipient hiding, and
the recipient hiding property can be useful on its own. Here are
the corresponding definitions for a non-blind encryption scheme,
modelled as a tuple (ASYM.keygen, ASYM.encrypt, ASYM.decrypt) in
the obvious way:

Adv_Hide'(A, ASYM) = 2.Pr[(skX, pkX_0) <- ASYM.keygen;
(skY, pkY_0) <- ASYM.keygen;
b <- {0, 1};
(skZ, pkZ) <- { (skX, pkX_nX), if b = 0
{ (skY, pkY_nY), if b = 1
A.guess(pkX, pkY, ASYM.encrypt_pkZ,
ASYM.decrypt_skZ) = b] - 1

InSec_Hide'(ASYM, t, q, mu) = max_A {Adv_Hide'(A, ASYM)}


Blinded-key indistinguishability under Chosen-Plaintext Attack.

Two blinded keys corresponding to the same private key are
indistinguishable, if even the private key holder cannot tell which
key was used to produce a collection of ciphertexts.

The advantage of an adversary A in attacking the blinded-key
indistinguishability of ASYM, under adaptive chosen plaintext attack is

Adv_Indist(A, ASYM) = max {2.Pr[(skZ, pkX_0) <- ASYM.keygen;
pkX_i <- ASYM.blind(pkX_{i-1}),
for i = 1..nX;
pkY_i <- { pkX_i, for i = 0..n;
{ ASYM.blind(pkY_{i-1}),
for i = n+1..nY;
b <- {0, 1};
pkZ <- { pkX_nX, if b = 0
{ pkY_nY, if b = 1
A.guess(pkX_<0..nX>, pkY_<0..nY>,
ASYM.encrypt_pkZ, skZ) = b] - 1
: nX <- ASYM.TIMES, nY <- ASYM.TIMES, n <- {0..nX}}

The insecurity level of ASYM for blinded-key indistinguishability under
adaptive chosen plaintext attack is

InSec_Indist(ASYM, t, q, mu) = max_A {Adv_Indist(A, ASYM)}

where the maximum is taken over all adversaries A running in time + code
size at most t, making at most q queries to its encryption oracle, these
queries totaling at most mu bits.


References:

[DHAES] Michel Abdalla, Mihir Bellare, Phillip Rogaway,
"DHAES: An Encryption Scheme Based on the Diffie-Hellman Problem,"
Contribution to IEEE P1363a.
http://grouper.ieee.org/groups/1363/contributions/dhaes.pdf
(temporary URL), or
Theory of Cryptography Library.
http://philby.ucsd.edu/cryptolib/1999/99-07.html

[CONCRETE] M. Bellare, A. Desai, E. Jokipii and P. Rogaway,
"A concrete security treatment of symmetric encryption: Analysis
of the DES modes of operation."
Preliminary version in Proceedings of the 38th Symposium on
Foundations of Computer Science, IEEE, 1997.
Current version at
http://www-cse.ucsd.edu/users/mihir/papers/sym-enc.html

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOPD0pTkCAxeYt5gVAQFLWwf/budX9tcCBR9MF9oNBgenK125ESzX2wAg
Z0ylmfP4z4sMOlioI/nv7GdxdEXnBxyly6EdH1GZ95py+lDJYCddIo5geTpkArvV
4YvZx35290rB3ik3Cn1LI1sUDCshBcjKMRZp5JzfTWufb16VrS7jNrEBruGvxv3f
luT7t4DgW55r57tlv7AbHX8T3Xj4VtY4qKrI+C5H4j+XeCmVNSv2P9pPyXenotP8
O44F1KyKgzXfZLhlsOLsUoPGDQV6hJw520T3KkgRNzu0FMEhEIECrQCb46fQPfZ5
+OJugh76N0yETsEp3D40ed0Ura+/ZJyBgYjko3VRsRVHW+loUkclow==
=aTyy
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/DQAiPLydNCQ/m/JUtcaV6538oJ", "n_sections": 24}, {"thread": "EL9uR9KypPY", "msg": "p_KffTaCb4sJ", "author": "David Hopwood", "date_disp": "Mar 31, 2000, 3:00:00\u202fAM", "subject": "Crypto Webpages", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Steve K wrote:
[...]


> Some of my favorite places to go beat my head against the wall of
> mathematical ignorance:
>

John Savard's site:
> http://fn2.freenet.edmonton.ab.ca/~jsavard/index.html

RSA Labs FAQ:
> http://www.rsasecurity.com/rsalabs/faq/

Handbook of Applied Cryptography home page:
> http://cacr.math.uwaterloo.ca/hac/

Counterpane home page:
http://www.counterpane.com/

Cryptography Research home page:
http://www.cryptography.com/

Lars Knudsen and Vincent Rijmen's Block Cipher Lounge (also AES Lounge):
http://www.ii.uib.no/~larsr/bc.html

NIST AES home page:
http://aes.nist.gov/

Lists of crypto researchers' home pages, from Counterpane,
Cryptography Research and David Wagner:
http://www.counterpane.com/researchers.html
http://www.cryptography.com/resources/authors/index.html
http://www.cs.berkeley.edu/~daw/people/crypto.html

Counterpane index of cryptography papers available on-line:
http://www.counterpane.com/biblio/

Cryptography Research index of on-line CRYPTO & EUROCRYPT papers:
http://www.cryptography.com/resources/papers/index.html

The Theory of Cryptography Library (recent papers, mainly since 1996, on
cryptography and cryptanalysis):
http://philby.ucsd.edu/cryptolib/

Helger Lipmaa's Cryptology pointers:
http://www.ioc.ee/home/helger/crypto/

Crypto-Log: Internet Guide to Cryptography.
http://www.uni-mannheim.de/studorg/gahg/PGP/cryptolog1.html

Thomas Jakobsen's page on Cryptanalysis of Block Ciphers.
http://www.mat.dtu.dk/persons/Jakobsen_Thomas/capapers.html

My crypto pages (under heavy construction):
http://www.users.zetnet.co.uk/hopwood/crypto/

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOOQnmDkCAxeYt5gVAQHZ8QgAx8VtZ7dMRqVeqpbkkDCELB6wJ94UoTNf
IB4kzZ9MJs3gaqGr9Md2hixEj96n96xzM4um2Ip9zm6Z0X/Th2IIhaqsXZun2UPl
v4SckOAIMu+InPm5uMgxQGcRnAmQMX1GOA1vclIbtBn204b3Aj0dtsewnfGzG9NF
Is2spvVO2mKhROfk0Ob+7+AFBeiKlwuMqBh2p9n/VWdietoDZwxRaeqToi0o41gF
BWlMl6acMzjEET4CSZvlnYg3XN839vSZLDqtAwbFWXC9fauISCK/QX7ty9sBgYSC
+18jR7keqRejcN8cii/5VbzBfy4ieSz5+E+Eek3+ueQSyt75H+I4mg==
=pbFy
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/EL9uR9KypPY/m/p_KffTaCb4sJ", "n_sections": 3}, {"thread": "G3eLsWDD4FU", "msg": "-1CBFnlPoNEJ", "author": "David Hopwood", "date_disp": "Mar 2, 2000, 3:00:00\u202fAM", "subject": "Microcontroller Cipher", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Gary wrote:
> Microcontroller Cipher.
>
> I'm using an 8 bit microcontroller and am implementing the following simple
> variation of a Feistel cipher.

> Let the 128 bit key K have bits k0,k1,k2,....,k127.
> I have a block of memory 16 bytes long. I split this into 2 halves, 8 bytes
> each.
>
> To Encrypt:
> If k0 is set I XOR the second half to the first, otherwise if k0 is clear I
> ADD the second to the first.

> If k1 is set I XOR the first half to the second, otherwise if k1 is clear I


> ADD the first to the second.
> and so on... for 64 rounds.
> Note:Adds are carried across the whole of the 8 bytes (64 bit ADD).

This doesn't sound very promising; in fact I seem to remember something
quite similar being proposed and broken here before. The main problem is that
XOR is very similar to ADD, since it only differs in the treatment of carry.

Just off the top of my head (and with a lot of handwaving), I think that
given a small amount of known plaintext, you can solve for the lowest order
bit (for which XOR and ADD are identical), and then progressively work up
through the higher bits, using information obtained from the lower bits.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOL31XDkCAxeYt5gVAQFkQwgAzWT2Iy5Ot7un1S5ibEen6Zxfe8Fx1IXk
WfCHa+EMBThFuaLcmWMxcoffRQOiBVI98XwE06d2RRsJipJDKkvW0/fLhkJXXO+A
nau2R5kX8ZNMtr6ghaVoffF3S6gxaDijT4xDvc13BzywvmQwZgA/oVaZDEt2pL73
0De3K9cEtNuZHEIy/TAbHlo/k1YelbYlPuN35d5e3/bypX/kKn+uuKpr/GgQeLIk
/g5PkEjvQuGddJMYRC61vHRBlf0QloH4L9vjwmRWKSrVDPcKlqCZK3KxXgYZIRCk
Wnt3AYe6riGcmSZUtn1YGYiOrXYW6Hr78jbNjjIdrACxmKd8hZGULw==
=8q6b
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/G3eLsWDD4FU/m/-1CBFnlPoNEJ", "n_sections": 6}, {"thread": "G3eLsWDD4FU", "msg": "clpCbYbtJS8J", "author": "David Hopwood", "date_disp": "Mar 3, 2000, 3:00:00\u202fAM", "subject": "Microcontroller Cipher", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Gary wrote:
> Purely from an academic point of view is it possible to use a key's bits
> ONLY to conditionally (using the choice of 2 exclusively non linearly
> compatible mixing operations) mix two halves 'securely'?
> No S-Boxes, No accumulating sums to mix in, just the original data.

I'd be extremely skeptical about such an approach: it sounds as though it
would be very vulnerable to known or chosen plaintext attacks. Any common
property of the two mixing operations could potentially be used in much
the same way as a linear or differential characteristic. Even if it could
be made secure, it would probably require so many rounds that it would
not be at all competetive with other modern ciphers.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOL850TkCAxeYt5gVAQGuKgf9HeoRVo+zet8tbZ+vVlfbo9bujSqYFoRw
F32P0/gAmfvKWX+gsWp7lrIrbMyLtZdG5a4mWmNEGZd763E4/vH1gzCVocn+DBc0
P6sKl9kRDKRslJRAigdadGtS31aZBC2nmIjL6kcsWNCpOxa+924gbku54wgUgKZ8
QCCBjpIdFIuXc/wWB0v42vFstmNP51Nw9hfJJj1XtrmwqiwmnsUVl5rgu5glPeva
RMbgQrTf+ob3felzm9zBxKU2nGYBem7Kpaz3tg/ZXEnXaB6ZyBtQHeS8u74bC8y9
RS+JziETX7bl4L/OzywKxdTDLhPHiZS5ZlUzSkzmaGyyjMKz4yhh5A==
=3vYb
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/G3eLsWDD4FU/m/clpCbYbtJS8J", "n_sections": 6}, {"thread": "GBwvG1qgb90", "msg": "Zpeu7QEdN_IJ", "author": "David Hopwood", "date_disp": "Mar 21, 2000, 3:00:00\u202fAM", "subject": "pedagogical provably stupid protocols", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David A Molnar wrote:
>
> Does anyone know of any simple examples of protocols which can be
> "proved" or otherwise convincingly and *correctly* argued as "good" --
> but according to a fatally flawed definition of goodness?

Yes, quite a few. For example, I recently posted a key exchange protocol
here, called XDH, and a problem called XDHP that its security was based
on, with a precise and formal proof that XDHP reduced to DHP.
Unfortunately, the attack model didn't include an impersonation
attack.

Some other examples are:

[PW91] B. Pfitzmann, M. Waidner,
"How to Break and Repair a 'Provable Secure' Untraceable Payment
System" (Extended Abstract),
Abstracts of Crypto '91.

[PW95] B. Pfitzmann, M. Waidner,
"How to Break Another 'Provably Secure' Payment System,"
Proceedings of Eurocrypt '95.

[DB93] Y. Desmedt, M. Burmester,
"Towards Practical 'Proven Secure' Authenticated Key Distribution,"
1st ACM Conference on Computer and Communications Security
(ACM November 1993) pp. 228-231.

These examples come from:

[AN95] Ross Anderson, Roger Needham,
"Robustness Principles for Public Key Protocols,"
Advances in Cryptology - Crypto '95 Proceedings,
Volume 963 of Lecture Notes in Computer Science,
Springer-Verlag, 1995.

which is well worth reading (I could have anticipated the attack on XDH
by considering principle 6).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBONbSujkCAxeYt5gVAQFfVAf/VvldyLdCgBpij6g9wtNJ/LDFAGVxj1w9
/bR3lU4uiIr2OlFsAh4ibdIQ2ud7z+zZnX0sAl0H+oigHmi/6jRAI3eX+URnj3J+
tBOwHrQrDeV0vyobp+TtLom/fDfTfwv5cZbEp4kXbFleS3cYcPgdogwQEpRBKN9v
Lz1s+PJ5kc59w5XxthPxLo4vK7QExE5ZAh40aScwTtkW9pC3d1o7V99NuGdx8dRJ
0wzpNqTC/M7dVIopoX1yP7IksEV6nUXFRHrYTX5HpHkrbxJDipM/asTk5T6arwwJ
eZswL/JhGph7ZCIipqmTTmSUDAnIkKH4X69C43GfIrerqiGhAgmXaA==
=9Vfb
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/GBwvG1qgb90/m/Zpeu7QEdN_IJ", "n_sections": 8}, {"thread": "GxeX7Zopulw", "msg": "yoGE_oqkHTQJ", "author": "David Hopwood", "date_disp": "Mar 6, 2000, 3:00:00\u202fAM", "subject": "avoid man-in-the-middle known plaintext attack using a stream cipher", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

ant...@my-deja.com wrote:
> In article <89u5pg$dlr$1...@blowfish.isaac.cs.berkeley.edu>,


> d...@blowfish.isaac.cs.berkeley.edu (David A. Wagner) wrote:

> > In article <89tu0t$2uc$1...@nnrp1.deja.com>, <ant...@my-deja.com>
> > wrote:
> >
> > > It's well known that in some case stream ciphers are vulnerable


> > > to a "meet in the middle known plaintext" attack.

> > > if P xor S = C the attacker that known P can
> > > obtain S and replace P with an arbitrary P'. How is possible to
> > > avoid this problem?
> >

> > First off, this is not what is meant by a "meet in the middle"
> > attack.


>
> Sorry, what's the right name for this kind of attack?

The subject line is correct: it's a special case of a man-in-the-middle
attack. Even though man-in-the-middle covers a wide range of attacks,
I haven't heard it called by any more specific name that that.

(A meet-in-the-middle attack, BTW, is an attack that splits the key
to some keyed function - e.g. a cipher - into two parts, and uses
a collision search to find these parts, with a work factor that is
usually proportional to the square root of the work that would be
taken by a brute force attack.)

> > Second, the right solution is to authenticate the text using a
> > separate crypto-algorithm, usually called a MAC. Favorites
> > includes SHA-HMAC and TripleDES-CBC-MAC.
>
> No, I cant

> A stream cipher is very useful to encrypt a socket in the
> case of a telnet-like connection since if you use a block
> cipher you needs to spent more bandwidth.

Yes, but there's really no secure alternative to spending more
bandwidth (for example by splitting the stream into blocks, each
of which is authenticated, as SSL/TLS does).

> In this case you can not use a MAC since you need that every byte
> reach the destination ASAP.

On packet-switched networks, there is a significant amount of
overhead associated with each packet anyway. Whereever possible
Telnet should be used in line-buffering mode; in that case
the overhead of encrypting and authenticating each line (normally
one per packet) is not very great. Using it in unbuffered mode is
fairly inefficient regardless of whether encryption is used.

Telnet is also an example of a protocol where, for the uses to which
it is typically put, authentication is absolutely essential (and
does need to be applied to every byte). Therefore you have to just
bite the bullet and implement it, and live with any resulting
inefficiency. The problem is not really all that bad; it only looks
bad if you consider the overhead relative to the *payload* size,
which distorts the actual bandwidth and processing costs involved.

> To use some material from the keystream to setup an sbox
> _if it is secure_ is a possible solution? if you scramble
> the sbox every X bytes is even better? The problem is that
> I want to learn from a cryptographer if it is/isn't secure 8)

If a single byte is accepted without having been sent by the
legitimate party, that would be sufficient to cause security problems
that can be practically exploited in many applications.

The only reliable way to be able to reject invalid packets, is for
the authenticated ciphertext of each packet (regardless of whether
it represents one byte or 10KB of plaintext) to contain more
information than the plaintext, by at least some minimum amount.
In practice, this means that it must be longer than the plaintext
after compression.

It's not difficult to show that the ciphertext must be at least n
bits longer than the plaintext (after compression, if used), to get
a 2^-n probability of incorrectly accepting a packet.

The most obvious, and a robust way of doing this is to append a MAC,
with an output length of n bits. In principle it might be possible to
combine the authentication with the encryption for performance reasons,
but previous attempts at doing that (e.g. PCBC, iaPCBC, CBCC) have
not been resounding successes from a security point of view.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMMC/jkCAxeYt5gVAQFx2ggAyv/sThkLDX9UwcrjoPJ5fTxhjwkTIU7+
spXAvY0gSZguAJcWYvYKITtskagLY57AqP9jXmFQSMQSFPH4sgFv7++rOKpfcTkq
YI4tnGEOH3JhUi9FuiEiKBkRiAabkcCcQmzWSd89/E7Bc0K5PcRpTQjILy/3hR4E
s3aXW6MzCOd7bhC2mzWDovhzZSSzrhw/BYbJtBflFs5ZrrecUgKaBjpTlmdNWhqL
zn8s+8sQuBKj/VS1bfmnZVZGHk0lGepsd4zF5Su8+XS27J4/Xj70zOubczS3YIcS
bVdcpyj7HWflUPjOncX9Ou2ES/LsoB7tZeu4O+M+vKKmFUUi7fx2hg==
=5eMM
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/GxeX7Zopulw/m/yoGE_oqkHTQJ", "n_sections": 28}, {"thread": "GxeX7Zopulw", "msg": "mX80EuBDXDIJ", "author": "David Hopwood", "date_disp": "Mar 6, 2000, 3:00:00\u202fAM", "subject": "avoid man-in-the-middle known plaintext attack using a stream cipher", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

henrick....@telia.com wrote:
>
> I would suggest an error propagating protocol. If you use e.g. WeakCipher
> which based on a "P-CFB" mode (is it really called that?) you will neither
> increase the bandwidth nor have to wait for a signature, and the entire
> message after any altered bit will be complete gibberish. A "bit flipping
> attack" won't work either.

I can think of two possibilities for a CFB-like mode with plaintext feedback.
One is:

C[i] = P[i] XOR E_K(C[i-1] XOR P[i-1])
P[i] = C[i] XOR E_K(C[i-1] XOR P[i-1])

where C[0] = IV and P[0] = 0.

However, that doesn't appear to be error-propagating, so maybe you meant
this:

C[i] = P[i] XOR E_K(C[i-1]) XOR P[i-1]
P[i] = C[i] XOR E_K(C[i-1]) XOR P[i-1]

If so, this appears to be vulnerable to the same type of block transposition
attack that works against PCBC. Suppose the original ciphertext C[1..3] is
changed to C'[1..3] = C[2], C[1], C[3].

Then the original plaintext was:

P[1] = C[1] XOR E_K(IV)
P[2] = C[2] XOR E_K(C[1]) XOR P[1]
= C[1] XOR C[2] XOR E_K(IV) XOR E_K(C[1])
P[3] = C[3] XOR E_K(C[2]) XOR P[2]
= C[1] XOR C[2] XOR C[3] XOR E_K(IV) XOR E_K(C[1]) XOR E_K(C[2])

whereas the receiver calculates:

P'[1] = C'[1] XOR E_K(IV)
= C[2] XOR E_K(IV)
P'[2] = C'[2] XOR E_K(C'[1]) XOR P'[1]
= C[1] XOR C[2] XOR E_K(IV) XOR E_K(C[2])
P'[3] = C'[3] XOR E_K(C'[2]) XOR P'[2]
= C[1] XOR C[2] XOR C[3] XOR E_K(IV) XOR E_K(C[1]) XOR E_K(C[2])
= P[3]

(and the subsequent plaintext blocks are also unchanged).

My advice is to be highly skeptical of modes that claim to be able to do
integrity checking at the same time as encryption.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMMtQjkCAxeYt5gVAQGKpwf+KlYkegXX4JT8FqDZgJ6uCL+HMe2WZ3P5
I6WFwXUU/AcjXXVwTPujWEgb2zrhyJrrBPvJHiD3WqkqAktfgVU8m9UHpNbBAd+b
tdDNHPXZsAVN39v2rEMkzUMuPjQVIjdXVMeMlYTYH7ICgq7Wc+OuWjH48zj2PC9l
dJbj5J6+JcqaH0KC9XFJpexmeDt1Vvwf44WfYU0uFBxpyMiEK5viL4pJisseNkBV
wTArGCU6SCQgD5AOe2s+fr63K2Nw7Rua8LdjiEpXskEKo8stkFgbsl4YomBrwdBV
gtPja5Kxm7TbqhcBISOuWfrMMDj2wtee3eQnZFfJwD2FV6+TQMmOlg==
=Lhjj
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/GxeX7Zopulw/m/mX80EuBDXDIJ", "n_sections": 28}, {"thread": "GxeX7Zopulw", "msg": "ZLOU4PQMJHMJ", "author": "David Hopwood", "date_disp": "Mar 7, 2000, 3:00:00\u202fAM", "subject": "avoid man-in-the-middle known plaintext attack using a stream cipher", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

henrick....@telia.com wrote:
> In a previous article, David Hopwood <hop...@zetnet.co.uk> writes:
> > I can think of two possibilities for a CFB-like mode with plaintext
> > feedback.
>

> This is what I meant. [...]


> S[I]: Ith byte of an OTP,

I'm not sure why you would want to use a scheme based on a conventional
cipher, when an OTP is available. In situations where it is feasible to
use an OTP, there are provably information-theoretically-secure mechanisms
that can be used to ensure integrity (for example based on universal
hashing).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMR3jDkCAxeYt5gVAQE4mAgAwdEvAcq6sk8rQnuflCUoxsTdAma9HAhd
9MDy3Kwz5wmLJguZ0vQy1V5fabJPWu3QhNLQe6AbI6Kq4Mc5QaaQJGMIfkQ8g7Q4
2aQBHSjBFF9BXJsnfxK1B/juAoLrYVpigIzhR0KI7LzbdtfGu753tJuNQHg1HxIj
LVEkPii8mxUwoh7gEurg9ux3yHjT+vpNK3ItxiS3z+JEvvGqi0FWRHarbMI7OsF/
s5rp/e3vphe6K48wFCPl+Tf6yQBEdrHprcgXx60vivQXR2ug6v0XrVTIXwNyFzy1
1sjlJIESHns7lN72nQr9iPAAbcEUY/w4+evGOc7Mk1l/y7MPFZJmGA==
=//XU
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/GxeX7Zopulw/m/ZLOU4PQMJHMJ", "n_sections": 28}, {"thread": "GxeX7Zopulw", "msg": "O-oO79o3uQwJ", "author": "David Hopwood", "date_disp": "Mar 7, 2000, 3:00:00\u202fAM", "subject": "avoid man-in-the-middle known plaintext attack using a stream cipher", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Adam Back wrote:
> David Hopwood wrote:
> > The most obvious, and a robust way of doing this is to append a MAC,
> > with an output length of n bits. In principle it might be possible to
> > combine the authentication with the encryption for performance reasons,
> > but previous attempts at doing that (e.g. PCBC, iaPCBC, CBCC) have
> > not been resounding successes from a security point of view.
>
> What is iaPCBC? or is this a typo?

iaPCBC is "integrity aware Propagating Cipher Block Chaining", by
Virgil Gligor and Pompiliu Donescu, as described in [1] and [2].

It was broken by David Wagner et al at Counterpane in [3] (despite
a "proof of security"). There was also a thread about it in sci.crypt [4].

(Gligor and Donescu have proposed a modification to their scheme [5] to
attempt to fix this attack, but I'm not convinced that the modification
is sufficient, and it doesn't appear to address the flaws in the security
proof.)

Incidentally, an attack on the use of PCBC for authentication in Kerberos
version 4 is documented in [6], and an attack on CBCC in [7].


[1] Virgil D. Gligor <gli...@eng.umd.edu>,
Pompiliu Donescu <pomp...@eng.umd.edu>,
"Integrity-Aware PCBC Encryption Schemes,"
http://www.research.att.com/~smb/papers/iapcbc.ps
November 11, 1999.
[An earlier version was presented at the 7th International Workshop
on Security Protocols, Cambridge, U.K., April 1999. An abridged
version will appear in "Security Protocols", LNCS, Springer-Verlag,
B. Christianson, B. Crispo, M. Roe (eds.)]

[2] Virgil D. Gligor, Steven M. Bellovin,
"An iaPCBC Transform for IPsec,"
http://www.research.att.com/~smb/papers/draft-bellovin-iapcbc-00.txt
(IETF draft; work in progress, expires May 2000.)

[3] Niels Ferguson, Doug Whiting, John Kelsey, David Wagner,
"Critical Weaknesses of iaPCBC,"
November 24, 1999.
Possibly at www.counterpane.com; if not then ask the authors.

[4] Go to www.deja.com, and search in sci.crypt for a subject field
containing iaPCBC.

[5] Virgil D. Gligor,
Private email to me and to the authors of [2].
(I don't know whether this proposed fix has been published.)

[6] John T. Kohl,
"The Use of Encryption in Kerberos for Network Authentication,"
Advances in Cryptology - CRYPTO '89 Proceedings,
Springer-Verlag, 1990, pp. 35-43.

[7] A. Menezes, P. C. van Oorschot, S. A. Vanstone,
"Example 9.89 (CBC encryption with XOR checksum - CBCC),"
Handbook of Applied Cryptography, CRC Press, 1997.
http://www.cacr.math.uwaterloo.ca/hac/about/chap9.pdf, .ps

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMR3NDkCAxeYt5gVAQEbOQgAqf1GEmYTTgGZgMt8QHLYqaaV/KiPR9Ih
/QbyDeZLfdCkN6EfLrLnxOp0ZdU7RQOa/VyOrisaHgRGU52hWY2abLeqaoNZpxwY
eV2GSGLWB3TLSlI5z29BdcQStPg+iyWXH81a1ZY1puzUi4UKT9nhfVXRVcQKmF/h
zv+0+luJxknpViWdgefbY9Qs9BAFGgg+Y5RE2430Tnv+BZwf1Ldumtb7jpEYeZJo
oWQFOLEem2RMP5xhigQhqHuwkQWhMuhdjFFP1BGV1bQgly0192RDDeUn64BiE8aZ
x5S+J8Tfi2YDaSv1kLXRUH221K/g1E6xVmt8VljDJJMyNRgv11YXqg==
=RSW2
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/GxeX7Zopulw/m/O-oO79o3uQwJ", "n_sections": 28}, {"thread": "GxeX7Zopulw", "msg": "MbqHXqroYqgJ", "author": "David Hopwood", "date_disp": "Mar 23, 2000, 3:00:00\u202fAM", "subject": "avoid man-in-the-middle known plaintext attack using a stream cipher", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Scott Fluhrer wrote:


> David Hopwood <hop...@zetnet.co.uk> wrote:
> > iaPCBC is "integrity aware Propagating Cipher Block Chaining", by
> > Virgil Gligor and Pompiliu Donescu, as described in [1] and [2].
> >
> > It was broken by David Wagner et al at Counterpane in [3] (despite

> > a "proof of security"). [...]


>
> Huh? I thought that they made two claims in their original paper:
>
> 1. It was difficult to forge messages without knowing the key
>
> 2. It was more secure than CBC mode
>
> I though David Wagner disproved claim 2, but I thought claim 1 is still
> valid (or at least, not disproven yet).

Wagner et al disproved both claim 1 and claim 2. That is, iaPCBC (as presented
in Gligor & Donescu's original paper and Internet Draft) is broken as a means
of ensuring integrity, and also it doesn't provide significantly better
confidentiality than CBC (it is no worse in that respect than CBC, but
without the integrity feature there's not really any point in using it).

> If I'm wrong, I'd like to know the details.

I don't know whether [3] has been published yet, but you can probably obtain
it from David Wagner.

[1] Virgil D. Gligor <gli...@eng.umd.edu>,
Pompiliu Donescu <pomp...@eng.umd.edu>,
"Integrity-Aware PCBC Encryption Schemes,"
http://www.research.att.com/~smb/papers/iapcbc.ps
November 11, 1999.
[An earlier version was presented at the 7th International Workshop
on Security Protocols, Cambridge, U.K., April 1999. An abridged
version will appear in "Security Protocols", LNCS, Springer-Verlag,
B. Christianson, B. Crispo, M. Roe (eds.)]

[2] Virgil D. Gligor, Steven M. Bellovin,
"An iaPCBC Transform for IPsec,"
http://www.research.att.com/~smb/papers/draft-bellovin-iapcbc-00.txt
(IETF draft; work in progress, expires May 2000.)

[3] Niels Ferguson, Doug Whiting, John Kelsey, David Wagner,
"Critical Weaknesses of iaPCBC,"
November 24, 1999.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBONmVoTkCAxeYt5gVAQE6fQgAusKC3SsH4LOUWW9nyNh4CB6thLgMIS69
g3LmlL+6nWFCSwU0mfUh0WsWhROyq7ApkCbt5eMIg3cVVs93+9lXLnnuFPtHFPVh
Ao/z6bgb77a265QlMXk432s+ip5eGVYE3IFy5Vhcnaw1Oxux1WIp2Nnp7OLbrCcL
4v5zI+bldDMbPuGIfbH2T9zQmWxqEnRQCmUhRmM52gGhbYisobYs8NXc5EMje+T0
4VU6S2/3zJX8ASTRWGjhZHJ7xjONWQ9a6LjQo6WCrzzGfvorYz0Q0d6zkG/B/4JN
b/Z6LiTJ6PoBaOoCiP4RXdUbPs/5JosBA8WaWfoAcGwRk21TUOfeVQ==
=+gq6
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/GxeX7Zopulw/m/MbqHXqroYqgJ", "n_sections": 28}, {"thread": "Mfhe9XA_lRk", "msg": "0lMmFnAAiJ8J", "author": "David Hopwood", "date_disp": "Mar 2, 2000, 3:00:00\u202fAM", "subject": "Ciphering = deciphering; is this a weakness?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

henrick....@telia.com wrote:
> In a previous article, "Manuel Pancorbo" <man...@esperanto.nu> writes:

> >I think there is a small weakness under a known plaintext attack; if the

> >attacker needs (2**M) plaintexts to break the cipher, the involution

> >property makes twice easy the work: (2**M)/2 =3D (2**(M-1)); if M is,

> >let's say, 50, then the new exponent drives to 49: not so much help!
> >

> >I love too much elegance; so if this is the only weakness I will design


> >the cipher with involution property.

It is not the only weakness. Normally, modern ciphers are designed to
be secure against chosen plaintext attacks. A chosen plaintext attack
against a block cipher that is an involution (when used in ECB and CBC
modes) obviously allows any given ciphertext encrypted with the same key
to be decrypted.

> BTW. Any cipher run in OFB mode posses the property of having the same
> encoding function as decoding function.

A cipher in OFB mode is only used as a keystream generator, with the
keystream used exactly once, and therefore chosen plaintext attacks aren't
applicable. I.e. it's not valid to infer that the involution property is
safe for a block cipher in ECB or CBC mode, just because OFB has this
property.

(It's also not worth designing a block cipher that is only safe when used
in OFB or CFB modes; you might as well design a dedicated stream cipher
instead, since that can probably be made faster.)

Note that the AES candidate MAGENTA had an involution-like property
(with an extra swap of halves of a block), and that property would
certainly have been sufficient to disqualify it from consideration in
the second round of AES, even if it had not had other severe security
and performance problems.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOL3qnDkCAxeYt5gVAQEW2Qf/XGv7+2JroePnthkO94UZSJgv7CXVTE9G
Dlnuj6Bk2+DaVF/EsH6CfD2e/bBUYBO/VqqVDTX2v9UB8Ke0IZMUF1j0ORvoapvR
FUGOTlb/RUeKT7bD3uu3iEHt6C1B0XXlwKhegc9RO+WvbYbEcqfjGR8U/fKhLtc1
+nb5LeN5SH16wg84A352YhhZEYmNw3WXQJmg9uNkniQuXLl1GEkNkYBgEB3uXjgu
imt23ejwDnID5cBRamUYIwzau9dPzdv/69F7QSbfmzcBJSvfTFo8cJpWwTHgPByh
gWcTTbQbKmSmB2vRQHXaeTlqy5vqZVFLkWbB/7XDy5XPxS0xn4ux+Q==
=03tI
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Mfhe9XA_lRk/m/0lMmFnAAiJ8J", "n_sections": 15}, {"thread": "NuOtgEKPKAw", "msg": "toviZegxOkoJ", "author": "David Hopwood", "date_disp": "Mar 4, 2000, 3:00:00\u202fAM", "subject": "CLSID and Security", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"John E. Kuslich" wrote:
> I was reading the Microsoft documentation on COM objects and how CLSID's
> are used to provide, with almost absolute certainty, a uniquely identifying
> number. This number is used to identify interfaces for COM objects across
> any arbitrary boundary.
>
> They then go on to say that these CLSID's are not linked to the ethernet
> MAC address for security reasons.

Where do they say that? It's not correct: CoCreateGUID does use the MAC
address when it is available.

(In general, all of Microsoft's documentation has to be taken with a
healthy degree of skepticism, especially with regard to security. In
particular, they often document what somebody thought should happen,
rather than what somebody else implemented.)

> Well, when I compute a CLSID using the CoCreateGUID from the Windows API, I
> find that the MAC address of the GUID so created is laying right there in
> the last few bytes of the GUID.
>
> What am I missing here.
>

> I can surely see why the MAC address could be a security risk in some
> situations.

You're not missing anything, AFAICS.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMGbFDkCAxeYt5gVAQG1Bgf+MO9uiGcGUSSFviTaUt/DuF7cAlsETwX5
EwxiSljxyFpUKiOf8phPYFdhwM4WthQl+KvfBedFZXednvEGMV0iHfc2YHJ/G3Oo
yFSCMQd3Zx54KI8zNZU+J1Ef4dWCJzJ41Zw9AvOSXtiU+HvDHGWOWnhhFofsRDgV
NOPw/7nlzkQE3RTleznFUhHO7fry8POCDONfadtHKj1kEENlJlBPN3NTEWWlv1Fw
80PFAyfUGAceCiXhsOBIQbMTe9EhqDDkx7mHGBuPw9NKwpg/ka5qUictRX6Az5Ql
PVEZaCByr2Uqayug2GFaa0eFjHMMIdnrJXLE6+h7FIbeBrdsweTHSg==
=Sle2
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/NuOtgEKPKAw/m/toviZegxOkoJ", "n_sections": 6}, {"thread": "NuOtgEKPKAw", "msg": "QalV32gpAawJ", "author": "David Hopwood", "date_disp": "Mar 5, 2000, 3:00:00\u202fAM", "subject": "CLSID and Security", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Rubin wrote:
[...]


> There was a big ruckus a few months ago (front page article NY Times)
> when Richard Smith discovered that the GUID's contained the MAC address;
> and further, files like Microsoft Word documents and Excel spreadsheets
> contained GUID's which connected then back to the machines that the files
> were written on. I think a GUID like that was found in the Melissa virus
> and that's how they caught the author.

This is very often misreported: the GUID that was found was from a previous
virus that Melissa was based on, by a different author (the GUID is not
assigned when a document is edited, only when it is created). I don't
remember how the author of Melissa was caught, but it was not by this
method.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMHENjkCAxeYt5gVAQGaLAf+KZCHAs8BNa3LrsBYdwPYcXkSEcyRxXs/
mfJsSJmOd3GeVY7uyiR6G2BNaHtREhZ4ZHvs6p+hw4gFXlEXAtWrJwJFNpo/kshX
ATuxukGC7HQK70bCxdinC8cYffYZOYRivqInFFsw3vAju88RagcMcXkqaRAreQBu
agLYwsjkTF1tV4Q88IzZ60KcwBCH89pPYQuBv5TdB/qgpsyUiMj+yH2RtaCwh3IC
wShkCeAs6D5Oo4113QlCMy6enOW8VNK6aY3IJz1iliM/Ni3K5q2P5Ybg3BnocUJ6
nZO06ZkAvknkMDp3DqfR6NUcWEpXpgq8ao7EVv7FmrNHRrOgX5PZ0g==
=FpCY
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/NuOtgEKPKAw/m/QalV32gpAawJ", "n_sections": 6}, {"thread": "O0oqVKz0-PU", "msg": "bws6j0Qiv28J", "author": "David Hopwood", "date_disp": "Mar 21, 2000, 3:00:00\u202fAM", "subject": "unknown verifier designated verifier proofs", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David A Molnar wrote:
> This is another idea I'm trying to work out. It may be (even) less
> comprehensible than the previous posts on "encrypting to unknown
> public key", for which I apologize in advance.

No, I think I've got the hang of what you're trying to achieve now.



> In 1996, Jakobsson, Impagliazzo, and Sako introduced the notion of a
> "designated verifier proof."

(in [JSI96])

> This is a proof of the form
>
> Either a secret S is true
> OR
> I know the secret key of the party V
>
> The party V is called a "designated verifier." The idea is that you can
> use these to build proofs of knowledge which are both non-interactive
> *and* non-transferable. The way this works is as follows :
>
> Say I build a proof of the above form. I show it to V. Then V either
> believes that S is true, or that I've compromised his secret key.
> We'll assume that V believes his secret key is safe. Now he must
> believe S.
>
> If V tries to show the proof to anyone else...well...in most settings V
> knows his own secret key. So there is no reason for anyone else to
> believe that S is true. The proof is therefore non-transferable.

It's worth pointing out that there are alternative ways to achieve this
than the type of designated confirmer proofs described in [JSI96] (neat
as those proofs are).

As it happens, I thought about this some time ago in the context of
signatures without a non-repudiation property (since non-repudiation
is not always required or desirable, and IMHO applications that send
messages on behalf of users should give the user a choice of whether
to make the signature non-repudiable or not - provided of course that
the recipient is able to distinguish the two types of signature).


Here's a motivating story - any resemblance to recent events in the
news, especially
<http://news.bbc.co.uk/hi/english/uk/newsid%5F668000/668663.stm> and
<http://www.the-times.co.uk/news/pages/sti/2000/03/19/stinwenws01040.html>
is coincidental, and names have been chosen *entirely* at random :-)

Let's say that Winston, a whistle-blower, wants to communicate with
Julie, a journalist. Julie is deeply concerned about the erosion of
civil liberties in her native country, Airstrip One (capital London).
She is particularly concerned about a new bill being rushed through
parliament, that will allow the secret police and intelligence services
(of which Winston is an ex-member) to demand private keys, on pain of
2 years imprisonment, and to impose secrecy orders that would prevent
her from reporting this abuse of power on the rather excellent
satirical television program that she is a researcher for.
She also believes strongly in the principle of anonymity of journalistic
sources, for which the authorities of Airstrip One have shown scant
regard in recent times.

So, Julie and Winston agree to use a cryptographic protocol (in
conjunction with an anonymous remailer network) that will not allow
Winston's identity to be proven despite the fact that all of their
communications are intercepted, and even if Julie's private key is
seized, or she is tortured by the secret police. Also, ideally the
communications should be untraceable in both directions, so that if
the intelligence services turn out to be monitoring the ciphertext
of Winston's communications but do not know about Julie, it should
be a complete surprise to them when she publishes her story. If the
private keys are not revealed then all messages should be private and
authenticated, so that impersonation and man-in-the-middle attacks
are not possible, but there should be no way for the secret police
to *prove* that any particular message was sent between Winston and
Julie, or what they said to each other. I.e. it should be equally
possible that the secret police faked any purported proof, and
Winston and/or Julie should be able to produce their own version
that is equally convincing (whether true or not).

> This is an insanely cool tool. There's only one minor drawback - in
> the constructions I know about, you need to know a chameleon
> commitment scheme for which V posesses the secret information required
> to forge decommits. This generally means you need to know the identity
> of V. This is kind of annoying if you want to apply these proofs in an
> anonymous protocol.

> The question : can you create a designated verifier proof for V without
> knowing the identity of V ?

It is possible if you combine the authentication with encryption.
[JSI96] points this out:

# This attack [co-operating verifiers] shows that designation of messages
# is a necessary tool for authentication of private messages. A well-known
# way of doing this is for the sender of a message to encrypt it using a
# secret key that only he and the receiver knows, but this only applies
# to plain messages and not to proofs. Still, it is a form of verifier
# designation, as it allows the receiver of a message to simulate identical
# transcripts, thereby making it impossible to prove that the transcript
# indeed originated with the claimed sender.

I.e. as long as we only require untransferable authentication of messages,
rather than fully general untransferable proofs of knowledge, it's quite
possible to have a recipient-hiding encryption scheme that also provides
authentication, where the recipient is the designated verifier.

[...]
> The problems [with using a blind recipient hiding scheme as the public
> key algorithm in a designated verifier proof]:


> Designated verifier proofs can not be recipient hiding.
> The whole "designated verifier" property depends on
> everyone being able to tell that the commitments can
> be forged by V. If the commit doesn't reveal V's
> identity, then V can simply keep quiet about his
> ability to forge the commit and it's all over.

If the message is encrypted, then V, or someone who gets hold of V's
private key (e.g. the secret police in our story) would have to reveal
sufficient information to decrypt the message, and we can arrange for
this information to allow forging a transcript of the authentication
proof. This is not automatic for any encryption and authentication
scheme, though. For example, conventional, non-repudiable signing
followed by public key encryption won't work, because it is possible
for the session key (or whatever nonce is used to make the encryption
scheme non-deterministic) to be revealed - even though the private key
has not been - and this plus the encrypted signed message is a
transferable proof of authentication.

I have some ideas for how to fix that, but it's a bit early in the
morning here to be doing protocol design, so I'll check it more
thoroughly first.


[JSI96] Markus Jakobsson, Kazue Sako, Russel Impagliazzo,
"Designated Verifier Proofs and Their Applications,"
Advances in Cryptology - EUROCRYPT '96,
Volume 1070 of Lecture Notes in Computer Science (Ueli Maurer, ed.),
Springer Verlag, 1996.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBONcmXjkCAxeYt5gVAQHEGgf/bGLSX8I1a0CQJZAWJb+Y7CuPF6JINtTR
kOc6PERAgfwZUXMnXug6RgtfX0hZe79etZZqOnFioue394wX2zvJwowBhVZYTE7I
ybrRpxOq+pEIQ2EAATjU2b5DIuzOk9ldjBd78WZ6nmWclE//aBKRlRXVENfN6BPA
wORaULz+hgM7EGNORcri5IlX1gwfJgLLSJa6z28Lws+QjjQrw+JTTOirojmLLegC
TIkLA1vCgwh46HA1Vy4EoHD77DqkwHrLeStssHnc6kFdLPJ6Y77rhjePeyy4n0eV
eQDAducb4HLdBj1/bwzNFzWzO+mF/cuUgcxj/kocR0mSjORE+ZmjiQ==
=R8F/
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/O0oqVKz0-PU/m/bws6j0Qiv28J", "n_sections": 2}, {"thread": "P-8u4hqRCOs", "msg": "SSslHizIMrcJ", "author": "David Hopwood", "date_disp": "Feb 2, 2000, 3:00:00\u202fAM", "subject": "KEA gains something with RSA instead of D-H", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

John Savard wrote:
>
> The Diffie-Hellman key exchange method involves one party knowing x,
> the other knowing y, A^x and A^y (mod p) being public, and only the
> two parties can determine A^(xy) (mod p). Note that knowing either
> party's private key is sufficient to derive A^(xy) from A^x and A^y.

Normally, DH is not used with fixed public values for each side. In fact
that is one of its main strengths: because key pair generation is very
fast (one modular exponentiation), ephemeral keys can be used for each
session.

Plain DH does not provide any protection against a man-in-the-middle
attack, so it is very often modified to add authentication. For example,
signing the exponentials with long-term signature keys gives the
Station-To-Station protocol. For STS, knowing even both of the long-term
keys does not allow a passive attack. Knowing a user's long-term key
allows impersonating a user, and knowing both long-term keys allows
a man-in-the-middle attack. (Techniques such as key update, variants of
the interlock protocol, and use of strong password authentication, can
make it more difficult to exploit this, but can't prevent it completely.)

Using ephemeral keys is much less practical for RSA, because RSA key pair
generation requires finding two large primes, which for secure key sizes
is *much* slower than a modexp. (The "DHE_*" ciphersuites in SSL provide
perfect forward secrecy and resistance to known-key passive attacks,
for example, whereas the RSA-based ciphersuites do not.)

> RSA, on the other hand, involves the exchange of messages which, while

> they were composed by the originator, can only be read with the
> private key of one of the parties.


>
> Hence, if a protocol like KEA were used, sending two session keys in
> opposite directions simultaneously, but with RSA instead of
> Diffie-Hellman, with the XOR of the two session keys being used as the
> actual session key, communications would remain secure *even if the
> private key of one party had been compromised*.

I don't see how KEA [KEA] can be adapted to use RSA without completely
redesigning it, but maybe I'm missing something. Standard KEA (the
key agreement protocol, rather than the email variant) is this:

Alice and Bob agree on parameters g, p, and q
(q is the order of g in GF(p)).
Alice has private key xA, public key YA = g^xA.
Bob has private key xB, public key YB = g^xB.
Alice and Bob are assumed to know each other's authentic public key.
(Key validation: check that YA and YB are elements of the order-q subgroup)

Alice: RA = g^rA mod p (rA is chosen randomly).
Bob: RB = g^rB mod p (rB is chosen randomly).

Alice -> Bob: RA
Bob -> Alice: RB
Alice & Bob check that RA and RB are elements of the order-q subgroup.

Alice: tAB = YB^rA mod p
Bob: tBA = YA^rB mod p
Alice: uAB = RB^xA mod p
Bob: uBA = RA^xB mod p
Alice: w = (tAB + uAB) mod p
Bob: w = (tBA + uBA) mod p

Alice & Bob check that w != 0, and derive a key from it (details omitted)

This is quite similar to some of the MTI* protocols, for example
MTI/A0 [HAC Protocol 12.53] and MTI/C1. It's also similar to a protocol
I designed myself (unpublished, called SID-3-DH), in which the agreed
value is g^((xA + rA)(xB + rB)), rather than g^(xB.rA) + g^(xA.rB).

[This is more efficient than KEA, because

g^((xA + rA)(xB + rB)) = (YB * RB)^(xA + rA)
= (YA * RA)^(xB + rB)

can be calculated by each side using only one modexp, not two. Like KEA,
a prime-order subgroup can be used with the exponents taken mod q. Some
additional checks and constraints on the parameters are needed, though.
It can be proven that calculating the agreed value from the information
available to the attacker reduces to DHP, for various reasonable attack
models. I will publish this protocol at some point, but I've been busy
with other things recently.]

How were you intending to adapt KEA to use RSA?

> (There is, however, no inherent immunity to the man-in-the-middle attack.
> But if one party has access to a better key certificate database - or
> more secure access to the certificate database - than the other, then
> KEA with D-H will also help avoid that attack. Perhaps that is its
> point.)

Yes, but STS, MQV, and most other authenticated variants of DH that I'm
aware of also have this property.

[HAC] A. Menezes, P.C. van Oorschot, S.A. Vanstone,
Handbook of Applied Cryptography, CRC Press, 1997.
http://www.cacr.math.uwaterloo.ca/hac/

[KEA] NIST,
"SKIPJACK and KEA Algorithm Specifications,"
Version 2.0, 29 May 1998 (published 24 June 1998).
http://csrc.nist.gov/encryption/skipjack-kea.htm
http://jya.com/skipjack-spec.htm (HTML version)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOJdwyDkCAxeYt5gVAQG9yQgAlDFAV6K4aXthtfycQvGOL1w9i6nNuTEm
BCphzkRViBE5SCnfqEyBZHNLa2M3KIygHJgXZSVwvrgQ0ZftEU0oG/vPmEOwPon6
2yEYNEcUZqg8lKNSzXagjzlrUibxawMFkkzoPC1oQtRbqW0wrWbmHB8H2EwN1tuk
XfHkpzqlJL8OEex0c0FHqAFAXG6FHEyD3qlJS6tXyoZjsy/fesyieeeLYvWtEU2P
CK/W2aeOtAEGyERB/Db0zS05OSJhB1O7iKA5BNmhL/UN55U9QPYBjzCldkpxIOb6
OGBN45TkkKm2pOgP81zrAq9i7TNAjNzq656PskWomUsjpH9dvWyDgw==
=jFDy
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/P-8u4hqRCOs/m/SSslHizIMrcJ", "n_sections": 17}, {"thread": "P-8u4hqRCOs", "msg": "CI7Gy593A7gJ", "author": "David Hopwood", "date_disp": "Feb 4, 2000, 3:00:00\u202fAM", "subject": "KEA gains something with RSA instead of D-H", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

John Savard wrote:
>
> On Wed, 02 Feb 2000 01:19:25 +0000, David Hopwood

> <hop...@zetnet.co.uk> wrote, in part:


> >How were you intending to adapt KEA to use RSA?
>

> I was simply thinking that A sends session key 1 to B using B's public
> key, B sends session key 2 to A using A's public key, and then the XOR
> of the two session keys is actually used for the message.

Just as an interesting historical note, I believe this was first proposed
in 1984 (with a report of an implementation using an 8085 chip):

S. C. Serpell, C. B. Brookson, B. L. Clark
(British Telecom Research Laboratories),
"A Prototype Encryption System using Public Key,"
Proceedings of CRYPTO '84, pp 3-9.

It's on the Springer-Verlag CD-ROM for the CRYPTO and EUROCRYPT
conferences.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOJpCnzkCAxeYt5gVAQHM0Af/QAXZ1yxqeFcqYXTtKraU9Fk81o3SPKf7
wq8m0+UJyWzPAKSOnFxnCvzKjXMSY0wx5feU++er1qqsd5PT8kowKf81b9wxbDP9
CE3l4iZ7gkqyxhLKqIC2N2lInDz9AKJ9jymsTRUgDI/MvVFVQAfgkBMugDQRezJJ
kOdu7+hpujcKoqqEtrFqpjxE0H3GSIyN/63mDvo2uqHj9IiwJ/y5qR/zGsIey4YG
6Yq5ZWc7RiXvIwIH/E3QQVh0gzlt9/qCMcZHwSztw05BkyfJ01RbZspyqALqf+vd
y+g5oslKdDgpCJZpA+yIKn7JExQvEjjpUsqvkSHZr/Qxml3rcLYcCw==
=9dHM
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/P-8u4hqRCOs/m/CI7Gy593A7gJ", "n_sections": 17}, {"thread": "P-8u4hqRCOs", "msg": "X23KGC4p_uIJ", "author": "David Hopwood", "date_disp": "Feb 4, 2000, 3:00:00\u202fAM", "subject": "KEA, and XDH", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Doug Stell wrote:
>
> On Wed, 02 Feb 2000 01:19:25 +0000, David Hopwood

> <hop...@zetnet.co.uk> wrote:
[...]


> > Alice and Bob agree on parameters g, p, and q
> > (q is the order of g in GF(p)).
>

> While the use of DSA-style parameters is suggested in the
> specification, it is not technically necessary. KEA works without
> having a q-parameter.

Provided that you still check that RA and RB are of large order, yes.

[...]


> Incidentally, the CA also checks that YA and YB are elements of the
> order-q subgroup, before it signs the certificate. This is not in the
> KEA specification, but is a part of the CA requirements. The KEA
> specification is simply focused on the two communicants, rather than
> the CA.
>
> The reason for this check can be found in a paper by Lim and Lee.

Do you have a reference for that paper?

> > Alice: tAB = YB^rA mod p
> > Bob: tBA = YA^rB mod p
> > Alice: uAB = RB^xA mod p
> > Bob: uBA = RA^xB mod p
> > Alice: w = (tAB + uAB) mod p
> > Bob: w = (tBA + uBA) mod p
>

> As pointed out in yesterday's post, XOR or a hash could be used to
> combine the two session key contributions. KEA just happens to use
> addition.

> > Alice & Bob check that w != 0, and derive a key from it (details
> > omitted)

Does anyone know the reason for the check that w != 0, BTW? It is not
possible for any of tAB, uAB, tBA or uBA to be zero (because of the
checks on RA, RB, YA and YB), and I can't see any other reason why
w would be zero except by chance.

> >This is quite similar to some of the MTI* protocols, for example
> >MTI/A0 [HAC Protocol 12.53] and MTI/C1. It's also similar to a protocol
> >I designed myself (unpublished, called SID-3-DH),

I've decided to rename it to "XDH" (extended Diffie-Hellman).

> >in which the agreed
> >value is g^((xA + rA)(xB + rB)), rather than g^(xB.rA) + g^(xA.rB).
> >
> >[This is more efficient than KEA, because
> >
> > g^((xA + rA)(xB + rB)) = (YB * RB)^(xA + rA)
> > = (YA * RA)^(xB + rB)
> >
> >can be calculated by each side using only one modexp, not two.
>

> This is faster than KEA by a factor of about 2.

Not quite, because each side also needs to compute RA or RB, but
these can be precomputed. (For example, a server would probably
maintain a pool of g^rB values for incoming connections; in that
case computing RB values wouldn't contribute to connection setup
latency, but would contribute to server load. These are only short-
exponent, fixed-base modexps, anyway.)

Note that Alice must check that YB * RB generates a group of
order q, and similarly for Bob. rA and rB must not be chosen such
that (xA + rA) mod q or (xB + rB) mod q are zero (although that
happens with negligable probability). Also, timing and other side
channel attacks against the modexp calculations must be prevented.

========

I said that the security of XDH could be proven (relative to DHP);
here is the proof:

Let G be a cyclic group or subgroup of known order q generated by
an element g, and call an integer that is chosen uniformly and
independently at random from the range [0, q-1], an "R-integer".

(Note that the oracles used in the proof can depend on G, g and q,
so these do not have to be passed to them as parameters.)

Define a problem XDHP[G, g, q] as follows:

Suppose that a, b, c and d are R-integers.
Given g^a, g^b, c, and d, find g^(a+c)(b+d).

Proof that XDHP[G, g, q] reduces to DHP[G, g, q]:

Suppose that we have an oracle O, which, when given g^a, g^b,
c, and d, such that a, b, c, d are R-integers, returns g^(a+c)(b+d)
with probability p0, in time t0, and using memory m0.

Then when given g^a and g^b, such that a, b are R-integers, we
can calculate g^ab with probability p0, in time t0 + t1 and using
memory m0 + m1, where t1 and m1 are the time and memory needed to
calculate 3 modexps, 3 multiplications, and 1 inverse in G (and
an integer multiplication), as follows:

1. Choose two R-integers c and d.
2. Let x = O(g^a, g^b, c, d).
3. Return x * (g^(cd) * (g^a)^d * (g^b)^c)^-1
(G is a cyclic group or subgroup, so all elements have an inverse).

This works because:

g^(a+c)(b+d) = g^ab * g^cd * g^ad * g^bc, therefore
g^ab = g^(a+c)(b+d) * (g^cd * (g^a)^d * (g^b)^c)^-1

Note that the result also holds if the R-integers are chosen with
a non-uniform distribution, e.g. using an imperfect PRNG, in both
the XDHP and DHP problems.

[Conversely, XDHP can be solved using an oracle for DHP, since
g^(a+c)(b+d) = g^ab * g^cd * g^ad * g^bd (actually, this also solves
the potentially more difficult problem when only g^c and g^d are
given, instead of c and d).]

An important point is that by symmetry, we could have chosen the
private value inputs to XDHP as either (a and b), (a and d),
(c and b), or (c and d).

The security of the XDH protocol can now be expressed in terms
of XDHP.

There are 5 cases:
1. The attacker knows xA, xB, RA and RB (known-key passive attack).
2. The attacker knows YA, xB, rA and RB (attempted
impersonation of Alice, possibly given Bob's private data).
3. The attacker knows xA, YB, RA and rB (attempted
impersonation of Bob, possibly given Alice's private data).
4. The attacker knows YA, YB, rA and rB (failure of both Alice
and Bob's RNGs).
5. For a man-in-the-middle attack, the attacker is assumed not
to know *both* Alice and Bob's private keys, and therefore this
is as difficult as either case 2 or case 3.

In all of these cases, finding g^(xA + rA)(xB + rB) is equivalent
to an instance of XDHP, and therefore is as difficult as solving DHP
in the same group or subgroup.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOJpXhjkCAxeYt5gVAQEyzAgAmUnnq1x4Mp2ixwBAVf7xxuOIBM59mMDb
0+Um5ONsx8KG9IFEQmLMR0Lj/kjmpXb4V8URQ53a+RE9iSXduLCL3A0/mxcnudqT
LJ0TxaKwLo3R36G4yRczTCIAOoF6wZzqQk61DujwcbULSW+dAMPStKwIrhDjsO3g
8r4JRhYWm8/VY0pwTlHhSGCCKDee2p5O73hvf/mOrP6TOk5aaF4xCqjXDqrWbH1y
yBKID0i0N7qoDtuSanzv0FVEEf+eyIINXigGR4BVnluk3lMlSYg/OcrysCTdA2J1
b5igg5ypP84fXZ3iKiOCiy8+82EQfehWVcGpDUUePE0oSEPUNB2eMQ==
=dK6F
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/P-8u4hqRCOs/m/X23KGC4p_uIJ", "n_sections": 17}, {"thread": "P-8u4hqRCOs", "msg": "etCwiaNt22kJ", "author": "David Hopwood", "date_disp": "Feb 8, 2000, 3:00:00\u202fAM", "subject": "KEA, and XDH", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Doug Stell wrote:
> David Hopwood wrote:
> >> The reason for [checking that YA and YB are elements of the order-q
> >> subgroup before signing a certificate] can be found in a paper by


> >> Lim and Lee.
> >
> >Do you have a reference for that paper?
>
> "A Key Recovery Attack on Discrete Log-based Schemes Using a Prime
> Order Subgroup," Chae Hoon Lim and Pil Joong Lee. If I remember right,
> I found it in the P1363 collection of contributed papers.

Thanks (also to David Wagner). The full reference is

Chae Hoon Lim, Pil Joong Lee,
"A key recovery attack on discrete log-based schemes using a prime
order subgroup,"
Advances in Cryptology - CRYPTO '97,
Lecture Notes in Computer Science vol. 1294, pp. 249-263.

It doesn't appear to be in the P1363 contributions (or elsewhere on-line),
unfortunately, although I found it on the CRYPTO/EuroCrypt CD-ROM.

> >> >[XDH uses an agreed value of] g^((xA + rA)(xB + rB)), rather than


> >> > g^(xB.rA) + g^(xA.rB).
> >> >
> >> >This is more efficient than KEA, because
> >> >
> >> > g^((xA + rA)(xB + rB)) = (YB * RB)^(xA + rA)
> >> > = (YA * RA)^(xB + rB)
> >> >
> >> >can be calculated by each side using only one modexp, not two.

[...]


> >Note that Alice must check that YB * RB generates a group of
> >order q, and similarly for Bob. rA and rB must not be chosen such
> >that (xA + rA) mod q or (xB + rB) mod q are zero (although that
> >happens with negligable probability). Also, timing and other side
> >channel attacks against the modexp calculations must be prevented.
>
> My metrics, done months ago for a hardware math engine, also did not
> include these checks.

For GF(p), it is possible to omit the full check if p is chosen
appropriately. For example if p-1 = 2qr where q and r are prime, then
the only possible orders of an element are { 1, 2, q, 2q, r, 2r, qr, 2qr }.
Of these only 1 and 2 are unsafe. The only element with order 1 is 1,
and the only element with order 2 is p-1, so it is sufficient to check
that YA * RA or YB * RB are in the range [2, p-2].

[The reason why it is normally recommended that the transmitted group
elements should be of prime order, is that when either order has small
factors, the DH result gives away the private key mod each of the small
factors (e.g. the least significant bit when the order is even). This is
not a significant problem for a large enough group when the group order
is 2qr, and it is not a problem at all if we derive the symmetric keys
using a hash, and then securely delete the DH result.]

For an elliptic curve, we would probably choose a curve of prime order,
in which case only the point at infinity has to be avoided. It is also
necessary to check that RA and RB (and in key validation, YA and YB) are
actually on the curve, by checking that the coordinates satisfy the
curve equation.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOJ+A8TkCAxeYt5gVAQHJGgf9FZorMcJ0UbE7HH/42Fj+owxqQDt5o1Ma
MeeiPj7AafFnp7jdY/MMEpQB8nKiAc3L2jfAu3gZZfTKGO5QEZr1HA5PWitYNNHD
/NiAGktsrF/kfNG1bOKm5gfeSF4EN8//SC3KVdg4wJYjgEQVGMmF2OWLEZyegmjl
nahfdE3HmK+GotI0Caxqi3Az5mZ2XRiBU712POiDosIucIsLpTsw8EFGk6C2WIFo
XGzt/wIhMXk5crjG4hWn9oKib5BM8MRm884+Hj0e9huPO4n+wdNV++Q0tl8/jAJR
dQ6zPI4UfhWgw1s0fgKcl8WcUkrdl6h6SvZmuaNqln2iax6LGTDz2w==
=xdrL
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/P-8u4hqRCOs/m/etCwiaNt22kJ", "n_sections": 17}, {"thread": "P-8u4hqRCOs", "msg": "Eff6yyQ7nLcJ", "author": "David Hopwood", "date_disp": "Feb 26, 2000, 3:00:00\u202fAM", "subject": "XDH is insecure", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

A few weeks ago I proposed (in outline) a key agreement algorithm called
"XDH" (eXtended Diffie Hellman), as follows:

> [XDH uses an agreed value of] g^((xA + rA)(xB + rB)), rather than


> g^(xB.rA) + g^(xA.rB).
>
> This is more efficient than KEA, because
>
> g^((xA + rA)(xB + rB)) = (YB * RB)^(xA + rA)
> = (YA * RA)^(xB + rB)
>
> can be calculated by each side using only one modexp, not two.

Unfortunately, XDH is not secure against an impersonation attack
(the security proof I posted in another article was flawed, because an
impersonation attack is not equivalent to the XDHP problem described
in the proof).

The attack goes like this:

Alice has key pair (xA, YA = g^xA).
Bob has key pair (xB, YB = g^xB).

Mallory chooses a random exponent rM.
Mallory -> Bob: g^rM * YA^-1
Bob -> Mallory: g^rB

Bob checks that g^rM * YA^-1 has order q (it does).
Bob calculates the key as (g^rM * YA^-1 * YA)^(rB + xB) = g^(rM.(rB + xB))
Mallory calculates the key as (g^rB * YB)^rM = g^(rM.(rB + xB))

Signing the transmitted values would fix the immediate problem, but then
XDH would be less efficient than the Station-to-Station protocol, so
there is no point in using it in that form.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOLWakTkCAxeYt5gVAQFDGgf/S+z968i1Die2OFP1WY3xCF11qLEmA6Vl
U/sNWipKfJHMbRg8+5REtxmP7WbKxqOqwXt7FAWpKfZo0A+S06yzo0LYw4HizFsU
MAzRmL4itoRH1G/wKwIOQ9acjdYjZnohgPswdMPGy/JXxlW0kSV9lOrJwzIIn4Px
nKpx8vu0iu4PAKfQU4ueBAAD1ruSSjrX8zfBcVJWxY3pZMIsnjZf2ypjKvSX+hvp
BbaXDpDKLWvVPdMuSU0zgbAai0JlrG/FOqLqtLUpB5bTtQo0+vDr6Xw/XnMU5ITF
uRAPN9gmwOHab7drSa+WwEwW8UtH1bGJhUiZEAUZirXDDTc9V9KXjw==
=okaB
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/P-8u4hqRCOs/m/Eff6yyQ7nLcJ", "n_sections": 17}, {"thread": "PEtR4mHTEZo", "msg": "2-Nvk21rU7IJ", "author": "David Hopwood", "date_disp": "Mar 14, 2000, 3:00:00\u202fAM", "subject": "streaming cyphoidians", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

No Brainer wrote:
> I was wondering what is the best method to encrypt/decrypt/create a
> message digest/sign data etc...if all you have is a small window to
> encrypt/decrypt/digest and sign the data with?
>
> For example, if someone wanted to stream video to another person and the
> receiver had to check the validity of the sender but could only receive
> (and HAD to process in stream format) approx. 2k at a time, how would it
> be best done? Remember that the receiver cannot receive the whole
> message to check the sig?

The standard way is to use sequence numbers: split the stream into packets,
prepend or append a sequence number to each packet, and authenticate using
a Message Authentication Code, e.g. HMAC, using a key independent of, but
agreed in the same way as the encryption key. The size of a packet will
depend on what latency is acceptable.

The receiver should not act on the contents of a packet until it has been
authenticated. If the transport preserves the order of transmissions then
the sequence number need not actually be transmitted, but should still be
included in the MAC'd data.

> It there anything like this available?
>
> Is this a dumb question?

No, it's not a dumb question - many people get this wrong because they
believe that authenticating data on a per-packet basis is incompatible
with applications that require streamed data. As a result, there are a
lot of applications out there with inadequate authentication.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOM7MuTkCAxeYt5gVAQH3bggAlvYT6OD6i/EpUgG6MmCFqUZsezQ2iokp
DkF3A6OPu868CN3t7RTQM4E8HuvpPgA3JB73/M31zzTJS+1XsELAGXPpQP2f9Ciw
x9PAhwaXBUMoRuURin+LY3MLqLJgCIp+i0HGVRNBVRO5WRP0P6xYM1krZCC58qfo
MOBZmstI6McSS1So8vE4mDmtqLxU8GJfmUDZ+XbiBic6EqNDaF8pvyq47e1JHCNE
9aDNIOjdLhSEQ/ZGGjfbrEX8nVTnN1J3fEQAL5xmh6n3hMjVv6T3jtOCPjvhqQbs
whp9LZPN6TY2T+bf0RsCy/eXaR8E2wKujgI9OnQP2cn7p+d4pTdb4g==
=4fTM
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/PEtR4mHTEZo/m/2-Nvk21rU7IJ", "n_sections": 7}, {"thread": "PEyUNc7wfLQ", "msg": "bPi1bU9suPcJ", "author": "David Hopwood", "date_disp": "Mar 15, 2000, 3:00:00\u202fAM", "subject": "Question about Blowfish source code in \"Applied Cryptography\"", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Night Heir wrote:
> In the Blowfish algorithm source (I have the Second Edition) on page 654,
> Mr Schneier presents the main function for his sample code. The excerpt
> is:

[...]
> blf_key(&c,key,5)
> blf_enc(&c,data,5)
> blf_dec(&c,data,1)
> blf_dec(&c,data+2,4)
[...]

> I understand that blf_key performs initialization for the encryption and

> that blf_enc encrypts 5 bytes of data. What I do not understand is why the


> decryption in blf_dec has been performed in two parts one consisting of
> 1 byte and the second consisting of 4 bytes.

Presumably to demonstrate (and test) that it isn't necessary to encrypt or
decrypt all the data in one step. BTW, the units are 8-byte blocks, not
bytes.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOM9KvjkCAxeYt5gVAQHFyggAvjXcV0HTHWKYY7YIk7OqAocFmyGVPg6c
Zm57rRnY1v4IFkYV1mARP395O3t2zmv/3bF+xB0WeejwnBbTAVEfHlw0HyAEUo63
35v7KcJPT5h3CZ/PGWWjBwKuukVVHgLjgbWACgkEhK3CUkn16nVNVPoXxWRNTbMR
yEWfVuOxk+U1uAy2GKiJVGUrhwx5ZSIGhVWaBhAB8AvFRiJHFjsSqmt3NpHY1JBy
3Ci6YqMXVUPV1NFVvs26kabPfUArEeennejzSylkDIpir1IOAdhYO8r7dP/8KX+P
ZeL31pSobKVKei5Iph3Y4YueKdlvb6Z297XWRFqp07bExqhFnqlhlQ==
=D3mG
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/PEyUNc7wfLQ/m/bPi1bU9suPcJ", "n_sections": 3}, {"thread": "R9Mj_hRU9Kw", "msg": "2-dUJ7rul4wJ", "author": "David Hopwood", "date_disp": "Mar 28, 2000, 3:00:00\u202fAM", "subject": "DES question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Rubin wrote:
> In article <38DF347D...@netrover.com>, doc
> <do...@netrover.com> wrote:
[...]
> >Perhaps a more general way of asking this question is to
> >inquire about the domain of the ciphertext.
> >
> >Or, is it possible to have a ciphertext that does NOT
> >decrypt using DES?
>
> That wouldn't make any sense. It would mean the encryption was not
> reversible.

It is possible to have a reversible encryption algorithm with this
property, but it would have to be probabilistic, and the ciphertext
would have to be longer than the plaintext (a concrete example is
DHAES).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOOAnmjkCAxeYt5gVAQH6pAf+KNQZc+14CqsYmvANhFZA6/lDuEUqsN0J
xRpNp2wJKk9Y3K+6S1EpxH2FF9UwtKjVOGlAJLPV+PqumyB7C+KxxH8cLgz2LKRg
1PGujnzMlVWk2EeEpWabTZMNp6eHE0YP86q/4GPoBfeBkR+MmpVKgMfhHvw8lOi9
W7Roi8xtru95eZ818vZEstfrGrgDeOLjBsWUB9PQKW/aDAGuCg1f/YnbGJdFpsEN
Xz+5u6Oe5Vzp7smctRqlj9dRHlQj/glZrI9H3JynCDILJhTVXPq4+SKodt7nEQjc
kfFVDF+8bLJsNUFsaazsVu++l9cTolMEh+VYbH6gwBmhjTVQkZMYlA==
=YBLv
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/R9Mj_hRU9Kw/m/2-dUJ7rul4wJ", "n_sections": 20}, {"thread": "R9Mj_hRU9Kw", "msg": "IcGtP8jfYAoJ", "author": "David Hopwood", "date_disp": "Mar 28, 2000, 3:00:00\u202fAM", "subject": "DES question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Scott Fluhrer wrote:
> David Hopwood <hop...@zetnet.co.uk> wrote in message
> news:38E019D4...@zetnet.co.uk...

> > -----BEGIN PGP SIGNED MESSAGE-----
> >
> > Paul Rubin wrote:
> > > In article <38DF347D...@netrover.com>, doc
> > > <do...@netrover.com> wrote:
> > [...]
> > > >Perhaps a more general way of asking this question is to
> > > >inquire about the domain of the ciphertext.
> > > >
> > > >Or, is it possible to have a ciphertext that does NOT
> > > >decrypt using DES?
> > >
> > > That wouldn't make any sense. It would mean the encryption was not
> > > reversible.
> >
> > It is possible to have a reversible encryption algorithm with this
> > property, but it would have to be probabilistic, and the ciphertext
> > would have to be longer than the plaintext (a concrete example is
> > DHAES).

> Actually, there's no reason it would have to be probabilistic.

You're right, I stand corrected.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOOEjYDkCAxeYt5gVAQE+Ygf+JHcBIDELI1L03wrMOI3tuCKQRVETFNMv
fHi4DQ2L1vjhoRJXUPuZA/dC+chPvrrgJt5xkIcgllYOfWhjVYp+C5R1jR33uvJL
UMy/nQTqU9fis3CKaW933vJfEGIOggk/nvDFoJIfv1/nwjjR8vSGLcdEi+ziHsI7
+Vy/p2HpVhGANQkeaosB8b07Ga2O+QXhZMKexSVIQkyOjIEbIwZn4OF+KXlp2Mff
M7g68DTLrMR5LOD5YJh/loY+PpMqCo22uPVyUlJA/8QG4N6fUeySQWGUG+WlWOKr
HXPmc6FWi4MDKH3BOrD9cM+AWK6HiQK36YlzjwLJ320MC3rLsGM8Zw==
=V7NP
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/R9Mj_hRU9Kw/m/IcGtP8jfYAoJ", "n_sections": 20}, {"thread": "Vn3M1lYRLMc", "msg": "SPtn7UoGvWYJ", "author": "David Hopwood", "date_disp": "Mar 11, 2000, 3:00:00\u202fAM", "subject": "How does % operator deal with negative numbers?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Rubin wrote:
[...]


> % is usually the "remainder" operation, also called "trunc-mod".
> It's different from the mathematical "modulo" (also called "floor-mod")
> operation.
>
> remainder: a % b = a - (b * trunc (a/b))
> modulo: a % b = a - (b * floor (a/b))
>
> Where: a/b = the real number a/b
> trunc(x) = sgn (x) * (largest integer with absolute value <= |x|)
> floor(x) = sgn (x) * (largest integer <= x)

That should be:
floor(x) = largest integer <= x

> sgn (x) = { 1 if x >= 0, otherwise -1 }

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMm9kTkCAxeYt5gVAQE2FAf/T9rMDUMyYj1E4NSkT/FK3crvpbiv4X1C
U3Wx6tIdqS3NAUekC3iJFHcCRuD99QscTcBOeSwxBdzD0DwNcZAvhaEMQAVeHR7h
gz510xKyb8N/isCMd9G9AjpovHHPaeSSR2UOzUfQZkJprieuJQ3bxMhmxDZ6oys0
qbqiwcE4eFfEMiyIjTqkaCYx9m7UtlmVY75cDlAdCKHdMrF62oqKlwPGNiXiDA73
R5J+KPDFjcn1XuoHw3hww2Mm3Tk7Js8mcsL+VRJCKp9vnMIhPvGivzN8X2jf7HvP
NAvm3CFiCm8mH/wlX9+qk5ytAT7ZxMgn7/na2xAgXmBA+eO20hzw6g==
=p6YE
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/Vn3M1lYRLMc/m/SPtn7UoGvWYJ", "n_sections": 21}, {"thread": "_HtPwaronXA", "msg": "AeZJmXvSwyQJ", "author": "David Hopwood", "date_disp": "Mar 15, 2000, 3:00:00\u202fAM", "subject": "public key encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Boris Kolar wrote:
> There are many more public key encryption systems, but their security is
> uncertain. I'm very interested in new public-key encryption schemes, so
> please notify me, if you find anything interesting on the web.

There are some schemes based on class groups, that are being proposed
for inclusion in P1363a. See

http://grouper.ieee.org/groups/1363/addendum.html

(subscribe to the P1363 mailing list to get the username/password).

Some patented algorithms, which seem quite interesting if you can get
past the marketing bollocks, are NTRU (www.ntru.com) which is based on
lattices, and RPK (crypto.swdev.co.nz), based on what appears to be
Diffie-Hellman over a polynomial field (I thought the field size had
to be impractically large for that to be secure?)

I wouldn't bet the security of anything important on either of these,
but it's useful to look at different approaches. If anyone knows of other
public key schemes - secure or otherwise - post them here.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOM9KTjkCAxeYt5gVAQFNLQf9FBOQTttr4HUqzNCw1f096kXgBj/mwVHd
h7R15za45cSc8zZyE4oUrmdry6phMcRIWqqS/o3RmoH7LW1sC3dY2hiK/CrrvatZ
6wnu5AZgg4YpDPBC4O5nPn9Isy5nfBvCR2R5PH3tu6iJ3IUTV2lyGlvX2Y8UE925
HtZmaTXooy5N8qO2BF96pmgqSA3YyTW7qlLC3TdmeRINzgYGAJFzCrkODuQeuQsb
aFIY1JBmjQqaIUT1csJPVRp0sQ9OGWv7b+0NK7AsvN7q+tpFo83+8WGqcXix49kv
lsMfMUHkxdkUKhzlIJ9KTjyMF+XLXQXrvfuFCXMykn7tYZ9Kcw8ALQ==
=Xc0e
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/_HtPwaronXA/m/AeZJmXvSwyQJ", "n_sections": 8}, {"thread": "_XmJAKQLTsg", "msg": "0248B1eECXwJ", "author": "David Hopwood", "date_disp": "Feb 24, 2000, 3:00:00\u202fAM", "subject": "Passwords secure against dictionary attacks?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Ilya wrote:
> Is it secure to take two words and join them together, such as:
>
> crypto/life cyber@machine green-dog Loud!Music

A phrase generated at random in the same way as
"crypto/life cyber@machine green-dog Loud!Music", would probably be a
secure passphrase. Just two words of it (such as "crypto/life") would
almost certainly not be.

As an example, "crypto", "life", "green", "dog", "loud", and "music"
all appear in a 7854-entry wordlist I sometimes use, and "/" is one of
about 10 or so characters likely to be used as the separator. So a
*rough* estimate of the maximum entropy of, say, "crypto/life" against
an attacker who knows (or can guess) the basic scheme, is about
log2(7854 * 7854 * 10) = 29.2 bits.
This will easily fall to a dictionary attack.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOLSmajkCAxeYt5gVAQEOyQf/QpM6UWBB7h1fZgux1dwhRqZAAO29WW73
+InVFKMYIO+6d46jgbhddv3YiLhvmnJo6ZE7/14IChT0DlM7tocVMiTuSwvOgXMA
iNlwYNgaGYMwYAgk8VmhFnprdddO0rCbifCc81RLmSdTB0mwkyZIjSDe1HxKr0D+
6/NIsSVv7/zX/T2gqgBbOVRiHo4NYyjt7cP40K1H608m5GFdT7t/dIaYV0AUg9my
VhXCVislVCN+Z10HfC+FkrARsCA3vbwvZTCOWomkowLpl7RyS80jnanmvPdOswEF
LbcXaf0qnle/J/wDrTGMvrME5/QboQPrmikOwVdox4VOLYnW2+hiHw==
=PYEu
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/_XmJAKQLTsg/m/0248B1eECXwJ", "n_sections": 100}, {"thread": "fDiGsW31RaQ", "msg": "p4UooN1EJGsJ", "author": "David Hopwood", "date_disp": "Mar 21, 2000, 3:00:00\u202fAM", "subject": "root mod a prime?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
>
> How do you take the sqrt of an integer modulo a prime?

Use a maths library :-). If you're writing or extending a maths
library, see Handbook of Applied Cryptography section 3.5.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBONfZ2TkCAxeYt5gVAQFyDAf9E71tapa1o1hQw/pxBz7tcuaOWwgZLCNL
otf/d0MlozOjcW9F+OncWNqQHmPgcmYh8vNOK8gkjw92lHeCf41c4BgmS0W02pcZ
F0+jeMa9/sJW2AX8QyVJNJFqpTBWzw8ZrpCekIDdHXVA5+GrIiemEU12r+H5v5bz
fLYpbqDcvuneUbSOI171lMkEa/VoptmnU7DoJ6H8aLKuRp9yOIef6Qk2clGbsnil
zhX+y8ewVGiZL9c7KUAGVnKvul8uRR/+9O4yWn6YWZRsiWO2YLKiJLNvePMne68L
y2OTD3iLWRzy0a3YXaYtJxwiYJhmc0Bds+6RB0XuWO3xWHbuNf4qMA==
=85tN
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fDiGsW31RaQ/m/p4UooN1EJGsJ", "n_sections": 22}, {"thread": "fDiGsW31RaQ", "msg": "NrlTV307TFUJ", "author": "David Hopwood", "date_disp": "Mar 24, 2000, 3:00:00\u202fAM", "subject": "root mod a prime?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mike Rosing wrote:
> Good crypto curves have order r*p where r is small and p is a big prime.
> Pick a point at random and multiply by r. If the result is not the
> point at infinity, then the result has order p.

OK so far.

> You can check that a point has a given order by multiplying it by the
> order you expect it to have and see if you get the point at infinity.

Careful: if kP is the point at infinity then the order of P divides k,
but it is not necessarily equal to k.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBONrTOzkCAxeYt5gVAQFGkgf+LPEw+QebewcvTUnoiaRi9nDp020Y+BCh
PTeGGpzVeKhYkObOHhgR9TGVJ66D2HPpopEsWx3k04akoT9HwW9iyViLOowvdXA+
mc/2SSfpz9tS8FOkk9rOLZSaMiQ/YUMRKPeFLTUGCcdKgmypb2gI6LQZM2bSOfX+
aNMlInJ6XcCV48qYENxoq3tFRyq0K5QaMSmh3/Tvjt8SGa6DHfPoO06+VDk/yZ8i
s0YFpo/V9jpmI4UdVfZ/ewhYr4g290BVXi+5uamISqBWVnYAI2USpuGKPqva2pAD
2Z9zhtAn6gCj4wjn47Wwuwc39eiRbZjBL/dYPZ7MlijUlz9OpLfLgw==
=A8mI
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/fDiGsW31RaQ/m/NrlTV307TFUJ", "n_sections": 22}, {"thread": "fDiGsW31RaQ", "msg": "GWHZRD5EEpAJ", "author": "David Hopwood", "date_disp": "Mar 28, 2000, 3:00:00\u202fAM", "subject": "root mod a prime?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mike Rosing wrote:
> David Hopwood wrote:
> > Careful: if kP is the point at infinity then the order of P divides k,
> > but it is not necessarily equal to k.
>

> Right. I was assuming k was a prime already. [...]

And that P is not the point at infinity, which has order 1 even if
k is prime :-)

[I know that you already understand all of this, but some readers might
not, so it's important to be precise.]

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOOAa4DkCAxeYt5gVAQH+dAgAihMpImZ4QKlE4Y1NIXqf5as4H5/pxG9u
S7vUJ82o9hd+fw3Q3an8EbjURn7Yz4lWQR/taPTd9hsAE74yyRLsxy3WktmBZryA
izoNa+U/Ij5Hi2RmRXtTrVsz8eqSKaeHvcN7gVcrbcOB13cRjaOuHKQclZIdTlkv
kTRUJRTqyzZJfmaaxYQbIxgAP8qbFWNT7oIeV/ukNgtxDiTwZ3huk0yksrEUw5P8
25/oT5jU2ghB7X6WJyZeGFNPbamO8TX-Mozilla-Status: 0009SImQ5tB12xjR
2n19TbN9H4sdBmciWpmUn9680F51XRLOyvxoa3H1FEBDK7+5zknKRw==
=yj/X
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fDiGsW31RaQ/m/GWHZRD5EEpAJ", "n_sections": 22}, {"thread": "fqz-6YiKzyg", "msg": "QN8Y_vYiibUJ", "author": "David Hopwood", "date_disp": "Feb 25, 2000, 3:00:00\u202fAM", "subject": "PDF problems", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

jff...@my-deja.com wrote:
> > >http://www.ams.org/notices/200003/fea-landau.pdf
> >
> > I notice that URLs are occasionally provided directly to .pdf
> > documents. That will make them come up in the browser, which requires
> > both the browser and Acrobat Reader to be running at the same time,
> > which may lead to system crashes on older computers with less memory.
>

> I never get anything except a blank browser page from these even
> though I see the Acrobat Reader logo for a few seconds. What would
> cause this?

Netscape has an API which allows helper applications to display files
progressively as they are downloaded; I think there is a bug either in
Acrobat Reader's support for this API, or in Netscape's implementation of
it. (On my system it happens for some PDF files but not others, without any
obvious pattern.)

The only workaround I've found when this happens is to download the .pdf
file (for example by choosing File | Save As from the blank page), and
then open it in Acrobat Reader from the local disk.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOLcWSTkCAxeYt5gVAQF1lQf/aU/S1gbwq8PJZXF1EtvW8Ov9hFJjloDF
0epn59Odeg7ZbIEQaAy4Lhy5a4GTMshlGp8ehm7M6BLwnzLq1oPoCAdyh+F2axZn
5PmvwOzDrA/pbgCs7dVc0tMI7f2oJileolN4rGNkBxWhvheFr9ZB0zEkMCeA4N0Y
bjISO5y/Cr6lXZvqcwHLeteeQ52nqmgzSVjAzSlYr9ZfwLTLZgbmo1TTEZoCZuI2
/21VilpX/t6rWSgbZPijgbO0Rple2PNbBBW1KS0q5bq8fNrXKQzZuXtvBfcEwq2S
nYTziUYFWsOHNlDPjmwYI3L+9vGDYCzS4joul8lbCwEKa6IzycS+jw==
=mRuf
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fqz-6YiKzyg/m/QN8Y_vYiibUJ", "n_sections": 23}, {"thread": "iwuKLwT2Z30", "msg": "kwlX3w6mJoMJ", "author": "David Hopwood", "date_disp": "Mar 3, 2000, 3:00:00\u202fAM", "subject": "New US export regs (was Re: Crypto.Com, Inc.)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

wtshaw wrote:
> In article <38BDA142...@t-online.de>, Mok-Kong Shen
> <mok-ko...@t-online.de> wrote:
>
> > Another possibility: Telepathy! Believe it or not, it was only
> > a few days ago that pre-cognition of animals and such stuffs
> > were earnestly discussed in a French radio broadcast.
>
> Do you suppose that we can better communicate with BXA this way, or is

> that the technique they are trying to use in lieu of sending email to
> us.

You don't need them to send email to you:

# \u00a7 740.13 Technology and software \u2014 unrestricted (TSU)
#
# (e) Unrestricted encryption source code.
# (1) Encryption source code controlled under 5D002, which would be
# considered publicly available under \u00a7 734.3(b)(3) and which is
# not subject to an express agreement for the payment of a licensing
# fee or royalty for commercial production or sale of any product
# developed with the source code, is released from \u2018\u2018EI\u2019\u2019 controls
# and may be exported or reexported without review under License
# Exception TSU, provided you have submitted written notification
# to BXA of the Internet location (e.g., URL or Internet address)
# or a copy of the source code by the time of export.
^^^^^^^^^^^^^^^^^^^^^

and for products that don't satisfy the above definition but are still
exportable (e.g. "retail" products):

# \u00a7 740.17 Encryption commodities and software (ENC).
#
# (e) Eligibility for License Exception ENC.
# (1) Review and classification. You may initiate review and
# classification of your encryption commodities and software as
# required by paragraph (a) of this section by submitting a
# classification request in accordance with the provisions of
# \u00a7 748.3(b) and Supplement 6 to part 742 of the EAR.
# Indicate \u2018\u2018License Exception ENC\u2019\u2019 in Block 9: Special purpose,
# on form BXA\u2013748P. Submit the original request to BXA in
# accordance with \u00a7 748.3 of the EAR and send a copy of the
# request to ENC Encryption Request Coordinator (see paragraph
# (g)(5) of this section for mailing addresses).
# Thirty days after receipt of a complete classification
^^^^^^^^^^^
# request by BXA, unless otherwise notified by BXA, exporters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# may export and reexport to any non-government end-user any
# encryption product eligible under paragraphs (a)(2), (a)(4)
# and (a)(5) of this section. [...]

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOL8kuTkCAxeYt5gVAQESaAgAhyiFD3WBiAa7lDLRAKyVzNpqyNzwSimJ
pnRMeh11+Scd318amHZik1Nlk8PDe7oQxhwusWgOfqJCc9MeUI70QJVOTvnuJjVa
kBPbaUL/FIu6TP8YSeh6ZSB/f6gKiBQRizB5eZKuUhbLexK1n/09iCtW2cDNy1qA
BxCsrTkas0UcYkQN8RVpH3305VSJIgxg7+p77Zt6ZwEV43gFOA3S/kZbQZ+LvSGH
hjeUpKobiF+GgCvbAJ7vPOUAOMDYzD37OnV8WrUvzS4AvZ/NwNYmJKZwYwpqvHA3
pn0t1PdnXDMUflXn6wEOYH8+AbTnrY9xsc3GcbCA31UqG5nuuKguBA==
=/Hyz
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/iwuKLwT2Z30/m/kwlX3w6mJoMJ", "n_sections": 33}, {"thread": "iwuKLwT2Z30", "msg": "x7gHlQdaq_IJ", "author": "David Hopwood", "date_disp": "Mar 4, 2000, 3:00:00\u202fAM", "subject": "New US export regs (was Re: Crypto.Com, Inc.)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

wtshaw wrote:
> In article <38BF24F6...@zetnet.co.uk>, hop...@zetnet.co.uk wrote:
>
> > You don't need them to send email to you:
>
> If yo are requested to send them something, it is comforting to know that
> a communication was actually received. I guess I remember the chronic
> loss of AOL mail experienced here long ago. But, anything can happen
> enroute.

Yes, but since the regulations explicitly say that sending them an email
is sufficient (for the TSU license exception), that's their problem, not
yours.

> Figure that if they say they did not receive it, they have no reason to
> complain. Perhaps the dog ate it, I forgot to send it, I thought I sent
> it, or my program did not work right, or they just lost it themselves.

Exactly :-)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMF57zkCAxeYt5gVAQFD7Qf/YGaX/7ysJ3cGUBfDBnUQh9PiwHRUfkpk
IbqmcHN9eVzZAHzW5gnlARM8bWHTA39isxKPtCvAq81UjR7AT9+sZwAnmoQ8w5o7
+4onwyh2radk4yc6Mo9D3HDiDJ6n0Uqc+knrZ/UONPDVe0qsl/vzRNbS9Hnm7EQ9
j7nwEQkOy2hv8YOUiL8HD6OqDQNRvdQ4/rXSMeQXYoNLUcWJhPipOL53TGfzkbxV
pdehKKQcTABRjieWCos9Ey0P/0zjNif2RaSgsZ5gVrTycru5VBOfnzW/2F7stHhM
Y7Nc/6Z3p0AmsM7Ww6tJb/etQMq3RewldsM7VKidTgoCtjh2HPnGyA==
=JKBs
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/iwuKLwT2Z30/m/x7gHlQdaq_IJ", "n_sections": 33}, {"thread": "j9wG6FaveLY", "msg": "Kd204ji1rgYJ", "author": "David Hopwood", "date_disp": "Mar 21, 2000, 3:00:00\u202fAM", "subject": "Non-doublespending offline digital money?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

matt wrote:
> Could anyone tell me if it is theoretically/physically possible to
> have a digital cash system which is offline, and prevents double
> spending?

It's possible to detect double spending in an off-line system (when
the cash is deposited with the bank), but not to prevent it at the
time of the transaction. You can make it more difficult (and reduce the
amount of resources needed to deal with it in practice) by using a
tamper-resistant user token, so that double spending can only occur
at deposit time if the user to which the cash was issued has broken
the tamper resistance of their token.

OTOH, with the cost of always-on access coming down significantly
in most countries, and with the introduction of wireless networks, I
doubt if the advantages of off-line cash would outweigh the added
complexity (which is considerable).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBONfo9DkCAxeYt5gVAQGvbgf/RivIj51Rn7dxoiqNfZqL6hFS8iSnJWUl
pZKJK2/yPJ+e/cKtFX7txIRys8uMTOEJkE8brXT9n4iICe+VoINZbwCJ+la1bGxj
VL6q8hmaJtSrF0DWmj5KGONeE0Cdmm1VTNFv+vHU/b+fXIOLlCTxr+UCd8Oo0a8i
JqHgtAhp32MRXgsK8f9t1AWADOdBwoRTrJ2zFRrBz7o5c44xLEQ43ZLnIy08Md39
gOhu1ESN8DifDUFWcErvbSoBa44s9ArKextdiP4qkcAU/iX3tFL6hGyp2686pCoY
0DxigN1e32/XDpiCSyrr7JfF2o3kkcoA9lmY8cwgCn3WNJqMRx17Sw==
=YK79
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/j9wG6FaveLY/m/Kd204ji1rgYJ", "n_sections": 13}, {"thread": "kN14fZZcNkE", "msg": "WEzzttE6dbcJ", "author": "David Hopwood", "date_disp": "Mar 10, 2000, 3:00:00\u202fAM", "subject": "Free-MAC mode", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Adam Back wrote:
> Following on from the discussion of block modes which try to exhibit error
> propagation to give a MAC or MDC combined with a block mode in the thread
> with subject "avoid man-in-the-middle known plaintext attack using a stream
> cipher", here's a block mode Anton and I have been working on.
>

> encryption is:
>
> y_i = E_k( x_i + y_{i-1} ) + x_{i-1}
>

> and decryption is:
>
> x_i = D( y_i + x_{i-1} ) + y_{i-1}

How are x_0 and y_0 defined? If you're not very careful, there appear to be
attacks which choose these values (e.g. if x_0 and y_0 are simply sent with
the ciphertext, I can see at least one known plaintext attack that involves
transposing the inputs to decryption for two blocks y_i and y_{i+1}, and then
XORing x_0 and y_0..y_{i-1} with a suitably chosen constant such that the
effect on the chaining variables after block i+1 cancels).

> In practice to make a MAC out of this you would append a fixed block to the
> message and verify that this fixed block was preserved on decryption. This

> block could be public, or perhaps could be the IV, or a separate key.
>

> We are working on a paper describing the Free-MAC mode, and output feedback
> as a way to get error propagation on the decryption operation of a block
> mode.
>
> The result is likely to be essentially as efficient as CBC encryption, and
> doesn't suffer the block swapping attacks that Propagating-CBC,
> Plaintext-CBC, iaPCBC and CBCC do.

I'm skeptical. Bearing in mind the attacks on all the other propagating modes,
I'd like to see a proven reduction from breaking the integrity check to
breaking the block cipher. Heuristic security isn't really good enough.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMlAdzkCAxeYt5gVAQEQhggAwSaUsExmLbRpWufM6GX+bhsjO1U9Fah7
QSDse34K1FnQOtvUNT+g8+yfhubbUbaCAxpF6l+VjsHwLV89VtpINLmYkqNPPPoP
OqADKWCJLrP+xCu020fHI3y5RRrO70z4S1H1pAzYxejFEpWmixen/uDx+sHSrMZj
k03Q714OT0XC6Jj4lCV3pptjlIu4um2p5qmL0lOGIWn4pLD6s9FUVtca+MywdpL+
BUGuf0l1HcS7hgtLQT2p2Yd/BE5a3weYDJ8KfXOhOTeEaKiuHJcC0hljyscFI4ZA
P1B2+K3jn4iAnnYMJ12LksHTir07iiBjNsD02VTUPyY4dTE/2qZucA==
=vvLU
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/kN14fZZcNkE/m/WEzzttE6dbcJ", "n_sections": 10}, {"thread": "wO4ml09Ys2U", "msg": "0hTIinTaEK0J", "author": "David Hopwood", "date_disp": "Mar 18, 2000, 3:00:00\u202fAM", "subject": "Enigma encryption updated (Adam D)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Nemo psj wrote:
[...]


> 'Generate Keybyte k
> k = s((s(i) + s(j)) Mod 255)
> 'Plaintextbyte xor Keybyte
> cipherby = Asc(Mid$(plaintxt, a, 1)) Xor k
> ' Inserting fix for ch(0) bite
> If Chr(cipherby) = Chr(0) Then
> cipherby = 1
> Else:
> End If
> cipher = cipher & Chr(cipherby)

This can't even be unambiguously decrypted (the lowest bit will be
wrong for 1 in 256 characters).

If VB strings can't include zero bytes, then the ciphertext can't be
represented as a string, period. Don't try to kludge around this, fix
it properly (by using some other type that can represent zero bytes,
or possibly more productively, by not using VB).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBONN9yjkCAxeYt5gVAQELHwf7B1PpCQQn6EZ0fkCEZ81X2Hr5JF8Y2yNE
ym6OSisAH5QmSikI40YBkuIKJ/rCGtQ+3r9w25MJ0Syzy0wQE64vgXuKYdizGybk
jmtOsViFDGiW+epuS0Bzi/r/S/Eiy0UWlb19zhWfGqVbXdZu0UltOPRzrJCq8lTv
PUSShuhM+Y3BQsZVdhOYZRTZ61YpCzFebUUWqLyIuAJ0E2ekbUV5q1lVcroes7pM
YCvx76ghTXZHCbtSz1Xbf/doVgLSgoMiBp6cMxb1RrLk3vmbCID7g+nNIppOKGSq
3esJKHq6rrbwRL3rPTyb9m3tO+8Z8dXnpAfH4s0SepBDs1rcTX6arg==
=yJt4
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/wO4ml09Ys2U/m/0hTIinTaEK0J", "n_sections": 23}, {"thread": "wxgbEJdQoZE", "msg": "xQczBMuCssYJ", "author": "David Hopwood", "date_disp": "Mar 20, 2000, 3:00:00\u202fAM", "subject": "Factorization", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Scott Fluhrer wrote:
[...]


> The integers is a Unique Factorization Domain, which is a fancy way of
> saying that any integer can be factored into primes in essentially one way.

That reminds me: are there any PK cryptosystems based on the hardness of
factoring in UFDs other than the integers? Also, is there any reason to
believe that factoring in a different, suitably chosen UFD could be harder
than factoring integers?

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBONajwzkCAxeYt5gVAQGpmQgAqBg7Bu19h0T/IS/8/tlhURah6EhhE2Pt
gnCbjTyc42yQpE2QUT7Jv+eC5Pa1N647O31m5XDhlI3DYcwypKZ3N62yTIRQw0nu
h/KlUwKYsxbxaHOB71mHkx834lIa8tY24gkldR7lQSxqwwSKaXKJjMvoIvUjgeMs
B7Ol3D2TI7PIV+cVAbM+ce+8e0TNmPwdBvr4nBjhR/V5kMUBWbTSLyXX6/aD7Qh8
+OLp8uBe3wd/4EMmzsxHOh3IX2VRpRPipE2MBxz9ZHEcSPH6I4tsXuwbASyhsbMl
Mv6OiJPyHp9fCcebazlbVS/So+u5MCzC7l9O5e2nCfhdra8l86S2Fw==
=kYli
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/wxgbEJdQoZE/m/xQczBMuCssYJ", "n_sections": 19}, {"thread": "x1QhZ0Abe_0", "msg": "0jhxt9bJP60J", "author": "David Hopwood", "date_disp": "Mar 3, 2000, 3:00:00\u202fAM", "subject": "very tiny algorithm - any better than XOR?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Carl Byington wrote:
> Consider an 8 bit processor that does not have enough code space memory
> to run TEA. This processor only needs the decrypt side - it never encrypts
> any output. We have about 50 bytes of code space, which should be enough

> for something like the algorithm below. [...]

How much data space do you have? I would seriously recommend against trying
to create a new algorithm, but it may be possible to use a smaller variant
of an already analysed algorithm.

For example, RC4 can certainly be implemented in 50 bytes of code space
(probably much less), so the only potential problem is its RAM requirement.
The standard, 8-bit version of RC4 requires 256 bytes, but I think it is
probably safe to go down to about 6-bit RC4, which has a memory requirement
of 64 elements each of 6 bits (in that case it's probably best to store each
table element as a byte, and iterate the algorithm 4 times to encrypt 3 bytes).

Here is psuedo-code for one iteration of n-bit RC4 encryption/decryption
["^" means "to the power", not XOR]:

i = (i + 1) mod 2^n
t = S[i]
j = (j + t) mod 2^n
S[i] = u = S[j]
S[j] = t
t = (t + u) mod 2^n
next n bits of keystream = S[t]

and for key scheduling:

let K[0..len-1] be the key.
for i = 0 to (2^n)-1 {
S[i] = i
}
for i = 0 to (2^n)-1 {
t = S[i]
j = (j + t + K[i mod len]) mod 2^n
S[i] = S[j]
S[j] = t
}

Note that, as for any stream cipher, you should not use the same key for
more than one message, without adding a random salt.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

"Attempts to control the use of encryption technology are wrong in principle,
unworkable in practice, and damaging to the long-term economic value of the
information networks." -- UK Labour Party pre-election policy document


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOL8uuDkCAxeYt5gVAQEEKwf9EzwhzgyKuWkBNqL26sIbwrom/zgpXGR4
Q6n/X3oqc4Z7qawKI0IFAqGhotVTFmdHiMzBalP2JveCVgH6J2oipcNG3kcyYDTV
b6HTMr+59oORfK2DJ5xze19KtH9Q6vOMx1hN8EnBFXDoeA4XveEd6mrb7mszt4Z2
kXtfqU0cmpANKpiRjxwq4zRngFnZkP/3tuLDpDEW03adIUVhyA+e2W/u82HTsQL1
o7/PYId+pHcSf6zndU+AhDv5jyPyUe+66h532cZtPDxx7iK8Fyei8GOtTMapFgxr
O0XfmaVM4kZLFmHYDOB9DJkkzgJZRdtiWGAEZ0Dq1yPRd6RdLx5NJw==
=tmeA
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/x1QhZ0Abe_0/m/0jhxt9bJP60J", "n_sections": 59}, {"thread": "x1QhZ0Abe_0", "msg": "cZ_yfPbGYA4J", "author": "David Hopwood", "date_disp": "Mar 5, 2000, 3:00:00\u202fAM", "subject": "very tiny algorithm - any better than XOR?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Carl Byington wrote:
> In article <38BF3051...@zetnet.co.uk>, hop...@zetnet.co.uk says...

[...]
> >How much data space do you have? I would seriously recommend against
> >trying to create a new algorithm, but it may be possible to use a
> >smaller variant of an already analysed algorithm.
>

> The processor has 512 bytes of ram, but there are a lot of other demands
> on that. We can have 20 to 30 bytes of ram for the encryption, 64 bytes
> is not possible.

and in another post:
> Each device has the cpu, 512 bytes of ram, and 1MB of eeprom. [...]


> Since the key(s) are stored in eeprom, it does not count against the
> 50 byte code space restriction. All the instructions on this processor
> are either 16 or 32 bits long, so we have 25 instructions to work with.

I assume that access to the EEPROM is slower than to the RAM, that it
has a limited number of writes before expected failure, and that it may
have to be erased/rewritten in blocks, rather than a byte or word at a time.

The 20-30 byte RAM limitation is a more severe constraint than the 50 byte
code size, and I'm not aware of any well-respected modern ciphers that
would satisfy it directly. However, how about storing precomputed keystream
from a stream cipher in the EEPROM, as if it were a one-time pad? As
content is decrypted, it replaces the corresponding part of the keystream.
Decryption only requires the EEPROM to be read at the same rate as the
encrypted content becomes available, so it should be reasonably fast.

While you're generating the stream (i.e. initially, and when the memory
becomes "full", so that space for deleted data needs to be recovered),
store any temporary data in the EEPROM if necessary, and load it back
afterwards. That way you have the whole 512 bytes of RAM to play with
for the encryption itself, and can use standard RC4 as the stream cipher
(for example, 256 bytes of table space plus some space for buffering, if
necessary).

Of course this assumes that it is possible to put the device into a mode
where it is not doing anything else, for long enough to precompute
sufficient keystream and write it to EEPROM. (An alternative would be to
make this part of the process of deleting stored content.)

To reduce code size, I would recommend storing the RC4 state (i.e. S-box
array and i, j) in the EEPROM, rather than the original key. Make sure
to start with a state that it is actually the expansion of a key using
the normal key schedule, because RC4 has some bad states otherwise.

Note that it is essential not to encrypt using a given piece of keystream
more than once (so it would not be secure for the decryptor just to tell
the encryptor what the current stream position is, for example). If there
is only one entity encrypting content, all it needs to do is store the
current RC4 state for each user. If there is more than one entity encrypting
content, this approach probably won't work as it stands.

> >For example, RC4 can certainly be implemented in 50 bytes of code space
> >(probably much less), so the only potential problem is its RAM requirement.

[...]


> >Note that, as for any stream cipher, you should not use the same key for
> >more than one message, without adding a random salt.
>
> Thanks for the pointer to RC4. However, the system design at this time
> implies that we will use the same key for all the content owned by the
> same entity (person, family, whatever). It will not be unusual for one
> key to protect a few megabytes of content.

That's not a problem in itself, provided you don't use any part of the
keystream more than once.

> I presume that we need some secure mechanism of passing the random salt
> to the decryptor.

You don't really need salt for the approach suggested above.

> We don't have 64 bytes of ram. From your comments above I take it you
> would not use 5-bit RC4?

IIRC, up to 4-bit RC4 has been broken, so no, I wouldn't.

If you need more detailed design advice or programming, I'd be happy to act
as a consultant (under NDA if necessary).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOMGvqzkCAxeYt5gVAQEATgf8D7VYPQteHps7+A+h2aYaO/H+ZzFDm1zT
a5b6NIy+hTzEUZC8uQ3VtUP/9R9gCOLiEyf78Tz7kaWtknI0Y/jAbnRKVhh5EfGu
AnO2kmAUhPMhK+hA48ZYlOSgZ4yV78Er+Da6+AAjT2aSHM3P1pQ6oojEO213eAdZ
KCj7oKVx8PcVQjEiuDG5VRoXaWXTutgtImsccrure337QZ3FNcyltZTNdOGFNd83
zNAuQp3GB4CHslBC+0II28eJ6FBqTYUsxPVyTjzBlmeptcyQvUPRearYynw2NEQk
rXKHoBayowvI8UA/3Qx8WeZY5T7WoqNKjQ9Wzb94vO1LUgQDt/acFw==
=eYvw
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/x1QhZ0Abe_0/m/cZ_yfPbGYA4J", "n_sections": 59}, {"thread": "y6-j3Yvtk_k", "msg": "VzsGPtfWhIEJ", "author": "David Hopwood", "date_disp": "Mar 31, 2000, 3:00:00\u202fAM", "subject": "Looking for some help on RSA public key/private key generation", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Joseph Ashwood wrote:
> Paul Rubin wrote:
> > Joseph Ashwood wrote:
> > >Yes, but by using a large e, the size of your d
> > >decreases.
> >
> > Whaaaaaaat? No, d is the size of the modulus and
> > supposedly unpredictable.


>
> No, length(d)+length(e) should be very close to
> length(modulus), as in within 1

No, Paul Rubin is correct. If e is chosen first, then d = e^-1 mod m
will be approximately the size of m, regardless of the length of e
(where m is either lcm(p-1, q-1) or phi(n)).

Alternatively you can choose d first, in which case e = d^-1 mod m will
be approximately the same size as m. However, it is definitely not secure
to make d less than n^0.292 [1], and according to [2], d should not be
less than n^0.5.

[1] Dan Boneh, G. Durfee,
"New results on cryptanalysis of low private exponent RSA,"
preprint, 1998.

[2] Dan Boneh,
"Twenty Years of Attacks on the RSA Cryptosystem,"
(this is on the web somewhere; do a search for it)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOOQfGDkCAxeYt5gVAQGSeggAlmJl3RJERteNC1tNbdvehOE2Tp9rX8c0
dmd9yKj0XpM75N3kZiSs4/j6XaTJbgJeerRGJfVEA+D2niFB2PGE5R+UFPV+Dqjz
TdQrlPopI2vzlMzzTMkOnbtycxGDfeZM5Vxl+K6hFyG6OKwgX9xUuuTUawCaK+oT
36fVqhn1vchYgpoekqU8ywGPaouPSlQtucEEDFUA+BnLLQhd7sle8oTv6wfj0O0L
t8S+7yU5Wjqb1+UVPtyBK4dtoltkVQwuu4LYaXWn8GHZdttjNHb3niLy3pim6RVz
JtEk9rce6F7HbQrsieaXjGSTTYSs9eBi9W+2lz8Tn8BEU7Np3MEb3g==
=95c9
-----END PGP SIGX-Mozilla-Status: 0009Fri Mar 31 04:21:45 2000
X-Mozilla-Status: 0801
X-Mozilla-Status2: 00000000
FCC: /N|/Programs/Netscape/Users/david.hopwood/Mail/Sent
X-Mozilla-News-Host: znews.zetnet.co.uk
Message-ID: <38E419C9...@zetnet.co.uk>
Date: Fri, 31 Mar 2000 04:21:45 +0100
From: David Hopwood <hop...@zetnet.co.uk>
Reply-To: hop...@zetnet.co.uk
Organization: David Hopwood Network Security
X-Mozilla-Draft-Info: internal/draft; vcard=0; receipt=0; uuencode=0; html=0; linewidth=0
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en-GB,en,fr-FR,fr,de-DE,de,ru
MIME-Version: 1.0
Newsgroups: sci.crypt
Subject: Re: Crypto Webpages
References: <8c0kaj$ool$1...@slb7.atl.mindspring.net> <8c0pd4$gla$2...@news.fas.harvard.edu> <38e409b9...@news.mpinet.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNED MESSAGE-----

Steve K wrote:
[...]
> Some of my favorite places to go beat my head against the wall of
> mathematical ignorance:
>
John Savard's site:
> http://fn2.freenet.edmonton.ab.ca/~jsavard/index.html

RSA Labs FAQ:
> http://www.rsasecurity.com/rsalabs/faq/

Handbook of Applied Cryptography home page:
> http://cacr.math.uwaterloo.ca/hac/

Counterpane home page:
http://www.counterpane.com/

Cryptography Research home page:
http://www.cryptography.com/

Lars Knudsen and Vincent Rijmen's Block Cipher Lounge (also AES Lounge):
http://www.ii.uib.no/~larsr/bc.html

NIST AES home page:
http://aes.nist.gov/

Lists of crypto researchers' home pages, from Counterpane,
Cryptography Research and David Wagner:
http://www.counterpane.com/researchers.html
http://www.cryptography.com/resources/authors/index.html
http://www.cs.berkeley.edu/~daw/people/crypto.html

Counterpane index of cryptography papers available on-line:
http://www.counterpane.com/biblio/

Cryptography Research index of on-line CRYPTO & EUROCRYPT papers:
http://www.cryptography.com/resources/papers/index.html

The Theory of Cryptography Library (recent papers, mainly since 1996, on
cryptography and cryptanalysis):
http://philby.ucsd.edu/cryptolib/

Helger Lipmaa's Cryptology pointers:
http://www.ioc.ee/home/helger/crypto/

Crypto-Log: Internet Guide to Cryptography.
http://www.uni-mannheim.de/studorg/gahg/PGP/cryptolog1.html

Thomas Jakobsen's page on Cryptanalysis of Block Ciphers.
http://www.mat.dtu.dk/persons/Jakobsen_Thomas/capapers.html

My crypto pages (under heavy construction):
http://www.users.zetnet.co.uk/hopwood/crypto/

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOOQnmDkCAxeYt5gVAQHZ8QgAx8VtZ7dMRqVeqpbkkDCELB6wJ94UoTNf
IB4kzZ9MJs3gaqGr9Md2hixEj96n96xzM4um2Ip9zm6Z0X/Th2IIhaqsXZun2UPl
v4SckOAIMu+InPm5uMgxQGcRnAmQMX1GOA1vclIbtBn204b3Aj0dtsewnfGzG9NF
Is2spvVO2mKhROfk0Ob+7+AFBeiKlwuMqBh2p9n/VWdietoDZwxRaeqToi0o41gF
BWlMl6acMzjEET4CSZvlnYg3XN839vSZLDqtAwbFWXC9fauISCK/QX7ty9sBgYSC
+18jR7keqRejcN8cii/5VbzBfy4ieSz5+E+Eek3+ueQSyt75H+I4mg==
=pbFy
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/y6-j3Yvtk_k/m/VzsGPtfWhIEJ", "n_sections": 17}, {"thread": "y6-j3Yvtk_k", "msg": "WfcY0oL6Le0J", "author": "David Hopwood", "date_disp": "Apr 1, 2000, 3:00:00\u202fAM", "subject": "Looking for some help on RSA public key/private key generation", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

[Re-post, this time hopefully not mangled by Netscape, and with
more complete references. [2] is particularly worth reading.]

Joseph Ashwood wrote:
> Paul Rubin wrote:
> > Joseph Ashwood wrote:
> > >Yes, but by using a large e, the size of your d
> > >decreases.
> >
> > Whaaaaaaat? No, d is the size of the modulus and
> > supposedly unpredictable.
>
> No, length(d)+length(e) should be very close to
> length(modulus), as in within 1

No, Paul Rubin is correct. If e is chosen first, then d = e^-1 mod m
will be approximately the size of m, regardless of the length of e
(where m is either lcm(p-1, q-1) or phi(n)).

Alternatively you can choose d first, in which case e = d^-1 mod m will
be approximately the same size as m. However, it is definitely not secure

to make d less than n^0.292 [1], and according to [1] and [2], d should


not be less than n^0.5.

[1] Dan Boneh, G. Durfee,

"Cryptanalysis of RSA with private key d less than N^0.292,"
Advances in Cryptology - Eurocrypt '99,
Lecture Notes in Computer Science Vol. 1592, pp. 1-11,
Springer-Verlag, 1999.
http://crypto.stanford.edu/~dabo/abstracts/lowRSAexp.html

[2] Dan Boneh,
"Twenty Years of Attacks on the RSA Cryptosystem,"

Notices of the American Mathematical Society (AMS), Vol. 46, No. 2,
pp. 203-213, 1999.
http://crypto.stanford.edu/~dabo/abstracts/RSAattack-survey.html

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOOWK+zkCAxeYt5gVAQEw1Qf7BnTbKzCfHagRKP9S9c77g8brJfINM0jK
jXC7A0g79djr8BxLSMdOPnkIk+G6ikDCvL3XKFw2ckRfgG45o2K2SKV5TsEzQ/Ch
0IKu6nyOp/jZa2gSVv9HZYfNc7mNMguJVZj6IPEKcXLCTUkKMD/C1a/DCIrH2H2R
HdLwnFyIEIroY3QsKw1HzB0MgZv7Z2gZzlEhx4dLAz4J1tes+6xvvJvNv9bfg+wo
qx0MXGfp9wHlS5PF7cO8IqCXCbBXu2AFEFeqAJlxJuZWWNL/poHoF68SGy7gJH0q
tUf93CIAWYmxAwfLFYk3glDQstTDimXQxEl9UBV08Rs+ST3X+2I7XQ==
=C2u9
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/y6-j3Yvtk_k/m/WfcY0oL6Le0J", "n_sections": 17}, {"thread": "0_sTbBom0vU", "msg": "e8qpS9NLZ8QJ", "author": "David Hopwood", "date_disp": "May 27, 2000, 3:00:00\u202fAM", "subject": "Q: OFB", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
>
> If one runs a block cipher in n-bit OFB mode with n equal
> to the block size, then one is doing repeated encryption
> of an IV. The output eventually repeats, i.e. the sequence
> of the outputs must have a period.
>
> Question: Are any literatures about the period lengths for some
> well-known ciphers, e.g. DES, available? Thanks.

See:

Robert R. Jueneman,
"Analysis of Certain Aspects of Output Feedback Mode,"
Advances in Cryptology - Crypto '82 Proceedings
(D. Chaum, R. Rivest and A. Sherman, ed.), Plenum Press, 1983, pp. 99-127.

D.W. Davies, G.I.P. Parkin,
"The Average Size of the Key Stream in Output Feedback Mode,"
Cryptography, Proceedings of the Workshop on Cryptography,
Burg-Feuerstein, Germany, March 29-April 2, 1982,
Springer-Verlag, 1982?, pp. 263-279.
(Abstract in Crypto '82 Proceedings, pp. 97-98.)


The first paper, and an abstract of the second are on the Springer-Verlag
CD-ROM of Crypto and EuroCrypt proceedings, but they are not available
on-line AFAIK. For a random cipher with feedback size equal to the block
size N bits (as recommended), the expected period starting from a random
IV is almost exactly 2^(N-1).

I don't know of any analysis for specific ciphers, although if the results
were significantly different from the "random cipher" case, that would
probably be considered a serious weakness in the cipher.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOS9Y6TkCAxeYt5gVAQE/vwgApPE9iK5MIiK6jMTBmCfcaow+64VnWZC8
hXts5prBapdA8ah3W0wq/l9x0dGG84u2ryeag0u6AQVBmt0R+HlCsisA/6fvOdSW
iTrUoXjdLYhPSDKQ8nKS8S0enAZCoHhzXmfNMFQn7TPUU/bhBrzxn9LYX1cwBCer
kku2umi99o/6F/A3I3fj4SFDIB9sBtK/jeFlT7Y84jSy+27/OSsYRxn/Jghk60iK
ucBYk3LZu9XqVLHDw5ki2IEbOLPoMW5Y8Ex//G+w7fstSJ4dU49myLuHV3qbWPa/
5UeNxWyFePX7XDJZdTc/4Zzw06fuDltcHampZVJ4Vx76Bb2L/BCImw==
=mngp
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/0_sTbBom0vU/m/e8qpS9NLZ8QJ", "n_sections": 4}, {"thread": "1LEV7z5SUrA", "msg": "Q-EkWC7OIZ8J", "author": "David Hopwood", "date_disp": "Jun 3, 2000, 3:00:00\u202fAM", "subject": "TC3 Update", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

tomstd wrote:
> In article <8h8vtp$p6m$1...@blowfish.isaac.cs.berkeley.edu>,


> d...@blowfish.isaac.cs.berkeley.edu (David A. Wagner) wrote:

> >In article <105e9c9f...@usw-ex0104-032.remarq.com>,
> >tomstd <tomNO...@dasoft.org.invalid> wrote:
> >> (multiplicative inverse in the galois field 2^128 mod p)
> >

> >Err, I can't see how to assign any meaning to that phrase.
> >Did you perhaps mean GF(2^128)? GF(p)? something else?
>

> Sorry... I am calculating the inverse of the input in GF(p)
> where p is a degree-128 polynomial (with coefficients taken mod
> 2).
>

> How should I have said that?

What I think you probably mean is that you take inverses in GF(2^128),
with elements represented in a polynomial basis, i.e. modulo a fixed
polynomial. "GF(p)" is almost always reserved for the case where
p is a prime integer, and you'll confuse people no end by using the
variable name p for other cases.

(As another poster pointed out, the representation of a group or
field element is important when the group/field operations are used
as part of a cipher with other operations, because there are
effectively implicit conversions that depend on this representation.)

Anyway, isn't this going to be *very* slow compared to other block
ciphers, if you need at least 4 inverses? (even using the "almost
inverse" algorithm in a polynomial basis, which AFAIK is the fastest
method in practice for software implementations)

Also, what makes you say that TC3 is provably secure against linear
and differential cryptanalysis? Just giving small bounds for the
probability of linear and differential characteristics *with respect
to a particular group and notion of difference*, is not a proof
of security against even reasonably straightforward LC and DC, much
less variants specifically adapted to that cipher.


(I'm inclined to be extremely skeptical of assertions that an algorithm
is "provably secure" that don't give a formal attack model, a precisely
stated set of assumptions, and a mathematical proof of the reduction from
an attack in that model to breaking the stated assumptions. I am a big
fan of the provable security approach to designing algorithms, which is
why I think it's very important that this term is only used where it
actually applies. Bounds on the probability of linear and differential
characteristics are not proofs in this sense at all, although they can be
the basis of an *argument* providing partial support for the security of an
algorithm.)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOTiGzDkCAxeYt5gVAQFtvAgAy2WTvdWuL7rnyWmUP0IEW3GGRYXlrpmz
IYdnicMqxVJlSZibUdkzU3H9FXHxr40eEIcabgc90LMR67rCtkrvHZ8wXpgFAx2+
8ROD3xWSsJqCWK+CAvj4CITn4G/hSkOG3/kiqLXSfYibkJEu4Qij3qGxtTZA5/va
HTKMcx2uFNe+QcS+SkaZDN29EuyKQ6juJcpAJUD2UZFZRBrWDj9S8wLVL1wDDgUK
zlaagWk8FoB1QbDGSgVaE9jqqFihra3wbUGU3P5ipZ06n86cJkhgwGm+iznba44R
DBPLjuJBC5TRKskE2vzv1F/lkhvt+/NFYMAEuxPe2UPqUBxZ/IqYZw==
=gYHP
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/1LEV7z5SUrA/m/Q-EkWC7OIZ8J", "n_sections": 28}, {"thread": "1LEV7z5SUrA", "msg": "rLaTOL_6aPYJ", "author": "David Hopwood", "date_disp": "Jun 3, 2000, 3:00:00\u202fAM", "subject": "Notation (was Re: TC3 Update)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mark Wooding wrote:
> tomstd <tomNO...@dasoft.org.invalid> wrote:
>
> > 1. Explain the notation please :)
>

> A finite field GF(q) (or, sometimes F_q, where the F is in
> blackboard-bold face, like Z when we're talking about the integers) is a
> set of q elements, upon which operations of addition and multiplication
> are defined. Both operations are associative and commutative; there
> exist additive and multiplicative identities labelled 0 and 1

^ distinct

(This means that ({0}, +, *) is not a field, by convention.)

> respectively; each element has an additive inverse; each nonzero element
> has a multiplicative inverse; multiplication is distributive over
> addition.

[...]


> Also, F^*_q (the field without the zero element) is cyclic;

Technically F^*_q is the corresponding multiplicative group. I'm nit-
picking, though, because it has the same elements as the field without
the zero element, and the same definition of multiplication; it's just
that addition is not usually considered to be defined on F^*_q.

[...]


> Oh, yes, finally, if S is a set of elements, we tend to write that S x S
> is the set of pairs of elements of S, and, in general, that S^n is the
> set of n-tuples of elements of S, often represented, where S is an
> appropriate ring, as column vectors of n elements of S. And, just for
> completeness, P(S) (P is blackboard-bold again)

Actually it's normally in stylized italic - Unicode 2118h, FWIW.
(Oh, for decent Unicode support in mail/newsreaders.) Here is a somewhat
mangled ASCII-art version:

<pre>
/ --.
| / \\
\\| /
| __/
|
/ \\
\\_/
</pre>

> is the `power-set' of S, or the set of all subsets of S.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOTh5OjkCAxeYt5gVAQEP9Af+PduoXDl1BXteoqkddItrKZe8ThawKozO
FuAhdrPxNHCkn6Wjk+QAwSsbxtYKGim4ehXbY9+cnFVHsMUyjaPO/mBYw4KVp2Fs
q6zTpXCIjyVdkT17pH6Yf8GkdkozOnXF66Y8PXLS2iIziyqIOd0SKnO6Ql9xIixB
yfILuN0biSITwTp0as06bmZIgT+GHiESz8qWjNvRt7t0K3tAPu04W8W87TS89b3+
bqReqJY5ddw1bMeVwvit+hOIwlOGAzBuzQcjHZIIfn07OXspZab5TjnagMbHd07c
2NgbYuaiP/lv9HTXLixwlxYJMyTm6jLdDLfVQxxHn96SD9kEVYZQVw==
=i9AR
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/1LEV7z5SUrA/m/rLaTOL_6aPYJ", "n_sections": 28}, {"thread": "6P9arfRmmK4", "msg": "lsSRNfKaMe4J", "author": "David Hopwood", "date_disp": "Jun 3, 2000, 3:00:00\u202fAM", "subject": "PSS and PSSR patent status (was Re: XTR)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David A Molnar wrote:
> David A. Wagner <d...@blowfish.isaac.cs.berkeley.edu> wrote:

[...]


> > All of these attacks are easily prevented by simply using padding,
> > which everyone should be doing anyway. As you say, they are not too
> > worrying in practice.
>
> As long as it's the right padding. :) Fortunately, as far as I know, OAEP
> is patent-free, and it has a proof of "being good padding" in the random
> oracle model.
>
> What dismays me is that the PSS signature padding does not seem to be
> patent-free...

PSS as standardised in P1363 is royalty-free; PSSR (the message recovery
variant) is not.

The patent pending on PSS is by the University of California; in a letter
to the IEEE archived at http://grouper.ieee.org/groups/1363/letters/UC.txt
it stated that:

If PSS is included in an IEEE standard,

[which it has been]

the University of California will, when that standard is adopted,

[which it has been]

FREELY license any conforming implementation of PSS as a technique
for achieving a digital signature with appendix. No registration fee
or other administrative procedure will be required.

The corresponding statement for PSSR is only that a license can be obtained
"under very reasonable terms and conditions."


Incidentally, my SCAN project (Standard Cryptographic Algorithm Naming), at

http://www.users.zetnet.co.uk/hopwood/crypto/scan/

includes patent references in algorithm entries (without any guarantee of
completeness, of course). These are linked to the corresponding pages from
the USPO's web site, or for non-US patents, IBM's site.

SCAN also includes references for the definition of each algorithm,
cryptanalysis, test vectors, reference implementations, etc. The categories
covered are
- message digests
- message authentication codes
- symmetric ciphers (with block cipher modes and padding methods)
- pseudo-random functions
- passphrase hashes and passphrase-based encryption methods
- asymmetric ciphers (with encoding/padding methods)
- signature schemes (with encoding/padding methods)
- various algorithms supporting public key schemes, such as key pair and
parameter generation (organised according to the Java Cryptography API,
which unfortunately is rather over-complicated in this area)
- random and pseudo-random number generators.

Corrections and suggestions for improvement are welcome.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOThTjTkCAxeYt5gVAQHYgQf9GDUtNvu3vSgkOUVQibS6mEDBpg3U42um
GBBWMMC9IPFtxfMps23Xge27piBxwxcqTNQ6ehd4uRouKAntjR7JmJsINM+kvAQT
YXtu5mDFSIrJlAx9IVbJbQ5jUFLFH4gKmo+yv+LGPO4ZILa/LvPU6aHeLwf8Iyu2
6QXYiW0V8gKdWwuSMAQ+nLXBbe4VIikAztB4AnfatvikOy9n3Hy+kY2vGVF+G/Kx
EGMuWSDx5Xdh/4iubO/kN2++NEnwjkJsy448RHuXJ0brBG7jParfAl7MDO5NfWYG
T2xBnTsCmB2RheqTceCpbcQojo7AyoW+704PJViVi7SD3SAN7E4oSw==
=oohl
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/6P9arfRmmK4/m/lsSRNfKaMe4J", "n_sections": 62}, {"thread": "6ZVx700D4O0", "msg": "DLK16_R6uBgJ", "author": "David Hopwood", "date_disp": "Jun 1, 2000, 3:00:00\u202fAM", "subject": "No-Key Encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Bryan Olson wrote:
> We can build [variants of Shamir's Three Pass protocol] from


> an invertible associative operation, call it *, as:
>
> ----- k1 * x ----->
>
> <-- k1 * x * k2 ----
>
> ----- x * k2 ------>

[...]


> Suppose we limit ourselves to the associative operation
> case. Does there exist an associative operation "*" such
> that the protocol illustrated above is secure?

No. Proof:

For * to be associative and invertible, we must have two operations
on some set S:

* : S x S -> S
/ : S x S -> S

such that (a * b) * c = a * (b * c), and (a * b) / b = a
for all a, b, c in S.

Case 1: * is commutative

((k1 * x) * (x * k2))/((k1 * x) * k2)
= ((x * k1) * (x * k2))/((k1 * x) * k2) [commutativity of *]
= (x * (k1 * x * k2))/(k1 * x * k2) [associativity of *]
= x [(a * b) / b = a]

Case 2: * is not commutative

In this case, in order for the protocol to work properly, it
requires another operation

\\ : S x S -> S

such that a \\ (a * b) = b. Then:

(((k1 * x) * k2)/(x * k2))\\(k1 * x)
= ((k1 * (x * k2))/(x * k2))\\(k1 * x) [associativity of *]
= k1\\(k1 * x) [(a * b) / b = a]
= x [a \\ (a * b) = b]

In either case, a passive eavesdropper can get the key.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOTWeyTkCAxeYt5gVAQGgdAf/ZPSeZ2WgJ0UsBVgphP3Ndn1zBBBnD5Ie
HEEHvDR0LButy8jIok3EzeBFouu8IzkDM47qsR8t3qvueY2NIv+yHdapnS3GQ16L
BDluO1k4fMD9ErmsYPMpIv85rzNWhzH2+R3DB8G8w4SpobHyDRKnNUDTFXD/2vY+
nrht2hLgHDLpNifAO7SoFEy4dBIM8PqzncAWTPCIwoNdUpBYpGUeEb5+xkleyJCA
okZe5JLXGIx1ri0Lab1n0vQfaUJDsOkpSJxghPftKGMyFr2GSQIgRUzefMEClAlV
f3CHo+vS8+a2zHJyeV5ILWsRMFh009bCSVNyv29vc5lHkVaAlb18Dw==
=kpgd
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/6ZVx700D4O0/m/DLK16_R6uBgJ", "n_sections": 78}, {"thread": "6ZVx700D4O0", "msg": "pggWSXWbSEkJ", "author": "David Hopwood", "date_disp": "Jun 1, 2000, 3:00:00\u202fAM", "subject": "No-Key Encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
> David Hopwood wrote:
> > Bryan Olson wrote:
> >
> > > Suppose we limit ourselves to the associative operation
> > > case. Does there exist an associative operation "*" such
> > > that the protocol illustrated above is secure?
> >
> > No. Proof:
>
> [snip]
>

> I am confused. Doesn't that mean the schemes of Shamir and


> Massey-Omura etc. are all broken?

No, because exponentiation (whether in Z*_p or generalised to other groups)
is not associative.
I.e. it is true that (g^x)^y = (g^y)^x, but not that (g^x)^y = g^(x^y).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOTa9lTkCAxeYt5gVAQGpNQf/erfKpRDTGXydGJq4DhebmRzXxN0WKxtk
XAs2Kvf+BVHlSmnsIXFTajor8o2hzqKurUSeo+6F/+CkDWp2vhCkTXkBM6K+I1ju
8DoeR+g2+BbQQYLyZA5v7Yuh3Rh3q87ItIrgTNcN4Gy4Q0IlQeJ9D8+0aLFEJoTM
1ZGwUmdzOmOtKLRuMlYrnJKRJtQfFkztSoTNeqARXv9Zfr+vXaa5vKSx5V1iZR+l
p21xilu5/afB2YxW71NeIIofLaA3aEz8KE5g7GffNglip+HVyVT//76MjlSTtHKm
vZaxiBSmq64GHOGelwrnlwnrU1ujHDql51jyZRZVtmyhq2Y9/w+Mcw==
=a/Ox
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/6ZVx700D4O0/m/pggWSXWbSEkJ", "n_sections": 78}, {"thread": "6ZVx700D4O0", "msg": "-TBnt54cjWMJ", "author": "David Hopwood", "date_disp": "Jun 3, 2000, 3:00:00\u202fAM", "subject": "No-Key Encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
> John Savard wrote:
>
> > But M*A*B = M*B*A for all M,A,B does not necessarily imply that A*B =
> > B*A for all A,B.
> >
> > I gave an example: perhaps M*Q = M*(-Q) for all M,Q, and A*B = -(B*A)
> > for all A,B. (For example, A*B might be |A| - |B|, although that
> > operator is not associative.)
>

> I am not yet convinced of that. Since '*' is assumed to be associative,
> we certainly have M*(A*B)=M*(B*A). If this is true for any M, I
> think that by applying the inverse one should have A*B=B*A, which
> is the commutativity.

Only if * has a left inverse (i.e. an operation \\ s.t. a \\ (a * b) = b).
Note that it does need to have a left inverse (which must be feasibly
computable) for the given protocol to work; see my previous post, where
this was one the cases needed to prove that the protocol is insecure for
any associative operator.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOTlraTkCAxeYt5gVAQHacwf/eVY35wBnWKfDYOU2cL5yAYAkU41H++qK
YwxYGxBHyrbdaNETgfudG8BnOfMqClaIhhg692zdsDrBXLg8zakNClPVcDpct4vH
ciD3Z+M6y171UhdM+gPz7T+dbqtWqDwLM2Z9gYwScdNOP5Yw6NFc1UOYK0WD8eyv
Uzmkl/1BPS1/zOlJBK5+hDvPZtpZvbSH035ltf1eQ0zOlJAk8yiCJ8i29sUEyrH+
NJm+ILY+bXQPoMbybxnpvJ/VZpCFRQesQQHhmPiOdgz0QMr9/NvGwoUzAAvFD8wS
hgChxuSF4yPm+hdA35iiO3yW4M+XBsTnG/I9GglmUNkwN1f0luQPBQ==
=f2/W
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/6ZVx700D4O0/m/-TBnt54cjWMJ", "n_sections": 78}, {"thread": "6ZVx700D4O0", "msg": "wH1ULaTvvYMJ", "author": "David Hopwood", "date_disp": "Jun 4, 2000, 3:00:00\u202fAM", "subject": "No-Key Encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
> John Savard write:
> > <mok-ko...@t-online.de> wrote, in part:
> >

> > >I am not yet convinced of that. Since '*' is assumed to be associative,
> > >we certainly have M*(A*B)=M*(B*A). If this is true for any M, I
> > >think that by applying the inverse one should have A*B=B*A, which

> > >is the commutativity. What is the flaw here?
> >
> > It's true that there is a right-inverse, so that from M*A, we can
> > obtain M by doing (M*A)/A. But I don't recall seeing it stated that a
> > left-inverse exists.
>
> I suppose you allow a bit more discussion. From the expression like
> M*A*B it can be implied that M, A and B are from the same domain.

> Hence the type of operands on both sides of the operator '*' are

> the same. Now, assuming the existence of a right inverse, we get
> I=A/A, the identity.

What identity? '*' was not stated to form a group [1], so A/A is not
necessarily the same for all A. Even if it were, (A/A)*A is not
necessarily equal to A (note that this is *not* implied by (A*A)/A = A),
and certainly (A/A)*B is not necessarily equal to B, which your argument
implicitly relies on.

> Could you see any flaw in the above?

A concrete counterexample is given by defining a * b = a, and a / b = a
for all a, b in some set with more than one element.


[1] To get back on topic for sci.crypt, there are some interesting cases
of mathematical structures that are not groups, but which can be used
in Diffie-Hellman or discrete log protocols, because (g^a)^b = (g^b)^a.
An example is the infrastructure of reduced ideals in cycles of real
quadratic orders [2]. (I can't remember the details right now, so I
don't know whether this would be suitable for Massey-Omura. Since
Massey-Omura is insecure against active attack anyway, it's rather
academic.)

[2] Ingrid Biehl, Johannes Buchmann, Cristoph Thiel,
"Cryptographic Protocols Based on Discrete Logarithms in
Real-quadratic Orders,"
Advances in Cryptology - CRYPTO '92.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOTlzmzkCAxeYt5gVAQE9xggAj1cj8p9aMZKsfuctHyx670EWgEmRWpf8
TDyQeB6mS6uyIo5ZDR7lqlKxX1EIWxFpLI8GrAH1FQHHZUdNv4Hlxo4KVE93A4QJ
Ee4rJ+bw2qjVDjLuiHXEpWd5UgiwrdMwzC2UtZ3x0pybKWDbMD0nqgmTGEvY6enS
WD1GFXtKZ4yqX7Nk/VQrHMBFe0V4a6ZOTGTraJRcoXYTkc/9sjlrxmOrcYG5BzoJ
WCQkwGwyGIw9a0xSBnBuNHE/UPgw/baLvKABZ7Y4S+FATyRH9mco950AQYOnIkHO
SFCxa/+/NvUTvIwf9Wj9jNZu5FfGuBzbr9TaVaCBuXBGxe9xWo0Xdg==
=uwFX
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/6ZVx700D4O0/m/wH1ULaTvvYMJ", "n_sections": 78}, {"thread": "6ZVx700D4O0", "msg": "lTRHS-NBEsoJ", "author": "David Hopwood", "date_disp": "Jun 5, 2000, 3:00:00\u202fAM", "subject": "No-Key Encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
> David Hopwood wrote:
>
> > What identity? '*' was not stated to form a group [1], so A/A is not
> > necessarily the same for all A. Even if it were, (A/A)*A is not
> > necessarily equal to A (note that this is *not* implied by (A*A)/A = A),
> > and certainly (A/A)*B is not necessarily equal to B, which your argument
> > implicitly relies on.
>
> Sorry for a dumb question: '/' is the inverse of '*', isn't it? What does
> 'inverse' mean? Could you give a tiny easily comprehensible example?

If *, / and \\ are binary operators on S, and ^-1 is a unary operator on S
(written on the right, i.e. as a^-1), then

"/ is a right-inverse to *" means "for all a, b in S: (a * b) / b = a"
"\\ is a left-inverse to *" means "for all a, b in S: a \\ (a * b) = b"
"^-1 is an inverse to *" means
"there exists I in S such that for all a in S:
(a * a^-1 = a^-1 * a = I and I * a = a * I = a)"

(The \\ notation isn't particularly standard; I just made up an arbitrary
symbol for left-inverse.)

If * is associative in S and has an inverse ^-1 according to the above
definition, then (S, *) is a group; if the group is written multiplicatively,
then I is normally written as '1' (often in bold to distinguish it from the
integer 1, if it needs to be distinguished).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOTsVITkCAxeYt5gVAQHiKgf9EDF+BmePiz7xM52qMjMeyWUrnIxCo0QJ
4Mw2ZZRukadqJAy8Y1/9uy7gyFTR1QfxXL3mBftPb6TyXW1X72zTqmKBPJw07rGC
32AIBUphio4vty0ooZd51KKPqaqFrV/AG2TS71MwoAbyHeLRPorGjKUUA+to10/o
QJh03bx+4JCxnoF7YWL/MS9s+WvGpi2YLIofaDLLd3Y1hfxUdHTQFbqZSTo0pxNF
FbHXXkI7qNBeZPm8DYtgL2HCjuw5BeoKWy7yNHksdDXUoivcou9mlVwgtbeUiPcO
sA5YKa1WvzaalQ2JDTt4YGsg0jyff0Wgd9ny85JYi/whgaGurRdTjQ==
=pVu9
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/6ZVx700D4O0/m/lTRHS-NBEsoJ", "n_sections": 78}, {"thread": "89GIpX15uXE", "msg": "IgQcQmd5yC0J", "author": "David Hopwood", "date_disp": "Jun 16, 2000, 3:00:00\u202fAM", "subject": "RC4 key schedule weaknesses (was Re: salt length?)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Rex Stewart wrote:
> Could you (or anyone) give me a referance to something on
> the problems with the RC4's keyschedule problems?

Andrew Roos <and...@vironix.co.za>,
A Class of Weak Keys in the RC4 Stream Cipher,
Preliminary draft, November 1997.
http://www.tik.ee.ethz.ch/~mwa/RC4/WeakKeys.txt

David Wagner,
Subject: Re: Weak Keys in RC4,
Posting to sci.crypt, September 26 1995.
(Message-ID: <447o1l$c...@cnn.Princeton.EDU>)
http://www.cs.berkeley.edu/~daw/my-posts/my-rc4-weak-keys

J. Kelsey, B. Schneier, D. Wagner,
"Key-Schedule Cryptanalysis of 3-WAY, IDEA, G-DES, RC4, SAFER, and
Triple-DES",
Advances in Cryptology - Crypto '96 Proceedings, pp. 237-251.
Springer-Verlag, August 1996.
http://www.counterpane.com/key_schedule.html

BTW, these references come from
http://www.users.zetnet.co.uk/hopwood/crypto/scan/

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOUqOBjkCAxeYt5gVAQGtJwf9HyC6UfURw49/WufI/ltk1CBxqcplwTJJ
zq6HvQYFpVe181r89ihlqxycxmkjkI/6a1d0iXXm4NnhdmWE1ZNgndZJPNIbHym4
A9m9s0feiLTUDCjVTITxKj/bgr32WJbE1OTGIwhazZJc+J7Jtq/87Q2Qjt9JBnPO
Y3bEPNaEWa2T2hMEsogdiyj/OC3Elt5Lvjxzzfy40m9EIEF4AETX/9XS+hszZ23v
fdOyiPYlhMYH1nOMEAslQir78TuRgS6cGp38oj6b2Wz/puMuXrhvTtTltCl3QD0K
EZxeqYXZsBTPUyZzld/zRuB7IP63gJHa3IBjRAAchVQIHNwOQxPi9A==
=zKTV
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/89GIpX15uXE/m/IgQcQmd5yC0J", "n_sections": 16}, {"thread": "89GIpX15uXE", "msg": "Xx0YZebu8dwJ", "author": "David Hopwood", "date_disp": "Jun 21, 2000, 3:00:00\u202fAM", "subject": "PRFs and RC4", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
> "David A. Wagner" wrote:
>
> > No, RC4 is a pseudo-random generator G : key |--> output, not a
> > pseudo-random function F : (key,input) |--> output. As stated in my
> > comments above, a pseudo-random generator is insufficient; you need a
> > full pseudo-random function.
>
> Couldn't one (certainly pedantically) argue that G can be employed
> where F is used, since one can always use 'key||input' of F as 'key' of
> G?

That would be secure only if G were resistant to related-key attacks.
PRNGs are generally not designed to be usable as hash functions [*], so
it's not a particularly good idea to assume such resistance. Also, note
that there are some related-key attacks on RC4 in particular, for
example see:

J. Kelsey, B. Schneier, D. Wagner,
"Key-Schedule Cryptanalysis of 3-WAY, IDEA, G-DES, RC4, SAFER, and
Triple-DES",
Advances in Cryptology - Crypto '96 Proceedings, pp. 237-251.
Springer-Verlag, August 1996.
http://www.counterpane.com/key_schedule.html


I don't know whether RC4's key schedule weaknesses would be exploitable
when using it in the way suggested above, but it doesn't seem prudent to
assume that they wouldn't be.


[*] with some interesting exceptions such as Panama.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOVAyMzkCAxeYt5gVAQE87ggAsfQtgOKYayQOYW1e1mDfbOx4PHU9JAle
1LSOdUGhDKqmQ74o1wQdNt8iZaRuKVrg3hgbW3JbMXqljVbAmgdyrHJCV1PNDtMm
4iRiLxChQRH7PqD71OMu2GlIPjR8QPEHPbuIIJJH7vA1+RAog6zkv4rM0Gd+emUK
XbbOfw631z6AUPrFnJ6xe0OUP035lTbvDPbo8Q+X8eHAwDNFvAtaIiHywsBeeIop
XWYcX0svJKDErAHLm2LCaE9/MB/03nvXDJ16dQjCUoeLnxkcgzDaEmBMRg4WAP9n
+4MwFWQ67iw7vAnqoHkiEZImzTegSelQzUlCLvw4Glf12BbHi4l61Q==
=7A5o
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/89GIpX15uXE/m/Xx0YZebu8dwJ", "n_sections": 16}, {"thread": "DvmDNgFG7dc", "msg": "a2YiYBStuKQJ", "author": "David Hopwood", "date_disp": "Jun 16, 2000, 3:00:00\u202fAM", "subject": "small subgroups in Blum Blum Shub", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tim Tyler wrote:
> lordcow77 <london22...@netzero.com.invalid> wrote:
>
> : Essentially, the existence of exploitable cycles in BBS would


> : neccesarily lead to an efficient algorithm for decomposing RSA
> : moduli into primes. As such, if you believe that the factoring
> : of numbers in that range is a difficult problem, you need not
> : loose sleep over the miniscule probability that you will land in

> : a short cycle. [...]
>
> It's not a simply a case of losing sleep - it's a case of knowing
> whether your system is secure.
>
> Short cycles are weak and insecure - no matter what the probability of
> their arising is.

AFAICS from Theorem 4 of the BBS paper, lordcow77's argument is correct.
That theorem shows that breaking the BBS generator is as hard as factoring
N = pq even if the only constraints are that p and q are congruent to
3 mod 4 and x_0 is a quadratic residue, regardless of what the cycle
length is.

> If you're using a system with short cycles in it, do you lose sleep
> over it?

Not if the probability of it having a short cycle is no greater than
the probability of a randomly generated RSA modulus being easily
factorable. Any cryptosystem based on factoring will have weak keys
(that occur with negligable probability for large enough moduli);
the constraints given in Theorem 6 of the BBS paper only eliminate one
category of them.

> That depends on the relationship of the chance of such cycles arising
> and how much the privacy of your data is worth to you.

If you trust integer factorisation-based cryptosystems at all, you
are implicitly trusting that the chance of such cycles arising is
negligable.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOUmdhjkCAxeYt5gVAQHlIwf+IOZR/MD3SnmJ6OenztFZ+qYv8/CG+RFr
1OsMC8WPy3KWS3YBM0eIMoozJlq7Y6CWjOd3LRZGKXfV2K2d5YElfSsfQdvXc6k9
bVYUSdYhg1tqPBgppOEFnv4rM/TRjR857+Rm+MUc3cJCr7DIWz4xFq6oPs5pn/JI
Xa7chB/4rczna0sssEFgU1/KCLYs46s1ZnwWC//iIIo34tMRyogXlYmK0xzY06a3
SwU+Q8/yATkx0UY6e0J8nNovuHyoAKvU6zN1xFZkVFYBdqfTmlArtl69OKaVNRN1
C6iL5qK85kLs2a1vrDDHjsQDV1KeF/8ZHJazNNZfkxF/Mhp9xV/U1g==
=w3b6
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/DvmDNgFG7dc/m/a2YiYBStuKQJ", "n_sections": 84}, {"thread": "DvmDNgFG7dc", "msg": "msP4Ou3r_hMJ", "author": "David Hopwood", "date_disp": "Jun 23, 2000, 3:00:00\u202fAM", "subject": "small subgroups in Blum Blum Shub", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Hopwood wrote:
> Tim Tyler wrote:
> > lordcow77 <london22...@netzero.com.invalid> wrote:
> >
> > : Essentially, the existence of exploitable cycles in BBS would
> > : neccesarily lead to an efficient algorithm for decomposing RSA
> > : moduli into primes. As such, if you believe that the factoring
> > : of numbers in that range is a difficult problem, you need not
> > : loose sleep over the miniscule probability that you will land in
> > : a short cycle. [...]
> >
> > It's not a simply a case of losing sleep - it's a case of knowing
> > whether your system is secure.
> >
> > Short cycles are weak and insecure - no matter what the probability of
> > their arising is.
>
> AFAICS from Theorem 4 of the BBS paper, lordcow77's argument is correct.
> That theorem shows that breaking the BBS generator is as hard as factoring
> N = pq even if the only constraints are that p and q are congruent to
> 3 mod 4 and x_0 is a quadratic residue, regardless of what the cycle
> length is.

Correction: it shows that breaking the BBS generator is as hard as breaking
the quadratic residuosity assumption (as defined in the BBS paper, i.e.
for all but a negligable fraction of moduli N = pq and seeds), even if
the only constraints are that p and q are primes congruent to 3 mod 4
and x_0 is a randomly selected quadratic residue.

The QRP has not been proven to be equivalent to the integer factorisation
problem.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOVF0uzkCAxeYt5gVAQE8Rgf/dbpPnQS9Agll7bFqtV2kx7J2Bqn7+eq0
GlxLm7wA/bBnXfYn8yrEC2JOphyT7IdFa7iuxroWZ9EgoYUg6jT5l7krMI6ypGCp
qHJnkpDH58fGTvdfy8KPPnQH3CRVSA8NfW/4r8yRAgbZaYMm/q2V73Rre6abEblY
ZLKwxo6xlewYd5/2Oyy7iuSwXU98qxrYNTOzVhvZomV5L2uongEBzpqesiAyiws5
pWIsQRCZorXar6Myk5YWJyUv6UVNNIPNX3MK/Wn8l74Et2Fp2wNJub60SSyyTn1H
YdVL4xBlm322Vc8UOElLht+5tiX+qdpHbyHOWuE80jiY61eBC1PyrQ==
=8iPa
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/DvmDNgFG7dc/m/msP4Ou3r_hMJ", "n_sections": 84}, {"thread": "Ix-GcjjSOLI", "msg": "mRlgNREN5UAJ", "author": "David Hopwood", "date_disp": "Jun 20, 2000, 3:00:00\u202fAM", "subject": "MD5 Expansion", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

tomstd wrote:
> Arthur Dardia <ahd...@webspan.net> wrote:

> >Instead of doing what the original poster came up with. Why
> >can't you just hash the original message with MD5. Use the
> >output as the input to another hash algorithm (say SHA-1), and
> >then to be safe repeat the same thing replacing TIGER/192 for
> >SHA-1.
> >

> >A=MD5(M);
> >B=SHA-1(MD5(M));
> >C=TIGER/192(SHA-1(MD5(M)));
> >
> >C would be the final output.
> >
> >How does this increase security, by what percentage, if it does
> at all?
>

> Let's see the collection of A,B,C forms the new hash output and
> it's 480 bits in length. By the b-day paradox we should find a
> collsion after about 2^240 attempts... that's pretty good.
>
> However, I can find a collision in A with 2^64 work, and a
> collision in SHA with 2^80 work, that's about 2^80 work total
> since after 2^80 trials we are bound to see quite abit of MD5
> collisions.
>
> Again after 2^96 trials to break Tiger we should see quite a bit
> of SHA collisions. So with about 2^96 hash operations we
> should see collisions in all three. That's hardly 2^240.

No, look at the proposal more carefully. A collision for MD5(M) is
automatically a collision for SHA-1(MD5(M)) and Tiger/192(SHA-1(MD5(M)),
so finding such a collision requires on the order of 2^64 attempts, not
2^96.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOU7tnzkCAxeYt5gVAQF/vQf/Z80n7IMWpdoxBak1X5UTsGNLekgDiQlD
fQCDG5uXV9N2ENzzJSIIbjSplqj+Heq7p/wPH5ANoUknpSgs7KMrDR0bomMwHRcY
o23XKpj1bK78xtdpOGi1IePSo0zkLDnR+ZPPaMyOuLC5JMrMwShX84gPyzEBYpzu
IvDaNqvVuvtB3grFCN3d33Jzt8Bf26i8RvnRx4BZkGGeRBQHt+uoRYDBL8jB4Dcy
looHQiHgYHoAn2H/FdfVhEVALSGJ/DoD/BzULn+tz/+dIPHDfHJ7DlME5Ob3p4QB
o6lUza/pZllD9s/mBE1KIs1iUiweBHGlxcvWR1s7ddDTj7JzjIFeuw==
=qK0Q
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/Ix-GcjjSOLI/m/mRlgNREN5UAJ", "n_sections": 51}, {"thread": "Ix-GcjjSOLI", "msg": "TJmzU-nXNv8J", "author": "David Hopwood", "date_disp": "Jun 23, 2000, 3:00:00\u202fAM", "subject": "MD5 Expansion", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Simon Johnson wrote:
>
> A much better way is to divide the message in two. Then hash
> each part individually and contatenate each hash.
>
> a = 1/2 of M
> b = other 1/2 of M
> Hash output = H(a) & H(B)

No, this is a disastrous idea, because one half of the message can be
held constant in a collision attack. That means it is only as collision-
resistant as H.

The modification with bytes of the message interleaved also doesn't work,
because odd or even-numbered bytes can still be held constant.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOVK+LDkCAxeYt5gVAQEMNQf+JcWEElmM28R6upvkdxVRcGb5HrNDMiSt
5iXCHrjsSE3/AlVdRiUeflOD0y6WXrxKgfC92QGWYmN2cVgU0NO6Qs3LxT4UEwr8
YAafhcTJZMxO+sAOBt9ephlxoIQAvTDGUN5rsMAGUsDtF5XNN8rJx3tqKm8UkX3o
ZGo+WVpvS4KSrQvCaHmc41N79OOD3Jsvesf53mYmZ+Usxnnqqyqi2F4gDK1u/y38
bjEoiJeMFc/vNRT0MnKDCuS3xe/alitFarnPiYxQaAQXxDEm+XSZpnDOfmlwFlfe
L5BjTAIPW6NDr1bbNQZawjEl4dPqCPxH34gtK8FS0FpydEC67eS1VA==
=NSDK
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Ix-GcjjSOLI/m/TJmzU-nXNv8J", "n_sections": 51}, {"thread": "Ix-GcjjSOLI", "msg": "0QvH03c0IggJ", "author": "David Hopwood", "date_disp": "Jun 24, 2000, 3:00:00\u202fAM", "subject": "MD5 Expansion", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mark Wooding wrote:
> David Hopwood <hop...@zetnet.co.uk> wrote:
> > Simon Johnson wrote:
> > > A much better way is to divide the message in two. Then hash
> > > each part individually and contatenate each hash.
> > >
> > > a = 1/2 of M
> > > b = other 1/2 of M
> > > Hash output = H(a) & H(B)
> >

[snip the obvious attack]


>
> Indeed. Some more complicated mixing needs to be done. Let H be a hash
> function, and let K be a cipher. Let M = (a, b) be a message split into
> two halves (it doesn't really matter how). Compute:
>
> a' = E_{H(b)}(a)
> b' = E_{H(a)}(b)
>
> Then let the extended hash be
>
> H'(M) = H(a', b') || H(b', a')
>
> Any analysis?

Let b = a, then we have

a' = b' = E_{H(a)}(a)
H'(M) = H(a', a') || H(a', a')

Let G(a) = E_{H(a)}(a).

In this case a collision in G leads to a collision in H'.

The difficulty of finding a collision in G depends on the block size of
E; if the block size is n bits and E behaves like a random cipher, then G
will behave like a random function, so we expect to find a collision with
about 2^(n/2) work. Unless n is unusually large, this is probably easier
than breaking H, although the attacker won't have any control over the
form of the colliding messages.

> (Yes, it's much slower than just hashing the data twice.)

That too :-)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOVPzvjkCAxeYt5gVAQFf4Qf+MLW8YgGW3W5l8QQMlQVMrQ/pw5s60YtM
0lAiNuv964kGRO3Cj4kCfYHfq2ve461Vj746qA0y2LTLcPuCyto7P+sYaKqzwXZ9
ryk/gOCqmsmrdvCcrYvzpkN+FXSO6ZkjCkQqtuSiDvrUB0lSm3ylnS2MQQb3Wmsb
Lr/3sLFMLaxdS8ee6odTxld45BBU65kh9k6hOM6xR6xJFwnDg2+c6fXgWenddzun
pkoGaBomhV4sxdb8Isy5Njqksy4BGxNJqPQYrPE2rCkr9nWhBMM34Zix+x9sLSj6
fzU+oeEpUFHPRJ5Xk4YovPPG67e9AxHKD/61UUujWKQvoDnXRy/Ncw==
=pWc5
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Ix-GcjjSOLI/m/0QvH03c0IggJ", "n_sections": 51}, {"thread": "Jab6Gx-PWC8", "msg": "HbKEG9fi8hoJ", "author": "David Hopwood", "date_disp": "Jun 7, 2000, 3:00:00\u202fAM", "subject": "Could RC4 used to generate S-Boxes?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mark Wooding wrote:
> Bijectivity isn't actually a necessary feature [for S-boxes];


> it helps security, though. For example, Blowfish's S-boxes aren't
> necessarily bijective -- these are the 'weak keys' that Vaudenay found.

An 8x32 S-box cannot be bijective. The Blowfish 'weak keys' occur when
not all of the S-boxes are one-to-one.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOT22DTkCAxeYt5gVAQG9tAgAsQsrR1Ig92mG3HRS5uOei72K8kFdfThg
X0beTxFbPlsFBGJ36Yr1eTQAJwSB2It/R7ZTALTSiuqaEyCmi0cTr+KWiLCIFol1
FGx894H7a/meInk5yDQDbXzcPDgbUVcGG8QrKTwiNrq3Yq6iFaz/alV3uXaSDVn0
nqLAKR+qDgYkNCRS6JrXRf/zNvQjDoAqnLk8s9rNj1JZh2LNEn5FtYSHZH0B+48k
XqyVySNzkrIzXKciD78CLfm5Abs9mPQwHbvP5omO+Ul5qllnDcFYyzEuDIfTDt8I
LkKAxFeYOaBYcK/Y4pOdSl2tdTcuac3IrxvA5/XMzkFqta6OwZIaXg==
=g3KB
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Jab6Gx-PWC8/m/HbKEG9fi8hoJ", "n_sections": 31}, {"thread": "LLWgZoR86kg", "msg": "fMV5biPM0VwJ", "author": "David Hopwood", "date_disp": "Jun 14, 2000, 3:00:00\u202fAM", "subject": "Random sboxes... real info", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

tomstd wrote:
> In article <Fw3B5...@bath.ac.uk>, Tim Tyler <t...@cryogen.com>
> wrote:
> >So, following the advice of looking at a block cypher and thinking
> >of it as a large s-box (in the hope of this helping you design
> >smaller tables) apparently leads to the idea that smaller s-boxes
> >should be constructed as random permutations...
>
> No you failed to see my point.
>
> Let's take RC5 with a 128 bit key. There are about 2^128
> possible permutations right?
>

> Well those 2^128 permutations out of the entire (2^64)!
> permutations are strong with respect to diff and linear
> analysis.

I think you may be labouring under a misapprehension - the 2^128
permutations selected by the key are not stronger than a permutation
selected at random from the entire space of (2^64)! possibilities.
In fact, a method for selecting a permutation uniformly at random
from that space would be as secure as a keyed permutation (a.k.a.
block cipher) of that size can possibly be.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOUb1qjkCAxeYt5gVAQFUEAgAoNW64cQmWq8Xt7xpwEHlm/K9YpVpKMGp
h54Rs4CZCGZKX2REEaQ+dkFd7vQg3S4BIw82qJcVgXh7onow5pAH9vXbLunc9KJf
ktZ2YSCAksATPHtycKIBxpdNFJE1CEs69gLp6hE+58FexAjWmrbJirhF1f2qaggZ
Jl/wdBZSZV+D8VFOAmgqm7HdIy4zwgySnNnVniXvl5X0I/xCnjMdAHvxMXmDprj/
GcHK86+1WF5dGYPI4meTXTCp4O6I0dqgrvzVbu0/oVlXzli0JRspKKyyD6rO2W5H
iFf/t+MZ+3szGGED6WXLepIRY3hTReK9hsqdVUra94WwWavmMp1L7A==
=7Xzj
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/LLWgZoR86kg/m/fMV5biPM0VwJ", "n_sections": 51}, {"thread": "LLWgZoR86kg", "msg": "cixZgn7_jcgJ", "author": "David Hopwood", "date_disp": "Jun 15, 2000, 3:00:00\u202fAM", "subject": "Random sboxes... real info", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tim Tyler wrote:
> David Hopwood <hop...@zetnet.co.uk> wrote:

> : tomstd wrote:
> :> Well those 2^128 permutations out of the entire (2^64)!
> :> permutations are strong with respect to diff and linear
> :> analysis.
>
> : I think you may be labouring under a misapprehension - the 2^128
> : permutations selected by the key are not stronger than a permutation
> : selected at random from the entire space of (2^64)! possibilities.

> : In fact, a method for selecting a permutation uniformly at random

^^^^^^^^^^^^^^^^^^^


> : from that space would be as secure as a keyed permutation (a.k.a.
> : block cipher) of that size can possibly be.
>
> That last seems questionable.

Not at all.

> The space of all possible permutations contains the identity
> transformation - which is not strong.

It is not specific permutations that are strong or weak; it is the
method of selecting them. The identity transformation occurs with
probability 1/((2^64)!), which is exactly the probability that it
*should* occur with for a maximally secure block cipher.

Worrying about a permutation selected uniformly at random (if it were
possible to do that) being weak, is just as bogus as worrying about
a perfectly implemented OTP having an all-zero keystream. Not only
is it not a practical weakness, it is not a theoretical weakness
either: the identity transformation occurs with the probability we
would expect for a keyed permutation that hides all information about
its input.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOUg7QzkCAxeYt5gVAQEpQAf+KoRq6yj8ZdR7dg51WfngRxHFypZQfAo5
xzoJPQYt3wvzPsICmxXfxBUE38uTELJeJx6vjSSGPw8t2HZw8LLGzErhlhdW6C2C
3B3w3zTV0zslE3NXmNtPY4VKyY1RKXszMJ4FNEmt4igHL4vbrlVm+az4YidL8HsC
bgUUJFABwfuvu1adzJbXJPRVEQDo8RN95MX8XMf9ABv+wKg2BYsTUZ8SEsLWEgD8
6ovU2h6vAWP4ymMGGFBGPndNfChleVp27RvkIMgH9cIY9eiuPXFTns6W1oITIaOX
HfN7njrF7mGwSreo6o7HZEZ5EbRNenZpYRGG9n6REmQ6e1Vma4L8Gw==
=nhDw
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/LLWgZoR86kg/m/cixZgn7_jcgJ", "n_sections": 51}, {"thread": "Pm353T9bDN8", "msg": "sg0RvEqHwSIJ", "author": "David Hopwood", "date_disp": "Jun 15, 2000, 3:00:00\u202fAM", "subject": "On using compression as proper means of encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
[snip]


> Use a PRNG (crypto strength unessential) with a key as
> seed to generate a sequence of symbols (length of sequence
> determined by PRNG) to initialize an adaptive Huffman
> compression algorithm, taking care that all symbols of the
> plaintext alphabet are input at least once. The output in

> this initialization phase is discarded. Then start feeding
> symbols of the plaintext into the algorithm. Use the result
> as ciphertext. Decryption amounts to a corresponding
> decompression after doing the same initialization.

This is very weak. It amounts to no more than a simple
substitution on variable-length symbols. Frequency analysis
can be applied almost as easily to variable-length symbols as
it can to fixed-length symbols.

[...]


> One can employ the scheme alone or as a component of a
> larger scheme (multiple encryption), where we note that it
> need not necessarily be the first component of the whole (as
> compared to current usage of compression as pre-processing).

If it is not the first component, it will expand the ciphertext
for no real benefit.

> One can also substantially boost up the scheme described
> above with simple add-on's. Since a PRNG is available to us
> anyway, I suggest that for this purpose we inject into the
> output stream of compression some amount of random bits
> at dynamically determined time points with the aid of the
> PRNG.

This does not provide any significant improvement, since the
"random bits" would have to not collide with any valid Huffman
output symbols (in order to allow them to be recognised by the
receiver), and the fact that they have different frequencies
to the valid symbols would allow them to be stripped out.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOUgwJjkCAxeYt5gVAQH9Tgf9Ez9BF/yThgwaloZhU7aSS0apdoAvocsp
lBOfLBG9qm/IMwwYuMoO/GR+HKe3fQdSItS7Raf6clLWQ1vgVNVq6FJb53aueH6P
qU2W34vpX84RM1HtDv1dFgtVxq66fG75b/XzrC08hPmvM2CHoDCFG1M6FpOqjUAu
aE6pmDmo3/wvDPB6gj8UUpaIyJtyD83FAClrtILF7/mPrliu8JsPlCh0KJEbBO2n
3fZ8JfxnlhQpuuoDcmqg4nyf/IZp14wKyJDX32DIjK/DeNGdrEkG8HROtkd4DQN4
oh8asKlHowu4NXPtbHnt3YCF5pMEAIJAjnSYMw7Xn+bGofpbtl9EKQ==
=L0NT
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Pm353T9bDN8/m/sg0RvEqHwSIJ", "n_sections": 26}, {"thread": "Pm353T9bDN8", "msg": "aGDvLtUbNmYJ", "author": "David Hopwood", "date_disp": "Jun 16, 2000, 3:00:00\u202fAM", "subject": "On using compression as proper means of encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"SCOTT19U.ZIP_GUY" wrote:
> hop...@zetnet.co.uk (David Hopwood) wrote in
> <3948304A...@zetnet.co.uk>:

> >Mok-Kong Shen wrote:
> >[snip]
> >> Use a PRNG (crypto strength unessential) with a key as
> >> seed to generate a sequence of symbols (length of sequence
> >> determined by PRNG) to initialize an adaptive Huffman
> >> compression algorithm, taking care that all symbols of the
> >> plaintext alphabet are input at least once. The output in
> >> this initialization phase is discarded. Then start feeding
> >> symbols of the plaintext into the algorithm. Use the result
> >> as ciphertext. Decryption amounts to a corresponding
> >> decompression after doing the same initialization.
> >
> >This is very weak. It amounts to no more than a simple
> >substitution on variable-length symbols. Frequency analysis
> >can be applied almost as easily to variable-length symbols as
> >it can to fixed-length symbols.
>

> I am not saying it is as strong as scott19u.zip but
> it is very hard to try to do frequency analysis on variable
> length symbols.

I don't see why, but maybe we have different ideas of what is
"very hard". It would be extremely tedious to do by hand, but
shouldn't be too difficult on a PC.

> Becasue with out a tree you do not know where one symbol starts
> and one symbol ends.

You don't need to know that in advance. One possible approach is
to assume that any bit position could be the start of a symbol,
and tabulate the frequencies of all bit sequences (of lengths up
to some reasonably small bound) starting from each position.
Some of the actual symbols should stand out despite the noise
caused by incorrect symbol boundaries; at that point you can
guess most of the boundaries and repeat to give a more accurate
frequency analysis.

> Obviously you haven't given this much thought.

Obviously you think that just because *you* don't know how to do
something, it must be difficult.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOUmRyzkCAxeYt5gVAQH5VAgAphHv5IK2quMaLtgPgYt0gWbR4ilgg+Us
Bw2cH0mKyX7SZ9VZW4ZmCbeHK0X3z8BtK9Z/ZVJ5BBmnAyPMc1YM4IxUWibaYZIc
38f5rhLBVV8BadORqK1RMOJaRcGeX0Hy450NzAnxH+Nm7bYrn3xlAxmGipAAxYmQ
ygYBHqk7AIoKxTb/7la9i5h3rgg7r99oa0cgfSxMtMQTAyLUb6iUlcOJo0xVkhsj
BHvu1zrBdu9o42c189YNhIJdSmUnhGcH8EFk67UqUcLZqQ7FPJ+mWj7rMKiIjb46
p9csXYRz3XdE3/XZTdzqjF6BCq2cbyV9HBYVuIcq4WXGo8rtZyQ9Vg==
=LxR7
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/Pm353T9bDN8/m/aGDvLtUbNmYJ", "n_sections": 26}, {"thread": "RB36fFv1mJ4", "msg": "9meuIcHMjjUJ", "author": "David Hopwood", "date_disp": "Jun 15, 2000, 3:00:00\u202fAM", "subject": "hmac and 'length' issues", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

sarnold_i...@my-deja.com wrote:
>
> One common problem with using keyed hashes as MACs is that additional
> data could be appended (or pre-pended, depending on the algorithm) with
> the required hashing easily performed.
>
> From what I have seen of the HMAC construction, it doesn't need a length
> field to help prevent this sort of attack, but I would sure like some
> consensus to that effect from other cryptoheads before implementing it
> without a length field.

HMAC prevents this type of attack because a direct hash of the message
is not exposed:

HMAC_H(key, text) = H(key XOR ipad, H(key XOR opad, text))

I.e. because H(key XOR opad, text) is not accessible to an attacker,
it isn't possible to use it to construct the hash of a longer message.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOUg2kzkCAxeYt5gVAQElJQgAlbieEPMSh5zveG0hewbwcFzcyY3SQiJC
ik24U5pj5Qf+kgA6PN6bU8rIACK9AilIonbNbOE39Gqqqa69wvzoNeQHK1k7Rvn8
Qd7adts7/UQT6Jlj+GnVC+WR+Udq6+LCNGX2tIBqxgYlcJp3r+CiVpG4P1I4sZ+l
9ck+mDy4nrkiMKGeld7ju/HqmgOjelKeniR7SY4MgA7kJ5RmH32s/hfzaBOF1C8D
Ueqdev1T5ZfE/7tF7nqT+PrxBCA2Oeg2bXCSvJxW1spFBXuE4UsfD8C9fTanyaom
RVR/61wdX7ZADxqmwHrr/kD+tLO8v/OeH+/MhDyr+Wr6gYkwsRWpDg==
=4WQq
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/RB36fFv1mJ4/m/9meuIcHMjjUJ", "n_sections": 3}, {"thread": "SYZcHLwcanM", "msg": "hR0WtyNnEokJ", "author": "David Hopwood", "date_disp": "May 29, 2000, 3:00:00\u202fAM", "subject": "encryption without zeros", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Scott Fluhrer wrote:
> rick2 <r...@home.com> wrote in message news:rb-17BAC7.22362727052000@news...
> > I would like to use some strong encryption but need to have

> > the output not have any zeros ...


> One possibility (assuming that the plaintext has no zero bytes): use your
> favorite block algorithm in ECB mode. When you encrypt a block, you check
> if the ciphertext would contain any zero bytes -- if it does, encrypt the
> block again (and repeat until the output doesn't have any zero bytes).
>
> And, on decryption, to use the same procedure, you keep on decrypting until
> you get a block without any zero bytes.

[...]


> The ECB mode is somewhat weak if plaintext blocks can repeat -- you may want
> to have a transformation on the plaintext beforehand to lessen that
> possibility -- your current set of bit-shifts may do the job nicely...
>
> (I tried to work out a similar procedure for another mode, but I cannot come
> up with way which cannot infinite loop, and whose decryption is
> unambiguous...)

Any of the other chaining modes can be used with the above transformation as
the block cipher, and addition mod 255 on each byte instead of XOR.
E.g. for CBC, if n is the block size in bytes,

Encryption:
C_-1 = IV
C_i = E[K](add(P_i, C_{i-1}))

add(x[0..n-1], y[0..n-1]) =
[adjust(x[0]+y[0]), ..., adjust(x[n-1]+y[n-1])]

Decryption:
C_-1 = IV
P_i = sub(D[K](C_i), C_{i-1})

sub(x[0..n-1], y[0..n-1]) =
[adjust(x[0]-y[0]), ..., adjust(x[n-1]-y[n-1])]

adjust(x) = 255, if x = 0 (mod 255)
= x mod 255, otherwise

[x = adjust(x+y) can be implemented without using conditionals or division,
as { x += y; x -= (x-1) >> 8; }. Similarly, x = adjust(x-y) can
be implemented as { x -= y; x += (x-1) >> 8; x &= 255; }, assuming
twos-complement 16-bit arithmetic.]

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOTK9cjkCAxeYt5gVAQHoMwgAtf/4goIbI/aZMmA2s3vithtb1MEUR30L
xgTWjJk8Gkc7nFUa7kHJ3lv0b0AL+E/CCq9Q+/jk7njFte25d8gftgKvR1SRCsEG
icU0iDHEwH0G/E5kCZbGFgb+RCE+ek+TfL1ebcwIdbOYbzzqq1IH7K/KHYIF58an
bmA0wnDFyiFRWT2yBu2d3kRzuOxKCHOdyfO/yRBVVVD1yldM/m+ZJIbZ1fGUmXQE
lhrhdRNWUZhyYlWdUPbgUCDtkVOy0tzJC1xKpajSSXSUf+WYMm7idIi614XpIztT
jMkNkFf4ipSwqX6p0NCl5WR1p0lRaUwQV1oNcuYk7R8fWKxykhprHA==
=hy0L
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/SYZcHLwcanM/m/hR0WtyNnEokJ", "n_sections": 39}, {"thread": "SYZcHLwcanM", "msg": "tBVRm_7VaGkJ", "author": "David Hopwood", "date_disp": "May 30, 2000, 3:00:00\u202fAM", "subject": "encryption without zeros", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Guy Macon wrote:
> In article <8gunu7$17v$1...@nnrp1.deja.com>, bryan...@my-deja.com
> wrote:


> >Tim Tyler wrote:
> >> It's quite possible for this encryption system to go into an
> >> infinite loop.
> >

> >No. Remember that we know the original plaintext has
> >no zeros, and the block encryption function is a
> >permutation. There is at least one zero-free block on
> >the cycle - the original plaintext.
>

> So it chugs away for a while and finally sends out your message
> unencrypted!

... with probability less than 2^-63 for each block.

(For a 64-bit block size, the probability of a single random block
containing zeroes is p = 1 - (255/256)^8 ~= 0.03083. Cycle lengths
for a 64-bit PRP are uniformly distributed on [1, 2^64]. If we make
a reasonable simplifying assumption about the independence of the
probability of a block containing zeroes and the length of the cycle
containing that block, then the probability that a randomly selected
zero-free block falls on a cycle where all the other blocks contain
zeroes, in a random cipher model, is:

sum[i = 0..(2^n)-1](p^i) 1 - p^((2^n)-1)
------------------------ = ---------------
2^n (1 - p) * 2^n

~= 2^-n / (1-p)
~= 1.032 * 2^-64)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOTQgczkCAxeYt5gVAQF1pwf+LTbtFGQl1GE1SmADf8CEmaM5mL5zsSc5
OCOuzH2tOZUWf0GAGOkJ4bSUOhl+5Vj4lf13kiGg0ODDvHei6IKYd7m0rIf1VL94
weu+uORo1SOGkACLWT6XOVr92t/C8N4qIMna9riF6DG2zcHld43eLcr5TbLGh6yR
A2oL5zW8nYZun+XMZ1bmJS4d5Lo11JNOEcauG/ZKFLZtuBWUdFotaUjjxh4H4iWd
L3L8IK5L+CQYmE8wV766BQcXqFypOY5uuiYtqY3r9tUOlCxKoyUSLe3vaR39CULa
RjyKeNidqLKRvFtK64Yrgu+kPlj3Mz0I2MLMe/4xoOUetqg+wbYO/A==
=zqlM
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/SYZcHLwcanM/m/tBVRm_7VaGkJ", "n_sections": 39}, {"thread": "WCxYwgk0gto", "msg": "FnmtPIjJweMJ", "author": "David Hopwood", "date_disp": "Jun 15, 2000, 3:00:00\u202fAM", "subject": "Comments/analysis requested: stream cipher derived from hash function (SHA-1)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Lon Willett wrote:
> Notation:
> N -- size of hash function output
> B -- size of hash function block; must be >= N.
>
> hash(S: DATA) -- cryptographic hash compression function that maps
> the N-bit value "S" and the B-bit value "DATA" to an N-bit value
> (e.g. "hash" is SHA-1, "N" is 160, and "B" is 512).
>
> State (after N*i bits output):
>
> S1[i], S2[i] -- N-bit values
>

> Iterative step (generate the next N bits of output):
>
> Output[i] = S1[i] xor S2[i]
> S1[i+1] = hash(S1[i]: S2[i])
> S2[i+1] = hash(S2[i]: S1[i])

If S1[i] is ever equal to S2[i], the output after that point will lock to
all-zeroes. The probability of that happening at each iteration is 2^-N,
so the expected number of iterations before it happens is on the order
of 2^(N/2). This is a mostly theoretical weakness when N is 160 (and
definitely theoretical when used in your RNG), but in any case, it can be
fixed by making the two hashes different, e.g.:

Output[i] = S1[i] xor S2[i]

S1[i+1] = hash(S1[i]: S2[i], 0)
S2[i+1] = hash(S2[i]: S1[i], 1)

In this case, if 'hash' can be treated as a random function, then
(S1[i], S2[i] -> S1[i+1], S2[i+1]) is also a random function, which would
imply an expected cycle length of about 2^N.

It would also be possible to add the counter i to the hash input; that
guarantees an effectively unlimited cycle length.

> Other RNGs seem to assume that enough entropy can be collected before
> they remix their pools to prevent backtracking attacks. I would like
> to make backtracking attacks "hard", even in the absence of any new
> entropy, and this seems to be the simplest way of doing it.

Yes, I completely agree with this.

[...]


> But I am still very interested in how
> strong it remains when both "E[i+1]" and "H[i+1]" are missing (zero),
> but the initial values for S1[0] and S2[0] are strong.

[...]


> Input:
> E[i+1] -- N-bit miscellaneous entropy data (if available, else zero)
> H[i+1] -- N-bit hardware RNG generated value (if available, else zero)
>
> Notes:
>
> H[i+1] may be weak (or zero), or may be known to an adversary,
> but CAN NOT BE MANIPULATED by the adversary (ideally, of course,
> it is none of these things).

It's generally a good idea in RNG design to assume that the entropy input
*could* be manipulated, at least partially.

> There are no restrictions on E[i+1], but if it doesn't contain a
> full N bits of entropy, then the PRNG is susceptible to an
> iterative guessing attack, and so it shouldn't be used. Rather,
> it should be saved and combined with more entropy sources until
> at least N bits of entropy have been accumulated. And, of
> course, ideally it should be unknown and unmanipulated by
> attackers.
>
> Output:
>
> New state:
> S1[i+1] = hash(S1[i]: S2[i], E[i+1])
> S2[i+1] = hash(S2[i]: S1[i], H[i])
> H[i+1]
>
> Random value (N bits):
> Output[i+1] = S1[i+1] xor S2[i+1] xor H[i+1]

I'd change that to:

New state:
S1[i+1] = hash(S1[i]: S2[i], i, 0, X[i])
S2[i+1] = hash(S2[i]: S1[i], i, 1, X[i])

where X[i] is taken from both the hardware RNG and the other entropy
sources, whenever a conservatively estimated N bits of entropy have been
collected, and X[i] is the empty string on iterations where not enough
entropy has been collected. I don't think there is any need to treat the
hardware RNG input and the other entropy input differently.

Random value (N bits):
Output[i+1] = S1[i+1] xor S2[i+1]

I removed the XOR of the output with H[i+1], because it allows state
following attacks (what you called iterative guessing attacks above) if
each H value is of low entropy, and all E values are of zero entropy.
If you're concerned with this type of attack, it's better to mix in
entropy only in fairly large chunks.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOUg+jDkCAxeYt5gVAQFiTQf9HfJw9R+2yXAAOOdc4jM+8txrVdMl5OmA
fgBORNPLd+4r6enEdPWf/EYEvMuxGJw0AEbbquiznysGUHjJFBxLFY6zlM5D1+1Q
Zcm5pRbBCm38cNwEVjZY6yosa/E931p8iTfi1Ux6KQ/mQe0nC8Jm6TxUKjpGphMl
wp8LMmb4/kLY8f6WMrWMItjQ/YH7EYavioUpc0UppbNj0wBeLoDN/gMZi9iHt++d
3YVPzQziYU3SvhKfIyyG0Cw/Qw200SRKSt2w3cYUMjdPqVa+121s0LHFS2DG8uqK
+X9kI5lIzqRfPsYiqAr11BYvlR/sB8HE2cz20/NMv00SGCcJb5tQqA==
=ZOQZ
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/WCxYwgk0gto/m/FnmtPIjJweMJ", "n_sections": 20}, {"thread": "WCxYwgk0gto", "msg": "_TfMfkkDsDAJ", "author": "David Hopwood", "date_disp": "Jun 15, 2000, 3:00:00\u202fAM", "subject": "Comments/analysis requested: stream cipher derived from hash function (SHA-1)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Hopwood wrote:
> > Iterative step (generate the next N bits of output):
> >
> > Output[i] = S1[i] xor S2[i]
> > S1[i+1] = hash(S1[i]: S2[i])
> > S2[i+1] = hash(S2[i]: S1[i])
>
> If S1[i] is ever equal to S2[i], the output after that point will lock to
> all-zeroes. The probability of that happening at each iteration is 2^-N,
> so the expected number of iterations before it happens is on the order
> of 2^(N/2).

Sorry, this is wrong - the expected number of iterations is on the order
of 2^N.

The rest of my article is OK despite this mistake, though (I still
think it's a good idea for the hash functions to have distinct inputs,
for instance.)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOUhjxDkCAxeYt5gVAQFgxQgAu/sD5jxDhYEhN8/L5AuxxrxQlcQD8WHw
lBiLN8rJfyd0zwgOQw0dtX/FBMQQaiwclPbXABBk36lWzUANHP4u6wJPfS73S04g
7aS5FVKbimPvYPvVdjprk57ZvMw51NqwdZ7km+MPYuptKiP0NF7ZAL/hSBig1Hul
2gSfManKOligrpoVxb1qtwu5Mco8Iyas0duX7bEGjCA9oTWLtcMMM+Hn42rjA9St
aaxpxR/m9IxkrXxwoNBqltqaZBDaWyEEa8n4h+a+axkO0ZB/hvUp5TARr7fisHVW
Y7tvljEIVHzPoIk87efCNa481niO081l8YDdd09DrQcj0sfF6taT7g==
=5aJe
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/WCxYwgk0gto/m/_TfMfkkDsDAJ", "n_sections": 20}, {"thread": "WCxYwgk0gto", "msg": "UBMbdmSWNQgJ", "author": "David Hopwood", "date_disp": "Jun 16, 2000, 3:00:00\u202fAM", "subject": "Comments/analysis requested: stream cipher derived from hash function (SHA-1)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Goldberg wrote:
> Tim Tyler wrote:
> > OTOH, if H contains a small quantity of entropy, you can /potentially/
> > defeat an attacker who has learned the state by accumulating the
> > entropy - and then performing the infamous "catastrophic reseeding".
> >
> > If you dripple the entropy into the system as you go along then the
> > attacker can perform the "state following" attack to maintain his
> > knowledge of the internal state by repeated guesswork.
>
> I have a PRNG which has 260 words of state, and each call uses 8 words,
> changes 5 words, and outputs one word. If my 'dribble' of state isn't
> added where it directly affects a particular call, I don't think an
> attacker can use repeated guesswork.

I haven't looked at your RNG in detail, but in principle this can be
correct. OTOH, it makes the resistance to state following attacks quite
difficult to analyse, because it depends on the detailed design of the
RNG. If you add entropy in chunks large enough that each chunk cannot be
guessed, then it is much more obvious that state following is prevented,
almost regardless of the RNG structure.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOUqChzkCAxeYt5gVAQH1aggAzL/G+rbQBQLLRbTCuI+Lwu8VdNBskS7L
qWALOwqjNCxrT/7gcEL84KDuNcuqWCczdVpL5ePewAaVoR4hlD3aMz11Yu5uCMQT
fiPzn5qu2HvvcDoMQsm13vrdI7A52yBbGpjJu3TuY2bqU8k9G63w3gbs0KVDnHj0
U47sk3/0ZK/R0xKp3f0G/UG653N2hf/60jdTojeH+fjXm88dUZsvKYFsheCohPhx
KMiia/idx7TW7PEGkyXCEv5iEd+LMySe4BN911iDQHIvIVqc0CFLruprWxYpZog7
rkRqsJN05cZ+IQs8K+Yh9XcSklySnd+4MvY5S99MwSzGQ3dAkDKv6Q==
=PLy3
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/WCxYwgk0gto/m/UBMbdmSWNQgJ", "n_sections": 20}, {"thread": "Yeb53GhqHrE", "msg": "380Hy8rST5cJ", "author": "David Hopwood", "date_disp": "Jun 16, 2000, 3:00:00\u202fAM", "subject": "RIP Bill", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

MagiconInc wrote:
> What if the key is material which it is illegal to disclose under the
> Official Secrets Act? Is one obliged to disclose it, or not?

If that happens then technically, there is no way for you to avoid breaking
either the RIP Act or the Official Secrets Act. Your best bet would seem to
be:
- tell the person presenting the notice that the information is covered
by the OSA, and refuse to hand over the key.
- if the notice is not withdrawn, then you've broken the RIP Act.
In that case tell your lawyer (and no-one else directly, in order to
avoid a RIP tipping-off offense) that the information was covered by
the OSA, and hope that it never comes to court, or that a jury will
take your side.
- if you are convicted, appeal claiming a breach of the right to a fair
trial under the European Convention on Human Rights (I forget which
article that is at the moment).

IANAL.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOUmz0zkCAxeYt5gVAQFymAf9FnzM39YSp6PY6DZljLIMkIYIA8Ytca9+
/1NakCvIOtOiMqT2hdTxjw6SJQRSbRQpQTB1wWozdBV5kDLSu5UmjdSHqBAeKnTk
VZ/L9vA7uICGgeTY0jTlPU0API4NspCX8TMOvx2r3beh4SmQYtfPAgZ0/jivg9XD
hBJ3f76AmOOZC2X38m84KprNH4ybleITqoYG5NfarqesGD/X8jVlFQW1DaVg+2U9
uS5Mbzfb7VOAdI8iFyGqclIA4OKdgiG/M7NvES4d2svGKLdIqJDN9+NFUWp5Ax/J
v0p3PROokvMoHDYbdoXkBM4JwZ4g8ypDB4p905ma0H5WeDQyrZgz8w==
=ui/y
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Yeb53GhqHrE/m/380Hy8rST5cJ", "n_sections": 3}, {"thread": "ZmqQomWSAPg", "msg": "GYUuflqe8B0J", "author": "David Hopwood", "date_disp": "Jun 10, 2000, 3:00:00\u202fAM", "subject": "Keys larger than the plaintext", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

sarnold_i...@my-deja.com wrote:
> This brings to mind a question I have had for some time now; is there
> any point in using a key larger than the data to be encrypted?

There can be in some cases. Consider public-key encryption, for example:
in that case there is a minimum key size needed to make sure that the
problem on which the cryptosystem is based is sufficiently hard. Another
example is passphrase-based encryption; when encrypting a very small
plaintext, the passphrase may have to be longer than the plaintext in
order to be sure that it has enough entropy.

Also, if a system is used to encrypt variable-length messages, it may be
convenient to use a fixed length key, even if a particular message turns
out to be shorter than that key.

> If there is danger in brute-force-searching the key, why not brute-force
> search the plain-text instead? :)

"Brute-forcing" the plaintext doesn't give an indication of whether any
particular guess is correct. Brute-forcing the key might give such an
indication (even if there are fewer possible plaintexts than keys),
depending on the algorithm. It would in any system that includes an
integrity check, for instance.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOUHR5TkCAxeYt5gVAQHe9gf+JmpwY77A7LvqsPVHMKjqkg3RIECDxYFA
tY8mo4qwDwtRfBzInlI+LEm+nHFAHPDeWXUCiqe3i2ccND3ZjDXByVAe/KTardDU
HEGKQVG6GBwsQeCorORn6gZNKG4gQumwAc6MjsEtYGZARHG3EvLm5mn+EYI0CAa0
QzecJt1OT6vnQK+bR4ceE9p7dXy5Xcdy9Kj1m8iW90cnsUmZHXtiupXZZY+eNZcA
nToTEjSdNeQtrWOmMQ78dsuqFu8UnNooaKF2St0pjONwo/uLtUtOP3JjSEZl5hDR
ajtbOGS17OKxN9EUvtKUKY5fOCgZT6BI0N2a78wPTcuKk95FXXNDCw==
=TWPf
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/ZmqQomWSAPg/m/GYUuflqe8B0J", "n_sections": 14}, {"thread": "ZpLCAXusaaU", "msg": "fThmSm302SQJ", "author": "David Hopwood", "date_disp": "May 26, 2000, 3:00:00\u202fAM", "subject": "Short Secure Serial Numbers", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Rick Heylen wrote:
>
> I am trying to find a solution to the following problem.
> We have a serial number which the user types in (so it can't be too long).
> The serial number contains some information like a product ID, user number
> etc with a total information content of about 96 bits and 40 bits of
> "checksum" with the idea being that for all possible information contents,
> there is only one valid checksum and that in order to find a valid serial
> number, an attacker would have to test on average 2^39 possibilities.

> The code that verifies the serial number is public but we'd still like it
> to be time-consuming to generate different valid serial numbers.

> Normal public key cryptography would be suitable except that the message
> size for the system to be secure would be longer than what a user would be
> happy to type in.

I'm not sure that it would be all that long. A discrete-log (e.g. DSA)
signature would require a 2t + m bit serial number, where 2^t is the
security level, and m is the number of bits of information encoded.

For example, if you need a 2^56 security level and 96 bits of information,
that would make a 208-bit serial number, which is 41 characters in base 36
(i.e. 0-9a-z) encoding. (A 2^40 security level works out as 35 characters.)

If there is checkable redundancy in the product ID or user number, then it
would be possible to use a signature scheme with message recovery and get
the length requirement down further.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOS2tZjkCAxeYt5gVAQEYBAf/VUT9lKgEJL9NJU8e/GJA1mkvWvwYOW8b
SAdnbHKoQbFNdxhlaEhdLnKV4A8pxbJEj3qvAImMjazP+fedf5OGoJqAu9RMkw7W
kBZYejz1wFUhZz34t6qpl6x68CQJNRkT+yHTH2/qy8Jj5Mp7PQ1+leAHmpDErN/G
q0K0mgne3ggaGBDnFN48FHeu18E0aul1Q4+nW0Glck111YFFbM9SImyz5gz1WZ3k
YBHULKQfEnyLDxzM68f4+e5Y0AtdPEbrIHcwoupzTYfe2ja1F0t8/XAEqAtrnydw
OoLoxpTGm+KCgk4fmiaHVxZjr3BhNdKEhWO3U7wY9BgmOsVWZCtIBA==
=ZImS
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ZpLCAXusaaU/m/fThmSm302SQJ", "n_sections": 18}, {"thread": "ZpLCAXusaaU", "msg": "uoVABRyAUkoJ", "author": "David Hopwood", "date_disp": "May 27, 2000, 3:00:00\u202fAM", "subject": "Short signatures", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mark Wooding wrote:
> David Hopwood <hop...@zetnet.co.uk> wrote:
>
> > I'm not sure that it would be all that long. A discrete-log
> > (e.g. DSA) signature would require a 2t + m bit serial number, where
> > 2^t is the security level, and m is the number of bits of information
> > encoded.
> >
> > For example, if you need a 2^56 security level and 96 bits of
> > information, that would make a 208-bit serial number, which is 41
> > characters in base 36 (i.e. 0-9a-z) encoding. (A 2^40 security level
> > works out as 35 characters.
>
> Umm... A DSA signature is two numbers each the size of the parameter q.
> If q is approximately 2^2t, then the difficulty of computing discrete
> logs in the q-order subgroup is O(2^t).

Good point. I don't know what I was thinking of; let me try again with
a different signature scheme:

If we use MR(q)-DSA, which is a signature scheme with message recovery
described in [NR94], the size of the signature will be 4t, of which 2t
bits can be recovered. To meet the security bound there must be at least
t bits of redundancy in the recovered information (including any extra bits
tacked on to the end of the signature). If the number of extra bits is
k >= 0, and the number of bits of information to be encoded is m as before,
then 2t + k = t + m.

The total output size is then 4t + k = 4t + max(m - t, 0)
= 3t + max(m, t).

For reference, MR(q)-DSA is defined as follows (with parameters p, q and
g as for DSA).

Signing:
encode the message as M || extra = pad(message)
r = M^-1.(g^k mod p) mod q
s = k^-1.(1 + rx) mod q
the signature is r || s || extra.

Recovery and verification:
u = s^-1 mod q
M = r^-1.(g^u * y^(r.u) mod p) mod q
recover the message (or an indication that it is invalid) using
unpad(M || extra).

'pad' is an all-or-nothing-transform that adds t bits of redundancy, and
'unpad' is the inverse of 'pad', which returns "invalid" if the redundancy
was not present.

This scheme is proven in Theorem 1 of [NR94] to be "strongly equivalent"
to DSA, i.e. a valid MR(q)-DSA signature can be converted to a valid DSA
signature and vice-versa without knowing the private key. Subject to
some assumptions about the padding, this should mean that it is equally
secure.

[The reason why I didn't use the alternative MR(q)-NEW, also described in
[NR94], is that it isn't provably equivalent in security to DSA, and may
be covered by the Schnorr patent. The total message size for MR(q)-NEW
would be the same: 3t + max(m, t).]


In any case, assuming m >= t, this saves t bits over the case without
message recovery. Hardly worth the extra complexity, really, but
theoretically interesting. Can anyone do better than 3t + max(m, t)?

[RSA with message recovery would require something like max(n(t), t + m)
bits, where n(t) is the length of RSA modulus required for a 2^t security
level, but that isn't any more efficient for small messages.]


[1] Kaisa Nyberg, Rainer Rueppel,
"Message Recovery for Signature Schemes Based on the Discrete
Logarithm Problem,"
Advances in Cryptology - EuroCrypt '94.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOS9LIDkCAxeYt5gVAQGftggArKuF+qTN2IMcmWaFRyLCQDF0bnHFmSCX
K9niuN82XcFjZRgxJxh41YO6XMRRZCG7XCOaJ3WhRgKgxOpuRrV9a9pOMPPCaYgT
4NPQ6FlRXlJskfvIX+JsPMB4Eih9MmRk5pb9jzyLArB+9fSecMRM4WALXn8gfDsT
A+auwPElvz1sQAtasHYYKe54f0BzdQrgiDmSu0X+pSbfSYCyoR4YIJhq/am4vJWV
hj/pO2/tBOzoBPy5RV1vlNwaIJFmzb3vMmHQbfhjz3FI32tXhjYdhBQAQzq5R0BD
hjJye855lAv1Q04aR+005lgF6JTM9wUG8n0GDSPyDXPut0H7bqrGHA==
=FZmK
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ZpLCAXusaaU/m/uoVABRyAUkoJ", "n_sections": 18}, {"thread": "ZpLCAXusaaU", "msg": "zOt2tFSAfPoJ", "author": "David Hopwood", "date_disp": "May 27, 2000, 3:00:00\u202fAM", "subject": "Short signatures", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"David A. Wagner" wrote:
>
> In article <392EB16E...@my-dejanews.com>,


> Roger Schlafly <roger...@my-dejanews.com> wrote:
> > Or DSA. DSA signatures are about the same size.
>
> Really? I don't see it.
> For t-bit security, with DSA you need 4t-bit signatures,

Yes, my earlier post was wrong on this.

> but for elliptic curives you need 2t-bit signatures. (Roughly.)

Nope. You need 4t-bit signatures for elliptic curves as well - e.g.
for ECDSA you need to encode two 2t-bit *integers* (not curve points,
although even if they were curve points that wouldn't help), and
signatures for other ECDL-based schemes are no shorter.

RSA-style schemes based on elliptic curves over a ring don't improve
on this either, because in that case the ring has to be large to
prevent factorisation attacks.

Using a scheme with message recovery (over either a subgroup of GF(p)
or an elliptic curve) can improve the overhead to 3t bits, as described
in my other post.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOS7+mDkCAxeYt5gVAQHHFwf/VSlrRuwskDsuCVdm0oNXPzu9Hv+i0G1/
WyZocRIVGAXjFJ0gPUbzGkRNfzWZOJbNin/qpa+x4pk6yJKjX5dzwjqlFR8jcam4
b5Fe0Z5Yfnom1OLyJz4hnqpe0Ereo646GHqYRudkH70ZoP9XXuuGjuzz3HiMWujZ
BBC92/Y3hTuqaE4MoAC1PlZ46cWXI6nJpmnVxbeAV6HLbyu9Gg0u4O2T0rdLYtZg
M15UqY7WpKN/IflRbzbijUclmbZaFHORLM6SkPMmpsYEWKFgkYVKcyHjnb5/KkK0
3bb0gWUr+3cBFvLEQt0nvYgHH16CfPYlqQEg0M3sNzvvuiQys5ANcQ==
=yvpl
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/ZpLCAXusaaU/m/zOt2tFSAfPoJ", "n_sections": 18}, {"thread": "ZpLCAXusaaU", "msg": "D4ysvC0VSXoJ", "author": "David Hopwood", "date_disp": "May 27, 2000, 3:00:00\u202fAM", "subject": "Short signatures", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

I wrote:
[...]


> [1] Kaisa Nyberg, Rainer Rueppel,
> "Message Recovery for Signature Schemes Based on the Discrete
> Logarithm Problem,"
> Advances in Cryptology - EuroCrypt '94.

That should have been labelled as [NR94]. Note that the scheme normally
called "Nyberg-Rueppel" was in an earlier paper, not this one.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOS9h5TkCAxeYt5gVAQFukwf8CyrAfIcmNkYqJhfiSAZty+ifkTDqruE/
eBSBGBaJQ0hUZNfHgbFx8UJL3ww3ChExoiuYEdJts12K1PTvVSUj8xFwLLS4zDY9
5fel4VWROhdRnRBmF0ctNoqS1qpSSqoKknMnAMT2r52nMmQMGjYozjRTYwT+z3v5
XKMVPk5OahXFHFTyz7VRcDHR6OpT88ywmE2fQ3c4O3anQyAgAGOKuOP4RZwtsy95
8ZZWwK/TCIkaVGFgE5XiE/+vk5bTo0+8BHIIGTF2V4YS9MDe9XDTLpZ71/ARdtCm
uekHEDU3M+BHSZKJvLS0nE4lX2KgomgbPClZk0U41SpoR4jfaTR9ag==
=04KB
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/ZpLCAXusaaU/m/D4ysvC0VSXoJ", "n_sections": 18}, {"thread": "hv9hA7KUV4E", "msg": "skX-VaTjSiEJ", "author": "David Hopwood", "date_disp": "Jun 1, 2000, 3:00:00\u202fAM", "subject": "Compare 3DES's.", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Schlyter wrote:
> In article <8g4lqn$1eb$1...@eskinews.eskimo.com>,

> William Rowden <row...@eskimo.com> wrote:
> > . How is CBC mode defined for 3DES? According to the sci.crypt FAQ,
> > only ECB is defined for 3DES.
>

> While there's no official CBC 3DES definition, [...]

FIPS 46-3 (http://www.itl.nist.gov/div897/pubs/fip46-3.htm) has an
official definition of outer-CBC 3DES.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOTXI0jkCAxeYt5gVAQGh5gf8DLEg4zfp8QFZfuVUrLyeulKneOo5x/LN
j16rGRtGdSqNrCPx0T7veid9++H9vqk3QltQUNf9KOgSqM26huScJkvaX2OXT2zJ
p3AcyW+LKGsJcdv/SJGQ8BvvYyryJZf0+eMGdtmi8r0Y1qb38FZfNFjyaHnQwWZA
Vg97lKNHTTVocjiHKH571tlLrx9GLFlD4omuKQk5K5vr065T8HGePo3FcdjozYUB
Mfp9XHr8X0iGCF1k5NfUUyErhnrfER/WUJkgz/d9q+qHQ2fg1GCerYR6ARpLvjCR
+Eo4ESrRsqSq7y2j0CEMs/p8w5h4cAOgxyGD5VUq9llWB0/uer2OWw==
=Am+m
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/hv9hA7KUV4E/m/skX-VaTjSiEJ", "n_sections": 21}, {"thread": "ibWjq-sOSyA", "msg": "A8sBAc6rLKgJ", "author": "David Hopwood", "date_disp": "May 16, 2000, 3:00:00\u202fAM", "subject": "(May 11, 2000) Cipher Contest Update", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Joseph Ashwood wrote:
> Runu Knips wrote:
> > Adam Durana wrote:

[...]


> > > So if an attack arises that can recover the key or plaintext faster
> > > than brute force, I think that attack should get the cipher removed
> > > from the listing. Keep in mind this is a contest of cipher design.

> > I disagree with that definition. RC6, for example, accepts
> > keys of any size.

> Actually I believe RC6 only accepts key up to 1040 bits.

2040 bits ("The user supplies a key of b [8-bit] bytes, where
0 <= b <= 255.")

There are certainly attacks with expected work factor much less than
2^2039, though, so yes, RC6 would be eliminated under the proposed cipher
contest rules.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOSGQfTkCAxeYt5gVAQHdYAf7BWELJVhr18TaCK0eoJp+3knJx2NhEbH0
HlFvTyl1R7vxspiRRFLLyXv65b5aas0z1Aijjpr3l5Pv0E7y43q1HcKZRqzvp9v6
ZFszoyaVYWjlXbLpSmFcGEY06VRNwboas2yKd61ce7J0EL/J0iO65bhoRvYnrA9w
h5+RsDVYa+CgS8T9IlVIxpjxzw2K8ZcM3W0QgYK1ufDSdL+8B1J3ca/+eCaQZOxx
/GMiCWTRgIZq/Du2/R1cmVsxFRn5XKlF66E+7CIkqPf+Ji5DdF6ggxo2oiRkuYZV
1sDLIXkXsFnx/Bf7KAQc4cdxfFRb6r1/i0+Uq1xusEP2eH+5N/+dqg==
=FYCC
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ibWjq-sOSyA/m/A8sBAc6rLKgJ", "n_sections": 14}, {"thread": "mRdylAr0O2w", "msg": "_AyGvV_mKg4J", "author": "David Hopwood", "date_disp": "Jun 3, 2000, 3:00:00\u202fAM", "subject": "Weak Keys in TC3", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"David A. Wagner" wrote:
> In article <8h8l53$964$1...@nntp9.atl.mindspring.net>,
> Scott Fluhrer <sflu...@ix.netcom.com> wrote:
> > tomstd <tomNO...@dasoft.org.invalid> wrote:
> > > I found the first class of weak keys...If the 6 key words are
> > > all equal to -F(x+1), 0<x<7, then encrypting all zero makes an
> > > all zero output. The prob of getting this key is 2^-192 and it
> > > requires only one chosen plaintext to detect.
> >
> > If the weakness is "if you use a particular key, then encrypting a
> > particular plaintext will yield a particular ciphertext", well,
> > that's a "weakness" that's in all block ciphers. Or, in other words,
> > not particularly a weakness at all.
>
> Note that tomstd's weakness is a much bigger deal than yours,
> if you want to use the block cipher in Davies-Meyer mode to build
> a hash function. If you can find a key where 0 encrypts to 0 (and
> tomstd showed that you can, with much less than 2^192 workfactor),
> then you can start playing games with chaining attacks -- e.g., if
> the IV is 0, then prepending this special key to the message leaves
> the digest unchanged.

... which is arguably more a weakness of Davies-Meyer than of the block
cipher. Correct me if I'm wrong, but Davies-Meyer is a construction for
which it's difficult to prove anything concrete relating the security
of the resulting hash function to the security of the block cipher.
Personally, I don't like it at all; it assumes too much about the
cipher's key schedule (which is demonstrated by quite a few known attacks
against Davies-Meyer with particular ciphers, that do not significantly
affect the security of those ciphers for encryption).

> It will not be so easy to play these types of games if the special
> plaintext/ciphertext pair are unpatterned; the all-zeros plaintext/
> ciphertext have a lot of structure/symmetry.

I agree that a secure cipher shouldn't have structures like this,
although more because they may indicate deeper weaknesses, than because
they can be used directly.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOTiFrjkCAxeYt5gVAQGE3gf/TUSZu0prtzNSaGX6U4Z8pNCxC6VAZTZK
kvWeASyB9KbZjWRu+a1YpWZJmZ4g+iu5kxPjX5sXtKNrwK7dynkYd6EQoINbuCi5
K/1uL3uvUtoRYNPh6yUEUahp74xyD87hEdDlI73YvsSRKSYp0NLhpNWLAp2xdouF
azoTxsb54eHeEDCGDG9f7mFZyVg4kEaPmJONLHMTXdkkFmdbQIl96c55D9EKOmMN
MUpTjfIIHIPyG1eHkgsoGPjD4C8wUOzhtwk48JrGbPxaOwuCm5dGNc8JbAaGMOTZ
X2qcl93alwjiFk16+Ug6Vyaxkyszn041lVcJIWoGORkA1bnmhKT35A==
=i9I4
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/mRdylAr0O2w/m/_AyGvV_mKg4J", "n_sections": 7}, {"thread": "mvndxGw_XDY", "msg": "Rtyo28Z9NHIJ", "author": "David Hopwood", "date_disp": "May 19, 2000, 3:00:00\u202fAM", "subject": "Reasonably secure OTP passing", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Bradley King wrote:
> I had the idea that some properties of OTP could be useful in more
> conventional public key encryption. Please tell me what I'm missing
> here, there must be a loose end somewhere.
>

> If we pass an OTP over a public medium using a straightforward public
> key/symetric system (\u00e0 la virtually all consumer internet commerce) then
> the convetionally encrypted OTP should be virtually impossible to tease
> out of the cyphertext using cryptanalysis techniques because there would
> be theoretically no order to be found, the 'plaintext' in this case
> being random noise itself.
>
> If we then use the OTP that both parties now have to transfer the real
> plaintext message, then this cyphertext would also have no real order
> to it (which is the magic of the OTP method, after all).

There is no point in doing this, because if known plaintext would be
available for the straightforward hybrid cryptosystem, then the same
amount of known plaintext will be available for this system, by XORing
the original known plaintext with the OTP ciphertext.

The only thing this method prevents is a chosen plaintext attack, but
it does that at the expense of doubling the bandwidth usage, which would
not normally be considered a worthwhile trade-off (especially since
modern ciphers are designed to be resistant to chosen plaintext attacks
anyway).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOSXFgzkCAxeYt5gVAQEO1ggAujB3FhOa5feo7RWKa9H0QjidmooKfVPb
xUrD5KEm6p/VqL0DeJpcvouiS76F7wKaQ1d83GpF9lJrcdBE5fhhQq8xV4PAwCc/
00QywsaeVMAt+t7b1igXZycSgG7nHczbluQ93FQa63dNVuWYWBFEmkjD7Fz4MKCe
+Ii3IlMOwctFtH7R6GA+M6L86gnVPVwryqxz+wN3cNW7Rd2l8zHPgp6VDsEYlhfP
CLLZZn4KMhr2aBfXqln/k2OKxZ24f9jk/l4BibHIUvEF9LJ+9tZN3eJcezjzr1iL
vNChkUT/1lpyPyvtf9dbnu5/EEO0QfLUg1xrXkUDfBN7QEraa5hs8Q==
=N7Q5
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/mvndxGw_XDY/m/Rtyo28Z9NHIJ", "n_sections": 8}, {"thread": "nLQ55VC9bBo", "msg": "jHGem8oTTuwJ", "author": "David Hopwood", "date_disp": "Jun 28, 2000, 3:00:00\u202fAM", "subject": "IDEA", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Boris Kazak wrote:
> Mark Wooding wrote:
> >
> > Simon Johnson <pabaloN...@dimension.h3o.org.invalid> wrote:
> > > Moreover, IDEA doesn't have any steps that might be troublesome in
> > > software.
> >
> > Actually, IDEA's multiplication mod 2^{16} + 1 is a real nuisance in
> > software, even though it's theoretically lovely.
>

> Practically even lovelier: loading numbers into registers tests them

> against =0 condition, 16-bit multiplication yields the 32-bit product,


> thereafter adding together LSW, MSW and eventual carry finishes the job.

Don't use a branch; use the technique described in the Ascom paper below,
which is more resistant to timing attacks:

J. Kelsey, B. Schneier, D. Wagner, C. Hall,
"Side Channel Cryptanalysis of Product Ciphers",
ESORICS '98 Proceedings pp. 97-110,
Springer-Verlag, September 1998.
http://www.counterpane.com/side_channel.html

E.G. Giessmann, G. Lassmann,
"A Side Channel Cryptanalysis of the IDEA Cipher",
Advances in Cryptology - CRYPTO '99.

Ascom Systec, Ltd.
"Side Channel Attack Hardening of the IDEA(TM) Cipher,"
Ascom Systec White Paper, corrected version, May 1999.
http://www.ascom.ch/infosec/downloads/sidechannel.pdf

Ascom Systec, Ltd.
IDEA C Source Code and Test Data (corrected version, May 1999),
http://www.ascom.ch/infosec/downloads.html

A Java implementation I did based on the technique from the white paper
turned out to be faster than a similar one using the ?: conditional
operator (although this may have been because the JIT compiler did a
bad job of optimising branches). In any case, this technique should not
be significantly slower on any architecture.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOVlkhDkCAxeYt5gVAQFQ5wgAtqeN6YV50Lje6b8VL3DIpZ7kx3IWVwKW
akyJFuGCOYDLHeZ3Cyn5Ejk5G94E2Ev6YhBMS+RAAVxrxWYj6/3sFSn/lZrDXlUJ
VRnHMrTbP0w8wTst9l8OJMLQzz8xjYc00iH8MvEEOCllKHxE4116LzpxO+Y7oscj
W/3uyM++dypC3po5pLJOETMKc6E4hCkRe1UCbcLdukm54R2pKP0vWVzf9YksV76o
AHXkwEOF9ZaIga/hwrExx3m3F9RxNwaf0uGfkba6kVrLcQf1rZY0dQN2Kb0irxib
fy0xzjGavYNjiY92HYGcxLtWhPICuAEy7Yz/0JQUKgzzBARJLjKfRA==
=vKAO
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/nLQ55VC9bBo/m/jHGem8oTTuwJ", "n_sections": 39}, {"thread": "nMkx7I7wIAM", "msg": "LvZ6DDsMUAoJ", "author": "David Hopwood", "date_disp": "May 11, 2000, 3:00:00\u202fAM", "subject": "Generator for ElGamal?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

s...@nospam.unt.edu wrote:
> I was just looking at a piece of code that purported to implement
> ElGamal, and noticed they weren't making any checks to make sure that
> the "g" was really a generator. I knew that they used Schneier's
> Applied Cryptography as a reference, so looked in there and he says to
> just use a random g (which they have faithfully implemented)!

The brief descriptions in AC2 are not sufficient *on their own* to
implement any algorithm, particularly public key algorithms, accurately
and securely. They are intended simply as overviews. Although AC2 includes
references for almost every algorithm, it perhaps doesn't make it clear
enough that you really do need to read those references.

> Surely this is a mistake, right? The public key must include a pair
> <g,p>, where g is a generator for p.

g does not have to be a generator; however it should not just be random.
Ideally g should generate a subgroup of prime order, where the order
is large enough to prevent a square-root attack (say 2^180 or 2^200).

I suggest reading the following three papers:

Taher Elgamal,
"A Public-Key Cryptosystem and a Signature Scheme Based on Discrete
Logarithms,"
IEEE Transactions on Information Theory, v. IT-31, n. 4, 1985,
pp. 469-472, or
Advances in Cryptology - CRYPTO '84, pp. 10-18,
Springer-Verlag, 1985.

Y. Tsiounis, M. Yung,
"On the security of ElGamal-based encryption,"
1998 International Workshop on Practice and Theory in Public Key
Cryptography (PKC '98), February 5-6, Yokohama, Japan.
http://www.ccs.neu.edu/home/yiannis/papers/eg.ps

Paul C. van Oorschot, Michael J. Wiener,
"On Diffie-Hellman Key Agreement with Short Exponents,"
Advances in Cryptology - EuroCrypt '96.

and for an alternative to Elgamal with better security properties:

Michel Abdalla, Mihir Bellare, Phillip Rogaway,
"DHAES: An Encryption Scheme Based on the Diffie-Hellman Problem,"
Contribution to IEEE P1363a.
http://grouper.ieee.org/groups/1363/contributions/dhaes.pdf
(temporary URL), or
Theory of Cryptography Library.
http://philby.ucsd.edu/cryptolib/1999/99-07.html

The original paper by Elgamal, and van-Oorschot & Wiener's paper are on
the Springer-Verlag CD-ROM of CRYPTO and EuroCrypt proceedings between
1981 and 1997, which I would recommend highly.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBORn00zkCAxeYt5gVAQECLQgAl2kBEWudeMTkslGDC8nvLaHN0WAGqdVi
nXsxLe1W24ZOd6OZ1tMykwAfiFOPWCMnyKP5VeoG0XyYFuVUPzBZYdoBftYWw/fQ
KNwMDHuViz4bATa0S0ymMX8nKSof99+N9KQka+yWUV4Vw9RaursitUo1bH/Cg66q
SZNmTKUNXeSsqp0KlXUnOR0HOvpoVHGef/zBH38fhFowzBxX4I+YQTdQWLc/FNtg
U38IprKHzHlhLhpQuaewHyypBt6NLZDbXJMDIy61tqjkUMvytcJlG5CiOXiQkAog
yufSXjWqxlxEi9Yes0n7ZlkxJJDP+Dszpl3qjaQLLZ0NgAmJlsleYw==
=MVIU
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/nMkx7I7wIAM/m/LvZ6DDsMUAoJ", "n_sections": 8}, {"thread": "nMkx7I7wIAM", "msg": "yZhGAc8_arcJ", "author": "David Hopwood", "date_disp": "May 16, 2000, 3:00:00\u202fAM", "subject": "Generator for ElGamal?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

True, but "classic" Elgamal in Z*_p is not semantically secure anyway,
regardless of the factorisation of p-1 or the choice of g. If it is required
to prevent an attacker from learning any information about the plaintext,
then the appropriate response is to use another DH-based scheme that is
semantically secure (e.g. DHAES); changing the p and g parameters alone
is not sufficient.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOSDIbTkCAxeYt5gVAQE8xAf/RrYppjDqCHxk6U8tOJKJq74NPdDTTAAt
KLLmOn9PiND8wy7II5Gazpn0uHw7Fgo52bMTB31CYMVxJ+NlzY3d24m8aImszTSc
zwU3//Cd3u9mAKv49uCJDZouveAlmqTRlLA7rW4l3hf/Q/shEOgqQ1Rv09WOy5uL
WLTlLiA/hJ5aCgh1vJOnfNF3dDuPa8aD/rwGS4CdUNtXVJpZXxu/+4THRvmSB58v
sA3Pu1tSRdYvJLNELlVxFtjTNRgnj9pFviYWOC3eP+xykiL3/k5H1z78Y9zSJ3IZ
d9PnMhY/MH2/2F4sowYBPoiquPa0YiB5JZ5WMAq+NNB5MmTyQXC11w==
=JK7v
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/nMkx7I7wIAM/m/yZhGAc8_arcJ", "n_sections": 8}, {"thread": "qA3JtkLqPws", "msg": "F1FRXCAyuf4J", "author": "David Hopwood", "date_disp": "May 26, 2000, 3:00:00\u202fAM", "subject": "Retail distributors of DES chips?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mark Wooding wrote:
> Tom St Denis <std...@compmore.net> wrote:
>
> > That's not true. This cipher could simply be
> >
> > Ek(P) = P xor K
> >
> > unless you test it.
>
> Yes, but the point is that, in theory, DES is completely deterministic.
> If you have a DES chip, you can feed known keys and plaintexts in it,
> and verify that you get the right answers against some other known and
> trusted implementation. You can even give it `trick questions' every
> now and then while it's in production use, checking its results, to make
> sure it's not randomly deciding to emit leaked key material instead of
> giving the right answers every now and then. I'd hope that most serious
> users of black-box cryptography hardware or software did something like
> this.

Testing isn't sufficient. Consider:

DES'[K](P) = DES[K](P), if P != backdoor
= K, if P == backdoor

Then with a single chosen plaintext, the key is revealed. Assuming the
backdoor plaintext is chosen randomly, no amount of testing that takes
less than 2^63 expected work will find it.

> With DSA, if you don't trust the hardware, you're stuffed.

Indeed, but that's just as true for any other algorithm - it's just a
little bit more involved for someone to work out how to stuff you.

- - --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOS4ieDkCAxeYt5gVAQHOUQf8DAJuAiDxIHLRNvbijTsAuzC8VIMALsvx
ZRD5YX9XhVSIERnaGcB5VTzsbJVfwXfjG5BqTHf6CamR6pCP3SWPdEHNU1sVBdVd
U7vjOqYHUd7aIP+t6MTHx1/oswc/IowMfJ53DUoqYwHhKnKX/oWpZBhucz8EpcVZ
sxaXdGLL0AKzwQhrKDAkvGrH87WJOqynF/UP06tCJGl2ydJ0SNK319IlK6UOZ0+t
bDfNxNPtA9lLgRbm/gJzrcF67z+TLUFjNnO7wz0J2VDgIllH5QDfg6cfHkcHMZFG
0JcyarBUxiqUsV9Aa9icM27HGTN5AqkQes6OuRQbPjGNthOyzZTwMQ==
=3cHu
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/qA3JtkLqPws/m/F1FRXCAyuf4J", "n_sections": 36}, {"thread": "sJPRR-ERuPA", "msg": "kspdmWI8S10J", "author": "David Hopwood", "date_disp": "Jun 24, 2000, 3:00:00\u202fAM", "subject": "TEA-wmlscript question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

dexMilano wrote:
> I've tried to implement TEA in wmlscript but I've found some problem to
> assign the Golden number delta (= 0x9e3779b9).
> In the wmlscript we have (signed) int a 32 bit so the range arrive to
> 7fffffff.

WMLScript specifies twos-complement arithmetic, so you can just use
signed variables as if they were unsigned. (Note that addition,
subtraction, multiplication and xor are the same for signed twos-
complement arithmetic as for unsigned arithmetic, when viewed as
operations on bit patterns. If you can find an implementation of
TEA in Java, it will probably use this technique.)

> The question is: Is there a way to create a golden number minor than
> 7fffffff?

Use 0x9E3779B9 - 0x100000000 = -0x61C88647 (but if you're not familiar
with twos-complement arithmetic, look it up and make sure you understand
why this works).

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOVQoVzkCAxeYt5gVAQGiOwgAvsTp+lYNE2LSfUchKheXdlWJM2fQu6uP
dazIe4mveJchjjT0g/svrR7CX1YDNL8/ttrQRDj0nk/MZwSiMjDqW75FG5Hvq3hT
nZmmZsODzgt2FGl1FNXfzpYxtADtPQt+Go+L9PZ7PWyKCHHXNPWXDAssvQoGt+Iq
5X49BX0wAEbLhAxvELAQFDDag0Uyoqljh9681VGn7x8Jhb/wN8C43BXHrZ8dVx0N
GDPkXKidaOPI3oM+AP7YZBofdN3c2vbohHoouwmy/jdJ9nXme9Ghedr7M429U//P
W5ZV0TlYqNd9aIcOkYtfON8/7TUXnajUeyU3+zQZ+0mOr+pS/b/dCA==
=kPfU
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/sJPRR-ERuPA/m/kspdmWI8S10J", "n_sections": 13}, {"thread": "sjrhVB-MIPI", "msg": "401bPgY4fPEJ", "author": "David Hopwood", "date_disp": "Jun 5, 2000, 3:00:00\u202fAM", "subject": "XTR independent benchmarks", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Eric Verheul wrote:
> > > [...]


> > > The hard part of parameter generation in XTR consists of
> > > generation of two prime numbers of about 170 bits.
> > > No way, that LUCDIF parameter is faster! It should
> > > (theoretically) be about 3^4=81 times slower!
> >
> > Yes, LUCDIF parameter generation is almost certainly slower
> > (although I didn't test it), but how often do you generate new
> > paramemters?
>
> *Almost* certainly?? Do you have shares in LUCDIF, or something?
>
> Generating a strong prime (as you do) of about 512 bits is a lot
> slower than generating 2 of 170 bits!
> According to your posting you seem to believe that generation of
> a strong prime number of 512 bit (as with your LUCDIF) costs
> 5.21 msec, while the generation of two prime numbers of 170 bits
> (as with XTRDIF) costs 8.35 msec! It seems that you believe
> more in the output of your software, than in Math.

The benchmarks that Wei Dai posted did not include parameter
generation (and said what they did include, quite clearly).

> The point is that you said: "XTR is actually slower than LUCDIF",
> and I'm disproving that. Period. Moreover, when generating
> parameters for a public key for digital signatures, this
> typically needs to be done on a trusted device, like a
> smartcard.

No. For DL-based schemes, only key generation (i.e. one exponentiation)
needs to take place on a per-user basis, not parameter generation.
Trying to generate the parameters on a smart card is just silly, IMHO.

> If this takes too long, users will pull out the smartcard of the reader:
> generation time is crucial.

Key generation, yes. Parameter generation, no.

> Where your LUCDIF parameter generation on a
> smartcard (!) takes the time of generation of a 1024 RSA key,
> i.e. up to 10 minutes, XTR's parameter generation takes seconds.

... which explains why RSA is a poor choice for such applications,
but *any* of the DL-based schemes (e.g. DH over GF(p), ECC, LUC*,
or XTR) would be perfectly reasonable with respect to key generation
time.

> And yes, if you precompute the LUCDIF parameters the actual
> public key generation will take seconds, but then a lot of users
> will share the same parameters (like with ECC): this is not advisable.

Why is it not advisable? Just like any other DL-based cryptosystem,
parameters for LUC* should be chosen conservatively large enough to
make the precomputation stage of index calculus discrete log algorithms
infeasible. In that case it doesn't matter that users share parameters.

(Note: I'm not particularly recommending LUC. I would recommend either
ECC over GF(p), or plain GF(p) instead.)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOTsU5jkCAxeYt5gVAQFRDAgAkVjtltljg54rkoqMobAXH6mScZlg4z7h
ybzgy41GHZVnasEB84aAxkH+rXVN0c6p+fgU7sn4OW3dWFv4syx/x12o7RPLD469
zX8LcUGnKIvoLK4fR76A8RL0KSM9dgbBFjte2RpahYOXIm/AZ8A5KnLzi/4HNZnH
KXPtpoDy47fnN5lg59sXO0UH8D2JvaSUX15vomhcXGSp1qy9KJIlboyW2LJXseEN
ztiBY2te6SKbZpLNJP+aE+JRq1PQVV0H7fB6tJYtOiNflLYum7fjbcjr9C7H1hkn
5aMsayl0359gftO2EG/QURGHqzfHHFI3NvLGx7y3s8+t5tUrVqwX4w==
=k29g
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/sjrhVB-MIPI/m/401bPgY4fPEJ", "n_sections": 26}, {"thread": "t64Km6UUSGE", "msg": "E_wrNFuDvIMJ", "author": "David Hopwood", "date_disp": "May 27, 2000, 3:00:00\u202fAM", "subject": "Patent state of Elliptic Curve PK systems?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Rubin wrote:
>
> In article <3929B316...@spam.com>, Roger Schlafly <no...@spam.com>
> wrote:
> >Certicom says it has some patent applications pending, but
> >it is hard to see how they will stop anyone. Most people
> >get better performance in software with other bases, ie,
> >trinomial bases. Or one can use (non-optimal) normal bases.
> >Or use prime fields where you have more curves and fewer
> >known attacks.
>

> What about the technique of representing the point (x,y) as (x,sgn(y))
> in a message, since the rest of y can be computed from x? That's been
> given the fancy name "point compression" and I have dim memory of hearing
> it was patented.

It is not patented. A different point compression technique developed at
Hewlett-Packard, which shaves off one extra bit, has a patent pending. See

Gadiel Seroussi,
Compact Representations of Elliptic Curve Points over GF(2^n),
http://grouper.ieee.org/groups/1363/Research/Supporting.html#hp

(and http://grouper.ieee.org/groups/1363/P1363/patents.html, which
references a letter about the patent status from HP).

IMHO this technique is not particularly useful in practice (and is not
included in P1363 or any of the ANSI standards), although the paper is
worth reading if you're interested in the maths.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOS9e3TkCAxeYt5gVAQGZ2ggAzqHb6nuoG5QsD+aObXhSDKOC1LHfBNlR
k17RGkXnFAaDe/2EgL2mnffL9dyygYl9vIJ/GqcTeua6upCVoCUiV8rjtMmXKCEs
n/uOZPs0SYlKgAQcMntoo3YxOlI2ijrUC8GoCnwYHjrr40Uh7V6cIXaTvkkIApJ9
pV73QGx2ClvUYokK2hmFBgEKSYdjvvnyepGg0hNqG/bYoGammM0hdjPYEG5+SKWd
N8QaVf8aw1ccpx6hrjgGXmVFrDXqWlRHwI8iqMSwxUP9Jzgz9KYtJDR+Z0xdDWmP
4b5Nr4w08xP7jyROaoqbs6W8I+maGWGF9zMoEmvqcfXQ7R5Y1Ws2uA==
=18FL
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/t64Km6UUSGE/m/E_wrNFuDvIMJ", "n_sections": 12}, {"thread": "tWtigbn4i40", "msg": "ZKjF0XRsQyQJ", "author": "David Hopwood", "date_disp": "Jun 14, 2000, 3:00:00\u202fAM", "subject": "More papers online", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

tomstd wrote:
> I added a few more papers (not my own papers) to the website...
> you can find them at
>
> http://tomstdenis.com/crypto/
>
> A while back I found a nice site that had a list of all
> published crypto-authors and their papers.

I don't know about "all", but

http://www.users.zetnet.co.uk/hopwood/crypto/scan/

has links to various lists of on-line papers at Counterpane,
Cryptography Research, the Theory of Cryptography Library, and a few
others, as well as a comprehensive collection of papers that define or
cryptanalyse specific algorithms.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOUbK7jkCAxeYt5gVAQHrdwf+NEkf3E/JQE/cN39CwttMtZUylcVHiEFL
P6cepC60gn7CrY05NbLK7fgzwtxwR/B4/JgXX+mPt3oKWud2/wX/q4A3b1nxx74g
4vkwN1EQ1YVIhX4Csq6n+BYJLK+ZQGWXjD00lKRic9iZMQLus7bcRSL1VGWsW3JG
mgOUOdcCLV0Y+19C76ZUgzCxkNJz/YMcnieduk5Cx1tX4z6nFi/9ZsrmwueUFJHF
+OP+9HIm+i9KN9WxbzTzrAoHBFZMGOz9HqEmSthl/lXis1mssz2EQ9RRF6gWlwow
OMiNcg/EadzUSjQHzUrt4skEY8fFZxm1Hxsd0Ipb+cyp8ZqY7qPobA==
=HmXX
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/tWtigbn4i40/m/ZKjF0XRsQyQJ", "n_sections": 7}, {"thread": "tcngoGtLDGI", "msg": "t3R2065ZLBAJ", "author": "David Hopwood", "date_disp": "May 23, 2000, 3:00:00\u202fAM", "subject": "Initialization Vector / Message Key with Stream Cipher?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Elros wrote:
>
> Let's say that U is a key supplied by the user, that R is a string of
> "random" characters (different for each encryption), and that M is a
> message to be encrypted. With a stream cipher, is it better to:
>
> 1. Encrypt M with a key of R (giving Me). Encrypt R with a key of U
> (giving Re). Store the ciphertext as Re+Me.

For an additive stream cipher [*], encrypting two messages by this method
will leak the XOR of the corresponding R values, which may allow a
related key attack. If the R values are independent and the cipher is
resistant to related key attacks, that doesn't seem to be sufficient to
break it, but nevertheless I don't think this method is a good idea.

> OR
>
> 2. Encrypt M with a key of U+R (giving Me). Store the ciphertext as R+Me
> (i.e. R is not encrypted in the ciphertext).

This is better IMHO, but still may allow related key attacks. Use this
instead:

3. Encrypt M with a key of H(U, R) (giving Me), where H is a cryptographic
hash function (if the output of H is too long, truncate it). Store the
ciphertext as R+Me.

Also note that if U is a passphrase, then H should be made computationally
intensive in order to slow down dictionary attacks.


[*] An additive stream cipher is one that uses a reversible operator such
as XOR or modulo addition, to combine the output of a keystream
generator with the plaintext.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOSqr5DkCAxeYt5gVAQFg1Af6AyRN89g47QldRXGWWpcn3X/gITbR3Zg5
osunUz1P52B4SwOIdxAGDEJIRMGeQ4Iv907VvqYWjoyhpKnF1FsMA7HgFYwxctXX
831vsJsIut4KRkThQBiDe1dU2NHRGxa1Sw5I+uHDq6hv39Wnk7e7HL+kXcajkcvK
o7xXvvkME1NcQZRTX2s1jAgeIC/0ihpfwfQME24scGITABJ9zxdk2FMpZ/ESWrGG
iSoCwFxO+TCdhCd7vYiEIoCGAil6rOKmZkBSz5YEgyD0ver+Yxr74VxsJqrIA5aK
FBv9NV5vHDHe0EeQDqXcqTKWNvH1neR5xd1nRL39jRFy46KLuTfruA==
=lRQg
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/tcngoGtLDGI/m/t3R2065ZLBAJ", "n_sections": 5}, {"thread": "umbdF_nL5TM", "msg": "_afVLLiIpMUJ", "author": "David Hopwood", "date_disp": "Jun 21, 2000, 3:00:00\u202fAM", "subject": "Variability of chaining modes of block ciphers", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
>
> The most popular block chaining mode seems to be CBC.
> There is also PBC which chains with plaintext blocks.
> One can also accumulate the previous blocks for doing the
> chaining and use plaintext as well as ciphertext for
> chaining. (I used this in one of my own designs.) By
> combinatorics this gives 8 variants. Obviously one can
> also use modular addition instead of xor and do some
> random rotations if one likes. I think that the variability
> of chaining modes could be advantageousy exploited such
> that the actual chanining mode used in a message has to be

> guessed by the opponent, thus re[n]dering his task much more
> difficult.

Definitely not a good idea. If even one of the possible modes
is weak, then some data may be exposed; in effect, the system is
only as secure as the weakest mode. Block cipher modes should be
chosen carefully for suitability in a particular application,
certainly not at random.

(Not to mention that it may be easy under some attack models to
determine which mode has been used - for example by observing the
effect of making changes to the ciphertext - regardless of whether
it is determined by a secret key.)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOVA8aTkCAxeYt5gVAQFT8Qf/Z2YiFUgs8hKD/RxP94y9JTVh8E4aBSwC
5Vpe6a0/lMfpWWcQ9MU8k8Tw/koQACiXS/88Om8FxbAhDpqRVSocU0JdZKQaSlIw
XSpwM7MBkM96dXQGrVOWhJIyhehUu8Bk2AJmZf4gRCScmw3maKUGj0ILPOUy9qxb
M5C/pdYo2/PfQUeNqFa0Ej1bgv3xcqutU35pQu4VQ+GN6dMCDBjr+FnLX2Cb6viw
3BQF7eNNOSboDpaQlMRSXeHdbIDdPSmiXN4QnB8WdTXl1nmfDofIeeHi63BAfAJu
cXD4CCvNxNDBkbXAW3UK0YxtitZ+5s0xXKShuoOugysk+OoP4nUkRw==
=7R4a
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/umbdF_nL5TM/m/_afVLLiIpMUJ", "n_sections": 100}, {"thread": "umbdF_nL5TM", "msg": "oop7n2p7hnQJ", "author": "David Hopwood", "date_disp": "Jun 23, 2000, 3:00:00\u202fAM", "subject": "AES key lengths", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mark Wooding wrote:
> Mok-Kong Shen <mok-ko...@t-online.de> wrote:
>
> > It is indeed strange that you have seen very few recent ciphers which

> > hav fixed-length key sizes. The most recent ciphers of significance


> > are certainly the AES candidates. How many of these allow you to vary
> > the key size from 128 by steps of, say, 8 all the way to 256?

DFC, FROG, RC6 and Twofish. (Also CRYPTON-1.0, which wasn't technically
an AES candidate.)

> > (Note we were discussing about 'slightly larger keys', not giant
> > jumps.)
>
> Off the top, RC6, Twofish, Serpent, and CAST256. I think (but don't
> quote me) that MARS and HPC also qualify here, and possibly other things
> like DFC and Frog. Rijndael's key can be increased in steps of 32 bits.

The Rijndael spec only gives numbers of rounds for the 'official' AES
key lengths.

Key length (bits)
Algorithm Min Max Multiple

CAST-256 128 256 32
CRYPTON-0.5 64 256 32
CRYPTON-1.0 0 256 8
DEAL 128 256 64
DFC 0 256 8
E2 128 256 64
FROG 40 1000 8
HPC 0 no limit 1
LOKI97 128 256 64
MAGENTA 128 256 64
SAFER+ 128 256 64
MARS (original) 32 1248 32

MARS (tweaked) 128 448 32
RC6 0 2040 8
Rijndael 128 256 64
Serpent 128 256 64
Twofish 8 256 8

(These values come from http://www.users.zetnet.co.uk/hopwood/crypto/scan/,
and were derived from the specification documents for each cipher. Only key
lengths for which the cipher is fully specified are included.)

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOVLGAzkCAxeYt5gVAQETnQgAnlMS9UCIFjjZiiq0bE5Sm6uBMwN5mV+y
tR4vPz++MSkvkbK5rte8OmycV4p2dTm6u2Wr70nslZpOIrbiyG/UoB8Mt4vz5KOF
vsFG5o1vH9h2LekxfwKpHFOImaGOxvAPUxco48exc3aRAKDDeZFcIxF3b8wiF2FS
matOKdOaeZb8yvUJ1J1zJS8GuU2cq9jaCrUFaXvSuQ2o8EzXyb0Lz0dcsi3KnygP
azhox/nC5F2HJqa/n3rd/dz94J4ie+OiKSa4zDTzHbtNmVAR5dYEx/Z4e0WyJXTJ
Uwu28jp/cxOu6C0sXpxTEfzm56p6AhJJsXEFKomoMuE6rx6lYpC0nw==
=xZhd
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/umbdF_nL5TM/m/oop7n2p7hnQJ", "n_sections": 100}, {"thread": "umbdF_nL5TM", "msg": "YQPizg8Vt8EJ", "author": "David Hopwood", "date_disp": "Jun 23, 2000, 3:00:00\u202fAM", "subject": "Variability of chaining modes of block ciphers", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
[re: varying block cipher modes on a per-message basis]

> I was not recommending any specific way of choosing among these
> 8 varaints (maybe plus some others). My point is that there are
> a number of varaints to be considered. If one determines that there
> are more than one variants that are appropriate for the application,
> then one can advantageously exploit the variability of using these
> variants.

No, not really. It makes the system more difficult to analyse, and has
no significant compensating advantages. If you want to argue otherwise,
respond specifically to the technical points I made in my previous post
(that some data will be encrypted using the weakest mode, and that under
some attack models the mode can be determined easily), rather than
handwaving.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOVLIQDkCAxeYt5gVAQELGQf/dH0bdl2avc4YKQ7NmknOFav42zGNclp+
XdrOSCc7VxIs0RKw4pP6Xx8CBch726aJREXSB1ABllUqU1N4T/xxAgXpzJs037KX
5ClVICI2FFuwQDp3bvtokO2QpzY01/hrs6jqvqN90Wj9eyOph8yBhtAVVeswr1f1
msfZLeE6QW2qpMSbttZFFFkcUZV/kK9Oe2TpFnblispFqIap11wIpZPC+W7AWsMo
kyX90X0+kEsR/u8Q/DGAHnGmkF+SJ+ZdvfWiyy0YKcPvfVhMFwtIZ+lg57MGFJ+a
Z156k9L6DbOnyu03WCGPf+tn4PZmqB9okRwVQcla0hSLgWn3N9sQpA==
=Risw
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/umbdF_nL5TM/m/YQPizg8Vt8EJ", "n_sections": 100}, {"thread": "umbdF_nL5TM", "msg": "eOW01LzZOW4J", "author": "David Hopwood", "date_disp": "Jun 24, 2000, 3:00:00\u202fAM", "subject": "AES key lengths (Serpent and Twofish)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mark Wooding wrote:
> David Hopwood <hop...@zetnet.co.uk> wrote:
> > Key length (bits)
> > Algorithm Min Max Multiple
> [...]
>
> > Serpent 128 256 64
>
> Serpent keys can be any bit length. The paper is clear about how to
> handle keys shorter than 256 bits: you append a 1 bit and pad with
> zeros until you have 256 bits.

The Serpent spec says:
# The user key length is variable, but for the purposes of this submission
# we fix it at 128, 192 or 256 bits; ...

Granted, it is clear how other key lengths would be defined, at least for:

Serpent 0 256 8

(not for multiples of 1 bit, since the ordering of bits within a byte
isn't given, and there are problems with how you encode such keys).


> > Twofish 8 256 8
>
> Is there some problem I don't know about with zero-length Twofish keys?
> I thought you just padded with zero bytes until you had one of the three
> specified lengths.

That's what the spec says, but it isn't what the C and Java reference
implementations do. For keys of <= 64 bits, the reference implementations
pad to 64 bits, rather than 128 bits (i.e. they use k = 1, in the notation
of the spec). To be consistent with this for zero-length keys would involve
either using k = 0 (which doesn't work), or k = 1, which would make zero-
length keys a special case for which k != ceiling(N/64).

It's always possible that the behaviour of the reference code for key
lengths <= 64 bits is a bug, of course. However, since the C and Java
versions are consistent, I assumed that wasn't the case. The test vectors
don't help because they only cover 128, 192 and 256 bits.

I've cc:d Ross Anderson and Bruce Schneier, so we can get definitive
answers about what key lengths are specified for these algorithms.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOVQsAzkCAxeYt5gVAQEz7wgAh+kQfVLw4ApRvb1TUozMIwBiip8IO54J
VDz9jULN/M0YJCFNzuXWMf70Qyz2GldRVtU6mQoOunNCnT6z1rip+e7Ht8iukKe9
ppdkusQuOv391X9cLE7i/RGvLLCJyz4e6LC8xx4SqhSp/kZL4bv7u2DhPENYIEz8
VXozFnUh2j4oS9tvp4BCrPVHAnUX4FfZ89c236eBBT27h4vciJLsXLzvUQk8gpU2
yS5H1U7ns1oYW8hPP1q6W4ohZOTCgiMj7fpv6hhipM135xk3okRsGWPhqXPndCGT
hOu5UQ1tRkdWR8dHbR6hoNidi3206PRk+VzNZK8l4clX9sE7Cgyq7A==
=Rfro
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/umbdF_nL5TM/m/eOW01LzZOW4J", "n_sections": 100}, {"thread": "umbdF_nL5TM", "msg": "j_kqpP-x6SMJ", "author": "David Hopwood", "date_disp": "Jun 24, 2000, 3:00:00\u202fAM", "subject": "AES key lengths (Rijndael)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mark Wooding wrote:
> Mok-Kong Shen <mok-ko...@t-online.de> wrote:
>

> > It is a valuable information (and I personally consider it a good
> > news) that Rijndael's key can be adjusted at will.
>
> This is an improvement mentioned in the new version of the paper
> submitted in Round 2.

That explains it - I was working from the first round spec.

> It defines the number of rounds Nr as a function of the number of key
> words Nk and the block size (also in words) Nb:
>
> Nr = 6 + max(Nk, Nr)

You mean Nr = 6 + max(Nk, Nb).

> Perhaps Mr Hopwood would like to amend his table of key sizes in the
> light of this information?

Yes, certainly - that makes it min 128, max 256, multiple of 32 bits.
I'll repost the complete table when Serpent and Twofish have been
clarified.

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOVQW4jkCAxeYt5gVAQFkhgf+L3+76myE5mUfPjigpQLNnNU/1yWM+PPh
UrbWPGn118PmA9NP5zVK1TOycygmJel5SZ2NPwjWqZDFpVf5G81UZbNOTTdEDBV3
qKbaad1ZrRJr7p/fvPhfwgRPgTPh8g8MD6HU6FFI0InY6xms0tmJ+AKUgvm5q001
yMUKvfSpWChXoiKns9G0umSXHIAQH/j9Vnkdr/+vQQdp4VGrjhOvMFERV7xgmVmx
HJglQ5xFUlBl/mjB6QGpzTkwZCAheTMosCv289RRfpujZl9rpF6YJIeN1sGjOY6P
J+egz1hsCsop4WRwUSc4faqowByE9MV54VNEaUr9Owd+SPrgafRmSQ==
=6PC1
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/umbdF_nL5TM/m/j_kqpP-x6SMJ", "n_sections": 100}, {"thread": "wWKxPhognTs", "msg": "oJjL9UORcxcJ", "author": "David Hopwood", "date_disp": "May 31, 2000, 3:00:00\u202fAM", "subject": "DVD encryption secure? -- any FAQ on it", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Dulando wrote:
> lament wrote in message ...

> >My guess is that the DVD decoder chip has the key "hidden" in silicon
> >somehow, and that only a "few" chip designers have that information
> >(the key). If this assumption is close to correct, then it seems a doomed
> >scheme from the outset.

[...]


> I'll do a terse explaination on CSS (Content Scrambling System) and how it
> is used on DVD players.
>

> Well, basicly, every DVD player has a unique key to use for descrambling
> which ubiquely needs to be encrypted within the program to prevent reverse
> engineering of the application to determine the key. While a different key
> for each player seems like a nice precaution as to not invalidate the entire
> cipher if one key is discovered. However, apparantly (and this is just what
> I've read) the system (CSS itself) is not the best encryption, and the
> people who made DeCSS (Masters of Reverse Engineering, or MoRE) were able to
> identify around fourty or fifty acceptable keys all from one original one,
> which they gathered from the Xing DVD player for Windows, which was found to
> not encrypt thier CSS key. (Blame RealPlayer, they made Xing).

If the Xing key had been encrypted, that wouldn't really have made much
difference; given more than 50 choices of player to work with, the obvious
approach is to reverse-engineer the least well protected one. In short,
"it seems a doomed scheme from the outset" is pretty accurate.

For another summary and a copy of the DeCSS source, see
http://www.users.zetnet.co.uk/hopwood/crypto/decss/

- --
David Hopwood <hop...@zetnet.co.uk>
PGP public key: http://www.users.zetnet.co.uk/hopwood/public.asc
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOTSDAjkCAxeYt5gVAQHLpwgAqqu1YI5umSbT0q1GvaGwG1tebD+kBKhC
r+p3gEDwOA65A//cL1eDF1yNLIu5ezC2BZ4r6dgSOwDq6VTur7xqlGJV4cOftMDd
//s1G5CbJ74JZRppslOV5OwuR40j+dVQAm+j9o7h+BeCtrJ8ILk775ANsJo44TWs
zdAEg3YKOblp77b0KCNda4QWQQ4zEvPqdDh/nL0h/e//NiJZQeFHxuvbf/G89AnM
U0MANNEKOZwRWIPKmmecE/+ZCCIJV/imMJa+TSyC3nsFdFIxcy7v8UzNVkydH1w5
PGiuJP8Z/eTqk93tYe66cCgnLIuPfQZ+pI3CrOzwxtUXg0uE7kAZqw==
=eY21
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/wWKxPhognTs/m/oJjL9UORcxcJ", "n_sections": 32}, {"thread": "0nc0Wwe9De0", "msg": "0MnqhQnsKcoJ", "author": "David Hopwood", "date_disp": "Sep 14, 2000, 7:26:12\u202fPM", "subject": "RSA Questions", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Future Beacon wrote:
> Does anybody know what goes wrong with RSA
> if p or q or both are not necessarily prime?

RSA does not necessarily have to be used with two primes.
However, some factoring methods (in particular Lenstra's Elliptic
Curve Method, or ECM) require work that depends on the size of the
smallest factor rather than the size of the modulus. To resist these
methods all the prime factors should be larger than about 300 bits.

The case that is most likely to maximise the attacker's expected work,
though (even if new factoring methods are found), is two random prime
factors of equal length.

> Surely there is still a way to select a d such
> that decryption works for the receiver.

d = e^-1 mod phi(n). phi(n) is the product of (p_i - 1) for all
prime factors p_i. (The least common multiple of the (p_i - 1)
will also work.)

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOcFdkDkCAxeYt5gVAQHpbggAv3g2A0LSVSkaNzuX/rreh4o9FCAXjF9c
I28JZ3eCgpgRnqPM0+CZeT5pZ2xyaeHTXQos9nyQ4cgmkF9LWjGtd3YxxnpWkERo
lzJYAQb3y8CLMv7Xtnv1wOu5ieMzz5hcOpEohrtEiOHTPWY8oTh3EdL/KRGWVz8i
6sphyJvGKbEkFnLtObcxinXEpnub0//JflYexUXbMHLPE/WcT+yLYMS5/JG1PupH
5m2zG61DeyY9YjJhXfV2M1zTXOhuAnmQiStG0UNQgsF06XVia0Q133eJl4Na/F6r
NKZy274FMMqYpwyK7iid+i4HX4RfLkzOO+ATZtpn4ULUdGv2058DGw==
=VwSC
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/0nc0Wwe9De0/m/0MnqhQnsKcoJ", "n_sections": 66}, {"thread": "4aylx-Wo3JU", "msg": "2T8q9RNgAboJ", "author": "David Hopwood", "date_disp": "Sep 12, 2000, 7:50:27\u202fPM", "subject": "Getting Started, advice needed (FAQs , yes I read them)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Andy C wrote:
> A friend of mine brought me this algorithm that some software he uses has
> embedded in it.

[snip]


> Ok, now for the question - is this secure enough?

No, the key length is only 32 bits, for example. It's an interesting exercise
to break it without use brute force, though.

First look at the structure of the algorithm, defining auxiliary functions
for anything that looks vaguely complicated. Categorise these functions as
invertible or not, and perhaps note any other interesting properties (e.g.
do they use only linear operators? - although nothing that complicated is
necessary for this example). The specific values of any "magic constants"
probably don't matter either.

Write the algorithm as pseudocode similar to whichever language you're most
familiar with, extended with mathematical notation, and simplifying as much
as possible. I find short variable names better; you're trying to arrive
at something that you can take in at a glance and fit in memory (human
short-term memory is really quite limited).

For example:

// plaintext and ciphertext are viewed as a sequence of 32-bit words
uint32 P[], C[];

for (i = 0; i < P.length; i++) {
// f is an invertible function on 32-bit words

temp = f((P[i] + k) mod 2^32);
C[i] = temp; // ***
k = (k + temp + constant) mod 2^32;
}
// and some junk swapping two array elements, that doesn't matter
// because it is unkeyed.

Determine what the secret state is at any point (in this case only k).
Consider what happens if a plaintext/ciphertext pair is known. E.g. at
point ***:

C[i] = f((P[i] + k) mod 2^32
k = (f^-1(C[i]) - P[i]) mod 2^32

Voila, with a single known plaintext/ciphertext pair we have k, which is
the complete secret state. The algorithm isn't strong enough to be able
to learn anything more about cryptanalysis from it.

> I'm wondering about the "magic numbers" this appears to have in the <<
> and >> and addition areas. Is that the proper place to start looking?
> And if so, what am I looking for?

You should be able to recognise these as a standard idiom for a cyclic
shift (the left and right shift offsets add up to 32). That's why f is
invertible (it is the composition of three invertible functions: two
cyclic shifts and a constant subtraction).

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOb7AzjkCAxeYt5gVAQEz/wf9H1TShbDVC6ZgNdG9v8S2JE9ztpE4MQpR
hPU1UUDI4CjJu/y1WpFJi+8LVSk9nWUjiPF1i3qbUDlXuAAXaFx8lgthh9xndtct
EJkTdpGabVwrvKHmfNob7VVcLBqZSyh1IYWJmcj45/dlCPS25LHZ9kSyQNXo5/29
qtUFXhnQP1Z6o3m8L+lqJGlzY6ucPmsNYocjUPJTZN/GaFXfyCpzepzf7/3holfW
qj7FheDHTfXtMGmvBhP2FuRyVx5a6zrBSr/oW5ib9/hy34WpWebESo4x7wmdQR7i
MLZPqV9CCa3tl0B10Nd3JOoOxRyKZHl7GV6ozKRMv5Gkwc342t6y5w==
=oYwX
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/4aylx-Wo3JU/m/2T8q9RNgAboJ", "n_sections": 26}, {"thread": "6q4d2Edq30E", "msg": "8fpMt3aWJbMJ", "author": "David Hopwood", "date_disp": "Aug 29, 2000, 1:39:10\u202fAM", "subject": "\"Warn when encrypting to keys with an ADK\"", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"S.R. Heller" wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> On Fri, 25 Aug 2000 13:58:56 GMT, Ron B. <zyp...@spamcop.net> wrote:
>
> >I followed through on your suggestion and verified that you are
> >correct. The warn label seems to apply to the enforced AAR only.
> >However, from the pgpwinusersguide.pdf documentation:
> >
> >\u2022 Warn when encrypting to an ADK. Use this checkbox to specify
> >whether to issue a warning whenever an encrypt-to key has an
> >associated Additional Decryption Key.
> >
> >Is this an error in the documentation or a deliberately misleading
> >statement?
>
> I'm sure this is only an ambiguous statement, trying to encapsulate a
> complex process. If you are encrypting to a public key with
> Additional Recipient Request (ADK) and you are using a plugin which
> doesn't normally present the recipients dialog, selecting the "Warn"
> option will force the recipients dialog to appear, thereby giving you
> the chance to see that an ADK has been added to the recipients list.

It would be better if that were *always* the case; having a warning
option to set seems to have misled people into thinking that there
would be an additional explicit warning message-box (which is certainly
what I would have expected).

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOatFUzkCAxeYt5gVAQE5YAgAlADkIZ2KruEu/FPsokUl4ma0ExM2UM2R
w7h6fKJOEwDkO6j7YsSeZZOsd1+tz5KmbbZQGaq7ZlsrRlx+POm85et84w2FJCRW
zFvD442T6ZIFcif8mLIo93NXfNj5hl2+7nBOx6y1zdTJq2NG3l3V8DMl1BGK0WdP
KS7iXwvy6HTjGIFeo6JBFcTXY9YVh+GV/B4NE7FckWx3W98tSd0J3JazQA+hZDgQ
4b2cgmzUM/feOUKlKTRTROXH21c06eW17HpoagVbCY0bywCOEdQNDBoKejaszJyX
M9LWyyUENCP//m/kBxq+u/Ume0Zs61VUZPE6spY8STjSnqdJN5LYZQ==
=Z8U8
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/6q4d2Edq30E/m/8fpMt3aWJbMJ", "n_sections": 23}, {"thread": "8fOJBHrNWW8", "msg": "ismW9DRs7WMJ", "author": "David Hopwood", "date_disp": "Sep 18, 2000, 8:49:30\u202fPM", "subject": "A conjecture - thoughts?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Andru Luvisi wrote:
> I have the following conjecture:
>

> If f() and g() commute, that is f(g(x)) = g(f(x)) for all x, then
> f() and g() are both powers of some base function, b^y(x_0, x),
> where x_0 and x are the same the first time through, x_0 stays the
> same on every itteration, and the output is fed back into x.

x_0 doesn't add anything because it can be folded into the definition
of b. Also assume without loss of generality that the domain and
codomain of f and g are the same. So we can rewrite the conjecture as

f : S -> S
g : S -> S
if f o g = g o f, then there exist nonnegative integers y and y'
and some function b : S -> S such that f = b^y and g = b^y'.

Ian Goldberg pointed out a counterexample: f(x) = x*2 and g(x) = x*sqrt(3).
A simpler counterexample that works for the same reason is f(x) = x + 1 and
g(x) = x + c, where c is any irrational number. In that case b(x) = x + 1/y
and b(x) = x + c/y', so c = y'/y, which contradicts c being irrational.

That suggests that it might be interesting to restrict S to a finite set;
I'm not sure whether the conjecture is true or false in that case, but the
same method of producing a counterexample won't work.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOca3mTkCAxeYt5gVAQGqFgf/R5dODZL35pGH7ShZ04JVTCKHgdqoeJrW
4UEvfeTK/9SneP084z+Na+Ft3TJ9sVwvQpmJmoiedS7SFcai6qROUSpmOJTsvc0h
eTHg8sUpOlcxwMFtlMJj4sj9MRtXkLwRjC7fjHTD/YQMCvBeuT2rC/9f3SKRawLv
0x7bWOAM3Gz0X16ST1zvwTs729lR8OXA/rncuEvCsrp58FjSCORgpec3kyVtuk/X
nn13nnKsTicI+dWmrq1mKukP7eoyaxGebfulbwjG09qZ6TL5HPRQNkovTnyCQRmg
5l5EhzFHy4N0P8PgGnBC9J3Tk12xU6xbuBploX0jqfmRc42XHFdTpg==
=xxd7
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/8fOJBHrNWW8/m/ismW9DRs7WMJ", "n_sections": 20}, {"thread": "9NDUVYE4ZEU", "msg": "eD5GAnMC7AEJ", "author": "David Hopwood", "date_disp": "Aug 28, 2000, 2:15:55\u202fAM", "subject": "A more secure alternative to ADK for legitimate key recovery", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Ron B." wrote:
> On Thu, 24 Aug 2000 13:33:30 GMT, "JL" <J...@jlamy.com> wrote:
> >"Ron B." <zyp...@spamcop.net> a \u00e9crit dans le message news:
> >9f8aqsk9f2gogmmdd...@4ax.com...
> >
> >> If a business requires this then Jane may have no choice in her
> >> business communications.
> >
> >Then her company shouldn't complain if sensible information is
> >compromised. If you don't trust your employees you shouldn't hire
> >them in the first place.
>
> This may not be a matter of personal trust. The company may see Jane


> as the perfect employee. If Jane is has a heart attack, has a fatal
> accident or for other reasons beyond her control is not available to
> decrypt important data, the company may have legitmate reasons to

> have access to her messages.

Which is why received messages should be reencrypted *by the recipient*
to the recipient organisation's public key designated for that purpose,
and the ciphertext stored locally. Similarly, sent messages should
be additionally encrypted by the sender to the sender organisation's
public key. In neither case does anything that allows the message to be
recovered go over a public network, in contrast to the ADK design.

Now if Jane has a heart attack, her logs of sent and received messages
can be decrypted (the ciphertext will have been backed up by the
organisation's normal backup procedures). New messages cannot be
decrypted, so they must be bounced, but that is exactly as it should
be: the sender then has the opportunity to decide whether he wants to
resend the message to Jane's coworkers, rather than to Jane specifically.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOaoAezkCAxeYt5gVAQEsRggAx/FF01RBowS/GIjoW+N0MIrqKSfKKAV1
3zFMuIA53LqjlCk6oOmRh57MU+J4BadITw9HAeY+M96wBkq0i8SzdzaBVT9vYxkj
fviPe6s+zV+PqrY6B18PpMDk5XZW6YzXPFi2iVwowGub5DbtLOkQDndF7hTpHbyb
F5LtL0jyFMlEWoLaXBtPfePo3mKu/nH03qQ3sB+UdVAphHVDePHSq4JAlAxussR2
KXL5yK7NfeImi8YgeCD4vFuSQ7fKyx++BtkE+dqvR/N0/jeo3UJ8FIEIn9mpdQ59
9+nekApKSpE0G36NbsAyJ+2RbKiWWR6CkTGgNi8IgmtFuwO1vj+DQw==
=WCfx
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/9NDUVYE4ZEU/m/eD5GAnMC7AEJ", "n_sections": 81}, {"thread": "9rdehnESdNw", "msg": "vuj1KeQ5458J", "author": "David Hopwood", "date_disp": "Sep 17, 2000, 3:00:00\u202fAM", "subject": "One-way encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Thanh Diep wrote:
> I am looking for an one-way encryption algorithm to encrypt passwords of
> about 20-character in length.

I recommend bcrypt (the hash function used in OpenBSD, not the Windows
crypto application of the same name), described in

Niels Provos, David Mazi\u00e8res,
"A Future-Adaptable Password Scheme,"
Presented at USENIX '99.
http://www.usenix.org/events/usenix99/provos.html

It's fairly easy to implement based on any Blowfish implementation.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOcU1WzkCAxeYt5gVAQG/rwf5ARvfE7CSVjR8aYsu/0qzjl3mFQyjRF76
J+PoHYZyUFDzmxa8C7bXq6RlGBONDxOi/+7rJIVO3fWtiYzUvPNv85+K+QIZh23z
YVfESTG61FEL5yzrX3Y/vAitLvbfBqw8WErKWs7GIut71OQscCzR+NekquFy22MK
nDo6mjSnAqvYxi5ea78brx5TGRuOTWY5+FqnZR5KPILfvuRR7ZlVCy5XUz/CvL3h
ERpaHalSM1RrjySZIqFEVSdQ86ZP7WoIuJwncLtu6vJV15Rej0E7xr1L5Ksn+Avs
a/kIaBYRC211lsGS5QjLcdziI2TYqKM0hHSUcI1eaSfiTVDi1cQznA==
=N/nE
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/9rdehnESdNw/m/vuj1KeQ5458J", "n_sections": 9}, {"thread": "9soovMMuWVY", "msg": "FFyjuAH65UUJ", "author": "David Hopwood", "date_disp": "Sep 18, 2000, 10:28:18\u202fPM", "subject": "Dangers of using same public key for encryption and signatures?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Bryan Olson wrote:
> Brian Gladman wrote:
>
> > In the UK keys used for signature only are not subject to
> > Government Access to Keys (GAK). But keys that perform
> > both signature and encryption functions can be seized under
> > warrant by a number of UK authorities. And there is no
> > requirement that you need to be under suspicion in order
> > for keys to be seized.
>
> Tricky. The holders of the *public* key ultimately decide
> whether it performs encryption. For all the popular PK
> signature schemes there's a PK encryption method that uses
> the same key pair.

I'm not sure whether you count Fiat-Shamir-based methods as popular, but
they can't be used in this way, AFAIK. (If they could, that would have some
very interesting practical uses, but unfortunately I don't think it is
possible.)

> (I'm saying "popular" to rule out things like Merkle one-time signatures.)
>
> How does the law handle the case of Bob releasing his public
> key saying "signatures only", but Alice sending him messages
> encrypted with it anyway?

The clause that is supposed to protect signature keys actually applies as
long as the private key has not been used for decryption. OTOH, the whole
law is very badly drafted, and the government refused to fix a number of
other problems that were pointed out with this clause. Some of them
are described on Charles Lindsay's "scenarios" page, at
<http://www.cs.man.ac.uk/~chl/scenarios.html> (Scenarios 10, 11 and 12).

It is also not clear whether the protection applies to keys that are not
technically signature keys, but are used for authentication (for example,
is an SSL server's private key for RSA ciphersuites included?)

In practice for GAK resistence, I recommend using ephemeral Diffie-Hellman
key exchange with signed exponentials (a.k.a. station-to-station protocol)
wherever possible; in that case the RIP Act protection for signature keys
should definitely apply to the keys used to sign the exponentials, and
there are no encryption keys that can be given up after a session has
completed.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOcbPBjkCAxeYt5gVAQG/UggAo+2cxMWVJU6qNI6XrXB/eKIk1gmVYkC3
7o2bXEfZVok7QfJtGpozzH1etdXsRF3F6ukABsMv0azHguXG1ZAIu+1VUdWgNdUK
Ks1rbgoUl7iD7sNfiInDNCWF4CW+bAE1DSgtYDnv9JoYT1tscr5z/Xz1bQafUyZI
QVT4oY3mW4ciNc/p2ItcbqlSJiHaSJdZkBP1PGrtHMM54/D7EoTvCl6KeH6g+wyV
pCjvkxzrxlkDZNxC5FSUigC1WOsB7zlhGCpySiBXeoiq9yvCzgSEfChoveWAWZR9
+bJVfKpJQeTjFmA/cqaxmANvUJguv5LH8t6lhlBkIZ/KgO1Vg/hfNA==
=VX0Z
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/9soovMMuWVY/m/FFyjuAH65UUJ", "n_sections": 11}, {"thread": "Cru8_p9Bzhc", "msg": "LrxWsiFr1Q8J", "author": "David Hopwood", "date_disp": "Sep 11, 2000, 11:36:38\u202fPM", "subject": "Camellia, a competitor of AES ?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

I notice that a specification of Camellia has been published as an Internet
Draft (http://www.ietf.org/internet-drafts/draft-nakajima-camellia-00.txt),
but with the following rider:

This document is an Internet-Draft and is NOT offered in accordance
with Section 10 of RFC2026, and the author does not provide the IETF
with any rights other than to publish as an Internet-Draft.

Section 10 of RFC 2026 is not optional! (It requires all documents that
are part of the Internet Standards Process, including drafts, to describe
any intellectual property claims known to the authors, and guarantees that
the document will be freely available.) I'm surprised it was allowed to
be published with this condition. If it was published as an RFC in that
form, I would certainly consider lodging a formal objection.

In any case, there are patent applications relating to Camellia:

Mitsubishi Electric Corporation (Mitsubishi Electric) and Nippon
Telegraph and Telephone Corporation (NTT) have filed patent
applications on the techniques used in Camellia. For more
information, please contact at MI...@isl.melco.co.jp and/or
e...@isl.ntt.co.jp.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOb2kmzkCAxeYt5gVAQFhzgf+OFhmC3TTyFStPdF5c5YoQW66jssavHgw
V5yBH0TMMjUbnKMoDUk0CcjwAKVK9S0abphxnnRwModk+kFE9XOPQOJQ6uGqK/os
QjXDn9GLi2QHGUKQLCIBjjKjl+z82yE2Ffxp+W1gSwNxWKWh9+2nyeYsBS4/9VmO
2LdxrH+eVQ5RCw7eqHQuq9RqcK66/c28lqMgOnvi7ghl7pXdftuLVJcMQZ7Ywhbx
VbmJsLrI+v059h86EfssN0IAc4QUd2Zy3bkkUEeCeKYuY0GuBVXDQMJmMIMn6dyq
pPTQW6F8jUIQN8J9Vp5EF9C4jAz+mMJoVjYJxO+Z/ebF3ELAerWSvQ==
=a6+E
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Cru8_p9Bzhc/m/LrxWsiFr1Q8J", "n_sections": 29}, {"thread": "DqwzKX6FkXA", "msg": "3ddmsQJmokwJ", "author": "David Hopwood", "date_disp": "Aug 29, 2000, 1:38:48\u202fAM", "subject": "New algorithm for the cipher contest", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Scott Fluhrer wrote:
> I believe I have a way that, given K[3] (which is the fourth multiplicative
> key), distinguishes it from randomness with a relatively few amount of
> chosen plaintexts and effort, and the actual chosen plaintexts do not depend
> on K[3]. This immediately leads to a method of rederiving K[3] with about
> O(2**64) effort and circa 100-1000 chosen plaintexts.

Drat, beat me to it :-) I was working on exactly the same attack; I'd done
the second case for the distinguisher, and was close to working out the first
one.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOasmtTkCAxeYt5gVAQG4Mgf9Hgnap4TeE8+IhK4yTGYnENF5sRbp52ox
Ynrod5UkcDm/3YDcflsFnwo92uHtNrYumCTqUpuPwx9R5Igr4ZcB5of2aoLHcBRB
vtA8iNz2mXMdsFo7PkBdZDQLd/1RYk+Su3NdIZBm19g60OUvhThPGJf1ASoXpCy/
MxL/ggwaG2oRpFEqwa4mEfEihQmMAHWUsu7MGXX21+kwHADHfjVJ4gOijYTMUDI8
dqXzpdbMamIFmHM0cD0zZALukn9Zx+96B5U54iRflzQzeKiPc5xNSSQMr+xa570O
Qd/uuhloDCLdgD9ZXtE9Jw4/PV5oioWl6LrknzrAJYye1rz99fRBXw==
=Y3LY
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/DqwzKX6FkXA/m/3ddmsQJmokwJ", "n_sections": 29}, {"thread": "HHOHXBAs7vo", "msg": "lfaB9PQtHYAJ", "author": "David Hopwood", "date_disp": "Sep 6, 2000, 4:22:10\u202fPM", "subject": "4x4 s-boxes", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

tom...@my-deja.com wrote:
> macc...@aol.comnjunk123 (Mack) wrote:

> > Tim Tyler wrote:
> > >Douglas A. Gwyn <DAG...@null.net> wrote:
> > >: Terry Ritter wrote:
> > >
> > >:> While the FT originally defined "bent," most modern treatments use
> > >:> the FWT.
> > >
> > >: ? What does the definition of bent function look like in terms
> > >: of Walsh transforms?
> > >
> > >Bent function <-> "All entries in the WT have the same magnitude".
> > >
> > >: Is it as simple as the FT version?
> > >
> > >It's extremely simple.
> > >
> > >:> As far as I know, in modern open cryptography, these concepts
> > >:> [maximal nonlinearity and uniform Fourier weights] are the same.
> > >
> > >: They can't be the same, because the latter defines a bent function
> > >: but you guys are claiming that bent functions aren't maximally
> > >: nonlinear.
> > >
> > >Only Tom's claiming that AFAICS. Everyone else appears to be
> > >disagreeing.

[snip]

> Mack:


> > My specific claim was that Bent functions only exist on equations
> > of 2*n variables, are not balanced, and are maximally non-linear.
> > Hence cannot produce bijective s-boxes.
>
> You guys are all wrong. In the original paper were "bent" was defined
> there was no mention of non-balanced functions.

I assume you're referring to

[15] O. S. Rothaus,
"On 'bent" functions,"
Journal of Combinatorial Theory, Ser. A 20 (1976), pp. 300-305

? I don't have a copy of that, but presumably if it doesn't mention
non-balanced functions, then it isn't saying anything about whether bent
functions are balanced or not.

> In fact "bent" doesn't refer to maximal non-linear functions at all.
>
> Read up the papers, specially "Perfect Nonlinear Sboxes", Kaisa Nyberg,
> Eurocrypt '91 P379. The term "bent" is defined in section 2.

- From that paper:

# In [12] Meier and Staffelbach discuss perfect nonlinear Boolean functions,
# which are defined to be at maximum distance from linear structures. These
# functions are the same as the previously known bent functions [15].

That seems to be perfectly consistent with what Mack and Tim Tyler have
been saying, and *not* consistent with '"bent" doesn't refer to maximal
non-linear functions at all'.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBObWiXzkCAxeYt5gVAQECMAgAmRvRRv+GoxY0e7Ah52fb1Xb9MMCjhARb
fjJhBe/puadVhw3sbOiJ6O91TfVEza0sLIaTHSjBzYfD373pwJqeF4zS0qwA393v
E+3AwCJL9dyTcsf5Up6ILcA78CJIpZJPoeOMu7OXSSdyreiE8oI85CuVvJMMq5fv
PBiYnRRYN0Azc8iLCPem5R+AY92muLyXUO5wtKo7Pmn2V1iH8RuiF7JY6sye37mk
28GzF81uCW/c+KnlJ/FKKQzrcBCYIHT9rPlaPO2yJWkvD2/mT01Jo817fAUxf6H/
eAouMEqT/Ej49zD+U40aKRKiGTRxS64ANsWFn4F2Au1w6eHZBbcRkQ==
=pEIH
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/HHOHXBAs7vo/m/lfaB9PQtHYAJ", "n_sections": 31}, {"thread": "HfX4lkuebeY", "msg": "E0D5q83bLMkJ", "author": "David Hopwood", "date_disp": "Aug 30, 2000, 9:28:22\u202fPM", "subject": "PGP 6.5.8 test: That's NOT enough !!!", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

ssim...@my-deja.com wrote:
>
> Aye, for once we agree. PGP have handled this problem extremely poorly
> from both a technical and PR perspective.
>
> I can't see a "pretty" way forward...As I stated in a recent mail to
> PGP-Users mailing list, possibly the best thing to do is draw a line
> under this mess and release a new revised RFC that solves this
> problem.

RFC 2440 does 'solve' this problem, by not including support for ADKs.
The bug is in a feature that has never been included in any RFC (and
all due credit should go to those who made sure that was the case).

As has already been pointed out, though, the fix in 6.5.8 is not
sufficient; forged ADKs should produce a Big Scary Warning. Other
implementations should do the same even when they don't support ADKs,
in order to make distributing keys with a forged ADK more risky for
an attacker.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOa20YDkCAxeYt5gVAQGbxgf8CJqZI3kNDO3VGY2AajcoBTQGu8rWSqlX
e1s/m0THYmMr1XLDj5QFYZAOKmiKYPmABh+RRJxBN0jt0PulRgv9it6UX8hnySoN
TPsr/GJbD/P9FqHXN/0a442cluaFEgzWDWl4tYimGA5NfxDEH8w91lJBGAfWTrpf
hxIxPiLDvZkU3+3GhpVmL6XgXye5UlEmrpZP+PmjWpEKJkrtcaZhJvLZOfp2TlRn
xuxOq+2lWs7uiPfLyAQyEqr0qi75q5oOEer4GfHA3vrXHAiveJUKZsSGzRtt/FlV
xymyOIHr9sBaEooGglDz2S0SsvLIrWUYLQ09T2y2000L/rXpAFVH+g==
=IjZq
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/HfX4lkuebeY/m/E0D5q83bLMkJ", "n_sections": 25}, {"thread": "I8r2qAEYvKI", "msg": "1VofZs5_2EIJ", "author": "David Hopwood", "date_disp": "Aug 29, 2000, 1:55:38\u202fAM", "subject": "UNIX Passwords", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Montgomery wrote:
> > Is there a description available, how UNIX encrypts (or hashes) its
> > Passwords?
>

> I can't speak for all Unix "brands" but OpenBSD uses Blowfish
> (default) or MD5 hashing (on my vesion at least which is 2.4).

There are at least four password hashes in common use in various versions
of Unix: "traditional crypt(3)", "extended crypt(3)", "MD5-crypt", and
"bcrypt".

For the specification of bcrypt, which is the OpenBSD scheme based on
Blowfish, see

Niels Provos, David Mazi\u00e8res,
"A Future-Adaptable Password Scheme,"
Presented at USENIX '99.
http://www.usenix.org/events/usenix99/provos.html

This paper also has some brief analysis of traditional crypt(3) and
MD5-crypt. "extended crypt(3)" is seriously broken; it is less secure
than the traditional version.

Despite much searching, I have been unable to find any unambiguous
specification of the traditional crypt(3) algorithm. It's fairly
difficult to reverse-engineer from the source code, because typically
optimised versions of DES are used (e.g. Eric Young's libdes), where
the mapping to FIPS 46 is distinctly non-obvious. If anyone does have
a reference for exactly how the salt is used to modify the output of
the expansion permutation (or can explain it here), I'd appreciate
seeing that. Note that it is *not* described in any of the Unix manual
pages, or in Morris and Thomson's "Password Security: A Case History"
paper.

> It also might be useful to check out SHA-1, it is a powerful hashing
> algorithm that can be used for storing passwords.

bcrypt is more suitable as a password hashing algorithm than SHA-1; see the
Provos/Mazi\u00e8res paper for why.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOatQGTkCAxeYt5gVAQFDgQf9FRdrA6cALDWntTMYsh1nufjXOYeaWcLc
WM3lxl+RwC1m+v3T6H+0Mqj6HchGTnY28IHpnMTYPkHtJoTzzL7DBSMmwVjil3kY
RiqWOk/BTmriT3mkGTGXzQVPux0aQSLXs6pdW/wHUMlJSul9C4SHDMwx9BwdUZet
qIkjHHUQhna0gJ1AF3LH4Cf7HnVyrhdpEQTvwH22jU7v0L1Ym9AIIvkD2zzauvGS
wFVe7PX+aWolp6Am0OTm7mLd0sMFAbSex73q9xXAPYl+x4vXwJKgqIgSQcc8lQ+s
1wYEb4ZAvCICqf6nuPdwrJFyBrxZJvsX8JT/5CqQt5AwBSPh0BjjOQ==
=lWpY
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/I8r2qAEYvKI/m/1VofZs5_2EIJ", "n_sections": 8}, {"thread": "V9JBZ1SCMgw", "msg": "o-HnEcJUaXAJ", "author": "David Hopwood", "date_disp": "Aug 29, 2000, 1:39:03\u202fAM", "subject": "Asymmetric Encryption Algorithms", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

DJohn37050 wrote:
>
> NIST in DSA-2 draft said that to protect an AES 256-bit key it was
> appropriate to use a 15,360 bit p and 512-bit q in DSA-2.

In that case NIST are using an oversimplified model for making parameter
length choices. In the case of AES there is no speed penalty for using a
longer key [*], and so choosing a 256-bit key doesn't necessarily mean that
a 2^256 security level was required. It might simply be a convenient default
when using SHA-2/256 to derive keys, or whoever chose the key size might
have done so on the basis of attacks other than brute force (e.g. they might
believe that the key scheduling algorithm is more conservative for that
length, for instance).

For DSA, OTOH, the time for both signing and verification is roughly
O((lg p)^2 * lg q), so there is a definite trade-off between this time and
the security level.

Actually, it doesn't make a lot of sense to base parameter choices for
DSA on matching the security of block ciphers with 256-bit keys. Presumably,
if you want security against generic attacks on block ciphers with that key
size, it is because you think quantum cryptanalysis using something like
Grover's algorithm might become practical - but a practical quantum computer
could break DSA in polynomial time.


[*] Unless Rijndael is chosen, and that's only the difference between
10 and 14 rounds.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOas9HjkCAxeYt5gVAQEiCQgAs46yJzz8gCfCkDqamc8yxcNzALCvDiv6
WLlEsk1LHr69FXgj1CF9jQdoGAWpSvziQ2JLavoJcvj7jIWwCqth5/Pqpil/OD9a
MmVDQPSSYqehyp6LQjHcel8HOR03RmyJ5dLPaFr1LPooRH1wTTouZ0zq4EFkAMYf
JnxmtPVtFG054eYmGHc5WTxsa9ykH3Tm1wEYyaczmRaNsc04Udj/06ufxXMemCsR
IjCndiJPfH/gB3Efz/+Y9QfI0VdyfFPSXabDooH1rczzFTyRa9GFM6us2h3H/Edk
TxWGkoGV9LspOUIbFE24ZS5mNlZEI/n/p79Yd9KBqrrNWoec7vCzag==
=XJiF
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/V9JBZ1SCMgw/m/o-HnEcJUaXAJ", "n_sections": 10}, {"thread": "VDKEQBctTow", "msg": "eYifqM1BSuUJ", "author": "David Hopwood", "date_disp": "Sep 22, 2000, 8:40:18\u202fPM", "subject": "winace encryption algorithm (correction)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

An Metet wrote:
> Again (*sigh*), this is the secret Ace (and WinAce) encryption
> algorithm. I hope it will be posted correctly this time! It is a
> combination of a Blowfish derivation and a SHA-1 derivation and it
> uses Cipher Block Chaining. I called it AceFish therefore...
>
> About one month ago, there was a hint in sci.crypt, that it could be
> a combination of BlowFish and SHA-1. This code was created by
> disassembling, examining and debugging ace32.exe (version 1.2b) and
> comparing the results to the original Blowfish and SHA-1 algorithms.
> The differences are commented in the source code. I hope I didn't
> forget to comment on one of them.

It's based on SHA-0, not SHA-1 (the difference is the 1-bit rotation).
The key scheduling is equivalent to using the output of SHA-0 as a
160-bit Blowfish key (this depends on SHA-0 and Blowfish both being
big-endian). I.e. excluding the possible errors described below, the
algorithm is Blowfish in CBC mode with the 160-bit key
SHA-0(byteswap(password))), where 'byteswap' swaps the byte order of
each 32-bit word (treating the last word slightly differently).

However, if the reverse engineering is correct then there is a bug in
the SHA-0 implementation: the array holding the SHA-0 input is not
fully initialised to zero; only the first word is initialised
("u32 w[80] = { 0 };" in the code). This bug would cause incorrect
(nondeterministic) operation, unless that area of memory happened
to be initialised to zero. The initial Blowfish S-boxes also have
some errors (although that wouldn't affect security).

My advice would be not to use Ace/WinAce: there is no salt, and no
attempt to slow down the hash, so dictionary attacks are much more
feasible than they should be.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOcvarDkCAxeYt5gVAQGBpwgAiuaeOyjkrXz0lVnYgburOSOrre4dTodl
YA8gmMIaRmEdQAvsQ29mswiOhWrcxc2cS8N80CqUW9c3ioE3yVqwFmr5vhyeqAsV
XDNWioPaKnJ2kBw4I+fbQrQ3CMWmSfiwOdHuXRPS0QBsf8v8a0Cc2HveL7i7Gsxl
rG79Vj3SiJjpb1M52S8aqV1Av4KkI9ocI+OsEV08QlScf9fZr+48jb6thcVkcCfT
mh8tTcUgTyZIrcPe5URHH8KcJ9Ae5rRFPmlIY2Z3eyYQqHJe7puRATjKaZRR4HGP
4DiPwHvlf/jqHSvSzMs+JMUUeMOlbB7bmLrUU7v5mk/7GyWgCjRdmQ==
=7EFt
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/VDKEQBctTow/m/eYifqM1BSuUJ", "n_sections": 3}, {"thread": "WSaztoLiAyU", "msg": "t-fq-xehEsAJ", "author": "David Hopwood", "date_disp": "Sep 5, 2000, 9:09:58\u202fPM", "subject": "Extending RC4 to 16 bits", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Guy Macon wrote:
> David Hopwood wrote:


> >Barry Adams wrote:
> >
> >> The questions are how mathematically sound is the algorithm?
> >> Of the top of my head i would think that huge state space would make
> >> for a hard to decryption cipher, but will it be well randomized
> >> especially with small keys.
> >

> >No, the state won't be well randomised. I would recommend rethinking
> >the key scheduling entirely for a 16-bit RC4.
>
> From a practical standfpoint of someone like me who is playing
> with RC4 in order to learn, how would I go about changing the
> key schedule?

It's quite difficult to randomly initialise a state that large (2^20
bits, not taking into account that it is a permutation) efficiently.
A conservative way of doing it is to use an algorithm that converts
a random binary stream to an unbiased random permutation, and feed it
with SHA-1(key, counter). That's *very* slow, though. I don't know of
a better solution that would give sufficient confidence that the state
is adequately randomised (note that 8-bit RC4's existing key schedule
does not completely randomise the state; that's the reason for the weak
keys).

> Would starting with a larger key change it?

Not really.

> Should I run the algorithm on random data for a while before
> I start encrypting my plaintext?

That's better than nothing, but I'm not sure it's sufficient.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBObWZWTkCAxeYt5gVAQH33wf/RqlX8I1DMLCUjOqAHXX6ixX/WVjmkQmI
+QbmAN7Fh4YpChrj0SkNaMfneb5gSNfFED74mbUB5XIUObbicMoAYy+ozLL2GT/1
TJdDknJNuaUk9N52qCAQHC//HUjZ+uFg8AUa0VSqX9ZesDoMS3lG0GBBAk6OTgb5
IANjnUAxiQEkX5Bf/6KhXkYRliLogcmb4wh+At4xZ82OGG1MDS8JQ+V3GWFogJXX
N+YjXXdofd6IRfy3CswEiDPpVCeo5JaRJTNx0ghrti7BAO00cKQFziD5RRKAvcBt
DnVxBNGwBuPQxlAQkMtPWfe7CUUmZz5lTJwQ9hbmV/ah3p5Ix3XdlQ==
=tDDw
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/WSaztoLiAyU/m/t-fq-xehEsAJ", "n_sections": 15}, {"thread": "WSaztoLiAyU", "msg": "QPuIFtPD7OwJ", "author": "David Hopwood", "date_disp": "Sep 6, 2000, 4:43:53\u202fPM", "subject": "Extending RC4 to 16 bits", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Goldberg wrote:
> David Hopwood wrote:
> > Guy Macon wrote:
> > > David Hopwood wrote:
> > > >Barry Adams wrote:
> > > >
> > > >> The questions are how mathematically sound is the algorithm?
> > > >> Of the top of my head i would think that huge state space would
> > > >> make for a hard to decryption cipher, but will it be well
> > > >> randomized especially with small keys.
> > > >
> > > >No, the state won't be well randomised. I would recommend
> > > >rethinking the key scheduling entirely for a 16-bit RC4.
>
> Actually, it's not "well randomized" for 8-bit RC4 either. Good
> implementations discard the first 512 bytes.

I've always considered that to be a bit of a kludge that doesn't really
fix the underlying problem.

> > > From a practical standpoint of someone like me who is playing


> > > with RC4 in order to learn, how would I go about changing the
> > > key schedule?
> >
> > It's quite difficult to randomly initialise a state that large (2^20
> > bits, not taking into account that it is a permutation) efficiently.
> > A conservative way of doing it is to use an algorithm that converts
> > a random binary stream to an unbiased random permutation, and feed it
> > with SHA-1(key, counter). That's *very* slow, though. I don't know of
> > a better solution that would give sufficient confidence that the state
> > is adequately randomised (note that 8-bit RC4's existing key schedule
> > does not completely randomise the state; that's the reason for the
> > weak keys).
>
> Umm, no. RC4's schedule is designed to avoid states that produce short
> cycles, so no keys are weak.

I'm referring to the classes of weak keys and key scheduling attacks
described in

Andrew Roos <and...@vironix.co.za>,
A Class of Weak Keys in the RC4 Stream Cipher,
Preliminary draft, November 1997.
http://www.tik.ee.ethz.ch/~mwa/RC4/WeakKeys.txt

David Wagner,
Subject: Re: Weak Keys in RC4,
Posting to sci.crypt, September 26 1995.
(Message-ID: <447o1l$c...@cnn.Princeton.EDU>)
http://www.cs.berkeley.edu/~daw/my-posts/my-rc4-weak-keys

J. Kelsey, B. Schneier, D. Wagner,
"Key-Schedule Cryptanalysis of 3-WAY, IDEA, G-DES, RC4, SAFER, and
Triple-DES",
Advances in Cryptology - Crypto '96 Proceedings, pp. 237-251.
Springer-Verlag, August 1996.
http://www.counterpane.com/key_schedule.html

> If you don't use RC4's schedule, and
> instead picked an unbiased random permutation as the starting state,
> some short-cycle starting states would be chosen.
>
> Where you said "8-bit RC4's existing key schedule does not completely
> randomise the state; that's the reason for the weak keys," you should
> instead have said something like "because there exist bad starting
> states, 8-bit RC4's existing key schedule AVOIDS the full range of
> starting states, meaning there are fewer than 256! starting states"

The bad states that are avoided by the key schedule are something
entirely different; those aren't a problem.

> > > Would starting with a larger key change it?
> >
> > Not really.
> >
> > > Should I run the algorithm on random data for a while before
> > > I start encrypting my plaintext?
> >
> > That's better than nothing, but I'm not sure it's sufficient.
>
> Why even feed it data, random or otherwise? Remember that this stream
> cipher is just a CSPRNG whose output is XORed with the data... just
> discard the first 2*65536 values.

I assumed that was what Guy Macon meant.

> Good implementations of 8-bit RC4 discard the first 2**(8+1) 8-bit
> outputs, so you should discard 2**(16+1) 16-bit outputs.

How much analysis has been done to check that is sufficient for the 16-bit
case? None that I'm aware of, and it does not follow that if discarding
2^(8+1) outputs is sufficient for 8-bit RC4, discarding 2^(n+1) outputs
will necessarily be sufficient for n-bit RC4.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBObasBTkCAxeYt5gVAQFXyggApj3S79LMd/70rfbwY2o5OHIUuwP5LosB
c2zNplv2df4RJ4nXjV7A+KRG+6dJFw70Ey4IDHbJCPA3NxojtpbElOlVqEIRyM4B
jucHyJZ4L3wWEtDBTmYMylZE6zteo4Uc4dgNlxvhULWfPFtWuxTyMs3jzmKI+WKL
qYyVeMK6IilH1HT1+6m259xD8GTXw8+hVZ3nWTfVsihsrTVA8WqR1TXFgBYLAf9i
Xxx95qB0ksn3GfSmCCSr3uQon7+DdlJBJRlD31WR0nbaRSvjG6CzMjwQjc2nPzdK
7cXVt2e0yjHPULNsfgQ0tgwCU7nzPdCkxCi2owV2jAs1XGdKfgzdNQ==
=ol4c
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/WSaztoLiAyU/m/QPuIFtPD7OwJ", "n_sections": 15}, {"thread": "Xcy8m9J8MHE", "msg": "eBX4jvVC0hIJ", "author": "David Hopwood", "date_disp": "Sep 26, 2000, 3:00:00\u202fAM", "subject": "Question on biases in random-numbers & decompression", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Goldberg wrote:
>
> I've been looking for a way to convert a stream of unbiased random bits
> into an unbiased stream of random numbers in an arbitrary range, and I
> think I've hit on an idea that hasn't been suggested before:
>
> Take an arithmetic dececoder, and initialize it to believe that the
> values 0, 1, 2 are equiprobable, and no other values will occur. Then
> feed it the stream of random bits. This should result in an unbiased
> stream of random numbers in the range 0..2.

A simpler, almost equally efficient method is to find a power of 2 (2^n)
that is just greater than a power of 3 (3^m), e.g. 2^27 and 3^17. Then
convert blocks of n bits into blocks of m trits. When the block of
bits has a value >= 3^m, subtract 3^m from it, and use the fact that
the result is an unbiased value between 0 and 2^n - 3^m - 1 to generate
more trits. For example, 2^27 - 3^17 > 3^14, so the algorithm would
look like this:

for (k = each 27-bit value) {
if (k < 3^17) {
convert k to base 3 and output 17 trits
} else {
k = k - 3^17;
if (k < 3^14) {
convert k to base 3 and output 14 trits
} else {
// could go further here, but it won't add much
// efficiency, so just discard k.
}
}
}

This has the advantage of requiring only single-precision arithmetic,
it generalises to any base, and the output is obviously unbiased if the
input is. The input block size (27 bits in this case) should be less than
the processor word size, but as large as possible subject to there being
a good fit between the input and output block sizes.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOdAiZTkCAxeYt5gVAQFEHQf/SMFjp3NmrVFJusmWTQaLS+AptPQRnB4P
JMRrGqOJkfbXCBxyVzm2TacCIyoOXGqp5A/iTqdxwRQSOTCEoo0TiRFBPQA/TUhn
p25F970smCaJC9WTzVY3IofiF9RnXSi/CFhzEDRJVdSYlTxmSiDfgu7LmK92d3rU
m1sF1YWMzoFlOiNbYpKzBHmCPm3dYIGB6zqkIhTRrPcgcxe4AWgvqX1x8vqFaNtT
OVLfNAzJEILpK3P4y1HDWX25OkVphb2TmZd/mw0JXvBF4SvZ4+9m7jFWup3G3B7W
8yAOQG8KkbWgV6EBE5hG58ELtklA3LQzYCQGIwfYIumYUJoosp1/Pg==
=z8zj
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/Xcy8m9J8MHE/m/eBX4jvVC0hIJ", "n_sections": 29}, {"thread": "YFBzaENNqew", "msg": "bdYwS9w7lIMJ", "author": "David Hopwood", "date_disp": "Sep 22, 2000, 8:40:50\u202fPM", "subject": "t", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

zapzing wrote:
> In article <8qcise$l6i$1...@nef.ens.fr>,
> por...@bolet.ens.fr (Thomas Pornin) wrote:
> > There is also the classical "Stranded on Venus" problem: some
> > scientists have a technical problem on the ground of planet Venus.
> > To get back to the orbital station, a button must be pushed on the
> > control panel of the station, but there is nobody left to push that
> > button... except some bypassing (and altogether cooperative) aliens.
> >
> > The scientists manage to establish a radio communication with the
> > aliens, and build up some sort of language (they are *good*
> > scientists).
> > But the main problem is that there are two buttons on the panel. The
> > left one is the one to be pushed. The other one is the self-destruct
> > command.
> >

> > How will the scientists and aliens agree on the notion of left and
> > right ?
>

> OK, Helpful Aliens. Just take a look at the third planet
> from this here star. It's got a Nitrogen, Oxygen atmosphere
> with a bunch of other neat stuff. The "northern" hemisphere
> is the one with most of the land masses on it. If you are
> standing with your back to the sun, and looking at Earth
> (the third planet) with your head pointing north, and your
> feet pointing south (opposite of north) then a point on the
> planet on the sunny side will be moving left to right (or
> is it right to left?).

Head? Back? Feet? The aliens don't have those.

A simpler approach is to draw a 2D schematic picture of the control
panel and buttons from the point of view of someone looking at it,
digitise that picture (neglecting rotations, there are two ways of
serialising a 2D pixellated image, and if the control panel has no
bilateral or rotational symmetry, the aliens can determine which one
has been used), and transmit the digitised picture over the radio.
That would probably even work even if you hadn't first established a
language.

If the control panel is bilaterally symmetrical, send a picture of
something else that isn't symmetrical as a reference, e.g. the
Earth, or an experiment demonstrating the left-hand rule in
electromagnetism. (If the panel and the spaceship are rotationally
symmetrical, it's not just the aliens who will have problems :-)


[Interestingly, and even more off-topic, even human languages vary
in how body parts are used to derive prepositions:

# For example, the concept /front/ has its basic characterisation in
# the body and then is extended metaphorically to other objects.
# In English, it is extended to objects like bushes as follows:
# If you are looking at a bush, the "front" of a bush is the side
# facing you. In Hausa, the reverse is true: the "front" [*] of the
# bush would be the side facing /away/ from you, that is, in the same
# direction as you are facing. Both choices are equally reasonable--
# equally consonant with our experience. In such situations, the
# same conceptualizing capacity and experiences can give rise to
# different systems.

-- George Lakoff,
"Women, Fire, and Dangerous Things - What Categories Reveal
about the Mind,"
The University of Chicago Press, ISBN 0-226-46803-8.
Chapter 18 page 180.

[*] i.e. the word that is also used for the front of the body.]

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOcv6/zkCAxeYt5gVAQFaqggApZRVFfQJPjg8xS6LPifEp4vtoACh2WJ2
CVXWqhF9nmoPU6OyUY1fTQwMaxDeqjYSW8gzyZSMREmRZe8eHKjXjI9t2RB4iS4x
MwSxVu7HaQxJPYdf63aYqi7WQVEv3fZPEWkedEelvF/yxPzF4ycpVjbJt98KSa1L
AUNnfSVf/dUfVyRW0I/bCb+5UYvk/FKnuBRhvWTOWdzwW5WirgKelxkZpo9HZuC8
iorIri3wXsVzkisroduZC0WVrbNlaMucTmR9W+tL+rum0r6eMhgPeFBvRpbnayv9
zfem/rxNHnBJKfaa31RK264dXFaCJ3ik+5FZ1lPbWkesHFEyOa7+oQ==
=H8Dz
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/YFBzaENNqew/m/bdYwS9w7lIMJ", "n_sections": 32}, {"thread": "_5MoW1_evNM", "msg": "ABim2O4N8ZoJ", "author": "David Hopwood", "date_disp": "Sep 5, 2000, 9:04:53\u202fPM", "subject": "A good MAC algorithm?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"D. J. Bernstein" wrote:
> David Hopwood <hop...@zetnet.co.uk> wrote:
> > If, for example, the MAC is being used to verify packets in a
> > communication protocol, and the response to a failure is to immediately
> > disconnect and display a warning to the user

Hmm, I was going to also point out the obvious denial of service attack, but
I forgot to do that before I sent the post.

> Brilliant! Now I can trivially destroy all your connections.

I gather you don't think much of SSL, then :-)

- From a practical point of view, there's not much point in preventing active
DoS attacks against a security protocol layer, if there are numerous active
DoS attacks against the other layers, as is almost always the case (remember
that the context was "Internet applications").

> If you immediately start communicating again with a new key, I'll simply
> start attacking that key, and I'll succeed just as quickly as I would
> have if you hadn't switched.

No user will manually repeat a connection, after having had to acknowlege
a warning, enough times for there to be significant chance of breaking a
60-bit MAC at one attempt per connection. Even if re-establishing the
connection is automatic, it will take a few seconds, and that's sufficent
to render such an attack impractical.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBObWUjDkCAxeYt5gVAQGENwgAwu7Eywzg55euSMQK76ab2Cq0cq8HgGbG
r/YuafM3T0RFt+8s2cQ/uK1CIJFpqyetJYBrYtm8Kri5My5+Ny4XDZlxwH48fE4n
N5Gs1ZlCoG4eNaebj1tu2GUUcF8Ffa4r3jvPhAhlhj9fziGuV9QDal5H8jvxOY9G
KL0KroEaROWDyKrENLiVttFfhLB6PewO7zkfjHou6HcBRfBqjc9zi2+5F5TXorcL
LGi2nV2Do/gsZvRdj37O4YaY+KBgTccM5IthZftTuKX5Vvyfntq8tKACpuwBX15C
R64+5zqBN8QnRLfqhVvfK76DRa6WoCDce6yRta1pMSlIrhjrA2OTDw==
=amdv
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/_5MoW1_evNM/m/ABim2O4N8ZoJ", "n_sections": 9}, {"thread": "bm6aX4zUbco", "msg": "125iCPjyxcwJ", "author": "David Hopwood", "date_disp": "Aug 28, 2000, 2:17:17\u202fAM", "subject": "An interesting cryptographic problem", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

ajm...@my-deja.com wrote:
> In article <8o091n$24v$1...@nnrp1.deja.com>,
> ajm...@my-deja.com wrote:
> [see original posting]
>
> Many thanks for your helpful responses.
>
> Unfortunately the suggested approaches of encrypting the database
> information or using stored procedures to implement access control are
> not especially easy to implement given that it is extremely desirable
> to layer this security system on top of an existing application with
> minimal changes to the application code or tables.

Run copies of the existing application on a server in a physically secure
location that is trusted by the database admin, and provide access to them
by some remote windowing protocol, over an encrypted authenticated
connection.

(Unfortunately many of the existing remote windowing protocols such as
X-Windows introduce their own security problems, but that's a solvable
problem.)

> At present the approach I am considering (invented yesterday afternoon)
> works as follows:-
>
> There is an authentication server running on a machine somewhere which
> is reachable via TCP/IP. This server accepts authentication requests on
> behalf of clients.
>

> The encryption algorithm is DES in Cipher Feedback Mode. [...]

You're concentrating too much on the details rather than the architecture.
Providing a secured connection isn't the problem, that can be done with
SSL or a number of other "off-the-shelf" protocols.

The bottom line is that trying to hide any secret keys in an application
binary that is accessible to untrusted users is not secure. Therefore, the
binary that directly accesses the database must not be accessible to users.

Of course although it's necessary to have an extra layer of software
between the client and the database that cannot be modified by users, it's
not sufficient - that layer also has to be carefully designed in such a way
as to limit the user to actions that should be allowed according to the
security requirements, and to provide support for auditing, etc.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOancazkCAxeYt5gVAQEX4wgAkbXvDq/rfaPGXBQKQfU7LzAdsLZscWVB
uV3UT1HVUFDcLAS1ud1to4sd5wKKvD7bwaVZae4MK/8kqqUFtTJ3FcMA652KaCGL
bHuT+NRMrsgvpejAQYhkZ7eNpFWbuc3nRtGsSyvXNsKFYjW7t9VxAsril4KspIYZ
70Vrs3TsaTkaX+nOL7MMwTmSP6wmPrsRRKrXHIU0uO/AvRnai0zzbr2KFeGeKYAa
mo1jvJhjfYbDuxxdqvXkqFJL4ilFmuuMb33Vv7ZD62nAeK0CwMsY1115rONQpwXm
vK/6cqxF7iEGIhCz2CeQkHBqYa72lZbDONKuvOdBn1+M8zf5lBpTDw==
=iid4
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/bm6aX4zUbco/m/125iCPjyxcwJ", "n_sections": 10}, {"thread": "df7Us7Y3ad8", "msg": "BFivznRNNhIJ", "author": "David Hopwood", "date_disp": "Sep 6, 2000, 4:22:30\u202fPM", "subject": "ISO9796 signature format implementation", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tor Rustad wrote:
> Hello,
>
> I'm looking for a (source code) implementation of ISO9796 padding and
> formating.

Bear in mind that ISO 9796-1 padding has been broken (with about 3000
chosen signatures for a 1025-bit modulus); see

Don Coppersmith, Shai Halevi, Charanjit Jutla,
"ISO 9797-1 and the new forgery strategy,"
Working draft, August 23 1999.

(I think this was on the P1363 web site, somewhere around
http://grouper.ieee.org/groups/1363/P1363/index.html)

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBObWs0DkCAxeYt5gVAQE73wgAyd58NHrmnWBKCbUY/EN3HZbY9OqQ57+t
ETnYU+daJQat3RZUV27pnggctjRq6OFUkDAFbhbDbJrV0jpZdX/2cvpjkA30wvTn
QvEJDycBtbRUNziqzT6ElffLhgYDX7uuHqjfipET3n5S0fgmdOWFg/vZ7MY5t1Cl
JyOM/T8obo4MQdRt4MHaLzfL8I39RJP6iQS0zor13/gyawmY8dUbIievrEU+Iqad
VMPAOZGVQ5MpbqreIWQs9O3GM8nfGFeidRR55jOxqTJP32ew37Mxy+fZLpkzJYQS
WaP/8HaWMrJuacQEA+R6Jnqd9EntmMSiCnXaxQ+fw0bTILaCsT9KgA==
=zAqH
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/df7Us7Y3ad8/m/BFivznRNNhIJ", "n_sections": 8}, {"thread": "gn7eLGNOsYc", "msg": "3cSmEbafTmcJ", "author": "David Hopwood", "date_disp": "Aug 28, 2000, 2:17:59\u202fAM", "subject": "SSL protocol and unencrypted random info", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

fath...@my-deja.com wrote:
> I noticed that in the SSL 3 protocol, both the client and the server
> send unencrypted random data to each other. This data, along with the
> client-generated pre-master-key is used to generate the master key. The
> pre-master-key is sent using the server's public key.
>
> My question is why aren't the random data sent encrypted using the
> server's public key?

Because the client and server random values are a part of the protocol
that is independent of the key exchange algorithm (in fact the client
random is sent before the key exchange algorithm has been negotiated,
and before the client knows the server's public key, in general).

The purpose of these values is to ensure "freshness". For example, in
cases where the ServerKeyExchange message is used [*], the presence
of the ClientHello.random in the signature tells the client that the
signature must have been produced for this session, not replayed from
a previous session.

[*] it is not used in the RSA_WITH_* ciphersuites.

> Doesn't this mean that the security of the master-key is determined
> solely by the strength of the randomness of the pre-master-key only?

Yes, but that's plenty large enough.

> The only reason I can think of is that the pre-master-key is large
> enough such that it doesn't matter that the client and server random
> data goes through cleartext. Perhaps this random data is used as a salt
> so that it prevents replay attacks.

Exactly.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOanTfDkCAxeYt5gVAQGXfAf/W7HdfxHbhegvihvwxOUGvgdo+/D+hTrq
mr/8dpzyipCE+HLtNokf9MiLxNZB25a/mDBFt4U+UVXZ+RYyFbz4I4Lf5KWjAZ4H
pRx5Far3k+QFjQaeOOM+/QeTc5yZRAsbxt0/2Qb70/8CcJVGHQhLsfqZZ0aNwBRx
x1I3LsVI2/IszdP/Cy6MkSmdCP28M4HKzrlH0iF5UejY8VaL8K9De04is7PA9Mrs
7eeVkX0pc1qWDfu/JH3AtTblNxKSIUTJ99HCrXqvgV9kJFIDVxGBHwdWFYShzS2X
o0nMOyAOHtqz84MPKu3crXje1hTbGaoNMEowCbRzJ79fLUjSvXEDEA==
=b27Q
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/gn7eLGNOsYc/m/3cSmEbafTmcJ", "n_sections": 2}, {"thread": "iZY-CAzHOLI", "msg": "fWF8rQpsg0QJ", "author": "David Hopwood", "date_disp": "Sep 7, 2000, 8:48:33\u202fAM", "subject": "Carnivore article in October CACM _Inside_Risks", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Rubin wrote:
> In article <39B668F3...@urbanna.net>, -m- <osi...@urbanna.net>
> wrote:
> >If a system is compromised the data departing that system MUST be
> >suspect. If there is a single soul here who can tell me how I can
> >authenticate the identity of a server which has been compromised I
> >will be surprised. You see a compromised OS holds NO secrets and can
> >be manipulated in strange and mysterious ways by processes invisible
> >to the admin. The very fact that the FBI chose an OS which is not
> >certified as B2 trusted indicates the engineers who built the damn
> >thing dropped the ball.


>
> Put a hardware authentication token in the box?

How is that going to help if the software is compromised? It's the software
that does the actual filtering.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBObeOhTkCAxeYt5gVAQEpBAf7B5M5vSmRElpsCHzvhBE+ynIhk5o56msx
hfo+VpjYn1N2cch4X9d2aPqrilXzPJwt+5Mukv1+lqDZZIk2CrcsuIqw78y9SYs3
pFw0yXEWaIfZyKKUT4/BmrtzWc0ysBYKkKpy49sqy5rrVpMETRboKqrDNbFfBFBh
vLA/O0wu/9ZH3XdCbFhOUXN0TumFYTG7ISnwie/PS7XGsy4mQ4SDxJeoT5g26Wb3
WF6TiP71VieKpkhUrAfA6Ky2K1oDEqi4DYLUsy+V5daWw6Ipcd94rSmnNKsSfGmb
w83KqPiGgd/g2/tzDktVhGrq6Vk3EYMK6bJxO61Z28REEpO9yWtFuA==
=WQSC
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/iZY-CAzHOLI/m/fWF8rQpsg0QJ", "n_sections": 90}, {"thread": "iiqtbfFs_ZA", "msg": "LCJxpvvD0i4J", "author": "David Hopwood", "date_disp": "Aug 28, 2000, 2:16:43\u202fAM", "subject": "DeCSS ruling -- More", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Stou Sandalski wrote:
>
> I don't quite agree here, although I see your point. I don't know what they
> did with PGP... but NAI's PGP has a plug in for MS outlook which is very
> easy to use...

PGP won't be commonly used unless or until it is bundled with the most
common email clients, and set up to generate key pairs by default; plug-ins
that have to be separately downloaded won't make any substantial difference.
(Unfortunately the common email clients are hopelessly insecure in other
ways, but that's a separate issue.) At least the export restriction obstacle
to bundling PGP with mail clients has mostly gone away now.

> Their argument is that it will allow "pirates" to copy DVDs....

That's their public argument. They don't actually believe it; they know as
well as anyone here that commercial pirates don't need to use anything
like DeCSS.

The primary purpose of CSS is and always was to support the anti-competetive
practice of region coding, i.e. to reduce the incidence of trading of
*legitimately purchased* DVDs between regions with different pricing regimes,
which would force down prices (especially outside the US). Note that the
region coding mechanisms don't have to be completely effective from a
technical point of view, for it to be cost-effective for the recording and
movie industry to pursue this case.

OTOH, it appears in practice as though region coding isn't effective at all,
given that both hardware and software players are routinely and openly
advertised (at least in the UK, and I hear this is also true in other
countries) with the fact that region restrictions can be bypassed as a
selling point. The MPAA have won a battle in this court case, but they've
lost the war.

Unfortunately, the EFF et al have also lost an important opportunity to limit
the applicability of the DMCA, despite being in a strong position to do so :-(
Presumably there will be an appeal?

[...]


> the MPAA is pissed because they make money from the licensing of the crypto
> algorithm in various software players...

That's just a side issue, the amount of money involved with that is not
large enough for them to be as pissed off about it as they are about the
region coding issue.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOanzzTkCAxeYt5gVAQEnSQgAw4ECqELKpd2P+w/bMuqvjanKPGqJOtaV
r5Cc6eDIAR2TlDJOZeCl2kl+PynEwfoZHTjdwRAP5FoalwW45FteliAqP4YfG/we
yMZ/QkJrPgc/uLrmANpwaxeaLpPsrxhXTlUY30fCF4rPbwq6PrHE72sskvW9snlQ
Cm9fHE0xzfcTdVJMlgDZuKFIvvtiZ6XF4aRGjrFCCyC5mgprVW+h5iJ8DDhAUboS
lwkaTs6L9W4Fa8O+bSZVFSrotC1VOH62UWGzyfObfpl9E8jfF+PA0jnui9Adrjns
pNJw7GbBbBxgIk8Ws3rsORFCb/8j5sFfZVGLH3wC6CVcNwkgEfGwLg==
=Sqgw
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/iiqtbfFs_ZA/m/LCJxpvvD0i4J", "n_sections": 13}, {"thread": "jNRQmY_7haE", "msg": "tEcNcIcMNWYJ", "author": "David Hopwood", "date_disp": "Sep 18, 2000, 9:07:11\u202fPM", "subject": "Q: Crypto-PC", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

There is no quick fix for PC security; at the very least the keyboard and
display need to be controlled by a secure operating system. A coprocessor
doesn't help if the input from, and output to the user is going via an
untrustworthy OS, since a Trojan that subverts the OS could simulate the
user authorising any transaction desired by the attacker, as far as can be
determined by the coprocessor.

Since writing a truly secure operating system is beyond the current state
of the art (and apart from a few interesting research projects like Eros
<www.eros-os.org>, no one is even trying to change that), I'm highly
skeptical that approaches like Crypto-PC will make any real difference.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOca8AjkCAxeYt5gVAQEpxggAqQdoIQfQfR/3aVWugNKcpLKfuZwZKQGK
e/K/YcwB5jLMXqi1sG4JvUhAdaK4W4DKhl6kr64oG0yy15EIP0oaIdOiiYo8LLAW
DPmZutunco9VZp2x5LYwkWOfmgtRLTTawh5P3lX2OcKEPkrixYSz6AJzBLQ5gRD0
id4WbkcZs5+4IXQVFwzZWuMfQnlQCtu+DoFPWLmXH0z1uoeUrk8IStHTNsbQEK6J
EryDtzO0rejx+4QNPHWF+N8PASjiKatf0jLPEa+UY/+/NBPObjmpf3a1iqS9DrAw
9qtk1KRTQsZrM+bTgGPkr7dHiL3rQVU4nbZKMzYT7lbp8R53vL3kMw==
=pR6P
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/jNRQmY_7haE/m/tEcNcIcMNWYJ", "n_sections": 4}, {"thread": "p0Rcqq0DZVw", "msg": "ew_jeZ4kf9YJ", "author": "David Hopwood", "date_disp": "Sep 12, 2000, 8:16:30\u202fPM", "subject": "MAC", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

bri...@hotmail.com wrote:
>
> So why not just use the old public key system to sign your message then?
>
> The MAC method implies that the sender and receiver share a common
> secret key. What are the benefits of MAC over standard signature using
> public key encryption?

Computing a MAC is faster. It is quite common to use public key methods
to agree a MAC key, then use the MAC to authenticate packets of data
sent over a connection - this is much more efficient than signing each
packet would be.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOb7HPDkCAxeYt5gVAQGA9Af6ApIdioT0lFchI5b5AaQo8Vr3TUAEsyKg
ZFIhV6asGgEEBN3r/JAiMUh5T5zdjltZdIHG4pZc7cV2LVohSnpquMJDYj2fvnuv
wHBa5yPfIvi1vChUK9Fj9UD/BEXmbn0wgHayPpqr08gI+Q0PfLgH3AeXWnrFpVH6
2mbl0FO6mlewUIAkTHNb9gENM3FEOtxx583p+UMnQab1KFKuyRyyeS3C37uXC5UX
fWaVAZ70OchWt5XeUldIc5WZhlcyX9glIN8zwxS2BY/Hvy11hJDQZlSlcHwNFGwj
8XmTnAFnK3bEoUTKy0bF7++Ym7I4+q16PfO7Ztn6GdClZt59qsvfUA==
=klBy
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/p0Rcqq0DZVw/m/ew_jeZ4kf9YJ", "n_sections": 14}, {"thread": "qF-W4hOPF8I", "msg": "_uKrFlqTG2UJ", "author": "David Hopwood", "date_disp": "Sep 12, 2000, 11:23:55\u202fPM", "subject": "Problem with Tiger hash algorithm and binary files", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Daniel Leonard wrote:
> On Tue, 12 Sep 2000, John Myre wrote:
>
> > Daniel Leonard wrote:
> > <snip>
> > > While on the subject, which reference implementation is the right one:
> > > the one from Eli Biham site, or the one from Ross Anderson site ?
> >
> > How are they different? Do they give different answers?
>
> Last time I checked (around April-May), the difference in the
> implemetation was in the padding.
>
> Anderson's: 0x80, 0x00, ...
>
> Biham's : 0x01, 0x00, ...
>
> It gives different results.

The paper says, "For drop-in compatibility, we adopt the outer structure of
the MD4 family."

Except for differences in the byte order used to encode the number of bits,
MD4, MD5, SHA-1, and RIPEMD-128/160 all use the same padding, starting with
a byte of 0x80 (not 0x01).

OTOH, Eli Biham's page says:

# Note that in the original reference implementation that we have published
# in this page there was a typo that used the wrong bit order when it
# padded the '1' bit at the end of the message. It used the constant 0x80,
# rather than 0x01 to append this bit. The reference implementation and
# test results given above are already corrected. We are grateful to John
# Lull who found this typo.

IOW, the spec originally specified the same padding as the MD4 family, i.e.
0x80, and was implemented that way. Then someone called John Lull erroneously
pointed out that the padding should use 0x01, and this was accepted by Eli
Biham and/or Ross Anderson. The version at Eli Biham's page (which is the
official Tiger home page) was changed, but the one in Ross Anderson's FTP
directory at <http://www.ftp.cl.cam.ac.uk/ftp/users/rja14/tiger.tar.gz> was
overlooked (that file has not been changed since February 1996).

Another reference implementation has since been written in Java, and
distributed with the Cryptix JCE snapshot
<http://www.cryptix.org/products/jce/>; that version uses 0x01.

[You might be able to see the funny side of the following code from
PaddingMD.java, which also handles MD5, SHA-1 et al:

this.buf[this.bufOff++] = (mode==MODE_TIGER) ? (byte)0x01 : (byte)0x80;
]

I think that at this point the version to be used is 0x01, but all-in-all
this is a textbook example of how not to handle apparent errors in a
reference implementation.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOb7zDzkCAxeYt5gVAQFUNQf9H8s0lzgk4YL8eQtuc2VHVWNk9JipxcQj
hVQuZAptHUIvUChiSBSDhZJzdE0tojY/zyRCBzw+E9uf/12a+Aixy538sifvEut8
PBBGhsYTcgIC+khUlwus1bxur8EYurlMh+QKZYivOqqPBhB8JggvEiJVoB6ofjIa
P2NdDAhORSSIPbq33CjqNYdzq74zMxBVgzvljct5Nn9iMq5tM/qHWQJ2QfN4nRZh
H8WqGYHbEG3j7OYDDdDJaPxEucmMZXtXQbVgaAd7TgN7/2KR2TxKVN7YiUMv17+U
h+/EJRBm41lCDRQA6isT13Hlf1ffCvPUwLyNVgyYkhtXfEijtbxgrw==
=i6eQ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/qF-W4hOPF8I/m/_uKrFlqTG2UJ", "n_sections": 53}, {"thread": "qF-W4hOPF8I", "msg": "Y-5c8IPQsW4J", "author": "David Hopwood", "date_disp": "Sep 13, 2000, 9:13:22\u202fPM", "subject": "20 suggestions for cryptographic algorithm designers", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Here are some general suggestions to designers of cryptographic algorithms,
on how to promote interoperability and make life easier for implementors:

1. If an algorithm is a research contribution rather than intended for
serious use, or if a paper includes variants of an algorithm that
are defined for exposition only, say so clearly. The remainder of
these suggestions apply mainly to algorithms intended for serious use.

2. If a paper defines more than one algorithm, give each of them a distinct
name, and explain why an implementor might want to use one as opposed
to another.

3. For parameterised algorithms, specify precisely the set of allowable
values for each parameter, and give recommended values. Don't include
values that would be insecure in the allowable range.

4. Use consistent capitalisation and punctuation for algorithm names, and
define an unambiguous way to specify any parameters as part of the
name. Consider submitting the algorithm to SCAN (Standard Cryptographic
Algorithm Naming), and following the "name(parameter,...)" format used
there; see <http://www.users.zetnet.co.uk/hopwood/crypto/scan/>.

5. As far as possible, there should be sufficient information in the
paper defining the algorithm, that independent implementations that
are consistent with the paper will automatically interoperate.
(For network protocols and other algorithms involving two or more
parties, that might be unrealistic.)

6. Specify any binary inputs, outputs, keys, etc. as sequences of octets
(i.e. integers between 0 and 255 inclusive). Allowing arbitrary bit
sequences rather than octet sequences is more hassle than it is worth,
and very rarely used. Define octet-sequence representations for any
abstract mathematical objects that would need to be stored,
transmitted, etc. As far as possible, try to follow existing standards
(e.g. IEEE P1363) when doing this, but *don't* use ASN.1.

7. For public key algorithms, specify the distribution of key pairs that
should be used, and algorithms for validating keys. For protocols,
include explicit checks that received values are in the sets assumed
by the mathematical description.

8. Number sequences and indexed variables starting with zero. If there is
a completely arbitrary choice of byte order, use big-endian. Don't use
inconsistent byte order in different parts of an algorithm (although
this needn't prevent using auxiliary functions like hashes, etc. that
internally use a different byte order to the algorithm being defined).

9. Write octet sequences as two hex characters per octet (most followed by
least significant nybble), and left-to-right as they would be stored in
memory or transmitted. This may sound obvious, but the documentation and
test vectors for at least three of the 1st round AES submissions (FROG,
SAFER+ and Serpent) used the opposite (right-to-left) convention.

10. Provide a C reference implementation that is byte-order independent,
uses only aligned memory accesses, does not depend on the sizes of
built-in C types or the signedness of 'char', does not assume that
signed types are twos-complement, and does not use compiler-specific
directives, or any other non-portable tricks. Test it with several
compilers on different platforms.
Ideally use <inttypes.h> for integer types, and provide a minimal
version of this (which can just be a few lines in most cases) for
compilers that don't have it. "Byte-order independent" means using code
that accesses individual bytes/octets, *not* BIG_ENDIAN and LITTLE_ENDIAN
conditional compilation and pointer casts. Use macros only where it
clarifies rather than obfuscates the code.

11. Provide an optimised C/assembler implementation. This may use
compiler-specific embedded assembler, conditional compilation of code
that works better on some machines, etc., but it should still act as a
plain C version when assembler for the target machine is not available.

12. In both reference and optimised C implementations, treat inputs, outputs,
keys etc. as arrays of an unsigned 8-bit type (e.g. uint8_t from
inttypes.h), to correspond with the mathematical definition in terms of
octets. Put test code that checks an implementation against test vectors
in a separate source file, that can be compiled with either the reference
or the optimised implementation.

13. Optionally provide a Java reference implementation that interoperates
with the C ones. For this treat inputs, outputs, keys etc. as byte arrays
(with the obvious two's-complement mapping between the Java 'byte' type
and octet values). Look at other optimised Java crypto code to see how
to fake unsigned types efficiently, and various other tricks. Put test
code in a separate class from the algorithm.

14. Put up a WWW page from which all of the papers, code, test vectors, etc.
relating to the algorithm are available. Post an announcement about this
page to at least sci.crypt. Keep the page up to date, and reference any
published cryptanalysis of the algorithm from it, including that by other
researchers. If the page is mirrored then use some method that ensures
that mirrors will be kept up to date.

15. Make available, at least as a text file and as C test code, test
vectors for *all variants* of the algorithm, and for a selection of
parameter choices (if it is a block cipher then this should cover all
block sizes, and a selection of numbers of rounds or key sizes, for
example). Include both values that are byte-order-invariant (e.g.
0x12343412 for 32-bit words), and values that are not, for each input
to the algorithm.

16. For the most common parameter combinations, also include a fully
worked out example with intermediate values at each stage of the
computation (including dumps of such things as scheduled keys).
Make sure that the test vectors are sufficient to test all parts of
the algorithm (e.g. encryption and decryption, or signing and verifying).
In the case of non-deterministic algorithms, e.g. a public key
algorithm with a randomised padding method, give test vectors that
use fixed values for the random input. For yes/no tests give both
values that should pass, and values that should fail for various
different reasons, if applicable.

17. Don't revise papers, implementations, test vectors, etc. without stating
that they have been revised, and when. Make sure that all on-line versions
are up-to-date, using Archie and Metacrawler to search for any copies
you might not otherwise know about. Also give a brief summary of what
has changed.

18. If an algorithm is modified incompatibly, give the modified version a
new name. Don't change the name for simple mistakes such as typographical
errors that are found soon after publication (but see 17). If the spec
and the reference implementation are found to be inconsistent, consider
carefully which one needs to be changed, or whether it is better to
define a new version, considering both disruption and security
consequences.

19. Make papers available on-line in at least PDF and Postscript formats,
and preferably also as the original source (e.g. LaTeX or whatever).
Use an HTML page that has an abstract of the paper and links to the
various formats, and recommend that links from other sites be made to
this page rather than directly to the .pdf/.ps files.
Some journals have restrictions on when a paper submitted to them
can be made publically available; in that case put it on-line as soon
as possible within those restrictions. Put a reference to the algorithm's
web page in the journal version.

20. If the algorithm is ever broken (perhaps not completely, but enough
that you no longer recommend its use), say so on the web page, and
post an announcement of that to sci.crypt.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOcAkSTkCAxeYt5gVAQHBxQf+M/gDLpIh+mvsQRwe7zvWKFOVZCdOIxBy
mjXlr0Z9rtkEH6rALWpPzlTGSkKd5OtfC37MIV1AAJHXpFlxtY9JatF0sYi+wVie
qDw1BxK22qzowjBblX6pRA4m+A2e4+/UVEPke+Jh91M5tWm9JyVN7f4MXgRZ45hR
A4AA90IGSiFOJNmHe5YdNQKrjeyiH4Y/SwOauTBO55LO0yuJ/FN7PHCtwART82xk
u+KDw3NQ998tw2xxf7VRRD34pxZLcJmuxnr2wLdEcOjYhMQGkDuV9wVv9U1MrAtW
U8ouT2W7XbZmfq+3KL+tqoRxOuGIDMUTeH2frZ1NQb3EXhhsn6DZpg==
=Q2/N
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/qF-W4hOPF8I/m/Y-5c8IPQsW4J", "n_sections": 53}, {"thread": "qF-W4hOPF8I", "msg": "9oywRD7GQ4oJ", "author": "David Hopwood", "date_disp": "Sep 14, 2000, 3:00:00\u202fAM", "subject": "Problem with Tiger hash algorithm and binary files", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Runu Knips wrote:
> Daniel Leonard wrote:

> > On Wed, 13 Sep 2000, Konrad Podloucky wrote:
> >
> > > From Eli Biham's Tiger page
> > > (http://www.cs.technion.ac.il/~biham/Reports/Tiger/):
> > > "[...]Note that in the original reference implementation that we have
> > > published in this page there was a typo that used the wrong bit
> > > order when it padded the '1' bit at the end of the message. It
> > > used the constant 0x80, rather than 0x01 to append this bit. The
> > > reference implementation and test results given above are already
> > > corrected. We are grateful to John Lull who found this typo."
> >
> > This confused me more because while discussing with Mr. Antoon Bosselaers,
> > he told me that the correction was wrong.
>

> Well, in fact it is a question of intepretation.

It's not a question of interpretation at all. The Tiger paper specifically said
that the padding was to be done in the same style as the MD4 family, which
uses 0x80 as the first padding octet when the input is a multiple of 8 bits,
and treats the most significant bit of an octet as "first".

Note that this is an entirely separate issue to byte order; MD4, MD5 and
RIPEMD-*, which are little-endian, and SHA-1, which is big-endian, all use
the same bit ordering convention. (HAVAL and Panama use the opposite
convention.) In any case, the interpretation used in the new Tiger reference
code is definitely inconsistent with the original paper.

> This means that both intepretations are possible.

Of course, but that wasn't the question. For most applications, bit order
doesn't matter because data is treated as a sequence of opaque octets. In
practice that is also how it is treated for hash function inputs, despite
most hashes being defined for inputs that are bit sequences. For that to work
it's essential that hash designers don't change their mind about which bit
order is meant.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOcFVxzkCAxeYt5gVAQG3lwgAt9mjjMWoRnd6g0CkDGwdKbmc7NCqeY9O
OjB+kbc+oU/k5vvBCiaWj1fd+K6T8JCz8KizLN9sb9x9Sbik19L2EFg4bIN2s41W
0M3nGU4tA6Zsk0EoucnQ0mXqlZGrkSOPZHZtDEbU2K+xH/09PSFYFv+GXZxQpMNg
rxLqyNOwPHzY75liKtHGZ6rVsbOKaxBtSNEVTMFy/Df+Thewk4owj2SHCmEzsPgy
ZpBIafN0ZFsqR37jZKOn/68vogOmxB3njx8241XD+iK8NH+DlBHsfUzJ2tTEkzwd
l3t3NRc3Zs6Z9xQQpT+7faU8vi8X/X3OteoVdKUVxDdVWuCvkAZB8A==
=LxbS
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/qF-W4hOPF8I/m/9oywRD7GQ4oJ", "n_sections": 53}, {"thread": "qF-W4hOPF8I", "msg": "it5Kt1lZzEgJ", "author": "David Hopwood", "date_disp": "Sep 14, 2000, 10:34:58\u202fPM", "subject": "20 suggestions for cryptographic algorithm designers", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"D. J. Bernstein" wrote:


> David Hopwood <hop...@zetnet.co.uk> wrote:
> > If there is a completely arbitrary choice of byte order, use big-endian.
>

> No. Little-endian is much more widely supported than big-endian, and is
> universally supported by new processors.

In the sense that new processors typically support switchable byte order,
yes. It is the operating system that determines how that switch is set,
though.

Note that it's typically only possible to take advantage of the algorithm
byte order matching the processor byte order, when you have word-aligned
data. Potentially unaligned data generally needs to be accessed as bytes
(assuming that a byte is an octet), and converted to integers using shifts
and ors, in which case the byte order of the processor is irrelevant.

My recommendation to select big-endian byte order when there is an
arbitrary choice was not based on efficiency; I don't think that the
cost of byte order conversion is a significant concern for most
applications. Where it is a concern (perhaps for very fast stream ciphers,
for example), it is easy to define two variants of the cipher, and mark
which byte order has been used with the ciphertext. New and recent
processors usually have an instruction that swaps the byte order of a
word in one primitive operation, in which case the conversion cost (in
and out of an algorithm) would be *at most* half a cycle per byte.


The arguments in favour of big-endian are:

+ Big-endian matches the combination of
- the digit ordering used in the Arabic-based number system,
- mathematical notation where sequences are written left-to-right.

E.g. the base 10 big-endian representation of 1234 is the sequence
[1, 2, 3, 4], as opposed to [4, 3, 2, 1]. This means that people
used to modern mathematical notation (which is based on Indo-European
languages and the Arabic number system), generally find big-endian
order more natural.

+ As a consequence of the previous point, hex dumps can be read
independently of the size of elements. For example,

Big-endian:
01234567 89ABCDEF // 32-bit words
0123 4567 89AB CDEF // 16-bit words
01 23 45 67 89 AB CD EF // octets

Little-endian:
67452301 EFCDAB89 // 32-bit words
2301 6745 AB89 EFCD // 16-bit words
01 23 45 67 89 AB CD EF // octets

Also note the inconsistency involved in using little-endian order
when octets are still written in hex with the most significant
nybble first.

+ Internet protocols almost universally use big-endian conventions.

+ Almost all standards commonly used to specify representations for
cryptographic objects, e.g. P1363, OpenPGP, ASN.1-based standards, etc.
use big-endian conventions.

+ As pointed out in [1], little-endian architectures and protocols are
often not entirely consistently little-endian, whereas big-endian
designs tend to be consistently big-endian.


and for little-endian:

+ Little-endian order has a slightly more elegant expression for the
value of a number in terms of its elements:

x = Sigma[i = 0..k-1](base^i * x_i)

instead of

x = Sigma[i = 0..k-1](base^i * x_{k-1-i})

OTOH it's quite easy to use this convention for bit numbering (i.e.
the least significant bit is bit 0) even with big-endian byte order,
and IME that does not lead to confusion.

+ The most widespread personal computer architecture uses a little-endian
processor family (x86).


IMHO the arguments for big-endian order are more compelling. Note that
the main argument in [1] was for a single order to be chosen and used
consistently. If there is any candidate for a consistent byte order, at
least in Internet applications, then it is big-endian.


[1] Danny Cohen,
"On Holy Wars, and a Plea for Peace,"
IEN 137, 1 April 1980.
ftp://ftp.isi.edu/in-notes/ien/ien-137.txt.3

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOcGKFTkCAxeYt5gVAQGTcwgAmxJ5kbe0AoHH1I7a2YQbus0t07Pqx3D3
jWTYpiyq3Ft2uIVmhtUG23mBORAx0/Z65mip7W+21VMnPfQGxleaWN7ka0VVg3yF
MEGin833JMBjKzbITRSRuEMntbqBjGNVi/fwhxIor2vQMH8sSRZbCMEU9iXQAVKn
AqgPQHzfm4M+95T6PtkltXMqwleZpjxOPLQHjzL4/CjrrJdz4L00b0jdPPDuR1of
sap1WO0hgreZhvvEw5y0WvHtybYn+ecnbJGLna6GyJa1DU2vtSsNKUC4LoIORREQ
ulhTNp+MNRHHWjHYxNBuGXdJ2YQ45ZueSqCN0ylLcqwXVUcOs+XFqA==
=H0c3
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/qF-W4hOPF8I/m/it5Kt1lZzEgJ", "n_sections": 53}, {"thread": "qF-W4hOPF8I", "msg": "fK9kM3zlfusJ", "author": "David Hopwood", "date_disp": "Sep 15, 2000, 11:38:24\u202fPM", "subject": "20 suggestions for cryptographic algorithm designers", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Schlyter wrote:
> In article <39c21f51...@news.ecn.ab.ca>,
> John Savard <jsa...@fNrOeSePnAeMt.edmonton.ab.ca> wrote:

[snip]


> > The PowerPC chip supports both byte orders, although it is big-endian
> > by default.

In particular, it can load and store 32-bit and 16-bit data in either
order with no performance penalty (as can UltraSparc). I expect this will
be the norm for new processors.

> > But the number of people using the Sun Sparc or the MIPS
> > chip - if you don't count the people using MIPS chips in video games!
> > - and Mac computers - is indeed dwarfed by the people using the
> > Pentium.
> >
> > But that is irrelevant to the "suggestions", since the rationale for
> > big-endian is based on what goes on inside _people's_ heads, not
> > inside computers.

Exactly, I'm glad someone gets the point.

> Anyone who participates in the "holy war" of big-endian vs little-endian
> should read Gulliver's Travel's!

As pointed out in the notes at the end of the IEN 137 document I cited,
the point that Swift was trying to make does not hold for byte order.
There are no interoperability issues involved either in which end an egg
is cracked at, or the religious differences between England and France
that Swift was satirising. In a network protocol or a cryptographic
algorithm, OTOH, byte order MUST be specified as part of the protocol/
algorithm. (The 'talk' protocol is an example of a failure to do this;
in that case byte order problems were visible to end-users, who needed
to use two separate programs at one point.) There are also benefits to
using the same byte order in different parts of a design (I assume we can
all agree on that?)

Given that consistency in byte order is desirable (even though it is not
strictly necessary), big-endian is the only choice that helps in achieving
that, because it is the choice that has been made for Internet protocols,
as well as some other standards relevant to cryptography. It also happens
to have some advantages arising from consistency with the Arabic number
system and conventions for written mathematical notation.

> And now, in our modern and supposedly enlightened society, there's
> again a "war" about endian-ness.

There is a minor disagreement as to what byte order to use for new designs,
when the choice is arbitrary. I would hardly call that a "war".

> ====================================================================
>
> IMO endian-ness doesn't matter much. I've worked with both kinds of
> endian-ness and I find it easy enough to adapt. Little-endian is
> slightly more machine efficient,

There is no significant difference in efficiency.

> while big-endian is slightly easier for people to read -- but the
> difference is so small that it's no point in making any fuss about it.
>
> One way to avoid this issue completely is to return to word addressing
> in computers - then this issue would become moot.

This would be a *really* bad idea. All recent networking protocols and
file formats are defined in terms of octet sequences, not word sequences.
Apart from the fact that it's far too late to change now, if they had
been defined in terms of word sequences, a lot of things would break
when the word size changed (or at least it would involve supporting
addressing using the old word size indefinitely). Also, addressing using
elements larger than an octet would introduce inefficiency in dealing
with arrays of small quantities [*], and word order would still be an
issue when dealing with integers larger than a word.

[*] Octet-based addressing already causes some efficiency when accessing
packed arrays of bits, but fortunately packed bit arrays are not used
often enough for this to make a significant performance difference.
Character-element and small integer arrays are used a lot, though.

> You *never* hear any discussion about the optimum "bit order within a
> byte": should the byte start with the least or the most significant bit?

A counterexample is the thread on bit order in the Tiger hash function,
that the "20 suggestions" article was a follow-up to. In any case,
regardless of the size that is chosen as primitive (e.g. 8 bits for
octet-based addressing), there is no way to avoid the issue of element
order for integers that are a different size to that.

=====

Since byte order is a minor side-issue compared to the other 19 and 2/3
suggestions I posted, I will clarify the offending suggestion as follows.
The old version was:

8. Number sequences and indexed variables starting with zero. If there is
a completely arbitrary choice of byte order, use big-endian. Don't use
inconsistent byte order in different parts of an algorithm (although
this needn't prevent using auxiliary functions like hashes, etc. that
internally use a different byte order to the algorithm being defined).

which becomes:

8. Number sequences and indexed variables starting with zero. If there is
a completely arbitrary choice of byte order (i.e. the cost of byte
order conversion, if necessary, would be negligable for the proposed
applications), use big-endian. Don't use inconsistent byte order in
different parts of an algorithm (although this needn't prevent using
auxiliary functions like hashes, etc. that internally use a different
byte order to the algorithm being defined), and make it clear in the
specification which order has been used.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOcLNwDkCAxeYt5gVAQHyIwf/Wu/X3R46SBUyfisSbHVh8pvzdRX+zPnm
UmEKkZk561V3zIWtHq+676XWBc4yknmXyHqbnNkSh3tEyLxk5ZQIKiUYq9nVgZZo
ATRDXtdPBpgaDxepAeqyltLEILMWTUj/4V2PQg7dFX3cz5OdIqe19mExr0w6cleL
swHs5xpnBWF6Prqeq5O7K2DbeT9w1Bi6BNfmA8KmotxV09KYTm6/MGMX5cjgEDwv
DFrPRKgEkRpi7S7ol6VRW6SBv54OBhU9FLeQyMuftQUi/n7W/TMRE6+kc086iEnn
0L7Tvk/bUhXqspLr2u8DCP1ffBzSBoph4Tz3R4GxNNrDmOayW4WJxQ==
=nw0O
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/qF-W4hOPF8I/m/fK9kM3zlfusJ", "n_sections": 53}, {"thread": "qF-W4hOPF8I", "msg": "a_YyeF6-Im4J", "author": "David Hopwood", "date_disp": "Sep 15, 2000, 11:39:32\u202fPM", "subject": "20 suggestions for cryptographic algorithm designers", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Runu Knips wrote:
> David Hopwood wrote:
> > [big endian is better]

That isn't what I said.

> None of your arguments was worth anything. Little endian or
> big endian - it just doesn't matter. It has only to be clear
> which ordering should be used.
>
> Of course it would be better if all architectures would use
> the same ordering, no matter if big or little.

Which order is used by processor architectures is irrelevant
(as has already been pointed out, most new architectures have
equal support for both, although that may be constrained by the
operating system). I'm talking about the byte order used in
protocol and algorithm designs.

> We would get rid of all these problems with network messages and
> binary files. On the other hand, even experienced and good
> programmers would then start to write really ugly code which
> relies on the byte order.
>
> I prefer big endian for binary formats because one can
> read it better in binary dumps. I prefer little endian if
> I have to convert a stream of bytes into numbers because
> I can save the conversion step.

You've just said that code that relies on the byte order of the
processor is really ugly (and I agree, for code in a high-level
language). How is that consistent with then saying that you can
save the conversion step when both the processor order and the
stream order are little-endian? The code for byte order conversion
still has to be included in the source, if it is not to be "ugly,"
in order to support big-endian processors.

I also don't see any difference between a "binary format" and
a stream of numbers encoded as bytes. An encoded stream of numbers
*is* a binary format.

> But finally it doesn't matter, it is just a matter of taste.

If that point of view were followed, we would have roughly half of all
new protocol and algorithm designs big-endian, and half little-endian.
That situation is far from optimal.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOcLNWzkCAxeYt5gVAQEObAgAiaUdFcZQgZwNOraLwhobMfsm6PJX4lcL
gQAvMJCkIC3n9/Au4ZTLhxYoHednZ+j1nA5GFsiDMTIKg7UVBNUBLyp79LZhnBO2
GJSIoVg5ofKeIcC+nkIYuAvI00aTm5Txrfdi1EfzYtEFbXUAdijnFAh3waD2qeA2
6TPMnS1ca+dYGpr4Drjedaa2fDvbJekm4YyGNH/bU3xKlG5Z5Aqsk+AIBD7NXUuI
apoN5Nl81+ozhfaq5ycZFxD0wEzk8jqwc+dD7CXGwdc2dJIevc706150GjZsj4T+
I8r87vH1gnMVxaJ/guOHJsWjQuD37KkFaj7KcDLtp527QNbFPNa6Rg==
=FBRi
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/qF-W4hOPF8I/m/a_YyeF6-Im4J", "n_sections": 53}, {"thread": "xNU2jvd3RRQ", "msg": "VYeXHhRF9BQJ", "author": "David Hopwood", "date_disp": "Sep 22, 2000, 8:41:42\u202fPM", "subject": "Tying Up Loose Ends - Correction", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tim Tyler wrote:
> SCOTT19U.ZIP_GUY <this.a...@is.for.spamers> wrote:
> : gol...@earthlink.net (Benjamin Goldberg) wrote:
> :>SCOTT19U.ZIP_GUY wrote:

> :>> I thought we are talking about compressing then ecnrypting.


> :>> If you always add 5 zeros or any other fixed amount of bits
> :>> after a compressed string or any file for that matter which is
> :>> then encrypted. The attacker know what the last few bits are
> :>> and throws out keys that don't match. So if the last five bits
> :>> of a file are known then it means you reduce your key space by
> :>> 5 bits.
> :>
> :>Reducing the message space by x bits does *not* reduce the
> :>keyspace by x bits...

[snip]
> ... David is discussing the effect of adding an additional section


> of known plaintext to the end of the file. This normally has the
> effect of decreasing the keyspace by almost exactly five bits -
> provided the effective keyspace doesn't go negative, of course.

With all due respect, this is complete nonsense.

When we talk about "reducing the keyspace", that means reducing the
size of the set of keys that need to be considered at all; it does
not mean finding a test that will eliminate keys by testing them one
by one.

For example, if you have a cipher with a keyspace of m bits, and
there is some cryptanalytic attack that can be split into two
independent parts - the first extracting partial information about
the key, and the second using that information to search 2^n
possibilities, then the first part of the attack has reduced the
keyspace by (m - n) bits:

k1 = first_part();
for (k2 <- 2^n possibilities) {
if test(k1, k2) then f(k1, k2) is the correct key
}

The time complexity of the attack is the complexity of 'first_part',
plus 2^n * the complexity of 'test' (assuming f is trivial).

If, OTOH, an attack is something like this:

for (k <- 2^m possibilities) {
if test1(k) and /* eliminates all but 2^n keys */
test2(k) /* eliminates remaining false keys */
k is the correct key
}

then the keyspace has *not* been reduced (the time complexity is at
least 2^m * the complexity of 'test1', i.e. every key still needs
to be considered). What David Scott is trying to claim is that the
existence of 'test1' reduces the keyspace by (m - n) bits, which is
at best an abuse of terminology, and is basically just plain wrong.

> [This may not necessarily reduce the difficulty of searching the
> keyspace, but does allow certain automated rejection of many keys.]

You can in practice always reject keys, if you loop over each possible
key, because plaintext messages are almost always automatically
recognisable. In particular, whether they are recognisable is not
changed by compression, including "1-to-1 compression".

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOcvxxDkCAxeYt5gVAQGZMAgAkFfcVobrEDEx+djjex0eLv4QQ+tY6mdM
FRPr02B7dUr67dSqNqmh7ef7wCtTAYiYniecRbf7WeSEwzdLH7/emu/rmRtlom1y
t2nMG0uMmS+V3AzVCf9VhSxv/YxZVUvaoZmtSMvhtD99++i1p0WBam25ueK9L8Ew
iY7ffdlflEd4XvLO8iP01VSwJM27prBPyD0nft+7mcFY0AR/OgZbGShFGfWi52kE
cS4BKrnQMZDe4pxb81au7CItC8sJUY7oFyYNh4lxFH7eTNuqMaqxSlm3PYqj1VGP
RBAyyHLH4jX83AmautmM2ZUq7Lcj8qSatUR1NU4NeSNWNv7wbPinPw==
=iT3q
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/xNU2jvd3RRQ/m/VYeXHhRF9BQJ", "n_sections": 100}, {"thread": "xc5JKJLj8nI", "msg": "aFRw72vN4BgJ", "author": "David Hopwood", "date_disp": "Aug 29, 2000, 3:00:00\u202fAM", "subject": "PGP ADK Bug: What we expect from N.A.I.", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Michel Bouissou wrote:
> In any case, this "ADK / ARR" feature is a very sensible thing,

You probably meant "sensitive". "Sensible" it definitely isn't!

> as incoporating such features in a cryptosystem creates one possible
> weakness and attack path. Ralf's discovery recently proved we were
> right being worried about it.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOateEzkCAxeYt5gVAQH0xQf+OiWrfhf/SxlOhamHp+/0i9o7ZHjMUhCm
EiUJ/lSxtSu0VaGsvG+RVyIv6hbp43E4+INSdqyUpnErj//qQu+UMDmGUaKJO1g+
s+C3pGBGlmAwJKurkX+Yn2GrS4yYXD3arD/9IaRVsAtqM71O0dCdZX8r74ptSW4y
znos0DVege9kVEAN1AkRQYPy0PiByESzIQvRgMVtq8Pe4eLltSdG40yOKI/cMoVt
FaaXa03Om/ucYRv3ne7zYe2WKdm2cbzxgt80koA0Pi//byGKiWH+2ziyfpyZ3xsG
2+muPOk25uIcaMtkAny+MkUbM96cpj99/ZFV0WlE3NshXS7eilUPRw==
=q6L+
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/xc5JKJLj8nI/m/aFRw72vN4BgJ", "n_sections": 16}, {"thread": "ytX7G22rouE", "msg": "s5KwOW6fqfEJ", "author": "David Hopwood", "date_disp": "Aug 29, 2000, 1:38:55\u202fAM", "subject": "encryption scheme output - samples table?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

kihdip wrote:
>
> Most encryption schemes result in a bitstream.

To be more precise, most modern encryption schemes treat plaintext and
ciphertext as streams of octets (8-bit bytes), or occasionally as streams
of larger words (e.g. 32 bits). The order of bits within an octet or word
is usually not defined.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOasxBjkCAxeYt5gVAQGRQwgAk0DXNEeFse75HCp5GyVRCXhmAlCMi57p
Qw75mKHyP2LeK0FccuN+okTRyn0JzKSFVYY63wKK7UUHhySdzdjqkjo6WjCwn6XQ
lGlBap2WB4TXVB7Pwm9XDWPC2UVOtqmO+1n90vNSEiBqIeRClf1Ovq7x58cQ0Rb1
cTQ0U8AdId1QeTvZrSzw0TgJEdGsTSeym1RtpcMmet/qhVKBg+XMqanQRTPAmdAx
7sEcAz4Oj6mnAQP3UVctJQQHO+MpPDLNk23ZJk3iSUHo6DxOPRx19lPXDU4/UMUb
SpB3Gt2t2ZrxYZgoIsOEBEP5z1lsBUOHLY+xec8JM0w2e9s2mPUtKw==
=/MkC
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ytX7G22rouE/m/s5KwOW6fqfEJ", "n_sections": 3}, {"thread": "1-CLVkEXxfo", "msg": "dkkApSq4GIcJ", "author": "David Hopwood", "date_disp": "Dec 9, 2000, 3:08:12\u202fPM", "subject": "[globera announcement 2] Professional support for Crypto++ available", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> In article <3a30d858....@news.siol.net>,
> spam-is...@nowhere-in-particular.com (denis bider) wrote:
>
> > globera, a Ljubljana, Slovenia-based consultancy and integration
> > company specializing in digital security, announces open availability
> > of professional support for the public domain Crypto++ library.
>

> Unless your services are free you just SPAMMED this group.

IMHO the announcement was perfectly reasonable, on-topic, and not spam.
Although I have no evidence, positive or negative, about the competence
of this particular company, in general professional support for open-source
crypto libraries is something to be encouraged, and is likely to be of
interest to a fair proportion of the readers of this group. At least
they've chosen a well-designed library to support.

Even if the article had been spam, quoting it in full and adding a single
line saying that it is spam in your opinion, is simply annoying, and not
at all helpful.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOjHN9DkCAxeYt5gVAQFpqggAnMsaXIxI6uAtvyS+d30uU7BDkZqHVD2m
saE77gLa+RwpvYsmsjt4K3zO7sdIcidkqfto1q2QokMtg23KAxm5w9KJZfWi9MWU
T4VX3xxi7VuCHUXlNxbFa3VK9etoEuqPo7R4zthw9/Oyl2i2KqO+ydqMSoAjcGuS
Ie6bRLz4nM9gX8gnbn4qkSURGhvn0UvVBy9RQ0B5r5w/FPrpxX17FBnLDwYnfJ8Q
u4U9t3A36eiwNySANDrHQmxozMfgWMj2kS8R97I6H/DzY+p5ctBZP66vO+8pdUHv
0TbQbzuFJEtwhJq/Pn2d6HPq12CyklMAeeQZiqW9LALaZnRMJPa5mg==
=KHQK
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/1-CLVkEXxfo/m/dkkApSq4GIcJ", "n_sections": 5}, {"thread": "1FYXao3Wzik", "msg": "vaTaVVadEAQJ", "author": "David Hopwood", "date_disp": "Dec 1, 2000, 7:23:53\u202fPM", "subject": "DES question: Has this ever been proven before?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Francois Grieu wrote:
> David Wagner wrote:

> > If a(n) = a(2n), then the period of the cycle is n. Well, the
> > period might divide n, but almost always it is n, if n is the

> > least value such that a(n) = a(2n) and if you are iterating a
> > random function.


>
> Now I'll believe you on this one, but is there a simple argument

> showing that the header length is almost always smaller than the
> cycle ?

For a random mapping on a set with N elements, the expected tail
(header) length and the expected cycle length are both sqrt(pi*N/8).
So there is a non-negligable probability that n will be a multiple
of the cycle length rather than the actual length, but it will only
be a small multiple. See section 2.1.6 of HAC, and

P. Flajolet, A. Odlyzko,
"Random mapping statistics,"
Advances in Cryptology - EUROCRYPT '89

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOibs+zkCAxeYt5gVAQHF0gf+PiSmBYDuwjkU6Jl+RhKQTKDxEizgkb8V
jgQkG2eCgpj23gGMFJ4btdWH8ImU7I52oNG7WgnCDgLNPbyJYYrdDsGp2uCRvC9f
NgyvnaImBCfSWs/tAf0/hRTlnEri8v8mH9y97VLTNUDvrA3ELLuAqtb7k29tgXjb
pRCxPiUpnF34sBK6EKW3n90+kmFjBKqixZohEc4uDLOMBIQsgtxhJO/33NQeQZ4y
oqxZzRGBfpt8gEW4rHUNOKr4yVFMDtcV5pR8P/Bt1PrZeAaqrax2MbCA68QLvmFS
2cTHlaOS7pAUC9jJiK1+ZA+mmdHeeq/aAlbZIiw7qQqW4mdSo7C02w==
=U2HQ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/1FYXao3Wzik/m/vaTaVVadEAQJ", "n_sections": 37}, {"thread": "2mFxPvT39Hw", "msg": "tCpnAzladksJ", "author": "David Hopwood", "date_disp": "Dec 2, 2000, 8:45:44\u202fPM", "subject": "On mutation of crypto algorithms", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> In article <3A256114...@t-online.de>,


> Mok-Kong Shen <mok-ko...@t-online.de> wrote:
> > Tom St Denis wrote:
> > > Mok-Kong Shen <mok-ko...@t-online.de> wrote:
> > > > An interesting question is how would a scaled-down version
> > > > of Rijndael compete with DES. My feeling of the gut is that
> > > > 20 rounds would probably suffice to provide a fairly safe
> > > > bet.
> > >
> > > Irrelevant. Rijndael cannot process 64-bit blocks. The closest
> > > thing is a 72-bit block.
> >
> > What hinders a scaling-down to 64 bit blocks?
>
> The fact that you cannot build a square with eight elements...

The Rijndael state doesn't have to be square. Either a 2x4 array
(Nb = 2, word size 4 bytes, and shift offsets C1 = 1, C2 = 0, C3 = 1,
for example) or a 4x2 array (Nb = 4, word size 2 bytes, C1 = 1) appear
to work.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOilTfTkCAxeYt5gVAQHkiwf8C56lSyTy80XB1nDWljpIdUhK2ZBMiXYB
q+028Ue4iXhkv0sGkoWJYyTzoJZ3w4Zyv4c5ocD/CffypkPywGB1XP+UAHihHw/F
UiotLSm8wzEAy/qsSalvHxJJTxjJRXtC95PDPXe4N7uD30W5JWMiHp57e+BCLsbM
fpQhE75MjxSzX2ENhWDY+lt3nwkWZW3x0708Yz9OxjPG8KPfmLI+4N9Ozie34TiQ
9+a3jObadKQ5sGnKLeIhM7/lws7SS6bN7+6lT91UZjzHK7JImpKj+bNzzj2ZQIGj
BJya6JyeNY/MALxME0ZvJrd4QJvFq+d0kkjqGA0sSi1RTo7hs3XH5Q==
=UdRM
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2mFxPvT39Hw/m/tCpnAzladksJ", "n_sections": 18}, {"thread": "5fU-s_feuCY", "msg": "o-jR3_qdFXQJ", "author": "David Hopwood", "date_disp": "Nov 2, 2000, 5:34:24\u202fPM", "subject": "RSA MGF", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

sudo...@my-deja.com wrote:
> In RFC 2437, a Mask Generation Function is defined for use as encoding
> algorithm. Part of the algorithm is:
>
> For count from 0 to \\lceil{l / hLen}\\rceil-1 ...
>
> I do not understand the second part of this. What is "lceil"
> and "rceil"?

It means "For count from 0 to ceiling(l / hLen)-1", where
ceiling(x) is the smallest integer >= x.


The \\lceil and \\rceil are the symbols around l / hLen below:
_ _
| l |
| ---- | - 1
| hLen |

which are another way of writing ceiling(l / hLen)-1. For completeness,
this is how floor(l / hLen)-1 would be written in the same notation:

| l |
| ---- | - 1
|_ hLen _|

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOgDztjkCAxeYt5gVAQGb2Af9GnGFjKsL9eBrvB/+UUbwJ+C0waJbLv4h
FJ+1BLtkmWwXjz9TY4btY9Unrrl7dp/HSJt4aCjbSCgwxFZzMLjQu42LMSTNu1UT
Jly5lrWgG0rnUpBr0UVI02yhQvxGKawrdlocvFDyi/Lje9ck7yMHhdoOkbCIX9Ii
QPhsJWdqhe7JxRrFzKgYOpe3G+5DvWtb0VSMOJuiI/RsL4Frz/cUd9vdKpYZblnD
RYlTMGWS4iMRa1r3jOGLhxSbADsjgiqPzGUgh7R9co3gWBQdBifBrzqT8WY4mrEG
rsxWwyESzg6rxpL9rg+XnpzRE0NDY8KbYw2Vuy6AprCXFOo3W9b3fQ==
=ST+Q
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/5fU-s_feuCY/m/o-jR3_qdFXQJ", "n_sections": 2}, {"thread": "6NGrzizKH0k", "msg": "V_uCVpi4FE4J", "author": "David Hopwood", "date_disp": "Oct 31, 2000, 10:40:40\u202fPM", "subject": "RSA Multiprime", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Francois Grieu wrote:
> con...@maths.usyd.edu.au (Scott Contini) wrote:
> > The only thing more ridiculous than Compaq patenting this is
> > RSA Security licensing the patent.
>
> Agreed, if true.

Absolutely.

> > While (multiple primes) gives some speedups, it opens up the
> > (RSA) algorithm to possible new attacks: if a faster special
> > purpose algorithm than the elliptic curve method is invented,
> > then multi-prime RSA easily could become insecure.
>
> Well, GNFS and even MPQS are faster than ECM for pratical purpose,
> and all three are equaly efficient against two-prime and
> multi-prime RSA. The product of 2 random 288 bit primes is just
> as hard to factor as the product of 3 random 192 primes, and this
> situation has not evolved in the last 20 years.

192-bit primes are definitely too short. Here's an excerpt from a
previous post of mine (which was considering a different cryptosystem
that relied on moduli with relatively small factors):

=====
The problem is that ECM can now factor numbers where the smallest factor
is about 54 decimal digits (~180 bits), and is very close to being able
to find factors of 60 digits (~200 bits).

According to a post by Paul Zimmerman, with title "New ECM record: up
to 60 digits", in sci.crypt on 5th January:

# On December 26, 1999, Nik Lygeros and Michel Mizony, two math researchers
# from Lyon (France), found a prime factor of 54 digits of a 127-digit
# composite number with GMP-ECM, a free implementation of the Elliptic
# Curve Method (ECM). According to the table maintained by Richard Brent [1]
# this is the largest prime factor ever found by ECM. The previous record was
# hold by Conrad Curry with a 53-digit prime found in September 1998.
# [...]
# In a recent paper [8], Richard Brent extrapolates the ECM record to be
# of D digits at year about 9.3*sqrt(D)+1932.3. This would give a record
# of D=60 digits at year Y=2004. We strongly believe 60 digits will be
# reached before, perhaps already in 2002 or even this year!
#
# [1] ftp://ftp.comlab.ox.ac.uk/pub/Documents/techpapers/Richard.Brent/
champs.txt
# [...]
# [8] Some Parallel Algorithms for Integer Factorisation, Euro-Par 99, cf
# ftp://ftp.comlab.ox.ac.uk/pub/Documents/techpapers/Richard.Brent/
rpb193.dvi.gz

I reckon that something like 6.9*sqrt(D)+1948 is a more realistic fit
(for public distributed attacks, not taking into account dedicated
hardware). That gives 77 digits (~256 bits) in about 2008.
[...] this means that 256 bits is not really long enough.
=====

IMHO, as a conservative choice for long-term security, about 400 bits is
needed for the smallest factor of a modulus for cryptosystems based on
factoring.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOf+QaDkCAxeYt5gVAQGYpAgAqB6d/VXXe4CqU3BLynrZOz8acJTVrSz/
Yuc+DAa82Qbh4VMGW4JBsOb1opURtpGip2gu2jdo9liPQBCYFurJHdJRWIOLQj6+
KE2493vVy4FMFo9UmJzfsRHQOMjuxbn/kNMwNzSTCRXB1o8B7kPSx5x4uuBLluYl
5QNRZfVTY1jav1j59B+auCKfKcEW+kjGr0HxxlT/UJi31RghGLqbpYdN5X/qPXEz
F2TgpIutpCj1oNxEJAh5iYCSAAJn7aW2dP8i1NRbresTb71RIyKPRC6J7mqhRBDh
9sBcmM+29IT3jVKDqN66GCU9uOaiJFmxCxoZpv7ufi2mU1VUPpGxPg==
=LMcJ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/6NGrzizKH0k/m/V_uCVpi4FE4J", "n_sections": 21}, {"thread": "AeMa6wFAxmI", "msg": "BFwSQQ7fKDoJ", "author": "David Hopwood", "date_disp": "Dec 27, 2000, 2:47:20\u202fAM", "subject": "RSA == hash function?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

cws...@my-deja.com wrote:
> I think RSA cannot be considered as a hash function because its input
> and output length is a variable depending on the modulo n. Hash
> function should take variable input length and produce fixed length
> output.

That is not why RSA is not a hash function. It would be perfectly
possible to fix the length of n, and in any case other hash functions
have variable output lengths depending on a parameter.

RSA is not a (secure) hash function because it is invertible when the
factors of the modulus or the decryption exponent d are known (and if
someone gives you a modulus claiming that the factors and d have been
discarded, there is no way for you to verify that).

Also, the RSA primitive is a multiplicative homomorphism
(RSA_pk(x) * RSA_pk(y) = RSA_pk(x*y)), which is not a property that a
hash function should have.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOkmeNDkCAxeYt5gVAQGvuAgAxqjXMQUoR1E4svoj+IGFE02u/ICVQl2D
r+uGXR0ZZZYcerL7jW/eIsOJxmDOD6wcmYFwDpEFboQv+iGOjSutnwboGlhcnJxL
5oSXZ2YYuFzmlNrDxRg6sn357KVyM0FXaKRiGPLmvAZoa5o1uVbbs0tQBDHV+kS3
gF/Igqg4/BTcWXdP9dHkbHIjtz5erm6Fq1kyxpoTlq0JZai7CpcHtUmFaNW3quH2
1PLYto0aGSuymy3HxkhECUQa4tSHMBFO/itwpmLfdshXQVxpSWtR7r8QebPKCmLA
a3iECR0J8UXByxUSqXqt4L7uVvHni3Xy7BWV6d62LePgb2Iay7oQzA==
=wwNr
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/AeMa6wFAxmI/m/BFwSQQ7fKDoJ", "n_sections": 10}, {"thread": "Dl0lltSb79Y", "msg": "Dy4xfyX_39AJ", "author": "David Hopwood", "date_disp": "Oct 31, 2000, 9:41:52\u202fPM", "subject": "XOR based key exchange protocol - flawed?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mike Connell wrote:
> Pa, Pb are RSA public keys. (X)Pi means data X encrypted under key Pi.
> Xa, Xb are random blocks of data of the same size as the public keys.
>
> 1. a -> b : Pa
> 2. a <- a : Pb

^ I assume this should be b

> 3. a -> b : (Xa)Pb

The number of passes could be reduced to 3 by eliminating message 1
and making this "Pa, {Xa}Pb". (A can still go first by swapping A and B.)

> 4. a <- b : (Xb)Pa

In the other responses to this thread, there seems to be some confusion
because the original description did not say whether public keys were
certified or known before the protocol starts. There are three cases:

1. If the public keys are certified, then messages 1 and 2 should be
explicitly sending certificates, not unsigned public keys.

2. If the public keys are not certified, but they are known to be correct
for some other reason (for example because key fingerprints, i.e.
hashes, have been exchanged over an authentic channel), then it is
redundant to send them in the protocol. It would be more efficient
and clearer to send the fingerprints instead in messages 1 and 2
(since a mapping from a fingerprint to a public key is assumed to be
known).

3. If the public keys are not certified or otherwise known to be correct,
then there is obviously a MITM attack.

Also note that the protocol does not provide forward secrecy, or explicit
key confirmation. IMHO this makes it a bad choice for new applications
even in cases 1 and 2.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOf+BBzkCAxeYt5gVAQHbJgf+Lrt2FPZbZsbChnE0Znoh/RWZ7FbwqmAs
+oNTKf3MZaxvjoDi5/QN4pk7awwLv75cssrk5bE3zme3XE8KKOhzfesHX56nhGiP
zoaxpyHyB4+GkUvU2150s+OAeATBUQIj1cfpmfJ1ohGsNUSSSwHDCcz9c6Z8rkA1
LrkwAVyv/M8TkCbLJ8Du7O8w9cJISIOCo5rEGoSVQ1WnZDhnboeuxx1N9rAhRM1T
iTEF9mQfWzc4ioa8gjjkE844jf5tpBhl/SRAbD6qQnb6PPAn0n7UrUXQJkp0Py69
NW05GbcY5r8iAYfGWuy0BB8g+jAIEpIZW1sRZ3dDY07Nkn06M89zrw==
=utVD
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/Dl0lltSb79Y/m/Dy4xfyX_39AJ", "n_sections": 39}, {"thread": "Fm5Vk_nwIVk", "msg": "F_eXBOQ7RNUJ", "author": "David Hopwood", "date_disp": "Nov 29, 2000, 1:26:34\u202fAM", "subject": "P/w based authentication and key exchange", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Ivars Suba wrote:
> I recommend to attend complete strong password authentication
> reference page http://www.integritysciences.com/links.html#BR00
>
> My choice would be elegant and brilliant Leighton-Micali "Secret-key
> agreement without public-key cryptography" (T.Leighton and S.Micali,
> Advances in Cryptology: Proceedings of Crypto'93,1994)
> applied for pswd authentication and key exchange purposes and has
> several advantages over Kerberos and Needham - Schroeder protocols.

Leighton-Micali requires a central trusted party or parties, which
introduces many unnecessary avenues of attack against the system, and it
is not suitable for password authentication (users' keys are generated by
the central party, and they cannot be derived from a password). If this
protocol was ever useful, it has been superceded by more recent designs,
both in the password-based and non-password-based cases.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOiShfDkCAxeYt5gVAQEfeQf/WId2v32ajlJTlSJ/DuWoUG9kYiUQGz5S
HGhSO5qgUeNRFDU4t6G2p+9Om6UtJUcMSv6nFWoK3zSnufRIHa8IIm0CA/6ZgUIC
YmiesEd40AesbcwW71AOyySRtqGq8nDbgklSSgr0XVM9J3ndDuIldJbH/rOZdfbD
wBMsIr3ycHhmJuqKG9ABeKIHXz1aAwkew3jDgrGQLjd8tQVKxu+AAI/Y2dlVQ2NZ
l2XOrCwJEvPvoYDfR3zNn4RvtxfDRrE285Q3k062lCThRadiC20X02v6IvcRPRIQ
2If7NMU6aIpDBw4+neASWbtKN7LsQwRq2L7rwUF7uKY9Fx0CqulEWA==
=eiZl
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Fm5Vk_nwIVk/m/F_eXBOQ7RNUJ", "n_sections": 18}, {"thread": "JXSkScyonYY", "msg": "H7JdHJQJx2oJ", "author": "David Hopwood", "date_disp": "Dec 6, 2000, 3:00:00\u202fAM", "subject": "MD5 byte order", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Schlyter wrote:
> In article <90ic57$255k$1...@nef.ens.fr>,
> Thomas Pornin <por...@bolet.ens.fr> wrote:
[snip]

> > Those endianness things are unfortunate, because in MD5 they are mixed:


> > bytes are represented with the low-order byte first, but, inside a byte,
> > the bits are in big-endian form: the most significant bit is first.
>
> Excuse me, but how on Earth do you determine the "bit order within a byte"?

Hash functions are conventionally defined to take *either* an octet string
(byte sequence), or a bit string as input. The bit ordering affects how
octet strings are converted to bit strings (or vice-versa, depending on how
the hash function specification is written).

This affects interoperability between standards that like to use bit strings
(some ISO cryptography standards, for example), and those that like to use
octet strings (most others). There's an example of this in P1363a draft 6 that
I'm just about to point out to the relevant working group - for a little-bit-
endian hash function, the draft as written would require reversing the bits
in every octet of a message.

Also, the start of the padding will generally depend on the bit order,
even for inputs that are a multiple of 8 bits. For hash functions derived
from MD4, the first padding byte is normally 0x80 if the hash is big-bit-
endian, and 0x01 if it is little-bit-endian.

Generally, when deciding how to use a hash function you are better off only
considering octet strings, and completely ignoring the fact that it is also
defined on bit strings (which is quite useless, and hardly ever implemented
for arbitrary bit lengths anyway). It's often still necessary to know the
bit ordering in order to make sense of the hash function spec, though.

> [On] word-addressable [only] computers, it's pointless to try to define


> the "byte order within a word" as "little-endian" or "big-endian", for the
> simple reason that individual bytes aren't addressable on these computers.

Such an architecture will almost certainly have a conventional format
for representing text in memory; that format will also probably match the
order in which arrays of [unsigned] char are stored in C. If the first
character element is stored in the high bits of a word, the architecture
is effectively big-endian; if in the low bits of a word, it's little-endian.
Byte order is just as much about conventions like this as it is about the
instruction set.

> > The SHA-1 and SHA-256/384/512 specs are more coherent: they use
> > big-endian everywhere.
>
> :-) ...even if the data is transferred over an RS-232 line? <g>

Above the physical layer, RS-232 just sends opaque elements of size
data_bits (when it works, but don't get me started on that).

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOi7D8TkCAxeYt5gVAQFgLgf/XcanBQyWeZCJFaL16u/zhHP33WQkJCtd
lLWAZED7JSuStU9dlpwYuugULyUp0h7BlIcShbj9MLFFKyYyvp26U4Xkg3jCSpul
fVFq4ZOJlMjsSZHd/hMrXkj5gtXyZHkEWYYW9k6bWWN1eqUX9dvpmI7nRTpkI/jU
NziyJV5RWImpm9vQldmOwR2ulWh/HUn/q+D197WurdFEASgcbRbVvkPm8LtgW8UR
buYgSWvzTyrokoTpeyO85INiPhrjJnZceGSreUVntYE6i2v4ZVowCt6MHfemHBNc
sUsBhHgpfL7q4G2590JOPyXoieuaR5Zt4OLIQe1yHopHTgY5vD3N+Q==
=RqCm
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/JXSkScyonYY/m/H7JdHJQJx2oJ", "n_sections": 17}, {"thread": "LJR0q1aRKoA", "msg": "NdocgwNzGyIJ", "author": "David Hopwood", "date_disp": "Nov 4, 2000, 3:00:00\u202fAM", "subject": "Known-plaintext attack on chaining modes (was Re: Give it up?)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Eric Lee Green wrote:
> Mok-Kong Shen wrote:
> > Tom St Denis wrote:
> > > A good test for a block cipher is given a ciphertext block C and
> > > (let's say this is an AES cipher) and 127 bits of P (the plaintext)
> > > you cannot guess the last bit faster then brute force without the
> > > key.
> >
> > But known-plaintext attack (the zero bytes mean that
> > part of the plaintext is known) is one of the commonly
> > considered attacks, isn't it?
>
> That is why you do not use a block cipher in straight ECB mode.
>
> If you're using it in CFB mode,

[I'll assume full-block feedback.]

> the first thing encrypted is a random salt
> value. This basically means that as prior block's cryptotext is EOR'ed
> with the current block's crypto-text, each subsequent block has a
> seemingly-random value EOR'ed with it, which should resolve any known-
> plaintext attack problems.

It prevents a chosen-plaintext attack [*], but not known-plaintext.

For full-feedback CFB,
C[i] = P[i] XOR E[K](C[i-1])
so (C[i-1], C[i] XOR P[i]) is a known plaintext/ciphertext (pt/ct) pair.

For CBC,
C[i] = E[K](P[i] XOR C[i-1])
so (P[i] XOR C[i-1], C[i]) is a known pt/ct pair.

For full-feedback OFB,
S[i] = E[K](S[i-1])
P[i] = C[i] XOR S[i]
so (C[i-1] XOR P[i-1], C[i] XOR P[i]) is a known pt/ct pair.

I.e. for each of these modes, having known message plaintext allows
calculating pt/ct pairs for the underlying cipher (in the case of OFB,
n+1 consecutive known message blocks are needed to find n pairs).


[*] Strictly speaking, a chosen-plaintext attack is only prevented under
the assumption that an attacker cannot obtain a partial ciphertext,
then submit the next block of the plaintext for encryption without
the IV being reset. Protocols that use chaining modes should try to
prevent this situation, since it also allows attacks that break
semantic security, even for an "ideal" block cipher.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOgOOrTkCAxeYt5gVAQHYXAgAmR94xXwjK5qBJlD3faECuRRt25sFlqvv
Yw3YeTslfTZ3gnE7lJmUwQQKLPwmRHbskIPODIdebeeN+RY1JZd3xnfqBeUKJjIN
qLnI6djB4IuqsI0/usZXWgYV/rFglT4Gqk29QeSkhXFa81alJ5+Yr2+BOQbRwnHU
RE+Gr8ExSNn8Vx7lzFKhfRGqLZd6H79u3UaLA4HRCkHNAoViQh0999KolcgTOUMz
/aS4jmYpi0TdKx/w6d6wl9erN5SQ9bwY75t+CSw7gfUHPPYKERnU0mBVAtW4Igrm
RuCwQFUfYccgdfL5ddHevD+y2R9vPIgR7OAQrQAKt9oi3r321QJmXQ==
=7wJm
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/LJR0q1aRKoA/m/NdocgwNzGyIJ", "n_sections": 48}, {"thread": "OtFiE3xKebE", "msg": "dfO1BKu0J6gJ", "author": "David Hopwood", "date_disp": "Dec 6, 2000, 3:00:00\u202fAM", "subject": "DES and Salt", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mike The Man wrote:
> This is an old one, that I'm trying to grasp; Salting the DES.
>
> I first wrote a DES-routine in Delphi, which seems to be working (compared
> results with known tests). Then I added a salt value, trying to do it in a
> UNIX-password-style. However it doesn't come up with the same results as it
> appears in the etc/passwd.

Here is a hopefully unambiguous description of the salting used by
"traditional" crypt(3):

A 12-bit salt is used, considered here as an integer between 0 and 4095. The
password is represented as a US-ASCII string, and padded with zeroes up to 8
bytes. The results for passwords containing non-US-ASCII characters, or that
are longer than 8 characters are undefined. (Note that many Unix
implementations silently truncate passwords to 8 characters.)

Each byte of the US-ASCII-encoded, zero-padded password is then shifted left
by one bit, and the result used as a key for a modified variant of DES. The
key is used to encrypt a block of 8 zero bytes, 25 times. The parity of key
bytes is ignored.

In standard DES, the output of each expansion permutation is a block of 48
bits, which are numbered as in FIPS PUB 46-2 (i.e. from 1 on the left to 48
on the right). Salt bits are numbered from 1 for the least significant bit,
to 12 for the most significant bit. The modification of DES is that if salt
bit i is set, then bits i and i + 24 are swapped in the DES expansion
permutation (a.k.a. "E-box") output.

The salt and final modified-DES ciphertext are encoded in 13 bytes as
follows:

encode(x) =
("./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz")[x]
E_salt(P) = encryption of the 8-byte block P, using DES modified
by the salt.
C = E_salt^25(<0, 0, 0, 0, 0, 0, 0, 0>)
output = encode(salt & 0x3F) ||
encode(salt >>> 6) ||
encode(C[0] >>> 2) ||
encode(((C[0] << 4) & 0x3F) | (C[1] >>> 2)) ||
encode(((C[1] << 2) & 0x3F) | (C[2] >>> 6)) ||
encode(C[2] & 0x3F) ||
encode(C[3] >>> 2) ||
encode(((C[3] << 4) & 0x3F) | (C[4] >>> 2)) ||
encode(((C[4] << 2) & 0x3F) | (C[5] >>> 6)) ||
encode((C[5] & 0x3F) ||
encode(C[6] >>> 2) ||
encode(((C[6] << 4) & 0x3F) | (C[7] >>> 2)) ||
encode((C[7] << 2) & 0x3F)
where
<< denotes shift left,
>>> denotes unsigned shift right,
|| denotes concatenation,
& denotes bitwise AND,
| denotes bitwise OR.

When verifying an authenticator A, the salt is recovered from the first
two characters of A (least significant 6 bits first):

salt = encode-1(A[0]) | (encode-1(A[1]) << 6)

and the authentication succeeds iff the correct output can be derived
from the password and this salt.

> From what I've gathered, the Unix password consists of thirteen
> base64-encoded characters. The two first make up the 12-bit salt.

> The other eleven is the 64bit result from doing the 25-times DES.
> When you type in a password the first eight ASCII characters will be
> leftshifted (so an A - h41 would be h82), because the 8th bit is ignored as

> parity in DES. Then these 64bits are inserted as the key in the DES.

> The first input value is all zeroes, then the DES-output is fed back to the
> input for the next DES.
> This is repeated 25 times.

The encoding uses a different alphabet from base64, and the salt modifies the
E-box as described above.

You could also compare with a pre-written implementation, e.g. UFC-crypt,
or the implementation in Eric Young's libdes at www.openssl.org (or perhaps
the Java implementation in Cryptix, at www.cryptix.org, would be a better
match to Delphi). These are heavily optimised, and it isn't easy to see
what they are doing in terms of the notation in FIPS 46-2, though.

You do know that crypt(3) isn't a very good password hashing function,
right? (The salt is too small, it is too fast, and the limit of 8 characters
is not adequate.)

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOi7EyDkCAxeYt5gVAQE+AAf/X8wqwPNRzQvrBxQYC5D2TTG1IiaXsDkS
gfzhpn8RXWqgR9e/X9vm3+fv6lC9NerYoRxLP7czCaYU+am9jsbf5CvbsrYCPJlP
JMep1/xBeBFJzgyyN3bpay/ARSjW+KIGLrOzpiTP3fnOVSF3kMeiB9soT1n6BNGd
zOOJEmJo3/D72hJz6G9md44k3nx9Gsz82GDMKGcYrsmJOxHeChXvVnIe5eE/iKjP
8zrZLWfIYVLHwG1LmGHya3j7p6l83TkAgS5DXScwSIX7gTlq8KrRdyj4My3siD1a
g/MmJVVKMTJvyzxFCQTLQBoZ7cfkwisMNiZZV9uviV+zu7osW8uXcQ==
=/yRU
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/OtFiE3xKebE/m/dfO1BKu0J6gJ", "n_sections": 9}, {"thread": "T0THxL4IGNQ", "msg": "1tOWGvTvNR8J", "author": "David Hopwood", "date_disp": "Nov 18, 2000, 3:00:00\u202fAM", "subject": "vote buying...", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Rubin wrote:
> "Trevor L. Jackson, III" <full...@aspi.net> writes:
> > The requirements are:
> >
> > a) Anyone(*) can confirm that no fraud occurred. Types of fraud
> > include:
> > 1. Eligible voters cast more than one vote
> > 2. Non-eligible voters cast any votes
> > 3. Votes were properly attributed to the candidates subtotals
> > (This list is not exhaustive.)
> > b) No person or group(**) can determine how any citizen voted
>

> To be more explicit about b), you might have to add:
> c) No voter can give evidence that s/he voted for or against any given
> candidate ("receipt-free").
>

> > I believe the fundamental conflict is irreducible.
>
> Certainly it's hard.

All the attempted solutions I've seen fail to solve the problem that
voters' authentication credentials can be bought. (Authentication
credentials are whatever a voter knows or has that proves that they
are eligible to vote, and that distinguishes them from another voter -
e.g. keys or smartcards.)

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOhb9lTkCAxeYt5gVAQHDVgf7BivA9md1FamgmN1YRZH9WhKMjsqtpPw5
kKFFb7iVFczuyQfnQv+xfoalZR+L6kU78idnY4Fo7uzQIwZ7zvbPMhtDA5I983Tz
/iVCMofcZOhwTAI/vmiYKFHSW9FFIWvtutpLZ810Vx35xMZZLwwknrzb5/02MmDf
2ESkgUVPmZuHexVcQIthqSnZTMFELFzkNwWB6y+v7/aYfENRXo80AlLd4PNvjwD4
7QeRsjYV4FmsInbssDpOfF834zi2Z0eRzSHTbaxaFO2YCaOOStNK8m1r7apUXBbD
YcVub6Ww07/6bcWqcJRgIMz/grNhCB/CVQZQamC5ZH4eo7bq2kPcnQ==
=+wmP
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/T0THxL4IGNQ/m/1tOWGvTvNR8J", "n_sections": 83}, {"thread": "T0THxL4IGNQ", "msg": "Ubw-AAgy7a0J", "author": "David Hopwood", "date_disp": "Nov 18, 2000, 3:00:00\u202fAM", "subject": "vote buying...", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Schwartz wrote:


> "Trevor L. Jackson, III" wrote:
> > > The "anonymous receipt" as done by grocery stores fits that bill.
> > > There is nothing on that cash register tape saying who bought these
> > > items (unless you presented some sort of club card or credit card), but
> > > presenting that receipt to the cashier is proof that yes, you did indeed
> > > purchase this item that you're trying to return. All these votes could
> > > be online, but without identifying information in the data, there's no
> > > way to identify individual people.
> >

> > How does this prevent someone from demanding that a voter show his
> > receipt?
>
> The voter can present anybody's receipt. Since the receipts don't
> identify who you are, I can post my voting receipt anonymously on the
> Internet and anybody who wants to can show mine instead of theirs.

Then how does the voter know that the receipt (s)he is given is associated
with his/her vote? Remember that a coercer may be looking over the voter's
shoulder when (s)he votes.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOhb+tTkCAxeYt5gVAQGs1Af9EEYZcqaOf8bDSzhNlHKLzMp6DXfmkLZE
SBcjnEUqRdso5PINMDjpRZNqQmhidIRop0dro+gzQlGuwbuCpnVJpJRCWUK2Uahh
sKIwFfM2lNJsvAIUxAn3gchdOovoIKHUa0vLShmNMkEeENQ/VLBUdWmBx2A7LMs9
94QDw6ds8fmtxz/OEvXdX2dc+ngvsTNICMe67BLDQvyo3PBDKJgi7fmZaL1L5/0j
5dYaEyFSqxzTkb7l39kfo/ep8yx8vlIRoZh0oIx6KEWMUnrryKnhYbI3zpYSeGoj
XxcHP2KP9iU3jVmLrqG2vAAC0WlX3isGluS+BqjvCSYmms1ueYDcew==
=1jRf
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/T0THxL4IGNQ/m/Ubw-AAgy7a0J", "n_sections": 83}, {"thread": "T0THxL4IGNQ", "msg": "MoPfZXn_CRUJ", "author": "David Hopwood", "date_disp": "Nov 18, 2000, 7:54:47\u202fPM", "subject": "vote buying...", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Schwartz wrote:


> David Hopwood wrote:
> > All the attempted solutions I've seen fail to solve the problem that
> > voters' authentication credentials can be bought. (Authentication
> > credentials are whatever a voter knows or has that proves that they
> > are eligible to vote, and that distinguishes them from another voter -
> > e.g. keys or smartcards.)
>

> The number that allows them to vote can be a single digit that's
> different for each voter that he or she is simply shown on a screen. A
> person buying that number would have no way to know whether they were in
> fact given the correct number.
>

> Suppose, for example, that if your code number was "6", pushing
> the green button was a vote for Gor but if your code number was "7", the
> green button cast a vote for Bush.

[Call this a "blinding code". I had considered this technique before, but
it's completely impractical.]

> If someone wanted to buy my right to
> vote, they'd have to trust me when I told them my code number was "6" or
> they'd be casting my vote for the wrong person!

That's all very well in theory, but do you seriously think that there


would not be a large number of errors if voters were asked to do a
modular addition of their intended vote and their blinding code? [*]
Do you think they would be able to remember or otherwise keep track of
their blinding code between being issued with it and the election, for
that matter?

[*] AFAICS a modular addition is the simplest way of doing this that would
also be secure, although the modulus doesn't have to be very large, and
could be 100, say. 10 is too small because there are frequently more
than 10 candidates.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOhckqTkCAxeYt5gVAQH4ZAf/W0shjxOoaxiplyMl3rMXm+xr6tZI0ore
9tHAV9WDORvXB7Pf2IKqnAm0bS4ciFckXHtT4ECvtXl5J008g5u1Ce50acRNdrj3
KgxsWXFXnj02DujCxWgxJAfO+tOtnCeri9m5KaytOUHsVJ8kZeHJaZaXtVa4sZNq
XVnqFML9h2Z8ilhGPZGmJXaxAbSekPERpGN8RM3qb1JfqyLx8dSKNlZxep58iA28
5IZ+3ZTv3Quw1nC0I8z6DQSYz3X4CSEoy8P1vJd/XdzJTmxQKGM2vMK6XhxHrFn+
mB0wUzPCyi5gwA6ik/C8pULoye0ET1BFeA2pMF43VaxqEpjrtEQeJA==
=cad7
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/T0THxL4IGNQ/m/MoPfZXn_CRUJ", "n_sections": 83}, {"thread": "T0THxL4IGNQ", "msg": "MgFyoNlFfkAJ", "author": "Kat Hopwood", "date_disp": "Nov 25, 2000, 8:15:22\u202fPM", "subject": "vote buying...", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David A Molnar wrote:
> David Hopwood <hop...@zetnet.co.uk> wrote:
>
> > All the attempted solutions I've seen fail to solve the problem that
> > voters' authentication credentials can be bought.

Someone pointed out that absentee ballots already have this problem.
That's true, and it is one reason why the proportion of the vote that
is done using absentee ballots should be minimised, IMHO.

> > (Authentication
> > credentials are whatever a voter knows or has that proves that they
> > are eligible to vote, and that distinguishes them from another voter -
> > e.g. keys or smartcards.)
>
> What do you think of making the credentials sufficiently important for
> other things as well that they're too expensive to buy in bulk? e.g. the
> credential allows voting, but it also allows access to a bank account, so
> you need to pay someone his bank balance or more before he'll give it up.
> This is only a partial solution, but it seems better than nothing.

I don't see any way to enforce this without introducing more security
problems. Credentials can be compromised unintentionally, so a protocol
that deliberately tries to maximise the loss when they are compromised
is unlikely to get much support. (This applies more generally, not just
to voting protocols.)

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOiBj9zkCAxeYt5gVAQECaAf9EncnO048pTIwL3FJe8J7UWV2BDpdaXG5
NK8lnQyN71cUvDT1fuWJq2lxDOObWKsA3GzToCq2/1uwxTpLVuBPkah9oZRryRyp
xTINhHrxjfqgpqWL7RdKdI+uv04IehBzfPsWSOc7BwufVX+ZlVpozpQuAy4x2A6n
pfArQjA54Gi3hVPY1DrEItFoIeQM+B4M70PY3ukrM893LLZKmAmtFxrKfnZfOclc
trXUONYH7IHQE2SAXgS5BK1SRNEywp16maKd+ws14ycSmrM6ATQJN3Hzdg/Bsk3w
WOXOtC/yNObR4ReaGlvAnWOq+Ii3x6+0tKtc6oVAQittQ+i+AE3m9Q==
=g5Dr
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/T0THxL4IGNQ/m/MgFyoNlFfkAJ", "n_sections": 83}, {"thread": "Wu3ZE4cp30U", "msg": "NzBSDMnYFu8J", "author": "David Hopwood", "date_disp": "Dec 6, 2000, 3:00:00\u202fAM", "subject": "NT 4.0 and MD4 Hash", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

cha...@yahoo.com wrote:
> Please fix the error in my ways.. ;-)
>
> I was under the impression that the NT hash (not the LM hash) was a
> straight MD4 hash with no salt value.

It is, but of a Unicode (big-endian UCS-2 encoded) string.
For example "magic" would be MD4(<00 6D 00 61 00 67 00 69 00 63>).

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOi4inDkCAxeYt5gVAQHoFQf+O3rzF5eO4sBbcpnIkzeNhAf5Ur2dOFAe
A811X3cuROXbAsMcTULHfvo8bWkQkrT4bjnP91gxyKiJ0b/BQ+dHDhkl1EOgGlZ5
gbVWKrRZlsgRSUR0BCJlaN7YxqCPvneJ2x1/z3CbIo9ieuSRdmdPxPUNM7tsL0dR
TICnDRy+Yrf5LsOv5bkGXs/FnJF9BQcfafrKALixao5VMNph14miHbyBk8rYAAW6
jy01Nr+mnYwEpexvGUXk2+DpINfbxWXUlexmaYEWuc+iMMOrG8JDHC87lh/IGGC7
EPA9UvrAgBVsYr1v6INpvpU3mnOOFQQtpNlFhwcnqDt+kZTbv/YnFQ==
=gF+p
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Wu3ZE4cp30U/m/NzBSDMnYFu8J", "n_sections": 2}, {"thread": "YCkd--NSh-8", "msg": "7aLEwKbJaAEJ", "author": "David Hopwood", "date_disp": "Nov 4, 2000, 3:00:00\u202fAM", "subject": "Hardware RNGs", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

jashwo...@my-deja.com wrote:


> Paul Crowley wrote:
> > Alan Rouse wrote:
> > > Hashing does not increase entropy, whether one pass or multiple.
> >
> > No, of course not. However, at least it doesn't *reduce* entropy

[context restored]


> > until you already have enough for your state to be unguessable,
> > unlike many preprocessing techniques suggested for entropy sources.

> > It's also much harder to get wrong. [...]


>
> Actually I will differ with you there, you seem to be making the common
> mistake of assuming that SHA-(whatever) offers perfect entropy
> consolidation,

Although it doesn't offer perfect entropy consolidation (why would it need
to?), it can reasonably be expected to offer very good entropy consolidation -
better than a von Neumann compensator, or most of the other commonly suggested
alternatives. (Note that a von Neumann compensator will not remove
correlations between bits.)

> we have no such proof, and my belief at least is to the
> contrary. To test my theory of non-perfect entropy reduction would be
> compute intensive or human intensive, but I believe that if you take a
> start value, feed that into the hash function, feed the result into the
> hash function, etc. I believe you will find a loop sooner than full
> exhaustion (2^256 for SHA-256).

The expected period of an iterated 256-bit random function is on the order
of 2^128. I would expect SHA-256 to be indistinguishable from a random
function in that respect. In any case, the period is not really relevant
here, because we are regularly adding somewhat-random material to the input
(assuming a design similar to Yarrow or /dev/random), and that will
disrupt any cycles.

> This reveals non-perfect entropy
> because it reveals that from that start value, the nth value in the
> chain can be guessed with probably higher than 1/{output space} without
> computing the value.
>
> Granted the space will be enormous, for SHA-256 I'd expect the length
> of that loop to be somewhere on the order of 2^200+ values in length,
> but I don't expect it to be perfect.

Perfect entropy was not claimed. What is needed is output that is
computationally indistinguishable from random, as well as recovery from
state compromise, chosen entropy inputs, and similar attacks described
in [1] and [2].


[1] John Kelsey, Bruce Schneier, David Wagner, Chris Hall,
"Cryptanalytic Attacks on Pseudorandom Number Generators,"
Fast Software Encryption, Fifth International Workshop
Proceedings (March 1998), Springer-Verlag, 1998, pp. 168-188.
http://www.counterpane.com/pseudorandom_number.html

[2] Peter Gutmann,
"Software Generation of Practically Strong Random Numbers"
(updated June 2000),
Original version presented at the 1998 Usenix Security Symposium.
http://www.cryptoengines.com/~peter/06_random.pdf

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOgNiQjkCAxeYt5gVAQFRNwgAyzhgzkJRD3T/9vNYjUpMrpJl0ZyDIOLa
c0+C/f+7v9Ug3RdzKbbey93yC4oZARaUv0+Eeq2PAH5olxH3zWKgZBzMmU33dGyl
iWTbvgniDVXFHVa65eayzFGyqIXhzjBZ8fRnRNdKFhvPLmSETW92bWQvOPHTCHzO
esZWTQwrs3ngDgp3ZRSY6khVj5qdVdP17s9GuIc97afp5OsWlgjZP3GAUVKNvUHN
X8BsuhmM5ATV1U83Y6Is/5gHdAsjSpvogVtD4+b89/7KtB0o3UzcaZT6Gmc3RwJL
lppNciC+TLScV/HvhW+DMriWustAh8/yH2KnRDwawxJ66Y/FmaJg1A==
=q2r0
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/YCkd--NSh-8/m/7aLEwKbJaAEJ", "n_sections": 69}, {"thread": "YCkd--NSh-8", "msg": "TGO3PwaLIbQJ", "author": "David Hopwood", "date_disp": "Nov 8, 2000, 3:00:00\u202fAM", "subject": "Hardware RNGs", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tim Tyler wrote:
> David Hopwood <hop...@zetnet.co.uk> wrote:


> : jashwo...@my-deja.com wrote:
> :> This reveals non-perfect entropy [...]
>
> : Perfect entropy was not claimed.
>
> AR:"Hashing does not increase entropy, whether one pass or multiple."
>
> PC:"No, of course not. However, at least it doesn't *reduce* entropy."

That's a misquote of what Paul Crowley wrote.

Paul Crowley:
> Alan Rouse:


> > Hashing does not increase entropy, whether one pass or multiple.
>
> No, of course not. However, at least it doesn't *reduce* entropy

[context restored]


> until you already have enough for your state to be unguessable,
> unlike many preprocessing techniques suggested for entropy sources.

> It's also much harder to get wrong. [...]

Note "until you already have enough for your state to be unguessable."
~159 bits is unguessable.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOgi8gzkCAxeYt5gVAQGWyQgAjHrn60E5Yey5W/v6jACdJRS1cMsx7a2r
gA32Ydm/IVBz5YpG1H7SSMF8ZJk3ZuKqz91sIia2pAn/vswuXaaxVBqQaFKHXBXF
GE+ecR0frstpszY0NyV32wa0nbZ+AqPXj2oCODKVCsYrQD4gbsUuWbwC5AfGyLk5
a74jHwkEQitl4ZszVg2CtG8SLEgYcQqUiv8OX51O/Vj2RdM0O9s6Uezg64GdUpML
6XU9LZjERfIrSEjQB77517lF/to+dTxl4YQJnjq/epjLAZt7TffP59VuV6Q9S+uZ
WvHYwE8mJRwrJgECo3eAz2I3nZ77vaUgy7K1NJhqD7oQyqvven06EQ==
=Liim
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/YCkd--NSh-8/m/TGO3PwaLIbQJ", "n_sections": 69}, {"thread": "Yw_58Mh_ZU8", "msg": "fwDT_iQGumAJ", "author": "David Hopwood", "date_disp": "Dec 16, 2000, 3:00:58\u202fAM", "subject": "NT4 Password", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mike The Man wrote:
> Could anyone explain to me how the clear-text password is encrypted in NT.
> I understand it's Unicoded and then hashed with MD4, but it doesn't work
> with my MD4-app.
> If the password is 'a', shouldn't the Unicode be '6000' in hex?

It should be <61 00>. Have you tried the following example from section B.2
of RFC 2433?

"MyPw" => MD4(<4D 00 79 00 50 00 77 00>)
=> <FC 15 6A F7 ED CD 6C 0E DD E3 33 7D 42 7F 4E AC>

> If I feed 6000 into the MD4 it doesn't come out the same way as in
> L0phtcrack?

L0phtcrack is open-source, isn't it? In that case if you still have a
problem, look at its implementation.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOjsaxzkCAxeYt5gVAQGrAAgAmJyNQq4SW5mjgx8dOdVu2a8fGYZYHsRh
JwvJ7hkVX8rlBOhXqwVEUch/zzTAfN4ZxrNnKlmfUqrHjzPBFXzDC+CHrjqgnuGF
udc5heBm4UAQcNHxwDitsCdD8SEs1vMmLFMIG+XhPG8jCgW9TTQK3JF2bVNpt0SD
4exRWLlU8EqAbLCru848IvNX+zvZlScPj9a57BZZW69iLezr+qTK2rYo4O+EE7jj
U77VZpYyXuPXczRKB41zEkiYUEwKhF2L5vC9EgvknWSroaPihkRhGW7kyc8fkUKO
JPp1loFDFXC7ywtqrP4d3Yyvc1tTw25hEfZguiNpfVlWpTgDn08stw==
=dFpD
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Yw_58Mh_ZU8/m/fwDT_iQGumAJ", "n_sections": 6}, {"thread": "Yy6sxxX2_U8", "msg": "x-jR2iiwux4J", "author": "Kat Hopwood", "date_disp": "Nov 26, 2000, 3:00:00\u202fAM", "subject": "RSA: Choice of p,q dependent on input size?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Arild Kvalbein wrote:
> My textbook in data security and cryptography includes the following
> question as an exercise:
>
> "Find primes p and q so that 12-bit plaintext blocks could be encrypted
> with RSA"

The question is badly posed. If it is asking for a toy example of RSA
primes without regard to security, then it's sufficient that pq > 2^12.
If it is asking what size p and q should be in practice to encrypt a
12-bit plaintext, they should each be at least 512 bits, and this does
not depend on the size of the plaintext.

(There is a maximum size that can be encrypted directly using RSA with
an encoding method such as PKCS #1 v1.5 or OAEP, but for longer messages
than that, a hybrid cryptosystem would normally be used, in which case
the plaintext size still doesn't affect the size of the modulus.)

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOiB+gTkCAxeYt5gVAQGQuAf/U1r3fqmgZXXRA453taky9VeVk7JtLpTd
MmSKZmWZn/7An/chUZxANDb25qSYQTVsWHu/HhLuTpffLPQ36IIlJpIasMdVEDNL
bgiOLnbv/OvLUEery/nKsLlDL3jT+Ha2eOCbC+bZ4qAJttmu+QGvfe43uih/3KKr
b89x8B+svMfgD8jvaMXoZ2Zj1r32JpnP5cFd7VHH/IQbxM4hKV2e/1eOaQ3KIlNf
jAzH+ROmcvJ3JMfSW9ohmM57RWsGkWf101IoONUSjG7quR0VtK9Ag1Yn9PDr6XGs
cCdDKUx7t595bhB0MxvU3tK7hqrj2Dwpxd4rTb7GXrG9iQLMjm+qYQ==
=CM+2
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Yy6sxxX2_U8/m/x-jR2iiwux4J", "n_sections": 7}, {"thread": "bEj21d3QZKM", "msg": "db6Dnl87NYMJ", "author": "David Hopwood", "date_disp": "Nov 29, 2000, 3:00:00\u202fAM", "subject": "SRP - not good enough?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

John Savard wrote:
> In SRP, the host computer stores the values s and v, where v is a
> public key, derived from a private key calculated from a hash of s and
> the user's password.
>
> This means that a dictionary attack can be mounted on the password
> file, since for each password tried, one just performs two direct
> computations: hash s and P, then calculate a public key from a private
> key.

The design constraints for SRP-3 assume that the client stores no
persistent data. In that case, if the password file is compromised,
the attacker can simulate both sides of the protocol, and so nothing
could prevent it from being able to do a dictionary attack.

If you don't have the constraint that clients can store no persistent
data, then instead of having the server store the salt and sending it
in the protocol, have the client store it as a local secret [*]. The salt
should be random and of length suitable for a secret key. Then an
attacker has to compromise both client and server, in order to be able
to do a dictionary attack. This should work for other strong password
protocols, as well as SRP-3.

Another advantage of this is that if you calculate the verifier as
g^(H*(H(P) XOR salt)), where H is an ordinary hash and H* is the
computationally intensive hash, then a client can change its password
entirely locally, by setting salt := salt XOR H(oldP) XOR H(newP).
(It is still necessary to have some way of changing the server's
verifier, since that is the only way of recovering if a password is
compromised. However, the server doesn't need to know, or be able to
dictionary-attack, the client's password.)


[*] A particularly useful variant would be to store the salt on a
smart-card; in order to implement two-factor authentication. If
the smart-card is stolen and its secrets recovered, the attacker
still has to either guess the password on-line, or compromise the
server.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOiT81zkCAxeYt5gVAQEWXwf+NrY2FtfmRY9QPo0syC6XYs3c/Z+QXbm0
ezP4eKMzCkTpAWRzMoT9Nq0FACwhOQffI18yosNEGp5kE81TUA5MMY0tVnk0rufg
z44NXhFRw1AWG1oBsxiC6Y4GDV24yCIhn3OMN1f+q7Ug91+qcorvcAXBFU04PL41
4xQsh19c+yAeFKN+NkHKn7l8+AwLAAeI17PCVW5LkxmAG9tnKxk0YD7BjNBWFSBg
PK2FdPRIDEs0ZTnyGpv1IgUt+yVN2aWSzU1249LQmUu300V6xVyU50KCa4772KRf
o5UUzoq9mZSXBigadA+S7TZB9SgJ5OlfitwcDBcLKTNwcPN1lqIRdA==
=cbGW
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/bEj21d3QZKM/m/db6Dnl87NYMJ", "n_sections": 19}, {"thread": "bSxRjrBn3cs", "msg": "CM7zc5kIjNkJ", "author": "David Hopwood", "date_disp": "Nov 22, 2000, 3:00:00\u202fAM", "subject": "Mode of operation to maintain input size with block ciphers?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

obfus...@beta.freedom.net wrote:


> jsa...@fNrOeSePnAeMt.edmonton.ab.ca (John Savard) writes:
>
> > I understood ciphertext stealing to be a modification of ECB mode;
> > although the final encipherment could be in ECB mode while the regular
> > encipherment was in CBC mode or any other.
>

> No, CTS is a variant on CBC.

CTS can be used for either ECB or CBC mode (and almost any other
mode that works on blocks, such as PCBC).

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOhsOXzkCAxeYt5gVAQG+TAf/d7QRMIm17SLF5Z5d51aTti8c+wglM/7x
M2wz3PilfWkoVBH0Qvgh7we6sV35tI9T9vX/nnSgrIl8A//P3wJplYPcYsbGCNw4
JK1gL6kmWFyfFrLTwNLgkyOGN9NkoAq4UJkjnMiaX5itUArd1bodg/99oKP69FN0
bgX6UdgPF1qCDTV1+uPbB/8vQp2cNrzn49CbULFwmOr+JBe4hqy+Li6ABUp8W16H
wzZ4Rrg5Tgsoe3K7mp1uPDKju6GZgk1+JaB6ChSj9uhcWe9/NeiGwSPQV50zJ6n6
iHFFFJKj1EbjpRMi4Ju2z4hZhb6sE4lHyszNYklmU367R+9uLs+QEg==
=E0oE
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/bSxRjrBn3cs/m/CM7zc5kIjNkJ", "n_sections": 29}, {"thread": "bSxRjrBn3cs", "msg": "3X_L359yr4EJ", "author": "David Hopwood", "date_disp": "Nov 23, 2000, 11:48:24\u202fPM", "subject": "Mode of operation to maintain input size with block ciphers?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

obfus...@beta.freedom.net wrote:
> David Hopwood <hop...@zetnet.co.uk> writes:
> > obfus...@beta.freedom.net wrote:
> > > No, CTS is a variant on CBC.
> >
> > CTS can be used for either ECB or CBC mode (and almost any other
> > mode that works on blocks, such as PCBC).
>
> In a way, you're right, although it's a matter of semantics.
>
> CTS encryption is expressed especially simply in terms of CBC:
>
> Pad the last block with zeros, then encrypt the whole thing with CBC
> as usual. Swap the last two blocks, and truncate the new last one.
>

> To do CTS with ECB, you'd encrypt the message as usual, except for the
> last block, where you encrypt the XOR of the plaintext with the
> previous block's ciphertext. Then swap and truncate the last two
> ciphertext blocks.

The only references I've been able to get hold of for CTS are Applied
Cryptography and RFC 2040, both of which only define ciphertext
stealing in CBC mode. However, the additional XOR is not necessary
to make decryption work, so the most obvious way of doing ciphertext
stealing in ECB mode is:

<pre>
P_{n-1} P_n || C'
| |
v v
E_K E_K
| |
v v
C_n || C' C_{n-1}
</pre>

This is fairly academic because there are very few cases where ECB
mode can be safely used, with or without ciphertext stealing.

For PCBC mode, you *could* do this, in order to stick as closely as
possible to the definition of standard PCBC:

<pre>
P_{n-2} P_{n-1} P_n || phi
|----. |----. |
| | | trunc |
v v v v v
-->XOR XOR--->XOR XOR--->XOR
| ^ | ^ |
v | v | v
E_K | E_K | E_K
|----' |----' |
v v v
C_{n-2} C_n || C' C_{n-1}
</pre>

where length(P_n) = length(C_n) as usual, and trunc takes the first
length(P_n) bits of P_{n-1}.

I.e. in general, you can apply ciphertext stealing to any block feedback
mode as long as the feedback does not prevent recovering C'.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOh2e2zkCAxeYt5gVAQFDEAf8CGLL685IOfxtkKrOKe6KwnxiFvEBjxyp
ISzuDPhycewvtMhGidhJwQsrLCNONiGCdCpp5T7rJRNgtSoakX9GSSs5iO3NwK5I
ST2szzVEJ135DVt22z84T++XyZB+zYyi27SvugqJJnOl/gPhu8M7rF65fTNrtHLL
x09xJfSCLPT9VWddXD5S+iML67gqE7GclNMOGb7Om1I6qtKEBB7OIR32+1imh3YF
UaPFjgLMzG0Lm46K+qu451/DgCMSvFPvzmFi4pMKE0c7INcvhwVt+KdbLkbLMQyx
kebc1vIRnzjVJaOJBivTVk6tqWgiMNLcIYhGR3X1klc5O7jN9aepeQ==
=jHtD
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/bSxRjrBn3cs/m/3X_L359yr4EJ", "n_sections": 29}, {"thread": "crOko6-WN4g", "msg": "BPiinEUB1H4J", "author": "David Hopwood", "date_disp": "Nov 11, 2000, 12:57:22\u202fAM", "subject": "Why remote electronic voting is a bad idea (was voting through pgp)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

binary digit wrote:
> Imagine if everyone had pgp in the world and voted through pgp, every

> single vote could be verified and everyone would be happy,

Problems with remote electronic voting systems (in no particular order):

1. obtaining voter anonymity *and* adequate authentication,
2. vote buying and coercion,
3. authenticating computers and not individual voters is not sufficient,
4. targetted denial of service,
5. verifiability of software and hardware,
6. some voters may have problems with electronic interfaces that they
would not have with paper ballots,
7. attacks against insecure end-points (both voters' PCs, and servers),
8. there is arguably more scope for *undetectable* corruption than in
a paper-based system,
9. existing weaknesses in paper-based systems [*1] are magnified if
voting is remote and anonymous, because it is easier to get away
with attacks,
10. bias due to poorer social groups having less access to computers.

It might be possible to address 1, 2, and possibly 3 by a cryptographic
protocol, and 6 by careful interface design [*2], but I don't see the
other problems being solved any time soon, if they are solvable at all.
4 is particularly tricky - when people have the option not to vote [*3],
how do you distinguish a non-vote from a denial of service attack?
It can't be done with cryptography. 10 is also a very serious problem,
and since this effect is very difficult to quantify, it might undermine
confidence in the validity of the election.


[*1] For the U.S., I understand that a particular problem is the
accuracy of electoral rolls - both people who are registered more
than once, and a large proportion of the population who are not
registered.

[*2] PGP is not a particularly good example of the kind of interface
needed; it is far too complicated. There is a paper called
"Why Johnny can't encrypt" that describes some usability experiments
on PGP 5.x, with rather depressing conclusions (I can't find an
exact reference right now, but try a search engine).

[*3] Although an obvious approach is to require every registered voter
to cast a vote, which may be "no vote", I don't think that would
be either practical or, in many countries, politically tenable.

> and there wouldnt be this problem that is going on now in florida

Any remote electronic voting system would have to run in parallel
with the existing system. It is a general rule that you can't make a
system more secure by adding more options, because an attacker
will just target the weakest part of the system. You also can't make
a system more robust, even against accidental foul-ups, by adding
more options, because it is the least robust parts that will usually
go wrong. There are exceptions to these rules, but they are very rare.

Electronic systems in voting booths have fewer problems, although
they are still subject to problems 5 and 6. Note that a poorly designed
interface of an electronic voting machine is the source of some of
the controversy in the Florida election (and there were apparently
complaints about the interface from voters on the day, so it's not
just after-the-fact whinging).

There is some more discussion of this in the latest issue of RISKS
(archived at http://catless.ncl.ac.uk/Risks/21.11.html). I particularly
liked Lauren Weinstein's "Hacking the Vote" article.


[With reference to Florida, I was astonished that postal votes are
counted much later than the rest of the vote, and that both the media
and politicians are happy to declare "final" results before those
votes have even been counted. I don't want to get too far into
off-topic politics, but that's no way to run an election. ISTM that
the U.S. needs to put its paper-based voting procedures in order before
making any further attempts to introduce electronic systems.]

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOgzfUDkCAxeYt5gVAQF7swf/feeG0SYTLRtoSuboOx/gq7ygLQn2K188
ShH/TR4PMqReS1p6ZWFkn/lXYT8kM/obNKxnNDrzFO+JabYHBgzRXkD5gmounyBQ
ARl/+mGcBxlDmIQuXlnj1hVXl9/cdr/g7fWIexvgqhWj7Hb7MTgdMsY0IUmW+neS
P/H2XF1hR1gs+3ZBiWyJz+Ax1FKMI+l5M+pQBurHRlHkfwdjLE+IMK1UzFeMdVcx
ZFmHxgMDW87QwpuilRgfOi0RqOy2PYmMNwmfiXnPyZozTV2eJfXCRqgNOjcLxVxo
qeF2xd/c4/9P1rbVniszt2L4KXHMC+9kCrZdtiYxPBb8R3n3lBfWsw==
=Pfg1
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/crOko6-WN4g/m/BPiinEUB1H4J", "n_sections": 90}, {"thread": "ejub7VW6F5s", "msg": "mQTcLFJ054gJ", "author": "Kat Hopwood", "date_disp": "Nov 26, 2000, 3:00:00\u202fAM", "subject": "hash-breaking question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

vesp...@my-deja.com wrote:
> I have a question regarding the security of cryptographic hash
> functions such as SHA-1.
>
> If I hash a secret value X and a known salt value Y with cryptographic
> hash algorithm H, and then I hash X and a known salt value Z with H,
> can the known values H(X|Y), Y, H(X|Z), and Z be used by an attacker to
> efficiently recover the secret value X?

If X has low entropy then it could be searched for by brute force.
Any other, more efficient method of obtaining X would imply a serious
weakness in the hash function.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOiB4hTkCAxeYt5gVAQGaRwgAlbztFVtWFljTSY5HW23pwoM8sHv8z37H
vQIs9A31F5CXcreBFyV1VnseVOO/AEa7yMOw9wfet6zMZdSd7e/HrYPKeqTUM45W
kwldq4vHSeXt9aAzOt9Jp/QpbFWRsSJN1EpOSyBujwtazdRgPf92Hc1km9Hj80l/
TTMbOyzXuHHepk/ycO5mDbbfra2FQ1Rm1/RJv6bHSxtxxB3OksmOxHNLUORpI9uq
X5s4AALYMKJJu/sHGffPR/UAGWHrzsBKgiY6fDxk/6eWZnx4HRZ4S6sZuXaNDimS
8kogBewFejAmwF7W+NmaJvUbxmPxWqrKd4OiuhqOJN/RhuybiYmGEQ==
=HBiJ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ejub7VW6F5s/m/mQTcLFJ054gJ", "n_sections": 4}, {"thread": "ertbjEEWlqU", "msg": "7AMPwUMO1W4J", "author": "David Hopwood", "date_disp": "Dec 27, 2000, 2:24:58\u202fAM", "subject": "Foolproof Quantum Cryptography", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Dido Sevilla wrote:
> IIRC, the ion trap
> team was only able to produce two qubits, while the bulk spin resonance
> team four, meaning that the largest number that they can try factoring
> using Shor's algorithm is only 15!

Shor's algorithm requires *at least* four times as many qubits as the number
of bits in the number, plus some working space, plus qubits used for error
correction.

Source: sections 3.4 and 3.5 of

Arthur O. Pittenger,
"An Introduction to Quantum Computing Algorithms,"
Berkh\u00e4user, 1999.
ISBN 0-8176-4127-0

(note in section 3.5 that n ~ lg(N^2), and two n-qubit registers are
used, which is at least 4lg(N) qubits excluding error correction).

So "the largest number that they can try factoring using Shor's algorithm
is only 1!" However, I do believe another team has since reached 7 qubits,
which means it might soon be possible to factor the number 2 (except that
Shor's algorithm only works for odd moduli, darn it :-)

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOkmZCjkCAxeYt5gVAQG/RAf9GW0+zheohevTWgNWPvxoMRlzz4YN/GPi
cstEh+6qKz/9dqFgFKG+v5Xwa+O9HKMINPlon9YK5OSkQ+z6tZBH6SizlDpBxfxx
KbjZ62zCAZiuNrj8MVgvbQVfJn/CmZulYygT/io5AyuBo87DRMUhNsYsluJytfWt
rhod9BlPmH1b1lgs2cUb1LnJzoftTmalSG/RT44Xhj6jXjBYE63YBZ+t6sBuFgf2
KxYstjyuq61Ykz5E5PLmU+uzIPVqMoUfYT1FH57bwKUgNToepxKvQxEPusv2Ej4n
odKad4kPTSEHA2+LxUpJoukH8PWKyT3c2W9ZjGc0TprcrNPxKRp7tg==
=fxES
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/ertbjEEWlqU/m/7AMPwUMO1W4J", "n_sections": 24}, {"thread": "ertbjEEWlqU", "msg": "2aDE-I8YwN8J", "author": "David Hopwood", "date_disp": "Dec 27, 2000, 2:35:01\u202fAM", "subject": "Foolproof Quantum Cryptography", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Steve Portly wrote:


> Simon Jenkins wrote:
> > Just to sidetrack a bit on quantum cryptography (of which I am no
> > expert), it seems to me that, if I wanted to stop anybody using it, I
> > would just intercept all their messages. They would be aware the messages
> > had been intercepted because (I think) the photon states would have
> > changed and the message they received with therefore be garbage, forcing
> > them to use a more accessible system.
> >
> > Or maybe I'm wrong.
>
> A denial of service attack would be practical in most cases however one of
> the articles mentioned the primary use would be for rekeying satellites.

... which is a silly idea, because if you are using quantum crypto just
for rekeying conventional (symmetric or public key) algorithms, you might
as well use conventional methods for the rekeying step as well. It
will be no less secure, and may well be more secure because you are
relying only on cryptographic assumptions, rather than cryptographic
assumptions *and* physical assumptions about the lack of side channels
or other flaws in the quantum transmitters/receivers.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOkmbmjkCAxeYt5gVAQHYuQgAkLi4YZYf4J/dnYicY+ovJmiSB4vWzVNO
jgoOcAoaX/LePy1xtVgSeixgS6ECZxbk/0CjP+PPYQZ0AcCKubixVHRUCjbTjoOf
uZUyZFqr3oE+cZ+i6dYyUp3X2XmEeFB4v7IkJiFvnSkY9Ib/j2TJBGKjrXv00BF5
S2LNIOkuQPhF1azNQZyjoB499rJ9wn5l4NLKShaMv6zNFILO9GxhxA1Asm2w5CTV
7OywBTsWunaJjuhSQi4PZ3/yXgv2q9fwCPf5LIkiu1q8OYA37Gm0JNJGpVOObYmt
F43tTFE73wsFnKfDVULAYSOAU3C1kIA7Ipj3lJW/bGwT/QYNnfijrw==
=aoQt
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/ertbjEEWlqU/m/2aDE-I8YwN8J", "n_sections": 24}, {"thread": "ertbjEEWlqU", "msg": "edfTLUDXHxQJ", "author": "David Hopwood", "date_disp": "Dec 31, 2000, 10:43:33\u202fAM", "subject": "Foolproof Quantum Cryptography", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Hopwood wrote:
> Dido Sevilla wrote:
> > IIRC, the ion trap
> > team was only able to produce two qubits, while the bulk spin resonance
> > team four, meaning that the largest number that they can try factoring
> > using Shor's algorithm is only 15!
>

> Shor's [original] algorithm requires *at least* four times as many qubits


> as the number of bits in the number, plus some working space, plus qubits
> used for error correction.

... although this can apparently be improved to just over twice as many
qubits as bits in the number (plus working space & error correction):

John-Pierre Seifert,
"Using fewer Qubits in Shor's Factorization Algorithm via
Simultaneous Diophantine Approximation,"
http://eprint.iacr.org/2000/036/

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOk9PzzkCAxeYt5gVAQHk4ggAg11/6gcw0kLFru32nMUHeBAR1mPyrfoS
egp5LPUsQ1gzhqLaGS/M/HCC36oueq8JajQ3plBLQzLX+yxr0kMNrBKrpZSoGgwB
1T3RjfEMufMexAouZfoQfSTpw0nXVVc6fvv32i8BuEKTxOTXeOn8q+u6HrNmiMkZ
qNgUNF+0EQWF8+5f4TmY9sqCGmEpEEeOizNz2eAAdmFYFDIIHMN1eJyiGEFooX+i
4xEkwAw6lepI6xQJj66AKX/R/r9xD8v2joSTlTFTIzHDxO70oLguOcNfTG8Cz94J
QMHcK68ZS76DotZg5INQwyZqz4MrnIerWxwNDEKbyb5RWdrsoxFHgg==
=ViMj
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ertbjEEWlqU/m/edfTLUDXHxQJ", "n_sections": 24}, {"thread": "gW3DAJRipwU", "msg": "my_xsqoVzY4J", "author": "David Hopwood", "date_disp": "Dec 16, 2000, 3:00:46\u202fAM", "subject": "Protocol for computer go", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Rubin wrote:
> David Eppstein <epps...@ics.uci.edu> writes:
> > Here's a strawman protocol:
> > after each move, the game program reports how many instructions
> > it used (or whatever other information is necessary). To verify
> > that the program was not cheating, you run it for that many
> > instructions and test that it produces the same answer.
>
> How can the program tell how many instructions it's used?

Use an instrumenting compiler that, at the end of each basic block,
inserts code to add the number of instructions in that block to a
per-thread counter.

[A basic block is a sequence of machine instructions that does not
include any branches.]

However, I don't think this is sufficient to solve the problem when
game algorithms are in any way nondeterministic. For example, if an
algorithm produces different results depending on nondeterminism of
memory accesses on an SMP machine, you would have to give the replay
program a transcript that at least includes accesses to any memory
locations that are shared between threads running on different
processors. If that can affect which move is chosen (and it would be
fairly easy to ensure that it always can), then the transcript can
be cooked to duplicate any cheating.


Here is a suggested alternative protocol. Assume that it is possible
to publish a message so that all participants will see it, and there
will be no disagreement later as to what messages were published.

1. Each player starts by publishing a collision-resistant hash of
their replay program. The replay program may have a random seed
embedded in it.

2. For each move, the current player publishes its move, and then
someone (it doesn't really matter who) publishes a timestamp,
which is the elapsed time since the start of the game. Both
players and any observers check that this timestamp is
approximately correct.
A player's move is required to be a deterministic function (which
is calculated by the replay program) of all previous moves and
their timestamps.

3. If there is a dispute after the game, the players send their
replay programs to a referee, who checks the hashes, and then
runs the programs in an environment that cannot communicate with
the outside world, to check that they give the same results as
the actual game.

Note that this protocol does not require the referee to be trusted,
because step 3 can be repeated with a different referee if there is
still a dispute. It also does not require the players to share their
replay programs with anyone except the referee(s).

Obviously the requirement that algorithms be deterministic could
reduce efficiency, and make the software more difficult to write.
OTOH, it is still possible to use nondeterministic hardware, as long
as any such nondeterminism is not allowed to affect the output.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOjsPvzkCAxeYt5gVAQE0RAf7Bqc7Ig1PeObfRQ7/dcmx+//+/CrVinMk
FeBERwOChOoWtjACgb5zt2gickLQaYLc7W4E995Ile/DyZv0Y609J1VD8PDxZ7AV
4JYO6N7d7zqXaenMNa16IuotqgJ+OJZ+yWQqRzHegSorHjnPfQP9A5FiRFXCajqZ
RV9wJuK3mqa4B465pI5VSsg9RGWyp3Ro/WOA5PyqTNMthaK2bdWFFlUs+icOGLNg
1EQ5SfqAsbFLJNPOjb689i4ar8E3+2aNIXLVimL77b2GxE8YoVmBporn+OeRJPA0
Hn3e6z/6vxJ+TMZiBCcDqZ3FyUrAB9Nr00bisbJvX0fQEGGe36Ad/w==
=WJPw
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/gW3DAJRipwU/m/my_xsqoVzY4J", "n_sections": 57}, {"thread": "gW3DAJRipwU", "msg": "Fkah6FMQOa0J", "author": "David Hopwood", "date_disp": "Dec 19, 2000, 6:27:28\u202fPM", "subject": "Protocol for computer go", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Francois Grieu wrote:
> hop...@zetnet.co.uk wrote :
> > 2. For each move, the current player publishes its move, and then
> > someone (it doesn't really matter who) publishes a timestamp,
> > which is the elapsed time since the start of the game. Both
> > players and any observers check that this timestamp is
> > approximately correct.
> > A player's move is required to be a deterministic function (which
> > is calculated by the replay program) of all previous moves and
> > their timestamps.
>
> At least one change is needed:
> A player's move is required to be a deterministic function
> (which is calculated by the replay program) of some previous
> moves and timestamps, as follow:
> let T(j) be the timestamp for the jth half-move in the game,

> with first with half-move 1. Replay program shall be [fed]


> with T(j+1)-T(j) for odd j if it moves first, for even j
> if it moves second. This information should be made
> available to the replay program by the referee, after the
> replay program has announced half-move j, together with the
> opponent's half move j+1.
>
> Without such precaution, a human can influence the speed of the
> play program and easily pass information to the replay program.

Good point - the time taken by a player's previous moves acts
as a covert channel. Having the referee choose and publish the
timestamp would reduce the bandwidth of this channel, but not
eliminate it (and so is not sufficient). I think your proposed
solution is reasonable, with the modification I suggest below.

> Great care should be taken by the referee that no extra bit of
> information can reach the replay program: moves and delta of
> timestamps shall be in an unambiguous format. Since the programmer
> can probably choose the moment of the replay to some extend, the
> replay program shall not be allowed to know this information, nor
> the date/time information for the (hash-protected content) zip
> file the replay program came from, and a fortiori not the log
> file.

That's an interesting point that applies more generally; idealised
descriptions of protocols rarely model anything about messages
other than their contents and ordering. It's fortunate that
most cryptographic protocols don't depend on eliminating side
channels!

> It should be stressed that even a single bit of side channel
> (like and attack/defend hint in the midgame) is of considerable
> practical value.
>
> Even with all these precautions, the timestamps still leave some
> room for side channel: for example if the adversary makes good
> use of the program's thinking time, T(j+1)-T(j) [known to the
> replay program] tends to be low when T(j)-T(j-1) [chosen easily
> by a human] is high.

Making sure that T(j)-T(j-1) is a deterministic function of the
previous moves, and the time that the opponent took to make its
moves, should fix this.

> I think this side channel could be closed by requiring the replay
> program not only to tell its move, but also when in the log it
> must be. That is, the replay program should announce the value
> T(j)-T(j-1) together with half-move j.

Yes, that's the same conclusion I reached. More precisely, both
the play and replay programs should output T(j)-T(j-1) as an
estimated time, which must be larger than the actual time taken for
that player to send (move(j), T(j)-T(j-1)) to the referee. If the
player is not able to make its move within the time estimate, it
is deemed to have cheated, and loses the game. If it publishes
the move before time, the opponent's clock does not start until
time T(j). This gives the opponent extra thinking time on the
current player's clock, and therefore there is an incentive to
make the estimates as close as possible.

> Then there is the issue of precision. What if the replay program
> is off-by-one ?

I think this is solved by the method above. It is quite easy to
compute the time taken by the algorithm if it can be a slight
overestimate (e.g. using the instrumented compiler approach I
suggested earlier).

> Another potential side channel is with with network tricks to
> infuence the timestamps slightly (say making T(j+1)-T(j)
> even or odd).

Influencing the length of time the opponent's move takes to be
published, you mean? Probably the two players should be on separate
(physically isolated) networks.

> Maybe the sad the conclusion is that the single most practical

> thing is to disallow program to be influenced by time at all.

No, I think we've pretty much solved this now, unless anyone can
find another attack.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOj8UWTkCAxeYt5gVAQFdeAgAqwbUAiLSYJV1lYSW+3uhMaLQ1UnhAYaC
gsYRgYY8wmwgGFW/+OuU8pmoTKJkARt1mH0kFj97VpfyDwdhmwUxPL0HGwQOoXFb
3G3A9lk6MDTsrh54LQEVcMrqzDexYhz2+xMNBYjhGohSCBdpGihbNjKSRtEIDeEp
i29inlNDKkknC/4zzPaq/BdqQRTA1u5OYL5FxMzD+b05JSbHDoOWC3Lno9iy1Vsd
3BYiNL9+q5+TG7y2taemy/nkYuoWzugasep/DUdj2d8sbnTfP8qmDgsbUKAwDlni
m6Ro4+ByWPVwAgiXzCQ5w1b82Bp6ZdLbyqS8hft5eY3EjwzznrqE+A==
=ewP9
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/gW3DAJRipwU/m/Fkah6FMQOa0J", "n_sections": 57}, {"thread": "jnpZbqG-aQE", "msg": "qJEXDbsKGpQJ", "author": "David Hopwood", "date_disp": "Nov 29, 2000, 1:28:23\u202fAM", "subject": "collision probability with file checksums", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Ed L Cashin wrote:
> David Schwartz <dav...@webmaster.com> writes:
> > Ask a few cryptography experts to predict in what year they
> > think the first SHA1 collision will be found. I predict the first
> > SHA1 collision might be found by massive distributed search
> > techniques around 2080.

It would be a very brave expert who would predict that no weaknesses
will be found in SHA-1 up to 2080.

> The reference you cite above notes that Van Oorschot and Wiener


> thought that in 1994 a ten-million-dollar, specially designed, machine
> could produce an MD5 collision in 24 days. I guess they were off in
> their guess or we'd have seen some collisions by now.

That estimate doesn't sound too far off to me. However, the public
cryptographic community doesn't have $10m (or whatever that would have
come down to now) to spend to prove a point.

(It *does* have $250,000 to spend to prove a point, c.f. Deep Crack -
especially if making the point has political value. As well as being
too expensive, finding a collision in a 128-bit hash doesn't have any
political value, because governments aren't putting pressure on anyone
to use short cryptographic hashes.)

Note that, assuming no weaknesses in SHA-1, finding a 2nd pre-image
(which is what is required to find a file that matches an expected hash,
as the original poster asked), requires 2^159 expected work, not ~2^80.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOiSh3jkCAxeYt5gVAQETtwf+Ld3l/tSzwTt6eJU/hUWUBypDQsOfDrWa
1vQBwpwGtOnWz7de44p3sasihsk+zVyEq5gTslRqR9oy6NzG/HTZkuisW2agimcV
DW8qQx3clgxG3kGqVhRSsIptzUSNe2FzMo6IGHxj/z7r/364VKyaR8wDu2I0Aj9G
ARzWipy3AzmBpF/mE8LuGM2ocPefKCRub992CFDt3ziorxmgF4FIfYMRwXGhC/LV
5KRMiKrN09uCMs9xJZv2bE0aJUni1Isd6hXUuHmHlis3ke5A494GWWnhlrBJxgAm
LuCxKLdoJSBlbQ57jjwSWuEDGorZ5ZRc909mMJSF/JOmvXQavS1fvw==
=VicQ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/jnpZbqG-aQE/m/qJEXDbsKGpQJ", "n_sections": 41}, {"thread": "jnpZbqG-aQE", "msg": "C72Xb7cJVVQJ", "author": "David Hopwood", "date_disp": "Nov 29, 2000, 1:31:49\u202fAM", "subject": "collision probability with file checksums", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Ed L Cashin wrote:
> Hello. A file integrity verification product like tripwire uses
> different algorithms to compute checksums for files. By comparing the
> checksums of a file with known state to the current file's checksums,
> it's possible to find out whether the file contents have been
> modified.
>
> If the system uses just one 160-bit algorithm, say SHA-1, for doing
> the checksums, then what are the chances that an intruder could make a
> malicious file that has the same checksum as the file's known-state
> checksum?

Negligable; an attacker wouldn't even consider trying to do that.
He/she might consider modifying the operating system kernel so that
tripwire reads the file contents it expects, though (or other methods
of achieving the same effect).

Unless you do a hardware reboot from read-only media containing a
trusted copy of the operating system each time you want to verify the
checksums, and have some way of making sure you are checking against
the right checksums, it is impossible to completely prevent such attacks
(assuming that the attacker is able to completely subvert the OS, rather
than only unprivileged user accounts).

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOiSiuTkCAxeYt5gVAQH7FAf/RFzVGh1H21G/XeCY5n1sWuAAjetkuT1i
T+OHtR2Y4CjH7y8SMk0d/KxVdjZDs7V9M9fkY/6j/EajdCQwSXbpFSnW5OZsiLIN
Gi/D6MRtqw75Byewmt/ruANW99l6GIoOLuBxp1kwwpV1LAMwZGGO6wzv56u9xY4t
uRDkzr0Pj5S/yRVWfbuNBMOPFWrDVP5A5crY9obz+dxxZ8aEqb2itkNdoIOa/zif
ngQIyEd07jnrmy5OKw47cHAxRAi8UU54i2VQkUraPrfkLOHTPz4OCuyNdC3lpoA3
8EAuACq/YIwWDHN9cztYiQ0IIVVSyvn3LfPu05DqvN9NlAkNlN3UAg==
=TlaM
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/jnpZbqG-aQE/m/C72Xb7cJVVQJ", "n_sections": 41}, {"thread": "jnpZbqG-aQE", "msg": "FT3py3naAu0J", "author": "David Hopwood", "date_disp": "Dec 2, 2000, 8:46:21\u202fPM", "subject": "collision probability with file checksums", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Ed L Cashin wrote:
> The whole issue, though, once again begs the question: is it any
> harder to find a collision pair (birthday attack with 2^(n/2)

> difficulty) when one of the files must do something useful? Or is it
> just as easy, since you make the malicious part of the file and then
> manipulate the checksum by changing some meaningless padding in the
> file?

For a generic birthday attack it is just as easy, for the reason you
suggest (assuming that the file format allows for padding, which it
almost certainly will do).

For an attack that exploits a flaw in the hash function, there is no
guarantee that it will be as easy, but in practice it probably will be.
This is especially true for Merkle-D\u00e5mgard hashes (i.e. almost all hashes
in common use), where the attack exploits a flaw in the compression
function.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOilZYTkCAxeYt5gVAQHtHAgAxQm6FlOHc/eSfN73Z9bd6FEXjcMIgZiW
OkY7jCp2Hq+E9uWBNbP6JllmoeKGBjqM2GYRpQ341imbB+rcQQWEkhWlh0cvfMWt
ooZ80cBOHTPUF/s4aQVZ/4iyGz84icaSVx+9AjpuuXxZFi3fpiMmJmp2wdTkpOmr
L/OLUqQyQsyU4I1tI/krlu+mwM4IOWNH0xWwv2EEw1TS6zCxHCz9BVnSEtWr5Iwt
dvS2BZbNM4g5YGL8PLwTEmz9Q4T4fk+zZFETEQLcOIbz2ahcGiiIgbrBjuaVTkW7
vCXCicoPxYsTaMC4Tiyvl09CVps/30LM/4dh25zSDF2aXzHnTU3feA==
=2jOB
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/jnpZbqG-aQE/m/FT3py3naAu0J", "n_sections": 41}, {"thread": "mTlHT6ZlSew", "msg": "CP6UCv8JuRsJ", "author": "David Hopwood", "date_disp": "Nov 4, 2000, 3:00:00\u202fAM", "subject": "Rijndael question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Manuel Pancorbo wrote:
> On Rijndael doc especifications is pointed out that decryption is somewhat
> slower than encryption, above all in 8-bit enviroments.

[...]


> So I wonder if the server machine could use the "decryption" algorithm as
> encrypter and thus the client machine should use the "encryption" algorithm
> as decrypter, in order to compensate both working speeds.

Yes, this will work fine, and any attack on that usage would also be an
attack on some applications of Rijndael as a pseudo-random permutation,
so you can assume that people will be analysing it for such weaknesses.

Alternatively you could use CFB mode, for example (see Applied Cryptography,
2nd edition or Handbook of Applied Cryptography), in which case only the
encryption direction of the block cipher is needed.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOgOWiDkCAxeYt5gVAQEg2QgAw9R6/y0fjSE6J6O+nrJgrVYBtJSolraW
wnqqbGJnNiJTmAhawbvhF8W1WczLsXgcWvndEf8Nz96KVafft4waajyCZKyfMAgU
orAYRkV5pbEwRVyfIaUAeEpIo1rwOiFdDDtrBP1qSIBUhnSHZRIzFaP13bpVpQb+
boDS73wTIvfOlL9bxsB3AS4zbRGd5zK3ur6CXHa5f8TDiScW2nRSkgrwg2PgFgov
FyoC2ms015TJrzR53+Ic7AShtHZnd5+nxyejSe4isefNYMtAxtDBE428m482BSCn
LXOnxwRHmJEMJRp1rReEgGSt3ZGrnClgeXGMfJ4D+Tgz2976BohG5A==
=YPcH
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/mTlHT6ZlSew/m/CP6UCv8JuRsJ", "n_sections": 8}, {"thread": "nF3eAhvS39g", "msg": "MRdRq6mJc1kJ", "author": "David Hopwood", "date_disp": "Nov 18, 2000, 7:31:09\u202fPM", "subject": "Cryptogram Newsletter is off the wall?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Matt Timmermans wrote:
> And even if your software is "trusted", i.e., it contains no bugs and no
> code that was written with evil intent, and even if nobody steals your key
> or signs anything you don't want signed, digital signitures are still not
> semantically reliable.
>
> Let's say I send you a message and it's signed with my private key. What

> does that signature mean? Perhaps you take it to mean that I agree to all


> the terms and conditions in the message,

Hence the "Nothing in this message is intended to be legally binding."
in my .sig :-)

> but perhaps I only meant to assure you that the message originated with me.

For an example of exactly this attack on Microsoft's Authenticode, see

"A Comparison between Java and ActiveX Security,"
http://www.users.zetnet.co.uk/hopwood/papers/compsec97.html

(in particular the IntraApp example, but many of the other problems
described in that paper could also be classified as semantic attacks).


Although the paper was written in 1997, all of the avenues of attack
against both Java and ActiveX are still valid. Many examples of insecure
ActiveX controls have been found, some of which are signed by Microsoft
or installed by default in software bundled by OEMs. For Java, I haven't
checked recently whether injecting unsigned classes into a signed JAR file
still works, but I think it does. The incidence of *reported* security
bugs in Java implementations has apparently gone down, but I think that
is an illusion caused by the fact that only a very small number of people
were working on finding and publicising bugs (most were found by me or
the Secure Internet Programming group at Princeton; I've not been working
on that recently, and I don't think the SIP group has either).

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOhcfAzkCAxeYt5gVAQHYqQf/fsrxpAck9kXzrOS2tlW7s4xGf+nqVwY+
sJAOND849rSxYq9GJTtY5D6jSGUi9qUr/6ORkzgCw8XOrX4hhYoP9tSiOjG3IhgC
qXw3yCD9hWbBHKBlD5aX/h1fF4tCHil+LzRgFNpk0Nw5995lTT5YQosQDJXYgYXo
H8pA1Op2eG01K1ibcR/ZhWJP5OtZA1XgpgODxWP/rrVIFgPZYq2ZuARW9aRCQRfF
XrNdi4S5FxNvWEkdjRABArjkGmOp/7Rege9OTpJsLlmzoqLNkidYaADdXFDcqxHh
zXEpspHB+kORyZhsGRijvDCml5H+UmE6lMEIqZIRh+5J4SG3KxBySw==
=4atg
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/nF3eAhvS39g/m/MRdRq6mJc1kJ", "n_sections": 60}, {"thread": "qGDbUHTvkIg", "msg": "CVnI4RGNGN0J", "author": "David Hopwood", "date_disp": "Nov 18, 2000, 3:00:00\u202fAM", "subject": "Finite fields (was Q: fast block ciphers)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

A proof of this is given at
<http://www-math.cudenver.edu/~wcherowi/courses/finflds.html>,
incidentally.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOhcF5DkCAxeYt5gVAQHa4Af+L+FoDA/krh8xYbWlC3M8AFJyD0Z+u9VY
zVfUm/NNx+2NNZOJnkEKhYhbDIW5UdQIZj6cJY8gvV0EggM60BECDuVE1ag/iI1L
ljyRnc/hyyn8wLjfQ605fwnEh3R783P/GfrwSrKTI0LmbHd/Lu3jl8bNpQVJgTqI
G1EHxvegxkVBbfNnemupf9DPM3zduSnZ+in9frZoIWniREZRwKo3qS85UAdkmFGp
wk6WtP/ZBOldBCykmq+CPcBu3sPP4TNKn5KB3bGJuVxiWxKTbmKBYyWEO3UYyLm8
2j999kW09J3uJkdKnzTJ0er25s44CDocOC0poRjobDQTRC2Qa1SeFw==
=c0uL
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/qGDbUHTvkIg/m/CVnI4RGNGN0J", "n_sections": 42}, {"thread": "qJ7LpDp5Yeg", "msg": "wpnQOhy1q50J", "author": "David Hopwood", "date_disp": "Dec 22, 2000, 10:11:00\u202fPM", "subject": "Q: Result of an old thread?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Goldberg wrote:
> Offhand, does anyone know if this key-exchange method can be turned into
> a public key encryption system?

This particular scheme is insecure. However, any secure key agreement
scheme can be efficiently turned into an IND-CCA2-secure public key
encryption scheme, using the same construction that is used by DHAES:

Michel Abdalla, Mihir Bellare, Phillip Rogaway,
DHAES: An Encryption Scheme Based on the Diffie-Hellman Problem,
Contribution to IEEE P1363a,
Updated version, March 1999.
http://grouper.ieee.org/groups/1363/P1363a/Encryption.html#ABR

This also assumes the availability of a symmetric cipher, a MAC, and a
hash function that does not interact badly with the key agreement
primitive (in practice commonly used hash functions will not interact
badly).

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOkQWwzkCAxeYt5gVAQFh7AgAyOjR8BauQyZAuNWmU70jkPSsug3RC4vy
IimI3NIGwhW4AirsA32Uk8ZYfzuw1k8TZmwOdYFuK+wDXVfRl97CsUNfzHlx4PKL
yvKgDf7vPRvBmivYvXJ4KSNIauDWtaCLQLybXRMe4a6/TH/vdDxPRKHNbD/9cYu9
1gniShzHL7QUxdirE+ydtVpUUefN1PW2nZVQwgHmLy/BN5OG+PqeUTWQFLgkdroY
5o8OKupFG3O+Vvh+/Xvy2J77xeNYm7dbSeWxE0+vrK52ynqVE1lHo+6Yyq8nr7K6
BSISR2loQtEU8+Yv82rqRWbPvb3UTpTOfN0p0+l/8FYFkVW3zxML4w==
=VTw4
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/qJ7LpDp5Yeg/m/wpnQOhy1q50J", "n_sections": 89}, {"thread": "t1ZNOzWmMgI", "msg": "uH_ioLeqOSAJ", "author": "David Hopwood", "date_disp": "Dec 27, 2000, 3:43:44\u202fPM", "subject": "Possible AONT?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Goldberg wrote:
> This AONT idea is based very much on the recent thread about order 32
> irreducible GF(2)[x] polynomials.
>
> The security of this is depends on both a 32 bit keyed permutation
> generator, E,

What assumption are you making about E? (Actually it doesn't really
matter because the scheme has weaknesses even if E is a perfect PRP.)

> and a secure hash function, H.
>
> The transform is as follows:
> k = (hash output size) random bytes
> counter = 0
> repeat (filelength/4) times
> do {
> poly = E_k( counter )
> counter = counter + 1;
> } until( irreducible( poly ) );
> crcval = crc( file, poly );
> output( crcval );
> H.add( crcval );
> end repeat
> output( H.result() XOR k );
>
> Reversing the transform is done using CRT.
>
> Any comments?

It is obviously not secure according to the definition of a
computationally-secure AONT in [1] or [2]. Even the first word of
output gives a non-negligable amount of information about the file
(since there are less than 2^32 irreducible 32-bit polys, some
input files are impossible for a given output).


[Can I have a general whinge that people should not try to design
AONTs unless they understand what an AONT is, and in particular how
strict the definition of that term is? There have been several
instances of this recently on sci.crypt.]

[1] Victor Boyko,
"On All-or-Nothing Transforms and Password-Authenticated Key
Exchange Protocols,"
PhD Thesis, MIT, June 2000.
(should be somewhere at http://www.toc.lcs.mit.edu/~boyko/, but
that seems to be down at the moment)

[2] Yevgeniy Dodis,
"Exposure-Resilient Cryptography,"
PhD Thesis, MIT, August 2000.
http://www.toc.lcs.mit.edu/~yevgen/ps/phd-thesis.ps

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOkpUWDkCAxeYt5gVAQG7AAgAkhIfOVunss90C/cLQSoT80y8c6AVigl/
eMc/PsY20QpsZvl/oNvOqwkuxROFWzrjDRsFueKOkLXHGVJ3nekgqQivEMWq/SkF
nW7PJu0Ix0HCTqwdAONkzD0Uo3GhZMlDyMA37ADRQaJkcNZaanSy88evmjob0T5a
smriwa39MHLuy7nSP1ne5rvUpB+Be8W9Y+pdDh9XSKQXCRTq43H5cNdsgtydofNQ
Va6lclBpAkimSFVdbCzB9SeYUFx6v+rDEKqEz4k1y60+81RhA5Foj3zCsYFUpZUA
VkSULmf1gjt2p2Rn+i+Xq0Dic3D1W68e4vOVa6I3RG3EDYnfE+Tgpg==
=8972
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/t1ZNOzWmMgI/m/uH_ioLeqOSAJ", "n_sections": 10}, {"thread": "t1ZNOzWmMgI", "msg": "tcGw5N0dpawJ", "author": "David Hopwood", "date_disp": "Jan 1, 2001, 3:30:11\u202fPM", "subject": "Possible AONT?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Goldberg wrote:


> David Hopwood wrote:
> > Benjamin Goldberg wrote:
> > > This AONT idea is based very much on the recent thread about order
> > > 32 irreducible GF(2)[x] polynomials.
> > >
> > > The security of this is depends on both a 32 bit keyed permutation
> > > generator, E,
> >
> > What assumption are you making about E? (Actually it doesn't really
> > matter because the scheme has weaknesses even if E is a perfect PRP.)
>
> For the purposes of proof security (or lack thereof), I'm assuming E is
> a random oracle that takes sizeof(k) bits as input, and has as an output
> a permutation E_k, which is randomly selected from the just less than
> 2^27! permutations which have the irreducible polys in different orders.

OK, so you're assuming it is a PRP.

It takes at most that, yes (I haven't looked at whether there are any
short cuts). Isn't that sufficiently easy to declare the scheme broken?

> Although 2^27 is a very small amount of work, it *is* brute force that
> needs to be done. Suppose for an instant that someone could brute force
> 128 bits. Then, one could find out the contents of a file with OAEP
> that has any number of bytes missing -- just brute force the key to the
> stream cipher, and all the information becomes visible.
>
> With this system, it could easily be expanded to require near 2^128
> effort for brute force -- use bigger polynomials, and of course a bigger
> permutation generator.

Well of course it can be fixed if you use a secure stream cipher, but
the point is that you didn't use a secure stream cipher.

If the CRC is replaced by a stream cipher applied to the message, you
have exactly OAEP:
- let G be the stream cipher, and k its key
- let H be a secure hash as before.

Then the output is (M XOR G(k)) || (k XOR H(M XOR G(k))), which
is the same as OAEP. However, the CRC-based method is not even close
to approximating a random oracle (and would still not be close if
the polynomial were larger, I think). It's also incredibly inefficient:
O(n^2) in the message length, rather than O(n).

> By the way, if OAEP is used with a smaller (say, 32 bit) hash and key,
> does it cease to be an AONT?

It ceases to be a secure AONT. The hash and seed sizes should each be
at least as large as a symmetric cipher key (128 bits or more).

Incidentally, there have been some recent papers on the security of
RSA-OAEP which are well worth reading:

Victor Shoup,
"OAEP Reconsidered,"
http://eprint.iacr.org/2000/060

Eiichiro Fujisaki, Tatsuaki Okamoto, David Pointcheval, Jacques Stern,
"RSA-OAEP is Still Alive!"
http://eprint.iacr.org/2000/061

[Brief summary: the proof of IND-CCA2 security for RSA-OAEP was wrong,
but can be fixed, albeit with a less tight reduction. Note that these
papers are talking about the version of OAEP that was originally
proposed rather than the one standardised in PKCS #1 v2, but I think
everything extends to the standardised version (someone should really
check that, though).]

These results don't have any bearing on the security of OAEP as an
AONT in the random oracle model, AFAICS. In fact Yevgeniy Dodis'
thesis shows that a slightly simpler construction than OAEP will
suffice for constructing an AONT. I.e. the properties of an AONT are
weaker than the properties required of an encoding method that turns
a trapdoor function into an IND-CCA2 encryption scheme.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOlAexjkCAxeYt5gVAQH3lwf+IUXDr2UFChrsQE7fkgHTCrTQIAKClK08
OWPjHFfhQ8ZV4FrvW6WNupInzNqw0xdddEndY4v1OZdSVDNX0Wf0KhNh7iH3UEYx
aj6dymHOOfkt60PY0mut4OOXJfXhqsPrF4N+zl1MsSabv64NpeTe4xU1kLcoJesX
236Jap6GH6tz7VJwERMTblqC3iGOM1cqeO3SYz3FE/zVcm5awGoSTIgr3fOf4NVT
KanKNu/gC4G6x3jhMafi8YoYoMbPZ5N4agdPdDIt6y1ZWo2OpgVQ6XGvxQakB5jr
ZmxkNJi7a75qGJ7K+eETZq2x5aoZGQRkXQn6zBGRNhz1KFoeg3AWMw==
=q/I/
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/t1ZNOzWmMgI/m/tcGw5N0dpawJ", "n_sections": 10}, {"thread": "vfFNoF9kxIs", "msg": "KwsUDsJ2Zi4J", "author": "David Hopwood", "date_disp": "Dec 27, 2000, 9:00:13\u202fPM", "subject": "\"Content Protection for Recordable Media\"", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

This has to be stamped on at least as hard as the PIII processor ID
was (it is actually a *much* more disruptive and dangerous misfeature).

http://www.theregister.co.uk/content/2/15620.html

Stealth plan puts copy protection into every hard drive
By: Andrew Orlowski in San Francisco
Posted: 20/12/2000 at 18:54 GMT

Hastening a rapid demise for the free copying of digital media, the next
generation of hard disks is likely to come with copyright protection
countermeasures built in.

Technical committees of NCTIS, the ANSI-blessed standards body, have been
discussing the incorporation of content protection currently used for
removable media into industry-standard ATA drives, using proprietary
technology originating from the 4C Entity. They're the people who brought
you CSS2: IBM, Toshiba Intel and Matsushita.

The scheme envisaged brands each drive with a unique identifier at
manufacturing time.

The proposals are already at an advanced stage: three drafts have already
been discussed for incorporating CPRM (Content Protection for Recordable
Media) into the ATA specification by the NCTIS T.13 committee. The
committee next meets in February. If, as expected, the CPRM extensions
become part of the ATA specification, copyright protection will be in
every industry-standard hard disk by next summer, according to IBM.

However, what's likely to create a firestorm of industry protest is that
the proposed mechanism introduces problems to moving data between
compliant and non-compliant hard drives. Modifications to existing backup
programs, imaging software, RAID arrays and logical volume managers will
be required to cope with the new drives, The Register has discovered.

The ramifications are enormous. Although the benefit to producers is
great - bringing the holy grail of secure content one step closer - the
costs to consumers will be significant. For example, corporate IT
departments will be unable to mix compliant and non-compliant ATA drives
as they try to enforce uniform back up policies, we've discovered.
Restoring personal backups to a different physical drive - a common
enough occurrence when a disk has failed - will require authentication
with a central server. Imaging software used by OEMs and large
corporates to distribute one-to-many disk images will also need to be
modified.

And the move casts a shadow over some of the hottest emerging business
models: the network attached storage industry, which relies on
virtualising media pools, the digital video recorder market currently
led by TiVo and Replay, and the nascent peer-to-peer model all face
technical disruption.

How it works

Today, CPRM is implemented on DVD and removable SD disks. But the SCSI
and ATA/ATAPI proposals incorporate an extension of the scheme to allow
the encryption to be used on hard drives, in addition to removable
drives and ATAPI devices such as CD-ROMs and DVD drives.

The proposal makes use of around a megabyte of read-only storage on each
hard drive that isn't usually accessed by the end user for a "Media Key
Block". According to research scientist Jeffrey Lotspiech of IBM's
Almaden Research Lab, this is a matrix of 16 columns and some 3000 rows.
A static "Media Unique Key" in a separate, hidden area of the drive,
identifies the individual drive. Making use of broadcast encryption and
one way key algorithms, would-be hackers face a daunting number of keys
to break. CPRM adds new commands into the ATA specification.

But because the system makes use of the physical location on the device
of the encrypted item, software designed for non-compliant drives will
break in some circumstance when encrypted data files are moved.

"It requires both drives to be compliant when data is to move from one
disk to another," says Lotspiech. "And a compliant application to get
all that data to the new drive". So a hard drive containing small
individual containing non-copyable files of say, Gartner reports, will
essentially be unrestorable using existing backup programs.

Similar problems arise with RAID arrays using IDE disks, acknowledges
IBM. "This may help IT managers when auditing for copyright compliance,"
suggests IBM spokesman Mike Ross.

However the decision to make an organisation CPRM compliant. Free
copying is no longer an option:-

"It's not up to us to determine or guess what the content provider might
permit," says Ross. "Nothing will handcuff proper backup and restoring
provided the content provider permits it. Some may not permit it - but
what will the customers reaction be then?"

Well, quite. Clearly key management becomes an urgent priority when
CPRM-aware drives are introduced next year, as CPRM-aware content will
surely follow. The decision to go with CPRM in an organisation is also
an all or nothing proposition - it can't be introduced gradually.

But for home users, the party's over. CRPM paves the way for
CPRM-compliant audio CDs, and the free exchange of digital recordings
will be limited to non-CPRM media.

The Register understands there is fierce opposition to the plan from
Microsoft and its OEM customers. Generating hundreds of thousands of
images each week, the PC industry relies on data going from one master
to many reliably and smoothly. Imaging programs face the same problem as
restore software: the target disk isn't the same as the originator disk.
Microsoft Redmond already has put in a counter-proposal that eschews
low-level hardware calls.

Where were you when they copy-protected the hardware, Daddy?

The intellectual property is owned by the 4C Entity, and administered by
License Management International, LLC - a limited liability company
based in Morgan Hill, California. Company founder John Hoy told The
Register that "LMI,LC holds no intellectual property. Entities are
granted a master license."

Per-device royalties are payable to LLI,LC. License fees of between 2c
and 17c have been mooted for each device, according to documents
circulated to the T.13 group. 5c is the current rate for a DVD device.

Three possible paths lie ahead. CPRM may be bounced out of the T.x
committees. Or manufacturers may choose not to implement it, and opt for
an incomplete ATA or SCSI specification. This is deemed unlikely. Or
thirdly, manufacturers may choose to implement the new command set, but
not activate it. Although it hardly has a prominent media profile - yet
- CPRM in hardware is the most comprehensive mechanism for enforcing
rights protection the industry has seen, and is likely to be viewed by
content producers as a magic bullet. Its progress depends on whether
its proponents can overcome industry and consumer opposition. Which
might be brewing right about ... now.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOkqaUjkCAxeYt5gVAQFd4Af/dXeGGojvOa7iR+HIjTbg6gx5wetvgk+O
MvkKRsECWQUt4K36YJyggWbeZT1OKPbfkKQszQ2nb+EKnajmiJhgsUm88bSHIN7o
HqxEHVKwcCFMa0Pcp0v/Iu0yx3nMQenVXV0vy795Jl6tDXWKiBqGbuqTGQZwvScW
EMwbYWUIbECWX1Yfzvy93XVuwOF3CmyojVu+FJanj7DAKsX7eEosum5tRTGj793A
UMdb7lr7fuHC1ZvSSeXVHZ0QfngLeSfShPeIrDteHAx2RTRveyEiQYMGYH5+LmTB
4P0ls421FDNxip5ygoI5XCQlTtCQAtks+GCQ5x9D25rqi4vfdBO/Hw==
=9ul+
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/vfFNoF9kxIs/m/KwsUDsJ2Zi4J", "n_sections": 25}, {"thread": "yYJxrwvF5IY", "msg": "S4Y7ijb-EXIJ", "author": "David Hopwood", "date_disp": "Dec 27, 2000, 9:00:33\u202fPM", "subject": "MD5 and hash127 questions", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

stoia...@my-deja.com wrote:
> And what about this:
> > 2. Some oppinions about Mr. D.J.Bernstein's hash127 and sigs packages.
> > Can I make ASCII armored ciphertext with them?

Just apply base64 encoding to the output.

> Can hash127 be good MD5 alternative?

hash127 is a MAC, not a hash function. It could be a good alternative
in some cases to HMAC-MD5 or MD5-MAC, for example.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOkqauDkCAxeYt5gVAQFUYwf+N6BrJxv00PKypsDuZWnXWeWMVq3auJm1
5zSjAZOYzi6AH2zpUebyVCYYiZsDEr2QhHm4ap4O8aDXvxT2ZzSSM4bxCYizHkD0
DOu/4zD+aXIS9CA9iv19BbzJaU2xzMWq10ZXoVbTkcctkr+xZrdeWAXz9M3c/kOo
YG802d0WqsjDPbjh1SO/VmGArdex8q1B8a4m4oJKxPeE1Q2JbNXez/0c/T2U6GkK
VaGrHRHoQTjR+VzPXvwx8kpjeiFqv8MNiD16zJaBRIecNlWOg0eUPdUnJkSZeJVF
h3yXRji0CkRiJOkYrGyQO3dsZYoREgErvnWrAZp2TwB9BKxWMDOrZQ==
=jW1D
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/yYJxrwvF5IY/m/S4Y7ijb-EXIJ", "n_sections": 9}, {"thread": "0wOZOMm6_Ls", "msg": "IfQSOSrIAfAJ", "author": "David Hopwood", "date_disp": "Jan 28, 2001, 9:53:04\u202fPM", "subject": "Cryptographic Windows APIs or OCX?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Augusto Jun Devegili wrote:
>
> Quoted from MSDN Library:
>
> "Secure Channel (S-Channel) is a security service provider module that
> implements the popular public key security protocols between Web clients
> and servers. These include SSL, PCT, and TLS (an upcoming standard that
> merges SSL and PCT).

In the interests of accuracy, I should point out that TLS owes little or
nothing to PCT; it is strictly a revision of SSL.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOnTGTTkCAxeYt5gVAQFQ/Qf7BJYpiWBvA3HBI1kyOnqOLZSjGDPe450H
PMu+hqZ6a4xCVsjNTmbm4BLjbuLmyFBu8WG60Xyl1n7SEYNyp41CDkbG/7ofkF84
WlRCupReh8DDMk+Gt7BigyREuZhH2kTOjqmW8mnS3q398lvsDN6gPTQ1TVGdJaDe
5MVkh8vPi/5mfKvVK0LqPmnTjNfPGij65UjKEOaXYRYcGO7hOsSSweWCzBS+K4RR
v5E8JF2WskKSPY/IgVaExwQl+C9oZAuVlMIyrBkkOETYJDY1mEEj8+sTa7g8BVWr
eAGVGf1UpIxVISaL82EzVlEDh13KtBHO9DfTksC+sKc3i52xmwhrVQ==
=L5HW
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/0wOZOMm6_Ls/m/IfQSOSrIAfAJ", "n_sections": 7}, {"thread": "3WbiBQQTSsw", "msg": "G7XddQZntjUJ", "author": "David Hopwood", "date_disp": "Feb 14, 2001, 4:08:02\u202fPM", "subject": "SHA-1 (was Re: Password authentication ...)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Henrick Hellstr\u00f6m" wrote:
> I could give you two good reasons:
>
> Steak is less biased than SHA1. SHA1 fails the random excursions tests,
> whereas Steak doesn't.

I would be astonished if a valid, correctly applied, general-purpose [*]
randomness test was found to consistently fail SHA-1. Precisely which
test are you referring to?

[*] i.e. excluding tests contrived to depend on SHA-1 or to test for
the Merkle-Damg\u00e5rd construction.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOonM0TkCAxeYt5gVAQELVggAskhMsv5FxR3L8dWammMsWqUl739E+uUA
0Z7N2sP3ez3PwHjjqiftDx5kydVAYMn9+abieLciiO8ngLfxb+tPiKIXw+gnLZwK
g59BDsgEuNCYiwtQjMXaIp7dNUS18pQDIWzRJiTBUfgkFEf96K6Zdbyg14EVFcu4
nUyCC8wRVuZsOg/KIC4fRfRZu080nFDLJilCm+T18PPLtT9uz/FrH/VCEfQJMgzA
o5C55mnIN1YhJGLyHbMz3F8f8WKKjs6ezLG+vMKKeK0+ys78aHEceT19B72l9zdH
rmXxpjBCJNgNwwPugVkpXmrtWUmEozdb+0WA4S6EVX7WcMTWXurg4g==
=Eugt
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/3WbiBQQTSsw/m/G7XddQZntjUJ", "n_sections": 22}, {"thread": "4Rie3Yd64BI", "msg": "iJKphaFeMUMJ", "author": "David Hopwood", "date_disp": "Feb 1, 2001, 2:22:39\u202fPM", "subject": "MIKE - alternative to SPEKE and PAK", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Michael Scott wrote:
> OK, so this might be better (must get that paper). Variables a,b and r
> are randomly selected
>
> 3. Carol: A=3^a mod p, Carol sends A to Steve
> 4. Steve: B=3^b.v^r. u=4^r. Steve sends B and u to Carol.
> 5. Carol calculates S=(B/u^x)^a. Steve calculates S=A^b
>

> Then proceed as for SRP. Note that 3 and 4 are both generators of the
> (p-1)/2 sub-group for any safe prime.

I.e. written out in full,

Let p be a large safe prime,
P be Carol's password,
s be a random salt,
x = H(s, P) be Carol's password-derived secret,
v = 4^x mod p be the verifier for Carol,

Carol -> Steve: username
Steve -> Carol: s
Carol: x = H(s_C, P)
choose a uniformly at random in [0, (p-1)/2 - 1]
Carol -> Steve: A = 3^a mod p
Steve: abort if A_S = 0 (mod p)
choose b and r uniformly at random in [0, (p-1)/2 - 1]
Steve -> Carol: B = 3^b.v^r mod p, u = 4^r mod p
Carol: abort if B_C or u_C = 0 (mod p)
S_C = (B_C.u_C^-x)^a
K_C = H(S_C)
Steve: S_S = A_S^b
K_S = H(S_S)

[S_C should equal S_S because (3^b.v^r.4^-rx)^a = 3^ab]

Carol -> Steve: M1 = H(username, s_C, A_C, B_C, K_C)
Steve: abort if M1_S != H(username_S, s_S, A_S, B_S, K_S)
Steve -> Carol: M2 = H(A_S, M1_S, K_S)
Carol: abort if M2_C != H(A_C, M1_C, K_C)


[Steve and Carol's view of certain variables are shown using subscripts
_S and _C respectively. So for example "Carol -> Steve: A = 3^a mod p"
is shorthand for Carol calculating A_C = 3^a mod p, and Steve receiving
A_S. I find this sometimes helps analysis, since in a MITM attack, what
is sent is not necessarily what is received.
The abort conditions and the final steps to prove that Carol and Steve
have the same K are taken from the SRP specs.]


Here is a client impersonation attack on this protocol:

Carrie -> Steve: Carol's username
Steve -> Carrie: s
Carrie -> Steve: A = 1
Steve: does not abort, since A != 0 (mod p)
choose b and r uniformly at random in [0, (p-1)/2 - 1]
Steve -> Carrie: B = 3^b.v^r mod p, u = 4^r mod p
Carrie: K_C = H(1)
Steve: S_S = A_S^b = 1
K_S = H(1)

Carrie -> Steve: M1 = H(Carol's username, s, 1, B, H(1))
Steve: does not abort, i.e. Carrie successfully
impersonates Carol.

OK, so the checks should be that A, B, u != {0, 1, p-1} (mod p), to
avoid small subgroups for each of these variables.

A similar type of attack is to try to force one or more of the group
elements into a different subgroup than expected. For example, a MITM
attacker could multiply the value of u by -1 (mod p) in Steve's message
to Carol. If x is odd, this change causes the protocol to fail; if x is
even then it does not (because -1^x = 1 (mod p)). So this leaks one bit
of information about x. I think other small subgroup attacks are prevented
by the use of a safe prime, but in any case, this suggests that u should
be included in the values hashed to give M1 (so that changing u would
always cause the protocol to fail).

I'd almost concluded that the protocol was secure with these changes,
but here is an off-line dictionary attack, by an attacker Stevie who
impersonates the server:

Carol -> Stevie: username
Stevie -> Carol: s
Carol: x = H(s, P)
choose a uniformly at random in [0, (p-1)/2 - 1]
Carol -> Stevie: A = 3^a mod p
Stevie -> Carol: B = 3, u = 3
Carol: does not abort, since B_C, u_C != {0, 1, p-1} (mod p)
S_C = (3.3^-x)^a
K_C = H(S_C)
Carol -> Stevie: M1 = H(username, s_C, A_C, B_C, K_C, u_C)
Stevie: drop connection

for (each password P' from a dictionary) {
[note that S_C = (3.3^-x)^a = 3^a.3^-ax = A^(1-x)]

S' = A^(1 - H(s, P'))
M1' = H(username, s, A, 3, H(S'), 3)
if M1' = M1, P' is almost certainly the correct password
}

Nice try, though. Maybe this could be fixed by doing the Elgamal
encryption and the key exchange in completely separate subgroups [*]
(e.g. p-1 = 2qrs for q, r, and s distinct large primes, and use the
q and r-order subgroups), since then Carol could check that B and u
were each in the correct subgroup. That foils the immediate attack,
since if B is in a subgroup generated by g, and u in a subgroup
generated by g', then Stevie would have to be able to calculate
g'^a from g^a, and I think that is hard (but I'm not entirely sure).

[*] by separate, I mean distinct apart from the element 1.

Don't be disheartened, BTW - the first two iterations of SRP were also
broken on sci.crypt. Designing strong password protocols is difficult.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOnj0/DkCAxeYt5gVAQEhCwgAkYEc9JTF2ljSdPX2Srwe8+9a2R6bELwM
NDgC5zV6HehoL+4OooQ1JITXXLvje/bZZeW6TSm4CLDlxtxCNSYhrglHWAT0r+Bd
e35of2BMJ4Y+axjRSPjIS4uwo3HwHssaEy5VkOzt8M0rZXYtiMTkWh3PnHFAE5b4
P1WuU7A2dwLCuVLerqBRJOdNcD5zmD3m0g8dH4UA008Gx61R0mvx6u2RMu+QEY5J
78yrHOm85tZaNuupTa13S3oOnDx4TII8jSwqjXjHRXmexAQJYnF7Jb2F1PH+wq9l
CykCq+SMzivcSN/ccJ4V/W630j/D91jpwbRLrrtcImsihc2wu/pj0w==
=qeyt
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/4Rie3Yd64BI/m/iJKphaFeMUMJ", "n_sections": 21}, {"thread": "4pl69PFotyo", "msg": "f5Vasg5yZ80J", "author": "David Hopwood", "date_disp": "Feb 9, 2001, 5:30:57\u202fPM", "subject": "Encrypting Predictable Files", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Matt Timmermans wrote:
> If you want to have it out with David on the matter of bijective
> preprocessing before encryption, you have to understand the attack model
> it protects against, and then you can understand what he's actually saying
> below.


>
> If you have ciphertext, but _no_ knowledge of the plaintext, then attack
> is impossible if the transformation from PT to CT is bijective.

That's clearly incorrect. The identity function is bijective, for instance.
You might exclude that because it is unkeyed, but keyed functions can also
leak information about the plaintext, even when the attacker has zero
information about it a priori. An example is Vigenere: if the key length
is known (which must be assumed), then the XOR of plaintext characters
separated by the key length will be leaked.

I note that you say in another follow-up that you meant "ciphertext-only
attacks against the key". But this is such a restricted attack model, that
IMHO it does not say anything useful about the practical security of a
cipher.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOoN6qzkCAxeYt5gVAQG1Owf/dqI0z7Iue2k1tLlJbfCh6FrepYy9GuP2
+o7mE9ZjljXRC3G2+mSdtHAQbSdNC7ETrcl+PSbij5XzYjeFSuKfhFz7gykScuTW
iABDgSAEvf8GmN19PTBbxb/wUxWR01edx1hV7FYv3PG7wBMM4dUoggJKSWN6oRUE
R8d6l2q+NTirCeK1GAdd6+hAgtVYA/GQ426QA9wdKBdoy32jmbDuHFCmq+1A3jf+
fJRU88iRHY3YyHqA716jKCoItL+OBTXKKFrbQ9fBMC7+KBH5Fq8yaqphPLjY6tpf
t+tD1phiSHCNxHLJHHp/UKsHdZkKEWDqi43UJMg8rXbZL/ykQbx6dw==
=Eois
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/4pl69PFotyo/m/f5Vasg5yZ80J", "n_sections": 52}, {"thread": "A01cTxlaVZQ", "msg": "dXIiVQay2DgJ", "author": "David Hopwood", "date_disp": "Jan 9, 2001, 10:17:26\u202fPM", "subject": "RSA recoverable signature trick", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mark Currie wrote:
> Years ago someone told be about a trick that you can pull when you want
> to sign a public key of the same bit order.

You cannot securely use the identity function as the encoding method for
RSA signatures anyway, so don't try to do this. There is no getting round
the fact that a secure recoverable signature of a piece of incompressible
data will be longer than the original data (typically by *at least* 2t
bits for a security level of 2^t). PSS-R achieves close to the minimum
expansion for a provably secure method:

Mihir Bellare, Phillip Rogaway,
"The Exact Security of Digital Signatures: How to Sign with RSA and
Rabin,"
http://www-cse.ucsd.edu/users/mihir/papers/exactsigs.html

IEEE P1363a draft version 6 (D6).
http://grouper.ieee.org/groups/1363/P1363a/index.html

PSS-R is unfortunately patented (and unlike the non-recoverable variant
PSS, licensing is not free). Don't use the other standardised method for
RSA signatures with message recovery, ISO/IEC 9796-1, because it is not
secure against chosen-message attacks.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEUAwUBOlvUDDkCAxeYt5gVAQEFggf4lgLgf8JPOeXBPW85KKXnyKe8m/vZQfoU
wEaTO85FnCv7iH9DVOhdgBylv7Bh/nwJRnQZhTeecMwl9i41lXBvmZ55Pb8CuU4m
WODP/qhL8w3FYtQmxxibDgcTjLolrIngW6L1w/QWkZ3vvD6NBFCk/NNOIpuBNDv6
bneNt9xpGfRNKmRjeN2WA8TRp2WxHBqnoRYw0TnHt7OrqS+nBmvRkmMmk+uto2WI
xDwwxqqwfJsrUcy+IOTdcyjLTpIZyJ6sR81zaoIXoQI3eqFEYHf7qJvPXlzWSJLf
RQQLz9IlyvQsQ6h9ySpVnTCwjK1XWSWIfdtu5mWFYTrOaFH/Ev3M
=g0Qf
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/A01cTxlaVZQ/m/dXIiVQay2DgJ", "n_sections": 12}, {"thread": "A01cTxlaVZQ", "msg": "mnR6dQ_A1s8J", "author": "David Hopwood", "date_disp": "Jan 10, 2001, 12:15:05\u202fAM", "subject": "RSA recoverable signature trick", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Rubin wrote:
> David Hopwood <hop...@zetnet.co.uk> writes:
> > You cannot securely use the identity function as the encoding method for
> > RSA signatures anyway, so don't try to do this. There is no getting round
> > the fact that a secure recoverable signature of a piece of incompressible
> > data will be longer than the original data (typically by *at least* 2t
> > bits for a security level of 2^t). PSS-R achieves close to the minimum
> > expansion for a provably secure method:
>
> What if you just take the thing you want to sign and encrypt it
> (reversibly) with your favorite block cipher, using a known fixed key?

That may allow existential forgeries (i.e. the attacker can find
a value that satisfies the verification equation, then reverse it using
the block cipher). Existential forgeries can be quite serious if the data
might be interpreted by a program (which will not be able to see that
the data is gibberish and reject it on that basis), rather than as
text by a human user.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOlvvpDkCAxeYt5gVAQFj5ggAsE6ZmGJtdtGcoBBXoDMEcBTyvMwu7x5h
SIRD0wAOH0QfaanuvmHC8H6zdE7PWTrhirvj6uMgsPDLcD1lwwBEOGAkezQfQE1N
QzbhkAEpjeNxUkxUIE6I0gUYKSf376YM7hY4QZPl1k+Lb2GprL4TfBkwPNPzVWQ7
SxJd4kRTReElQYpzBqcynclRhAnjUDWCz5PIUgYMcaZtnfMJDlK0tHraP8G5C5IJ
YSmguGB9NSjIejS+M93OO/ZXk5f+rH5T1+6JgamdMWEgp5n9yJDUfjnybN/WMjGe
f4AipSrRLfZbw0gtb+phy2qWUGbzcCqC+NKIy9BZKIW+6a3TS73o6Q==
=FWkh
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/A01cTxlaVZQ/m/mnR6dQ_A1s8J", "n_sections": 12}, {"thread": "Ahi488UCoCc", "msg": "POG6Esv2tN8J", "author": "David Hopwood", "date_disp": "Mar 25, 2001, 9:37:12\u202fAM", "subject": "Popularity of AES", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Crowley wrote:
> Thomas Boschloo <nos...@multiweb.nl> writes:
> > Will the final AES e.g. have extra rounds on it like they did with
> > Square
>
> No. The NIST team stated their reasons for not extending the rounds
> in the paper explaining their choice of AES, and the draft FIPS has
> the same number of rounds as the Rijndael specification.
>
> It's pretty much certain that the final AES cipher will be the same
> one as the cipher in the draft FIPS, which is the same cipher as that
> specified in the original Rijndael paper.

There was a minor error in the original Rijndael paper (in the description
of key scheduling, IIRC). You mean the corrected Rijndael paper
(http://www.esat.kuleuven.ac.be/~rijmen/rijndael/rijndaeldocV2.zip).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOr4QiTkCAxeYt5gVAQFjjgf/TgCStXZa1Fq95VM6R/efeus4jzzAVXZs
lcdpbbObRblpTcGrJBVSgGQ58CgfdwV0XzuGS9dcr5EOmKfAL9Rpibgs39cE8HFG
6cq3mNlDWvWsg/qNkQQCx/g+cFaOr3qO/wUC3WgQNS+ORgGVYuwShBtdzkoV0AoL
n+IWobfVobxHxxucnVDIJmXaA3iZR89hpC8HSqY+CiNIBfoYWlM7q7M5GFxuYNbz
gxG0eAs6M/kB3HVvUoJbqSVQ66ubrXvIUKGi6swPDQPC82lb5q/dPdH21vYB0rYY
MMwWGncUbrGPLu2P9P/MocSj8W1svSCX/zpR4pNGmJgHqf3PnlkG4Q==
=x8Nt
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/Ahi488UCoCc/m/POG6Esv2tN8J", "n_sections": 11}, {"thread": "CTw5o2LZ_sk", "msg": "RoDHEOJcHp4J", "author": "Kat Hopwood", "date_disp": "Feb 8, 2001, 6:50:50\u202fPM", "subject": "Disk Overwriting", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Albert P. Belle Isle" wrote:
> The armed services' standards for disk data overwriting are NAVSO
> P5239-26, AFSSI-5020 and AR 380-19, respectively.
>
> All of them meet or exceed the requirements of DOD5220.22-M (the
> latest ones, not the old 3-pass "character, complement and random"),
> and all of which require READ-BACK VERIFICATION - which most
> "overwriting software" neglects - to be sure that improper
> cache-flushing leaks haven't resulted in the kind of "fast
> overwriting" that never makes it to disk (like the PGP bug).

Is there not a risk that the read-back will just read from cache,
either at the operating system or disk controller level? (I'm not
disputing that it's a good idea to do read-back verification, just
pointing out that it may not be sufficient.)

Ideally, disk controllers would have a feature that guarantees to
commit all writes to the disk surface (with a notification when that
has been completed), and operating systems would make this available
to applications. I'm not holding my breath, though.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOoIsUjkCAxeYt5gVAQEflAgAv5tyEzRb5SwvW9DvLCCYJ6sXJsiyrW/L
/ooqaU28VC+ots7GrFmryLyoq1WkWr4qit0f9tZFx5Z8rbYgiZjiK+BCSAxH4xeH
lD71SlS/3vMHDG9fC+H7zEy6Br2oKvbdJppJNxLgwkVOqoGYNnno208XqJ7DSt6I
M26B4Fx8vEFHSf//4bPKp1t9Im2au6lJ6iN0l19Po7RcmQzGsSyg+YkJhxvoB84W
OAVYs99vglVTuY58vKDrcR8Ox62xZoOcPM6rJkTKNab1A4Lo0WQwUdu34pIQR0HX
u/9B/heO/shjWXSToEbMm2u8DfJw/AiXuV8gmD2z8lRuWu4jAVCKzA==
=sJcF
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/CTw5o2LZ_sk/m/RoDHEOJcHp4J", "n_sections": 3}, {"thread": "FOa40AoSz30", "msg": "Gh4xP80X1KkJ", "author": "Kat Hopwood", "date_disp": "Feb 23, 2001, 8:27:55\u202fPM", "subject": "Processing on cyphertext", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Ian Woods wrote:
> Is anyone aware of any encryption schemes which allow some (restricted)
> forms of processing on cyphertext? To make a bit more sense...
>
> E(num1,key) * E(num2,key) = E(num1*num2,key)
>
> Or in English: performing an operation on two encrypted numbers (num1 and
> num2) creates a new cyphertext which when decrypted is the value of the
> operation performed on num1 and num2.

The RSA trapdoor function has this property (for multiplication modulo
the modulus, N):

num1^e * num2^e = (num1*num2)^e (mod N)

However, be very careful - the RSA trapdoor function is not secure on its
own as an encryption scheme (without using an encoding method, which
would destroy the multiplicative property). That doesn't mean you can't
use it, but its security will have to be analysed in the specific context
of whatever protocol it is being used in. What exactly is the application?

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOpXZWzkCAxeYt5gVAQE0iAf/dAcF4qJTNarg9a+X14Efa0xBPEup+Ei6
xKWbkk1TqW/aAFVkdXRr8Rd5j9lMiTHBXycACdxw/j5z8zcyX6l0GB0c4kL5HamL
wkEgkkcXBG/02Ku7kEolRIxnuSKivxUJJgrGku7P4yfiwTkPz+xD4fxk5583rmB8
XMBVQqta+RlHUUf8DGKeYXPJMM1Ogch3XRCNgGZpNpJ9ZvybEharEwRrcOi5Lw67
z/e9q4MSAeSxb+cb+0VBWdAOTrRriE6l6ejVufV1J0lbuk+tFcLCgxabT2AcLeWg
XHcjU2IqINooi9qVFEg8HJBchcOwlO9+Mx0Pw952TRO0CpXbZXw8Zw==
=PJVe
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/FOa40AoSz30/m/Gh4xP80X1KkJ", "n_sections": 5}, {"thread": "HaETK9z9LeM", "msg": "td2bfl8au8kJ", "author": "David Hopwood", "date_disp": "Feb 1, 2001, 7:57:09\u202fPM", "subject": "How good is Diamond2 and Saphire ciphers?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Pires wrote:


> Rex Stewart <T_Re...@yahoo.com> wrote:
> > Sapphire2
> > It has some similarities to RC4 but with an extra twist that
> > it feeds information from both the plaintext and the cyphertext
> > streams into the system. This allows it to be used repeatedly
> > with a single key, unlike standard stream cyphers.
>
> This sounds like something interesting. Can you give me any pointers
> to where I might find a description of this? I'll give Google a go but
> a reccomendation would be appreciated.

ftp://ftp.zedz.com/pub/crypto/libraries/sapphire/sapphire.zip

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOnoFwjkCAxeYt5gVAQGB0Qf9Gkl9kZ6Zb3Ccgwtw6+8O1G+jkmCRMz8Y
6fqZ2cTWIip8zIXJxYrEFgvAZLebYU6HqsjCvLVCf4GYgi0PR27ts9AVnfs3Hhlp
zwEzFWMXjfbqBZpWtR/EekDtcmQuOxgoZtzUOPzWrW+fjoZ7p2eAmkcHKyuTioVI
EfREidG7zaeO5j7AFyoGytv/n5o045wFyUzLECTgdSw9u6gjfag+9SXEaoC91joY
0T10YV0xyZ7C6atfS+9/+s0pr2YwSKPsZRZMS5JuXXcegt3gD4+laYqRvyfMHtKv
tcNTvGkAU1CsT5u8Cgz0DQzFOeDz12zAcfVVZ8tOCYPQ+yNAuNNE2Q==
=si6b
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/HaETK9z9LeM/m/td2bfl8au8kJ", "n_sections": 14}, {"thread": "ISBTAdYhv4s", "msg": "hFgixYCdxiEJ", "author": "David Hopwood", "date_disp": "Jan 31, 2001, 8:38:27\u202fPM", "subject": "More About Passwords", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

John Savard wrote:
> 6) Security computer
...
> - knows H(UPASS), ...

This value is password-equivalent. Also, passwords should always be
hashed with salt, to prevent precomputation attacks (where the same
precomputed dictionary applies to all users) in the case that verifiers
are compromised.

Another, more serious problem is that the host doesn't appear to have
any long-term secrets to authenticate it, so anyone can act as a
man-in-the-middle host between the user and the security computer.

Use one of the more recent strong password protocols to ensure that
the verifier is not password-equivalent, as I suggested in my response
to your original post:

User <-> Security (via Host): execute strong password protocol
Security -> Host: E[K_SH](Sign[Q_S](SessionID, K))
User <-> Host: proofs that user and host know K
User <-> Host: rest of session, encrypted and MAC'd using keys
derived from K

Here K_SH is a symmetric key shared between the Security computer and
host (i.e. the long-term secret mentioned as being required above), Q_S
is the security computer's private signature key, and K is the session
key from the password protocol.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOni97DkCAxeYt5gVAQFSvgf+Lr26peFseTe8BJXmXAS6+WnKCpCO7GVU
BZRLWFKMSrlJyC018jgKKsqG8Wwm5OuxpsPzSCZxcPzJtFH3zBWG463fcBhTTLEJ
RicHo4dA0A9G1Ijndt2OriSBWpQQ7WlKFIl0iaWplPeTuYBNVBkLfeqrlYw7WYgZ
y1GHIRHRxRF/fKRH2YQfC94p4Fn4FOboVrzia7bGZJO+rnt8UjoyTBPfYcTNfGwO
F0UFajVcHjOrekTLALnH5vd3BDTA/RjBzwwBwVTD4nbVp7i8fnFfT5zMJJtuOM/j
tLLWelLIeGhD4Qd05+Mqvnvj0tWvRuOAHJs725WPDukTItZIGzojwA==
=z031
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ISBTAdYhv4s/m/hFgixYCdxiEJ", "n_sections": 6}, {"thread": "JH18mvcx26Q", "msg": "G083OS2YA0YJ", "author": "David Hopwood", "date_disp": "Mar 25, 2001, 10:26:35\u202fAM", "subject": "Encrypt then HMAC or HMAC then Encrypt?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Bjorn Forsberg wrote:
> I am storing an encrypted data packet. Typically small (less than 1K
> FWIW). I am encrypting the data, then taking an HMAC of the encrypted
> data plus other plain text data. The HMAC is appended to the plain text
> data and cipher text data over which it operates on.

That seems perfectly reasonable. Make sure you include a format version
number in the authenticated plain text data. If the cipher is variable,
then an ID for it and any parameters should go in as well.

> I know SSL takes an HMAC of data then encrypts everything including the
> HMAC. I can't see anything really definitive that would say that one
> method is better over the other?
>
> Can someone please give me some good reasons to pick one way vs the
> other?

See:

Mihir Bellare, Chanathip Nampremprey,
"Authenticated Encryption: Relations among notions and analysis of the
generic composition paradigm,"
Preliminary version in in Advances in Cryptology - ASIACRYPT '00,
Lecture Notes in Computer Science Vol. 1976 (T. Okamoto ed.),
Springer-Verlag, 2000.
Full version (September 25, 2000) available from
http://www-cse.ucsd.edu/users/mihir/

This shows that, under the assumptions that the cipher is semantically
secure against chosen plaintext attack, and the MAC is strongly unforgeable
(see the paper for what that means), Encrypt-then-MAC can be formally
proven semantically secure against adaptive chosen ciphertext attack,
but MAC-then-Encrypt can't.

Note that this doesn't in itself constitute an attack against
MAC-then-Encrypt for typical choices of cipher and MAC; the paper is
simply about what can be proven when making only standard assumptions
about the cipher and MAC. IMHO, it's a good enough reason to choose
Encrypt-then-MAC in preference to MAC-then-Encrypt in new protocol
designs, though.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOr4bxzkCAxeYt5gVAQFTSgf9EtqyEOGh9qKmbH+71few7PrzNtChHkR0
oqNPVDMkJtRPb1iX5Pg9t3jh9C9rz7Zmr81v3WU3Wt3RB+lHxc4bOXeOK2HBRAX7
uRKM92JtyleFRa1pvPjjbwZshOsiIVzs1mVbbbae0hjCvfP7rtCJ6g24V10fHznb
z4ZWt9mgkfQ+JmYKqu7meZOm91+YrRlRUPXqOjl/H9hYtC6oV3JzAoZtxSBbgel2
DTG4oCPvx86vjin0iPgXV0jAtnK4oYaJ6xI7jyme+SZ+QEqe9VRQFMgWSR+gbEzD
AGefV1wT4lPd5J5FmuW4YKrVe9XIRvzxggatPpg4iI9x4FoUvkWQFQ==
=bbar
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/JH18mvcx26Q/m/G083OS2YA0YJ", "n_sections": 17}, {"thread": "N8s6-ujIAYg", "msg": "nc3UN_823uYJ", "author": "David Hopwood", "date_disp": "Jan 6, 2001, 12:15:07\u202fAM", "subject": "Comparison of ECDLP vs. DLP", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Martin Hamann wrote:
> I'm looking for at comparison of the stregths in a Elliptic Curve DLP and
> a DLP in Zp*. I have seen a table stating which keysizes roughly offer the
> same strength, for example 2^106 in ECDLP roughly equals 2^512 in "normal"
> DLP. I believe it is taken directly from a book or article, which I cannot
> locate.
>

> I need it for a discussion of why ECDSA is 'better' than DSA.

It isn't. To answer the question you probably meant to ask:

ECDSA DSA
+ - Known attacks against ECDSA (with well-chosen parameters) are
exponential in the group order, as opposed to subexponential
for DSA.
+ - EC public key sizes are smaller for a given conjectured level
of security.
+ - ECDSA can be faster than DSA for a given conjectured level of
security, *if* it is well-optimised.
- There is an attack by Serge Vaudenay that reduces the cost of
finding collisions for DSA to less than the expected 2^80
operations (when used with SHA-1); this attack does not
apply to ECDSA as standardised, but it is not particularly
serious in any case.
- + Well-optimised implementations of ECDSA, in either hardware
or software, are less common, and tend to only implement
a subset of options (see next point).
- + Ensuring interoperability is significantly harder for ECDSA
because there are several field and basis options.
- + EC systems are more complicated to implement, and therefore
there is a greater chance of an implementation bug affecting
security.
- + Some methods of implementing field arithmetic used in EC systems
are patented. Also the patent status of point compression
(for an ECDSA public key, for example) is uncertain. DSA is
technically patented by the US Government, but with a
royalty-free open license.
- + Generation of parameters for EC cryptosystems is *much* more
complicated (although it is possible to use parameters that
were generated by someone else). Generation of DSA parameters
is quite easy.
- + The EC discrete log problem is arguably less well understood
or thoroughly analysed than the DLP in a subgroup of GF(p).
- + There is a greater risk of choosing classes of EC parameters
that turn out to be weak - c.f. Smart's attack on EC(GF(2^m))
with m composite. (This is especially true if you choose
parameters to enable specific optimisations, so be careful
of performance analyses that do this.)
+ + There is an advantage to supporting both ECDSA and DSA in case
an attack is found on one of them (although not if you design
a system so that a break in either will break the system).
= = Signature sizes are identical. Message recovery is not
supported.
= = Both are believed to provide existential unforgeability under
chosen message attack (but see the next point).
- - Neither DSA nor ECDSA are supported by security proofs
(unlike, say, RSA-PSS or RW-PSS).

Overall I think the above arguments favour DSA for most typical
applications (or one of RSA-PSS or RW-PSS if you don't restrict the
choice to DSA and ECDSA), but YMMV.

Also, remember that the vast majority of feasible attacks against
cryptographic systems are not cryptanalytic attacks against algorithms.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOlapMDkCAxeYt5gVAQGxhgf/d2Q8U80l3975V8+YrcvgzGLnYIlMoGDp
sNICr+REUj9NgGze5xg4sTGl1Q157dWLGDgbs1U/yxFWuQaJJc6rDNIVm1GzQNf4
fQEdVW0zfhjQZfDZfFxIaxPxooXGQi+K/vcOszaP1s+zlg81HuCALZlaGY9vN/FV
8+1JmNYMf2gKwPHv0S0f4jEeEvpGyP2g1bdEeIz8sMy2660VyapDjmUySasy1qAS
BWvA3ePZMcUOi6yaCQMIMycVtStuUhWJla3XfaXAcjEhxP4hapxg0kLl1JNx7M0e
I1FVt7uM+tjc1ozPaOIgdRaHormDNzzT/Xsnoxxgw9Ydo/76KD2FEQ==
=SewD
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/N8s6-ujIAYg/m/nc3UN_823uYJ", "n_sections": 100}, {"thread": "N8s6-ujIAYg", "msg": "9bYhAqPIfpwJ", "author": "David Hopwood", "date_disp": "Jan 8, 2001, 4:46:11\u202fPM", "subject": "Comparison of ECDLP vs. DLP", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

DJohn37050 wrote:
> A security proof on ECDSA will be showing up shortly.

Perhaps you could post a reference here when it is available.

> It is interesting to note that in this case, the proof does not
> apply to DSA.

That *is* interesting. Do you know what the obstacle is to the proof
applying to DSA? (with assumptions about ECDHP or ECDLP replaced by the
corresponding assumptions in a subgroup of GF(p), of course)

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOln1cjkCAxeYt5gVAQEyPAf/ZPhLPGSKUnslAoGYt1D+xWWjGfKq6j/e
9lvMBVihDjtxW+Ter/t7tIlEulJYRWjob+lawI2ki8pU33nAEQDAONT1Aw+2vqD4
w3Sd96FpKnLJgKAKqqpJyfaHQqw+JRhdb9aOE0rposierKn7TPHfJuGdIW0kdLpX
vB8FQe2czVYepSXFuOoKTJZNVA07rbLD9PN72lezcOw4TKQ5B9MivfahlLaOm9z6
Q53V5mT9ZnYws9WrhRzM9YS2q+EF3qpr8gpfyhOlo0ZHLLMiXmFtT5MI3Pe+X+JF
qThzaBL+k5lhmvpsOK0/F+g07HlrZwe+4bg06yAwn8YN1gamLu5WKQ==
=Rz56
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/N8s6-ujIAYg/m/9bYhAqPIfpwJ", "n_sections": 100}, {"thread": "N8s6-ujIAYg", "msg": "573RgRuOxnEJ", "author": "David Hopwood", "date_disp": "Jan 9, 2001, 11:29:00\u202fPM", "subject": "Random oracle proofs (was Re: Comparison of ECDLP vs. DLP)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jakob Jonsson wrote:
> Proofs in the random oracle model ARE proofs of security, but you may
> have objections against the strength of the proof. The proof tells us
> that if you can break the scheme (forge signatures), then you can
> either invert the underlying verification primitive or find a flaw in
> the hash function.

Actually it does not say that. It says that the scheme is secure in a
restricted attack model where the adversary is not allowed to treat the
hash as anything other than a random oracle.

As an example to show the difference, consider the following Message
Authentication Code:

MAC_K(M) = H(K || M)

This is provably secure when H is assumed to be a random oracle.
However, it is well-known to be insecure when H is instantiated as
any Merkle-Damg\u00e5rd hash function (see Applied Crypto 2nd ed.
Section 18.14, page 458). The attack is that the output of H(K || M)
can be used as the initial chaining variable to find the MAC of a
message that starts with pad(M), where 'pad' is the padding function
for H.

There are several possible ways of interpreting this:
1. SHA-1, SHA-256/384/512, RIPEMD-160, Tiger, and all other
Merkle-Damg\u00e5rd hash functions are flawed.
2. The random oracle model is flawed.
3. Merkle-Damg\u00e5rd hashes should not be used to instantiate random
oracles with variable length inputs that are not prefix-free.
4. The random oracle model is inappropriate for modelling symmetric
schemes, because the RO assumption trivially implies most
results about symmetric schemes that we would want to prove (i.e.
we are basically assuming the result).

I would say 3 and 4, but YMMV.

In any case, this shows that there are practical, plausible-looking
schemes (as opposed to artificially constructed ones), that can be
proven secure in the RO model, for which instantiating the random
oracle with any of the commonly used dedicated hash functions
(effectively all of which use the Merkle-Damg\u00e5rd construction) is not
secure.

> Thus, the security of the whole scheme can be expressed in terms of
> the security of two of its components. Of course, the random oracle
> assumption is a much stronger assumption than the one-wayness assumption
> on the verification primitive -- as soon as you find even the slightest
> bias in the outputs from the hash function, the proof will fall apart.

The hash is a *fixed* unkeyed function, so it obviously has non-zero bias.
The random oracle assumption is not an assumption that it is possible
for a specific hash to satisfy [*]; it is an assumption about what types
of attack need to be considered. I.e. it does not prove anything about
attacks that step outside the model. This is much the same as saying that
a proof that a cipher is resistant to chosen plaintext attack (under some
assumptions), does not prove anything about its resistance to chosen
ciphertext attacks.


[*] Actually, collision-resistance and pre-image resistance are not
well-defined standard model assumptions either. For example collisions
clearly exist for any given hash, so there exists an adversary
with those collisions written into its program. The definition of
"one-wayness" for a OWF is different from pre-image resistance
precisely to get around this problem (roughly speaking, it may be
possible to find pre-images for a secure OWF, as long as it is not
possible to find "too many" of them).

> In particular, a proof that
> relates the security of the scheme directly to the security of the core
> primitive would be much better. Yet, a random oracle proof assures us at
> the very least that we don't have to fear attacks like the ones on
> ISO 9796-1 and PKCS #1 v1.5, so such a proof is strictly better than no
> proof at all of security (i.e., we achieve something). At least IMHO...

I agree: we do achieve something - security against a subset of possible
attacks. I.e. Roger Shlafly's statement

"Roger Schlafly" <roger...@my-dejanews.com> wrote:
> DJohn37050 wrote:
> > Any security proof relies on assumptions. I think the proof is random
> > oracle, which some do not accept.
>
> IOW, no proof at all of security.

is too strong IMHO, but it could certainly be argued that the subset
of attacks that the RO model addresses is not complete enough.
Note that security proofs are always open to this type of criticism,
even in the standard model, so I do not agree with the view that results
in the RO model have to be called arguments rather than proofs.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOlvkgzkCAxeYt5gVAQFrLAgAhggdIi502NC3PYDSCYUra/9CEbeEbado
sIedv8gw0FouviFFqAkmpS2966Gkd08acwM4x3rvQDWC7A5XzahPZSQ4udT7xV2R
VMC4Y2iARDsEzFQaI514FsgItcRirrfPFoEUSXVb/ezHcT/KZUvLWyYSyrjDlWS+
ZU/LIwB9wrNNfIjvZfY1V1AC8Pm1r+qvLRmpnyEYtPpMGKkCs9Qzi25Q0rQSqVZH
SnDTn9I5iFRa2sV2OhA775JMJ/nndf0EBX3aCT+//reJ1BmuY+6rLGYdc1IuUYJ+
VRtYhSG+jzf9GAsMidmx5jV4MaRRiFfigozop6UxEI8c3UA7e2Cc/A==
=SsxB
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/N8s6-ujIAYg/m/573RgRuOxnEJ", "n_sections": 100}, {"thread": "N8s6-ujIAYg", "msg": "JfWVw11QEt4J", "author": "David Hopwood", "date_disp": "Jan 15, 2001, 9:50:53\u202fAM", "subject": "Comparison of ECDLP vs. DLP", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

DJohn37050 wrote:
> Bob Silverman said:
> > It is clear that time/space issues can not be separated. Any
> > algorithm can be broken in time O(1) if enough space for suitably
> > large lookup tables is available."
>
> I would say that time is involved to BUILD the lookup table and that
> that TIME counts as part of the TIME cost of the attack.

Typically, models used to analyse concrete security will consider the
cost to include a measure of the *size* of the adversary's program.
Considering the *time* needed to build any tables is problematic, because
you then have to specify what algorithm was used to build them (and that
algorithm may itself use large tables). Adding the code size does seem
to solve this problem in a reasonable way, though. Note that how code
size is measured does not matter up to a constant factor.

Alternatively, it is possible to consider code size and time completely
separately, but that doesn't really have any advantage compared to the
combined model, for most analyses. (The amount of space needed at run-time
is a different issue - that probably should be treated separately.)

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOl9ipDkCAxeYt5gVAQFMxAf/Vh56eEq54c0xIUHfj05V9zKmKItZb1np
Qc8SlAV+KA7Xfg/gKQaqwHeYqjzo90Y/RADAbET4dQVVKFTK0LnYdkJJjSaVNsIA
m6zFgTSzWM11IsfI5+UE0jXiJSmtMSqzgZXB4VTrgJW+YjIaBiW1yQAE+yRSQy4S
J2NuHdNJBc0aibDo8bEXz7x+n6cnRDS30wNlse4Mr7PLrI9TOChgmyory6FyIl0N
PVva+3spDv8Jq5ffTjU3anv08flsHd/WrdGas52JjXfdyB+/M1g3a99p5mSIcJsM
A4zDxQFJhssqk6O066JqXIVHvn12ZZ1Ry6SqM8MZLMouYKsyDIVwAg==
=8qwZ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/N8s6-ujIAYg/m/JfWVw11QEt4J", "n_sections": 100}, {"thread": "NT7zNwwrkII", "msg": "y6yMZDNtJo0J", "author": "David Hopwood", "date_disp": "Feb 18, 2001, 11:24:50\u202fAM", "subject": "Reverse encoding question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Michael J. Fromberger" wrote:
> In general, if E is a symmetric cipher with decryption rule D, if you
> have C = Ek(X), and you know C and k, you can easily compute:
>
> Y = Dk(X)
>
> Encrypting Y with key k will result in X, i.e., Ek(Y) = X. This
> should work for any symmetric cipher.

More precisely, it works for any deterministic symmetric cipher.
In the case of a chaining mode with an IV (like CBC, which was what
the original poster asked), it works provided the IV can be chosen.

For a completely general symmetric cipher, though, it is not necessarily
possible to determine the coins (random input) for the encryption
function that, together with the plaintext, will produce a given
ciphertext. For example, suppose a scheme used CBC mode but with the
IV generated as a one-way hash of a random value R; it would not be
possible to find a valid R given just the key and ciphertext.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOo8piDkCAxeYt5gVAQHasQf+P8vo+0iZ+/snPSgMvuMc+DRgjdAiT32v
EQSFnuRc6dsHC3m6Bb1ylLeSKAzVoKgND3HNrrQhFu48LLhIetSsbUgg0yzQfo6J
SkcA+WvIWA9uKERBWz1xQF4kGr8jC0yoYkZgJMaVGIfvnNl35PStM6ldxEd4aBOg
LcZNlPypcE6K9Mq+VsEJJapNwD5jSojeIr6S6ATuedtch1BwrV7EgIGqkYfxc+ew
zHf01g+p6YvsoavnYGTC+6+dFe8NpVFQ07ZVuUbLgIMyTPHbhatbvELt8DrLUxZ7
J26VOV/DTWFHlQZnuk17oMupiO7i9edRJWjkZzrmlbKpz+ogPNZdgQ==
=2YFO
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/NT7zNwwrkII/m/y6yMZDNtJo0J", "n_sections": 4}, {"thread": "TcQ49WkDe-Y", "msg": "lusavJvgWNcJ", "author": "David Hopwood", "date_disp": "Jan 22, 2001, 3:47:08\u202fPM", "subject": "Cipher development (was: using AES finalists in series?)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Terry Ritter wrote:
[snip]


> I note that AES did not guarantee free encryption software so that all
> society could use encryption;

It doesn't guarantee free encryption software, but the fact that AES
is unencumbered by patents does *allow* open-source software and
unsubsidised free software to use it. The Internet is built to a large
extent on free software (particularly for development of new protocols),
and so an encumbered algorithm could not possibly satisfy the intended
role of AES, as a common cipher to promote interoperability in cases
where 3DES will not suffice.

> it instead removed the economic basis for an industry of cipher
> *development*.

AES did not remove the economic basis for a commercial industry of cipher
development. There has never been an economic basis for such an industry -
not before DES, because there was no civilian market for ciphers to speak
of, and not after DES, because free cipher algorithms close to the civilian
state of the art have been available to the general public since then.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOmumCTkCAxeYt5gVAQHdNwgArkjiKV/G8vzXYngiqUIXlWNa2JCt1fg+
Aw70ERZE81NTfuar9Q76OUSthT7dEMIGU47RHRQIkcZpv6tSC5Ath1Bzd3jm+xbM
jwShVdQGVWfE6sd/uc1N8SZWocYTvJvRu+OmX/zpmvhvGNZGp0x+MHuEwaHG9qG4
4eb3LTQS/DFD952KssuQCTLBbwPAPoZSig7plmmZRxgY1fiSaWKc6Hr8hVto49ol
gXGj1QwbKuMtSlnzxGF3srfRNg8oEBz+PtGhpUAPV6ypOgIKqUrtkGzEU8Md/+Aw
JE2HWh4Yhr8MO65R5aD5jb/bebspYNrdOBb7p2mdbMshCXtw3iNDfw==
=cgSZ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/TcQ49WkDe-Y/m/lusavJvgWNcJ", "n_sections": 58}, {"thread": "Y811mlRku0g", "msg": "tu6o5YgaiOQJ", "author": "David Hopwood", "date_disp": "Feb 4, 2001, 1:25:26\u202fAM", "subject": "CipherText // NO Mathematical Expression Possible", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Prichard, Chuck" wrote:
> Its a very complex relationship that the root key has with the attribute,
> the modified key, offset, message string and the way the ciphers are
> applied. I doubt there is mathematical language to explain it quite
> properly.

When the Snake Oil FAQ is updated [*], this type of misconception really
should be addressed. Several of the kook cipher designers make the claim
that their ciphers "cannot be described mathematically", when the problem
is simply that they don't know enough mathematics (nor do they understand
that if it were difficult to describe a cipher using mathematics, that
would not be an advantage).

> Now this statement, you could prove is incorrect.

So why make it?


[*] The Snake Oil FAQ badly needs updating because of the changes to export
regulations. "Exportable from the US" no longer implies snake-oil.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOnzEmjkCAxeYt5gVAQFpuAf6A/BxEnujKtGIWF+eI0rTDX04EHDE7VoB
ahPvM6hZKLVAtZzuLw7ukhRrPcxuifMSn2vPZBDlv7bsEswHRcKv2UOTtvww5h70
2fJq0ZDD7eyMikSCmfqx4A2wFH1j298J0JlK3co7pEK/UfbAnMgGMvQ7wzCtyx0C
LYm/LHyV1sc0jnOcYbNvj7boJ7juP7hRBzSFrfAAG3XFziOAGXhqRSffLnz9agHV
XiIUS/n+1/4fSu928oxyskGG753nL31gGhc991wvPtd6eQmeX88bZPn/xM+i+JqZ
hdGvauYITAeKF3FNYDCLG/iRe5vjwfr4ku+T8feIXOHrEqLQeOLLQg==
=Sd/p
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Y811mlRku0g/m/tu6o5YgaiOQJ", "n_sections": 73}, {"thread": "_LkIB7iAau4", "msg": "nOlb98CzgCoJ", "author": "David Hopwood", "date_disp": "Feb 10, 2001, 3:43:11\u202fPM", "subject": "UNIX Crypt for DOS", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Matthew J. Ricciardi" wrote:
> I am searching for a DOS port of the UNIX crypt command.

You do know that crypt(1) is insecure?

> I have the C source code from Schneier's Applied Cryptography but, despite
> several hours of tinkering, am unable to make it work properly under DOS.
> (I have successfully compiled and used the same source code under UNIX.)

Obtain a (free) copy of DJGPP; this is a port of gcc to DOS, and behaves
much more like a Unix C compiler.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOoTREjkCAxeYt5gVAQFF9AgAsQt+4u3o3V9Dg9xd0w5nXZzYMuguM1wK
yLIjZGzTOyP0CxIWBiYJbl8vwD++F/s7Aa7wT17tC8TMKm0JaBr0uoD+CQjZQEUl
NMmPijFQWW4PovUqYLk63vpOCOyAQ6oRNGQY+MsyoTKGauODnLn/p3vL3PzlXVUC
mD2XeMsoOyQhcfFg/Ev+bLmVXZ+O67yY9v20kvLzL2zfeHpPRspuLjiGjC4XtcOB
aWiIc0nD/buUgvoEkgiFh680BmCqKb05/4XA8AJs/GwO0bJG5DgpT9VQfeWI/0s1
cbHzVIHbKmYW7V94nK5dRae/r5/QyhVC9mw0cLDKKEmsSZHUpK8wJg==
=98Nm
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/_LkIB7iAau4/m/nOlb98CzgCoJ", "n_sections": 6}, {"thread": "_jk22UulHzA", "msg": "1zguppYM4UQJ", "author": "David Hopwood", "date_disp": "Jan 30, 2001, 4:45:36\u202fPM", "subject": "A Password Protocol", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

John Savard wrote:
[snip]


> 1) The hash of the user's password is calculated: H(PW).
>
> 2) The challenge vector is decrypted: D(CV,H(PW)) -> ( MK, SK, R )
>
> 3) The master key is used to produce the hash of the user's password
> that the host computer posesses. H(E(PW,MK))
>
> 4) This hash is used as the key to encrypt the challenge vector, and
> the result is hashed.
>
> 5) This result is then encrypted by the session key, and the result is
> hashed, and this hash is transmitted to the host computer.

For each guessed password, an attacker can repeat these steps (using
an eavesdropped challenge vector), until the transmitted hash matches.
Therefore the protocol is vulnerable to off-line password guessing
attacks.

It is possible to do what you seem to want using a strong password-based
protocol such as SRP-3, PAK-X, SNAPI-X, etc.: one method is for the
client to run the password-based protocol with the secure computer
(via the host), then the secure computer tells the host the session key
in a signed, encrypted message (which is uniquely associated with that
session). There may be more efficient ways, but that one is obviously
correct, and gives an idea of what security properties you should be
aiming for.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOnXMDTkCAxeYt5gVAQGKEwf+NgtuTYWb3hK6QjUVhTnM0BOk8KddZKgp
1jIyx5Sqk1Iz7U6pfvk1drwcpQ8RFw3ZtMKvX/7DwVZ72ZTdFBn8oknf6WHV72VV
S5MkXpWco7VIf1Ra8hs81dNBkKhYN5LF3Stqu5hNMHfZkDet5mScMliik0YDgN24
FyeNRtZsR8+5tH5PiTlrc/5mlKC2QQtlsgi+JzoC8FvnPzAxdOaGzf1KtfqxmF8Q
PdU8bJrwt0656Z5nkAhVqDn5K7Lpt5tUBudaJvDj7EWxHy+FnZkLl6oB7VTKWSit
1TBKBhOx612MiwfZb9qeAZ72gg4Mkwto/I3/yefS9q36gvRxlWkr4g==
=GSFJ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/_jk22UulHzA/m/1zguppYM4UQJ", "n_sections": 10}, {"thread": "bWP3YP-kh6w", "msg": "dOoTm8qat1sJ", "author": "David Hopwood", "date_disp": "Jan 31, 2001, 8:39:23\u202fPM", "subject": "AES and randomness", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Given 2^64 outputs, it's possible to distinguish the output of Rijndael
in counter mode from random with non-negligable advantage: if there are
no block collisions, guess that the output is from Rijndael, otherwise
guess that it is random. Not that this is a practical attack, of course,
and it applies to any 128-bit block cipher in counter mode, not just
Rijndael.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOnirHTkCAxeYt5gVAQH4uQgAwSry1WBhnG7EEO+RbxiHWe83p1i9j5k1
uzk2fCBY3boNQctrzzlOnEFI+NBO0tJIszARekcSgSZRFLdxQA8VM9nD97xmXz9F
r4QsWIOMOOBFO4UBK/sfcm/mURIn4o7tnOU1f0a/NjW4eDSaRacSSGOfefufnoch
BmIM4+FMZhz2v+ec6HBwvjhVJw8DiNDOsM6isWHhNiJ9giJ7hMDXZPtXY9VGxogj
lWJTjD87QUeNBwH6Z2CW/dK+IWVAY44qHUS/Ga2ddRJZbsdFI5RP7aRVDxq9oAWD
XvCk1M39JOgfHI+++WyzEyFWAGkpegZsI4js2e/8zhrzhCVfvT+7vg==
=HKqy
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/bWP3YP-kh6w/m/dOoTm8qat1sJ", "n_sections": 6}, {"thread": "d2tCrZDoDZQ", "msg": "yPKH4V72iEcJ", "author": "David Hopwood", "date_disp": "Feb 21, 2001, 7:06:50\u202fPM", "subject": "Question about RSA excryption...", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Goldberg wrote:
> Taylor Francis wrote:
> > Admittedly, I'm a beginner, but the RSA method, seems to produce the
> > same ciphertext for the same plaintext. Despite the prime numbers and
> > difficultites of factoring, doesn't this just produce a simple
> > substitution cipher?
> >
> > How is this difficulty overcome?
>

> It's true that using pure RSA to encrypt two identical plaintexts


> produces two identical ciphertexts. However, we generally do not use
> pure RSA encryption for sending messages. We generate a random string
> r, encrypt r using RSA, then encrypt our actual message using some block
> cipher with r as the key.

No, that is insecure, or at least does not provide bitlength(r) bits of
security (see [1]). The message should be processed using a randomised
encoding method designed for the purpose, for example OAEP [2,3].


[1] Dan Boneh, Antoine Joux, Phong Q. Nguyen,
"Why Textbook ElGamal and RSA Encryption are Insecure,"
Extended Abstract in Proceedings of ASIACRYPT '2000,
Volume 1976 of Lecture Notes in Computer Science, Springer-Verlag.
http://www.di.ens.fr/~pnguyen/

[2] RSA Security, Inc.,
PKCS #1: RSA Cryptography Standard, version 2.0.
http://www.rsalabs.com/pkcs/pkcs-1/

[3] M. Bellare, P. Rogaway,
"Optimal asymmetric encryption -- How to encrypt with RSA,"
Revised version, 19 November 1995.
http://www-cse.ucsd.edu/users/mihir/papers/pke.html#oae-paper

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOpM5XDkCAxeYt5gVAQHo7gf9HNUfZvJYxuGzafV3BnuVTUIXj2DPbJmM
IsCmPBftQhxhoTCcCu1Tn9obgVtPZHWVecocnKAhArh4eJh78R8VnXYItQ5F5wvG
uo2j8+OmWGUg2/7eOYvbhdrTmF819thf8Ewo7H68nZ8w/BGViDVwwJHGggOT2Wha
lnDLn082Y7lZ9fi8YQeDjCDdHPkqMO1s4HaMHSrHVQQd5iMdaHOvn/a82hGiQCw/
zvJL4aDIswwT1v1JdegDusq/Ha8E44nmPcT9qitkj7Aa29HTy6Nr5xTVlvHfOw2C
thjzOuhevnXBuAoTjSOkkHZmP8dAozLGiitL+gYBHj1uDPUUplpl/w==
=RzVp
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/d2tCrZDoDZQ/m/yPKH4V72iEcJ", "n_sections": 10}, {"thread": "fLOHGa3aZEA", "msg": "HvdUilfcudEJ", "author": "David Hopwood", "date_disp": "Jan 10, 2001, 11:18:23\u202fPM", "subject": "Stream cipher", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Simon Johnson wrote:
> Now, this cipher is designed to take a 96-bit key. The key is divided
> into 16-bit portions. Working from the MSB to the LSB the first 16-bits
> are put into the varible, A, the second 16-bits into variable, B, the
> third 16-bits into the variable, C and so on..... from A -> F
>
> Once this is done, clock the cipher once, and we are ready to start.
> To clock, do the following simple procedure:
>
> a = (a * 7) Mod 65537
> b = (b * 3) Mod 65539
> c = (c * 11) Mod 65543
> d = (d * 13) Mod 65551
> e = (e * 5) Mod 65557
> f = (d * 17) Mod 65563

Is that really supposed to be d * 17 in the last line, or is it f * 17?
Assuming it is f (d would be even weaker), there is a trivial 2^48
meet-in-the-middle attack, because the cipher is of the form
h_K2(g_K1(plaintext)), with K1 and K2 of length only 48 bits.
There are better attacks, I think, but there is not really much point
in considering a cipher that falls to a simple meet-in-the-middle attack
any further.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOl0zrzkCAxeYt5gVAQGTpAf+NphladNfSNn7I92gOBtkssu6AGvdjZbN
5m2/2kXlqbS/7bu81ZVE4Vei8Ul2517dsuEoRPTbSiDTNjG9VhSABgUeQAhXHf5b
4BeE8mrFpNGV19ad3Ygxz8vW0pC2oCvj+RAZpwCJW3nBrK3xI8nCz5yulpOHUhm/
z9WULALz07GRBLr2i5OCIIDwYVTQdtKLqHujSkcgDiK3OgSqkC3jY6p5Zdclwg45
iNKLQAYoh7k47RD0wAAedB+JnQIO5fgO9u7yGip2fA7SmZD3wHZZlwJ9bIvo0ZyL
U0B52rOIqHfo18EkBDPZrctqCJkIpG8YzyjEbwaeltvnaoyAld5aLQ==
=9qVy
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fLOHGa3aZEA/m/HvdUilfcudEJ", "n_sections": 9}, {"thread": "fVP0Xe1BAk4", "msg": "xK4nR2Zsjp8J", "author": "David Hopwood", "date_disp": "Feb 25, 2001, 3:20:37\u202fPM", "subject": "fiat shamir", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

No, assuming m is independent of r. Why do you ask?

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOplKFzkCAxeYt5gVAQEtuggAm7rNVMa0maVmX2M1L0qWKiWuwFP21t4T
TqWF0YbAGQ9ytQ+X3iPsyT2p8Fasc3jmtI+Tv97l0udz+VWCp+30MhdsGBuzPrmT
eyb+cx239rIBb3kDZaobBn7sLM/v8/o84zVmsFhAtXmWkUOFFEqMxY5Gy4wXGCzY
qxMLJ5AXcBRuxjjeixW8xDAGdNGknaFIQjC8ZJFiz3H0oEUBIyfS530UfcqyKrQx
LfV1qdYEyiQ3s+g3+CQWg5r2IO/VFFaOMAXqz6D3b7521X1la0ymOXVNIJa+GM8V
pdQ9ZFzoKM5V3v+up83Tdhks0/5r+Z/oK6O7DVNB04WYNzdD8UtZoA==
=QUsZ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fVP0Xe1BAk4/m/xK4nR2Zsjp8J", "n_sections": 2}, {"thread": "kl06YpLiSgs", "msg": "sdcvfUCblZYJ", "author": "David Hopwood", "date_disp": "Feb 14, 2001, 4:09:02\u202fPM", "subject": "Random Numbers", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Joseph Ashwood wrote:
> From here we have to examine what we are doing with this stream. A close
> examination of RC4 reveals that it becomes semi-predictable around the
> gigabyte mark, let's be pessimistic and set it's terminal distance to
> 1000000000 bit (1Gigabit), from for the sake of simplicity we assume smooth
> diffusion of entropy across those bits. From this we can state that each bit
> contains (on average) 127/1000000000 bits of entropy at a minimum, but much
> higher amounts of unpredictability. For the upper bound simply assume smooth
> diffusion across the length of the data being used, this becomes minimum(1,
> 127/length) bits of entropy per bit, it is very important to note the use of
> minimum here because a bit cannot contain more than 1 bit of entropy.

[Below I'll use "entropy" to mean information content; strictly speaking
entropy would be negative.]

Entropy is defined in terms of a probability distribution, which
(particularly in cryptology) must be considered in terms of the knowledge
of whoever is observing it.

- From the point of view of someone who has the key, the entropy of
the keystream is exactly zero.
- From the PoV of a computationally unbounded attacker, this entropy is
also exactly zero, provided sufficient keystream is available to
uniquely determine the RC4 key.
- From the PoV of a computationally bounded attacker who cannot break
RC4 (but who can take advantage of the biases described in published
papers), the entropy of any collection of n keystream bits is just
under min(128, n) bits.

Note that the entropy of the stream must be distinguished from the entropy
of the key. If the adversary is presented with the problem of guessing the
key without access to the keystream, then the entropy figure relevant to a
security analysis is 128 bits. If it is required to guess a particular bit,
given any amount of keystream but without being able to break RC4, then the
figure is just under 1 bit. If it is required to guess n bits, then the
figure is just under min(128, n) bits. It's meaningless to divide any of
these values by the total length of keystream (especially by some arbitrary
and ill-defined "terminal distance"), since the entropy of a section of
keystream does not increase linearly with length; in this case it increases
up to about 128 bits, then levels off.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOondeDkCAxeYt5gVAQFqaQgAinib92Ej1dhaa/yvUKJjX4Ec8kzsI7CX
c4OwJgMRNQUsBY6zf2CeMzPtsS9be+VZpD531LdFomZCicGyv1IMSCSjU+GvpTKa
LGZS6D2H4djWk1oleBdaOHk5Urb35olwga24dHm2ILqn9nxCgopGee7gQ9xl5Fha
Ud6/wha8XHifH/xuydPGuY0T51gCniRg8VseAhSUvEuBov65BI9gL3sHB466CQar
Dxo3IZXu4gSSpw4dRFQqwDdI1yAOiHfbPkl6kO2evKALYUD29/ynNqugCpZQnL++
XXFVMpUjVnUcGrFj2JxtZj2vh8s9EVmqlMcwRA5oH0C/ZL7vXhi/7w==
=UmV+
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/kl06YpLiSgs/m/sdcvfUCblZYJ", "n_sections": 23}, {"thread": "ksqHrYbpWE4", "msg": "URpkP6pyQqEJ", "author": "David Hopwood", "date_disp": "Jan 31, 2001, 8:38:54\u202fPM", "subject": "fast signing", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Joseph Ashwood wrote:
> "Paul Rubin" <phr-...@nightsong.com> wrote in message
> news:7xofwo4...@ruckus.brouhaha.com...
> > What is being
> > signed? Web pages? From a web server?
>
> Just signing the audit log, everytime an audited page access is attempted
> an audit entry is generated, and every so often it is signed (default 16
> entries). It's basically so the admin can do post-mortem analysis.

So why can't you just use a larger number than 16, or sign at given time
intervals? (The latter is better because if the accesses stop for any
reason, the last few entries will still get signed.)

ESIGN is faster than DSA, but I think your problems are more with the
requirements, than the signature algorithm.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOnimXjkCAxeYt5gVAQEG3Qf+P1BYsuofFxq748bVnfK8agNXappTQLqV
YRVteh2dGtu4CvE9H50sdQZfUGRlHEraI0sD3IEQ533bB5aYGI0vkIW1FINtScjL
ZFVyWIgb7V8FkulH31KyJ6Anl6qgcl2jpq3ei46SwSC5iftUqXC1xmPAdx9L5SA9
Ph07SHP4rzzuNlOSP6lOLw8M2pR08DoukcK+PCD3aEigLXQPdb8Ys5atauQu+0cQ
53SyAIvqgYcR97Bt6zYSqwM7c70Ils66rkWoBrAhGP9m95+Kbja7nfsrBgemsu0N
sItKJ2mxRCCyOzWHjFGZJY2+D6WBtmAwYvIEotb/w57oTetfCit/ug==
=aQJe
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ksqHrYbpWE4/m/URpkP6pyQqEJ", "n_sections": 47}, {"thread": "ksqHrYbpWE4", "msg": "w59of-Ez3PsJ", "author": "David Hopwood", "date_disp": "Feb 1, 2001, 2:22:30\u202fPM", "subject": "fast signing", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

DJohn37050 wrote:
> Thanks for pointing this out, I thought it was clear from context, but
> obviously not.
>

> When compared to the modulus, the public exponent must have 160 bits of


> high order zeros, according to X9.31.

How very odd. I can see that this would preclude small d, but I don't
see why that would lead to any security advantage, given that there are
lots of other ways to have an insecure d. Doesn't it just introduce a
gratuitous incompatibility with other RSA standards?

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOnj4MzkCAxeYt5gVAQHx1ggAoClGJxccQXSo/bZtN3qeXqj4Mvl3UPNq
2L5nKY5f6MCHrC/YGOR3IhLLVYgAXoduUjTRMbhTnBP4EHC67KlNO5fT6Xx46wLw
vbKDgrEyo5c2RKVC2swG0zAsk5jZjafXKhO6PjqUEJHyn8nf4VOgPnK+PFcyFwV3
agdIP4QZIrmqUrAeRYJ5elkwHlL7zTg5Q/b7bny5mo4yesNQkO9UAl0wAlFpJu8e
VkXj8IT5U5gCxeERPJ8Sd+gge+5yptFNSy8G5aa4wBSWryAIkrnOfVPt6O7l1y6I
srDmX/nikkBk6E7LLoKgKhvWLq16Ch2mYOkcBV6j4uJoTWKaJWE7IQ==
=ezbM
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ksqHrYbpWE4/m/w59of-Ez3PsJ", "n_sections": 47}, {"thread": "ksqHrYbpWE4", "msg": "SMKeC02-sDgJ", "author": "David Hopwood", "date_disp": "Feb 1, 2001, 6:56:01\u202fPM", "subject": "fast signing", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Joseph Ashwood wrote:


> "David Hopwood" <hop...@zetnet.co.uk> wrote:
> > Joseph Ashwood wrote:

> > > "Paul Rubin" <phr-...@nightsong.com> wrote:
> > > > What is being signed? Web pages? From a web server?
> > >
> > > Just signing the audit log, everytime an audited page access is
> > > attempted an audit entry is generated, and every so often it is
> > > signed (default 16 entries). It's basically so the admin can do
> > > post-mortem analysis.
> >
> > So why can't you just use a larger number than 16, or sign at given time
> > intervals? (The latter is better because if the accesses stop for any
> > reason, the last few entries will still get signed.)
>
> It's only the default that is 16, admins can set it to any value up to
> 2^31-1. There is actually a time-based signing operation happening along
> side this. For heavy sites this is the option I give them right now, set the
> distance between entries to 1000000000, and set the time between entries to
> match their needs. I just want to get beyond that because it requires them
> to do extra configuration.

If I understand the application correctly, the only disadvantage of
signing with a distance between entries greater than 1, is that an attacker
might be able to compromise the host and then tamper with the log entries
before they get written to some kind of append-only storage (for example,
another hopefully-more-secure host, or write-once media, or a
tamper-resistant device). Is that correct?

If it is, then how about the following: queue requests to the server so that
they are only processed after the block of log entries that includes the
request has been signed and written. That way, any audited event that causes
a compromise is guaranteed to leave an entry in the log [*]. This will
introduce some latency, but if you sign every 0.01 seconds, say, then the
added latency will be negligable compared to any network delays. There
would have to be enough memory to store (0.01 seconds + time to write to log)
worth of requests in a queue, of course.

[*] assuming that the compromise occurs only as a result of processing a
request, rather than receiving it.

> > ESIGN is faster than DSA,
>
> I'll look into it. NOTE: brief look "
> NTT has led patent applications (Japan, USA, Canada, UK, France,
> Germany and Italy) on the techniques used in this submission. NTT will
> license any resulting patent in a reasonable and non-discriminatory
> fashion."

Tatsuaki Okamoto, Tetsutaro Kobayashi (NTT Laboratories)
"On the Security of EPOC and TSH-ESIGN,"
Submission to IEEE P1363a

says:

# Nippon Telegraph Telephone Corporation (NTT) has submitted EPOC and
# TSH-ESIGN to IEEE P1363a. Should these submissions be selected for
# inclusion in the IEEE P1363a, NTT hereby declares that it is prepared
# to license its patents, both granted and pending, which are
# necessary to use and/or sell implementations of the above submissions
# to an unrestricted number of applicants on a worldwide, non-exclusive,
# royalty-free basis.

TSH-ESIGN is the same version as submitted to NESSIE. It's extremely
likely that it will be included in P1363a.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOnnwSTkCAxeYt5gVAQHqkAgAwSq1o9XEfKcvCrUUzbBUFGq0OE+3O9On
dGsQoTYmc0++MYRtYt2NdjP8/+S0azDeqzvweGkW8G7Lsmu2xD9Wze4UAR4ZK0I7
4p9cUzoxZgxhb7seNq5UZvt6f7rFd+ttd8tPMBS6nDFV3OzRLanU+2XS38+3uaRs
qXvNVXvdj7Y948jRN6RbjT6k8U5djyugP3Q0k31+5o1NRhRLaoUAwy1TBSiZhcqn
lfA3B0ddNoa02Iol+ULc94QVrGYapVQv+H+K54BUsVbD046nUrxC051YiYX/opuF
R33g8ReqGINQ7M/Uiq0lyHQfhdAcemqcx8IYPtMQlJlsIMCCR2894w==
=hGdM
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ksqHrYbpWE4/m/SMKeC02-sDgJ", "n_sections": 47}, {"thread": "mMU-VvEJud8", "msg": "iosMbS7nnKcJ", "author": "David Hopwood", "date_disp": "Jan 20, 2001, 12:11:15\u202fAM", "subject": "A Small Challenge", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

rosi wrote:
[snip]

The original post in this thread didn't reach my server. Since I assume it
also hasn't reached a fair proportion of Usenet, could you please repost
it (just to sci.crypt)?

I have done some research on the subject of public keys that are kept
secret, and schemes in which one private key corresponds to several public
keys or vice-versa, but I haven't been able to reconstruct from the replies
exactly what question was originally asked.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOmkDtjkCAxeYt5gVAQEnOQf/UHwEqcSimPC5ZO4YTye4T0LNawJPXGlb
f32x1vbdXc9KUGsorEgdGWmyAqtBCnsZj8XxE344V0PPpv//Aks22O5R77uLmC5F
pQ5vo2HB4paCDx5F3GwXCN52Lx8n21PyY79wVPFOifbjttsGq5onItZHgEsY0rcb
BMgqbpFJxV4P+HzfX8JXWuv0F7FBhUsOYDov+t0m+jgezc8su88ZYHgLU5b31CfW
pyoPqk3lwrYM8wgVJSBgiV2tokUk9WNrgowIGMkl3yJoEFMyP5dFbUTcSm2/mO0r
ImlwR9i2VGtnCr2OvpJZBQ1QPV8fphsMrx357gnv2s25VFe5eaMRug==
=FeUr
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/mMU-VvEJud8/m/iosMbS7nnKcJ", "n_sections": 28}, {"thread": "pwW-ptSm0fk", "msg": "x3_79lh5DSAJ", "author": "Kat Hopwood", "date_disp": "Feb 23, 2001, 8:25:20\u202fPM", "subject": "question1,2,2a,3,4,5,5a,5b,5c,6", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

h4jiwk9j wrote:
> 5.My user name is the encryption of my dog's name.

Your dog's name is Benjamin. Does that answer question 5? :-)

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOpcNWzkCAxeYt5gVAQH9DQf9FezoTHbUU4Zx1qBmmyNB+cwNL//DE/bU
P9T1qvoP6eYM8Xx420NlRwNCjK0pO/Org+ntBQvq3aUoKdp5Br6FIAPQD3Qp48pf
iA8mF3gi4iOsk4cI5idzcblEQTZk7/InceDwzHABVWE/xmhYTa1gwAHj+EI+V4Om
kRGiY1rq28PpV3qJwB53KbUeWPPQmiWcLb4ISF3p1Zxl6VGajoB3BDsoMZoQEm0b
L/4LZS4gnps2cvB5CTU5CK1mDi3DX6TFu/mTQNUfQR8II0yPLP46C3UIE7B1EK1h
IDSfgID2c8tlswENZGp1q095D8hZ2zTcfpf/FC9heAfn/oeocP1QZg==
=Tf3Y
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/pwW-ptSm0fk/m/x3_79lh5DSAJ", "n_sections": 6}, {"thread": "uhgfXvreE2o", "msg": "OJPJFGNqgsgJ", "author": "David Hopwood", "date_disp": "Jan 10, 2001, 11:27:01\u202fPM", "subject": "Bluetooth security?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Goldberg wrote:
> kihdip wrote:
> > The E0 algorithm is bluetooth specific.
> > This must be a drawback as I see it. The paper from Bell-labs
> > concludes that E0 should be replaced by another known algorithm, for
> > instance AES.
> > - Sounds reasonable.
> >
> > Kim
>
> <nitpick>Except for the fact that E0 is a stream cipher, and AES is a
> block cipher</nitpick>

Why does that matter? Bluetooth doesn't require a stream cipher, it
just happened to use one. Note that Bluetooth is a packetised protocol
that handles error correction at a different layer to security, so almost
any block cipher mode would work.

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOl0VqjkCAxeYt5gVAQG1+wf+JBkmEgGCsKZIucKFi2IH52d7Fl6emgnW
IJwRV9XoNzf1Fnt7JQ/sgX3v9lOSS6rOTBR+w1qOAJ5YpW4zApR91CHIG9R5qYyu
HC2rSEDXQEfk/KfspHHR5Gk6W/RUFr3xWPy7Nruhyae7eIUwcyJE2h6OghQGV2yK
jHj9ZGRJscRmuwUqk9wNIUc5EZbKLndHt2l+w87ZMJd77DopxTn7karqyB3IhxR5
DipajwFyepAtEl0S+s9X4H2TEu2rEiwGdc23l9pZL/7PhA20P8g25/muQfq2ihYd
h8KpvSAyFePvdZaKwbbtLKU/7cTDX46gX9FaaDOSrqcpTA4+uokbGA==
=vhT7
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/uhgfXvreE2o/m/OJPJFGNqgsgJ", "n_sections": 18}, {"thread": "vNB1jXzxVa4", "msg": "JBPS7GFCp30J", "author": "David Hopwood", "date_disp": "Mar 4, 2001, 8:02:42\u202fPM", "subject": "The Foolish Dozen or so in This News Group", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Anthony Stephen Szopa wrote:
> I understand your optimization explanations and those given in the
> few documents I have read. I was also familiar with the fact that a
> block of data is read and stored into the cache and the reasons for
> this. I believe that the assumption in the documentation and in your
> casts of doubt was that the opened file that is repeatedly written to
> is never instructed to be closed.

No, that was not the assumption. fclose (with a return value of 0,
indicating success) does not guarantee to write changes to disk. You
may not like that, but what you would like the OS to do is irrelevant:
the behaviour of Windows 3.1x, Windows 9x, Windows NT, and almost all
variants of Unix is that the changes may not be written to the disk
controller, if those blocks are written to again or if the file is
deleted before the cache is flushed. In all modern disk drives, the
disk controller will also do its own caching.

(IIRC Win3.1x and Win9x have options to disable write-behind caching,
but an application program should not rely on it being disabled.)

And yes, this does mean that if power is lost suddenly or the OS crashes,
some changes may not be written, even though fclose succeeded.

> As I have clearly stated above, the source code not only makes the
> fclose() command but it checks for the return value from this
> operation. If the return value is NULL then the fclose() has failed.
> And if the fclose() succeeds then the return value is zero.

You're not only incompetent to write secure overwriting software,
you're incompetent to write any C program, if you think fclose
returns NULL on failure. RTFM.

> You do have one last hope. His initials are Bill Gates.

No, this time it's not Bill's fault. Write-behind caching is the
expected default behaviour on any reasonable operating system (and
besides, the disk controller still caches even if the operating system
does not).

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOqHn0jkCAxeYt5gVAQERwAf+N72QfOUdOvYEruaa51BRKYSmwezV/8mS
86GjegCrC4eO2D5dYxqszInyHq4ETYUM9VPd97e2KApceBCozxWd38h55w7NXBrp
TEJO+6vmRnI4JI89xdZu/qyTRJCrBJ6xhdHjen2xV4sf7IDkdfAvZbOtQGO1PuGs
gxxCUjnkfvyXwJyktMyx4vJAeUtLmfECK75Xw8t2ogBOD1g4jpBWLcIce9Zcy3qS
Y0MvwjuBVpWX0Jwclnw2OsLhOmq9UfvsiW+j+k+e8lUUGFt9NtBp5Buorb4ds9ck
9R3ThxhX7K+l8JVjj9h7h90hY5774N2UoKFrpqkmGQj3CAdxVWODIw==
=5xxT
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/vNB1jXzxVa4/m/JBPS7GFCp30J", "n_sections": 100}, {"thread": "xoflVKsCX4Q", "msg": "PLHc90dqRPoJ", "author": "David Hopwood", "date_disp": "Jan 5, 2001, 10:28:54\u202fPM", "subject": "HMAC-MD5 problems", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Bob Luking wrote:
> I've encountered some problems running an HMAC-MD5 engine
> I've built.

[snip]


> result of inner hash = a71420c4f73e7966950243f898568cda
>
> start again...

[snip]


> # a71420c4 result of inner hash
> # f73e7966

This is the wrong byte order, I think (assuming you printed the
inner hash in little-endian order). Try c42014a7 66793ef7...

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOlaQTzkCAxeYt5gVAQHplwf8DWKR/WOpDOJ2v4uPvRJx/CBzkUpyBcSD
CQQOFBbvMFtebSkfSPOA5XgJq+taesDYS5JPtlozMnwjrnrJRUWxD6o1PSH4G1g8
kb8ElUgyU/jzufDC/VRfK6GKDaKQyyhMmXIOJs7DZffOpwBasdOI9Dvwd4FcR5TU
aaD07x5NR1Z4cOdWzukWPo70bF88r6iMVmhOQsy54mxiB2PHRDe8FXaZhEFxMpM2
4agcos77AbIzPu5PdKIFMN9pNvRYU5RyukNerRBZMyClAZKRbCbv9xqYYuJU0PAM
eVSTk9yA5mF1PVSPQs3IF3EK3rPxa0QRvpuOJF7nzEE9GyBq2eXFjA==
=7am0
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/xoflVKsCX4Q/m/PLHc90dqRPoJ", "n_sections": 6}, {"thread": "yIydAKWFX7A", "msg": "YECJuU7MRawJ", "author": "David Hopwood", "date_disp": "Jan 9, 2001, 6:23:59\u202fPM", "subject": "NIST hmac fips", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

The only minor difference I can see is that RFC 2104 says

# The key for HMAC can be of any length (keys longer than B bytes are
# first hashed using H). However, less than L bytes is strongly
# discouraged as it would decrease the security strength of the
# function. ...

whereas the draft FIPS says

# The size of the key, K, shall be equal to or greater than L/2, where
# L is the size of the hash function output. ...

This is not technically a generalisation, though.

Also the RFC talks about truncating the output to a given number of
bits, while the draft talks about truncating it to a number of bytes.
(In practice, no-one truncates HMAC to bit lengths that are not a
multiple of 8, so this makes no real difference.)

Neither the RFC nor the draft FIPS explicitly define "byte" as octet,
which they should (although that is implied in the draft by stating
that the input block size of SHA-1 is 64 bytes, and in the RFC by
stating that the output size of MD5 is 16 bytes or 128 bits).

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOlptOjkCAxeYt5gVAQEMOQf/VghpPrjFrlEMap9l8OBI9VRh8Ruiv/tR
LSUVnUK894jwitTs1mYyRkBcq6T4+5pOFE2JjBkLbM8RN3cFSum7DwDHQ+ebyy71
P/+s8MVItF1q9jMNw5xYn4191Zt35sYgkkRhUxKy395LhnvXbPufJUnpqmw3jdBi
kYFaJqCvXsrNTJRsHHaANetn9p86/iNqDW08GD+r0Hp0pqm54nl30l9EO2ocmHFk
UXKUT/VpbyKn6Rxb6HpKBiRW4G73B3znHgeBB5509Q/UmHrE8Ji7I2Z1Nt8nGzGw
UH7sojnkFRa2/Fo+LdOEK9u9TRLiGgU1zKLs+1u/jrp/V60x/M5rjg==
=a9eB
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/yIydAKWFX7A/m/YECJuU7MRawJ", "n_sections": 5}, {"thread": "zkhup_RqUVE", "msg": "RxOjYNUSElkJ", "author": "David Hopwood", "date_disp": "Feb 4, 2001, 1:24:48\u202fAM", "subject": "New checksum algorithm", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Terry Ritter wrote:
> On Fri, 02 Feb 2001 22:13:58 +0100, in
> <3A7B2316...@t-online.de>, in sci.crypt Mok-Kong Shen
> <mok-ko...@t-online.de> wrote:
>
> >I like to take this opportunity to ask a question of ignorance:
> >Why does e.g. CRC-16 use a polynomial of degree 16? (I had
> >expected one of degree 15, since that can be represented with
> >16 bits, while one of degree 16 can't.) Thanks in advance.
>

> The remainder from a degree 16 poly is a degree 15 poly, ...

Nitpick: ... is a poly of degree at most 15. The degree is the index
of the most significant *non-zero* term. (By convention, the degree of
the zero polynomial is -infinity.)

- --
David Hopwood <hop...@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEUAwUBOnyLGjkCAxeYt5gVAQHLZgfyAn+/nvpHxBXGEBa3zNLhncDLou5d6KCw
1Dot/fCS7qI1NOKl+7nulOozjTOh9J09JvwOwxkF+9X0PaoRGmfAm3xmU+Am5kwf
DY7SePM3Vn1ISIIR/gPcS6Q1K9SG317KksWkyYkb05gCqzwPC7hiS7uB6LNQqRap
qkfXUtvRJUnVzMAsTpyuTQQX22SpJFiqYCGdWG0C37Ql6lU/S7j2Egjncq4hF6aE
uCyKd71rEQ+XHZiUUzTL95mjlNp5BH/N9oT/hVVxnVLdjBa0oLpQCW1aUEU44+RI
CUXU4w5GrapNVIXXt+u+i4TEovhe2yFcvw080bZYCTL+5HrUzWui
=Ye5D
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/zkhup_RqUVE/m/RxOjYNUSElkJ", "n_sections": 31}, {"thread": "0_vF3PQAoxE", "msg": "TnQPdRzFQ4EJ", "author": "David Hopwood", "date_disp": "May 30, 2001, 7:43:51\u202fPM", "subject": "Is this a weakness in RSA key generation?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mark Borgerding wrote:
> I found that pgp 2.6.2 may sometimes generate a private exponent n
> that does not entirely match the RSA spec (as I know it)
>
> An RSA private exponent d
> 1) d*e = 1 , mod (p-1)*(q-1)

That is indeed how it was stated in the original RSA paper:

Ron Rivest, Adi Shamir, Leonard Adelman,
"A Method for Obtaining Digital Signatures and Public-Key Cryptosystems,"
MIT Laboratory for Computer Science and Department of Mathematics.
Communications of the ACM, February 1978, Volume 21, Number 2, pp. 120-126.
http://theory.lcs.mit.edu/~rivest/rsapaper.ps or
http://citeseer.nj.nec.com/rivest78method.html

However, it's sufficient that d*e = 1 (mod lcm(p-1, q-1)).

> which implies
> 2) d*e = 1 , mod (p-1)
> 3) d*e = 1 , mod (q-1)

2) and 3) <=> d*e = 1 (mod lcm(p-1, q-1)).

> pgp seems to occasionally generate a key that satisfies 2&3, but not 1.
> I know that stmt #1 implies 2&3, but the reverse is not true.
>
> My question is: is this something to worry about? What effect would
> this have on security of the key.

No, and none whatsoever.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOxWFjDkCAxeYt5gVAQEVpAgAjLvh/Jk6u1j4bjwAmI842zHzJ2v1EWpC
NB6oAN+1BY5Cpa1jFiy9TaudkKZ3aLaWyT2WX+eFEHzt7k2jffYr62LMX88qhYRh
K0zD3lzYgRudkSjeB2bxtcauq2AdfNQJ6KSH6F/NDX0b32AEyY+shwILR2Z+6MDY
1417sPJiOQrJIH58eeHveQqEifdUpVFYwxRKbI7vzn8tMEyeLl8ZuUFJgO+j5MWf
s7nfI/F7jTGP8Z6NXGIqoD7fy1VU4QCdoCyL5C49DGBH8WdEWR/TulNm9kwGK72r
ic2B3cepj0CJhCepFzpLHh4oACPArz5+U0+2ayfGvyDGlrZILr7BUQ==
=C12t
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/0_vF3PQAoxE/m/TnQPdRzFQ4EJ", "n_sections": 8}, {"thread": "1Wn2aDUaeS4", "msg": "7_7pOwq5tbsJ", "author": "David Hopwood", "date_disp": "Jun 10, 2001, 10:28:08\u202fAM", "subject": "cubing modulo 2^w - 1 as a design primitive?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> "Tom St Denis" <tomst...@yahoo.com> wrote in message
> news:JMsU6.70742$Be4.23...@news3.rdc1.on.home.com...
> > "Mark Wooding" <m...@nsict.org> wrote in message
> > news:slrn9i4l7...@tux.nsict.org...


> > > Tom St Denis <tomst...@yahoo.com> wrote:
> > >

> > > > According to Maple, phi(2^64 - 1) == ifactor(2^64 - 2) =
> > > > ``(2)*``(7)^2*``(73)*``(127)*``(337)*``(649657)*``(92737)
> > >
> > > I've no idea what ``(.) or ifactor(.) mean.
> > >
> > > Anyway, 2^{64} - 1 = 3.5.17.257.641.65537.6700417. \\lambda(2^{64} - 1)
> > > is therefore \\lcm(2, 4, 16, 256, 640, 65536, 6700416) = 2^16.3.5.17449.
> > > Which has 3 as a factor.
> >
> > I thought if p is your modulus, the order is at most a multiple of p-1?
> >
> > How do you explain it being a bijection for p=255?
>
> Arrg... I'm a retard.... it's
>
> phi(2^64 - 1) = lcm(2-1,7-1,73-1,126-1,337-1,...)
>
> Right?

No. I'm guessing that ifactor(n) finds the prime factorisation of n (you
shouldn't expect people to know Maple function names). In that case,
you're factoring the wrong thing: the factorisation of 2^64 - 2 has no
relation to phi(2^64 - 1).

You're also confusing the phi and lambda functions, I think. Their
definitions are as follows:

Let p_1^e_1 * p_2^e_2 * ... * p_k^e_k be the prime factorisation of n > 1.
Then
phi(n) = product[i = 1..k](p_i^e_i - 1)
lambda(n) = lcm[i = 1..k](p_i^e_i - 1)

(HAC section 2.4 gives a different but equivalent definition for phi(n).)

> ARrg... sorry guys, I didn't give this alot of thought :-(

<cough>.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOyKtdjkCAxeYt5gVAQGBMgf9EDvp7HDBnVug0fFnrhd37nzQkNJ+zkhH
RsO8WvTVq8sgwgR+s5s7e41ZWFhL0nkJl6r+DtPKKHjH71CWoJEuG0o4LCz3u2nY
sWfuOmL/Izjr2g6pr5TJt75vIGhpVttXWZkQxU0UhxJvqREPc78gNpp3QAcBq+IW
QkYR+sP66LtPSxAR0rWjqyG1ECQHc9q+gtYqmIPclCTbzjR1PYn7Fmw+/b9LXem6
AKqa32lL3KReqS28etd/l2op+ue3ikiO8aEJ2ruL0TJA+H1q67DlD04ZiLxjdv8p
C1PL7KF2/ZirzKFTymzMZRHyPT5agIyfJn5Awa7A2YI19iPpqbYPjg==
=1g93
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/1Wn2aDUaeS4/m/7_7pOwq5tbsJ", "n_sections": 52}, {"thread": "1fod3U_v330", "msg": "hk4Gj8E4b5gJ", "author": "David Hopwood", "date_disp": "Jun 22, 2001, 6:59:59\u202fPM", "subject": "Seed selection in Blum Blum Shub generators.", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> "Mark Wooding" <m...@nsict.org> wrote in message
> news:slrn9j6m3...@daryl.nsict.org...

> > Doing this properly-ish...
> >
> > Let n = p q. Let's look at cycle length for x |-> x^2 mod p. (mod q
> > will be completely symmetrical, and then we combine the cycle lengths
> > with lcm if we really care.)
> >
> > A cycle will have the form x, x^2, x^{2^2}, x^{2^3}, ..., x^{2^k} = x.
> > If we write the order of x mod n as ord_n(x), we see that we've found
> > that 2^k = 1 (mod ord_p(x)), i.e., k = ord_{ord_p(x)}(2). We'd like k
> > to be either tiny (so we notice) or enormous (so we're safe).
>
> This is nonce. There is no reason to suggest that the cycle won't have a
> leading edge...

Think about it more carefully. In the paragraph quoted above, x is an
arbitrary element. There's nothing wrong with Mark Wooding's informal proof
(although as he says, it isn't really necessary to use this method, since
the cycle length is large except with negligable probability anyway).

[snip]


> Not only that but just toying around with BBS lends me to think it's none to
> good.
>
> I tried about 13 diff bases for pq = 77, and none of them had a period over
> 4 elements and some were very degernerate. like 22^2 mod 77 = 22.

That isn't surprising, since numbers this size are not difficult to factor.

> I would imagine that the cycles are longer as you get up there, but unless
> you pick a generator as your base the period is not guaranteed at all.
> Let's say that you have pq = 768 bit number. such that p,q are 384 bits
> each. Let's suppose both p and q are strong primes.

I assume you mean safe primes.

> Then some base will
> have a period of 1, 2, 4, p-1, q-1, 2p - 2, 2q- 2, (q-1)(p-1), 2(q-1)(p-1)
> or 4(q-1)(p - 1) [I forgot a few but you get the point]

The possible orders are the factors of the group order lcm(p-1, q-1), i.e.
{ 1, 2, (p-1)/2, p-1, (q-1)/2, q-1, (p-1)(q-1)/4, (p-1)(q-1)/2 }.

> Let's say some base G makes a sub-group of order p-1. this is a group with
> 2^384 elements. In order for the period of G to be maximal in the
> sub-group, 2 must be a primitive element modulo p-1, which clearly can't be
> since p-1 is even. We require 2 to be a primitive element since we are
> doing 2^k mod p-1.

No, we don't require that, since the order of *any* element of Z*_n must be
1, 2, 4, or >= (min(p, q)-1)/2.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzPNdzkCAxeYt5gVAQEm3gf/Vbhpyfm4iP5Qfq4h0DbVb72EMwb2E+7w
u8zSeHVjS9PSNi7H6f47/6XcfsYCF1YSQPFuP1QOQ2pm7B/yQCWvw8jupqyduO6J
5A4Bqmq7wx7GmomZeU7gd0fsT71lU7gYaYeBk9+Y/cHOuD/ELV3VVfaIXpqeLoB0
O3olkpfKgelZIHNLnlnjQ+X7mrPYK3dX2tBJS6of8mYFaBQ+tEGBxGza1yhL1lqw
ORTbQm2SmfLHF5O1nL+OrUJmpYrTXO9q7qHYp9afpKIF+LXvR/xilwjlYZhgEkNw
9FbyWkM4G9s65qbaP3OZywHxiEcjNarbRwEGwlxsPZFSS4WWORs2Ow==
=3oOW
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/1fod3U_v330/m/hk4Gj8E4b5gJ", "n_sections": 19}, {"thread": "1fod3U_v330", "msg": "Skji5Q9aHv8J", "author": "David Hopwood", "date_disp": "Jun 23, 2001, 11:16:52\u202fAM", "subject": "Seed selection in Blum Blum Shub generators.", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> "David Hopwood" <david....@zetnet.co.uk> wrote in message
> news:3B33CDEF...@zetnet.co.uk...

> > [context: let p and q be safe 384-bit primes, and consider the group
> > Z*_{pq}.]


> >
> > The possible orders are the factors of the group order lcm(p-1, q-1), i.e.
> > { 1, 2, (p-1)/2, p-1, (q-1)/2, q-1, (p-1)(q-1)/4, (p-1)(q-1)/2 }.
>
> And any linear combination thereof ... 2q - 2, etc... or is that wrong?

That's wrong. A cyclic group G of order k is isomorphic to (Z_k, +). Consider
the orders of elements of (Z_k, +); clearly they are the factors of k.

> I always though the order of any element can be any linear combination of
> the factors of phi(p) or lcm(p-1,q-1)?

No. Also, I think you're still confusing phi and lambda; if p and q are
prime, then

phi(pq) = (p-1)(q-1)
lambda(pq) = lcm(p-1, q-1).

> > > Let's say some base G makes a sub-group of order p-1. this is a group
> > > with 2^384 elements. In order for the period of G to be maximal in the
> > > sub-group, 2 must be a primitive element modulo p-1, which clearly can't
> > > be since p-1 is even. We require 2 to be a primitive element since we
> > > are doing 2^k mod p-1.
> >
> > No, we don't require that, since the order of *any* element of Z*_n must
> > be 1, 2, 4, or >= (min(p, q)-1)/2.

I meant 1, 2, or >= (min(p, q)-1)/2; it can't be 4. I was sure I'd corrected
that before posting, but obviously not. However, you're right in pointing
out that I had also missed out another essential part of the argument; see
below.

> This is not true. You are not doing
>
> g^x mod n
>
> You are doing
>
> g^(2^k) mod n = g^(2^k mod phi(g)) mod p
>
> So the order of 2 modulo the order of the sub-group that g generates modulo
> p is important.

Yes, but Mark Wooding already took that into account:

# Now we look at the order of 2 mod ord_p(x). It must be a factor of
# \\lambda(ord_p(x)),

So, since in the example ord_p(x) is a factor of 2((p-1)/2)((q-1)/2), and
(p-1)/2 and (q-1)/2 are prime, we have that the order of 2 mod ord_p(x)
is a factor of lcm((p-1)/2 - 1, (q-1)/2 - 1). Mark had set p = 2r + 1 and
r = 2s + 1. If we similarly set q = 2r' + 1 and r' = 2s' + 1, then the cycle
length is a factor of lcm(2s, 2s') = 2 lcm(s, s').

So if s and s' have no small factors (except 1), then the cycle length is
either 1, 2, or large.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzSynjkCAxeYt5gVAQEgLwf/by/RIlf7kXruwEhSH1TtZdyZ1PVOuxJO
BGuN9NBqRrqp71HI0ZMIbPjzQu2iqMiq0kexj9MDfYF8GpweTpC+ivZXE5KoIKHS
iCGeygmq3OtqgZkwF532Znp+pha4aKLVaIYoM8GvlYjImIf3iGJyC963SZNm7OAQ
rxxnB+lVqPGhbODChobZ98zNxRAwChfflzS+K41DB2ofoC0RI1LC9goh2WwPQi3+
bB1HTGPgawtkjCwAzMuYix3pGlWOO4HL4f81exFz+J40foRWBkenyhOwAMtXOUvp
MNFQyqkXIJP5lCV6YMVtCyb+YejFkXwiAl13C++hx4E7GI2SuIYysg==
=uESN
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/1fod3U_v330/m/Skji5Q9aHv8J", "n_sections": 19}, {"thread": "1fod3U_v330", "msg": "gf3c80cvmAYJ", "author": "David Hopwood", "date_disp": "Jun 26, 2001, 12:01:15\u202fPM", "subject": "Seed selection in Blum Blum Shub generators.", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Terry Ritter wrote:
> David Hopwood <david....@zetnet.co.uk> wrote:
> >[...]
> >Mark had set p = 2r + 1 and
> >r = 2s + 1. If we similarly set q = 2r' + 1 and r' = 2s' + 1, then the cycle
> >length is a factor of lcm(2s, 2s') = 2 lcm(s, s').
> >
> >So if s and s' have no small factors (except 1), then the cycle length is
> >either 1, 2, or large.

More precisely, it can be proven by this argument that the cycle length
is 1, 2 or large (but in fact 2 is ruled out for a different reason; see
below).

> In my experience traversing the states and cycles of tiny BB&S
> constructions (see
>
> http://www.io.com/~ritter/ARTS/CRNG2ART.HTM#Sect7.2.2
>
> ), I have never found a cycle of length 2 in a "special primes"
> construction.
>
> Do you have or can you construct an example of special primes BB&S
> construction with a length 2 cycle?

That would require the element 2 to be of order 2 in Z*_{lambda(N)}.
If lambda(N) > 4 then this obviously can't occur, and lambda(N) must
be > 4 since p, q >= 7.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzixsDkCAxeYt5gVAQH0hggAxQFSkdyr+RaORERSeS6FJMaaXd9Qgppi
I4jm0Mb3nDVgycl4ySrz2j9f/buFEHvi9eq3QGYNL82eOLmhM2Qq4DRSbUwpemCj
QoMWZae7ka91cNQkuwq/zlPVzFMP9OOTKygIfSr+D/HRWKpjCmc/aKvOZDkcRqtv
VjlheZxtTQrKRzYUCygXpimye34DF0gcUXS0zsBKBLGA3MUWUTBj5qrA3mFdnHmL
ygrpF2XbirOZIJ3oKdMWAML1aQCXQjvIUHzku88oSUyS10hCfy90irV8CrMFSDun
QKkQ8uyBo6tsLILFfKJxvd4573md6D9F4qLXtdcxIyry5ZMlYMuA0g==
=GdfS
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/1fod3U_v330/m/gf3c80cvmAYJ", "n_sections": 19}, {"thread": "2zws-x4v-bI", "msg": "54iFkzzG3ykJ", "author": "David Hopwood", "date_disp": "Jun 20, 2001, 4:54:59\u202fPM", "subject": "Counter mode, the better way to do it?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tim Tyler wrote:
> David Wagner <d...@mozart.cs.berkeley.edu> wrote:

> : And frankly, I find it hard to get worried about chosen-plaintext
> : attacks that use 2^64 chosen plaintexts. This is so far outside
> : the realm of the resources of any real-world attacker today that
> : it seems hard to justify putting much weight on such considerations.
>
> Look at it another way then: say the cypher is used in CTR mode.
> You have one block of known plaintext. From that you uncover the
> keystream for that block. You look at the next cyphertext block.
> *Immediately* you know that there's a plaintext that is impossible -
> and cannot possibly be represented by it.

The "attack" here is to query the algorithm once, and then claim that
the result of a second query will not be the same as the first one.
The probability of this claim being true for an ideal 128-bit PRF is
1 - 2^-128. The probability of it being true for an ideal 128-bit PRP
is 1. Therefore the advantage of the attack is 1 - (1 - 2^-128) = 2^-128.
This is negligable by any standard (and is of course entirely consistent
with the maximum advantage q^2 / 2^blocksize stated by David Wagner,
since here q = 1).

Then again, I'm completely sold on the idea of advantage as a way of
evaluating cryptanalytic attacks, and it sounds like you're not.

> The advantage this offers may be small - but I find it seriously
> questionable whether structures with such properties should be
> used if alternatives which don't exhibit this sort of issue exist.

Small is a considerable understatement. Personally I consider an advantage
of 2^-50 or so to be negligable (this is a *really* conservative choice),
which suggests that I could safely use an ideal 128-bit PRP in CTR mode
as a PRF for up to about 2^39 blocks, i.e. 8 Terabytes.

Of course a real-world block cipher is not an ideal PRP, so in practice
I'd restrict the length to less than that, but it shows that birthday
coincidences are not a serious problem for 128-bit blocks. (They are,
OTOH, a serious problem for 64-bit blocks; in that case for the same
conservative security bound, I'd only be able to use the cipher to
generate 2^7 blocks, i.e. 1024 *bytes*, before a key change.)

> My other concern is that it may be possible to build a dedicated PRF that
> is smaller and faster than a similar construct using a block cypher.
>
> Block cyphers have other primary design goals besides being PRFs.
> It seems possible that you could do better with a specialised design.

Efficiency is a different argument to security. I agree that it seems
reasonable that you could make a dedicated PRF a little more efficient
(although probably not by much).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzENLzkCAxeYt5gVAQFTNggAnU4vIsGZcndtvlkdPT9Nb2C8k8x2tHxA
7Vw87Ht8xnbqqFioco91ix07Dq5/+RN3jG+8BxcZ8QRpAFltmcH9Q9/SzIIcMYBy
rjESByIAEPn2MziUbeHN/8TvAcSNIPgXmDKc3G0xDTn2rzlxHyZeiet0oOff6D+7
C0VlCEghsuedPHcKgih5sDflaMg1cCrjkraG5uvqUhqM29vngGUVKL0V8WZSDJAJ
UmxN1yohX+PYSkVSfQy32cLeFZ0+AHcq5rIBSzYoo29yc64Z6TgkRs/SL72YcXRQ
nzjhos2Dep/lkJvlp47TM0JR532ZeERzPG2kvq5z9Q50Plz0mMGWtA==
=Pq+u
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2zws-x4v-bI/m/54iFkzzG3ykJ", "n_sections": 100}, {"thread": "2zws-x4v-bI", "msg": "V6IaLPTSvbMJ", "author": "David Hopwood", "date_disp": "Jun 23, 2001, 10:13:44\u202fAM", "subject": "Counter mode, the better way to do it?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tim Tyler wrote:
> I am looking for a way to distinguish Rijndael from an ideal block cypher
> with the same size blocks, the same size keys, the same size everything.

What you're looking for isn't well-defined: there is no such thing as an
ideal block cipher in the standard model.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzSkBjkCAxeYt5gVAQEWSwf+JoSEFD2TdcTJ1xxTsBLBDElDyrNxrTf4
h8MMYzHYeTLXFM07Dy5mJhVB6y9Q2JNGTSRxYY6wrR1qX5UvZEVqESiNBTLy2Xi5
y4oU7ExwF/kdyUn9nR4geQx61cC1GYkf/S7vKaToUEfAI9LFyW7UUiz6QE/2r01K
s/lKcU34cDE4sG1w+HhQsm4FX6qedY3WNd6FIHJPVC4xzV9rQM5wQoG1yiPuxHrP
Wi7PaWABuI4CIClIU683Y7NOTFtgam8XUiP21WPLyGLLvz8j/MgTdxIzhEdU34mo
+5ERRJQGNB5i/o1HM9vVCaSgnxZPk60BBLRxqmAK6A3TLhgzaj7QKQ==
=WAGs
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2zws-x4v-bI/m/V6IaLPTSvbMJ", "n_sections": 100}, {"thread": "2zws-x4v-bI", "msg": "8_g4pUZfnR0J", "author": "David Hopwood", "date_disp": "Jun 25, 2001, 7:20:33\u202fPM", "subject": "\"Ideal block ciphers\" (was Re: Counter mode, the better way to do it?)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Wagner wrote:
> David Hopwood wrote:
> > Tim Tyler wrote:
> > > I am looking for a way to distinguish Rijndael from an ideal block cypher
> > > with the same size blocks, the same size keys, the same size everything.
> >
> >What you're looking for isn't well-defined: there is no such thing as an
> >ideal block cipher in the standard model.
>
> I'm not sure I agree. I think it is not hard to define the advantage
> of an attack at distinguishing Rijndael from an ideal block cipher.
> Am I missing something?

No, we're just using different definitions of "ideal block cipher". I don't
think your definition is consistent with Tim Tyler's argument, though (see
below).

> I said I wasn't going to spell out all the details of how to model an
> ideal block cipher with 128-bit keys, but I'll do so anyway. Let S be
> the set of bijective functions with signature {0,1}^128 -> {0,1}^128.
> Let K denote a set of size 2^128, e.g., K = {0,1}^128. Let I_k (for k
> in K) denote a collection of 2^128 independent random variables, each
> uniformly distributed on S. In other words, for each fixed k, I_k is a
> r.v. uniformly distributed on S. I_k is intended to denote encryption
> under key k with an ideal block cipher that has 128-bit keys and 128-bit
> block size. Let E_k denote 128-bit Rijndael encryption under key k.

OK so far.

> Now let A be an oracle algorithm that takes no input and outputs either
> 0 or 1. The algorithm A will represent an attack on a block cipher.
> Let A^f denote running algorithm with oracle f. Let k denote a random
> variable that is uniformly distributed on K.

I.e. f : {0,1}^128 -> {0,1}^128 where f(x) = E_k(x) or I_k(x)
(and f^-1 for chosen ciphertext attacks, but that's not really important).

> We define the advantage of A as
> Adv A = |Pr[A^{E_k} = 1] - Pr[A^{I_k} = 1]|
> where both probabilities are taken with respect to the choice of k
> (and the internal random choices of A, if it is a randomized algorithm).

In order for 'I' to model an ideal block cipher in the sense I assumed
Tim Tyler to mean, an adversary would need additional oracles g and g^-1:

g : K x {0,1}^128 -> {0,1}^128 where g(k', x) = E_k'(x) or I_k'(x),
g^-1 : K x {0,1}^128 -> {0,1}^128 where g^-1(k', x) = D_k'(x) or I^-1_k'(x).

Clearly the adversary would have the g and g^-1 oracles in an attack
against I (or in an attack against Rijndael where it is assumed
indistinguishable from I according to this definition). Note that without
g or g^-1, the adversary cannot do a brute-force attack against I, and that
was one of the distinctions Tim made between an ideal block cipher and a
random permutation.

But, using g it is trivial for A to give the correct output:
- pick any k' \\in K and m \\in {0,1}^128.
- output 1 if g_k'(m) = Rijndael_k'(m), and 0 otherwise.

That's why I said that an ideal block cipher is not well-defined in the
standard model. (The "ideal cipher model" or "random cipher model" is to
prove a protocol secure using an idealisation of a block cipher almost
identical to the one above, and then instantiate it as a real block
cipher without formal justification - in much the same way as a hash in
the random oracle model.)

> Of course, the above is entirely equivalent to the following formulation.
> Let pi denote a random element of S. Define
> Adv' A = |Pr[A^{E_k} = 1] - Pr[A^pi = 1]|
> where the first probability is taken with respect to the choice of k and
> the second one is taken with respect to the choice of pi (and, as before,
> the internal coin flips of A). Then one can prove
> Theorem. For all adversaries A, Adv A = Adv' A.
> The second formulation (Adv' A) is the usual one you will find in all
> the textbooks and papers, but the theorem above shows that it really
> makes very little difference which formulation you use, so long as you
> only use the block cipher as a pseudo-random permutation.

I assumed that the version without g and g^-1 couldn't be what Tim Tyler
meant, since as you say, it is equivalent to the standard formulation of a
PRP, provided keys are chosen randomly and independently.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzez7DkCAxeYt5gVAQFbyQf+Mu2rke590IbdhJep++rTQ4e45wBLF2mh
0NzV3wqyg0vW8ptbqsaLPuirj0R4mW7pAy/u49uMi6zGyPyygOJj0efukmiHcXiX
Iz6so2GDfHiCU3EZzHZI7oasKm1xMnB1/kf7g5ZUhdYylQHkBvmM83FxXUZs4hEP
kkbQDMZrYYcw/YTOV3NCnwAEZTuQ2StTXfJM9wPHyTCM8IuKh8q9d9GkAFSy8eLO
oQ/ZGLYi6xPe92SSQF1IILVtRGrNmRSkFa8I+nE0Jci63LBaQqPsUhfBI8/iRrhS
0NM4nFmeWieMIlvoBnGv0CFFBvMmFmvmNemHVakeRqbTLOKbzROFmg==
=PAjo
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2zws-x4v-bI/m/8_g4pUZfnR0J", "n_sections": 100}, {"thread": "2zws-x4v-bI", "msg": "iQPhVGwIHpkJ", "author": "David Hopwood", "date_disp": "Jun 26, 2001, 12:01:34\u202fPM", "subject": "\"Ideal block ciphers\" (was Re: Counter mode, the better way to do it?)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Yes, I agree completely.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzgU8zkCAxeYt5gVAQHOdggAoBsQDyqfnMjCDDdXvpwAihPKv2xdt+bd
ssf+ZSKqTyNeI3H0G4d0x/Q0DtY29b6kjf9PQkEtlHMYhU4xNcCQIds4CMiGqFTm
s/FeBe4tmBw4QU8Tj71d5rG+XLq0AiyfZW7JHgEbbferVw1p9GnXn86K6D5guxxU
XCfcuNz3v1yndu2ktL3jxyFqlQGYE34wkpPwKvtR/iIECPfyz3vOzgNVER0C5Ahl
yKp185xeXhlZg6TH8j0KsG4DLcwnN5OWaR22zVzmRgTn2esKmp6CHZKa4tUXyypQ
iIbd7JK23OhWcsP6L6ezSujYXP7d6+Ucv5slbDlUvqcbt0cwCVlsCA==
=SYip
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2zws-x4v-bI/m/iQPhVGwIHpkJ", "n_sections": 100}, {"thread": "2zws-x4v-bI", "msg": "ZCgOshySBFkJ", "author": "David Hopwood", "date_disp": "Jul 1, 2001, 12:19:58\u202fPM", "subject": "\"Ideal block ciphers\" (was Re: Counter mode, the better way to do it?)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Bryan Olson wrote:
> We can define an ideal 128-bit block cipher as a uniform
> selection from the (2^128)!^(2^128) mappings from 128 bit
> keys to permutations on 128-bit blocks. The formalism is a
> little tricky since we have to randomly generate both the
> cipher and a keyed instance of the cipher. We could assume
> that the rules of the game give us an ideal-cipher oracle
> that computes the encryption and decryption functions for
> any key we provide, and another oracle that computes a
> permutation - either a random permutation or the permutation
> induced by some random key for the cipher-oracle. We have
> to distinguish which kind of permutation the second oracle
> computes.

That's exactly the set-up I described in the first post with "Ideal block
ciphers" in the subject (Message ID <3B37C741...@zetnet.co.uk>).
It doesn't work; that post explains why not.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOz6rPzkCAxeYt5gVAQHohQf+P6iqIhTKKGxiPh0/DAV2TwUSwXGdWJJg
Y+92jqx8ePO+yDPB4K/Jk/oVUg6cD65neQNskR5d9mtjM0ll3Ij/FtDdx/qleovw
hOhoyyUKz2TEdHn6/h3a+AQttr86eY3wEmbE7FbOr9gvysVcS6cB/upwU+xpIeA/
yASXT3WmxVMs5bBH8oD+h2ve+f/mAc6cnZ5GaxPquBl081vb8RZhvxBfhLcBGv5p
RJuLhg2saydvGjGDPPy7tJJ2oYTo8LGdETihm+39zVw73Hei1BYWQv85t33OuqoD
pCNPE0nmX/+Y+DJPmW0FRkj30MwCjak9ZQzYVUiPA31lm8aQ/++gRQ==
=uo9C
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2zws-x4v-bI/m/ZCgOshySBFkJ", "n_sections": 100}, {"thread": "2zws-x4v-bI", "msg": "kFD5wIofLooJ", "author": "David Hopwood", "date_disp": "Jul 3, 2001, 12:50:55\u202fAM", "subject": "\"Ideal block ciphers\" (was Re: Counter mode, the better way to do it?)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tim Tyler wrote:
> David Hopwood <david....@zetnet.co.uk> wrote:
> : Bryan Olson wrote:
>
> [two random oracles]
>
> : That's exactly the set-up I described in the first post with "Ideal block
> : ciphers" in the subject (Message ID <3B37C741...@zetnet.co.uk>).
> : It doesn't work; that post explains why not.
>
> I had previously written:
>
> ``To avoid the other answer I might now get, observing that the encryption
> of the all-zero block with the all-zero key has some particular value
> for Rijndael is also "not an admissable distinguishing characteristic".''

That's all very well, but to correct the security definition, you would
at least need to give some formal account of exactly which attacks are
"admissable"; pointing out specific "inadmissable" cases is just handwaving.
Don't let me discourage you, since it would be very useful to have another
rigourously defined model that could be used in some of the situations that
now require use of the random oracle model, for example. However, I think
that's an extremely difficult problem - and in the meantime, modelling block
ciphers as PRPs, and keyed functions as PRFs, is much more useful.

> To me it seems quite reasonable to ask where Rijndael lies in strength in
> the set of 128-bit block, 128-bit key block cyphers.

OK, that's a different approach. To formalise this, you need to define
"strength" in this model (since the usual definitions of advantage don't
fit).

> We know that the space of such block cyphers contains some weak cyphers -
> since it contains the identity permutation. Similarly, we can be quite
> confident that it contains some rather strong cyphers.
>
> The question of where Rijndael lies on this spectrum is the question I
> was tring to address in my original aside. I'm still a little puzzled
> as to why this has resulted in charges that the objects I'm trying to
> compare with are not well-defined.

Because you're suggesting using new security definitions in place of ones
that *are* well-defined?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO0E8+jkCAxeYt5gVAQFstQf+JP4CPXkZPPmIXolLhQTHamexspaYeOlR
fptqwHsumBsx9Ileozh9kKVz7JvxNoi2P+EV2p5eDxE+eiFigNueIh/pgEOjkIm2
9OEy0v8QAPirRPkgAh2Z2sUuJwqBwy14IOM1yq00o8hXNj0E/zt+y9m8+mNqh/sC
Ih8rN7KaodLfph0GqSq0ExekMXZj9Ioq8vJR3rnk6qbesl8R5Ez8kLyQ0Jcgk/Kt
rgXAXyNiciagOhAznRQyS57bCJyLR4MrgaP3M4nP/V+vjP9m1kPy+MHl7NxMsJSB
afMeVPuw+W/8cXWxJMHpGLRfMyXZVAjxbkEf867t8vo9uegWEPbQ/g==
=z189
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2zws-x4v-bI/m/kFD5wIofLooJ", "n_sections": 100}, {"thread": "4A9sn1J4NU4", "msg": "SfSAqPO8B6cJ", "author": "David Hopwood", "date_disp": "Jun 27, 2001, 10:29:10\u202fPM", "subject": "Factoring, discrete logs, and elliptic curves", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Don Johnson wrote:
> Hardness is ECDLP >> DLP > RSAP

OK, this is getting pretty annoying. Every time someone posts something
vaguely related to problems used in public key algorithms, you post a
comment plugging elliptic curve-based systems. Most regulars here know
that you work for Certicom (the company most associated with
commercialisation of EC systems), but newbies may not, so I think that
should be pointed out.

EC-based systems may in practice be more, less, or about equally secure
as comparable integer factorisation or discrete-log-based systems. It
certainly is not the case that EC systems have any overwhelming advantage.
The claim that ECDLP is much harder (">>") than the DLP or RSAP seems to
assume that key sizes are chosen to be the same for each type of system,
which is not a choice that any competent cryptographer would make. (Even
in that case it might not be true.)

Here is a rough summary of some of the advantages and disadvantages of
each system type:

EC DL IF
+ - - Known attacks against EC systems with well-chosen parameters,
are exponential in the main security parameter, as opposed to
subexponential for DL and IF. (The security parameter here is
field size for EC/DL, and modulus size for IF.)
+ - - EC public key sizes are smaller for a given conjectured level
of security.
+ - - For a typical mix of operations, EC can often be faster than
IF/DL with a given conjectured level of security, *if* it is
well-optimised.
- - + Public key operations (e.g. encryption and verification) can
take O(n^2) time for IF-based schemes (Rabin or RSA with a
small public exponent), as opposed to O(n^3) time for EC and
DL. Here n is the field size or modulus size.
- + + Well-optimised implementations of EC systems, in either hardware
or software, are less common, and tend to only implement
a subset of options (see next point).
- + + Ensuring interoperability is significantly harder for EC
because there are several field and basis options (with more
options occasionally added to standards, for example optimal
extension fields recently).
- + + EC systems are more complicated to implement, and therefore
there is a greater chance of an implementation bug affecting
security.
- + + Some methods of implementing field arithmetic used in EC systems
are patented. Also the patent status of point compression is
uncertain.
= = = Specific schemes/protocols may be patented for any of EC, IF or
DL; there is no overall advantage here.
- + + Generation of parameters for EC cryptosystems is *much* more
complicated (although it is possible to use parameters that
were generated by someone else). Generation of DL parameters
is easy, and IF keys do not have parameters as such.
+ + - Generation of public keys is faster for EC and DL than for IF.
This can allow more efficient implementation of protocols
with forward secrecy, for example.
+ + - Public keys can be more thoroughly validated for EC and DL than
for IF.
- - + Key validation is more necessary for EC and DL systems than for
IF, to prevent small subgroup attacks.
- + + The EC discrete log problem is arguably less well understood
or thoroughly analysed than the integer factorisation problem,
or the Diffie-Hellman problem in GF(p).
- + + There is a greater risk of choosing classes of EC parameters
that turn out to be weak - c.f. Smart's attack on EC(GF(2^m))
with m composite. (This is especially true if you choose
parameters to enable specific optimisations, so be careful
of performance analyses that do this.)
+ + + There is an advantage to allowing for several schemes based on
different problems to be supported in a given system, in case
an attack is found on one of them (however, this requires
careful design to ensure that the security does not become
dependent on that of the weakest scheme).

In any case, remember that the vast majority of feasible attacks against
cryptographic systems are not cryptanalytic attacks against algorithms.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzqVYzkCAxeYt5gVAQHmxwf/YqFaIZVsDD7jnmESbudGyLZLx0yXDHz7
sle3VUnND2nRWjMVEeMTlbMTt1Pok0GPcXWZE2jNNqLBKWcE2dWY44ZAE59ErxBj
kN1PLB4IwFNjvWNQN3iC+8HEGVA3kWcLl/6damR4jzLfAQMPAXCjambHwrGr9+WI
A+gDMUZWmEA0SX0Xz1ttHdxaSjNDkbUTqLhU79c3FYVn9MAL80HykWci2Hhr2tL6
BfzK7XnEHMs4ZmTgH7DIF4IROYxM45f/wxeyCY5gDdlHdNlh2nnXdTFSaqqxw/wk
BAP6gCWztECh0OKQJxoPylvimL869H5PXTkqDXobTHoQ+EzBmZAMDQ==
=1Kyk
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/4A9sn1J4NU4/m/SfSAqPO8B6cJ", "n_sections": 17}, {"thread": "4A9sn1J4NU4", "msg": "dbgiAwALnIIJ", "author": "David Hopwood", "date_disp": "Jun 28, 2001, 10:06:45\u202fPM", "subject": "Factoring, discrete logs, and elliptic curves", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Francois Grieu wrote:
> In article <3B3A967...@zetnet.co.uk>,
> David Hopwood <david....@zetnet.co.uk> wrote:
>
> > EC DL IF
> > = = = Specific schemes/protocols may be patented for any of EC,
> > IF or DL; there is no overall advantage here.
>
> IF may have an edge over EC here. Some IF schemes (like ISO/IEC 9796-2
> signatures with SHA1 hashing) can AFAIK be used without fear of
> being asked royalties.

So can many EC and DL schemes, of course. For any patented scheme or
protocol belonging to one of these three types, there's effectively always
a reasonable unpatented alternative.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzvimzkCAxeYt5gVAQHIWgf/TW+UuAneDFdM7GXyEY+MEjXhMUO3sC1q
5n8NQl3/eJg2K159YcHhhZVzeD5L1a2PgcHrP/cOcpKrrL1traXaEjvdtyemGDa+
WyHfaKV+HfCPxrmo885+3/8AK8Fgo5EqWgHLOckv66Nfr6KvQLCSiWvHf1a3b2nG
E5Fyo9t2VekTDvolQCOA0cwJHpEMQFkuUbkrpyseYH1SzlwqAP27X8g9mF2AT7Mn
/aW8BxauXd8qfb1cI57GIlZoLBW/Ji9atyhSBz81kBEldkIoO8TwAnI8+a4vN/dW
nJkzgrGR5Bz14ayiiuYGhId5GYbeK42VbxSjEFpl4P5eTSYY4i04tg==
=7nuN
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/4A9sn1J4NU4/m/dbgiAwALnIIJ", "n_sections": 17}, {"thread": "5PoqDCSEjv0", "msg": "JqGm5sVejx8J", "author": "David Hopwood", "date_disp": "Jun 16, 2001, 7:36:41\u202fPM", "subject": "Tom's base64 code (was Re: CipherText E-mail encryption)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> /* Does base64 encoding decoding */

[snip]

No it doesn't. "base64" is the name of the algorithm in RFC 2045:
- you use a different character set from base64,
- base64 handles arbitrary length inputs; your code does zero-padding
of the input,
- base64 specifies that the output is padded to a multiple of 4 octets
with '=' characters; your code does not,
- base64 is consistently big-endian; you read the input into y in
big-endian order, and then write it out in little-endian order.

Also, as a matter of coding style:
- your decode routine fails silently on invalid inputs, which is not
good,
- you have implicit conversions from char to unsigned char. Either
declare 'static unsigned char *code = (unsigned char *) "..."' and
document that the execution character set is assumed to be ASCII,
or declare the output as 'char *'.
- there is no check that the output does not overflow the buffer size
(i.e. the only way to use this code safely would be for the calling
code to calculate how long the output would be). This is a serious
error, likely to lead to security bugs.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOyuPuzkCAxeYt5gVAQGKeAf/aGltZxiTFYSaOALYoWbynBtdP7Gmv3eO
HfMf9MxWao+6KSZBsIKlIYmv4YcxDGnT7ZKh2vo0f6U4yyTJ8HHPehfW/xmK6DOV
iX4xOM5Y53zzdDu5AB3qFfzMyisS1bkLI9e+2pKadfcS63JpQSka7HRUPpKNnxC0
mb+ViCR/Ff7lT6krLF/jrT7jM5Lkf70UNwve6rLA0UGTEE0/tbYMg95ntLqU22W7
vmF5WXdSZz4FTjbtJbSMQPjjhOkaFOckxvs5gFiVstZUj4UV2XnQ4/d68QzeFuxh
BrFYK5DQgKJ65k4F3KCwoDNUejXMAy2mAlhp8bucwnqj8VI40LtFjQ==
=pell
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/5PoqDCSEjv0/m/JqGm5sVejx8J", "n_sections": 58}, {"thread": "5PoqDCSEjv0", "msg": "kLti-8XYsE4J", "author": "David Hopwood", "date_disp": "Jun 16, 2001, 9:59:22\u202fPM", "subject": "Tom's base64 code (was Re: CipherText E-mail encryption)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"SCOTT19U.ZIP_GUY" wrote:
> Why do they add the "=" symbol [in base64].

That's a good question. I don't see any reason for the "=" padding
(the length of the input is unambiguous even without it). Still,
there's no point in changing the algorithm over such a small quibble.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOywOiTkCAxeYt5gVAQEpnwgAxP+fIoJ6zMW+fLTDAcQzXhAekwvGMq3z
aCNwp5Lef4E/jsOrgdPC8y8saIJ8IsmtFwjf7JZu0EpoCe600h8eTBlzT1/yRDWH
aI5jsRSJZJZf1nMa1w1QwC2rnkaX9GyX7lJpN/RA3paC38svHhX45JEgG79um0I2
yTVIHuvhhP0RFKVEB/L9PBD4puC8EDnrtAauqvCyCZ/8TAcOb0LGQqUlHtzL9FmS
nlt3EjOqr725h1agGG7VkUdpZElLf3AlVIDo+cA1lDsChJ6jKFnksX5vJ/wXKvjB
6opHJVkDyPaIbludfjvrqwPFBPVbiZ7AHHHpy2k5ZfCyEAX/BcqSRg==
=9IJZ
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/5PoqDCSEjv0/m/kLti-8XYsE4J", "n_sections": 58}, {"thread": "5VAcBCADBMk", "msg": "QGmbqixEuB8J", "author": "David Hopwood", "date_disp": "Jun 18, 2001, 2:57:52\u202fPM", "subject": "SSL/TLS compression methods???", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Erwann ABALEA wrote:
> I also noticed that actually 2 compression methods were defined

> [in RFC 2246], the first one identified by null(0), and the other by


> (255) (both are defined in an enum). The rest of the document doesn't
> define this (255)-identified compression method...

That's a convention used to specify the maximum allowed value of the enum
(and hence the number of bytes needed to represent it). See section 4.5.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOy5PBTkCAxeYt5gVAQEtqwgAytkXa+Wm4DmGacmyWLroFtFIcTZTsn1e
LlMobPUEdjoifM7ZeDgxArB6EaXGXk4RmQBrMt0MJaCHf7NxLra5k8hcSSP5jjLp
XRTxfN9bPqKhbLTKc3D52iRhWYlRtHwcsOGQUQwOeu5+dRKqZ0KGkPyDZJKpfiMC
MbTJYg5XY00HV5UAm3ZE3e1KE88MpPDPOn86gxQuuZMP1RuHnL9KdS+xQOkwKwYi
tsjmtX2fkO0wcz+TYOHgtmHDcHkqgzt23f4ajGftg0aO7U5JYOkWjmcHI2KpNRbm
s8Gl7kOBafChV8m3V4Hpty2YAiT+wJDNKPW9PC18XcLcNl+OK7q9Og==
=9+WE
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/5VAcBCADBMk/m/QGmbqixEuB8J", "n_sections": 9}, {"thread": "73yb5a9pz2Y", "msg": "_tjpG6-6De0J", "author": "David Hopwood", "date_disp": "Jun 26, 2001, 12:21:35\u202fAM", "subject": "crypto flaw in secure mail standards", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

lcs Mixmaster Remailer wrote:
> David Wagner writes:
> > Can you help me understand this? Obviously I must be missing something.
> > Why do you need to know whether you are going to encrypt? In particular,
> > one obvious proposal would be the following: When you sign, include any
> > relevant contextual information (e.g., date, time, To:) in the signature.
> > Does this not work?
>
> I agree that something like this is the best solution. In particular it
> is much better than what was actually proposed in the paper, which was
> to put the encryption key into the signature, or the signature key into
> the encrypt, or to sign or encrypt twice. Those solutions advance the
> illusion that this is a cryptographic problem related to sign+encrypt,
> when it is not.

Correct; nevertheless, it happens that putting a 2nd pre-image resistant
hash of the encryption key into the signature solves another problem that
*is* cryptographic (see my post on compatible weak keys).

> Adding To:, etc. to the signature is the best solution in an email
> environment. As other discussions have noted, there are other fields
> which could be important as well, such as Subject, Keywords, References,
> In-Reply-To, etc.. In fact some have proposed that the entire set of
> email headers should be protected by the signature. This produces the
> least ambiguity and possibility of error.

All the headers that are generated by the sender, yes.

> One cost in the context of this solution is that on the sending side the
> software may have to be restructured somewhat. Presently it is likely
> that signature and encryption are done before the message is formatted
> for transmission. Many of the mail headers may be stamped on only at
> that last point. The software may have to be rearranged to make sure
> that everything is available at an earlier point in the processing.
> Granted, this is more of a problem in the context of retrofitting an
> existing system. It might be argued that this problem should have been
> recognized from the beginning and secure email been designed to protect
> the mail headers all along.
>
> The other cost happens on the receiving side: what to do when the
> protected headers don't match the outer ones? Is this worth raising a
> red flag over? Or perhaps should the inner ones silently overwrite the
> outer ones?
>
> It might be that a certain amount of mismatch commonly occurs.
> Mail headers are far from sacrosanct, and gateways, mail exploders and
> forwarders do sometimes rewrite them. If we raise a red flag every time
> then people will learn to just ignore the warnings.

I agree there shouldn't be an intrusive warning when headers are changed,
but the way headers are displayed should make it clear which have been
authenticated and which have not.

> If we silently
> overwrite then we might lose some of the advantages of the rewriting
> which is done (for example mailing lists sometimes rewrite Subject to
> tag it with the name of the list, to move a "Re" past the list name, etc.)

I consider those advantages fairly trivial, and not worth losing strict
authentication of the subject line (and similar fields) as provided by
the sender. There is a separate "Mailing-List" header for indicating the
name of a list, for example.

(Moving Re: past the list name is an ugly workaround to prevent continuously
expanding subject lines of the form "[listname] Re: [listname] Re: ...".
It's straightforward to prevent those on the client side instead.)

> These issues can probably be solved but they require some thought and
> care in implementing this proposed new capability.

I agree, but a slightly imperfect solution is better than leaving headers
unauthenticated.

[...]


> Actually the problem has not been diagnosed correctly. The issue is
> not just that people will mistakenly believe that the software protects
> the recipient identity. The more important problem is that the software
> fails to routinely protect the recipient identity (and other information).

Absolutely.

> But again, let us not be misled into thinking it is a cryptographic
> failure with a cryptographic fix. It is actually a problem that is very
> specific to email, and the fix is specific to the email environment.

No, I don't think this is specific to email. The problem of not including
necessary context in the data to be signed (or otherwise authenticated) is
widespread across many protocols. For example, it's very rare for signature
standards that operate on files to include the type (e.g. MIME content type
and encoding) of a file in the signed data; they usually just sign the raw
file.

This is made worse by protocols that assume public keys are dedicated to
that single protocol, but that use a general-purpose certificate standard
such as X.509 to certify keys, without any information restricting the use
of the key in the certificate. (It doesn't help that some X.509
implementations ignore even critical extensions.)

> The problem is that the sender has no easy way to protect relevant email
> header information, and so the fix needs to be to provide a way to do so.
> This will require some redesign of email software and of how it interfaces
> to encryption. The sender side needs to figure out the headers before
> it goes to encrypt/sign, and the receiver side needs to be prepared to
> do something reasonable when the inner headers don't match the outer ones.

I don't think those are difficult problems.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzgNwDkCAxeYt5gVAQGcLAf+IUHTT38/4DW+nFcxVfZNJ0c++NIM0HpH
S6tfyH3/2Sg2BUitBDJ1KJJNZMnVepF3uNGYGhrggH6XADz5ZzdfHk+/zn1A/JpZ
KZj6HYbAm2J8vtWpk1xrZrsNkSkFFZJXDsFV7TGAZiygwiioepdJc2gV7LHBsHP4
+k+G+9xppSjdOeN1CiZSTDuRUmwRHipnf/B3LbAvaX2HJJZCW445wwC67Nfy97aC
Ni9Xu7+02Bfi/m6dLmAUiL9/EIgBh/WFsVwENx8UQNBNIg2W2/ykuT5XxK/pObW7
0N7qXnuAr+5Jj9uwRW0/jX7PG479i7ZeQJCpZPVi7LU5ksRB3v0nlg==
=l556
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/73yb5a9pz2Y/m/_tjpG6-6De0J", "n_sections": 19}, {"thread": "8arjotENvNQ", "msg": "FLq73ktHr9gJ", "author": "David Hopwood", "date_disp": "Jun 19, 2001, 7:33:24\u202fPM", "subject": "Known plaintext considered harmless", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

lbudney...@nb.net wrote:
> John Myre <jm...@sandia.gov> writes:
> >
> > The lack of a proof for such strength is, in my view, insufficient
> > evidence for weakness such that plaintext manipulations specifically
> > to help the cipher are warranted.
>
> Note, however, that reducing known plaintext is trivial; compression
> helps quite a lot. The cipher should be strong enough not to depend on
> compression (or anything else), but not doing compression is just silly!

Not doing compression is not "just silly". Compression has a performance
cost (which typically isn't outweighed by encrypting less data [*]), and
requires fairly large buffers. Whether compression is of benefit to a
protocol depends on the relative costs of bandwidth and storage vs the
processing needed for compression. If an evaluation of those costs suggests
that it would not be worthwhile for cleartext, then it probably won't be
worthwhile when encryption is used either.

OTOH, since just before encryption is the "last chance" to compress,
there is a good case for supporting compression in cryptography standards.
It shouldn't be expected to improve security, though; if anything, it
complicates the security analysis. (For instance, do you authenticate
the compressed data or the uncompressed data? There is a case for doing
either.)

[*] I'm assuming relatively fast ciphers like Rijndael or RC4, with a
fast MAC if applicable.

> (1) It makes encryption easier by shrinking the file.
> (2) It saves bandwidth by shrinking the ciphertext.
> (3) Reducing known plaintext certainly can't hurt.

It can't hurt security (assuming it's integrated correctly with the
security protocol), but you might not want to use it for other reasons.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOy/gtDkCAxeYt5gVAQFYzwf8DvawcqlWfwegXxJekpJx+VtPlaZt+mNv
yq3aPUScglGRcjykl4H4j3DFBxJuZDpa0BAcAJ/k04z/J9YuUeCJCqRWtKdPQXQ0
g8rKn+Ism6tdDHj058I+UPj8ZYUEmqVyLbg0PxDQ2L9YPyaHKkXaPVeRsJ2a28eR
vfzjyrK+e4uo6AqqRoglYyZN5uQmlHg0JbnGydbcd0ZYV2NWiSddchVhxRlWisAz
VqPuZYRFDyx75jK7XYEGzkQdpJmif8aYjNUWGUvF1hjNFEe0nq4IJi0nBwaxPj4h
FiWloRPGCKfa9IX5qengSWlkPchvYRezqoyQh4x5t5XqU64xQ/C21w==
=bXdd
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/8arjotENvNQ/m/FLq73ktHr9gJ", "n_sections": 100}, {"thread": "8arjotENvNQ", "msg": "mdKx5HzAL3AJ", "author": "David Hopwood", "date_disp": "Jun 20, 2001, 8:58:09\u202fPM", "subject": "Known plaintext considered harmless", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tim Tyler wrote:
> David Wagner <d...@mozart.cs.berkeley.edu> wrote:
> : I agree. Far more systems have failed from too much
> : complexity than have failed because there was a practical
> : cryptanalytic known-plaintext attack on a well-chosen cipher.
>
> Indeed. However cryptanalytic known-plaintext attacks are *not* the only
> type of failure that eliminating known plaintext helps defend against.

Modern ciphers are almost always used a long way past the unicity distance.
So, if the keyspace is reduced enough (by whatever means) to be searchable,
then the cipher can be broken, period. Reducing the amount of known plaintext
by compression (application-specific or otherwise) will not change this for
practical, real-world protocols.

Your (Tim Tyler's) argument seems to be that there are a few situations
where the message might already be short enough that compression will
reduce the length to below the unicity distance. I think this will happen
in so few cases that it is not worth bothering with as a security measure.
Of course, there are other, non-security-related reasons for using
compression, which should be considered on their merits. Also, excessive
redundancy of formats is undesirable regardless of whether they are
encrypted or not. (Redundancy is not excessive if there is a good reason
for it, such as human readability, or provision for future expansion.)


Re: the OP's argument - I generally agree that there is a great deal of FUD
and misunderstanding about the "dangers of known plaintext", and that some
protocols are unnecessarily bent out of shape because of that. The worst
cases are protocols that do not encrypt data that needs to be encrypted,
just because someone argued that it could provide known plaintext.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzFCWDkCAxeYt5gVAQFr8wf+McYB8NgCh+m/Y48GGvxMC+mOFPPE6csq
FBVKROSkUPTyF/KLXiuK6OHqyuvIka1rfqedb8JFxOdBDI9T2EwTRZMmRBZA9FSR
UNHceGMlNSq6O/R8bW09QaL0u0UwuKbZln4IkInMTJOd+GMkoCy3gBEpUKQnwkN1
a5qCEkQ2H1bTdIz1gaKvlIz+TOGEYwJDOR9VpxndQaUpGB1257j+rqVxCjx4cvHE
ufGH0Ulfk4m2rvodOQQp5EvOy18hNCaMWfZ2tqxggK8GfUm8wVnLaS+tIyGkr/pb
5G+flHBw1oMiismhe1jAQK6HUMqitq91enpE8GkGgpu1TlVS0HPCUA==
=Uo9f
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/8arjotENvNQ/m/mdKx5HzAL3AJ", "n_sections": 100}, {"thread": "8arjotENvNQ", "msg": "s_Ow5eqdjJUJ", "author": "David Hopwood", "date_disp": "Jun 21, 2001, 10:03:08\u202fPM", "subject": "Known plaintext considered harmless", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tim Tyler wrote:
> David Hopwood <david....@zetnet.co.uk> wrote:
> : Tim Tyler wrote:
> :> David Wagner <d...@mozart.cs.berkeley.edu> wrote:
>
> :> : I agree. Far more systems have failed from too much
> :> : complexity than have failed because there was a practical
> :> : cryptanalytic known-plaintext attack on a well-chosen cipher.
> :>
> :> Indeed. However cryptanalytic known-plaintext attacks are *not* the only
> :> type of failure that eliminating known plaintext helps defend against.
>
> : Modern ciphers are almost always used a long way past the unicity distance.
> : So, if the keyspace is reduced enough (by whatever means) to be searchable,
> : then the cipher can be broken, period. [...]
>
> It seems you go from "almost always" to complete certainty, without
> showing your working.

Suppose the keyspace is searchable. If an attacker can break a cryptosystem
in almost all cases where that happens, it's more than enough from the
attacker's point of view. The aim of a cryptosystem is to prevent attacks
from being successful in more than a negligable fraction of cases. Obviously
there's a big difference between "negligable fraction" and "almost all".

> Also note that the unicity distance for the system can be much larger when
> compression has been employed.

My assumption is that the compressed text still has a significant amount of
redundancy - say, at least 0.1 bits/bit. This estimate is very generous to
your side of the argument; in fact, I've never seen a compressor do that well
on real-world data. Given this assumption, the unicity distance will be at
most 10 * log2(size of remaining keyspace) bits, and this is an upper bound on
the amount of compressed text that can be sent with information theoretic
security (in fact information starts to be leaked before that bound).

I don't consider a factor of at most 10 to be "much" larger, and for
general-purpose compressors like DEFLATE, etc., the effect of compression
on unicity distance will be considerably less than that. I don't care about
artificial examples like sending meaningless random data which is then
never used, since no-one would want to do that in practice.

> : Your (Tim Tyler's) argument seems to be that there are a few situations
> : where the message might already be short enough that compression will
> : reduce the length to below the unicity distance. I think this will happen
> : in so few cases that it is not worth bothering with as a security measure.
> : Of course, there are other, non-security-related reasons for using
> : compression, which should be considered on their merits. [...]
>
> To summarise - compression has a number of benefits, which include:
>
> * Improved information-theoretic security when message size is
> in the vicinity of the unicity distance;

See above.

> * Fewer plaintext/cyphertext pairs given to opponent (this can be
> achived in other ways as well);

This is not in dispute, but note that modern ciphers can reasonably be
expected to be computationally secure even when huge numbers of plaintext/
ciphertext pairs are available.

> * Plaintext diffusion - this can increase the work factor
> significantly.

At best it increases the work for a key search proportionally to the
length of the message, but if you want to do this reliably then you should
use an AONT; compression won't necessarily suffice, because it is not
designed to provide diffusion.

> E.g. say a message always ends "yours, Fred Bloggs."
> Before compression, an attacker could decrypt the last block and
> look for this text. After compression, he has to decrypt the entire
> message, decompress the entire message, and then apply his test.

If "Fred Bloggs" did not occur earlier in the message, then for typical
LZ-based algorithms, no, the attacker would not necessarily have to decrypt
the entire message.

> * Messages are shorter, can be transmitted faster, allowing less time
> to be spent broadcasting a signal, reducing opportunities for tracing.

They are shorter by a small factor. For most applications, tracing is not
an issue.

> * Detecting correct decrypts after decompression takes more sophisticated
> algorithms.

Not really. If you want to claim that, you'll have to demonstrate it for
real data and real compression algorithms.

> Where before you could check for ASCII's missing bit, now
> every decrypt has that. Where before you could check for randomness,
> now every decrypt is highly non-random. This means more programming
> work for each message type, more computer work in testing correct
> decrypts, and more plaintext required to perform the tests in the first
> place.

No, more plaintext is probably not required if the beginning of the
plaintext is redundant (since most compression algorithms have the property
that decompressing a prefix of the output will give a prefix of the input).

> * Rejecting plaintexts is /slightly/ harder work - because of the
> work in performing the additional unkeyed transform involved.

All of the above points amount to not very much security benefit.

> The argument that compression doesn't generally get messages down to the
> unicity distance seems to assume that the unicity distance is small.

The unicity distance *is* small for short-key ciphers used on typical
data formats - often only a few hundred bits.

> Recall that compression increases the unicity distance - and can do so
> arbitrarily far. "Perfect compression" results in a unicity distance
> which is infinite.

Perfect compression does not and cannot exist in non-trivial cases.

> In such a system, every cyphertext decrypts to a
> plausible-looking plaintext. If this happens, brute force search is
> not a practical possibility, regardless of message size.
>
> We may not yet be anwhere near perfect compressors for the domain of
> English text,

... nor is there any reason to believe that problem is solvable.
To even begin to approach that goal, the compressor would need
to include an English dictionary and grammar model [*] (otherwise the
attacker can detect redundancy by checking spelling and grammar).
That would make such compression impractical for most protocols.

[*] Or, for internationalised applications, a dictionary and grammar
model for every language that might be used.

> but in other domains, much better can be done - and compressors are
> improving all the time.

Meaningful data will have some redundancy that is difficult to remove,
because it is too hard to model accurately. I suspect this problem
is generally as hard for other formats as it is for natural language
text.

> The unicity distance is the redundancy in the inputs to the encryptor.
> After compression, this redundancy may be rather small - making the
> unicity distance rather large.

You keep repeating this, without any evidence that the unicity distance
would ever be large enough to provide a significant security benefit in
practical cases.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzKnDDkCAxeYt5gVAQHy2AgAtrMnuysI34FkZ+Y+R56p6QFIAMQ2x9Il
LqWfMGwmsxdVuHAIALjb9NQCCDXKYY6pjoP3Bep5yqPFEI9t/zBmD0oo2i6dnqYJ
AOmzqAI26i2iSaDuFjeU+63On2LYwAB+czKrmJ9HICnNdC2SfyBad3pBQLFvUDhU
U67jvcie4DU8H0qa4/Z5xOGvrs1wxHrixfQCeHxlxGwP91WrT2IbMatUBgE7ZxbR
fMC4725ec5j/R1hrizxJQ5rNi4iPkUdx46qtN6gPzHUx6GXkSZPgb52el9iN7PyF
UEjXpxZ1FABDNOJWSnHyUmxFSrLBcpl9nSnbbp9KNLGSq54w2y1pNw==
=bP22
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/8arjotENvNQ/m/s_Ow5eqdjJUJ", "n_sections": 100}, {"thread": "DMW5IdQB69E", "msg": "DbK3EiPfhPcJ", "author": "David Hopwood", "date_disp": "Jun 29, 2001, 8:51:18\u202fPM", "subject": "Quantum computers and their future affect on Cryptology", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Roger Schlafly wrote:
> "David Wagner" <d...@mozart.cs.berkeley.edu> wrote:
> > Roger Schlafly wrote:
> > >A universal hash function is a particular kind of keyed hash function.
> >
> > I think you might be confused about a subtle point here.


> > We have 2-universal hash functions that are proven secure,
> > without needing any unproven assumptions. 2-universal hash
> > functions are really not cryptographic objects so much as
> > combinatorial objections.

> > In contrast, the security of cryptographic hash functions,
> > like SHA-1, remain a subject of unproven conjecture. We have
> > no full proof of security for any cryptographic hash function.


> > So the presence a 2-universal hash function is /not/ a good
> > reason to be skeptical of claims of proofs of security for
> > quantum crypto. If they had used SHA-1, then you should be
> > skeptical, but 2-universal hash functions are different.
>

> One of the fundamental problems with quantum crypto is that errors
> cause the recipient to get a different sequence of bits than the sender
> intended to send. Worse, they cannot tell whether the errors were
> natural or caused by an eavesdropper stealing bits. So they use
> checksums of various kinds to assure that the error rate is only about
> what would be expected from engineering estimates. Then they
> conclude that the eavesdropper must not have been stealing very
> much.

Some papers might do that, but it's not a necessary limitation.
Just as you can make the error rate of a conventional channel negligable
by using error correction, it's possible to do the same with a quantum
channel. Any remaining errors must be due to an adversary (or some
catastrophic failure like a fibre being cut), with probability almost 1,
even if the error rates of the physical channels used are not negligable.

Doing this is not particularly efficient. It almost certainly isn't
cost-effective compared to conventional crypto. It probably doesn't even
get you any better security than conventional crypto (there are lots of
ways in which the implementation might not satisfy the model in which
security is proven). It addresses only passive attacks, and doesn't
provide authentication. I wouldn't want anyone to get the impression
that I was recommending the use of quantum crypto; I'm profoundly
skeptical that it will ever be useful. However, in principle, channel
errors are not a fundamental problem.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOz0YyzkCAxeYt5gVAQFigQgAtYmhmR/rQcxOJKbrn4q0YdSt0EdxgGMa
C4yFTG/z3v2EqH48TZPRBK0dnQJ4SBzJKSB8TufQHJdU886nAmTFdly/V1wPEizl
0+oM7S83oQZN4y8jnlvp3OdepphENS5J82LNNGgzhqvvUVddVpBJMB/mleK0SKNV
oA17tMNadQDxsgycNnQ9oz25MikZpGA7lFSE0vSXhQJLTF+NROmP8d6ZTDi39yrq
yfA72VKPsUJ3jzQH8HEW24B7PySovH6dG3KEOjpOfRtmjNUjoSpR3x6whQNiua6Q
bIBg7SU6TGhTfCdEFCnSot/2PRJIuc/UBYW3KQ0x0FVDKcjTMyIvxw==
=Urz7
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/DMW5IdQB69E/m/DbK3EiPfhPcJ", "n_sections": 75}, {"thread": "Lpr_DQ1_Ea0", "msg": "jFeSSVvYPUQJ", "author": "David Hopwood", "date_disp": "Jun 18, 2001, 1:16:42\u202fAM", "subject": "New Directions in Cryptography", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Someone recently asked whether Diffie & Hellman's 1976 paper
"New Directions in Cryptography" was on-line. It is (without figures):

<http://citeseer.nj.nec.com/340126.html>

Well worth reading.

On the subject of early (1970s) papers on public-key cryptography, the
original papers on RSA, the Rabin cryptosystem, and the work of Ellis,
Cocks and Williamson at CESG/GCHQ, are also on-line:

<http://citeseer.nj.nec.com/rivest78method.html>
<http://hdl.handle.net/ncstrl.mit_lcs/MIT/LCS/TR-212>
<http://www.cesg.gov.uk/about/nsecret.htm>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOy2OfjkCAxeYt5gVAQG3mggAywnIZEbW/Pqw3jy9p7JOHaGVdaCbBXgk
GyFXGIAXA+jo0vYSTZyZuEQrw2he+AKs6luNsaH3ezd44IvRw+JC3uS5/Tm3e54J
WPZQEywhwaB+BrsB1/V6+y24uLbPbxxrXQ/8iKC3Y0eadvHkAHjM+2i4xQeYZDAI
R6pycK906QcsnLC0YNwwVsO3Hk1m1n1jFfId8nq0B+oUr0raW9uNMyPFZsILVqkp
vwTuVU8kr7Br9y1hIaT9Rn8AMCHl+hhUyOx//qOGT3DLexS0duN7DRCh1czrLRdG
7Yl1SmOyeEjXTjLhwH+mxoA5benEJFpurKA8EjI8w8bPTZFWn/OGUQ==
=D78W
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Lpr_DQ1_Ea0/m/jFeSSVvYPUQJ", "n_sections": 3}, {"thread": "OJzHb9C4I0Y", "msg": "JZQz44Q2P_IJ", "author": "David Hopwood", "date_disp": "May 28, 2001, 5:14:30\u202fPM", "subject": "Good crypto or just good enough?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Sam Simpson wrote:
> "Mark Wooding" <m...@nsict.org> wrote in message
> news:slrn9h53a...@tux.nsict.org...
> > Sam Simpson <s...@samsimpson.com> wrote:
> >
> > > Is this a suspicion or is there a proof for this somewhere?
> >
> > Suppose that A is an adversary which distinguishes triple-DES from a
> > random permutation within some given resource bounds (say, less than
> > 2^{56} time). Then construct an adversary B which distinguishes single-
> > DES by choosing two more DES keys at random, and giving A the provided
> > single-DES-or-random-permutation oracle and two further rounds of DES as
> > its oracle. B will distinguish single-DES from a random permutation in
> > the same resources as A except for three times as many DES encryptions.
> >
> > Will that do you?
>
> It's certainly interesting!
>
> I'm thinking back to a paper (probably Schneier) where they found an attack
> where 2-key 3DES was stronger than 3-key 3DES.

That was a related key attack, assuming you're referring to

John Kelsey, Bruce Schneier, David Wagner,
"Key-Schedule Cryptanalysis of IDEA, G-DES, GOST, SAFER, and Triple-DES".
http://www.counterpane.com/key_schedule.html

> You seem to provide a proof
> for a specific class of attack, but may there be other attacks where the
> security [of DES and 3DES] could be found to be equivalent?

It's unlikely that they would be found to be *equivalent* under any attack.
Kelsey, Schneier, and Wagner's attack is still more difficult than breaking
single-DES (since it requires a meet-in-the-middle attack on double-DES),
even if the related-key conditions hold.

> I guess I'm asking: does your proof imply that, for all attacks, 3DES is
> stronger that DES?

No, Mark Wooding's proof assumes random keys (which implies that the 3
single-DES keys are independent), so it does not apply to related key
attacks. However, you can make a strong argument that such attacks should
be prevented at the protocol level, so if the algorithm itself prevents
them, that is just a bonus. If you look at section 3.3 of the Kelsey,
Schneier, and Wagner paper, which tries to give a motivation for why
related key attacks on ciphers are important, all the examples given
rely on serious protocol flaws.

The other case where related-key attacks are significant is when constructing
a hash function from a cipher. However, that's because the constructions that
attempt to do this rely on much more than the standard security definitions
for ciphers; it's very easy to create examples of ciphers that are secure
when used for symmetric encryption, but insecure when used a hashing mode
such as Davies-Meyer, etc. Personally I consider that to be a flaw in these
hashing modes; I prefer dedicated hashes.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOxK/ojkCAxeYt5gVAQHR0AgAngEwlyIdolxTmEAoj6NblB3qPpFO5ZjL
teywm2XcW/UgktoaOsSlYGD9ft/Nwobi0alpJWCHV9bCbPWkTwwLN2XjNw2Gosac
du492wH5vZ++7cRrIad62VCeDWr7KgOOEjtCVDQMcU7KK1uRlKuWFPJd44+lCYLv
p2DADYiENQBx0dB6U9IGY0kZszcyQLeeR7NoXa+MWtNZZq5t6r8aAWr3aB8gG58H
E6F6CaAsDKKpZTDh616/ZHSlck6sTQGSAxTxbeGl+6qx9D/9DB8S0lnRyeq4Ejob
KDNa3OMBS1eRF/nFyUJ9Ek5b+bfXpgaNdpfxmbBPRmFCkuifhsMxfg==
=9bKD
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/OJzHb9C4I0Y/m/JZQz44Q2P_IJ", "n_sections": 83}, {"thread": "OSc-dNndI2U", "msg": "ritVZKNp3fwJ", "author": "David Hopwood", "date_disp": "Jun 15, 2001, 2:46:15\u202fAM", "subject": "Avoiding RSA padding altogether?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

[0, N-1] works fine and is equally secure.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOymvETkCAxeYt5gVAQHOGwf/eohiQZO7X4cy/jF40yFATZTrLRlJJd9+
cMMIccOzVZCdYnyPWXCbhW11w8NybXgpCWNSTPX6/kTOn6PgWm5VZp5DXOFfuFsK
oFieYZWMtDjhXt7rNrTXGoBM7oMZVtXky1ZE2A5LYn6rzDpPvPl7TD9URvaJb1oM
xEM3vkSCHU/YCq5sywds7VPd92LwtV+ciW056hNW4e/Uzf9VM3uPciBWaqJvptEO
DItGfxNUEOa04ug9W5aQgPW02f7Z554GID3gdoDpB6S4knW9Qgqde2ZvQcz2ZuQO
Dtjbb0yq5Ji7JeTGZigUITd08aWlKS+SErW9MH0Gov6bz0vr+nXdiA==
=9UMB
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/OSc-dNndI2U/m/ritVZKNp3fwJ", "n_sections": 13}, {"thread": "QADpt6529A0", "msg": "MaaVYh8rHawJ", "author": "David Hopwood", "date_disp": "May 11, 2001, 12:56:40\u202fPM", "subject": "Off-topic - UK crime statistics (was Re: Best, Strongest Algorithm)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

This is completely off-topic, but in the interests of accuracy,
total reported crime statistics in the UK are going down, except
that reported violent crime is going up. Any theories you may have
about the relation of that to gun control policy should be discussed
on, for example, talk.politics.guns, not sci.crypt.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOvuCrzkCAxeYt5gVAQHdIAf/Y4AkFJ9Ylf0koGKKDH5uN8pEBUGfaoMD
A+diIozVLh/iivHpkP4W81IDH7gMKQvZWzNZc9z3m0WWnxVrz8rQn7WurKQme7cI
vpdpt7GXN8JGU0wV0qasiTVvAFtpKYqo8u//Sxjvd9jRZ2PQw0MjcOJ5XhTNp4+i
HiFpwwbvlzWcIXjlhvK/aidoAPb8i+VZMCkS8/Q6ABLs9wX6ux9v2rvxECvRBPFQ
vNZIB3Z7AH2xmDM4VL4Sl9uDR6lgezfPasdofBNRqr/u80/JKhoMYY6/LKyrDzjz
LrkQdlArfHZ4fvY+S3RuvUD5rYsZa3Ts847W2R4Gt82qOWx3QEZ5Fw==
=Xk4S
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/QADpt6529A0/m/MaaVYh8rHawJ", "n_sections": 100}, {"thread": "S4mlJXbupC4", "msg": "_Jl_gr7HMQMJ", "author": "David Hopwood", "date_disp": "Jun 19, 2001, 8:13:24\u202fPM", "subject": "My ENT program [was SHA2 PRNG]", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> 1. I have tested this program and as far as I am aware it works. There
> are two modes to my entropy code. The first is static which means you
> pass the file then pass again to count the entropy. i.e in the first
> pass you set the update to 1 [hint if you peek at the code you will see
> what I am saying] and the second pass you leave it to zero.
>
> The second mode is adaptive where you leave the update flag set at all
> times. As far as I know as long as the tables are zeroed before you
> begin it cannot enter an invalid state where the result is undefined.
>
> I passed it over the output of /dev/urandom [336kb of output] and got
>
> e == 2719657.250000 bits out of 2719744 bits
>
> Which means it found a slight bias but that isn't surprising.

If I understand correctly, that doesn't mean it found a slight bias. The
entropy estimate is always <= the input length, correct? So even given a
sample from a perfectly random source, we wouldn't expect the test to give
e = input length. Instead, it will give some distribution of entropy
estimates, with a mean less than the input length. In order to interpret
the results, we need to know what that distribution is.

(If a statistical test did find a consistent detectable bias in the output
of /dev/urandom, no matter how slight, that would be a very surprising,
and publishable, result.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOy/qezkCAxeYt5gVAQGGBggAzqtPZM4pf5Z9UNLdebeM5Xlo3unc2j2i
2+M5hz9K1LPG+rU8I8Lb8MrI1pUuq9EphJNCopVouyf00DwAtK147RD86vtKpvS0
5wECTH0dE8sHmh2DqjgcCXB6UPppmCvTaOomTxo+YZ40vfPRlAHtFxggyYWYaiLk
2CvWcvae1kvFwosQQqOzcTfeFRRV12rCPRdKVJJG/KiL3ztNwwtpZ6WdSjYp/4z9
AFDoGlBcvpwE4hWvzJm2PK+IhMOlHwP1fnwgWTbkgfAdnr1lmzY795SLcD4Kskvm
ErnT8IqqxXoWAmVOwBSGleLwi4rnk6WcitqnEbuHzMl+R3HYcIryNA==
=0ddt
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/S4mlJXbupC4/m/_Jl_gr7HMQMJ", "n_sections": 11}, {"thread": "UbyXEks5WP4", "msg": "8cDLPaqbEVAJ", "author": "David Hopwood", "date_disp": "May 28, 2001, 5:33:01\u202fPM", "subject": "A new technology for internet security?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
> A US firm claims to have developed a new technology for
> internet security though varying the IP addresses:
>
> http://dailynews.yahoo.com/h/nm/20010521/wr/tech_security_dc_1.html

I don't see how this would have the slightest effect against attacks on
application-level protocols (exploiting insecure CGI scripts or e-mail
clients that run executables, for example), which are the biggest
practical threat anyway. Also, it introduces all the same protocol
incompatibility problems as Network Address Translation.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOxLD2zkCAxeYt5gVAQG1bQgAiS5pp4DY+NyD8wepBzHyNI5KfPzbzwOx
VzB3I6SK4WjqHYAiFkrEmU5mWF8A5H89B7H6AuMllUFCSiBQCZQ1XVCYQTGNSsDL
QPV+qsEZlhFNfQoxTXiIz9wE8T2gMRKlDXbLPkAALm79WQMVRLm3bXX2cWvpUfCf
zmUi/+My7SYS64N6IqyyG7erFjpCcAZuDXsKb78RCZPK6kZy63Orb6kb7pIfC1L9
5QJg7sCIqtc8lAI9nAgVjykkq1CWzsqxpjY7ytuGJCDlNxKRXGDIfteAMYtyi0AE
OAqzZS8XPuxyMhRMujMCJ2lChmJKhckwenTVtP/vpwwCxX1NA0Us3Q==
=NAeZ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/UbyXEks5WP4/m/8cDLPaqbEVAJ", "n_sections": 7}, {"thread": "W1xV0kg2FC0", "msg": "04msTnvhcEgJ", "author": "David Hopwood", "date_disp": "Jun 22, 2001, 7:00:56\u202fPM", "subject": "crypto flaw in secure mail standards", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

vedaal wrote:


> Don Davis wrote:
> >Suppose Alice and Bob are business partners, and are setting
> >up a deal together. Suppose Alice decides to call off the
> >deal, so she sends Bob a secure-mail message: "The deal is off."
> >Then Bob can get even with Alice:
>
> > * Bob waits until Alice has a new deal in the works
> with Charlle;
> > * Bob can abuse the secure e-mail protocol to re-encrypt
> and resend Alice's message to Charlie;
> > * When Charlie receives Alice's message, he'll believe
> that the mail-security features guarantee that Alice
> sent the message to Charlie.
>
> This 'flaw' assumes that Alice's signature verifies as a 'good'
> signature.
>
> This can happen if Alice first clearsigns her message, and then
> encrypts the entire clearsigned message {rarely done in pgp or gpg }.
>
> It can also happen if Alice uses the *sign and encrypt* option, where
> her message is both signed and encrypted, but ONLY if the key is the
> same for both signing and encrypting.

The signature and encryption are (almost) never with the same key,
obviously, since one key belongs to the sender and the other to the
recipient.

[...]


> {afaik}it is *not* possible to do this with a message that has been
> signed and encrypted with a pgp dh/dss key where the signature and
> encryption are not with the same key.

That's not correct. Look at the OpenPGP formats carefully; nothing that
depends on the intended recipient appears in the signed data.

I've heard noises made about including headers in OpenPGP encryption and
signatures for a long time, but nothing ever got implemented, AFAIK :-(

I'll explain the weakness I was referring to in my previous post
in another thread entitled "Compatible weak keys". It's not the same
as the 'unsigned context problem' being discussed in this thread (as
the anonymous poster points out, just including the recipient's key
fingerprint in the signature wouldn't be enough to fix the unsigned
context problem).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzO7fjkCAxeYt5gVAQHx4Af/fyP2aQtRdJyBT4dC4Hh7eABXEb6NCarO
z6jvR7IOghy0QeJ7eudoT6Ezf4uaJb/yMT8yWJeHjmi49+Ycf//3oekMz874gMHC
RIniTZ3EMXk5LNn8KteziH6HMP1cfB2d7hsEfSLbH/rnXhhLyXdDFP+u6MTuRaLL
xF63WVNMIYzxcRgaWW3h3tdintqJt1Ck3sjstpF1Nw8+I7IbnG6hLRWQPTQ/XRM5
rI65h4OTBPg61QxqtFP2zW2NDsHao6PGBXjtPfIDqmNNSaM49YLSZB+EUARIZL4e
9L7mwajA9BlisfvWMmAInJWtwujoIwblqMN2arKD5t7Z18CcD35SSw==
=w2oK
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/W1xV0kg2FC0/m/04msTnvhcEgJ", "n_sections": 3}, {"thread": "_x00C7hCy8Q", "msg": "_Lsw8uMcu1wJ", "author": "David Hopwood", "date_disp": "Jun 23, 2001, 5:35:57\u202fPM", "subject": "ECC doubling?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> Is ECC doubling the analogue of squaring in Z/nZ?

Yes.

> I.e is it possible given a point P to find a point G such that 2G = P with
> trivial ease?

It's exactly analogous to finding square roots: if the curve is over a field,
then it is easy; if the curve is over a ring, then it is as hard as finding
the ring order (so for a curve over Z_N it is as hard as factoring N).

[Elliptic curves over rings aren't commonly used for efficiency reasons,
but it is as well to know about them; if you have the CRYPTO/EUROCRYPT
CD then look up "elliptic curve cryptosystem, modulo a composite" in the
keyword index.]

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzS2kzkCAxeYt5gVAQEkEQf/Y6FfW/TyMOpRhvSWBfO8AaPIxFhhd69V
9H6JUs101giV7DgyPwGrcXAPmmb1OzCFvhCNtgIawrmCY2UHfGbJkco/jWLSMN2s
kwlhh8mR/9z4tEaIb0qwa28CAC4CQSsaANs6jMznx7KjGZCXwuuAKqmH0C/w9Nl6
+ousu9EWcRADhwe+B+x1GCJWF9lkc7dREYxeHFaMr+EcsdYBD/WLfaBLau7CyoCL
Wf3knoaq8HbjhYlwXVkdWzu3Lnbq3d0DKJdG5VOS0EQFQ3DGnSNLYHYm5iqazhyw
N+s4P3gvQzSWY/hsI6ZJc/uOK0mZI9P/T3xNgv/8v8utxcmOQHL0lw==
=eQAl
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/_x00C7hCy8Q/m/_Lsw8uMcu1wJ", "n_sections": 3}, {"thread": "babOFHLzqmA", "msg": "9Fmvs_NcyrgJ", "author": "David Hopwood", "date_disp": "Jun 5, 2001, 3:47:03\u202fPM", "subject": "Lim-Lee vs safe primes for DH", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> A question was raised whether Lim-Lee primes were better in terms of
> ease of generation and securtity versus a Sophie Germaine Prime.
>
> So we get our terminology all straight a Lim-Lee (LL) prime is one
> where it has several huge prime factors,

No. A Lim-Lee prime is a prime p such that *all* factors of (p-1)/2 are
sufficiently large (say >= 200 bits).

> a Sophie-Germaine (SG) prime is a prime of
> the form 2p + 1 where p itself is prime.

No. Here p is a Germain prime, and 2p + 1 is called a safe prime. It is
the safe prime that should be used as the DH modulus.

It's "Sophie Germain", not "Sophie-Germaine", BTW. Sophie is her first name.

> The chances of finding a bad LL public key (i.e where it generates a small
> by comparison) sub-group is low why not use a SG prime?

I don't see what argument you're trying to make here. The usual argument
for using Lim-Lee primes is that both parameter generation and the DH
exchange can be made more efficient (the latter because you're using
smaller exponents, and it is possible to do the necessary small subgroup
checks more efficiently).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOx022TkCAxeYt5gVAQFViwf/Qf0ms0o5DrCTJXxcvTy99ayJ8OgR8Eav
hk4ukCJSucZqlBwnyFRT17kbsf+0xaTlgnb/aZjctH+68VK12yetcdGMIem8CvMB
UppcSE5W75WFSbNWEYlnTy85pcAOzZNMpLwJkurNUVNPIUZCnve81KabNmqW9Sxk
bU1QmMm6r8dMxE0sqCZqUFUBZvEEP+QYcGRUz+QC2GgHqiP6Eq6KqPSZeOpLTljK
eiqPD4pGCxjKLehIaFxTSVxI02ck8zWvTGHTiqkdqar1/se2Vxu4eM7TCE/KLD1n
bXVR53y3B74hE5JHt+R15KU5edok3O3eulfGqFA54Jjml63bHFBs3Q==
=OEI9
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/babOFHLzqmA/m/9Fmvs_NcyrgJ", "n_sections": 3}, {"thread": "biQXDvIthIY", "msg": "PIfBgiXJtRcJ", "author": "David Hopwood", "date_disp": "Jun 20, 2001, 6:13:57\u202fPM", "subject": "About Principia Mathematica (long)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
> To repeat, it is in some sense 'simply incredible' that
> a layman can so easily find faults of experts.

I don't see why that would be incredible. Experts are considered
experts mainly because of their depth of knowledge in a particular
subject, not because they are extraordinarily less fallible than
someone who is a layman in that subject.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzEf9jkCAxeYt5gVAQEeBwf+NOepk+Xa9opIZstfujrAAM0hQvl7cfMx
iOV8gUZ7GfdtbNHjeHg2/FiERCfTkJKYH3fHgv4hPJfJbu+IDBOuBit901KIjyqQ
mujtxVXo5YP4lsMhsYzsvW93Y2ULculEFtN2xv+IXtRxsD8w9fADiraW8jR2d7zS
P1DVaPyv/+k6JPlS3z7TdzghBFXBVNKXgHkqNrsIDaAAHptVKQ86ysTGclKku/3L
JSttLKcEdLEUj6U0dH5qgYvcfC7vFr8FBNs9kTKOjapSBIImILbb4JUdLFZFI60D
VczEtPfi2BY++nXShG42Ruqt/MV2t+n3k5rHHC0AzSysqaRKMBIk2Q==
=B75D
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/biQXDvIthIY/m/PIfBgiXJtRcJ", "n_sections": 100}, {"thread": "cT69ySOf50M", "msg": "71rfJ1MNefQJ", "author": "David Hopwood", "date_disp": "Jun 27, 2001, 8:44:41\u202fPM", "subject": "distributed authentication", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

William Ahern wrote:
> i'm looking for information on distributed indentity authentication
> (and also access authorization, but not as important right now, unless
> those two are necessarily dependent on each other).

Yes, they are dependent on each other: you should really consider
access authorization from the start, rather than layering it on
identity authentication (the SPKI papers mentioned below explain why).

> i'm interested in mechanisms for flat (non-hierarchical) models that
> provide authenication of an indentity. and, more importantly (as
> I can find some of these on the internet) critiques/attacks of
> any of those models (i.e. like how trust relationships could be
> poisoned, etc).

Read the papers on SDSI/SPKI, at <http://world.std.com/~cme/html/spki.html>.
RFC 2693 is a good place to start.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzp9yDkCAxeYt5gVAQEkMwf/X7z1zw0aYLJEQ9+L7gJqVHHbPUmp1CUB
PS+bKduW8G0h/OZ+7iupqqf2QvO8b7YSYRvA8Z95WbVvvdDPfDYdQt64Zb8e0oD0
h1J7vzQBMXwssjVtvXbd/tRECDDfge/2ug/NFFevF80WYXgR0UJhsdd+8fy8fq07
5GCF1BaBCniZWfOVWNT8pERskbDGZ4VjQx+H6noGXq3Gdh0eTK9JnRR33hYkq10i
wxIfqllqtzGBljynD1eidD5LV5f0BS6/OmFZWfAobjutmXCW0bYtW0/uwaF9hvoa
4riZMBtYi8qBSpasfWzKLQvgTukAyLyhUy1gW2KDTbtiUam7Lf9YvA==
=UFoA
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/cT69ySOf50M/m/71rfJ1MNefQJ", "n_sections": 9}, {"thread": "fZxBfhq_0Cs", "msg": "1pwmC8VSqB0J", "author": "David Hopwood", "date_disp": "Jun 25, 2001, 8:29:06\u202fPM", "subject": "Hash based on DLP", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> The problem is of finding the base not the exponent. i.e solve for g in
> y = g^x mod p for a known y,x and p.

That's trivial when p is prime: g = y^(x^-1 mod p-1) mod p.
(If I understand correctly, however, that is not the problem the hash is
based on.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzfXNTkCAxeYt5gVAQFriAf/RhOdALhei1yW8SqtLMSKmgpCh68N8fMf
rLGdo8ntLq/WgqYhzVCcUbAqRFoFubsbwZJAw8iU0b0wAzM8hKTO4UIliwq+3Vt+
3r0K58vQl2WngWp+p5jwRYT3PGHUxff8V5ba+URaqAuO0xMU87SzIO/wg0DPxffn
AQAP/zG2PVy2KYzpPIESZaX67sI1H4cC+lemALRMJF+TPt/sGyOWULzyvSjwJsP2
M2wTz7RH6f+OLkRS7lcI+aXj56GFg5xnNcuV10odSWXBxoeVi1RGNumnARTvj+Mq
mAsBAR56yquhUGFkrsZydY21yM6k81YPwsIEIUHBhwUOVL+64NbGZA==
=O+Q0
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/fZxBfhq_0Cs/m/1pwmC8VSqB0J", "n_sections": 8}, {"thread": "joCQeSB51CU", "msg": "Bmc2x_T0y34J", "author": "David Hopwood", "date_disp": "Jun 5, 2001, 3:25:14\u202fPM", "subject": "Def'n of bijection", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

You're wrong. If a source outputs 0 with probability p, and 1 with probability
1-p, then its entropy is maximised when p = 1/2. Saying that the 0 message
has a very large [Shannon] entropy is nonsense, because Shannon entropy
is not defined for particular messages.

The point that lbudney...@nb.net made:

> : In particular, if the key has fewer bits of entropy than the message, then
> : potential decrypts will not include all potential messages, period.

is indeed precisely why compression doesn't hinder an attacker in recognising
plaintext. Compression cannot change the total entropy of the messages sent
under a particular key: that is determined by the usage characteristics of
the application. Once sufficient messages have been sent under a given key,
there will be enough information to brute-force it [*]. If we assume that the
key size is fixed (i.e. not an OTP), then compression makes no significant
difference to when this happens. Even though the distribution of decrypts will
be a little closer to the distribution of meaningful messages than it would
otherwise have been, in practice it will there will still only be one decrypt
that is actually meaningful, and it will be easy to recognise that decrypt
automatically, for message distributions that occur in real applications.
Note that this is true even if codebooks are used, since the messages in a
typical codebook don't have anywhere near equal probability of occurrance.


[*] I know that David Scott handwaves about other attacks than brute-force.
However, he hasn't put forward any coherent argument as to how bijective
compression would help against such attacks. Note that cryptanalytic
attacks against commonly used block ciphers generally require large
amounts of *exact* known plaintext (at least). In plausible situations
where exact known plaintext would be available - when data streams from
multiple sources are encrypted under the same key, for example - then it
would be available whether compressed or not.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOx0xoTkCAxeYt5gVAQEhwQgAhhDyDTAwU9HuzM6Gsv+Y8ZOqgyPdctA2
PPeP3/YBHotBbM4mIL9WxSIHFiLLSMDbEBO21SgaKyQV4rOzM+3XXCviuASQXcF+
1nK00Ypb5i1rNb4Fkt76t5Va60oxKdQy3zED9jDejceiK9Cdju6FhYtGAmEwSj8y
fgBrTXgOV4z53a6vpju7GuSfPiSHDYC1Rbi83MmU5aZWsLcACREmnKhqdYNOyFG0
cbJtP7PmooxtzWAlyXaJSpGMgYH3smSfBu97VXr8gSj46IMaV37guRQWq6qsC0ZA
0XtFlYOHa20OkUS0W4JjHVa0lO1XJFcH44C2UGVh5jviJBJHWavYgQ==
=vJgb
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/joCQeSB51CU/m/Bmc2x_T0y34J", "n_sections": 100}, {"thread": "r8dfIYnB3E0", "msg": "a8qBFAar2hQJ", "author": "David Hopwood", "date_disp": "Jun 27, 2001, 8:07:06\u202fPM", "subject": "SAC2001 List of Accepted Papers", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Ichinin wrote:
> > "Weaknesses in the Key Scheduling Algorithm of RC4"
> > S. Flurer, I. Mantin, A. Shamir
>

> Is this paper available somewhere or will it be published soon?

Since it is referenced but not available at Itsik Mantin's page at
<http://www.wisdom.weizmann.ac.il/~itsik/RC4/rc4.html>, it is almost
certainly not on-line. You could probably ask one of the authors.

One of the other interesting cryptanalysis papers in that list,
"A simple algebraic representation of Rijndael", is on-line (as a draft),
at <http://www.xs4all.nl/~vorpal/pubs/rdalgeq.html>. There is no attack,
but it certainly makes me a bit more nervous about the security of Rijndael
than I was before reading the paper.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzp07jkCAxeYt5gVAQE6/ggArZ0R/b3NzSpraB40yMKTCMJ4PEniGu1N
53bVfbS7p/5QqKl1Y6q6UTccQihTluF83mq4AaYUQRE1LiiIs+oq6c9tegZP9tlX
XKwKo/rgCNiqUDgfFE0D5vJMYJepARf2R7vH+6cXoepmJbvse3Kt9TGzH3bkTn4k
7tHTDvq45Cy+qG4hhFWhdBht1XyiZvqqfAA2LCovs5gSrzOeH6TtW46Ge3Q2ZS+p
BCmB4CglGLqW885n2M1HgstgXtooDpi127Skw2xBumPKGydGY1kxxZ0IEWfW6NKO
txqjPdW+SOvjQRWCZ9/tvE9SrUQ0HDwy08HdQC3I60HRBvZUJ9Fh4Q==
=oixv
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/r8dfIYnB3E0/m/a8qBFAar2hQJ", "n_sections": 4}, {"thread": "svimwvWvCIA", "msg": "9uLVsr3D2H4J", "author": "David Hopwood", "date_disp": "Jun 15, 2001, 8:02:03\u202fPM", "subject": "Is ECB truly more secure than CBC?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

lcs Mixmaster Remailer wrote:
> Someone named Joseph Ashwood is posting to the XML Encryption list,
> presenting himself as a cryptography expert. In his most recent posting
> he offers an argument as to why ECB mode should be supported in addition
> to CBC! Will any respected cryptographers speak up to say that this is
> a credible argument?

It isn't credible. ECB is an insecure mode for most purposes, including
the purposes to which XMLEnc will be put. Whether an artificial situation
can be found where a particular type of attack might work against CBC but
not ECB, for an insecure block cipher, is beside the point.

I haven't been following the XMLEnc standard, but if it does not already
do so, it should support an encryption mode that is non-malleable, i.e.
has the IND-CCA property [BN00]. CBC does not.


[BN00] Mihir Bellare, Chanathip Nampremprey,
"Authenticated Encryption: Relations among notions and analysis of
the generic composition paradigm,"
Preliminary version in Advances in Cryptology - ASIACRYPT '00,
Lecture Notes in Computer Science Vol. 1976 (T. Okamoto ed.),
Springer-Verlag, 2000.
Full version (September 25, 2000) available from
http://www-cse.ucsd.edu/users/mihir/

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOyqhkTkCAxeYt5gVAQG4hQf6AwV4uwpqTi7zjbx6HH08n0HGZMpRPa/t
+cGs4aaITV+Ri+QH8cr5EQA+xU/lRrpP48Z0Dp6ydgOL9lKx529N9XhXnbhOxRbv
+33p2RIT+mYL4QmDKhS+PQFDuWEEwxJSd0Jcc138Vd9AIe7Tipbfq1UMQsNiTK5r
SPNk7QhDwl3P2Efn4FM04LVZ+GtpkMUYVKtNqhO3wYFdRQZ8zo3ttZ7BydNZsEZ5
wEpOFAUnrE6Tm0E4Eayul77w38ytDGo1EbWSRZHel6Vw6miaB6fRWP/IhWMZu6u8
Qd2lDmlEiDEMIfx/G4dEm8GWoYgrCAKJd5X5DA0Lkxe7YDjQyiD8SQ==
=Gjjs
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/svimwvWvCIA/m/9uLVsr3D2H4J", "n_sections": 92}, {"thread": "svimwvWvCIA", "msg": "g_3BuwQvRrYJ", "author": "David Hopwood", "date_disp": "Jun 16, 2001, 9:23:18\u202fPM", "subject": "Order of encryption and authentication", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tim Tyler wrote:
> lcs Mixmaster Remailer <m...@anon.lcs.mit.edu> wrote:
>
> : As the paper you cite points out (also the June 6 paper by Hugo
> : Krawczyk from the eprint archives at http://eprint.iacr.org/curr/), the
> : MAC should be done after encryption.
>
> : This is perhaps somewhat counter-intuitive; instinctively one might think
> : it safest to hide everything within the encryption envelope, including
> : the MAC. But the emerging consensus definitely seems to be the opposite
> : [...]
>
> Schneier lists several reasons for *not* doing this on A.C. p. 41:

Schneier is talking about sign-then-encrypt vs encrypt-then-sign for
asymmetric crypto. It might seem a bit counter-intuitive that the
"recommended" order is different for symmetric and asymmetric crypto,
but it does make sense, see below.

(BTW, I find the analogy with letters and envelopes in that section
unenlightening, and the penultimate paragraph on p. 41 is just plain
wrong, since it describes an attack on real-world envelopes that fails
against digital signatures. That doesn't affect most of Schneier's
reasons, though.)

> If you sign a document, it suggests you have at least loo[k]ed at it.


> If you sign the envelope, you might never have seen the document.

This matters mainly for non-repudiability. MACs can't provide non-
repudiability anyway (being able to verify a MAC implies also being
able to forge messages).

> If you sign the envelope, someone can remove your signature and add
> their own.

MAC keys are usually tied to a specific protocol instance between two
parties (it's arguably bad protocol design to use them as long-term keys).
In that case re-MAC-ing with a different key will just cause the
verification to fail.

> Also, if you sign the envelope everyone can see who signed it.

This matters only if everyone knows the verification key. For a MAC,
they don't.

> There are some advantages to signing outside encryption - but the
> disadvantages seem pretty overwhelming.

One of the arguments that Schneier mentions in Section 2.7 and on pages
473-474 of AC2 - the specific attack against RSA - is pretty much obsolete;
secure encoding methods like OAEP and PSS will thoroughly prevent that
attack. I agree that the other arguments are convincing for public key
signatures, but they don't apply to the symmetric key case.

Conversely, the arguments against MAC-then-encrypt (or MAC-and-encrypt)
in the Bellare and Krawczyk papers don't apply to the public key case.
If you use sign-then-encrypt with an IND-CCA2-secure encryption scheme
and an EUF-CMA-secure signature scheme, then there are no problems
analogous to those described in the papers.

Note that in recent hybrid encryption schemes (for example DHAES), it's
common to use Encrypt-then-MAC for the symmetric part, to ensure
non-malleability. In that case you effectively end up with
Sign-then-Encrypt-then-MAC, which is in some sense the best of both
worlds (it is generically secure assuming only standard properties for
each algorithm, and it doesn't have the disadvantages Schneier describes).


Here's an interesting protocol design puzzle:

Alice has a public encryption key PKB for Bob, with fingerprint FB.
Bob has a public verification key PKA for Alice, with fingerprint FA.
Enc is an IND-CCA2-secure encryption scheme and Sign is an EUF-CMA-secure
signature scheme with appendix. Alice sends a signed and encrypted
message with plaintext M to Bob, as:

FB, Enc_PKB(FA, M, Sign_PKA(FB, M))

Exercise: why is each of the fingerprints there, and what do they stop an
attacker from doing?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOywGVTkCAxeYt5gVAQHtJQgAv2E5q/bBtIBkrPlLgjgRvX8euzNdgrqf
BNlmcJmyqQTt3IdoLPEGf72wYvTwpoTri7L2/NUUXuxL9Qt5lgJNfSrYmnZAZgdi
cJGlZoR2SHpsgV3hR8bml9eHOT9UDtqFrBQglOC9Qe1ncNw9L/kG1HXOtugWLUvC
XVMoeMIFcc2NLOvMIGIjyjfj9vw55tMbsL8FOeBN8umVGQnhvZcy8rG/2pbOwlbb
OG2SzCWplTjdUZli3Uc/P3kCtlDTzslVONH8bq9vQmFMdI/GCr2aCO3pGmJ7GwHD
rjZLS8VH1K3ZB7Zq/xFBPAL4HdZzfjDyxsxven6tf/of7MH+uZMWYg==
=LIdj
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/svimwvWvCIA/m/g_3BuwQvRrYJ", "n_sections": 92}, {"thread": "svimwvWvCIA", "msg": "SmqRTaC7KpMJ", "author": "David Hopwood", "date_disp": "Jun 16, 2001, 10:26:32\u202fPM", "subject": "Order of encryption and authentication", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

I wrote:
> Here's an interesting protocol design puzzle:

I misstated it slightly. This is the corrected version (the difference
between versions is a big clue):

> Alice has a public encryption key PKB for Bob, with fingerprint FB.

Alice's own public verification key is PKA, with fingerprint FA.


> Enc is an IND-CCA2-secure encryption scheme and Sign is an EUF-CMA-secure
> signature scheme with appendix. Alice sends a signed and encrypted
> message with plaintext M to Bob, as:
>
> FB, Enc_PKB(FA, M, Sign_PKA(FB, M))
>
> Exercise: why is each of the fingerprints there, and what do they stop an
> attacker from doing?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOywVJjkCAxeYt5gVAQGUgAf6A5iunE3nAP0/pd5EoJWW6CDa5h+DPXey
MPG/JAF0UpZNSa/ZfIcxlBHn8rxOwEV4jX9gXcLzEllc04yu8ESQq/qugttZbWcP
ybz67avDxzTGbEFqSmD1KGWXAJZ3mRgAraEBI8oG3m5O7nJr7wWI9CjbMNPjEOUO
eoPuqc9wOlJDf4uRrA2kaq/VOJzjVSAmMrRhlc2guMrbA9CS15prllXNynOQRae2
9k3NnA2kgQrby2W4iuRnpohROWoEIOrijAi7w/rJg7+kgiNLsPINKkY+yyys9Lkw
y23wbBDpc8+upFjVcwh7cabJXwfGLmEN8hXWfm+HtheGF2RfNZf2TQ==
=/501
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/svimwvWvCIA/m/SmqRTaC7KpMJ", "n_sections": 92}, {"thread": "svimwvWvCIA", "msg": "asDWczaFHBUJ", "author": "David Hopwood", "date_disp": "Jun 18, 2001, 4:04:15\u202fPM", "subject": "Is ECB truly more secure than CBC?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Joseph Ashwood wrote:
> Except by the same notion CBC can also be distinguished.
>
> I assume you mean the measure of given an oracle that either
> (encrypt/decrypt)s the data given or return random information that ECB
> can be easily distinguished by feeding to a value twice.

No, ECB is insecure even under ciphertext-only attack; no encryption or
decryption oracles required. For XML-encoded data, repeated plaintext
blocks are quite likely.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOy5ekTkCAxeYt5gVAQHl4AgAsVAGWg0a9EeUKBx1/QCeS86Nf+TbAzRZ
ma7oEIidlkXinXTEGA/gDVtbMc1qTLa9DqotvmDaywvLCp15LhNVCg9jkt9gxt6M
xjdfumL/CGI9g7CcC6AnozTG6NWtmwIJFP56GgzGTzbcYbB7YfXiulYqVUvVs+8I
X8sCJt3UJxJA+rDq3/M8YFw3gIjx3cx6sCSx2iFztIaY/3tVKPz6xkhEjxFj2SxA
66ZL8PUO6v+6VKJSEkhOlQ0bfE/vkrx5Cr2aX5VT+lwIWeeVrjAOhA9rEfEA7Gba
TYvfeTKmZ6kamCApZy385/1ZXMQsWmny+24DYEB9Rpv1BpA5eFDhUA==
=xSqu
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/svimwvWvCIA/m/asDWczaFHBUJ", "n_sections": 92}, {"thread": "svimwvWvCIA", "msg": "YkqInFMiVY0J", "author": "David Hopwood", "date_disp": "Jun 19, 2001, 1:16:31\u202fPM", "subject": "Is ECB truly more secure than CBC?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> "David Hopwood" <david....@zetnet.co.uk> wrote in message
> news:3B2E5EBF...@zetnet.co.uk...

> > Joseph Ashwood wrote:
> > > Except by the same notion CBC can also be distinguished.
> > >
> > > I assume you mean the measure of given an oracle that either
> > > (encrypt/decrypt)s the data given or return random information that
> > > ECB can be easily distinguished by feeding to a value twice.
> >
> > No, ECB is insecure even under ciphertext-only attack; no encryption or
> > decryption oracles required. For XML-encoded data, repeated plaintext
> > blocks are quite likely.
>
> While I agree using ECB to encode messages I must point out that if the
> source language is unknown or meaningless [hint CTR mode] ECB is ok.

Why would anyone want to send only meaningless plaintext?
(You might want to send *some* meaningless plaintexts as cover to frustrate
traffic analysis, but in that case the weaknesses of ECB will still apply
to the meaningful ones.)

"If the source language is unknown ... ECB is ok." is simply incorrect.
It also doesn't apply to the case we were discussing, which was the XML
Encryption specification.

> By ECB I mean a mode without chaining [like CTR].

ECB is the name of a specific mode; it's not "any mode without chaining".
In no sense is CTR mode (or IAPM, to take another example of a secure
mode that doesn't use chaining), an instance or special case of ECB, if
that's what you're trying to imply.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOy7ZzDkCAxeYt5gVAQEzsAgAhd4BulNXcVB4E/KoFo6mztOW8bU9RSbM
erOs0MmzMy+Uxpmp4vl/6+cKsDXgjv9Ai3csabuONqozcUtg09DBR16JkiUytKs0
eGnEeYZ+nKOOZ7kbDcj5uRjDSivd5ilnJNyG7nsNlIktLRDmnnsEa+arViH4OACV
Bgs4X/VvATYgh49uBHynsdoQ0e5SHHOlEOFK1XYbG9SQmuH6wAWprO4lM1k88qwX
8+6jpwfus9tS68ZeWiJ9ACgTxZsI9390vWq90MINfUL8ExuqQgq5+xOBOIpnaMgy
LVJjniWJXil0g75xvUU6W9kAQ9o/aS114kRrO8g++js3RBvkcPg8hA==
=N0gL
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/svimwvWvCIA/m/YkqInFMiVY0J", "n_sections": 92}, {"thread": "tiQZHxI5I6I", "msg": "B0q2eWKdq3oJ", "author": "David Hopwood", "date_disp": "Jun 27, 2001, 12:42:12\u202fPM", "subject": "fast CTR like ciphers?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Bryan Olson wrote:
> Tim Tyler wrote:
> > David Wagner wrote:
>
> > : One challenge, though, is that I don't know of any good general
> > : techniques for designing non-reversible PRFs. (Compare this to
> > : block ciphers, where the Feistel/Luby-Rackoff architecture is very
> > : powerful.)
> >
> > Hashes are already one way - if you could key them, that might qualify
> > as a PRF "construction technique".
> >
> > Tiger has fixed 8x8 s-boxes with specified qualities. If you could
> > generate 8x8 boxes automatically, that might be one approach.
>
> We have various ways to key various hash functions, but they do
> not well approximate PRFs.

What's wrong with HMAC, or if a fixed-length input is sufficient, with
using a hash compression function with the key in the chaining variables?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzoMzzkCAxeYt5gVAQHrLAgAmbhjiYHEzLD4XZohpH8H6/Gu10R6edS3
DKX3nvhHKK6dHkXhzfPx9yGQ7LusepNb37vvvCdSWkT32qvXon1E4kCfhuTa+Kn0
zNPWRBduLhrxt3++JHDUTCvEI+Aumgj8ljdFIEhwjmBGOTI1dgLG7Llwx5wqXBUn
mHAZfEE3AVMWBArV2D11T4lAzWTXry0CqNM4MTjrCi/0Nu0NLRxaZekVNvowwPky
FzLs1P/htNQFXQMfn5WCroR1QA58dSaZ5lapQS3NtiLFMzlnS5Rl+9tv8N3ULYSL
Yh4RMTQRtxD1feLACOU5aDNmEVNjjM8F5uwKf0U5red/6nIQK/F37A==
=+p6K
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/tiQZHxI5I6I/m/B0q2eWKdq3oJ", "n_sections": 41}, {"thread": "tlqKEc6MZrU", "msg": "xnPzcv78zYEJ", "author": "David Hopwood", "date_disp": "Jun 26, 2001, 12:17:15\u202fAM", "subject": "Compatible weak keys, and other protocol attacks", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Newsgroups: sci.crypt
Subject: Compatible weak keys, and other protocol attacks

"Compatible weak (public) keys" are defined in the following paper:

Ross Anderson,
"Two Remarks on Public Key Cryptology,"
Available from <http://www.cl.cam.ac.uk/users/rja14/>

Let (SK, PK) be a (private, public) key pair, where the public key
is also considered to include any domain parameters. Then PK' is a
compatible weak key for PK, if PK' behaves like PK in normal use, but
also allows an adversary to break the security goals:

- for an encryption scheme, a message encrypted with PK' can be
decrypted by SK, and also by the adversary.
- for a signature scheme, PK' will verify signatures produced by SK,
and also signatures produced by the adversary.
- for an authenticated key agreement scheme, the key agreement will
complete successfully with PK', but the adversary can impersonate
the key holder, and/or eavesdrop on sessions. (Identification
schemes are similar.)

The reason why this is significant, is that it makes key replacement
attacks less detectable. Suppose that an attacker somehow manages to
subvert whatever measures are used to bind a key to an identity. For
instance, a CA's private key might be compromised, or the CA might
issue certs without adequate checking (c.f. the recent case of
Verisign granting "Microsoft" certificates), or if a protocol leaves
the responsibility for checking certs to end-users, they might fail
to do so.

Leaving aside compatible weak keys for the moment, suppose that an
adversary, Mallory, replaces Alice's key PK with his own randomly
generated key, MK. If Mallory can do a man-in-the-middle attack on
every communication with Alice, then he can decrypt with MK and
re-encrypt with PK for encrypted messages going to Alice, and/or he
can re-sign with MK for signed messages coming from Alice.
In practice that's quite a difficult and risky attack from Mallory's
point of view, though, since missing a single message may result in
Alice or other users becoming suspicious. Also, re-encryption or
re-signing might not be feasible unless Mallory replaces other keys
as well as Alice's:

- if Bob sends a message to Alice using an "encrypt-then-sign"
protocol, then re-encrypting will invalidate Bob's signature.
- if Alice sends a message to Bob using a "sign-then-encrypt"
protocol, then Mallory can't re-sign the message because he
can't decrypt it.

Using compatible weak keys makes Mallory's life much easier, since
he only has to do a passive attack to read messages, and he can
forge only the messages that he needs to. Neither re-encryption nor
re-signing is necessary, and missing some messages does not cause a
problem. Since we're on Alice and Bob's side, not Mallory's, this
is obviously a Bad Thing.

Note that public key validation does *not* detect compatible weak
keys in general (although explicit validation can help in some cases).
There are three reasons for that:

1. Any validation that is done by relying on the public key infra-
structure (for example having a CA do validation, and inferring
that the key has been validated if it has been certified), cannot
help here, because the case where compatible weak keys are
significant is exactly the case where the key infrastructure fails.

2. If a key can be replaced, then the domain parameters associated
with it can often also be replaced, at least if they are variable.
For instance, if a DL or EC key has subgroup order r, and we
validate it by checking that the public value is of order r, then
the adversary can change r in the domain parameters - see below
for an example.

3. Many key types (for example, RSA, OU, ESIGN, ...) have no key
validation algorithms. (I can't find any obvious classes of
compatible weak keys for these algorithms, but I can't prove that
they don't exist, either.)


Concrete examples of compatible weak keys
=========================================

DL encryption (DLIES):

If DL keys are not explicitly validated, then creating a
compatible weak key is trivial: set the public value to 1 (or 0).

It's also possible to create a set of compatible weak DL domain
parameters and public key that will pass explicit validation:

Assumptions
- (p, r, g) are valid domain parameters for DL over GF(p),
- (x, y) is a corresponding valid (private, public) key pair,
- r' > 2 is a small prime dividing (p-1)/2r,
- g' is an element of GF(p) of order r',
- x mod r' != 0,
- the recipient does not validate the ephemeral key.

Then a compatible weak set of parameters and public key, that will
pass both the parameter validation in Std 1363-2000 Annex A.16.2
and the public key validation in A.16.6, is (p, r', g') and
y' = g'^(x mod r'). This is weak because the adversary can brute-
force the DH result by checking r' possibilities.

To construct this key, the adversary has to know x mod r'. That
could either be guessed, since r' is small, or it could be found
by a Lim-Lee attack, which is possible because ephemeral public key
validation is not done.

(This attack is another reason why validation of the ephemeral key
by the recipient should be mandatory in DLIES, although that isn't
my main point here.)


DL key agreement schemes (DH, MQV):

The precise conditions vary between schemes, but roughly speaking,
the same attack as for DL encryption works unless the domain
parameters, public keys, and ephemeral keys (or alternatively
the domain parameters and the agreed value) are explicitly
validated.


DSA signatures:

I can't find any compatible weak keys for DSA if verification is
implemented exactly as specified in FIPS 186-2 or Std 1363-2000.
However, a slight variation on the verification procedure, that
might be considered equivalent by some implementors, allows weak
keys that are compatible with probability 1/4 for each signature.

Let (r, s) be a DSA signature, and (p, q, g) the DSA parameters
(using the FIPS 186 notation, not the P1363 notation). Let v be
calculated as usual for DSA. Consider the following implementations
of verification:

a) The verifier checks that 0 < r < q, 0 < s < q, and v = r.
b) The verifier checks that r, s \\notequiv 0 (mod q) and
v \\equiv r (mod q).

a), as specified in the standards, is not vulnerable AFAICT.
However for b), with the parameters (p, q' = 2, g' = 1) and
public key y' = 1, *any* signature will be verified as
correct with probability at least 1/4. This is because any
signature satisfies r, s \\notequiv 0 (mod 2) with probability 1/4.
In that case the signature is equivalent to (1, 1), and the
verification goes as follows:

w = s^-1 = 1^-1 (mod 2) = 1
u1 = (H(M) * w) mod 2 = H(M) mod 2 = 0 or 1
u2 = rw mod 2 = 1
v = ((g'^u1 * y'^u2) mod p) mod 2
= ((g' * y') mod p) mod 2 or ((1 * y') mod p) mod 2
= 1
= r (mod 2)

The attacker can use (1, 1) as the signature on any message,
and this will be accepted as valid with probability 1.

OTOH, the fact that the target's signatures only verify with
probability 1/4 means that this is probably not very useful to
an attacker, and it doesn't work for fully standards-compliant
DSA implementations anyway.


Nyberg-Rueppel and Pintsov-Vanstone signatures:

Since NR and PV recover the message representative and check
whether it is equal to a separately computed representative,
they seem less likely to have compatible weak keys than schemes
that check a verification equation (like DSA, and NSS below).


EC schemes:

These are analogous to the corresponding DL schemes, except that
setting the public key to the point at infinity (analogous to '1')
will not work, because ECSVDP-DH[C] outputs "error" in that case.

The attack on DLIES also works for ECIES, under similar conditions,
although the existence of a suitable r depends on how curves are
chosen.

The same comments apply for ECDSA as for DSA (Std 1363-2000,
ANSI X9.62, and by reference FIPS 186-2, correctly specify
variant a) of the verification operation).


RSA encryption:

One possible approach to creating compatible weak keys for RSA
encryption, would be to multiply the modulus by a known integer s,
so that the adversary is able to compute the message modulo s (i.e.
potentially the whole message). This is mentioned in Anderson's
paper, and works for Shamir's "RSA for Paranoids" (unless
specifically defended against). However, it doesn't work for any
of the encoding methods in P1363[a], because they produce message
representatives that depend on the length of the modulus, and that
will prevent the message from decrypting correctly with the
legitimate key.

Of course this doesn't prove that there are no compatible weak key
classes for RSA.


RSA, RW, and ESIGN signatures:

The approach mentioned above for RSA encryption does not work
for signatures (even on PKCS #1 v1.5 type 0, where the message
representative doesn't depend on the length of the modulus).
RSA, RW and ESIGN all recover a message representative (even
when they are used as signature schemes with appendix), and so
the same comment as for NR and PV applies.

In particular, I can't find any compatible weak keys for
RSA with PKCS #1 v1.5 type 1, RSA with ANSI X9.31-1998 (EMSA2),
and RSA/RW/ESIGN with PSS (EMSA4) or PSS-R (EMSR3).


NSS (NTRU Signature Scheme, as submitted to P1363.1):

NSS parameters are given by 5 integers (N, p, q, D_min, D_max);
typical values are (251, 3, 128, 55, 87).

The NSS verification operation involves checking whether two
values derived from the signature and message are in the range
[D_min, D_max]. Exactly how these values are calculated is not
relevant here (see the P1363.1 submission for details), but they
are always in the range [0, N].

If D_min and D_max are variable and part of a signer's public
key, then by setting the parameters to (N, p, q, 0, N), so that
D_min = 0 and D_max = N, we can create a public key such that
*any* signature (having the general form of an NSS signature
with these parameters) will be valid. In particular, all the
legitimate key holder's, and all the attacker's signatures will
be valid, and so this satisfies the definition of a compatible
weak key.

The P1363.1 submission does not give public key or domain
parameter validation algorithms for NSS.


EPOC, NTRU, and ACE Encrypt/Sign:

I haven't looked closely at these.


Summary: DLIES/ECIES, some DL/EC-based key agreement schemes,
and NSS have compatible weak keys, that work in at least some
plausible situations.


Preventing compatible weak key attacks
======================================

Explicitly validating *all* of the public keys used would catch
most of the compatible weak key classes given above. Performing
sanity checks that ciphertext and signature values are in the
correct range may also help. However, with this approach it's not
possible to prove that all compatible weak keys are prevented -
it is always possible that some will be missed by any specific set
of checks. Also, performing explicit validation on all keys might
be quite expensive.

There is another way to prevent compatible key replacement attacks,
though, which has almost zero performance cost, and can be proven
to work generically for any encryption, signature or key agreement
scheme:

Let F be a hash of an unambiguous encoding of the domain parameters
and public key (the hash must be 2nd pre-image resistant).
Then
- for an encryption scheme, include F in the clear with the
ciphertext.
- for a signature scheme, include F in the clear with the
signature.
- for a key agreement scheme, include F in the key derivation
parameters, and confirm that the parties have agreed the same
key.

It might seem as though including F in the clear can't improve
security, because the adversary can simply replace it. But
replacing it requires an active attack, and that is precisely
what we are trying to ensure: that the adversary can only get
away with key replacement by doing an active attack on each
message or session. (As we'll see later, the other difficulties
for the adversary that applied to re-encryption and re-signing
also apply here.)

Note that for a signature scheme, it would not work to sign F and
rely on it being given as an implicit parameter to verification,
rather than being transmitted with the signature. The reason why
this doesn't work is that the verification algorithm can give
nonsense results when used with keys that were not generated by the
proper key pair generation algorithm (garbage in, garbage out).
For example, because the NSS compatible weak keys described
above will verify any signature as valid, signing F would not help
for NSS.

For an encryption scheme, if we want to be able to prove generic
security (i.e. without making non-standard assumptions on the
scheme), then much the same argument as above would apply to
including F in the plaintext. Unlike signatures, this is more an
academic objection: it is extremely unlikely that a compatible
weak key can be found that decrypts valid ciphertexts in such a
way that F is replaced with exactly the hash that the attacker
needs. Nevertheless, provable security is important, so in general
F should be in the clear.

For DL/ECIES with HMAC, or RSA-OAEP, though, it can be proven that
compatible weak keys are prevented by putting F in the encoding
parameters (this does *not* work generically for any scheme that
supports encoding parameters). Here are brief sketches of the
proofs:
DLIES with HMAC - a compatible weak key attack would require
the MAC to give the same output for the correct parameters/key
as for the compatible parameters/key, which is only possible if
there is a collision on either the inner or outer hash. (Note
that in this case it's not possible to prove security using
just the standard assumptions for a MAC, since the MAC key
cannot be assumed to be random.)
RSA-OAEP - either the "DB xor G(seed)" part of the decryption is
the same for the compatible parameters/key as for the correct
parameters/key, or it is different. If it is the same, then
the validity check will fail. If it is different, then the
recipient will calculate a different and unrelated seed value
to the sender (treating the hash as a random oracle), and the
validity check will still fail.

For key agreement schemes, including P in the key derivation
parameters provably works, assuming that the key confirmation is
secure.

The problems that the adversary had when only Alice's key is
replaced also apply when the techniques above are used:

- if Bob sends a message to Alice using an "encrypt-then-sign"
protocol, then replacing P in the ciphertext will invalidate
Bob's signature.
- if Alice sends a message to Bob using a "sign-then-encrypt"
protocol, then Mallory can't replace P in the signature because
he can't decrypt the message (assuming the encryption is
non-malleable).

The order that is most often recommended is "sign-then-encrypt"
(mainly because it is undesirable for someone who does not know
the decryption key to be able to prove that the message was signed).
We can still get both of the properties above, by using

FA, FB, Enc_PKB(FA, FB, M, Sign_PKA(FA, FB, M))

Now if Mallory has replaced Bob's key but not Alice's, he cannot
modify the message to change FB, since one of the FBs is signed
by Alice.

In fact some of the fingerprints in the above format are not
strictly necessary; it should be sufficient to use:

FB, Enc_PKB(FA, M, Sign_PKA(FB, M))

or, using encoding parameters when the encryption scheme is
RSA-OAEP or DHAES with HMAC,

Enc_PKB(FA, FB)(M, Sign_PKA(FB, M))

although the form that includes both FA and FB at each level
might be considered more robust in some situations. Of course,
all of the fingerprints must be checked on decryption/verification.


The following paper discusses another security issue with
some signing protocols, that needs to be considered in any
recommendation of how to sign and encrypt:

Don Davis,
"Defective Sign & Encrypt in S/MIME, PKCS#7, MOSS, PEM, PGP,
and XML,"
To appear in Proceedings of Usenix Tech. Conference 2001, Boston,
June 25-30 2001 (<http://www.usenix.org/events/usenix01/usenix01.pdf>)
Postscript: <http://world.std.com/~dtd/sign_encrypt/sign_encrypt7.ps>
HTML: <http://world.std.com/~dtd/sign_encrypt/sign_encrypt7.html>

The problem pointed out by Davis is that an encrypted-then-signed
message may be decrypted, then re-encrypted to another recipient,
who may incorrectly conclude that it was intended to be sent to
him/her. I mention this because the fix that Davis suggests is
quite similar to the format given above. However, it is not the
same: including Bob's *name* in the inner signature does not prevent
compatible weak key attacks. It's essential that FA and FB above
are 2nd pre-image resistant hashes of the corresponding public keys,
rather than just names. Also, the message format described here
does not in itself prevent all forms of Davis' attack, for the
following reasons:

- in most cases, the recipient Bob's name or address should
be signed *as well as* his key hash FB (to avoid relying
completely on the PKI to associate them),
- although Davis' paper only describes combined encryption
and signatures, the same general problem of "unsigned
context" also occurs for messages that are only signed.

So to prevent both "unsigned context" attacks and compatible weak
key attacks, it's necessary to use the formats given above, *and*
to ensure that the message M includes any relevant context. The
same applies if a message is only to be signed and not encrypted.
The context might include:

- the intended recipients and their addresses,
- the subject or title, if not already given in the message,
- the reply address(es) if applicable,
- the date of signing,
- sufficient information to make the format and encoding
of the message unambiguous (for example, MIME type and
character encoding),
- a description of which protocol the signature is intended
to be used with,
- whether the signature is intended to be legally binding or
not,

etc.

(I'll discuss consequences for specific protocols like OpenPGP
and S/MIME in another message.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzgMlDkCAxeYt5gVAQGvVAgAzaZLun41oXplw7Jw8WyJJN1Ubx/i0luX
avgjTZoJiaWheH03YleRU5EgVm5MUliWEXM5pARoUcyYfRc+aw6b/dbr7T11rnB4
Wd2RjEY7IcJhya1Gsygd+foOwMxwDaYdC5MgVYlwx076jVpvXRnNUP3sKY1LgBCE
3hc8pAqza35DlVRJkP6is4/omOLkG4Z4orihq3/kMDcUXNtInf4YzK+DpxqoCjZ3
189xcSAXilkNNtxD3yZbS/WajEYYIAoPDB3xds2ObWt06Y0EzwiILW3FkLYIlYsK
GvlWQ6UHAEUuCpay4y4l8GvWLYb6u7crev3CHgkRLC7VJy2x/AUQFQ==
=Jau+
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/tlqKEc6MZrU/m/xnPzcv78zYEJ", "n_sections": 4}, {"thread": "tlqKEc6MZrU", "msg": "tsa4WlSyut4J", "author": "David Hopwood", "date_disp": "Jun 26, 2001, 3:27:40\u202fPM", "subject": "Compatible weak keys, and other protocol attacks", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Yes, of course it is, just as it's a security requirement that no-one
is able to replace a public key. There are two ways this is commonly
implemented:

- Use fixed parameters compiled into each party's software. This is quite
secure (although somewhat limiting).
- Treat the domain parameters as part of the public key, and certify them
with the public key. This is how effectively all current and proposed
PKI standards, including X.509, OpenPGP, and SPKI/SDSI, are designed.

In the latter case, if the mechanism that binds a public key to an identity
is subverted, then we must assume that the binding of the domain parameters
to the identity and public key is also subverted - and this probably takes
no extra work. That's particularly true if the combination of parameters
and public key are valid (in the technical sense defined in P1363 and
similar standards), as they are in the DL/EC example I posted.

It should be clear that key replacement can happen in many practical
situations, for example:

- the CA's key might be compromised (note that, although individual CA
keys are quite well protected, it's common for large numbers of root
certificates to be compiled into software, multiplying the risk),
- there might be an insider attack at the CA,
- the CA might do inadequate checking of identities,
- the CA might diligently perform the checking that its CPS specifies,
but still be vulnerable to fraudulent certification requests in
practice (for example, using forged physical documents),
- the user might do inadequate checking that a key has been properly
certified,
- what is certified might not correspond to what the user needs to
know about the identity.

Ellison and Schneier's paper on PKI risks [1] has more examples.

Our response to this could simply be to throw up our hands and say that
when the PKI fails, all bets are off, and if an attacker can then do
trivial passive attacks with little risk of detection, that's only to be
expected.

I don't think that response is reasonable, especially when it's so easy
to design protocols that would require an active attack on each session/
message, with the problems and risks for the adversary that I mentioned
in my previous post.

Note that previous attacks that also required key replacement (for example
the ADK flaw in PGP), have been treated as serious problems that justified
revision of implementations and/or protocols.


[1] Carl Ellison, Bruce Schneier,
"Ten Risks of PKI: What You're Not Being Told About Public Key
Infrastructure,"
Computer Security Journal, vol. 16, no. 1, 2000, pp. 1-7.
<http://www.counterpane.com/pki-risks.html>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOzjhhjkCAxeYt5gVAQFqAAgAiGH1Uyu3dx3SDyuxuxs4cq6TulED2tU7
aaTDy1mCenqLGwuFDfMsIN/w7gKlO5WZpmZK0GPB5FA+99Gy12WaOJY20jbb/ABV
eCa2zYQnuhGtbrqSXSYsIk6JxZ5QavJlfnIBNGmITwAXV616UGfsF0E36owPTMS1
ekhQgxa8aB3nv8VxOpbiGSVXUElyBOMBVfsgzo9i4g2VtO3ZLC5s0aNqWpIbkH5B
1LehrkP6qF1AnC/LvQmAEfIvhnJ2J6ON7uTFhBENqjNDpkKPEly2HnCdD5CNxFAA
ZeLtC0495XkMmfXwmiQC5p4OZn7T6HvTy8xabWkwb0LhxEIohWgePg==
=na4X
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/tlqKEc6MZrU/m/tsa4WlSyut4J", "n_sections": 4}, {"thread": "uuegGdqslYc", "msg": "zDWNCKQnSzEJ", "author": "David Hopwood", "date_disp": "Jun 12, 2001, 6:46:57\u202fPM", "subject": "Sophie-Germain Primes for sale", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> No seriously *free* SG primes are at my website
>
> http://tomstdenis.home.dhs.org/primes.txt
>
> A SG prime is of the form p = 2q + 1, where q itself is prime and of
> course p mod 4 = 3.

No. It's not two weeks since I last corrected you on this (message ID
<3B1D3737...@zetnet.co.uk>).

If p = 2q + 1 for p and q both prime, then q is a Germain prime, and
p is a safe prime. Also it is not part of the definition that p = 3 (mod 4)
(counterexample: p = 5, q = 2, although admittedly that is the only
counterexample).

May I suggest that before posting anything else involving number theory
or abstract algebra, you check the definitions first (for example in HAC
or AC2), and also that you pay more attention when people correct you?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOyabszkCAxeYt5gVAQH4Owf8Dzv65yL1z5tapvfuJt7qPA9plv1q2g40
EjpRT8y6/sQO4pORV/zxp3w3RaVU1n2zRtbRh2g5vUv7uhHjU+RHkea3QL/BMEsT
vls+KdnyLnbOTxVfD3lMVRiexQe1/Vg6t0HgWRTgXUqzPbYPCfls4eIakcauAIoH
ARgAtWPTZTi3XNItq5yoCBGB6TkQbjRHo3YVWKF5gNiZT+CemBu5w5vptowRIxH9
OWAdU/XYhce8aqAZqtJ78k8N/+GuuSNJLv5CVeYIUxA9Qi9jexwnmpd6KerOJObU
DgrqoGEzZW5A1RlL4YJ//u3KGx03MLJ6NMG7Bk9UZvkd5c9JbCaRvg==
=o+SS
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/uuegGdqslYc/m/zDWNCKQnSzEJ", "n_sections": 14}, {"thread": "xh4lvUdWW0E", "msg": "NyaxmhsJDJkJ", "author": "David Hopwood", "date_disp": "Jun 5, 2001, 2:10:51\u202fPM", "subject": "BBS implementation", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Technically, the cycle length is only proven to divide k = lcm(p-1, q-1),
not to be exactly equal to k. However, the probability that this length is
not equal to k is negligable, and therefore there is still a tight reduction
from factoring N to finding a short cycle (i.e. finding a short cycle cannot
be significantly easier than factoring).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBOx0gjDkCAxeYt5gVAQExsQf/e1++N+zsEm2x1dfKQH7H5fc5LGzHYZbs
SQQz9T5DssPIz7L9iE4gbUJT0uZvMZx3b5u7L+LtoNqGgxyAZtZglJyXgEtVA3ra
gwSssyGrZfLCgNpGqfCriKdNCbJDMobKUkVlOdb/nygBi+VE7BRg+DebMHpWMe8B
fyQsj079DrURMZSXNpl7dfmLKGN4zL/j8ORG9yFR6EH0zRe99aV/ulN07bITb4NB
Aq48VWZm6UK2m7FpdHOMAOUK0a4cfuGjvdZFp4/dqsPvPnXLujBzUdsI9v1wdwR1
O+ziJLs3ktPkniN25/OZNn04mwn0xEMnYkzZixmBb7yCdVbqRPYpoQ==
=juYJ
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/xh4lvUdWW0E/m/NyaxmhsJDJkJ", "n_sections": 16}, {"thread": "3p6RX0XNhXc", "msg": "cuciY5M1pvoJ", "author": "David Hopwood", "date_disp": "Sep 17, 2001, 7:46:47\u202fPM", "subject": "RSA question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mark Wooding wrote:
> Shoup's Simple RSA is
> considerably simpler, works generically, has a very tight security
> reduction (still in the random-oracle[1] model), and works as a component
> in a chosen-ciphertext-secure system.
>
> Let (n, e) be the public key. Let H be a hash function with (in this
> case) 128-bit output. Choose a random number x between 0 and n - 1.
> The RSA ciphertext is simply y = x^e mod n. Compute k = H(x). Encrypt
> your message using your chosen cipher (in this case Rijndael), using the
> key k, and send y together with that ciphertext.
>
> And that's it. No concatenation. No checking. No parsing. It just
> works.

The symmetric cipher has to be IND-CCA2-secure, so you do need checking
at some point (either of a MAC, or as part of an integrity-aware mode).
Note that a block cipher in CBC mode, say, is not IND-CCA2-secure.

> [1] I think I prefer the phrase `magic hash function', from `Why chosen
> ciphertext security matters', by V. Shoup.

Apart from any theoretical reasons why hash functions are not really random
oracles, it's worth pointing out that Merkle-Damgard hashes (e.g. MD*,
SHA-*, RIPEMD-*) do not behave like random oracles in an easily observable
practical respect: if 'pad' is the hash's padding function,
H(X || pad(X) || ...) can be derived from H(X) without knowing X. It's
easy to find *plausible* examples of protocols that could be proven secure
in the random oracle model, but that would be breakable for that reason.

This implies that a random oracle should not be instantiated using a
Merkle-Damgard hash unless the protocol guarantees that the oracle input
is fixed length, or prefix-free. Fortunately that is the case for OAEP[+]
and Simple-RSA, but more generally, this is an additional problem with the
random oracle model that is not mentioned in any of the papers I've read
that criticise it.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO6aLWjkCAxeYt5gVAQGozQf6A2lY0j6M4jdsGNyUaxBdu44dODs9Apos
uUX9DOCy4GXW39pnd7tQJt5J1m+zn5HQ2BeNB6xImWUtH6uQkeU+8vvETL8vhwvF
WRjQXGJEOE4SR+znH6P1LUF8FvWeZd6ZvHwrsvOGXJ2f88yqdDNxxGyjlnPFCZyI
Iy/OihQlgh6Ur9vLeeTOaAuV+VC0QOGAzJhtBDsuAOo+KlnfGGoVD81bhxWj3RVp
6feG/b0SBlRloSeaRvQEUPCldwzpXVI7PSjuPD7aRSasekmDVB82AjE7+EuXTTjE
a89SD0aLZJTxXiecG7vl2/cCkPXKMZl3Dg//9hfc1XCpvAV8duGlOQ==
=zhoR
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/3p6RX0XNhXc/m/cuciY5M1pvoJ", "n_sections": 31}, {"thread": "4l_T_4pL3ws", "msg": "GRPv8E2cdU8J", "author": "David Hopwood", "date_disp": "Sep 12, 2001, 12:52:36\u202fPM", "subject": "public key algorithms based on limited knowns", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Gregory G Rose wrote:
> Tom St Denis <tomst...@yahoo.com> wrote:
> <So this lead me to this question: Are there any PK algorithms based on
> <the inability to find a particular solution to set of equations? It
> <seems to me this is the perfect one-way function since there is no way
> <to solve a system of equations when more unknowns are available then knowns.
>
> IIRC, this is the basis of the one-time digital
> signature schemes, but I can't recall how it applies.

One-time digital signature schemes are generally defined in terms of an
arbitrary one-way function (typically instantiated as a hash function or
block cipher); they don't specify how to construct a one-way function.

There are PK schemes based on the supposed difficulty of finding solutions
to systems of multivariate polynomial equations, e.g. QUARTZ, FLASH and
SFLASH submitted to NESSIE, but I don't trust these very much. Close
variants of them have been broken, and the security analysis is ad-hoc.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO5+SsDkCAxeYt5gVAQHfAAgAv8Eg/F4d8CuhOqZC88amuzHSR1dRehXm
pyzxmQj1AwjTPZLpF87a45sJb4PnS/agQDjzsVDxxyyM1WcH6H9zndeuEKlEvNb0
XS6/hurGIsEuSaB0qlBRUoFWMa5Eo+i2i9GHCV8wjxLifX+HSg3bj5REeJwGVUOz
L1Rz+8nBul/Ydw1AI31fREvemauf+Z6ugUbhEz0Pb3kzc2HvRaFWkGZiw3p2iNKW
sGKfkH/VyHD6yamoKPozhoZBJvTwIJQUknYKVCrZokcU1UyESA37F7ThOaczK65/
n25dl8Me3/ZKSV/HNh20PWblQvgVbErsqGMWb9kEWCL9Zf/eEkYDWA==
=Ngqw
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/4l_T_4pL3ws/m/GRPv8E2cdU8J", "n_sections": 9}, {"thread": "6NfnzEyktQw", "msg": "hdEsq2rCUb0J", "author": "David Hopwood", "date_disp": "Sep 25, 2001, 4:56:38\u202fPM", "subject": "Attacking Dynamic Transposition", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
> Tom St Denis wrote:

> > Transposition within vectors is a linear transform. Which can be
> > emulated with the appropriate matrix.
>
> I didn't question that. My point is that, given a block
> of ciphertext of DT, you have, with your theory, to
> determine that matrix, and (whether you actually do that
> or not) determine the bits directly output form the PRNG
> that have been used to do the transposition. I am not
> aware of any practical and effective ways of determining
> these bits.

In many attacks against stream ciphers, you don't need to determine
all of the output bits of the keystream generator directly; you only
need to test whether it is consistent with a prediction. If that is the
case, the fact that it is being used to seed a transposition, rather
than directly, doesn't help much - in a known or chosen plaintext
attack, each bit of ciphertext leaks one bit of information about an
output of the PRNG. (In the case of a chosen plaintext attack, that can
be a specific chosen bit of each output, rather than just one bit of
information. For example if the transposition input alternates between
0 and 1 bits, then for the most straightforward choice of transposition
algorithm, the LS bit of each PRNG output would be leaked.)

So attacking a PRNG used for Dynamic Transposition would be much like
attacking a decimated PRNG. Obviously how practical that is depends on
the specific PRNG chosen, but to be confident in preventing attacks, we
would need to be as conservative in its design as we would for any stream
cipher used in a more conventional way.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO65XETkCAxeYt5gVAQFS/wf+OcnVlVMq2WjLVdDlj5kbFsL1EFfJ8fZi
8TRmefv+BlDldhNr5j9JSTGBglJqvmkc+UuHaeJizWQ9CkcbOCjgpGS7QG4hJJby
fwvJKFjR5YbLQC6ttwKtZ9HTA+gIsV5YYuwkxMfO8DjHBZUVeeJTcLj0GIw8jRYY
qh2gsYbjyqVe4Yq+x5iPxVHeGFTmlf8MEILV5cE39sI5E2TLQeK/L8eBsYGWE5Ng
HAnULcIaTI7mBB7PsmB/KbPon6P6uE4c0pZvLWH4T03TUvkgWBZaEZKWYfDsGBaz
2Z7X0WG+R7e052rc/dm0+rRDK6CNvt6LZv0LAYZb30bAAn1KcuQBbg==
=B1Tu
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/6NfnzEyktQw/m/hdEsq2rCUb0J", "n_sections": 100}, {"thread": "8Lpv2Tfy43I", "msg": "OicXocvywVEJ", "author": "David Hopwood", "date_disp": "Sep 5, 2001, 9:53:18\u202fPM", "subject": "Random permutations", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Herman Rubin wrote:
> In article <slrn9pdg9i...@cerberus.csd.uwm.edu>,
> Bruno Wolff III <br...@cerberus.csd.uwm.edu> wrote:
> >If I know in advance what ranges I will be generating numbers in I can
> >generate a random number with a range that is the product of the individual
> >ranges an then extract the individual random numbers.
>
> >If I don't know in advance what the next range is going to be, but don't
> >want to throw away the extra entropy (used to generate the latest random
> >number), is there a (relatively) simple way to do this?
>
> I doubt that there is one in general.

Here is an algorithm that does this (typed in off the top of my head, so
check that it produces sensible results):

// ^ means 'to the power', not XOR.
// uint is an unsigned integer type that can represent 0..2^w - 1

// invariant: range > 0 and state is uniformly distributed on 0..range-1
uint state = 0, range = 1;

// returns an integer distributed uniformly at random on 0..k-1
// precondition: k <= 2^(w-1) [preferably k << 2^(w-1)]
uint nextrandom(uint k) {
while (true) {
uint x = w-1 - floor(log2(range));
state = state * 2^x + randombits(x);
range = range * 2^x;

// 2^(w-1) <= range < 2^w and state is uniformly distributed
// on 0..range-1
uint t = floor(range / k)*k;
if (state < t) break;
state = state - t;
range = range - t;
}
result = state % k;
state = floor(state / k);
range = floor(range / k);
return result;
}

// result is distributed uniformly at random on 0..2^b - 1, for b <= w
uint randombits(uint b);


This occasionally throws away some entropy (when state >= t at the if
statement), but that will happen rarely if k << 2^(w-1).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO5aS6jkCAxeYt5gVAQFjwwf/VPVPbUKVZG1FQdwETQZJvQQvHm7Eet8S
ipt124U8U7KwZ1G1aYfhflR02xMPAyJfqTtonNU2F8gwO8I4Gu355LII9tVmYQiw
1GdhqMan//fK5X9DqEErZhpvC9c2gnElcLl/i1a+w7cTvT8T3i63tM5cjDTvjjkV
sjRhV4EwJO/Y17yFCVPKrTAhTrlFoVCjkhb1s0yTIvv8S7tIeI9CaNlCzX+ll0rC
3Le0Jw+HbCB/T4sqLJ3Blg6IMmTfh9Z5hNve6CGb8RxziMwHnMxyK7yMYSAyz6wy
XrzgLNAyLlReDE+dVby4q+fE2FwKMMgx/KYcscCZi0MkXfvVGe4sTw==
=xz9I
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/8Lpv2Tfy43I/m/OicXocvywVEJ", "n_sections": 89}, {"thread": "ARmeqKmcE5I", "msg": "tt932pgPc9wJ", "author": "David Hopwood", "date_disp": "Sep 12, 2001, 10:17:03\u202fAM", "subject": "DHAES-like public key encryption schemes", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

[alt.security.pgp removed from Newsgroups]

Mark Wooding wrote:
[snip]


> DHAES is just one instance of a general class of integrated encryption
> schemes based on oracle hash-decision problems.
>
> The general case looks like this. You need a triple algorithms, curly-K
> = (G, H, R):
>
> * G is a randomized algorithm which takes no input (or a security
> parameter, if you want to be asymptotic) and returns a pair (P, K).
>
> * H is a randomized algorithm which takes a P-value returned by G and
> outputs a pair (h, y), where h is a bit string of length l. We
> write H_P rather than H(P).
>
> * R is a deterministic algorithm with the property that, if (P, K) \\in
> G and (h, y) \\in H_P then h = R(y).
>
> The security requirement is expressed through this game:
>
> Game^{ohd-0}{curly-K}(A): | Game^{ohd-1}{curly-K}(A):
> (P, K) <- G; | (P, K) <- G;
> (h, y) <- H_P; | (h, y) <- H_P;
> h' <-R {0, 1}^l; |
> b <- A^{R_K(.)}(P, y, h'); | b <- A^{R_K(.)}(P, y, h);
> return b; | return b;
>
> Advantage is expressed in the usual way
>
> Adv^{ohd}{curly-K}(A) =
> Pr[Game^{ohd-1}{curly-K}(A) = 1] - Pr[Game^{ohd-0}{curly-K}(A) = 1]

Are you sure? Consider a variant of DHAES where the ephemeral public
value y is not included in the input to the hash used to derive h.
Then the scheme is not IND-CCA2-secure, since it is possible to change
y in a chosen ciphertext attack without changing the recipient's
calculated value for h, even though the security requirement given
above is satisfied.

(Abdalla, Bellare and Rogaway point this out in the original DHAES paper,
although that didn't stop a long argument on the stds-p1363-discuss
mailing list as to whether y should be included in the hash. The
eventual conclusion was that it should, and Draft D10 of IEEE P1363a
fixes this problem for DL/ECIES.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO59uNzkCAxeYt5gVAQHcrAgAqLKbRbj3uVzXyyTd6jN7BRVD1HE7GyjI
T22uX8Kq0RfiZvdN7cySkQWR/YPmfXliZcHAf3BGhBfJnNElZdCCuezTWKU9mzZj
cNF4Bv0R30ndEHJyDS0ABXCqgKpeIg9lS9YHZfu0xANDmXFXFsvn0F/SOw7rHFJu
eDEtT429OppAi5U19M0jPeWrihopkDkcknJmyRkqEW6eW7X9AOvlJK6BFcrJij4e
onUBH3Gs2ZRps0JiI9DybNS9YTOsXfr9dlrPtHJ8Yjxw/P8gimAKYOCV5N5UiWZr
0i0/jHVmdLE0gR7q6PAaZe7y0QdX5OgzEWydwva7rQbsjUvGoFfnpw==
=yuEi
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/ARmeqKmcE5I/m/tt932pgPc9wJ", "n_sections": 26}, {"thread": "ARmeqKmcE5I", "msg": "q9mSPLoZvZUJ", "author": "David Hopwood", "date_disp": "Sep 13, 2001, 5:54:32\u202fPM", "subject": "DHAES-like public key encryption schemes", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mark Wooding wrote:
[snip proof, which looks correct.]


>
> David Hopwood <david....@zetnet.co.uk> wrote:
> > Consider a variant of DHAES where the ephemeral public value y is not
> > included in the input to the hash used to derive h. Then the scheme
> > is not IND-CCA2-secure, since it is possible to change y in a chosen
> > ciphertext attack without changing the recipient's calculated value
> > for h, even though the security requirement given above is satisfied.
>
> This scheme does not meet the security definition I gave. Remember that
> I gave the adversary an R_K(.) oracle. So, define curly-K-Broken-DH in
> the obvious way, and...
>
> Adversary A^{R(.)}(P, y, h):
> h' <- R(-y);
> if h = h' then return 1;
> else return 0;
>
> has advantage 1/2 against it.

Oh, of course. Thanks for taking the time to go through the details.

> > (Abdalla, Bellare and Rogaway point this out in the original DHAES
> > paper, although that didn't stop a long argument on the
> > stds-p1363-discuss mailing list as to whether y should be included in
> > the hash. The eventual conclusion was that it should, and Draft D10 of
> > IEEE P1363a fixes this problem for DL/ECIES.)
>
> I know... I agree with ABR on this one, I think, though in fact I
> dislike composite-order groups anyway (for precisely this reason).

They certainly make things more complicated. Of course, out of the
groups most commonly used for crypto, only elliptic curves over GF(p)
can be prime-order (the overall group, that is, rather than the subgroup).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO6Eq4jkCAxeYt5gVAQHkcQf/emugzkjuooYV4chwEoxWYw6t44mcDjHC
dp7AOreoPSUhui8wrEdGvoRfi8UkjKHdwMfhPHdhSziGaPbF4T6sLK2kS86Is4p6
5Nz+lDlLrnNt9bsYfswtKOl4xJFeXThQB61HULq3XdODT8MZpgreOuU76m7siRm3
1StJZE0ckFEsA9IMegXYnKEmzN7bIPhexsXgf5u1/9fg/cIEN1wiYn+z26EmoTAz
UPOePWGNfi+imaJMIPjvPXe3uXxvzVJFbjnZD3/GXqaeIc0Aaxzvixa/2n1fWMrZ
FHXXWa8JLCxvQXf6SskTuRqK9JyTnKhnr4tQjB3+CJ24YzQZuqgoog==
=ycRm
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ARmeqKmcE5I/m/q9mSPLoZvZUJ", "n_sections": 26}, {"thread": "ARmeqKmcE5I", "msg": "wg2oECF_dLwJ", "author": "David Hopwood", "date_disp": "Sep 16, 2001, 4:27:31\u202fPM", "subject": "DHAES-like public key encryption schemes", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Bodo Moeller wrote:
> Mark Wooding <m...@nsict.org>:
>
> >>> DHAES is just one instance of a general class of integrated encryption
> >>> schemes based on oracle hash-decision problems.
> [...]
> > A quick look at the DHAES paper shows that I've got basically the same
> > security bounds, and had to do a /lot/ less work. To give ABR their
> > due, they didn't have the IND-CPA + INT-CTXT => IND-CCA2 result at the
> > time, so there's a lot more messy mucking about with MACs and things in
> > their paper.
>
> Pardon my ignorance, but what is "INT-CTXT"?

The property that it's infeasible to find a valid ciphertext not previously
produced by the sender, under chosen message attack. (This is stronger than
INT-PTXT, which is the property that it's infeasible to find a valid
ciphertext corresponding to a "new" plaintext, under chosen message attack.)
See

Mihir Bellare, Chanathip Namprempre,
"Authenticated Encryption: Relations among notions and analysis of the
generic composition paradigm,"
Preliminary version in Advances in Cryptology - ASIACRYPT '00.
Full version (revised September 25 2000) available from
<http://www-cse.ucsd.edu/users/mihir/papers/oem.html> or
<http://eprint.iacr.org/2000/025/>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO6ULADkCAxeYt5gVAQEMRgf/WYc8ijxLX3w0OZIJWLBIvo4cLQIb6DvA
wOc7nvF4IDDsnwbdBagq7OCexSv1ovakkkGaRHszue/Uf6V6OB+LXaF6wY2Twc8K
NG7vJfVnYbV+8N0rBK+CKAL5w/c4X9lQn5DuSm8mjowbSIlHhZ4Htues7JBpL6YK
v+3VD/LQB+0CtEHyCtMGFPxxhklUNF4T20m7UWrb6y1ER4/IhXCUvrGFhDUGbCdP
cHFZOcsZKvZHjOfLKXNxnPWstkaE/Ki/C2mhdMc60L2j9IG+qeeQ0D4UiSVzjoJJ
SrbFTWQVbz0WGZ7bHNJ3jn/JNnq9tudYoEgsthYxAZiXMrAvBa6TIQ==
=E4FT
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/ARmeqKmcE5I/m/wg2oECF_dLwJ", "n_sections": 26}, {"thread": "ARmeqKmcE5I", "msg": "mZg4B81-Ja0J", "author": "David Hopwood", "date_disp": "Sep 20, 2001, 11:10:21\u202fPM", "subject": "DHAES-like public key encryption schemes", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Crowley wrote:
> David Hopwood <david....@zetnet.co.uk> writes:
> > Of course, out of the groups most commonly used for crypto, only
> > elliptic curves over GF(p) can be prime-order (the overall group,
> > that is, rather than the subgroup).
>
> What about Schnorr groups? p = qk + 1, p,q prime, work mod p and pick
> g = h^k s.t. g != 1, then g generates a group of order q in Z^*_p.
>
> Or have I misunderstood what you mean?

Here the subgroup is of prime order, but the overall group Z^*_p isn't.
So you have to check that all purported group elements used in the
protocol are actually in the subgroup, as well as choosing a unique
representation for subgroup elements. Doing what DHAES does (which can
also be applied to most other DH-based protocols) allows the full
subgroup membership checks to be avoided, and normally doesn't require
unique representations.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO6qntzkCAxeYt5gVAQE9Hgf9GL23iSe2oeAguKhUt6VBrbl4rc+0ptpo
FrPZnhx9BhPlwh6FoDB7GjJ9Elee9FlEzIkvEJVHjIFtuBu4VSpWZc+h1btbGo+q
JIJ7X0URP6rpjCyUbUfALhOJrhH1u24hihJE0eEuJzxROR4o7PHs8IZ6cBDnDfrC
9u8CUwx+9YXY/gVKKWsFQ5NVwOg9IWP/WIygUYyw3WnIiKXK3BPA+HvSZIl7uIyX
icl76eKSr4ni2uBfRazt8AinJAz2jtsUntMJbbd2SHzQjriSpncFCDqJUKjhX9qO
fi896wo8Rw/x487F/LRnqo12XrtfHW58y86o2f9mzIpfeB2TcY7gQA==
=SHYL
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ARmeqKmcE5I/m/mZg4B81-Ja0J", "n_sections": 26}, {"thread": "AbwSbqUEZoI", "msg": "je3sm0LWFB4J", "author": "David Hopwood", "date_disp": "Aug 11, 2001, 11:20:37\u202fAM", "subject": "TC17 Analysis", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> BTW, how do you pronounce Daemen anyways? I always thought it was
> "day-men"....

"dah-men", approximately (like the second syllable of Rijndael :-).

ISTR that the "Rijndael fan club" site, at www.rijndael.com, had .wav
and .au files of Joan Daemen and Victor Rijmen saying their names, but
that site doesn't seem to be accessible at the moment.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO3VNKDkCAxeYt5gVAQFAAgf/QFqTunupIiUI7KYaz4uPaVWaBm7Aa9Gt
QNK+d7yBJNFs0vhya9PFGOL7IVowEkzMsaSU8KWj7c3ncAQbcZvZQnnKYhPpr9QN
12LWqigUAi6344oEqKOwSmlWegKxBLretCBzKNGKJxpdeNdR0lrhkCT9kh0mukwz
kjF66fJNZJjx6Tt5ZyZzim8RtCpml6WoTpQgelVzLFY4sGkbZQP/rpYguEL0LJOx
Ae8hScD7LS2fyRxXI/vYwDRTRGjaO6z6n0JBoJJy9OaB6ZtNuoe0mjSwk9BVux8C
93UntDyWxANHMhjo8+5xKZXZBG4UtFqo07Q8N3s6J1/7370Wh+D4Zw==
=rXH/
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/AbwSbqUEZoI/m/je3sm0LWFB4J", "n_sections": 2}, {"thread": "B00dvvbNzAU", "msg": "8lZAgpbNUr0J", "author": "David Hopwood", "date_disp": "Sep 14, 2001, 9:18:23\u202fAM", "subject": "New Calls to Ban Encryption and Mandate Key Escrow", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Fritz Schneider wrote:
> One issue that no one has raised yet is the fact that confidential
> communication might not even require encryption in the traditional sense.
> See, for example, Ron Rivest's paper on "Chaffing and Winnowing":
>
> http://theory.lcs.mit.edu/~rivest/chaffing.txt

Chaffing and Winnowing is a method of contructing encryption schemes, both
formally (i.e. the usual syntax and security definitions for encryption
schemes can be applied) and for practical purposes.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO6IDdzkCAxeYt5gVAQEM7ggAnJG+e04l4mcD/w9P38Hs51U+c1eheODI
0FXKDQX7w4z8CDmQf8UaS9+hiy9t/irpY7m1NTiJ0jT4HwKx2LVLM6iKYuEHKTdi
+jJAvaMVpGI9ax17YasWbUpj3Lf6dZSlWoWtijRFPDm4+18ylEYfabbKq0869sca
X3F3U16+5PmVU2FCOqEO9UQwpycVbao6fWb551Z9fXvlTavbJ3SMKa0yxDgkChCi
LHGm+UXMaQw9zPsrOmZUWqhG2mKCXMqIl/Ls6n7yiapq7KWDkr3KcQbbbsXdTfZa
kUy3xboVNCY9BiGKpN5xHbXkV9swZ1qLQQdut4475tLUm5107Vg73w==
=/28m
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/B00dvvbNzAU/m/8lZAgpbNUr0J", "n_sections": 91}, {"thread": "B00dvvbNzAU", "msg": "LzRj6BPB4mYJ", "author": "David Hopwood", "date_disp": "Sep 14, 2001, 1:35:45\u202fPM", "subject": "New Calls to Ban Encryption and Mandate Key Escrow", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Fritz Schneider <fr...@cs.ucsd.edu> wrote:


> In Fri, 14 Sep 2001, David Hopwood wrote:
>
> > Chaffing and Winnowing is a method of contructing encryption schemes,
> > both formally (i.e. the usual syntax and security definitions for
> > encryption schemes can be applied) and for practical purposes.
>
> I think you misunderstood what I was asking. My question has to do
> with the practicalities of banning "encryption".
> I was asking whether the propsed legislation would be sufficiently
> general to include *any* type of confidential communications, regardless
> of the underlying mechanism.

I don't see why it wouldn't. The UK Regulation of Investigatory Powers
Act avoids having to define encryption, but in Part III (concerning the
power to require disclosure of keys) it uses a definition of "key" that
would cover a MAC key for Chaffing & Winnowing, or a codebook:

<http://www.hmso.gov.uk/acts/acts2000/00023--e.htm#56>

# "key", in relation to any electronic data, means any key, code, password,
# algorithm or other data the use of which (with or without other keys)-
#
# (a) allows access to the electronic data, or
# (b) facilitates the putting of the data into an intelligible form;

("Putting data into intelligible form" is used consistently in the Act
instead of "decryption".)

> If so, how do they propose that it is going to work? For example,
> will one be subject to prosecution for sending two messages in the clear,
> one with a proper mac and the other without?

It's pretty clear in practice when Chaffing & Winnowing is being used, and
that it constitutes encryption. (Note that C&W is only secure for sending
arbitrary messages when the MAC is applied to individual bits, or when an
transform is applied that uses effectively the same techniques as
conventional encryption.)

I think banning (or even significantly restricting) encryption would be
totally misguided, but the specific argument you're using against that is
not a particularly relevant or useful one. Basically, C&W does not introduce
any non-trivial difficulties in defining what encryption is or what a key
is.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO6I/aDkCAxeYt5gVAQGJTAgAkh5D6LwY41+nEFmGkqZwmKAXoKE9Clov
loUJsHx16Ex5cOEsuUJN2qX4R1Z1Cj+vGNvK9q1zpREzM5e29ROGyYFsTd0pMm3p
h7jIr2n5cHfWWPxk8uL9NxVd/jODCN53JkfTB8L1NS/4Frt6xecBkoqKadRVB1JL
AewJYJHzdfMKPjP9DgM/OiTp4J0M/Z+nAEmhK3XTmx54FMqNL3uBViz4M0LOAqX/
cEpmk4//rrE4q47gT5bZFTQL2zwYGO9nLQX+TxCfuUC4/fW/OE9KMbwqwRATd35w
oiGUopc5xfmWCN32tGQta19B9FC14576pdVSNGoYzhKYrcx+0Dw8Fg==
=eYdo
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/B00dvvbNzAU/m/LzRj6BPB4mYJ", "n_sections": 91}, {"thread": "CdX7ogztlAQ", "msg": "1DwIYQ6XksQJ", "author": "David Hopwood", "date_disp": "Sep 5, 2001, 9:52:01\u202fPM", "subject": "Message Integrity in CBC and CFB modes", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

John Savard wrote:
> The cipher modes CBC and CFB are designed to provide secrecy, and good
> error-recovery properties.

Error recovery is of little importance when using protocol stacks that have
checksums and/or forward error correction in layers below the encryption.
I really don't see why so much significance is placed on error recovery in
AC2, for example. Application protocols that assume an error-correcting
transport layer (using retransmission or otherwise) are the common case,
and not just on the Internet. Of course there are some exceptions, but it
doesn't make much sense to consider error recovery properties as a general
advantage or disadvantage of an encryption scheme or mode - it only makes
sense in the context of protocols that actually use those properties.

[snip integrity attacks on CBC and CFB]


> Obviously, the "right" way to fix this is by using a MAC. However, we
> all know in practice that it will be first assumed that only secrecy,
> and not message integrity is required, and then when secrecy is
> provided, message integrity will often be carelessly assumed.

The right way to approach this is to impress on protocol designers the
fact that a MAC is required for secrecy as well (AFAIK this was first
made clear by Bellovin's "cut-and-paste" attacks on IPSec). It's well
known that CBC and CFB do not provide secrecy under chosen ciphertext
attack, but many people fail to appreciate how feasible chosen ciphertext
attacks can be against real-world protocols.

For example, suppose that you have an application protocol similar to
HTTP, where the attacker has access to the same site as the targetted
user, but there are dynamically generated pages containing some secret
data. (This is a typical usage model for HTTP over SSL/TLS, but SSL/TLS
does integrity protection properly. The WTLS protocol, based on TLS, at
one point had an insecure MAC option for which this type of attack would
apply.)

Assume that the attacker can guess which page is being transmitted (by
analysis of record lengths and/or timing information, for example), and
his/her goal is to determine the value of a secret field on the page.
Also assume that the page has a link to a reasonably long http: (i.e. not
secured) URL on it.

The attacker changes the ciphertext by copying the part that corresponds
to the secret field, to the part that has the http: URL. This is not
detected by any integrity checking mechanism. So if the user clicks on
the http: link, the secret field goes out in the clear (as part of a
garbled URL, but that doesn't matter). This is obviously a secrecy failure,
as well as an integrity failure.

Chosen ciphertext attacks can apply to stored data as well; that was the
cause of one of the recent attacks on PGP (the "Czech attack", which
involved modifying a keyring file without knowing the password, to find
out the private key - see
<http://cert.uni-stuttgart.de/archive/ietf-openpgp/2001/03/msg00033.html>
for details). Schneier et al also have a paper on chosen ciphertext
attacks against email protocols: <http://www.counterpane.com/chotext.html>.

Conclusion: security against chosen-ciphertext attacks, i.e. IND-CCA2,
should be considered a basic requirement for secrecy; it is almost as
important for symmetric encryption as it is for asymmetric encryption.
To get chosen ciphertext security, in practice you need a MAC, or one
of the new integrity-aware modes with security proofs. If you use a MAC,
then the difference between making the IV for CBC or CFB mode secret
and making it public is irrelevant.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO5bWqzkCAxeYt5gVAQEhkwgAlNm6WtS0WZROI15+tMKVw0xpJtdYuN6a
QtFW4XPvxxofuf5erQUNFlq0uLWBtS/2ab7vFUdz7hsr55whQM1YZOol5GwZ5giB
96eh/BTlutRpLGMg4vuQb3quJCzIlUehwjc7T4ZbcZtVxlVy8PnUdOp3dWvVbF8l
Eh2StqCzVxoip0asav9+jMD5qxkm54fE0gTKCAVv45NK5mAupmAx8AxJaqVmP5YK
WFY7uwfmNoWJ7AgGjNCI+R01xWZh8uhoFICyNbzS2ysu3Is5KPOHPZvB/HXKat07
aHKhs8u6RqX2Llctn0V63c3+2Brf7fwxNKcxFG9ANq7yLCgMv20Tog==
=vyPY
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/CdX7ogztlAQ/m/1DwIYQ6XksQJ", "n_sections": 34}, {"thread": "Cldsz0cXEPE", "msg": "Swm9f_N_wbcJ", "author": "David Hopwood", "date_disp": "Sep 29, 2001, 6:43:09\u202fPM", "subject": "Ciphertext stealing with only one block", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Steven Murdoch wrote:
> I think I understand ciphertext stealing when there is at least two
> blocks but I was wondering how it works when the message is smaller than
> the block size.

It doesn't. The minimum size that can be encrypted using ciphertext stealing
(assuming that the plaintext length needs to be preserved on decryption) is
one block.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO7ZOWTkCAxeYt5gVAQHPPggAq6+C9ToHWA70B9Ret1yq2ahr54ug4a5N
lZF1pZHJKm8n3QJzR8DfTIayG7Lic6F1B2t4YPqFzULY6gmJIPhyWYqBCYLBSNAd
9RNBpR2WVr+pn5TCd0jP/VuSxh2nn7MckHFh4MSmnGIYbB02L/J8SND7JVWFbd2x
9hmooi8OupNfaDv0ODBGAkatJtKhyNGxO4oE+ujaNkdPMR4e+VT4FbUMEdI3SZ22
IPWe2LeHybNwRMjIgLNJr3JOCwOmDBvUBdwQh8LQBONuNmQPAj4pAP/+yMH4vPiU
Tne/NXb+FttYVG0ZaNuzztCqApIPaJsJtHTqbckj2ySPMXFeSmHLYQ==
=jpy8
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Cldsz0cXEPE/m/Swm9f_N_wbcJ", "n_sections": 5}, {"thread": "DDLRim7zfTQ", "msg": "g3T90xOtOGsJ", "author": "David Hopwood", "date_disp": "Aug 21, 2001, 5:42:10\u202fAM", "subject": "(sometimes) Threat models are daft.", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Simon Johnson wrote:
> One of the most used responses i've seen in the past six months to
> most questions regarding choice of ciphers is:
>
> "Well, what's your threat model?"
>
> This answer is just plain daft.

I agree. The fact is that threat model doesn't really affect choice of
cipher; something like AES, Blowfish, or Triple-DES will normally do the
job for any protocol that requires symmetric encryption. As far as protocol
attacks are concerned, the default model should be "any attack that works
is allowed", with the assumption that this includes active attacks, chosen
plaintext/ciphertext, side channel cryptanalysis, dictionary attacks, etc.
If the poster knew precisely what attacks to expect, they wouldn't need
sci.crypt to answer their question. In almost all cases where I've seen
the above response used on sci.crypt, it was unlikely to be of any help to
the poster, and what was actually needed was either to present an attack,
or to ask for clarification on what the application (as opposed to the
threat model) is.

Scott Craver wrote (about models used to analyse watermarking, but it
applies much more generally):


> It is folly to model the behavior of someone whose desire is to subvert
> your model.

Absolutely. The question of whether an attacker is actually likely to
try to perform any particular attack is basically irrelevant to security
design. To produce a secure system, you have to stop all attacks that
*could* feasibly be performed. If it is too expensive to protect against
some feasible attacks, then you have an insecure system, and defining the
problem away by not including those attacks in the threat model doesn't
help.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO4Is2DkCAxeYt5gVAQFYQQgAraXheMM4YBpGCVPKGWZuvfmyX/ojtjnG
GEOUWqdj632KO2aqq8sFAVJB4g3/MzKQEJHG+I+Kct0U11pBAJCNDDS37NbU54MP
m0/4ghMuU+gYKQv18yH3K31Z8IOj4ZvwDw29Ahdlj6C7vbfstSchYXNWDHkxDYPq
72fnZi3w6FEAMnQUuU6VvkpYpjcFUezond4nACXi5z79ygsThzcJxtubU9JEe5/B
mkfqQzhdUQiHSVfqsBJ0LvWMo/E/uQ7YA4QfundZoOMUQLio0aVwdP/bShoKCZBT
8r0HaubGy4NHhsCWhZ1ADqAuUB125b1j3LG53j3ZzaOYIoucs1ShwQ==
=5yzZ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/DDLRim7zfTQ/m/g3T90xOtOGsJ", "n_sections": 17}, {"thread": "GRtBgI8Z1ds", "msg": "d-ZM5VjdlxAJ", "author": "David Hopwood", "date_disp": "Aug 26, 2001, 10:27:43\u202fPM", "subject": "New Steganography Innovation from Ciphile Software", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Doc.Cypher" wrote:
> On Sun, 26 Aug 2001, Tom St Denis <tomst...@yahoo.com> wrote:
> >Anthony Stephen Szopa wrote:
> >> Check this guy out.
> >>
> >> He says, "Someone brought it up and the executable is HUGE, which is
> >> a good indication that VB was indeed used."
> >
> ><snip>
> >
> >Do yourself a favour and post the source code to your programs then.
>
> Precisely. Prove it is not Visual Basic.

Szopa is easy to criticize; I really don't understand how some people can
manage to make such a bad job of it.

If the three executables were written in Visual Basic, they would import
the VB runtime library, and they don't. (They are actually written in C
or C++, but with minimal or no use of C++ features.)

Given that the algorithm is totally insecure, though (Scott Craver gave a
reference to a paper that explains why), why go off on pointless tangents
about what language it is implemented in?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO4mv+DkCAxeYt5gVAQHPVQgAx5pOT2OE6np8W+M0l8S+VttGpFzDm+zK
MLn4WH87B8B1jeS9K0LPAYkxYzvJ+kHLRKeqEj0xC9HNAE3U7YyKIy1kG8jarVk6
Th1GaHEigLkqCUxjBvjcaxvJjO/vEBfAg7UGZlFhFTXBsxBFML68cKLMLcweAOpg
ux/Q/h9zjNtfT9RDe7hhCJO50YpWQWVdV85Nv18MxjxzOSm459E4/tabL/S1/Tho
vZw/1xKLOwlyhH4uzBeAEBIlsVW9r616OsixShmZ2Q2Ad+gLvCrOxSiw3Ai+Ba0D
iFhnYvOSUxXi4o6jm9qJwVVciAd5HSk181FWz9Jn4qE1az03+2wWyQ==
=ZiWP
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/GRtBgI8Z1ds/m/d-ZM5VjdlxAJ", "n_sections": 100}, {"thread": "GRtBgI8Z1ds", "msg": "q8_kzlzf-vcJ", "author": "David Hopwood", "date_disp": "Aug 26, 2001, 11:22:18\u202fPM", "subject": "Steganography *is* on-topic for sci.crypt (was Re: New Steganography Innovation...)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

[talk.politics.crypto removed from Newsgroups.]

Tom St Denis wrote:
> sci.crypt is not about XOR or steg. it's about cryptography.
>
> Steg is not about cryptography.

Steganography and steganalysis are branches of cryptology. They are
certainly on-topic for sci.crypt, as are watermarking, anonymous
communication, and other algorithmic methods of information hiding.

> Technically it's a branch of signal analysis and information theory.

Cryptology is arguably a branch of information theory, and certainly
involves signal analysis.

> Not only that but technically the only key in a steg system is that there
> is a message at all.

This is not true of most modern steganographic algorithms.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO4m8vTkCAxeYt5gVAQE2lQf9G/RWQtHv/t+vw7cpNN7osV62yhv/tmAS
12Jvu5nKbdqJkQyW4TUQeEjRaj1WYlXjFU9UORfEgHPh/zmpi9y/39Y0FoqAWRWB
gXxgamgUC/kvWNLBUIURdP/TGUVXurxQe0FDq0V6mUk4FwBBw67Kv93wMKiTTa2L
OS5TXUoqpLDFcq2sHvYaUVjhV3v474qIl9EGkm89m4MZZh7vr0w85r8pPWqMQg2m
OgNMsT1Db5FK6uZSA7Sye9bVpoCSl61dKeJBJEizqsKHp6fzCwD/gPpewRAzflGR
r5iMMBfzy/eozVM7ccDXPhWA6aNZONG4aswjryaK0m69IH2ylzHq8g==
=oXoJ
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/GRtBgI8Z1ds/m/q8_kzlzf-vcJ", "n_sections": 100}, {"thread": "H2uxVyFc5sM", "msg": "uyIIPrtGfFUJ", "author": "David Hopwood", "date_disp": "Sep 12, 2001, 12:54:47\u202fPM", "subject": "CipherText to be improved", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

If Mr. Prichard was involved in a battle and his side won, a year later he'd
presumably still be running around screaming "I surrender! I surrender!"

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO5+TFjkCAxeYt5gVAQF+mwf7BxHTCDBDrUr8Ei3uZQpWGETj0Pd3ImMD
W+h/TGsI2cKfGWpehFXdQPXTgr0dWkrqSDzEap4aYH8HzxHFle+5C808rQp/J02h
tuTTCaLmyifuljcbw/2t4p2JtrTyTAEDwhgI1P580de+kjqCWW9QfwLTLhymCLIn
2enLStU1Xx5lIq1pgTCIPfCM5X78EacWtHmUFNsqGXRsbDpm4y6Hcy4Q+Mk0lOnM
UQyPofUk5m7bSana6iVTlYLHngIe2gLFSd0aUycJgH/Xee97S90AN+VgDoYsJTJ8
2shrl10zi487F/NVdn+xQ2Smc5N+vHeKttrOpvsEBxsDEDPAD5D11g==
=qge/
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/H2uxVyFc5sM/m/uyIIPrtGfFUJ", "n_sections": 6}, {"thread": "Ho-j9ZWS4dU", "msg": "6OKqCKF8Mu8J", "author": "David Hopwood", "date_disp": "Aug 27, 2001, 10:56:55\u202fPM", "subject": "RSA OAEP -- what's the short answer?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Rubin wrote:
> Should practical implementers keep using OAEP, or do we go back to the
> drawing board?

IMHO the short answer is:
- For RSA encryption in new protocols, use Simple-RSA as defined in
[Sho01] instead.
- For existing protocols that use OAEP, don't rush to change them, but
make sure that OAEP decoding is implemented in the way I described in
a recent post (Message ID <3B822AED...@zetnet.co.uk>, subject
"Re: OAEP attack paper?"). This method is also likely to be specified
in PKCS #1 v2.1.


There are several reasons to prefer Simple-RSA for new protocols:

a) it supports arbitrary length plaintexts. Note that using RSA-OAEP
in the most obvious hybrid mode, i.e. just encrypting a key for a
symmetric cipher, does not achieve non-malleability and chosen-
ciphertext security for the whole plaintext; Simple-RSA does.
b) it is simpler than OAEP (apart from using a MAC, which is needed to
get advantage a)).
c) it is less vulnerable to side channel attacks of the type described in
James Manger's paper, because there are no conditional steps between
performing the RSA decryption operation and deleting the intermediate
result. (Side channel attacks on the decryption operation itself still
need to be considered, but that is true for any RSA encoding method.)
d) it has an optimally tight security reduction from the RSA problem,
which makes the proof directly meaningful for modulus lengths that
are typically used in practice (e.g. 1024 bits). The security bound
in the multi-user setting is also optimal. (Caveat: this is a random
oracle model proof, so it only proves security against "generic"
attacks that treat the hash function as a black box - but the same
applies to the OAEP proof.)

XEME-OAEP+, also from [Sho01], would be another alternative, but it doesn't
have advantages b), c) and d) to the same extent as Simple-RSA.


[Sho01] Victor Shoup,
"A Proposal for an ISO Standard for Public Key Encryption
(version 1.1),"
Revised May 29, 2001.
http://www.shoup.net/papers/
(Note: in equation (8) and in the corresponding proof, "nBound/q_D"
should be "q_D/nBound".)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO4sIFzkCAxeYt5gVAQGpeQf/fA0G0WEofeRA6dTfl43mIk1mqfLGrbZ7
SOv8fDP9VQs0/5jL+k+Ibi/ibfPT5LgZjbsNy0noCwuPbBS4YzmVJbbplEAGZNTf
qzpapp/QQJYCU5zaPF3ov6h7p6njbroeLah0NVPGd1v60R1YGa8m3puFKBkD/15o
NfhdbZNxjTSDdlysEtfXytnjpWT4lA50Hrng9Y09EKabdX7S3uwTQmEg27Twlkf4
P6iwagTgPoOhK8Ye3HLdL+1QHZFHNQefQwSccihIUSZoHGfTLeGOt5pq3Z2OnL73
CFEC5GLah0U2dRWTSRnrNm3x3sBdxo5guALfW09SZaIHXH92A1MLfQ==
=KWQI
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/Ho-j9ZWS4dU/m/6OKqCKF8Mu8J", "n_sections": 20}, {"thread": "I9C7R4t7WCk", "msg": "zigWMKQYGyoJ", "author": "David Hopwood", "date_disp": "Aug 27, 2001, 6:41:02\u202fPM", "subject": "The OAEP Affair: Failure of the Cryptographic Community?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Nomen Nescio wrote:
> It seems that this was a significant failure on the part of the
> cryptographic community. True, with hundreds of papers published every
> year, a few errors are bound to slip by. But when a paper is going to
> lead to important standardization and adoption, one would expect that
> the proofs would be examined closely by the community. Claims that are
> made without proof because they are too obvious are perhaps among the
> most important to look at.

I entirely agree. (The fact that OAEP turned out to be provably secure
with a looser security bound is almost beside the point; there could
easily have been a practical attack. Also, the looseness of the result
means that if you take the proof literally, it implies nothing useful
about the security of RSA-OAEP with common modulus lengths such as 1024
bits. Note that this is also true for OAEP+, but not for Simple-RSA,
for which the proof has a tight bound - modulo any issues about use of
the random oracle model.)

"Roger" <roger...@my-dejanews.com> wrote:
> "Nomen Nescio" <nob...@dizum.com> wrote


> > So, the proof of this part was omitted because it was obvious. Yet
> > apparently it wasn't obvious, and in fact it was wrong, as Shoup shows.
> > How did it happen that it took almost seven years for the error in
> > the OAEP proof to be found? Is this a typical amount of time for a
> > mathematical community to discover a mistake in a proof which has led
> > to a widely-used result?
>

> There wasn't an error in the published proof. The problem was in the
> omitted proof of some of the conjectured OAEP properties.

It wasn't presented as a conjecture; the implication was definitely that
there was a known proof which, because it was straightforward, could be
omitted [*]. In that case the authors have a responsibility to check that
the proof actually exists. Omitting "obvious" proofs was *and is still*
common practice; there was nothing unusual about the OAEP paper in that
respect. IMHO it is a practice that needs to be ended - at least to the
extent of always giving at least a sketch of all proofs in the appendix
of the full version of a paper.


[*] The exact wording in [BR95] was:

# We introduce a new notion of an encryption scheme being plaintext-
# aware -- roughly said, it should be impossible for a party to produce
# a valid ciphertext without "knowing" the corresponding plaintext (see
# Section 3 for a precise definition). In the ideal-hash model that we
# assume, this notion can be shown to imply non-malleability and chosen-
# ciphertext security.

The last sentence incorrectly claims a proof ("show" normally means
"prove" in this type of paper). In a later paper [BDPR98] a different
definition of plaintext awareness was given, but OAEP was not proven to
meet this new definition. The fact that the definition of PA needed to
be changed to prove IND-CCA2 should really have rung alarm bells in 1998;
previous results involving PA should have been re-checked.


[BR95] Mihir Bellare, Phillip Rogaway,
Optimal asymmetric encryption -- How to encrypt with RSA,
Extended abstract in Advances in Cryptology - EuroCrypt '94
Proceedings, Volume 950 of Lecture Notes in Computer Science
(A. De Santis, ed.), Springer-Verlag, 1995.
Full, revised version:
http://www-cse.ucsd.edu/users/mihir/papers/pke.html#oae-paper

[BDPR98] Mihir Bellare, Anand Desai, David Pointcheval, Phillip Rogaway,
Relations Among Notions of Security for Public-Key Encryption
Schemes,
Extended abstract in Advances in Cryptology - CRYPTO '98.
Vol. 1462 of Lecture Notes in Computer Science (H. Krawczyk, ed).
Springer-Verlag, 1998.
Full version:
http://www-cse.ucsd.edu/users/mihir/papers/pke.html

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO4ncMDkCAxeYt5gVAQE1GggAoBdkL+oiJsgdN/4t7k1tgUCuzKUqgpyV
22Agpk0XEppx+4eFcVi6dJVMkNjdZdcXMu1fjRumhOBEYwrjV6UcJ1jZObMkGs3j
JjrGPFZhI+Dk8MIQ4PH0DBjvfg3n1iVh+Z4CNDmt8bmDCwd1/XCMMraCqtGAZYZb
3HCZGxAsYFpKFqP9Z2bg3zxk9853Me0myxfwjFhWVGj2A0nHLRGwYjveOovjz6hM
X6Z61qRwu1m9kDfcrhWPny4OSPXuLl/u2xeQQBUnEv8QxiLVhsKkdpf2srY+eVeO
MuZujLFuRxk3QqLTSMLa1TIcfu8+5M00CFAZEUwn59AurZ0PulF5DQ==
=+6CR
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/I9C7R4t7WCk/m/zigWMKQYGyoJ", "n_sections": 17}, {"thread": "L6FJIaFGorw", "msg": "ONvabKQ5GlUJ", "author": "David Hopwood", "date_disp": "Aug 19, 2001, 5:14:41\u202fAM", "subject": "DCTR Mode and the attack", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Wagner wrote:
> John Savard wrote:
> >Ah, I thought you were attacking the first mode, where out of order
> >packets are not at issue, and if X(0) is reused, it is reused for a
> >subsequent *message*.

I assume we're talking about the mode in the section of dctr-spec.pdf
entitled "Verifying data integrity". If so, then yes, that's also the
interpretation I came away with (although the paper is not entirely clear).

> We were attacking the first mode. It seems that different readers
> of the specification came away with different interpretations of how
> that mode was intended to work. The ambiguity is unfortunate. (What
> made you assume that out of order packets are not an issue for packet
> encryption, by the way?)

The section following that is entitled "Tackling out of order IP packets".
So I assume the purpose of the second variant is to correct this
practical deficiency in the first variant.

> Sadly, I can't find a copy of the DCTR mode specification any further.
> It seems that NIST removed its copy of the proposal from its web site.

That's rather poor form. Submissions to a standards process of this type
should be a matter of permanent public record, regardless of whether they
are withdrawn.

> Do you know where to find a copy?

<http://www.users.zetnet.co.uk/hopwood/crypto/temp/dctr-spec.pdf>,
temporarily.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO3+DNjkCAxeYt5gVAQHUAgf+OPR+pEKzX/L8pC5BN5m7xKYMBeU5nX10
tbuSalG6y5t4zyQu0/ss0gFcmBn6XxVpY/NQx4eEtflydXA/VSdhbxYW2HAPxg7n
XHB7MUNockKmQgWsCLVyft9OZLv+eBpHjcH63JeVvF8CzishZ+gLAh1BI+5nhNff
cIC22nvmM3nTtIIwJXbsWviLfzvtHhcOd472HREmnuCQHq8oIeJL7vKr6waXUYlI
xAC4Z1Y0I5zO/rYz71ffYmPKB+SjxMGSR/5sn6uE8fYY3qdhtLJU13QUkKFqcDM5
8qS2wBeqWy1tVc5Cu8ICGLQ+pkHPpdyH61X5K2tuDEP7o+KmxRqEAQ==
=RfOI
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/L6FJIaFGorw/m/ONvabKQ5GlUJ", "n_sections": 14}, {"thread": "MyNVbYuUI4E", "msg": "zICNJt4qGaIJ", "author": "David Hopwood", "date_disp": "Aug 27, 2001, 12:02:43\u202fAM", "subject": "TripleDES key length (not \"strength\")", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Key length doesn't imply anything about security except for an upper bound.
If users want to assess the security of a cryptographic algorithm then
they can only do so by looking at the 'reputation' of that specific algorithm,
not just the key length. If they don't know enough to arrive at a conclusion
from that then they have to either do some more research, or rely on the
extent to which they trust the protocol and/or algorithm designers. Trying
to adjust key lengths to reflect how secure an algorithm is believed to be,
is more likely to confuse than to help - and also plays into the hands of
snake-oil merchants, who can and do quote any key length they like.

Parity bits are conventionally not included in DES and 3DES key lengths
because for a valid key, they have *no effect whatsoever* on the algorithm;
this is quite different from (mis)using the key length as a measure of
security. Does DES have a key length of ~43 bits because there is an
(impractical) attack with work factor roughly 2^43? Does 3-key 3DES have
a key length of ~90 bits for the same reason? Of course not.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO4nGFDkCAxeYt5gVAQHG4Qf+MJ+aAsOmzId7BltpHfs/9/6fFYakdaYT
5/0gzr3gAfLUeyMsH9bzKvM8bxoAQt0YQ9oJ6rhBGKCZj8BAfcIt6vIQ5+qvNRL3
5fBkmQBDCR/JKWU7E7RGbg5VVyJ+TDzJOuemG2tgXYXR2zYSL4BoKaWw7AH3PgDl
iU9IDmjmrqjwl/dNU2iDVgAFUufAxEBn5mNkKMrAffDAwK2/bqvxWfLkTWK/KziG
rckt4nmtsY71BOWB1xMb6GnI9LeF/0ZXsccz5QahT0BeuJ7a+6MyzfKjuHKXLHtn
FQ/y3sz1MbyVsN0tegrX2vrrC3UsWwuisw04ztkaj5jfjaz43ENDOw==
=ASj7
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/MyNVbYuUI4E/m/zICNJt4qGaIJ", "n_sections": 13}, {"thread": "MyNVbYuUI4E", "msg": "ObU811j9XfgJ", "author": "David Hopwood", "date_disp": "Aug 29, 2001, 12:27:11\u202fPM", "subject": "TripleDES key length (not \"strength\")", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Roger Schlafly wrote:
> "David Hopwood" <david....@zetnet.co.uk> wrote
> > Key length doesn't imply anything about security except for an upper
> > bound. If users want to assess the security of a cryptographic algorithm
> > then they can only do so by looking at the 'reputation' of that specific
> > algorithm, not just the key length. If they don't know enough to arrive
> > at a conclusion from that then they have to either do some more research,
> > or rely on the extent to which they trust the protocol and/or algorithm
> > designers. Trying to adjust key lengths to reflect how secure an algorithm
> > is believed to be, is more likely to confuse than to help - and also plays
> > into the hands of snake-oil merchants, who can and do quote any key length
> > they like.
>
> Maybe it is not a good idea, but people do commonly relate key length
> to security. Eg, "40 bit RC2" can actually accept a key longer than 40 bits,
> but the effective key length is adjusted to 40 bits.

RC2 is a very unusual case: it's the only algorithm I know of that has
a parameter, independent of key length, to intentionally limit security.
(Not to mention the dirty underhand trick in S/MIME v2 - also designed by
RSA Security, Inc. - of using a "version number" to determine the number of
effective key bits via a formerly secret table; see section 6 of RFC 2268.)
In most other export-crippled systems, this is done at the protocol level
as part of key derivation, not as part of the cipher.

In any case, this parameter is quite separate from key length, and
"effective key length" is not a good name for it, whatever RFC 2268 says.
Something like "backdoor key weakening parameter" would be more accurate,
given the way it was used in S/MIME.

> So the qualifier "40 bit" is used as a description of security.

"40 bit", as a key length, does give information about security: it
guarantees that the algorithm is too weak. "128 bit", OTOH, does not
directly give any information about security, other than against simple
brute force attacks.

The original poster asked what key length 3-key Triple DES should be
considered to have. The answer is "168 bits, excluding parity bits" -
notwithstanding any attacks that have a work factor less than brute force
on a 168-bit key. The strength of Triple DES is a separate issue to its
key length, and cannot be reduced to a single number.

> Also, someone might say "I need 128-bit encryption for this". Granted,
> he probably doesn't know what he really needs, but people commonly
> use language like that.

What he almost certainly doesn't need is 128-bit encryption. Instead,
he probably needs strong encryption, among other things. Telling him
anything that maintains his misconception that he needs 128-bit encryption
is doing him a disservice.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO40XWjkCAxeYt5gVAQH6eAf/a/hP4QDYra12mjFFdsDyLVuUjwJyJxEE
zAXwFAZafO322g+UnWN7cGVG1kMOQvzLFF4LYzIxhssshuvvMa3Yu2Z3KURvd1qc
3Xsxuqup/JOl/gqgrBkM1zFWI3cWCVQg54RlbAj8Wahbh7ZppMd+U+kRQ6Wrx5V3
2XW4+lytFXl28DzZx6SzaiTo7WpJByNyrbGg1BXcEEYY2lUaTGNL1JUlOOoyjwCB
WCVcrcrVB+Pwxiig7HwrOQmTv5Xz0FBWvA9sKWe0PDR4nwDRXyCqSzfAeh2goNt7
bRsTcbO7MQnWKMTYxoJuKXlRfuRWsukCJV2b3ctn05LJebv0yt0JbA==
=Jz/W
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/MyNVbYuUI4E/m/ObU811j9XfgJ", "n_sections": 13}, {"thread": "NZAlBHvZEOA", "msg": "rp9JL2Gu66IJ", "author": "David Hopwood", "date_disp": "Aug 21, 2001, 5:33:34\u202fAM", "subject": "OAEP attack paper?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Anton Stiglic wrote:
> There are 4 papers on OAEP at CRYPTO this year:
>
> http://www.mail-archive.com/crypto...@wasabisystems.com/msg00232.html
>
> I'm interested in the paper from James Manger:
> A Chosen Ciphertext Attack On RSA Optimal Asymmetric Encryption
> Padding (OAEP) as Standardized In PKCS #1

Actually "... in PKCS #1 v2.0".

> I can't find it on the web. Anybody has a reference to it, or the
> abstract?

I got a copy from the author, but I'm not sure I have permission to
redistribute it. The abstract is:

# Abstract. An adaptive chosen ciphertext attack against PKCS #1 v2.0
# RSA OAEP encryption is described. It recovers the plaintext - not the
# private key - from a given ciphertext in a little over log2(n) queries of
# an oracle implementing the algorithm, where n is the RSA modulus. The
# high likelihood of implementations being susceptible to this attack is
# explained as well as the practicality of the attack. Improvements to the
# algorithm to defend against the attack are discussed.

Basically the paper describes a chosen ciphertext side channel attack,
where the side channel information is the reason why a decryption failed.
It makes quite a convincing case that such side channels may exist in
practical implementations, despite the fact that the same error message
is supposed to be returned on all failures. Note that log2(n) queries is
better than Bleichenbacher's attack on PKCS #1 v1.5, which is IMHO why
this is an important result: it demonstrates that switching from PKCS #1
v1.5 to OAEP could actually reduce security unless OAEP decryption is
implemented very carefully.

For new protocols, arguably the best response to this is to use Victor
Shoup's "Simple-RSA" proposal instead [Sho01]. Simple-RSA has a better
proven reduction to the RSA problem (in the random oracle model), achieves
IND-CCA2 security for an arbitrarily long plaintext, and is simpler
than OAEP.

However, for protocols that already use OAEP, here is a restatement of
the OAEP unpadding algorithm that makes it clearer how to prevent the
attack (I've checked this with James Manger):

1. If the length of P is greater than the length limitation, output
"error" and stop. Otherwise, apply the hash function Hash to the
parameters P to produce an octet string cHash of length hLen.
2. Let oLen = floor(l/8) and seedLen = hLen. If oLen < seedLen + hLen + 1,
output "error" and stop.
3. Convert f to an octet string EM of length oLen + 1 with the primitive
I2OSP. If the primitive outputs "error", output "error" and stop.
4. Let X be the leftmost octet of EM, let maskedSeed be the next seedLen
octets, and maskedDB the remaining octets.
5. Apply the mask generation function G to the string maskedDB to
produce an octet string seedMask of length seedLen octets.
6. Let seed = maskedSeed xor seedMask.
7. Apply the mask generation function G to the string seed to produce
an octet string dbMask of length oLen - seedLen octets.
8. Let DB = maskedDB xor dbMask.
9. Let M' be all but the first hLen octets of DB.
10. Let T be the leftmost nonzero octet of M'.
11. If the first hLen octets of DB are not equal to cHash, or X != 00,
or T != 01, then output "error" and stop.
12. Remove T and all octets to the left of it (which are all zero) from
M' to produce an octet string M.
13. Output the message M.

NOTES
1--It is important that the implementation output the same error message
at the same time regardless of the cause of error in step 11.
2--The description of the decoding operation has been modified from that
in IEEE Std 1363-2000, to make it clearer how to implement decoding in
a way that avoids the attack described in [Man01]. This does not affect
compatibility; the differences only affect when errors are detected. In
particular, the previous description used the I2OSP primitive to
produce an octet string of length oLen, rather than oLen + 1. If an
implementation reveals whether the length of the message representative
is greater than oLen octets, then an opponent will be able to determine
whether the most significant octet of an RSA decryption is nonzero, which
may lead to an attack.
3--The error in step 3 cannot occur for RSA-OAEP, since in that case the
message representative will always be in the range [0, 2^(l+1)-1].
4--Step 1 may be precomputed, if P is known in advance.


[Sho01] Victor Shoup,
"A Proposal for an ISO Standard for Public Key Encryption
(version 1.1),"
Revised May 29, 2001.
http://www.shoup.net/papers/
(Note: in equation (8) and in the corresponding proof, "nBound/q_D"
should be "q_D/nBound".)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO4IquTkCAxeYt5gVAQGAvwgAuX1aJ+Ao7asQB+XWdBQxkL6Xa+h/OFcf
770GTELPGzgJFa9D/5CWidjuzk44cUqzBjQn989ZaG8IDDRZqTILCWDF5FuRRmq1
miStn1uqSg9UERrmvIBejnNCWQtAD6E2j11mjlfpJQEFASNSzc3Ob3jOfnxEl8yy
sYYr2559+oSwkJ8ebwtvKcnhFELc5kFKEdAs6Ac7/gSbOMlSbc4iMjgoO5gancyb
QNoeU/1K9YD1cfdMUJl7yywwcntZ/dEVvcZ9uSh3M0hMndFLl3ujK70VNZy0ux9g
77JQg39kcqfUURYTYbOC5qXH8qkNTfKQ5rtyNlxUB0BjdUvY17NGWA==
=BcS7
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/NZAlBHvZEOA/m/rp9JL2Gu66IJ", "n_sections": 5}, {"thread": "RFtaJunr6PA", "msg": "ffUpFoc2uw0J", "author": "David Hopwood", "date_disp": "Sep 17, 2001, 4:46:01\u202fPM", "subject": "Generality of Manger's attack (also on RSAES-PKCS-v1_5)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Vlastimil Klima wrote:
> What we wanted to say, is that the Manger\u00b4s attack is working in more
> situations. The idea is following.
> Let M be a message to be encrypted by the RSA. We now prepare EM (Encoded M)
> by the EME-OAEP-ENCODE (see PKCS#1, version 2.1, draft2, par. 9.1.1) or by
> EME-PKCS1-v1_5 (see PKCS#1, version 1.5) or by "EME-OAEP+" (we mean the
> Shoup\u00b4s OAEP, presented at Crypto\u00b401).

Yes, although note that OAEP+ can be implemented to prevent the attack in much
the same way that OAEP can (see my previous post in this group with Message ID
<3B822AED...@zetnet.co.uk>, subject "Re: OAEP attack paper?"; the
application to OAEP+ is obvious).

> But the RSA modular exponentiation function is used on ( 00 || EM), not only
> on EM. BUT this step again introduces simple verifiable structure of final
> RSA message, which we tried to suppress by using particular encoding method.

I don't see what you're trying to say here. The attack can be prevented
without changing the abstract specifications of OAEP or OAEP+, just how they
are implemented. This obviously doesn't change the security properties
against attacks that don't use side channels.

> The Manger\u00b4s attack works in any of the three examples of "encoding" of the
> message M. Leading 00 is used because of the condition that any processed
> message must be less than the RSA modulus. In this sense the Manger\u00b4s attack
> is more general. We assume that it is necessary now to define the new model
> (possibly such as sketched by Mark Wooding in this thread), which would deal
> with the whole message m, processing by the OWP (one way permutation).
> Here OWP is the RSA function.

The message doesn't necessarily need to go through the RSA function; it can
be symmetrically encrypted instead.

> Maybe we can call these formats FDEM (Full Domain Encoding Method). FDEM
> should prevent successful applications of side channels.

Yes, I agree. That's one reason why I recommend Victor Shoup's Simple-RSA for
new RSA-based protocols, since it has no conditional steps that depend on the
output of the RSA private key operation before it has been hashed. That
should mean it is not subject to attacks of the same type as Manger's, or
Bleichenbacher's on PKCS #1 v1.5. There are still potential side channel
attacks on the RSA operation itself to be considered, of course.

> We would like to motivate the research for the new format FDEM, which will
> be provably secure against Adaptive Chosen Ciphertext Attack (in random
> oracle model), so some "OAEP without side channels".

I don't think there's any need for a new format here; Simple-RSA appears
to meet this requirement (to the extent possible just by changing the
encoding method).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO6X/iTkCAxeYt5gVAQHBOAf/cYjZAUtIgbpzmZtaKg9jAewa6gjoMhU9
JWQ7eVV07ZAlEM2OxU0CpT18QwRcDpZcZcnJ1/L+YQ94em6jABvwpOEcgWGGVOfq
JHIRCmCZM7VBFjizbkVOyAeVY5j4XunnRAQuXOYjC7dfC1l3LAWNbJDFtsTrJm6A
S1ZPOT+TkKk4NwVWO5YF79Qgy02e5Zvb4DjaVimaLkkYcBdSYPzrTyNF5qYAqoE1
K+iv7s70ydnTJtvELDELZjtFBOg9DY4dcf8wGAgD9oQZVJ6voqY935w7OJtU0plL
KqyZHE4N+fyUP+alOAo6/QPlOhbEQFJKhWFl/Y+JDtsETR/jFMHfFA==
=VPLU
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/RFtaJunr6PA/m/ffUpFoc2uw0J", "n_sections": 32}, {"thread": "RFtaJunr6PA", "msg": "SPpqizfoQ2EJ", "author": "David Hopwood", "date_disp": "Sep 18, 2001, 7:31:01\u202fPM", "subject": "Generality of Manger's attack (also on RSAES-PKCS-v1_5)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

The same way you do it with any other encoding method: encrypt the message
with a session key (using an IND-CCA2-secure symmetric scheme), and encrypt
the session key with Simple-RSA (using the same symmetric scheme). Yes,
that involves two layers of symmetric encryption, but so what?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO6fZFDkCAxeYt5gVAQF0+Qf/X+OQbGJki/mfqQhPc00NiT1fGgaRG/V+
1dHLd64HaYV1cEMCOe98InpvenJxMWXZnvkrgJDBfgsDldwXp7S+p6FDHaEbfxrK
N7FMY8BgPhhda/JnV+IP48iafuZePPTQJLvzxO5T5XVIndRy+IFMvfl+rTcCI5Xj
+NoxX5nLlWHUI1mUtmknBU3WHsN4G9ep3REO5BM4K0Or0n/czqJFDTL4LC61Qv59
IyGpLh/Kpx35f2SU5B9FAPINNPJLAEM91FFZB5GgZFsfWIImj+ZsjFsXcbUnrT57
ktMmnHezGQtrfupHUQqZs4bViKIfwdA1hj1HN9kxwkEp1g7f4sUXcg==
=58cw
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/RFtaJunr6PA/m/SPpqizfoQ2EJ", "n_sections": 32}, {"thread": "RFtaJunr6PA", "msg": "mODL0jbeFlUJ", "author": "David Hopwood", "date_disp": "Sep 20, 2001, 11:09:56\u202fPM", "subject": "Simple-RSA for multiple recipients", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Nomen Nescio wrote:
> David Hopwood wrote:
> > Nomen Nescio wrote:
> > > Email encryption protocols like PGP/GPG and S/MIME often encrypt to
> > > more than one recipient. How do you do that using Simple RSA?
> >
> > The same way you do it with any other encoding method: encrypt the message
> > with a session key (using an IND-CCA2-secure symmetric scheme), and encrypt
> > the session key with Simple-RSA (using the same symmetric scheme). Yes,
> > that involves two layers of symmetric encryption, but so what?
>
> It's more complicated, that's what. But that's okay, I hear they are
> changing the name to Complicated RSA (or something like that).

When compared against alternatives that provide roughly the same security
properties (e.g. OAEP+ used to encrypt MAC and cipher keys), there's not
much difference in complexity. However, Simple-RSA has a tighter security
reduction, and there is less to go wrong in terms of side channel attacks.

> You've got three parts instead of two, three keys instead of two.
> You've got a session key to encrypt the message, a shared secret key
> to encrypt the session key, and a public key to encrypt/generate the
> shared secret key.

Actually you have 2n+1 keys instead of n+1 keys, where n is the number
of recipients.

> Do the proofs of security for Simple RSA still go through in this case?

Yes, provided the symmetric scheme is IND-CCA2 for both layers.
(It's easy to prove, with a tight reduction, that an attack on the
overall scheme either breaks the message encryption in the symmetric
IND-CCA2 sense, or one of the Simple-RSA instances in the asymmetric
IND-CCA2 sense.)

> Isn't it overkill to use IND-CCA2 for each of the two layers of
> symmetric encryption?

No, not if you want provable security under standard assumptions.

> How about just XORing the shared secret key (generated by Simple RSA)
> and the random session key? Use the one as a OTP for the other?

Suppose in that case that the message encryption scheme is IND-CCA2-secure,
but insecure against a related-key chosen ciphertext attack using XOR
relations (which it can be without contradiction). Then an attacker can
replay the ciphertext with the required XOR differences in the session key
(i.e. each chosen ciphertext query allows one related-key query).

> Wouldn't the chosen ciphertext awareness of the third layer detect
> manipulation of the second?

No, because the third layer's chosen ciphertext security is conditional
on it getting random, *independent* keys for each message from the second
layer.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO6qkrjkCAxeYt5gVAQF+kwf/YwR8TNJAA5gFDNcDEaZnL4J0lFaG6CgK
xXx1Otob7y1UHC1IgqQoobyjKcizbPNcxjZFWIgNjxvpfW9ryftvtCjv5grm4frQ
dlL8PXqL1MWqLIwATmyc8bkzKFd8CHsa7v0J+5QlbMw9DfVjen4xgLlxvXinlJK9
hBQ1hu9yYL6ljPUA1QXHiq1JPFmalmXhwToO9+Dwv6IaMx15n4SkrnovBFnROO7t
oDyXaFBUS8XvRtECZqoorgyZtBIjPs+KGrq2pojM5P3ttFxCn42h4vB83JH907mL
6G0NNW5eyAsqvLQKy7ZdJAdBwCccGQYWz6aFWWVXDpZoW/KM0+y/XQ==
=CsQa
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/RFtaJunr6PA/m/mODL0jbeFlUJ", "n_sections": 32}, {"thread": "RFtaJunr6PA", "msg": "8MuVg55h2x4J", "author": "David Hopwood", "date_disp": "Sep 25, 2001, 9:22:27\u202fPM", "subject": "Simple-RSA for multiple recipients", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mark Wooding wrote:
> David Hopwood <david....@zetnet.co.uk> wrote:
> > Nomen Nescio wrote:
> > > Do the proofs of security for Simple RSA still go through in this
> > > case?
> >
> > Yes, provided the symmetric scheme is IND-CCA2 for both layers.
>
> I must admit, I've never seen a definition for multiple-recipient
> security apart from the one I proposed a few days ago. And the proof
> will /not/ go through against my definition, because the scheme is
> broken.

What is the attack? (If it is broken in your sense, that would be
interesting, because it would show that your definition is stronger
than the ones in [BPS00] and [BBM00], unless I've made some silly mistake.)

> The definition works like a single-recipient adaptive chosen-ciphertext
> attacks, except that the adversary is given n separate decryption
> oracles each of which decrypts a ciphertext (other than the challenge
> text) using a single private key.
>
> Note that standard single-recipient chosen-ciphertext-secure schemes /do
> not/ compose simply to yield a secure multiple-recipient system. There
> must be integrity protection on the recipient-specific parts of the
> message which can be checked by /all/ recipients.
>
> While I think my definition can rightly be accused of excessive
> strictness, I can't think of a reasonable alternative definition.
>
> > (It's easy to prove, with a tight reduction, that an attack on the
> > overall scheme either breaks the message encryption in the symmetric
> > IND-CCA2 sense, or one of the Simple-RSA instances in the asymmetric
> > IND-CCA2 sense.)

This is not quite right, and I should have been more precise. What
is easy to prove is that given a public key encryption scheme that is
secure in the *multi-user* IND-CCA2 sense defined in [BPS00] (M-IND-CCA2
and M-NM-CCA2), using it to encapsulate keys for an IND-CCA2-secure
symmetric scheme gives a hybrid scheme that is also M-IND-CCA2- and
M-NM-CCA2-secure, and that if we use concrete security definitions, the
reduction is tight. ([BPS00] uses polynomial definitions; [BBM00] has a
concrete definition for M-IND-CCA2 but does not define non-malleability.)
This also works if some additional side information is encrypted to each
recipient, together with the symmetric key.

It is also true (and proven in [BPS00]) that any polynomially
single-user-IND-CCA2-secure public key encryption scheme is polynomially
M-IND-CCA2- and M-NM-CCA2-secure, but that is neither easy to prove, nor
is the general reduction tight. Shoup claims in [Sho01], though, that there
is a tight M-IND/NM-CCA2 security proof specifically for Simple-RSA/RSA-KEM
(he doesn't give the proof, but I assume it's straightforward). That would
imply a tight proof of M-IND/NM-CCA2 for the multiple-recipient Simple-RSA
scheme I suggested.

> Show me your security notion! ;-)

[BPS00] Olivier Baudron, David Pointcheval, Jacques Stern,
"Extended Notions of Security for Multicast Public Key Cryptosystems,"
Proceedings of the 27th International Colloquium on Automata, Languages
and Programming (ICALP '2000) (July 9--15, 2000, Geneva, Switzerland).
Springer-Verlag, LNCS 1853, pp. 499--511.
<http://citeseer.nj.nec.com/429900.html>

[BBM00] Mihir Bellare, Alexandra Boldyreva, Silvio Micali,
"Public-key Encryption in a Multi-User Setting: Security Proofs and
Improvements,"
Full version, May 2000.
<http://www-cse.ucsd.edu/users/mihir/papers/musu.html>

[Sho01] Victor Shoup,
"A Proposal for an ISO Standard for Public Key Encryption
(version 2.0),"
Revised September 17 2001.
<http://www.shoup.net/papers/>

(Note: in equation (8) and in the corresponding proof, "nBound/q_D"
should be "q_D/nBound".)


[BBM00] also has improved multi-user security proofs for ElGamal (assuming
DDH) and Cramer-Shoup.

> > > Isn't it overkill to use IND-CCA2 for each of the two layers of
> > > symmetric encryption?
> >
> > No, not if you want provable security under standard assumptions.
>
> Actually, yes, you can use ECB encryption, as I proved elsewhere (using
> an interesting game to play with a PRP).

I didn't mean to exclude the possibility of there being ways of doing
hybrid encryption other than straightforward key encapsulation with an
IND-CPA public key scheme, that are multi-user-secure.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO7EtszkCAxeYt5gVAQE8VQf/XBPGAVrqypag7qWQee07fGkafSB5/Nmd
P2ccQpi2t9GKCyv/E6DEpJX4EvRWeKmmKFQgld670fYWdIgj5thj9KJYsJ49PDXn
+jZfd5LjhKXYz2ff0sPPKpGje8yZwpxlfAqjxjl4Frn5fX8Qs0QxqjUFxO3aW42L
XEmnXm+MiYgzabOhRZV82EKRmHOzA7kfJsMLs4WyKAOJSoikEsVQ2FCrk+yUdoYj
Yj3QnUZ0AaAvTVqXupRABs7vhTXz0aHbiRBccHISW/ka1Z+U7cRBajZvzkYO197p
V6PpOvzy4TZ/Y1X4rORw4MMyZBcTBptI9Q5b+HcgXjqMyS+kyZ1pWw==
=yGBs
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/RFtaJunr6PA/m/8MuVg55h2x4J", "n_sections": 32}, {"thread": "UI9PPXFJNCM", "msg": "mUUK4qzmTiIJ", "author": "David Hopwood", "date_disp": "Aug 11, 2001, 9:35:16\u202fPM", "subject": "interesting - NSA Dual Counter Mode (DCTR)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Roger Schlafly wrote:
> "M.S. Bob" wrote:
> > Roger Schlafly wrote:

> > > AFAIK, Skipjack was never broken. Biham has a (rather farfetched)
> > > attack on 31-rounds of Skipjack here:
> > > http://www.cs.technion.ac.il/~biham/Reports/SkipJack/
> > > But Skipjack is 32 rounds. This suggests that Skipjack was well-
> > > engineered, not that it was sloppy.
> >
> > An academic attack that works up to 31-rounds is a fairly significant
> > certification weakness. The margin of safety is tiny, a mere single
> > round, which makes many people uncomfortable using it.
>
> No, it's not a weakness. Skipjack does what it was designed to do.

If a publically designed cipher had an attack better than brute force when
reduced by one round, most people wouldn't touch it with a barge pole, at
least for new designs. I fail to see why NSA ciphers should be treated any
differently.


I'm also not surprised that DCTR was broken; the security analysis in
the paper describing it was basically non-existant - just a lot of vague
handwaving. Also, if I'm not mistaken the result described in section 6 of
Jutla's paper [1] applies: the minimum number of additional cryptographic
operations required to achieve the standard notions of message secrecy and
integrity in a mode of this type is O(log n), where n is the plaintext
length. Stepping an LFSR cannot be considered a cryptographic operation,
so DCTR doesn't meet this condition. If the DCTR authors didn't know about
this result, they just weren't paying attention.

[1] Charanjit Jutla,
"Encryption Modes with Almost Free Message Integrity,"
http://eprint.iacr.org/2000/039/

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO3XdMTkCAxeYt5gVAQE2eQf+NfvtBhR7wOeiTNTbzc3HlOZep893j2AK
Tu6Ln9CVq3V4nAI0qe+xFJ7RZjGEPqGwwnO7//2uOO3MwVZSC2bsTMIwOEzzyvhc
myl8E53rzXVhpxYHEI66GlAYd0vOhI37VkbtOCLoDX7lLo3Ta5CGx5B1Fp8CsQra
yHIlgEz/sKVrjZiVfc7RaYWC8DQzNxnDK7osN+Ohe8IZ0l19e2OmqZLknPoosg8+
yW0O2w5CodqkUgcnr0YYFNebmWaVt1yjLjUKcClpnYQ/l8KogG2rgQ8IMlQ0Xxmp
l152XJc9/TAC/eAmbKG/vV/jq2kd/D0Yd0Y2o68jAgC8XDG6tXtDNQ==
=dcWB
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/UI9PPXFJNCM/m/mUUK4qzmTiIJ", "n_sections": 100}, {"thread": "UvXU-gDtpUs", "msg": "IebTwfqMG7UJ", "author": "David Hopwood", "date_disp": "Sep 10, 2001, 9:28:29\u202fAM", "subject": "Leaking message length (was 10 Questions and a suggestion)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

hel...@REMOVEtcs.THIShut.fi wrote:


> Scott Fluhrer wrote:
> >In other words, counter mode is weak because it preserves length
> >information, while a block mode that insists on padding that hides it
> >somewhat. Fair enough (however, fixable by adding padding to counter mode,

> >if it is indeed a concern). [...]


>
> About leaking the message length. Strangely enough, given even ``utterly
> idealistic'' security models (like random oracles, for example), one
> assumes that *no other* information about the plaintext *but the length*
> can be guessed from the ciphertexts.

There's no particular reason why you need to assume that: all the commonly
used definitions of security properties can be trivially modified to
require that the encryptions of an arbitrary set of plaintexts are to be
indistinguishable, not just the set of plaintexts of a given length.

For example, let IND-CCA2'(k) be a modified version of the find-then-guess
formalisation of IND-CCA2, where the attacker's 'find' function is allowed
to return any two plaintexts of length <= k bits. Then an encryption scheme
that reversibly pads all such plaintexts to a fixed length (say k+1 bits),
and then encrypts it using an ordinary IND-CCA2-secure scheme, will be
IND-CCA2'(k)-secure.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO5wPvjkCAxeYt5gVAQGLOgf8Cm4U/uiPe/ynNi2CeOzVVSTRwhKjzQfT
gP8HevZGHq1WGsRefH2zINaBadDuXmOuxNakD81DnGZf82xL3lgIX4NLvP3r5823
nXVPkaEOSQHkUARrknv5IEQiYMCjlxhCPWTRaTM9DkvV+TYl3tfl41bnqORg4GP/
UGHOPNvWVv/koy9JCiGl0M0mKP4v2M1wXrfSJj0R0WA/lCQCrKccnfw+DWOyeI7k
hZ4fHKY+iipg25ip+9RISnlzN3tXGmAnYg/Z7RllzhVobaMG/2sCJzzYrI6+3ATi
Ev41wKwkN70IMbzc96eDPmqCS+kIm+kPVMfgyj4Fmclgz06qTlKcLg==
=9QRK
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/UvXU-gDtpUs/m/IebTwfqMG7UJ", "n_sections": 58}, {"thread": "XExfzlLCf-s", "msg": "zE0Fmof6cagJ", "author": "David Hopwood", "date_disp": "Sep 26, 2001, 8:50:50\u202fPM", "subject": "Random Prime Number Generation", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Wagner wrote:
> Douglas A. Gwyn wrote:
> >Paul Rubin wrote:
> >> 1) generate 1024 cryptographically random bits ... n ...
> >> 2) set lowest order bit of n to 1. ...
> >> 3) Check primality: if [n is not prime] go back to step 1.
> >
> >Here is a possibly interesting question:
> >Suppose instead of the above, step (3) is changed to:
> >3) If n is not prime, add 2 to n and go to step 3.
> >What sort of bias does this introduce in the distribution,
> >and would it be exploitable?
>
> Good question, and I'm fairly sure this has been analyzed before, but
> I didn't try to dig up a citation.

[Pasted from one of my previous posts; if the FAQ is ever updated, this
should definitely be in it.]

See

J\u00f8rgen Brandt, Ivan Damg\u00e5rd,


"On generation of probable primes by incremental search."

Advances in Cryptology - Crypto '92,

Lecture Notes in Computer Science Vol. 740, pp. 358-370.
Springer-Verlag, 1993.

This doesn't appear to be on the web. A brief summary is that they look
at the entropy of the primes output by the incremental search algorithm,
and show that it is not too much less than that of randomly chosen
primes, under an assumption called the 'prime r-tuple conjecture' (which
is well-supported experimentally).

This does not completely rule out the possibility that there could be
a factoring algorithm that works better if a prime factor comes after
a long run of composites. There's no reason to believe that that is
likely, based on existing factoring algorithms, though, and even if such
an algorithm did exist, it could only increase the probability that a
generated key can be broken by some fairly small factor.

[The same applies for use of primes in DH, etc.]

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO7J3wDkCAxeYt5gVAQEE2wgAiXYL2gbTriqLHFNFzemSqwsPA11SLvyG
D//kDbwAduhPET06TM3VNh5VBvd1RIjlNwUG/QW6upk8JXSiCCsJDBzHTTmfmF3k
IBr90YBkJpTuOYvyZlIPCYC6TyCFsdw7dZJm6UeXwV8Ir/AMk59btxGfYBfoTZ8A
OkyqCPjUmySR2a/WRSLU2W8NLLPEckT/4yKFwzXtr2jSFf/iwD8YmbAX91n4/Pct
0XjaN6A9+McEKKGy4frNTh68enJ18JF3RDeF66/CGnj/NW57nNE4MRX93e09D9Dj
EvgPkN0vu7u5fQ2Zs6TMHNvJSR86OmG0b7QZAiVxpOdRxCx5r3TeDQ==
=khiW
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/XExfzlLCf-s/m/zE0Fmof6cagJ", "n_sections": 100}, {"thread": "Y8lVC6tvwj8", "msg": "spkVF1Ox-ggJ", "author": "David Hopwood", "date_disp": "Aug 30, 2001, 11:10:52\u202fAM", "subject": "Sanity-check my CTS, please?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Keith Willis wrote:
> I have been putting together a driver or front-end for a number of
> encryption back-ends, and got myself in all kinds of mess with regard
> to Cipher Text Stealing. I read the (somewhat brief) description in
> Schneier's Applied Cryptography (2nd Ed), and was still having
> problems.

Yes, that description is ambiguous, especially in the case where the
plaintext is an exact number of blocks.

> I then found a good reference at
> http://home.ecn.ab.ca/~jsavard/crypto/mi060303.htm, and have managed
> to produce something that works.

There is a description of CTS in RFC 2040, with test vectors and
reference code for RC5/CBC/CTS. You could plug an RC5 implementation
into your code (RC5 is trivial to implement), and check that it matches
those test vectors, or you could compare it with the RFC 2040 code.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO42U7zkCAxeYt5gVAQFRsggAy4utwiCKhwJ+o78s1WvkvSeoVtUqDKmz
2NknhGEFFpNvCS+GBc62oJH09+JX9cYHN3PCPQddoOamaMHTTFxC5Xh3pDx0pzxn
b3y0fNW1h6Lav5yDQdHWZpEfXLMcZs5AcWFaNR39hn6m6ZQz1Z6FU/3bmr9LyPBm
8TtjPBxFzKHLAiRGvVKZITV1gRx5FJs2Ew4AH26pnbXCLSdL+l/GAqTyUJzEw/Ty
qLAzoLHuC7XVQAf/GVoKCVcAIIYyeFgWn2cUrxKWd48yQ+T776iKyX3AFxXE5dy8
h1nZUMXit5/zIeqoI2jLsOITSQSUFdWH7dpOemWaDQ2y4Z7W233how==
=WhGq
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Y8lVC6tvwj8/m/spkVF1Ox-ggJ", "n_sections": 2}, {"thread": "ZdK77UzWTsQ", "msg": "D93661_dimgJ", "author": "David Hopwood", "date_disp": "Sep 13, 2001, 6:22:06\u202fPM", "subject": "RC4 weaknesses", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Punchy wrote:


> Paul Crowley <pa...@JUNKCATCHER.cluefactory.org.uk> wrote:
> >Alternatively, you could use RC4 as a hash function (after discarding
> >256 bytes of output) and apply it repeatedly.

I'm suspicious of this construction. Without further analysis, it could
just as easily be reinforcing the initial bias in the keystream, as
diluting it.

> >This has the advantage
> >that if the hash function is collision-resistant then the key
> >stretching is provably strong;

Counterexample: a hash that produces a 256-byte output, of which all but
20 bytes are zero, can be collision-resistant but would not be good for
preprocessing RC4 keys. I think you mean that if the hash can be modelled
as a random oracle, the result is provably secure in the random oracle
model. (But that is really not saying very much, since the problem with
RC4's key schedule is precisely that it does not act similarly to a
random oracle.)

> >but it's not clear whether this helps
> >since RC4 was never designed to act as a collision-resistant hash
> >function.

Possibly it might help somewhat in practice, but AFAICS it doesn't result
in any better provable security properties. It's also not clear that
this is better than spending the same additional effort to discard a
greater length of initial output.

> With security and trying to pump a lot of data in mind, what is a
> prudent limit of RC4 ciphertext to stream before re-keying the session
> key (using the static master and a new non-colliding IV)?
>
> I've heard around 1.0GB. Is this a good figure? Too much?

I suspect you've heard that because of the attack in [1], which shows
that RC4 is feasibly distinguishable from random after about 1.5 GByte
(with 10% false negative and false positive rates). However, technically,
rekeying doesn't change the total length of output required by that
distinguisher, because the bias that is detected is independent of the
key. Rekeying actually improves the attacks described in [2] and [3]
(although those attacks fail if, say, 256 or more bytes of output is
discarded, and the IV is hashed with the key instead of being appended).

Whether these attacks matter for most protocols using RC4 is debateable
([3] is practical, but easily prevented). However, even if not, their
discovery ~6 years after RC4 was published and in widespread use, could
reasonably be interpreted as indicating that it hadn't had sufficient
analysis, at least until recently. If you are worried about them, I'd
suggest using a different cipher, rather than rekeying.


[1] Scott Fluhrer, David McGrew,
"Statistical Analysis of the Alleged RC4 Keystream Generator,"
Presented at Fast Software Encryption 2000, New York.
http://www.mindspring.com/~dmcgrew/rc4-03.pdf

[2] Itsik Mantin, Adi Shamir,
"A Practical Attack on Broadcast RC4,"
Presented at Fast Software Encryption 2001.
http://www.wisdom.weizmann.ac.il/~itsik/RC4/bc_rc4.ps

[3] Scott Fluhrer, Itsik Mantin, Adi Shamir,
"Weaknesses in the Key Scheduling Algorithm of RC4,"
To be presented at Selected Areas in Cryptography 2001, Toronto,
Ontario, Canada.
http://www.crypto.com/papers/others/rc4_ksaproc.ps

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO6ExRjkCAxeYt5gVAQH6kQf7BaZLaxmqspCKFQ8tGmTczr/t+6C+7xqX
0L07HRCnfD9Y9fAFNMFhZ3IzFs+lCasAKyT12ZvNXvicrym+IZdIh568d8KC9VtG
ADAkj//38sUVIuBFPZx8VVGj3YbFJ5EUZABz1TRAneA9L1Qs/okq3Svf+C3Hzdxi
w4T8CZ7ihhIR3HYrMhQ9ovBjcqaxezyEUftz7G2U5xbyF/Qn20+Z1diGKCiH3DmK
xu4bS3JFlN4/aQl80U75qc+wbTOerFm38cGIfcCt0A4goEjfO1k+sISbjWpsTv0s
vUVMgbzXqUH3giuyG7ugjvOiJCf7GIvMyLl2fSTIejhWE1TJ+FKIuw==
=nbL8
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ZdK77UzWTsQ/m/D93661_dimgJ", "n_sections": 25}, {"thread": "ZdK77UzWTsQ", "msg": "AmvkO3Ll95QJ", "author": "David Hopwood", "date_disp": "Sep 20, 2001, 11:11:24\u202fPM", "subject": "RC4 weaknesses", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Crowley wrote:
> David Hopwood <david....@zetnet.co.uk> writes:
> > Punchy wrote:
> > > Paul Crowley <pa...@JUNKCATCHER.cluefactory.org.uk> wrote:
> > > >Alternatively, you could use RC4 as a hash function (after discarding
> > > >256 bytes of output) and apply it repeatedly.
> >
> > I'm suspicious of this construction. Without further analysis, it could
> > just as easily be reinforcing the initial bias in the keystream, as
> > diluting it.
>
> I don't think anything we know about RC4 suggests that it might have a
> weakness of that kind. Any such property would certainly be a major
> and unexpected discovery about the RC4 state evolution.

Probably you're right for RC4, on closer examination. But more generally,
if a cipher has a key scheduling weakness (even if it is IND-CPA-secure),
then it is not guaranteed that using the same cipher as a hash to pre-
process the key will fix the weakness.

> > > >This has the advantage that if the hash function is
> > > >collision-resistant then the key stretching is provably strong;
> >
> > Counterexample: a hash that produces a 256-byte output, of which all but
> > 20 bytes are zero, can be collision-resistant but would not be good for
> > preprocessing RC4 keys. I think you mean that if the hash can be modelled
> > as a random oracle, the result is provably secure in the random oracle
> > model. (But that is really not saying very much, since the problem with
> > RC4's key schedule is precisely that it does not act similarly to a
> > random oracle.)
>
> > Possibly it might help somewhat in practice, but AFAICS it doesn't result
> > in any better provable security properties.
>
> I did mean collision resistance; the paper on key stretching proves a
> strong relationship (Theorem 1) between the collision-resistance of
> the hash function and the difficulty of brute-forcing key-stretched
> keys.

OK, but brute-force isn't the only possible attack.

I think you're talking about this theorem, from "Secure Applications of
Low-Entropy Keys" by John Kelsey, Bruce Schneier, Chris Hall, and David Wagner:

# We say that an m-bit hash function H() is strongly collision-resistant if
# the best way to find an unknown collision is with a na\u00efve birthday attack.
# ... we add the additional technical requirement that a na\u00efve birthday
# attack is likely to find a collision for H().
#
# Given these two properties of H(), we have the following result.
# Theorem 1.
# If H() is a strongly collision-resistant hash function that admits a na\u00efve
# birthday attack, then computing the i-th iterate of H requires time at
# least i/2.

This is fine as far as it goes, but it doesn't prove the security of the
encryption using stretched or hashed keys, under any standard assumption
about the cipher. For example, IND-CPA and IND-CCA2 only require that a
cipher is strong except with negligable probability, when the process used
to choose keys is indistinguishable from choosing them uniformly and
independently at random from the keyspace.

> However, your counterexample does show that RC4s key scheduling
> is so weak as shipped that discarding some output bytes would be
> necessary in any case.

I'd argue that protocols generally should not assume security of a cipher
with arbitrary key distributions. Instead, they should make sure that the
key distribution is uniform IID. In this case (and for key stretching),
proving that seems to require a random oracle assumption on the hash.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO6qumDkCAxeYt5gVAQG9tQf/f2bXo2njTVkqQxaWF9t6NEF+RHgEpwbf
5yBgzO2NwNPjTJKYDs5+CEhR/7GXHhpphTlboLSb1af4sYMEhqCMYTWMWyEu73hn
oo1tgeUwbdSu3YEIWKQMsAAM8L3ojInRVDSBh9dlm8pwEm6k5NjNm64HB+lFYdlP
e3IW4jW7mdjj8VCXvdNrfaxi2YOX7L1QTMovlRgttO0S5MYyLOK+fMVYZ6T7RlTY
dAel9rYAOHJso+UeL8hHraBrQ7jyPZ/GHrIgA67PRdEgHLJ1a60fsiJ0l0duGotR
t5LAHqp97FWOv+suv9ctA1fvWdWc0bm3GKvHe6N0jB0IqjMJOJ1whw==
=bEOb
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ZdK77UzWTsQ/m/AmvkO3Ll95QJ", "n_sections": 25}, {"thread": "dPl9tqZZHo0", "msg": "yqjsAbN1gvoJ", "author": "David Hopwood", "date_disp": "Aug 19, 2001, 8:31:26\u202fAM", "subject": "Coding Help... [algebraic stuff]", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
> Tom St Denis wrote:
> > Mok-Kong Shen wrote:
> > > Tom St Denis wrote:

> > >>Mok-Kong Shen wrote:
> > >>>Excuse me for my ignorance, but are there Galois fields
> > >>>that are not generated by some polynomials, i.e. cases
> > >>>where such defining polynomials don't (can't) exist?

You mean "Are there Galois fields for which there does not exist
a polynomial basis?" No, there aren't.

> > >>In general yes. [Note] that GF(2) is a field and has no associated
> > >>polynomial.

Yes it does. For example, x + 1 (with coefficients over GF(2)) is a
suitable basis polynomial in this case.

> > > I believe that your last sentence is in error. In one book
> > > I read the following:
> > >
> > > Every Galois field GF(q) has at least one primitive
> > > polynomial over it of every positive degree.

That statement is correct, but unrelated to Mok-Kong Shen's question
(it is saying that there exists a primitive polynomial of degree m
with *coefficients* in GF(q) for every m > 0).

The statement I think you were confusing it with is "For every
Galois field GF(p^m) there exists a monic primitive polynomial f(x)
of degree m over Z_p such that GF(p^m) is isomorphic to Z_p[x]/(f(x))."
That statement is also correct, and it makes the point you were
trying to make.

> > Yes, in that case the polynomial P(x) = q*x^0

No. This is not primitive, but more fundamentally, it is not a
polynomial with coefficients in Z_p. (In Tom's example p = q = 2.)

> If I don't err, the definition of primitive polynomials
> in the literature requires that the degree be at least
> one, though.

No it doesn't. Many references (e.g. HAC) only discuss polynomials of
degree >= 1, but that's not the same as requiring the degree to be >= 1.
As it happens, there is exactly one primitive polynomial of degree 0
over the integers: f(x) = 1.

General cryptographic references are not a good source for definitions
of corner cases that are not normally useful in cryptography, so let's
look at the definition of an primitive polynomial from a reference
that I trust not to oversimplify things [Coh96]:

# 3.2.3 Polynomials over Unique Factorization Domains
#
# Definition 3.2.7. Let R be a UFD, and A \\in R[X]. We define the
# content of A and write cont(A) as a GCD of the coefficients of A.
# We say that A is primitive if cont(A) is a unit, i.e. if its
# coefficients are coprime.

and the definition of a unit:

# Definition 3.2.3. Let R be an integral domain (i.e. a commutative
# ring with unit 1 and no zero divisors). We say that u \\in R is a
# unit if u has a multiplicative inverse in R.

In this case R in both definitions is Z (the integers).
So cont(P) = gcd{q} = q >= 2, which is not a unit in Z, since it has
no multiplicative inverse in Z. Hence P(x) is not primitive, and more
generally f(x) = c is not primitive unless c = 1.

(Note: [Coh96] defines a set S of UFD elements as being coprime iff
gcd(S) is a unit. I.e. it doesn't count a set containing only one
integer != 1 as being coprime.)


Mok-Kong Shen also wrote:
> I guess that I have figured out why a primitive polynomial
> is required to have a degree of at least 1.

It isn't; see above.

> If one had allowed a constant (1) to be a primitive polynomial,
> then the field generated would have had only one single element,
> which is impossible for a field.

The fact that a primitive polynomial can be used to construct a
polynomial basis for a finite field is only a consequence of the
definition; it is not the definition itself, so this reasoning
isn't valid. The case of polynomials of degree 0 is not actually
relevant to existance of polynomial bases, anyway, because a
basis polynomial will always have degree >= 1.


[Coh96] Henry Cohen,
"A Course in Computational Algebraic Number Theory,"
Springer Graduate Texts in Mathematics,
ISBN 3-540-55640-0.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO3+wTDkCAxeYt5gVAQFJtwgAvS06ItnEKKSIDmpc4o60/rMW+PNFiWTP
OqRPs9VBvqOZTKq5taGCcHLrIpdlzVfu1NEz73+jMIbTjj7H2no6UA2EIUm0q3am
XjjAKBZQVKTKtVI1TwN1KAE7n9G7id35Bw2JVq8DUQvmvBqkXzIirHzDinF5Q4or
2bGq8wBILUxSoUrbdRpPlqoY/FCK7Xz/FEWUGQLh6WtZUb/BxKPXmU21lnEwqXPM
Q9C6m45IZZA9SntltWyiPmrwf/HkRRcGVWhernt2LGHDGE9Cn85dAW5GORtBoHKP
8ZfwzeGnVr+OKfPK4FlDyX+eD6zIWIc+qRk3TM50nE47dEQqN+yOjA==
=9CLY
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/dPl9tqZZHo0/m/yqjsAbN1gvoJ", "n_sections": 17}, {"thread": "fEC7BzYlWk4", "msg": "CJEafiTB_4sJ", "author": "David Hopwood", "date_disp": "Sep 9, 2001, 5:53:49\u202fPM", "subject": "David Scott's CTR argument", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> Ok let's review the basis of his arguement.
>
> CTR mode has the property that a 8-bit message maps to a 8-bit
> ciphertext. This means the attacker knows given 8-bits it must have
> been one of 256 possible plaintexts.
>
> He even goes on to admit that all plaintexts are uniformly distributed
> and no a priori distributional bias is known. This means the plaintext
> is not known.
>
> So far this is all true and/or plausible.
>
> He then goes on to claim that BICOM is more secure since all one byte
> messages will have 2^n possible mappings where n=keysize. A property
> that is achievable using CBC mode [say n=block size too] with unique IV's.
>
> He claims given the n-bit ciphertext you cannot determine if it was an
> 8-bit message or a n-bit one [i mean plaintext].
>
> The problem with his claim is that it's irrelevent. As long as the
> possible texts are uniformly distributed it doesn't matter the size of
> their set.

No, that's simply wrong. The size of the plaintext does constitute


information about it that the attacker may not otherwise know, and leakage
of that information should be considered in any security analysis. There
are some real-world protocols where leakage of length information can lead
to devastating attacks (mix-nets, for example).

The problem with his argument is that he claims that BICOM hides length
information. It doesn't: the length of the ciphertext is still strongly
correlated with the length of the plaintext when using BICOM. Padding,
OTOH, can be used to fix the problem, and can be applied to any mode.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO5uvrTkCAxeYt5gVAQGKgwf/QcHOIqE0xDcFKOs6gOi5OHGBqWKyWB9v
Cvrb6u8zbYH5zhxhTrliPguMHzwuUc5GRCkWWWAnM6/Ly8wCWY0TqCn5gLaFpOHw
1tMnVOsb6Dhq4W0R2gb3ZISUCedp5suXcLoyRl1fXX9JCDqgcb/dzNvyI2sCK9Lc
DhQ5WnvYfCrQAE2TK3MrxpeBm+dr3L1UsSHaNJqyu6/KEyRgA/ggTcgQRqKW3cun
nXUlXzRpslD5niASd8t138GP7RjrebekQwyUmbpEvk08Bt5i/7NbyGaWreJKCBzG
5T8E1yLhGEr8BeuZ5r7mTO4mHHXlD5+P7e2R/v1VED6G0lpk5BXAkw==
=0/uf
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fEC7BzYlWk4/m/CJEafiTB_4sJ", "n_sections": 8}, {"thread": "j9x3RjNfkiE", "msg": "2AdAx_WTWa8J", "author": "David Hopwood", "date_disp": "Aug 31, 2001, 2:33:30\u202fPM", "subject": "PRONO BY JOHN", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
> John Savard wrote:
> > It was the right link originally. Some domain name companies do this:
> > when a rented domain name is no longer valid, they point it to a porn
> > site.
> >
> > I feel this is a despicable practice.
>
> That's indeed a very despicable practice. If you were in
> a country like Afghan, I am not sure that you wouldn't
> get problems with the authority.

If he were in Afghanistan, he wouldn't be able to access the Internet,
never mind put up a web site.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO4/YSzkCAxeYt5gVAQHRaQf/aOywerOt70Cz0DFMJ2J3n1RRZJNAP6Vd
qLoobFz6ryjhn3AvqqJWKbo089bs4a3oiIwStMfzxVg0+uBCdnD1kP5peJiNxal7
LeG0tUFsQArZzsq3vJWIFw943bYpxiWgNzevBjpZswFQq6RiM6iU0/HeYBJQ+Ipd
lAS/RkRXLafoGFl3ZfJ4MjiUuuXocsvtGh064iAjWvX3D3xcwrNb4/hpTbfuPBxJ
agklqcjmZu6sQPmE89YkQldf3I3/ghrWFigssu69+nM32wuo0EVr4jKBLxfTkTb3
hcdWcf6kW0ZzEsSe4D7OwzebC7BFBHH/dQ8OGngp03YlP0g3Y6f2iw==
=367t
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/j9x3RjNfkiE/m/2AdAx_WTWa8J", "n_sections": 10}, {"thread": "kQb_skxgMEI", "msg": "FcShqpF__WIJ", "author": "David Hopwood", "date_disp": "Aug 15, 2001, 4:57:03\u202fAM", "subject": "Skipjack question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Douglas A. Gwyn" wrote:
> Tom St Denis wrote:
> > What's up with the 10 byte key?
>
> The simple answer is that actually it is 80 bits.
> The subdivision of those into 8-bit octets which are
> byte-addressable is an artifact of the computing architecture
> you're using.

Almost all modern ciphers, including SKIPJACK, have keys that can be
unambiguously specified as octet sequences (section B.6 of the published
SKIPJACK specification says, "The cryptovariable is 10 bytes long...",
where "byte" is defined to mean octet). Most ciphers, including SKIPJACK,
don't specify any interpretation for keys given as bit sequences - each
octet value is an integer with indeterminate bit ordering. So the
subdivision is not an artifact of any computer implementation: it's part
of the definition of the cipher.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO3o5IDkCAxeYt5gVAQHCIQf/YCnEu+OYPrtEeEXpFmwOtHueQogwCnIp
8uh8a78GA78J0VfjtkEwnJ52gGLuPL9fVPLfqnVGJv6aGfS0uavzYQH/Ut5GZALd
IUHVBIwVKhqb2O4h/MFH9rTl74DvjAHzcjcrDJaSoSghYrrg0xbxXzPEZORKY1TZ
BSk7AXNinuET2VNKhPq8uDqJLEkUTnf3i8ru7Q4XoJ70kzqIc/M03tzmjVkyJfUR
gWZTSk7Qm5QJLrPSrt73VQCXHREW3d2xYKLChajHBq6UwA91Y72uufSLS8cmjl0B
sd4F43eFxZ5+E791EhsWn1y0sbRlB1bq4jU8SAofq3KxtkAjMFE3OQ==
=qKfc
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/kQb_skxgMEI/m/FcShqpF__WIJ", "n_sections": 16}, {"thread": "ltBTQ17AubY", "msg": "SwVpueEt1_4J", "author": "David Hopwood", "date_disp": "Sep 15, 2001, 4:48:09\u202fPM", "subject": "massively iterative reencryption as a delaying tactic", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Julian Morrison wrote:
> I am hiding messages encrypted with a publicly known symmetic key(PKSK)
> amongst many messages encrypted with secret symmetric keys(SSK). This is
> because the PKSK messages contain inital DH exchanges where no secret is
> yet shared.

How does that help? For the initial exchange, you're only slowing down an
attacker by the same amount as a legitimate user, which is not useful.
Remember that it's normally assumed that the attacker could have significantly
more computing power than the legitimate parties.

> For good guys, they know when they are expecting an SSK mesage and will
> only fall back to trying PKSK if the sender is unknown or the message was
> garbled. For MITMs, they must try all messages since they won't know who
> has already set up a secret.

Not necessarily; for example timing information may leak which are the
initial exchanges (unless you also slow down non-initial exchanges, in
which case you haven't gained anything relative to the attacker).

[...]


> Preemptive note: I've looked into and already discarded
> signature-authenticated DH such as station-to-station protocol. It is
> useless here beceause the intended use is massively stranger-to-stranger,
> and there is no authority trusted to act as an introducer or
> signature-cert issuer.

If the intended use is massively stranger-to-stranger, what is it that
you're actually trying to authenticate? If it's just that "this is the same
stranger I was talking to earlier", then that's easy, and you have no MITM
problem. If you're trying to authenticate something else, we need to know
what it is in order to suggest a reasonable solution.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO6O+ODkCAxeYt5gVAQGOCQgAhO4Kg8MUs8gB3tj/0hlnkc8ZWFmdYaVq
cmoTQxps7wEEEFx99I41gYwe9qVk8Z1HBScumgzgE6J2goeHkIJYN079znBhcn9p
i4xg78YVsXosdBGXuzWP9Oi0tVwyUUrDkbNcCKcKthJpFb7S5W+HL/l4DD6swMzw
G9DiLhycXlimgQ//k0pFLYD0bF2Xnq45AQ5+u20nXMWl7Yvi06HzH8vsGFoObHLb
iCGOj2LwAwY9ieePWEFgQd4bB5hOJyx0ynQV/u9M10vlT5wdWykBhqsabrmudD1f
THJtMRmR6lS23EuN8yiiCYyxjdSDECuRomsnxjdm89cBzMAXqcpUjQ==
=H46B
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ltBTQ17AubY/m/SwVpueEt1_4J", "n_sections": 21}, {"thread": "x3XZ3NmbtS0", "msg": "Zc7rjK90C2UJ", "author": "David Hopwood", "date_disp": "Sep 11, 2001, 7:32:06\u202fPM", "subject": "America Struck by Terrorist?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Simon Johnson wrote:
> Already people are asking for better controls at passport control
> areas. We're still piling on the preventitive measures and not being
> able to do something if a plane is hi-jacked.
>
> If control of the planes was handed to the air traffic control
> automatically when a "hi-jack" switch was thrown, then they never

> would have been able to launch this attack successfully.

There is clearly a lot to be nervous about in introducing a flight
control system that intentionally cannot be overridden by humans on
the plane. It would presumably need to transmit all instrument
information and the view out of the cockpit to the ground, and be
able to override all of the controls normally accessible to pilots,
and that would almost certainly end up being extremely complex (not
to mention requiring high-bandwidth reliable communications).
A significant limitation is that if only some planes are fitted with
such a system, terrorists would hijack those that aren't - so all
large planes would have to be retrofitted for this to be effective.
That's not so easy, to put it mildly, on planes that were not designed
to be fly-by-wire.

ObCrypto: if such a system were introduced, it would obviously require
cryptographic authentication of the override control protocol, with
considerable attention paid to the security and robustness of the
software involved. To reduce the scope for "remote hijacking" in case
this goes wrong, it could be required that a silent alarm must be
activated from the plane first. Even so, this idea trades one set of
risks for another, and I'm not convinced the overall effect is beneficial.


It might also be useful (not just for crashes due to terrorist attacks)
for "black boxes" to broadcast their data as a radio signal after a
crash, rather than always having to be physically retrieved.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO56cqjkCAxeYt5gVAQFosggAyTw8ZnXgixOwfPDLshTcTz0u6+XNi0o8
HNTtj7leHN8nNzyOoGcWhf+GWDWEipbhZd65kPVe4Jh3VL13hJGFl/yEeYbn2HhO
TS6sLrEW4d5+y7GsGMtC4E1UIkaGZrtJEpcB9GRSS/cfDeGOPoLJhJvNBh8S7MSR
Jx+C884nKzWTs5zTcd5Ujl4EpYezbkkQ+47Y4A+lhuFFz/2SyALUcseONtSddS6w
vZFl89+kZkHQ+QdkgkSVlF5Hp4I2XR1UOgoV/C0EwPZsfMDkIwYmnHuGc6NM2NSj
ge3b4rQRHeySoN6bR9dw4j93oMZ7xs5JF1Pz2jaycMt3HutUWRqaSQ==
=7Kse
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/x3XZ3NmbtS0/m/Zc7rjK90C2UJ", "n_sections": 100}, {"thread": "xVxnwLxkomk", "msg": "xHWhBDYL3e0J", "author": "David Hopwood", "date_disp": "Aug 26, 2001, 11:13:29\u202fPM", "subject": "All Or Nothing Compression", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Not a good idea. If you design the compression and AONT separately, then
the compression can't reduce the security of the AONT [*], and the design
of the AONT won't result in any compromises in the compression ratio,
speed, or memory usage of the compression algorithm. You can also
independently choose an AONT and compression algorithm suited to the
application, and use existing well-tested code for each. There is little
or nothing to be gained by combining them.

IMHO, as a general rule the design of cryptographic and non-cryptographic
algorithms should be kept separate. It is hard enough to analyse protocols
when that rule is followed; not following it just makes analysis harder.


[*] apart from the fact that the length of the output is dependent on the
compressed length, as opposed to the original length of the input,
which may leak some information about the entropy of the input.
If that is an issue then padding should be used.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO4m6vjkCAxeYt5gVAQETtwf+Nsl3yrdCw2rgSctFCHq4O/KQUGRhSX20
Pkne0725LbA4OQwvoThW4IY3ivQNJr2puLu1HfC539B3q2jS1r6vpmqcFVAhurG+
aHQs1lmh60H8qYYb66u0g6DDTsewmaE7NA/WqXSrORY47v8vau7WEJZXyWB+tDsw
voapqip1IMKS8AfG/hQ1BYnvovp6Hb0o7DB0MuzSTVWI8gfEHxL+WNVPxVbzAoVM
w6dFnGtRRYcbuIB1iNJvg6Z2za16jKK+Eixbd74qeC2a3wkBtPX2i81qjMJeSG7h
l6g00b2rm9XDkFJXNOnIyZ5IRnlMQw+EXgn2E/OvW1d+cTAK2iA5Yg==
=WWaf
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/xVxnwLxkomk/m/xHWhBDYL3e0J", "n_sections": 5}, {"thread": "xVxnwLxkomk", "msg": "aljon3nyhg4J", "author": "David Hopwood", "date_disp": "Aug 27, 2001, 11:02:02\u202fPM", "subject": "All Or Nothing Compression", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"SCOTT19U.ZIP_GUY" wrote:
> david....@zetnet.co.uk (David Hopwood) wrote in
> <3B89BAD9...@zetnet.co.uk>:
>
> >[*] apart from the fact that the length of the output is dependent on the
> > compressed length, as opposed to the original length of the input,
> > which may leak some information about the entropy of the input.
> > If that is an issue then padding should be used.
>
> Maybe I miss read what your trying to say. But compression if
> done correctly lengthens the Unicity distance. So it helps in
> general.

Yes, it does, usually. However, the statement that this was a footnote
to, said that using a compression algorithm and an AONT that are designed
separately cannot possibly weaken security, relative to using the AONT on
its own. That needed to be qualified, because using any compression at
all means that the output length depends on the compressed length of the
plaintext - and it can't be ruled out that for some protocols, that might
be more of a problem than leaking the original plaintext length.

I.e. a short output means that the plaintext compresses well, and that is
information that the attacker might not know otherwise.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO4sJfjkCAxeYt5gVAQGX9Qf+OyHYMhk/t1VQ58JjGaNtAx+bx+vTV5f1
VEtTAEQ/GzcJL5Kz/aJh6BjOhNAGe1KT7lTJz3Z1HVGr1Cmunkg+iTgqphnYvjZt
1sCC/oIhM7dmvJHyU2VVPwivMegv3xmi7MxOUPGEIU4jt9X+e/QLBWRjPtR6Qutq
j47oJCzElSA8+eCxsz4yDUu7KGE0kXcSTFLAeMK8/qrbpjGIfbdMm6id+x0HQChc
nCWf9tX7pCW1hB4jN5XJD0+iEgYJibK6/tzE2m6mtKxQT4C8PaLne3scUoKqJFm9
VsAAW7WFUm81MIFGKK48AjrGXKyqN2mfa2jEecH10fQJeSPwvEMA1w==
=tdDL
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/xVxnwLxkomk/m/aljon3nyhg4J", "n_sections": 5}, {"thread": "-c8cmdNFvxM", "msg": "TFD0zBq1VloJ", "author": "David Hopwood", "date_disp": "Oct 16, 2001, 1:29:00\u202fPM", "subject": "RC4 license?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Bill Unruh wrote:
> In <9qho9i$7ov$1...@nntp9.atl.mindspring.net> "Roger Schlafly"
> <roger...@my-dejanews.com> writes:
>
> >Daniel <auto...@hushmail.com> wrote
> >> I have a simple question, which I hope you'll be able to answer for
> >> me. If I were to implement the RC4 algorithm, do I need a license
> >> from RSADSI?
>
> >No. RC4 is in the public domain.
>
> No, RC4 is not in the public domain.

If, for the sake of argument, RC4 were the same algorithm as ARC4, then
the RC4 algorithm would be in the public domain.

Note that everyone who has seen source code derived from RSA Security's
(formerly RSADSI's) implementation can be certain about whether or not
RC4 is the same algorithm as ARC4. Draw your own conclusions.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO8wriTkCAxeYt5gVAQE6Uwf+Ji5dxcSrOq4LX0aMgrBJ/PdZ54+4DgTK
08j4rdNhiHvhf9qtgy50z7qnPr2Y5uNj7X+Z5KFKbz+ZyX1pSqM5QTvJUMnoGZ0N
9rzggDs4ADz5jabw19cFF5A3cfdPOdWQb6kmoZWKmuXjAU3qnaR3YSHI9Ayhxj6K
ggjEBfyqAHhaTfRzuOfi3jVA9Evyg92gqW0LWgu6Sfyq2T9+TBQtBQerGIx9S6iS
skrTmg/wc+Cwitq1+Rr+wzcXpPRp0OhiKRzqi1wdVnCKr5jdDHuMrhNhksi/Kg+w
cx6AI8Xp6oI52oySZYhyFx4l5al2cQz8WljqfWfx3Tfs5Ft7VarnRA==
=ud2o
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/-c8cmdNFvxM/m/TFD0zBq1VloJ", "n_sections": 59}, {"thread": "5_RzBCJLWBo", "msg": "u60TLsrbpn8J", "author": "David Hopwood", "date_disp": "Dec 18, 2001, 9:41:11\u202fPM", "subject": "place to publish result for review", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

By all means post it here. Ignore the response from Tom St Denis; it's
both inaccurate (everything you've described above is possible) and
unnecessarily discouraging.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPB/+NDkCAxeYt5gVAQFSuwf/XnTgxHKyiycg6kqCj2ahKLWLt4YUi/SL
XgqDOgTUfJM/3pXqAFMeIhkwoheyZAJukVxdffHChxMJcVETOeTddwCabA6mLd2t
UzYvccWJn78aC9mboGc4Q7YT0iX97gVp0y7uTWXc8pQniGu/BDDB97I0GTl6dTZo
J4bsm72u6L0AbVnLAZvWFRQ30gtbFNESAQkyYqk8ppTAR/Kr5tgmSt1W0nCPGKcA
crA9acQ8aABs+zouTR7/moUrgpXdltXirFPKCfpTTTcexS4/tRmITBSQhadBd7kq
eCTp8i7iiT5oOxLz6wxwbDYNF3ZmQp8gMYkdHy7B4fDmF7zDWgIvgQ==
=mUrr
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/5_RzBCJLWBo/m/u60TLsrbpn8J", "n_sections": 5}, {"thread": "7C5pWoXH5sU", "msg": "TrdQH5qFbm4J", "author": "David Hopwood", "date_disp": "Oct 22, 2001, 12:58:30\u202fAM", "subject": "Cryptanalysis of TEA Extensions", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Wagner wrote:
> D. J. Bernstein wrote:
> >Related-key attacks have no relevance to properly designed protocols.
>
> This is true, assuming ``properly designed'' means that
> the protocol does not assume anything about the security
> of the block cipher against related-key attacks, but sadly,
> all too many protocols aren't properly designed, when we
> take this definition.
>
> As a result, the following view might be a reasonable one:
> Given that a non-negligible fraction of our protocols
> implicitly assume the cipher is secure against related-key
> attacks, it might be prudent to aim for both of the following:
> (1) use protocols that don't give the adversary a chance to
> mount related-key attacks on the cipher; (2) use ciphers that
> resist related-key attack.

I almost agree, except that I think (2) should say "*design* ciphers
to resist related-key attack". If we have a protocol that demonstrably
satisfies (1), then there is no need to require it to be used with
a cipher that resists related-key attack. (That requirement would
immediately exclude 3DES, for instance.)

Note that is is not particularly difficult to show with adequate
confidence that a protocol satisfies (1): in most cases it should be
sufficient to ensure that keys are chosen either independently at
random using a secure RNG, or as the output of a cryptographic hash
function.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO9OnTTkCAxeYt5gVAQFAxgf/YKP8A8Lyq6vtlWR+hfyw42FcSQHX6m9a
nLQDAZjxFfLgbLAd3gtfzwiQqPozqjuurb6ZHPYqmYrJWJWtgK9jTpnKkqs65v1e
DJ+8iwq1K3rp0wp8YW/nfXhMWchwDJqhCcG8I3/XTvM7+ei6Ywr2Rf//3JdGa8g6
UOrfROPip336xOaGeN8lib7JpN6VzBP36NPyi+wAztg7qs8wmIgndMIvWCpPMrw8
I/j+6jthVY6gznN27je0URGK7LpU/QrBNyRhGuZhTQoe22yxGBd7Y3W6W24xAaaS
/T1qrtgy91ikE4/CtyQfJmPSF2/lg29ARQ2yQmWFycZKFgZrK21M8g==
=bcZ0
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/7C5pWoXH5sU/m/TrdQH5qFbm4J", "n_sections": 100}, {"thread": "7C5pWoXH5sU", "msg": "Qmvh2nQaqeMJ", "author": "David Hopwood", "date_disp": "Oct 28, 2001, 9:52:09\u202fPM", "subject": "Cryptanalysis of TEA Extensions", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mark Shelor wrote:
> "D. J. Bernstein" <d...@cr.yp.to> wrote in message
> news:2001Oct2510...@cr.yp.to...
> > Here's what bothers me: Simple, small, fast ciphers, perfectly suited
> > for standard protocols, are discarded on the basis of a criterion that
> > has no relevance to those protocols. Performance suffers.
> >
> > Even if there are some applications that need related-key security,
> > there are many other applications that certainly do not.
>
> This is really the heart of the issue. Indeed, when performance
> suffers--or, when complexity increases beyond comfortable limits--then the
> practical application of these ciphers and algorithms suffers greatly.
>
> Network management is a classic example. The secure standards-based
> protocols that exist in this area are slow, complex, difficult to
> understand, and difficult to administer. Consequently, their use is limited
> primarily to very large or very wealthy organizations that can afford the
> staffs necessary to understand and operate them.

To the extent that this is true, it has nothing to do with the choice
of cipher.

[...]


> A small, fast cipher like XTEA would be ideal for use within the framework

> of network management, ...

XTEA is not especially fast, and code size is pretty much irrelevant for
this application.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO9zELzkCAxeYt5gVAQGLiQf/Z+SVg9bh/m2cvCxwLdfsuHZpXvAgSfkD
k963vnFjzhBhDNDA2OVwLKQz91XCib4WilchstKb1fa5PqwWt2hxv2hh47z2mqyg
Ov9LQd+lmXhKmUyx5K/UbErqRKJ60P3Uv7QexEeaU5CloJDxrb/xWEequqnrSsGG
C88BCIG5VKmIVcXQhM5hycuxgRTppcOapxBrJakGhnqBtoduKEEarm0Ikn/ETcSW
UtH9Ea5eyg7SywAxUk2yHvMyGBd3OQ1GxTNFBD275re5/k2kmuZ2NHJXc4nb7ifj
hWKsjowBPYYhEsnm5BkKDEQqroDgYhk7IRg/uT0JygiY6+tPl2+1Eg==
=msMg
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/7C5pWoXH5sU/m/Qmvh2nQaqeMJ", "n_sections": 100}, {"thread": "7iDn9i3PyEg", "msg": "5E9sQbupBoAJ", "author": "David Hopwood", "date_disp": "Dec 29, 2001, 11:33:12\u202fPM", "subject": "AES and the definition of 'octet'", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Douglas A. Gwyn" wrote:
> Brian Gladman wrote:
> > In fact a great deal of effort in writing the AES FIPS was devoted to
> > AVOIDING any concept of numeric significance

Then all that effort has been counterproductive.

> > because all AES bytes represent
> > finite field elements and this means that they (and their component bits)
> > have no numeric interpretation and hence no numeric significance of any
> > kind.
> > The critical section of the FIPS in this respect (3.2 in the FIPS, 1.2 in
> > my FIPS input) took several weeks to get right precisely because Joan
> > Daemen and Vincent Rijmen wanted to ensure that there was no possible
> > numeric interpretation of this critical definition of a 'byte'.

Why on earth would they want that? An octet value is defined as an integer
between 0 and 255 inclusive, and 'byte' is a synonym for octet here. So a
numeric interpretation is absolutely essential for interoperability. All
architectures, protocols, and programming languages that use octets have
a well-defined mapping to this numeric definition [*], but most do not
specify any mapping to bit sequences.

The convention used for the hexadecimal notation implies that bit 0 is
intended to be the least significant bit within each octet (and that is
what the Rijndael reference implementation assumes). However, it's
impossible to specify the interface between AES and any real-world system
that uses octet strings without mapping the elements of GF(2^8) to integers,
and so this mapping should have been stated explicitly in the FIPS.

(A mapping to bit sequences is not needed at all, and is simply confusing:
for example if we use a serial comms protocol with little-endian bit ordering,
such as RS-232, a sensibly defined system will end up with the bits in each
octet being transmitted on the wire in the opposite order to that defined
in the draft FIPS.)


[*] Java uses a signed "byte" type, but its I/O and crypto libraries
consistently assume that octet values 128..255 are represented as the
integers -128..-1, i.e. using twos-complement.

In C and C++, most of the standard I/O library functions for binary
I/O take "void *" arguments, and casting "unsigned char *" to "void *"
is guaranteed to implement the correct mapping.

Neither Java, C, nor any other programming language I'm aware of,
define a mapping from bit sequences to their preferred types for
representing octets.

> > As a result this section was worded in a way that ensures that it is
> > bit enumeration alone that identifies AES bits. Hence, for example,
> > this section does not refer to the most/least significant nibble (4-bits)
> > in a byte but instead to the 4 bits with the highest/lowest enumerations.
>
> Unless it ties this to the rest of the world, which amounts to
> identifying where the least-significant bit of the integers used
> for "enumeration" will fall with respect to everything else on
> a computer (e.g. which one goes first in time when transmitting
> an octet over a serial communications line),

Which bit goes first in serial transmission is completely unimportant -
the relevant serial transmission standard determines that, not the AES
spec. The paper [Coh80] (which defined the terms "big-endian" and
"little-endian"), referring to bit transmission order, said:

# Wouldn't it be nice if we could encapsulate the byte-communication
# and forget all about the idiosyncrasies of the past [...]?

and in fact that is precisely what has been done in all modern protocols
(and also storage media): bit ordering is left to the physical layer,
and higher level protocols are defined in terms of octets/bytes.

To be compatible with this approach, what needs to be specified for AES
is how plaintext, ciphertext and key blocks correspond to sequences of
octet values, where each octet is an integer in the range 0..255.

In another post, Doug Gwyn wrote:
> So if the description is truly in terms of
> 8-bit units, the only thing we really need to know is where the
> AES bit 0 of a set of 8 falls within a computing-industry de facto
> standard 8-bit "byte" (stored or transmitted container for an octet):
> it it the l.-s. or m.-s. bit? Other (scrambled) bit orderings
> within the byte would serve no useful purpose.

Bit 0 is the LS bit. I.e. what the spec needed to say is that the field
element

b_7.x^7 + b_6.x^6 + b_5.x^5 + b_4.x^4 + b_3.x^3 + b_2.x^2 + b_1.x + b_0

corresponds to the octet value

b_7.2^7 + b_6.2^6 + b_5.2^5 + b_4.2^4 + b_3.2^3 + b_2.2^2 + b_1.2 + b_0

All the implementations of Rijndael I've seen assume this interpretation.
In fact the Rijndael documentation specified it implicitly in the example
in section 2.1:

# A byte b, consisting of bits b7 b6 b5 b4 b3 b2 b1 b0, is considered as
# a polynomial with coefficient in {0,1}:
#
# b_7.x^7 + b_6.x^6 + b_5.x^5 + b_4.x^4 + b_3.x^3 + b_2.x^2 + b_1.x + b_0
#
# Example: the byte with hexadecimal value '57' (binary 01010111)
# corresponds with polynomial
#
# x^6 + x^4 + x^2 + x + 1.

Here "hexadecimal value '57' (binary 01010111)" refers to the integer
0x57, which makes the intended mapping to octet values unambiguous
(although an explicit definition would have been better).

However, as Brian Gladman says, the FIPS carefully avoids defining any
such mapping, misguidedly IMO. Implementors shouldn't have to guess based
on the convention for writing field elements in hexadecimal. I hadn't
realised that this had changed from the Rijndael spec, otherwise I would
have made a comment to NIST.


[Coh80] Danny Cohen,
"On Holy Wars, and a Plea for Peace,"
IEN 137, 1 April 1980.
http://www.op.net/docs/RFCs/ien-137

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPC6Y+DkCAxeYt5gVAQFr9ggAkONr/tDAHQX/YwInlLQx8y2wNnbG9vsa
ajUgw+7GvhurkmO8Iz3Yhy1qVRR3LUG5z3YXbrCFD5bmZ2RlGuz9ruoo3MDhDnQ1
ohZOPA/1RYSATwITa/CHh/yQiND5lQbSvqqBBo5jmr0lb+t3podZLa2l+ohDx94D
RG3YcgtAAMpIoq/WWLSLcBBELNWe/6CVVuwYt+MIIboo0bf36JTsTkrQODCm8di5
m4l042F4hD4EvVWUZdgEaUS2+YID+f6oBYiQ7sotzl/rsIa2QhncctCMY+35rp6p
KYWgdO57+hwI4svE7ntSb/o4qdCwiIS/SjuJdfmJAPns90bZHo5hlQ==
=O1Nb
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/7iDn9i3PyEg/m/5E9sQbupBoAJ", "n_sections": 62}, {"thread": "7iDn9i3PyEg", "msg": "MtayrNIzT4oJ", "author": "David Hopwood", "date_disp": "Dec 30, 2001, 2:01:46\u202fAM", "subject": "Bit ordering", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Bryan Olson wrote:
> Mok-Kong Shen wrote:
>
> > I am confused and hence a trivial question: In normal
> > numbers written on paper, the most significant digit
> > is on the left. What's the difficulty of having the
> > universal convention that for a block of plain/ciphertext
> > AND for a key the binary sequence is defined to be
> > such that the MSB (higher numbered) bit is on the left?
>
> Good question and the answer is somewhat sad.
>
> If you check most any crypto spec, your convention works. DES is
> defined on a 64-bit block, and everyone agrees that given the input in
> the form of eight octets, the first bit in the 64-bit DES block is the
> high order bit in the first octet.
>
> But alas, it doesn't always work. When sending octets across a serial
> line (meaning bit-serial), the low order bit is almost always first.
> Thus the bit order one uses on stored octets is not the bit order one
> sees in a serial transmission of those same octets.
>
> I know of no crypto algorithm specifications which violate your
> convention. I would not be surprised if someone can point one out.

HAVAL, Panama and Tiger (and possibly RIPEMD-*, IIRC). These are all hash
functions that consider the least significant bit of an octet to be first
("little-bit-endian").

Note that the bit order of a hash function is not necessarily the same
as its byte order; notable exceptions are MD4 and MD5, which are
big-bit-endian and little-byte-endian. The original specification for
Tiger was also big-bit-endian and little-byte-endian, but it was then
changed incompatibly to be little-bit-endian.

Hashes that are big-bit-endian are always "left-justified", i.e. the
bits of the last partial octet are shifted to the most significant
end of the octet by the padding function. Hashes that are
little-bit-endian are always "right-justified".

Ciphers don't have any of these complexities because to a first
approximation, no-one uses them on bit strings (at least not without
the application protocol defining its own bit order). Actually no-one
uses hash functions on bit strings either, but they're defined that way
"for historical reasons" (i.e. a lousy idea in MD4 that other designers
copied).

> Other specifications, for example CRC calculations, are definitely a
> problem. ATM (Asynchronous Transfer Mode, not the bank machines) uses
> the standard CRC-32, as does GZIP. When both compute CRC-32 on the same
> octets in the same order, they get different results (usually). ATM is
> computing the CRC on the serial line, with least significant bit first,
> and thus the higher-exponent term in the polynomial. GZIP is computing
> it on the stored octets, most significant bit first.
>
> My advice: If reading a crypto specification that does not specify
> otherwise, the first bit in a block is probably the high-order bit in
> the octet that is "first" ("first" possibly according to a given endian
> convention).

I.e. "big-bit-endian". I disagree; you can't assume that.

My advice when writing specifications is not to define an externally
visible bit order at all; specify algorithms only on octet strings, and
make it clear that they are not defined on bit strings. This is much
simpler. When reading a specification, don't assume any bit order - you
won't need to if your protocol is defined in terms of octet strings, as
it should be.

Time to re-post my "suggestions to crypto algorithm designers"; I think -
see points 6, 8 and 9.

- -----
Here are some general suggestions to designers of cryptographic algorithms,
on how to promote interoperability and make life easier for implementors:

1. If an algorithm is a research contribution rather than intended for
serious use, or if a paper includes variants of an algorithm that
are defined for exposition only, say so clearly. The remainder of
these suggestions apply mainly to algorithms intended for serious use.

2. If a paper defines more than one algorithm, give each of them a distinct
name, and explain why an implementor might want to use one as opposed
to another.

3. For parameterised algorithms, specify precisely the set of allowable
values for each parameter, and give recommended values. Don't include
values that would be insecure in the allowable range.

4. Use consistent capitalisation and punctuation for algorithm names, and
define an unambiguous way to specify any parameters as part of the
name. Consider submitting the algorithm to SCAN (Standard Cryptographic
Algorithm Naming), and following the "name(parameter,...)" format used
there; see <http://www.users.zetnet.co.uk/hopwood/crypto/scan/>.

5. As far as possible, there should be sufficient information in the
paper defining the algorithm, that independent implementations that
are consistent with the paper will automatically interoperate.
(For network protocols and other algorithms involving two or more
parties, that might be unrealistic.)

6. Specify any binary inputs, outputs, keys, etc. as sequences of octets
(i.e. integers between 0 and 255 inclusive). Allowing arbitrary bit
sequences rather than octet sequences is more hassle than it is worth,
and very rarely used. Define octet-sequence representations for any
abstract mathematical objects that would need to be stored,
transmitted, etc. As far as possible, try to follow existing standards
(e.g. IEEE P1363) when doing this, but *don't* use ASN.1.

7. For public key algorithms, specify the distribution of key pairs that
should be used, and algorithms for validating keys. For protocols,
include explicit checks that received values are in the sets assumed
by the mathematical description.

8. Number sequences and indexed variables starting with zero. Number bits
within an integer so that bit i has weight 2^i, and coefficients of a
polynomial so that coefficient i has weight x^i. If there is a completely
arbitrary choice of byte order (i.e. the cost of byte order conversion,
if necessary, would be negligable for the proposed applications), use
big-endian. Don't use inconsistent byte order in different parts of an
algorithm (although this needn't prevent using auxiliary functions like
hashes, etc. that internally use a different byte order to the algorithm
being defined), and make it clear in the specification which order has
been used.

9. Write octet sequences as two hex characters per octet (most followed by
least significant nybble), and left-to-right as they would be stored in
memory or transmitted. This may sound obvious, but the documentation and
test vectors for at least three of the 1st round AES submissions (FROG,
SAFER+ and Serpent) used the opposite (right-to-left) convention.

10. Provide a C reference implementation that is byte-order independent,
uses only aligned memory accesses, does not depend on the sizes of
built-in C types or the signedness of 'char', does not assume that
signed types are twos-complement, and does not use compiler-specific
directives, or any other non-portable tricks. Test it with several
compilers on different platforms.
Ideally use <inttypes.h> for integer types, and provide a minimal
version of this (which can just be a few lines in most cases) for
compilers that don't have it. "Byte-order independent" means using code
that accesses individual bytes/octets, *not* BIG_ENDIAN and LITTLE_ENDIAN
conditional compilation and pointer casts. Use macros only where it
clarifies rather than obfuscates the code.

11. Provide an optimised C/assembler implementation. This may use
compiler-specific embedded assembler, conditional compilation of code
that works better on some machines, etc., but it should still act as a
plain C version when assembler for the target machine is not available.

12. In both reference and optimised C implementations, inputs, outputs,
keys etc. should normally be treated as arrays of an unsigned 8-bit type,
(preferably uint8_t from inttypes.h), to correspond with the mathematical
definition in terms of octets. Put test code that checks an implementation
against test vectors in a separate source file, that can be compiled with
either the reference or the optimised implementation.

13. Optionally provide a Java reference implementation that interoperates
with the C ones. For this treat inputs, outputs, keys etc. as byte arrays
(with the obvious two's-complement mapping between the Java 'byte' type
and octet values). Look at other optimised Java crypto code to see how
to fake unsigned types efficiently, and various other tricks. Put test
code in a separate class from the algorithm.

14. Put up a WWW page from which all of the papers, code, test vectors, etc.
relating to the algorithm are available. Post an announcement about this
page to at least sci.crypt. Keep the page up to date, and reference any
published cryptanalysis of the algorithm from it, including that by other
researchers. If the page is mirrored then use some method that ensures
that mirrors will be kept up to date.

15. Make available, at least as a text file and as C test code, test
vectors for *all variants* of the algorithm, and for a selection of
parameter choices (if it is a block cipher then this should cover all
block sizes, and a selection of numbers of rounds or key sizes, for
example). Include both values that are byte-order-invariant (e.g.
0x12343412 for 32-bit words), and values that are not, for each input
to the algorithm.

16. For the most common parameter combinations, also include a fully
worked out example with intermediate values at each stage of the
computation (including dumps of such things as scheduled keys).
Make sure that the test vectors are sufficient to test all parts of
the algorithm (e.g. encryption and decryption, or signing and verifying).
In the case of non-deterministic algorithms, e.g. a public key
algorithm with a randomised padding method, give test vectors that
use fixed values for the random input. For yes/no tests give both
values that should pass, and values that should fail for various
different reasons, if applicable.

17. Don't revise papers, implementations, test vectors, etc. without stating
that they have been revised, and when. Make sure that all on-line versions
are up-to-date, using Archie and Metacrawler to search for any copies
you might not otherwise know about. Also give a brief summary of what
has changed.

18. If an algorithm is modified incompatibly, give the modified version a
new name. Don't change the name for simple mistakes such as typographical
errors that are found soon after publication (but see 17). If the spec
and the reference implementation are found to be inconsistent, consider
carefully which one needs to be changed, or whether it is better to
define a new version, considering both disruption and security
consequences.

19. Make papers available on-line in at least PDF and Postscript formats,
and preferably also as the original source (e.g. LaTeX or whatever).
Use an HTML page that has an abstract of the paper and links to the
various formats, and recommend that links from other sites be made to
this page rather than directly to the .pdf/.ps files.
Some journals have restrictions on when a paper submitted to them
can be made publically available; in that case put it on-line as soon
as possible within those restrictions. Put a reference to the algorithm's
web page in the journal version.

20. If the algorithm is ever broken (perhaps not completely, but enough
that you no longer recommend its use), say so on the web page, and
post an announcement of that to sci.crypt.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPC67kjkCAxeYt5gVAQGzwgf/V1Aw5xgrdO2+DswB7R6Bynn7vPbBUtDx
U5skopjad+f2zGBRpM+TlKqhQ2FagHsG8wAEv/nNT1NCxyIsGYLzzZn5uUS+KWo9
ZSMA2AExwgI/za8nFdHCDt9v18asPvyo8L93qzzga8xCb41Gb6kYWZ/k0S5vT7DM
RmgmDuGSKG2sU9QqrUvt2MGKu5ay2Ufjn7Aj77RxsYhj2zzrY06j06S8ZrMgRiMV
WJwpK23Wloj6g8hn6xDHgiBvz7NpqbcxolMYtindla2xeJFQxoh4Z9opJRzZSSXU
uLE/4keLuM86tvGGLCcEmhtLL2sz1GNwrQ3i/QUlbJl7GxNHOVDzpg==
=/hcB
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/7iDn9i3PyEg/m/MtayrNIzT4oJ", "n_sections": 62}, {"thread": "7iDn9i3PyEg", "msg": "2YAytpSIGngJ", "author": "David Hopwood", "date_disp": "Dec 30, 2001, 11:29:37\u202fPM", "subject": "AES interfaces", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

> Brian Gladman wrote:
> > You can specify that bit numbers will be set by the power of two that a
> > bit represents in a 128-bit unsigned integer.

But the AES FIPS does not specify anything like that. If it did (for 8-bit
rather than 128-bit integers), there would be no problem.

> > And then you can say that P[0..7] is byte[0] and so on.
> >
> > But there is no need to introduce integers because it is sufficient to
> > number the bits in all the blocks.

It is not sufficient to number all the bits. Cipher interfaces are not
defined in terms of bit sequences; they are defined in terms of octet
sequences [*]. An interface defined using bit sequences isn't directly
useful - we can't store a bit sequence in a file, or transmit it using
network protocols above the physical layer, without first representing
it as an octet sequence. For almost every other commonly used cipher
(including DES and the other AES candidates) [*], and also for every hash
function and MAC that I know of, the mapping of plaintexts, ciphertexts
and keys to octet sequences is part of the algorithm specification.


[*] Except for some stream ciphers, e.g. SEAL and several variants of
WAKE, which specify plaintexts and ciphertexts as sequences of 32-bit
words (although they still specify keys as octet sequences).
In practice this means that there are big- and little-endian variants
of SEAL and WAKE that do not interoperate. For these ciphers, though,
there is some justification in that the big-endian (resp. little-endian)
variants avoid byte order conversion on big-endian (resp. little-endian)
architectures.
For Rijndael/AES, OTOH, there is no benefit whatsoever in failing to
specify the mapping to octets - it doesn't have any effect on
efficiency.


The definition of AES would be complete if FIPS 197 did any of the
following things:

- give a bijection between polynomials in GF(2^8) and integers 0..255.
The correct bijection is:


b_7.x^7 + b_6.x^6 + b_5.x^5 + b_4.x^4 + b_3.x^3 + b_2.x^2 + b_1.x + b_0

<->


b_7.2^7 + b_6.2^6 + b_5.2^5 + b_4.2^4 + b_3.2^3 + b_2.2^2 + b_1.2 + b_0

- give the order of bits within an octet; i.e. whether the first bit
in an octet, written on the left in the FIPS, is most significant
("big-bit-endian") or least significant ("little-bit-endian").
The answer is big-bit-endian.

- say which bit numbers in an octet are most and least significant.
The answer is bits 7 and 0 respectively.

- say which bit of a *block* corresponds to the MS bit of the first
octet. The answer is the first bit, numbered 0.

- say whether the hexadecimal representation 'HL' corresponds to
the integer 0xHL. It does.

- say whether the binary representation {A B C D E F G H}
corresponds to the integer ABCDEFGH in binary. It does.

However, the FIPS does not specify any of this, despite the fact that all
current Rijndael implementations assume (and rely on) the answers I've
just given.

> > Given a complete enumeration of the bits in the plaintext, the ciphertext
> > and the key, the internal semantics of a cipher can be completely specified
> > (in principle) by decribing how each ciphertext bit is dependent on each
> > plaintext and each key bit.
> >
> > Hence if X{i} is the i'th bit in bit sequence X:
> >
> > C{0} = Function0(P{0},P{1},...,P{127}, K{0},K{1},...,K{127})
> > C{1} = Function1(P{0},P{1},...,P{127}, K{0},K{1},...,K{127})
> > ....
> > C{127} = Function127(P{0},P{1},...,P{127}, K{0},K{1},...,K{127})
> >
> > We do not need to do any more than this since, for example, introducing
> > integers would imply relationships between bits (for example, numeric
> > significance) that are not necessarily present.

One of the purposes of a standard is to define things that would otherwise
be arbitrary, whenever that is needed to ensure interoperability. There are
enough variants of Rijndael already, without multiplying that number by
two for frivolous reasons.

> > AES, for example, does not
> > involve integer semantics in its internal handling of bit sequences.

What relevance does that have? Serpent doesn't use integer operations
internally either (only XORs, shifts and S-boxes), but it specifies
mappings to integers for input and output.

> > And the external semantics are outside the scope of the cipher
> > specification.

They weren't outside the scope of DES, or any of the other AES candidates.
AES is supposed to be a replacement for DES and 3DES, so it had better have
the same form of interface (as far as possible, given the necessary changes
to block and key sizes).

> > If you want the external semantics of integers (or octets,
> > or whatever else takes your fancy) simply specify how the semantics for
> > these entities are to be mapped onto the bit sequence semantics at the
> > cipher interfaces.

There is only one correct, interoperable way of doing this for Rijndael/AES.
The opposite ordering is wrong, and NIST should say that it is wrong.


PS. I don't seem to be receiving any of your posts except quoted in
follow-ups. Please cc: any replies in this thread.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPC/pIzkCAxeYt5gVAQFuwwgAiDjk8Bwj5eHsbFAq5qP5n9z3TM5mJUAq
car8ESu9QP/8miwJHme46rXMqII/2OGo6xkgAp0aFbytdzal5tH4eVYKLEs709Ym
1vrkOzRMFvN5HgsD50F+FgL3vkOMT7oQ2rQrD2W7y9hnVAmcRpdjLNKKvFZmVp2f
eAhDwZiU5EaDYsELuKP09G1ZM5Zi2mn8xz5JkZs9cruELzDPkUH72NqFLyAa0Jc8
D+BOPc0J8U+AZeKViPRiZfblf+MSs8GZDqv01CtoMdImHaWlgvJm1ywjhxBKJun3
3OQGGHY9+JDIuT13oV7hUReM0OAXHpSaF+VmS/QFzuGfc685F4kfiA==
=cRGR
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/7iDn9i3PyEg/m/2YAytpSIGngJ", "n_sections": 62}, {"thread": "7iDn9i3PyEg", "msg": "dt6-UfymT6QJ", "author": "David Hopwood", "date_disp": "Jan 1, 2002, 6:33:08\u202fPM", "subject": "AES interfaces", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Douglas A. Gwyn" wrote:
> Brian Gladman wrote:
> > Since it seems unlikely that AES users will want to be told that they
> > have to convert all their data into finite field elements (which
> > 99.99..% of users won't even understand), it makes sense to remove
> > these internal semantics at the interface by simply designating the
> > entities involved as enumerated sequences of bits or bytes.

Indeed it does. So which interface should be defined: bit sequences,
byte (=octet) sequences, or both?

FIPS 197 flatly and intentionally refuses [<anthropomorphising wildly>]
to specify an octet-sequence interface, despite that being the more
useful type of interface in practice. There would be nothing to prevent
it from defining both types (although that is not ideal; see below).
Bit-sequence interfaces tend to be very rarely used even when they are
defined, as we can see from the example of hash functions: most
cryptographic hashes (with the exceptions of GOST-Hash and Snefru, IIRC),
define bit-sequence interfaces, but very few implementations of those
hashes support them.

I said that defining both types of interface isn't ideal; here's an
example of what can go wrong. P1363a defines a Message Authentication
Code construction called MAC1, based on HMAC. MAC1 is specified as
follows:

- if the input is given as an octet string, convert it to a bit string
using the primitive OS2BSP (which assumes big-bit-endian order).
- apply the version of HMAC defined in X9.71 (which treats everything
as bit sequences).

There's no ambiguity here: the bit order to be used is clearly specified.

However, suppose I want to use a little-bit-endian hash function, such as
RIPEMD-160, with MAC1. I have to reverse the order of bits in every octet!
There is no other way to implement it, because RIPEMD-160 uses integer
operations internally. Bit reordering is not a particularly efficient
operation in software: the fastest practical way I can see to implement
it requires a lookup in a 256-element table for each octet of the message.

Even worse, for a little-bit-endian hash, MAC1 is incompatible with the
original version of HMAC in RFC 2104, which uses octet-sequence operations
exclusively. Note that it is incompatible even when used by a scheme that
only gives it octet-sequence inputs.

If there were no little-bit-endian hashes like RIPEMD-128/160, HAVAL, or
Tiger, then this kind of problem wouldn't arise. However, RIPEMD-128/160
uses little-endian ordering of octets within words (for speed on x86
processors), and it is little-bit-endian for consistency with that choice.
The designers of Tiger thought that this consistency between bit and
octet ordering was so important that they even changed their algorithm
incompatibly (from big- to little-bit-endian) in order to obtain it.
Presumably, the same arguments could be applied by designers of new
ciphers, if it became popular to define bit-sequence interfaces for them.

My considered conclusion is that bit-oriented protocols (that is, those
that are defined in terms of bit-sequence interfaces) are simply a bad
idea, and should not be encouraged - given the computing infrastructure
we have now where almost all existing protocols are octet-oriented.
An effective way of discouraging them is to only define octet-sequence
interfaces for new algorithms, which is one reason why the "suggestions
to crypto algorithm designers" I posted recommends that.

In any case, given that the AES FIPS has already been published with a
bit-sequence interface, the least bad option now is to define an
octet-sequence interface to AES as well. Clearly this should be the
interface that is already being used by Rijndael implementations, i.e.
the one where 'HL' maps to 0xHL.

> > Having done this, external users can then 're-attach' their own
> > semantics to these bit or byte sequences - numbers, strings, octets
> > or whatever.

That's exactly what MAC1 does (attach octet semantics to a bit-
sequence). This is *not* equivalent to having the most useful form of
interface specified once-and-for-all for each algorithm; it is strictly
worse: more hassle and potential for error, more non-interoperable
options that protocol designers may choose differently, and less efficient
in some cases.

Note that a bit-sequence interface cannot be more efficient than an
octet-sequence interface. (A word-sequence interface potentially could be
more efficient if it happened to fit the implementation architecture
well, although not for Rijndael/AES, because Rijndael is
neutral-octet-endian: it does not use any arithmetic operations on words.)

Doug Gwyn wrote:
> It's not a matter of "users" understanding [finite fields] or not, it's


> the simple fact that abstractions don't exist as such in the computer,
> thus they have to be concretely *represented* using bit values.
> Collections of bits are just collections of bits, but we still need to
> know where each bit should be placed.

There is a subtle but important difference between this argument and the
one I made above. Abstractions have to be represented concretely, yes,
but we do not need to, and SHOULD NOT, have an algorithm or protocol
standard require specific internal representations. [*]

The issue with the AES FIPS is one of external representation. ("External"
doesn't necessarily mean on-the-wire or in a file format; it can include
interfaces between components of a system, such as between a crypto library
and an application.) It's not that the FIPS doesn't define an external
representation for AES blocks and keys, it's that it defines the *wrong
type* of representation - literally, for the programming language/type
theory definition of "type".


[*] Giving non-normative advice about efficient representations in an
appendix of a specification is fine, as is noting cases where the
choice of representation may make a difference to security against
side channel attacks.

In practice it often makes sense to use an internal representation
that is the same as, or corresponds very directly to, the external
representation (for example, implementing the Rijndael S-box using the
same mapping between GF(2^8) and {0..255} as the external mapping).
The decision of whether to do that, or to use a different internal
representation, can safely be left up to implementors.


In another article, Brian Gladman wrote:
> David Hopwood wrote:


> > > Brian Gladman wrote:
> > > > AES, for example, does not
> > > > involve integer semantics in its internal handling of bit sequences.
> >
> > What relevance does that have?
>

> It is important in all specifications not to specify things that don't need
> to be specified. If we did not adopt this strategy, specifications would
> become full superfluous and confusing details which would obscure those that
> are truly necessary. I can assure you that AES (Rijndael) does not require
> bits to be ordered, it only requires that they be identified. Hence if we
> were to impose an unecessary ordering relationship we may well constrain
> implementors to maintain a property - bit ordering - that does not need to
> be maintained.

The current FIPS defines the order of bits within a block. *That* is arguably
the overspecification, since octet-oriented protocols have no need to know
that order. What needs to be specified is the order of octets within a block,
and the values of the octets.

Either type of interface is sufficient to fully specify the algorithm for
protocols that use that interface. The difference is in how the bits are
labelled. An octet-sequence interface (for an algorithm with 128-bit blocks)
labels the plaintext or ciphertext bits like this:

bits {0..7} of octet 0 }
bits {0..7} of octet 1 } block 0
: }
bits {0..7} of octet 15 }

bits {0..7} of octet 16 }
bits {0..7} of octet 17 } block 1
: }
bits {0..7} of octet 23 }

Note that "{0..7}" here represents a set of bit numbers, not a sequence
of bit numbers. I.e. a convention is defined for labelling bits (bit 0
being the least significant), but there is no need to specify which bit
is "first" within an octet. This is consistent with the semantics of
Internet protocols, most other network protocols, flat files in Unix-derived
filesystems, integer types in all programming languages that I know of, and
the APIs of all *portable* crypto libraries (that is, libraries that make
some attempt to work consistently across platforms).

A bit-sequence interface labels bits like this:

bit 0 of block 0
bit 1 of block 0
:
bit 127 of block 0

bit 0 of block 1
bit 1 of block 1
:
bit 127 of block 1

This is consistent with the BIT SEQUENCE type in ASN.1, and is used by
a few ISO and ANSI crypto protocols (e.g. the X9.71 protocol mentioned
above), but that's about all: hardly any commonly used standards support
or depend on representing bit sequences directly.

In hardware, it makes no substantive difference which type of interface is
used - the only effect is on how the 'wires' are labelled. In software,
however, or when interfacing between software and hardware, a standardised
octet-sequence interface is desirable in order to avoid ever having to
reverse the order of bits within octets.

> My own implementation

<http://fp.gladman.plus.com/cryptography_technology/rijndael/index.htm>

> makes use of this freedom by mapping shifts to higher index positions to
> left shifts on little-endian machines and to right shifts on big-endian
> machines [in the key scheduling code].

You're mistaken about the reason why this works. The FIPS talks about 32-bit
words in the description of key scheduling, but what it actually means by a
"word" is a sequence of 4 octets - <x[0], x[1], x[2], x[3]>, say. Since no
arithmetic operations are used on "words", Rijndael and AES are
neutral-octet-endian. However, it's still possible to pack the 4 octets into
a 32-bit processor register with x[0] in either the most significant or least
significant 8 bits, whichever is more convenient for optimising the memory
accesses and shifts. This is purely an internal representation choice, and
has no interaction with the cipher interface.

Another way to see this is to look at the code that verifies test vectors:
all the test vectors have 'HL' mapping to 0xHL. The change I'm suggesting
is simply to require that mapping, and so your implementation would still
be conformant (assuming it is conformant now; I haven't looked at all of the
code in detail).

> By doing this I avoid the input/output order
> conversion that would have to be done on one of the two architectures and
> hence obtain the same speed on both architectures.

That has nothing to do with bit order. Your implementation uses the same
octet-sequence interface to Rijndael on both architecture types. If it
didn't, it wouldn't pass the test vectors, which you've interpreted
(correctly) as being big-bit-endian regardless of architecture.

> An advantage of Rijndael is hence that it is 'endian neutral' and we would
> loose this advantage if we imposed an unnecessary endian convention in the
> specification.

Rijndael can be neutral-bit-endian (that is, the order of bits within octets
does not matter) if-and-only-if it is specified as having only an octet-sequence
interface, *or* only a bit-sequence interface. An algorithm that has both
cannot possibly be neutral-bit-endian. The octet-sequence interface is far
more important, so if the designers considered the neutral-bit-endian property
to be desirable, then only that interface should have been specified.

Rijndael is neutral-octet-endian (the order of octets within words does not
matter) regardless of what is done about the bit order issue. It is the
neutral-octet-endian property that implies that Rijndael is equally
efficient on big-endian (i.e. big-octet-endian) and little-endian (i.e.
little-octet-endian) processor architectures.

> > There is only one correct, interoperable way of [mapping blocks and
> > keys to octet sequences] for Rijndael/AES.


> > The opposite ordering is wrong, and NIST should say that it is wrong.
>

> I dont agree. I see no basis for saying that one bit ordering convention
> is correct and another is wrong.

We're talking specifically about AES here, not bit ordering in general.
If all the existing implementations use that convention (they do), and if
there is no advantage to using the other convention (there isn't), then
why not specify the octet-sequence interface properly, instead of leaving
implementors to guess what it should be?

> This is like saying that all processors must be little-endian.

No. There are three possible options that allow for the kind of
interoperability that we currently have between different architectures,
network protocols, and stored data:

A. Make all protocols and architectures appear consistently little-endian.
B. Make all protocols and architectures appear consistently big-endian.
C. Represent all data externally as sequences of integers of a
standardized chunk size, and make all memory architectures
chunk-addressable.

As pointed out in IEN 137 (cited in a previous article), if A or B is chosen,
then C isn't necessary. However, if neither A nor B is chosen, then it's
essential to standardise the chunk size, because that provides a way of
transferring arbitrary data between systems that use different orderings
of chunks within words, or of bits within chunks.

What actually happened is that option C was chosen, with a chunk size of
8 bits. If none of the options had been chosen, we would have had a complete
mess, and something like the Internet would not have been possible without
first resolving that mess.

> Moreover I am not aware of any authority that has the absolute power
> required to impose one particular bit ordering convention.

NIST is the authority for the specification of AES. There is another version
of AES, though, that was designed by people from a mirror Earth orbiting on
the opposite side of the Sun, where numbers are written down least significant
digit first. If the two versions of AES ever meet, they will annihilate each
other in a flash of broken and non-interoperable protocols. Unfortunately
some insurgents from the mirror Earth seem to have infiltrated the NIST on
our own Earth, with the aim of making sure that both versions are allowed by
the standard...


[please cc: any replies]

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPDJG2TkCAxeYt5gVAQFp0Af+LAApOcH0GwY4tpI+UADoiE/C9sXVQ0MZ
dx0+VmT6nZx4VN+OeXqZUV1VlKnJ1w2IwZqm02/iT7FiAFDVS7/d+lZyJrh7Wwk/
0nMWkbP/k6W76zuFzT4ps0/bcshh6RBdPoS+4c0UE5tBVcRdNqfkbJ35ymKvc75o
u/yCnR/IYYd8bDrH+LjZQwnelPMwSpPMJIo/2cywRWIMMoHZFjadjyd7M1BqdQ+h
vhEjcTQWpSOKfHamn9hZtXdVNP09lZZ1jVYnktt3X7G/KZaC+uSvKD+UlP8zXsal
a9caDbgxkhPiuib7JWnGoH7wSci8VdBFxYo+5mWILJ7cgou5nqYlWw==
=5zxf
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/7iDn9i3PyEg/m/dt6-UfymT6QJ", "n_sections": 62}, {"thread": "7iDn9i3PyEg", "msg": "LSSLJaeBiVgJ", "author": "David Hopwood", "date_disp": "Jan 1, 2002, 9:37:23\u202fPM", "subject": "Brian Gladman's AES implementation (was: AES interfaces)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Hopwood wrote:
> Brian Gladman wrote:
> > My own implementation
>
> <http://fp.gladman.plus.com/cryptography_technology/rijndael/index.htm>
>
> > makes use of this freedom by mapping shifts to higher index positions to
> > left shifts on little-endian machines and to right shifts on big-endian
> > machines
> [in the key scheduling code].

On closer inspection this is not just in the key scheduling code. That
makes no difference to my argument (that specifying the bit order has no
effect on this optimisation), though.

I also noticed the following in aes.h:

a) when PACKED_IO is not defined, EXTERNAL_BYTE_ORDER *must* be set to
the byte order of the underlying platform. Also this option strictly
speaking invokes undefined (not just implementation-defined) behaviour
according to Standard C, and may cause problems in practice with
unaligned memory accesses on some platforms.

b) when PACKED_IO is defined, EXTERNAL_BYTE_ORDER *must* be set to the
same value as INTERNAL_BYTE_ORDER. (That is, the definition
"#define word_in(x) bytes2word((x)[3], (x)[2], (x)[1], (x)[0])"
and the following definition in aes.h are always incorrect if they
are used.)

The documentation in aes.h and aes.c doesn't make this sufficiently clear,
IMHO. I also don't think that a) should be the default, as it appears to be.

May I suggest replacing the end of aes.h (starting from
"#if (INTERNAL_BYTE_ORDER == EXTERNAL_BYTE_ORDER)") with the following:


#if defined(PLATFORM_BYTE_ORDER)
/* Note that this may invoke undefined behaviour on some platforms.
* To conform to Standard C, do not define PLATFORM_BYTE_ORDER. */

#if (INTERNAL_BYTE_ORDER == PLATFORM_BYTE_ORDER)

#define word_in(x) *(t_name(word)*)(x)
#define word_out(x,v) *(t_name(word)*)(x) = (v)

#else

#define word_in(x) byte_swap(*(t_name(word)*)(x))
#define word_out(x,v) *(t_name(word)*)(x) = byte_swap(v)

#endif
#else
/* !defined(PLATFORM_BYTE_ORDER), so use byte-order-independent code. */

#define word_in(x) bytes2word((x)[0], (x)[1], (x)[2], (x)[3])
#define word_out(x,v) { (x)[0] = bval(v,0); (x)[1] = bval(v,1); \\
(x)[2] = bval(v,2); (x)[3] = bval(v,3); }
#endif

where PLATFORM_BYTE_ORDER would not be defined by default. This needs
thorough testing for all options and platforms, of course, but I'm pretty
sure it is correct.

Another request: it would be nice if the code compiled cleanly with
"gcc -Wall -pedantic" (it is quite close already).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPDJxwTkCAxeYt5gVAQFRXwf/eC6n7JmzQcqRLm+EtlE9ORP4dtvofi7d
6NWUv4AN/B1+Pvy6H+wy9lWUHBhl+4yjXFLi4YHQpDK47HFandZxq0OMfjrrbAbI
kL8G7UBPTw0hdc7dHx9z1IRakQn4aMBXpUvSPp98izChfwJEXpVGssqyfWE1nGxP
gs6exrV9DRXZcmxpTCXN/C8KpInK77EgRN++PtoDCI0DV6lgkm+RxWpSp2i+yolJ
DAAGVuPfxw3JlAeYILjfJLgGT2iz9Dsyl1ZnRxUS6UYwWoiZoikVlqclEA7GDFnK
3SiNHjrICfyRpeZ0k8jmeWe4d7djuijeDFxIoALBETysTfVLQ0YdGA==
=BkwS
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/7iDn9i3PyEg/m/LSSLJaeBiVgJ", "n_sections": 62}, {"thread": "9eahD2lRlFw", "msg": "C6BIqniwsygJ", "author": "David Hopwood", "date_disp": "Dec 2, 2001, 7:42:41\u202fPM", "subject": "25 GHz computers by 2005", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Alan wrote:
> Moore's law says that computer speed doubles every 18 months.

Actually, Moore's law says [from his 1965 paper]:

# The complexity for minimum component costs has increased at a
# rate of roughly a factor of two per year (see graph on next page).
# Certainly over the short term this rate can be expected to
# continue, if not to increase. Over the longer term, the rate of
# increase is a bit more uncertain, although there is no reason to
# believe it will not remain nearly constant for at least 10 years.

"Complexity" here refers to the number of components, e.g. transistors,
on an integrated circuit.


Gordon E. Moore,
"Cramming More Components Onto Integrated Circuits"
Electronics, April 19, 1965.
<http://www.intel.com/research/silicon/mooreslaw.htm>
<http://www.intel.com/research/silicon/moorespaper.pdf>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPArKNzkCAxeYt5gVAQHzkgf+O7ECgiZMpLtlgKgKyqrbqAu5ezzqmNAA
y3Ng4JuFRL9JiridqjbmV1EIONJX9URO7DO/Y2fRd3xgn+PE3T/7RL/BF+EKjJv4
kcxmvDWVfnFqVThpEZi8Tg3J7WjHrS7OKs5TBgVRIEfrWE0lpACxSyvzVYnCL1dL
ZWdN7eBqY/JMEloNpgJN8WpwqqudFvdaw2o3IH375fdZrmV64mbaHSWX3h9UIKLd
sDUVpd1HDdJ7JS7Y88vJsj/MXwjEb4qRdHSg3D9FPjgZSmCaLJj18wLR2WblUB+l
mQad+vXcScKy+yqYao/iQzCAhH5FAuJFvxfP2X/jKWMrvFn5XSQ4nA==
=I9J9
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/9eahD2lRlFw/m/C6BIqniwsygJ", "n_sections": 67}, {"thread": "A0JLVBl1HS8", "msg": "reOFbwQ6vjYJ", "author": "David Hopwood", "date_disp": "Nov 28, 2001, 10:23:08\u202fAM", "subject": "Q: Key modifications", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

[replying to this follow-up, since the original post has not turned
up at my server]

> Mok-Kong Shen wrote:
> >
> > [The following probably fairly dumb questions are posed
> > (or re-posed), as my poor knowledge has unfortunately
> > yet failed to furnish me with very clear-cut and
> > satisfying answers.]
> >
> > 1. Excepting inferior processing efficiency, are there any
> > security issues against modification of keys of (well-
> > designed) block ciphers in the following ways:
> >
> > a. Use a constant to progressively augment the binary
> > value of the user-given key for each block.
> >
> > b. Use a block cipher (the same or not) in counter mode
> > or a common PRNG to generate the key for each block.
> >
> > c. XOR the ciphertext of the previous block (or similar
> > quantities used in certain block chaining modes) with
> > the user-given key.

These ideas have not got any better or worse than when you first
proposed them in July. Is it too much to ask that you take some
effort to understand the answers you were given then?

On 15 July, I wrote:
> Mok-Kong Shen wrote:

> > David Hopwood wrote:
> > > Mok-Kong Shen wrote:
> > > > Suppose one wants to freqeuntly change the key during a
> > > > block encryption run but also desires to limit additional
> > > > key materials needed, if any, to a minimum (in some
> > > > meaningful sense). My immediate 'imagination' leads to the
> > > > following possibilities that one eventually could consider:
> > > > Add a constant to the current key,
> > >
> > > Bad idea (it may allow related key attacks).
> >
> > Compare (1) encrypt a given amount of plaintext with a
> > single key, (2) encrypt n parts of the same given amount
> > of plaintext with n related keys derived from the single
> > key of (1). Considering that in (2) each key applies
> > to much less material than (1) and that the opponent
> > doesn't know the detail of the 'relationship' (the
> > constant used), it is at least intuitively not clear
> > that (2) is worse, I suppose.
>
> It is not clear that it is worse in all cases (the cipher may be
> resistant to related key attack), but it is certainly clear that it
> is worse in some cases. Examples are given in:
>
> John Kelsey, Bruce Schneier, David Wagner,
> "Related-Key Cryptanalysis of 3-WAY, Biham-DES, CAST, DES-X,
> NewDES, RC2, and TEA",
> ICICS '97 Proceedings, Springer-Verlag, November 1997.
> http://www.counterpane.com/related-key_cryptanalysis.html
>
> and
>
> John Kelsey, Bruce Schneier, David Wagner,
> "Key-Schedule Cryptanalysis of 3-WAY, IDEA, G-DES, RC4, SAFER,
> and Triple-DES".
> http://www.counterpane.com/key_schedule.html
>
> > > > seed a common (non-secure) PRNG to generate keys,
> > >
> > > Very bad idea (the generated keys may not be sufficiently random).
> >
> > This could be regarded 'in priniple' the same as the
> > issue above.
>
> You said that the PRNG was not necessarily secure. In that case how
> can you have any confidence that the keys are sufficiently random?
> It has very little similarity to the previous case.
>
> > > > run another block cipher as PRNG to generate keys,
> > >
> > > This is pretty reasonable.
> > >
> > > > combine with some simple opertions the current key with
> > > > certain hash value of the previous plaintext and/or
> > > > ciphertext blocks.
> > >
> > > This is not sufficiently clearly specified to comment on. The
> > > details matter.
> >
> > Indeed I haven't put too much detailed thought on that
> > matter myself. A 'special' example could be: xor the eight
> > 16-bit parts of the previous 128-bit plaintext block and
> > add that to the current key.
>
> OK, that example is definitely a bad idea, for the same reason as
> the first case above (note that the plaintext blocks are not random,
> and may be known or chosen; also, even if they are random, much of the
> key remains the same with high probability).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPAUBCTkCAxeYt5gVAQHLswf/c+DS9FA/XweoDxuR20qmTbE/3mdKuOTD
RPf1FqPw516SxKzQiDXLRm54jCVS6/T+CR4hj9byvU77xJKnz1xtk3UxbDbHZoB8
isQ/Mozrlg2VqzBR+n7ZRJvg6VGk1FUmaKZSnuFzdZoYH6xUhk9eFd5crdOfPs/a
J/5Uot2orenXyo9xCLfG+TZAg+Q6EzhaNMs1q9PRlqETwYM8SCJYSyLJ4I2d+7z3
6G3Fex/SmMJ1wE1XoRpaNJbIXDm5zsjaJpJTPU4ok9waOHus4LPub/oHAnDCqcqX
m15Ny0C1oZVFG16jM4mMP76OJCRI8fy1rzwFUFjprjmPz1voMMVoxA==
=2IZC
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/A0JLVBl1HS8/m/reOFbwQ6vjYJ", "n_sections": 34}, {"thread": "BgPX-tLW5oE", "msg": "KISEoQC5FgYJ", "author": "David Hopwood", "date_disp": "Dec 2, 2001, 9:55:36\u202fPM", "subject": "A successful attack on DeepCypher [was Re: Thinking of buying encryption software called DeepCypher....]", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Michel Dalle wrote:
> About 2 years ago, I stumbled on some things called "password protection
> applets", which supposedly could be used to protect access to webpages
> without having to rely on server authentication.
> Over a weekend, I investigated 25 of those gadgets (some of which were
> for free, and some of which were sold for outrageous amounts of money),
> and I found all but 1 of these to be quite easily breakable. Given my
> complete lack of knowledge on cryptanalysis, I asked this newsgroup for
> help on that elusive last gadget, and sure enough, it took one of the regulars
> here less than half a day to come up with, not 1, but 3 different ways of
> breaking it...
>
> I informed all 25 authors/companies of the weaknesses in their "product",
> and received 3 replies - one from a commercial company who was going
> to "improve their product in the next release", and 2 from the authors of
> the two "strongest" applets (both free, incidently). Three days later, the
> loophole I had found in the second-strongest applet was fixed, and the
> strongest applet -the one I couldn't break but a cryptanalyst could- was
> replaced by a new version using SHA1.

If anyone is interested in that break, search on groups.google.com for
'Re: REVIEW - Vulnerability of "Password Protection" Applets' in sci.crypt.
I'll have to disclaim being a cryptanalyst, though, at least at that time.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPArphzkCAxeYt5gVAQFm2gf8CCeU/uZ3MY2ANDzdO2IjvagNkGCCKvdC
inDSYSOwQ5GtiSkelWJq/mQ8je58MEn56Unhxf+6hVhhb6dkcvhJxGegVzgPVDrR
mNoqcUKh9YxFYLsLBvpJPW34LsmUmkpY18esc2JZPOAVdW/Ty59nLDbGZHA35ayM
rAT31DDeyhknPwccgzuKyOKbXu5+QuQgrYenXeXQcrERPtk0MVamiM2sv39IiiCV
CpQpph0p+YZ/LgGTbePaLdB3RpCzxOmP/bVqD/Y4XBvHI4DRCg3oDjeYaSjX581v
ULfF5Z962piCnsYafTYUdLzL649ZCDOis9qUjbzaeC/Qq2zIzyZ8DA==
=9VN4
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/BgPX-tLW5oE/m/KISEoQC5FgYJ", "n_sections": 52}, {"thread": "ClCnWEamhss", "msg": "YiTniJyB_9sJ", "author": "David Hopwood", "date_disp": "Oct 17, 2001, 4:14:33\u202fAM", "subject": "professors with an interest in provable security", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

This is obviously malleable. If I was going to use NTRU encryption, I'd
use Shoup's key encapsulation construction [*]: choose m at random, and
derive symmetric cipher and MAC keys from m.

I don't see any reason to use NTRU in real applications, though;
it is patented, and hasn't had enough analysis.


[*] the one that is called Simple-RSA or RSA-KEM when applied to RSA.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO809UzkCAxeYt5gVAQGG4gf+KibjhWFDKLkOwCzokijqz7c0ovb99pmo
vpZNfPJN4E98l652marCZWwipddoOHLlu6CbT4KvVrRQAVBMbuRIzwGCyp7S84n4
2cZAX0tFGZo5IK0EnELtAicDkR9qECMz28VzBNFqukH63AJx/5ajAI/fcC+ntmKa
eshkOVjFisFIaiKaWJnF/d4WZlc/1uEdDOV9LmIv2ln5n3KoPGnjks/kMeAdOLib
fzBwlldzmL7NpJj4gY96rLTx+HNY8LdBryC0w6fi+BKaLYudJ3tt5FhB0+n2W+l/
DMYhtCMwsQo+JrhX89LV4zo5Z05ZNamVwQjV8EszCYUFNwokIuYAaA==
=aIKM
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ClCnWEamhss/m/YiTniJyB_9sJ", "n_sections": 16}, {"thread": "ClCnWEamhss", "msg": "h58p-5imaqEJ", "author": "David Hopwood", "date_disp": "Oct 19, 2001, 3:56:17\u202fAM", "subject": "Malleability of NTRU", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Goldberg wrote:
> David Hopwood wrote:
> > Benjamin Goldberg wrote:
> > > From the notes I made after reading the tech stuff on NTRU's site:
> [snip]
> > > h p / f * g (modulo q)
> [snip]
> > > Encryption:
> > > m The message: A polynomial whose coefficients range
> > > from -(p/2) to (p/2).
> > > r A randomly chosen truncated polynomial degree N-1,
> > > with the restriction mentioned by d_r.
> > > e = r * h + m (modulo q)
> >
> > This is obviously malleable.
>
> How is it "obviously" malleable?

For any polynomial c, change the ciphertext e to e + c, and the decrypted
plaintext will be m + c.

> Please don't forget that except for p and q, all of these values are
> truncated-ring-polynomials, not integers.

Yes, '+' is polynomial addition, but that doesn't affect the validity of
the attack.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO8/cUzkCAxeYt5gVAQGmSQf/T58OvuECwhBcxYO41o4HPb3/pAnJ62f5
DTsjqVqnHq/hYj/G7kGTVMt3U4Bh8O1ZzQSogDlnNfrt+6Xpw5UZ2EXduFS2gbta
a1Psb40T7UVYOzrr89T6sts8CnYvLsstokOJCrpDlZd4Uq76p2V7+j9YxmrBY5dz
PhpVIK2oTI/QC4D1Xc7o9UzZsgb+kKbWd+Cg3o7yPny4jCdXQ+IFyNxl63gr9q+4
qO3+Swi41FNuiRlyjrJBsvi8JBciYWw52bNak757Qkvmrhj7HSNZLCpF8KDzOrBU
hqU9USsjld3Yv1JOiKHFOPS3aDMvPGEEBN2X5fZ3ajAJ2SlQZFO3jA==
=ZgiA
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ClCnWEamhss/m/h58p-5imaqEJ", "n_sections": 16}, {"thread": "E_k1jPXlXvY", "msg": "K4dwyuBBTHcJ", "author": "David Hopwood", "date_disp": "Oct 19, 2001, 11:28:48\u202fPM", "subject": "FreeMe - Remove MS-DRM protection from .wma files", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:


> Stephan Schulz wrote:
> > Richard Heathfield <bin...@eton.powernet.co.uk> wrote:
> >>Darren New wrote:
> >>>Tom St Denis wrote:
> >>>>I doubt you "need" that film the same way you "need" that right to live.
> >>>
> >>>OK, so it's alright by your book to infringe the less important rights.
> >>
> >>That's not what he's saying. He's saying "vote with your wallet", and I
> >>agree with him.
> >
> > Not quite. Your argument would be fine if you could reasonably "vote
> > with your wallet". However, RIAA and MPAA are industry associations
> > that enjoy nearly monopolistic powers. So if you want to be an active
> > part of popular culture, you (more or less) need to access their
> > products.
> >
> > And I consider "participation in the popular culture" to be a right
> > that is as least as important as "living on the left side of the
> > street" or "sitting in the front of the bus". And not only for the
> > benefit of the person that might be excluded from mainstream society,
> > but for the benefit of society.
>
> something I learned when I was younger.
>
> "You can't please everyone."
>
> We can't all exist in a nice utopian what is yours is mine society like

> you want until we eliminate [religion, money, country divisions].

We're not asking for utopia; we're asking for copyright fair use rights.
What is unreasonable or unrealistic about that?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO9DvTjkCAxeYt5gVAQHH6Qf/RpAq7G+MszyEQ23WyMj47JfXoGDiipp/
IZPL3fiQlLqaXkjcy0fHBuhSqlMdf1gIhs/vnudPxglJAw3LwDr2PPgH3g69OQjI
HyKU6XyA08RfbD7Lhgm2m7HtjPcnlpA98dPU72ry2c9+pMPxI1X8cSVK4aKxNHR9
SLEs34tyl4TpVHgTKE3d4iGdE7Ip82SSbl8be5U/veHmv2yyxVXI8KItQONFNsQ/
d56kMxJn6QoWJOyK/70GYt0qN1qcEB86Lviky8lOLKLqW5uiU5L0d9U0uhdgpdEq
LtBZ1zw0RkW3QNT5l8KSJESXFkcL5e2vPiaVUr5a4htIqTmB/z85YA==
=GxGp
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/E_k1jPXlXvY/m/K4dwyuBBTHcJ", "n_sections": 40}, {"thread": "Fdm3lEUS5N0", "msg": "Wy5QA22t24EJ", "author": "David Hopwood", "date_disp": "Nov 28, 2001, 9:01:30\u202fAM", "subject": "RSA key generation with a given public exponent", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Crowley wrote:
> d...@mozart.cs.berkeley.edu (David Wagner) writes:
> > [*] These numbers are selected to be reasonably fair for a system where
> > encryption time is the dominant cost.
>
> I'm not sure this is a common case; there's usually one decryption per
> encryption, after all. However, the case where signature verification
> time is the dominant cost (and is performed on smaller platforms than
> signature generation) is I suspect very common, and e=3 is a big help
> there.

Also, if you're using RSA in a key exchange protocol, the weaker peer
can do the encryption.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPATuLTkCAxeYt5gVAQEVtggArZZ9fxVPxum0OlmXIdbTocUuVFc7d8Dr
LhSJFoOfb6HtCxqm5LHEMAdgdRbzsYuNoYJNWQ/4qZhWqULziRfbg6K+YkjE55sf
E7FnF31artd1ZT0LDgNkGJywqVyBs7ymjw+XW1heBo8RaBEncpWcmJX/RgHJpw/2
86HF/qNt4sCLG1crDXBSEYRSBpdlKnSRDL1CXvUNW52d4N8qQ+2g3cSIuovXl+Dc
+2aBfYN+l21CeUEFpc/BH2aFkPnr93wKuXd2w2pGSQXGHdrUc0iAPAEjnf7n5MUQ
5k0QSqWpQbp+dGU+WhehVGyzfp5FOLORj+By50n5h+5VXXOtB5WCeg==
=pjsO
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/Fdm3lEUS5N0/m/Wy5QA22t24EJ", "n_sections": 35}, {"thread": "HGxPk0-dwyE", "msg": "hZl0h1XerNAJ", "author": "David Hopwood", "date_disp": "Oct 19, 2001, 1:27:39\u202fAM", "subject": "SSL certs and DNS hijacking", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Anne & Lynn Wheeler wrote:

> if you hack into the infrastructure ... you can subvert almost any
> authentication scheme ... for instance the server domain-name PKI
> certificates can be subverted by hacking the domain name
> infrastructure with a domain name hijack ... and then applying
> for a PKI certificate for that domain name. Since CAs have to rely on the
> domain name infrastructure as the authoritative agency as to domain name
> ownership ... it is then possible to get issued a valid certificate for
> that domain name.

I was under the impression that what is *supposed* to happen is that the
CA contacts the domain name authority directly over an authenticated
channel, and therefore doesn't have to rely on DNS. (In the case of
Verisign and .com/.net/.org 2nd level domains, the domain name authority
is run by the same organisation as the CA, so you would hope they would
at least get that right - although maybe not given Verisign's past record.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO8+5oDkCAxeYt5gVAQEe7ggAxPrqAyhjkSiHSG8uo+coxTU57n1pqWgD
V3uRTu6p/uzktIoviis5KRHsfHytlk9e2NuUpp8mN6n7ySFPfj0vd04mtO6u8pbP
bmMBzV93N4PWzeagMURAtW2i0Fu3UHJ7wr2CojDsYen2QhPkPjAxa7mhZ95DVqJI
RRblq0IcvG9cjnx4kqkcFnSL4lHxjkkNNBaI7vHZGiLtlMZHfl6FRiD87GPPpRkc
0bGqZX4iWrmDUAXx63yw0yVAgm5HivniYoyowD3M30oaWZRPEGjpDe3FOABnoRqV
yZwQXl+LlNSRu51TP4+HdUONdknKmUvFsUxL9f77BbuZVKLylW9/bw==
=FbbI
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/HGxPk0-dwyE/m/hZl0h1XerNAJ", "n_sections": 42}, {"thread": "HXiv57AHA68", "msg": "xbownixRR2EJ", "author": "David Hopwood", "date_disp": "Dec 14, 2001, 11:35:13\u202fPM", "subject": "Discrete Log Question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> Suppose I have a prime P such that P-1 has a large prime factor Q [say
> 256-bits or so]. Such that R = P-1/Q and P = RQ + 1.
>
> If I choose some value of g such that G=(g^R) mod P [G != 1]

... and g != 0 (mod P)

> then can I use the system (G,P) for DLP related problems?

"DLP related problems" is too vague; for some protocols yes, others no.
A class of attacks that needs to be considered is "Lim-Lee attacks" -
these attempt to find information about the private key modulo small
factors of R.

For example, consider the DLIES encryption scheme as defined in IEEE
P1363a (either "DHAES" or "non-DHAES" mode), and suppose that the
ephemeral key is not validated on decryption. [This validation step
is still marked as "Optional" in the latest draft of the standard,
despite my objections.]

To attack DLIES in this case using a Lim-Lee attack, the attacker
(who plays the sender) first creates any ciphertext C.

Let V \\in GF(P)* be the ephemeral key used for C,
Z \\in GF(P)* be the Diffie-Hellman agreed value for C,
x \\in Z_Q be the recipient's private key (unknown),
k be a small prime-power factor of R,
A be any element of GF(P)* of order k.

Guess the value of x mod k as x'. Create a new ciphertext C' with V
replaced by V * A, and the agreed value replaced by Z * A^x', and send
C' to the recipient. If C' is considered a valid ciphertext, then the
guess x mod k = x' was correct (because A^x = A^x'). Repeat up to k
times to find x mod k, then repeat the whole process with other small
factors of R in place of k.

This is a ciphertext reaction attack, i.e. it is a chosen ciphertext
attack that depends only on being able to determine whether the recipient
considers a ciphertext valid (like Bleichenbacher's attack against
PKCS#1 v1.5). The cost (number of ciphertexts required) is dependent
on the *sum* of the small prime factors of k. Once the value of x modulo
the *product* of these small factors has been recovered, it can be used
to decrease the cost of square-root attacks against the remaining entropy
in the private key.

Lim-Lee attacks can also be applied to various other discrete log
protocols (in any group) that haven't been designed to prevent them,
including plain Diffie-Hellman key agreement as it is normally described
in textbooks.

The easiest and most efficient way to prevent these attacks when the group
is GF(P)* is to use a "Lim-Lee prime" for P, which in your notation means
that R must have *no* small factors (i.e. no factors less than Q). Note
that this is a stronger requirement than R not being smooth.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPBrSGDkCAxeYt5gVAQHQ8AgAmmpS6Ohjlm0v9PVhje74nZW4KKyDsgZt
hBUWcDXVXujECFAHeGj0zd57Ag+VDVr5dBN5utq1r942CTtM4R11KSEjxKG1NRdv
SqZU+c6hMW3UEHGfb2ovyLIAbGzhWtB//SQa23YqL0I2q3Hl5lGJ2NiNCORoOS/5
/VtEbbvm71yvRejAwZ6Mt0YNpfx81ZuDtgYuc7WuoQWbjC74WBy0tMUshi6R/JXH
h021r4K26Da9t/jmAQeeYfsl4T4C3fB1SDpN3nOF//6nodcyiJVIZ0xzN6ifgPZv
Ca3TrnGRPd57abHhMysRqS3DYInOI6NfHXn2XkPWUcMDvvqbUvvMRQ==
=KZn8
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/HXiv57AHA68/m/xbownixRR2EJ", "n_sections": 15}, {"thread": "HXiv57AHA68", "msg": "1VoGcIsfYIUJ", "author": "David Hopwood", "date_disp": "Dec 15, 2001, 9:54:49\u202fPM", "subject": "Discrete Log Question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> "David Hopwood" <david....@zetnet.co.uk> wrote in message:


> > Tom St Denis wrote:
> > > Suppose I have a prime P such that P-1 has a large prime factor Q [say
> > > 256-bits or so]. Such that R = P-1/Q and P = RQ + 1.
> > >
> > > If I choose some value of g such that G=(g^R) mod P [G != 1]
> >
> > ... and g != 0 (mod P)
> >
> > > then can I use the system (G,P) for DLP related problems?
> >
> > "DLP related problems" is too vague; for some protocols yes, others no.
> > A class of attacks that needs to be considered is "Lim-Lee attacks" -
> > these attempt to find information about the private key modulo small
> > factors of R.'
>
> I don't see how.

I thought I explained that, using the example of DLIES (but there are more
details below). Lim & Lee's paper is:

Chae Hoon Lim, Pil Joong Lee,
"A Key Recovery Attack on Discrete Log-Based Schemes Using a Prime Order
Subgroup,"
Advances in Cryptology - CRYPTO '97.

> If you don't use a sub-group of order R then I am not giving you any
> details.
>
> For example, if G is of order Q then how do you use the fact that R could
> be smooth?

Whether R is smooth is not the issue; the attack finds some information
for *each* small factor of R. There is no requirement for all of the
factors of R to be small.

I should have said that R/2 must have no factors less than Q; clearly R will
be even. Note that R being even means that the above attack can still obtain
one bit of information about the private key, even when a Lim-Lee prime is
used. However, it's easy to see that knowing one bit of the private key
can't improve an attacker's advantage by more than a factor of 2. In
practice it can be compensated for by making Q one bit longer.

> > Note that this is a stronger requirement than R not being smooth.
>
> I still don't get how this works. I agree that if the order of G has small
> prime factors then you can reduce the DLP to DL problems in the small prime
> sub-groups. This is not the case as I said above. I'm using a base with a
> large prime order.

A received value can't be assumed to be in any particular subgroup unless
you actually check that it is. That is probably the most common mistake
in design and implementation of DL and EC protocols - because subgroup
checks don't affect how the protocol works in the absence of an attack,
it is easy to miss them out.

The variants of DLIES that are attacked above do not check that the ephemeral
key V is in the subgroup of order Q. Therefore, by multiplying the ephemeral
key by an element A from a small subgroup, the attacker can get the target
(in this case the recipient) to test the result of a computation in that
subgroup:

let Z = V^x
(V * A)^x = Z * A^x' <=> A^x = A^x' <=> x \\equiv x' (mod ord(A))

If x \\equiv x' (mod ord(A)), the ciphertext is valid; otherwise it is not.
So, whether the ciphertext is valid can be used as an oracle to test the
value of x mod ord(A).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPBwMuTkCAxeYt5gVAQFBVwgAwyu6BJw8dh4XXXEh23wRg8rmMNz5jJu6
qwkBcHMIs51hAo6FhjkIgbtrffOFM+jpf9ICRtLk9zE+cKnYHTiv7IFh82ZpXNr6
dUXwDJvCKzVQdBudN8kRjCLMis6KIkN8NA9ClIcAyNqi4hd0wXCpfDEL1KryXpTS
llYNOYX3uYsJ5VNIgWByxDkoekURXNBDdS8kSBbx009j03KtSfPGLUpi8YATQmrp
X3j7mdwt2PjnzntHvWVpNh9hE0GYofmmhAJo6GQtTG4erbAofB7jvz5h7+48lOoP
SCDzZ4VizkLtVs9L2Emq6oDqtz+oyJiMeBUNlol4W7VYkIHI1qsVfQ==
=BZ7f
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/HXiv57AHA68/m/1VoGcIsfYIUJ", "n_sections": 15}, {"thread": "KPkBaFxxhP4", "msg": "sE2iSgqUC64J", "author": "David Hopwood", "date_disp": "Dec 23, 2001, 6:08:21\u202fPM", "subject": "One pass encryption+integrity", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Goldberg wrote:
> Ursus Horibilis wrote:
> >
> > "John Myre" <jm...@sandia.gov> wrote in message
> > news:3C2363C9...@sandia.gov...
> > > Gregory G Rose wrote:
> > > <snip>
> > > > OCB mode is the only one mentioned that doesn't
> > > > require padding, being basically a stream cipher.
> > > <snip>
> > >
> > > I think that it would be stretching things too far to call
> > > OCB a stream cipher. The data is processed in whole blocks
> > > until the end, where the last block is treated specially.
> > >
> > > What's your definition of "stream cipher"?
> >

[...]


> > "Block ciphers operate on blocks of plaintext.... With a block
> > cipher, the same plaintext block will always encrypt to the
> > same ciphertext block, using the same key. With a stream
> > cipher, the same plaintext bit or byte will encrypt to a
> > different bit or byte every time it is encrypted."
>
> This seems to imply that block ciphers never ever use any chaining mode
> other than ECB... At least if you consider block and stream ciphers to
> be mutually exclusive.
>
> > Thus, it appears that through the use of various feedback
> > modes, block ciphers are converted into stream ciphers.
>
> But OCB still operates on blocks, not on bits.
>
> Perhaps we should adjust our definitions a bit... either there is a
> region of overlap between block and stream ciphers (and OCB fits into
> that region, and is both a block and a stream cipher), or else we need
> to change our definitions in some other way.

We have:
a) keyed block permutation primitives,
b) constructions for symmetric encryption (and possibly authentication)
schemes based on an arbitrary keyed block permutation,
c) native symmetric encryption (and possibly authentication) schemes.

In the conventional terminology, a) are called "block ciphers", b) are
called "modes", and c) are called "[native] stream ciphers", but I don't
particularly like any of that terminology. The idea that there is a
dichotomy between block and stream ciphers is particularly unhelpful;
a) are primitives and c) are schemes, so they aren't directly comparable,
and they certainly aren't mutually exclusive.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPCZjljkCAxeYt5gVAQEFuAf+JaIUEzRtBbnd0C1rUU5JPgKpkbNxLynU
G42emcRw9Rv1IuTuSFbiAC4I0j7YOg/QcF1MD/03juyl7AC7DZEfIPo1ujOsJOce
Vb+366vA4rzYAEnx5xwNNmPT2h+adU5reTY8q7ZlwxIuLun4v0UH8tmH3SZQiEhx
hYlEYj2WxtYK9vIeMJ7oTYcagxHKLS9h8c3Ak4gNMP6fXvNjSjkIgtbxhNEijlSY
7UGwDYPBd41iYo0Sy8q+gGnr1yBhhqQDOsr/sIFmePquDsOhvSFS9+tyHJnXTKh0
xZFth46rF/AL0YfI52H7ikYvWRerO21QRG7HWul0iXl/IIstWcUMPg==
=TXoy
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/KPkBaFxxhP4/m/sE2iSgqUC64J", "n_sections": 32}, {"thread": "La2wOY9d1z4", "msg": "2weemQ4KyQsJ", "author": "David Hopwood", "date_disp": "Nov 28, 2001, 8:54:10\u202fPM", "subject": "Need help with Elliptic Curves", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Lena S." wrote:
> 2. Calculation of an order of a point on a curve.

Let E be any additively written finite group of order n, with additive
identity O. (E.g. E is an elliptic curve with n points, the point at
infinity is written O, and a.P means curve multiplication of P by a.)

Suppose the factorisation of n is p_1^e_1 * p_2^e^2 * ... * p_k^e_k.

For any point X in E, if a.X = O, then the order of X divides a. We can
use that to find the order of X as the product of its order in each of k
subgroups:

r := 1
for i = 1 to k {
// force into the subgroup of order p_i^e_i
Y := (n / p_i^e_i).X

// multiply r by the order within that subgroup
while (Y != O) {
r := r * p_i
Y := p_i.Y
}
}
output r

However, often all you need to know for cryptographic applications is that
the order of a point is "large". Choose a curve with order k * p where
p is a large prime, and k (the "cofactor") is a small integer. If k.X != O,
then X must have order at least p. This is more efficient than using the
above algorithm to determine the exact order of X.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPAWTzjkCAxeYt5gVAQG6mAf+LWwWKwX9YF0YFmGLiIymLFnovAp+rhFC
zCWKqfwpDgxte8BSV/tdfsSSON6EXAhBJxJqLVWfSwWNgxMvu9SdyWi1kZ+8nkoj
tEaBErGSPT5RqN4jeUtEU66yDLrrb8FOV+VtiChx7waohGK8k/nATWQrIvasTez8
es4fpWDvFJe9VBGGumnpVFNz9i+q5inWbOrX858voDzoRZiLJrRMAUJoFkN8Wl7U
BLglrvgYMH+epW4Lji5HmcqfMJP5dGJyu5L20zKqmi8CewE1H/rvQPQHIM7mlf4p
S6+2y+SvNkpBB1OcjFpk3vH0Xkna9CFZjSyNDfvD3xLRGeWbVTEk5g==
=PzzZ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/La2wOY9d1z4/m/2weemQ4KyQsJ", "n_sections": 8}, {"thread": "La2wOY9d1z4", "msg": "S-POIMd_bDUJ", "author": "David Hopwood", "date_disp": "Nov 29, 2001, 8:51:03\u202fPM", "subject": "Need help with Elliptic Curves", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

I wrote:
> "Lena S." wrote:
> > 2. Calculation of an order of a point on a curve.
>
> Let E be any additively written finite group of order n, with additive
> identity O. (E.g. E is an elliptic curve with n points, the point at
> infinity is written O, and a.P means curve multiplication of P by a.)
>
> Suppose the factorisation of n is p_1^e_1 * p_2^e^2 * ... * p_k^e_k.

This should be:
Suppose the prime factorisation of n is p_1^e_1 * p_2^e_2 * ... * p_k^e_k.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPAbd5zkCAxeYt5gVAQH/LAgAuGbO3/xh4yxPGVojFHqvaqHqAWWcppnI
fVU1SkBU+MnFiAkS1PjPtKz1x481B9iNf+/vJCfyZZTswSOXoAKyYXej62xHD/TS
HoDrQjjiv4LHRVkPnZegbH8j6ezXGKj1EPT/Uk2+xaHZbtUmSoiYIjLl6UnUnxws
1GFXievsAV9B2xheqGEyK/mSHxOb/jzxWvBBFsC0zV8xTlkWW9v2T+aOI/FgWmAg
mMtFr2ufRg7ZcTS34h5ys3cIGBPJLlqlRiaj4JE5qWYTpkZLxdRRYpiy9NRhadeK
p5Gzo+3iyFuWzr5/vgkuZ6d/nltDyYjJaIkktqpEUNOPpk1RXKYfGw==
=EZHS
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/La2wOY9d1z4/m/S-POIMd_bDUJ", "n_sections": 8}, {"thread": "MyCQFMeislk", "msg": "HHosGGCYMEIJ", "author": "David Hopwood", "date_disp": "Dec 22, 2001, 9:57:02\u202fPM", "subject": "Deriving keys from passphrases (was Re: RC4 Key Scheduling Vulnerability)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Goldberg wrote:
> Roger Schlafly wrote:
> > "David Wagner" <d...@mozart.cs.berkeley.edu> wrote
> > > On the other hand, in real deployed systems, it might be prudent to
> > > use RC4 in an even more conservative way: hash the IV and the key to
> > > produce the key material for RC4. This is how SSL uses RC4, for
> > > instance, and this seems like an even more cautious mode of
> > > operation for RC4.
> >
> > That scheme has the advantage that you can iterate the hash
> > 1000 times if you want to slow down the key setup (for the
> > purpose of slowing down brute-force attacks).
>
> Iterating a hash to slow down brute force attacks is less effective than
> simply extending the length of the key. Adding one single word to your
> passphrase using Diceware to pick that word adds 12.92 bits of entropy.
> Iterating a hash 1000 times adds about 10 bits of effective strength.

And doing both adds about 22.92 "bits" (more precisely, multiplies the
expected work factor by 2^22.92). Therefore systems that derive keys
from user passphrases should *always* use slow key derivation, in order
to maximise the effective strength of whatever passphrase the user chooses.

When designing a cryptographic system, the argument that it is easier to
just extend the key size is only valid if the *designer* can arbitrarily
choose the key entropy, which cannot be the case when keys have to be
derived from secrets memorised by users.

> Not to mention, adding one word to your passphrase hardly slows down
> things at all, and iterating a hash may noticably slow down normal
> operation.

Iterating a hash 1000 times will not noticably slow down normal operation -
especially not compared to the time it takes for the user to type in a
passphrase. Actually, 1000 times is too few IMHO with a typical hash function.
Iterate it for half a second [*], with some fixed minimum number of iterations
in case an attacker manages to interfere with the timer, then record the
number of iterations that were used with the ciphertext.

Actually, a better algorithm than just iterating a standard hash function,
designed to reduce the advantage of hardware attacks (albeit only by a
constant factor), is the bcrypt algorithm described in:

Niels Provos, David Mazi\u00e8res,
"A Future-Adaptable Password Scheme,"
Presented at USENIX '99.
http://www.usenix.org/events/usenix99/provos.html

Although this is based on Blowfish, I think it still makes sense to use it
when other ciphers are used for the main encryption.


[*] Note: measuring or waiting for a time period cannot be done properly
using any function that returns an absolute time (for example
System.currentTimeMillis() in Java), because that time is subject to
adjustment. Use whatever facilities the platform supports to measure
relative time.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPCVETTkCAxeYt5gVAQHTawf/ZHZgBm9bVsLvG6AdyUvx3qvU1PNDSv4t
v2V19TWeDxxHupphsrsX9KJ0S6Vhk3GsLzcbg+0yxchH2fRclqxUUSHj3ZZ5KLWq
LLpz8NWVfBjJcc/g/t8f5FrTlX4iQLI2uA676MJj6RzG8LL5wC/tItINkSnw5v/J
IQZykeBIgKOitkMvaMfjmSawPTImCa/OwoBSp0+AyADIbE93mbhw6YWsVU2z3Evp
82nboxiaaFVc+8CgNoKnn3gTVixJ4qq7jylexWm1R5Z8tRH+sgCnoXYTC2UbZZLv
AU6MCDQgx9iA4tTodC50j6oX9niMZhzb9JAY6h8uINVlGgaKBSu4cQ==
=VU7C
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/MyCQFMeislk/m/HHosGGCYMEIJ", "n_sections": 62}, {"thread": "MyCQFMeislk", "msg": "CYve8I2OFmkJ", "author": "David Hopwood", "date_disp": "Dec 22, 2001, 9:57:24\u202fPM", "subject": "RC4 Key Scheduling Vulnerability - Penny for your thoughts?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Scott Fluhrer wrote:
> David Wagner <d...@mozart.cs.berkeley.edu> wrote:
> > Personally, I wouldn't use RC4 in new systems (unless I had a compelling
> > reason); I'd use AES. However, the FMS attack only affects some systems
> > that use RC4, so for ones that aren't affected (e.g., SSL), I don't
> > think there's any urgent hurry to replace RC4 with something else.
>
> I agree with David -- as far as we know, RC4 is still safe for use, but
> we've found an amount of 'cryptographic hygiene' that needs to be followed
> in order to use it safely. Although it appears that you can use it
> safely -- and some current systems do it safely -- but for a new system,
> perhaps you should consider some other cryptosystem where you don't have to
> be so careful.

... where failing to be careful doesn't lead to quite so disastrous results,
it would be better to say. You still need to be careful, and in fact the
things that you need to do to avoid some of the attacks on RC4 (deriving
keys by hashing with salt, for example) should also be done for other
ciphers, including block ciphers.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPCVGqDkCAxeYt5gVAQGbvgf/ZE+PSleZh3V93K4583kA7idbs3fdV9/s
UckqWdP3mwVqNtKeJytylEdqk0m06kl8cRqoImllOE9hh/pNEhGih1bqE/x+m3wU
St0MD77tI5p2wKoxK+wiqKrQALTIHZ/u2znlbNvZvo4okULba8FCVnVxdYM/x2bA
bBYXkXUt6drOQMvvszUsSmhqk98M6HWlI4DvIIn0JHUKPOkydAMAYhOaL43hkikJ
3Sh66WgoZXX4Gee03EvkOvwB1TT4dX0nHCpW/7m+MmD6QMI8otczjrOmRzu8Jj3N
C0gBBhWqcntWFhJViyswYiACQDQ5ZecM1Xh6lMvcCC89beyxtSFmXw==
=mPwG
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/MyCQFMeislk/m/CYve8I2OFmkJ", "n_sections": 62}, {"thread": "MyCQFMeislk", "msg": "ZnJFnTNP1koJ", "author": "David Hopwood", "date_disp": "Dec 23, 2001, 5:34:21\u202fPM", "subject": "Deriving keys from passphrases (was Re: RC4 Key Scheduling Vulnerability)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

wtshaw wrote:
> David Hopwood <david....@zetnet.co.uk> wrote:
>
> > When designing a cryptographic system, the argument that it is easier to
> > just extend the key size is only valid if the *designer* can arbitrarily
> > choose the key entropy, which cannot be the case when keys have to be
> > derived from secrets memorised by users.
>
> Not necessarily so.

Necessarily so. The designer does not choose the passphrase, and therefore
he or she cannot arbitrarily choose the key entropy. A random passphrase
generation facility could be provided (based on diceware, say), but users
are *very* resistant to being forced to accept a particular fixed passphrase
generation method, which is understandable given that they differ in which
passphrases they find easy to remember.

> A key can be open to complex entries, combination of

> entries, alternate key generation routines, and default to a simpler key


> if a shorter entry is used.

I can't make head nor tail of this. What is a "complex entry" or a
"combination of entries", and how could using an alternate key generation
routine help? The attacker must be assumed to know the design of the
cryptosystem, remember. The issue here is making best use of the entropy
provided by the user, regardless of how it is entered.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPCXiojkCAxeYt5gVAQFkJwf/cj5ieF5ygEiMDeuIdUTYHxlVpGvVn10F
J0Sedp7U18kaEZIn1m/EhTTfp1zhY+rwOJ4bw8H8bSzxYgF+VrT3Zg86froztYCW
lIeuovmjCcgxKTLNKN5jPzBCRuw0fpxppH0YOHjRWhXG8bP3KcqQatcEbIGXwVlX
147y++QI5yP/Ya4/sCdCU8HYc3XFOmi7eq377npEfBBU+TDSM6tvcsYh+oCIdIe+
HM3xNQxOTtXr9uFFK9R4oBWjyjL2hqGW+GiA0l9NW6+FVHA/4qAIPzBulSiEkwmj
olaWBJot5xYkQRH9Xh/dJQKWGo+9RihXZSSCCZVZs50XtPsGlSDi4A==
=XwDw
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/MyCQFMeislk/m/ZnJFnTNP1koJ", "n_sections": 62}, {"thread": "QSEg3_pj6Bc", "msg": "8EOCyp1eeMUJ", "author": "David Hopwood", "date_disp": "Nov 27, 2001, 9:03:46\u202fPM", "subject": "Thiotimoline in crypography", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Goldberg wrote:
> Richard Heathfield wrote:
> > David Thompson wrote:
> > > How does one perceive negative waiting time?
> >
> > I refer you to a paper which touches on this important subject: "The
> > Endochronic Properties of Resublimated Thiotimoline". Published some
> > time in the 1940s or possibly 1950s. It deals with the matter
> > adequately.

A classic paper; I highly recommend it.

> Since thiotimoline dissoves 1.12 seconds before the addition of water,
> you would need, in the traditional construction, 3215 endochronometers
> to build in a battery in which the last tube's thiotimoline dissolves

> about 1 hour before solvent is added to the first tube. ...


>
> With my proposed method, you would only need sufficiently many
> endochronometers such that the solvent evaporates before that unit needs

> to be re-used. ...


>
> To use these in cryptography, simply build 128 temporal batteries, each
> set on continuous cycle. As soon as your brute force calculation is
> done, add water to the appropriate batteries, indicateding the
> calculated bits. This message will go back in time to the point that
> the machine was set up.

Unfortunately this still requires the machine to be in operation for
long enough to brute-force the whole keyspace, which may be unrealistic.
That drawback can be solved as follows:

1. Set up an array of temporaral batteries that will indicate a point
in the keyspace, in binary.
2. Observe the result from these batteries, and brute-force a small
block of keyspace starting at that point.
3. If the block contained the correct key, add water to the batteries
to send that block's starting point back in time.
If the block did not contain the correct key, add water to the
batteries to send the *next* block's starting point back in time
(wrapping from the end of the keyspace to the beginning if
necessary).

As described in Asimov's paper, the system will attempt to reach a
consistent fixed point; the only such fixed point is where the machine
chooses the correct block first time, so that will be what happens.

I disclaim responsibility for any disruption to the space-time continuum
that results from attempting the above procedure. In particular, running
the machine on data where there is no solution for the key is not
advisable :-)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPARFfzkCAxeYt5gVAQFUrwf/WYoE3svArl7ucAYCRqT6HD+w0dqf/jPN
VmaMdKx0/DcdAme9IwXxrk2ypjsNqyNthYxjtjw29/5XgTE4sB3jeyq12erEDEYN
CIDFDX5jgcJQ2xBvFIcHC0sIo8/X9JdVxLvxM9VQiJUCcs+2CgyvgYXjWvIyf0pb
RO3/9lO2FxfKEqMQyM1Y882HmgDA/pxRMB6bKxlQqTRidug9kEw6sFvLf6bdcR8S
mEgl6jxMSageUsCMstRfBkioe/b4QQhgGMhz35ssVZaiK+TnqtixsMJL3v6112jy
a/PzEAmZudQ5L1sWJHKbEMowT1LsZpko328hltP3rvtTVBbF/2iHUw==
=JZRW
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/QSEg3_pj6Bc/m/8EOCyp1eeMUJ", "n_sections": 13}, {"thread": "RMo6hcae6Pg", "msg": "EWZH0PbgdHAJ", "author": "David Hopwood", "date_disp": "Dec 21, 2001, 9:21:56\u202fPM", "subject": "Shor's algorithm", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

fl...@safebunch.com wrote:
> Thursday December 20 01:23 PM EST
> IBM Claims Historic Test-Tube Quantum Computer
> By Tim McDonald, www.NewsFactor.com
> IBM (NYSE: IBM - news) scientists said Wednesday that they have designed and
> built a new molecule that enabled them to perform the most complex quantum
> computation to date, a feat that could have significant implications in the
> field of computer cryptography.
>
> The molecule, IBM said, has seven nuclear "spins" -- the nuclei of five
> fluorine and two carbon atoms -- which can interact with each other as
> quantum bits or "qubits."

Would that be "spin" in the quantum theory sense, or the PR sense?

> 'Unprecedented Control'
>
> The scientists converted a billion-billion of these custom-designed molecules
> in a test tube to create a seven-qubit quantum computer.
>
> They executed the "simplest meaningful instance" of Shor's Algorithm, and the
> computer correctly identified three and five as factors of 15.

That doesn't make sense. It isn't possible to execute Shor's Algorithm for
N = 15 using only 7 qubits. The most qubit-efficient variant of Shor's
Algorithm, AFAIK, is the one described in [Sei00], which would require
at least 8 qubits even excluding working space and error correction.

(Note: I am excluding variants that don't work for general numbers, such as
the one given for expository purposes in section 3.4 of [Pit99]. It's obviously
unreasonable to claim that you have factored anything by using a special case
that only works for N = 15.)

Can anyone who has read the paper summarise what was actually done?


[Sei00] John-Pierre Seifert,
"Using fewer Qubits in Shor's Factorization Algorithm via
Simultaneous Diophantine Approximation"
http://eprint.iacr.org/2000/036/

[Pit99] Arthur O. Pittenger,
"An Introduction to Quantum Computing Algorithms"
Birkh\u00e4user, 1999. ISBN 3-7643-4127-0.


> Thursday December 20 03:05 PM EST

> Efforts to Transform Computers Reach Milestone
> By GEORGE JOHNSON The New York Times

[...]


> Factoring is what mathematicians call an intractable problem. It is easy
> to factor small numbers, but as they increase in size, calculation time
> grows exponentially. In 1999, experts set a record by factoring a 155-digit
> number a feat that required 292 computers grinding away for half a year.
> Because of the exponential nature of the problem, factoring a number twice
> that long could take hundreds of millions of years.

Hopefully I don't need to point out what utter bollocks it is to say that
the time to factor (by conventional algorithms) grows exponentially with
modulus size.

www.cryptosavvy.com estimates 310-digit (~1030 bit) moduli as being safe
only until:
2010 using the default assumptions,
2015 if you adjust the protection level so that 155 digits are considered
safe in 1999,
2029 if you consider 155 digits safe in 1999, and halve the rate of
progress for factoring algorithms and Moore's law.

> This is possible because a quantum computer's counters consist of single atoms,
> which can point up or down, indicating 1 or 0, the two symbols of binary
> arithmetic. More important, quantum mechanics allows an atom to point both up
> and down simultaneously, indicating 1 and 0 at the same time.
>
> Thus two atoms can simultaneously register four quantities: 00, 01, 10 and 11
> (the numbers 0 through 3 in the binary tongue). Three atoms can hold eight
> numbers, four can hold 16. By the time you reach seven atoms the number
> harnessed for the I.B.M. experiment you have a tiny device with the capability
> of simultaneously registering 128 different numbers. Flipping the atoms up and
> down in various patterns causes a calculation to be performed on all the numbers
> at once.

I must remember that quantum computing is done by "flipping atoms up and
down in various patterns". That makes it all so much clearer.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPCPuCjkCAxeYt5gVAQEgzQgA0H4U1CtP3vF4OkYnA3A1+ADgYZC67Qda
J71nZkbmjawV7LCH8d9otEUnzzEd4n8/tjGRbk4w7K1/AeipzYKscuzJKjc4dtow
6b4POsbxtnnFMKsE/Fj23M2UCKgqFsRpPcBNiApdzDjW3fm9ZPaaVyZVBd0cmxi3
+/Uh6YWePJ1aoga+PS0vh7NQ41oKrL0KU6J2Y+Fu75Ie/0NcyvchMozJIZKztVwc
jyQlXYXNWDIzN8X5DJ5gz3BPWZ6OraG40t84A8/ldl+b0lIqU2UwWo0GG9huRC6h
QxuqlxDxoT0xVOO9+fK3cmhmDMrydpzd3VjcWBUC4qRNZh71RS4bbQ==
=z7UB
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/RMo6hcae6Pg/m/EWZH0PbgdHAJ", "n_sections": 16}, {"thread": "dmEj9WPGrWc", "msg": "guJR6ZaiPdMJ", "author": "David Hopwood", "date_disp": "Dec 18, 2001, 10:39:51\u202fPM", "subject": "Teaching secure programming (was Re: Java Crypt and Security)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Ursus Horibilis wrote:
> "Joseph Ashwood" <ash...@msn.com> wrote:
> > Speaking as someone who is a fairly recent graduate from a
> > university that is generally well-respected (University of Southern
> > California, class of 1999) I can tell you that people still aren't
> > taught to watch for buffer overflows, in fact in college I
> > continually had my grade lowered for making the effort to verify
> > buffers, use heap allocations, and a great many other things that
> > are extremely useful for security, but for some reason frowned upon
> > by CS departments.
>
> That could be taken as an awful indictment of the system except
> for one salient fact: there is a difference between an
> assignment that asks you to express an algorithm using a common
> programming language and an assignment that asks you use that
> algorithm in a production programming environment. It's almost
> like the difference between science and technology.

I disagree - code that doesn't do these checks normally has undefined
behaviour in those cases, and therefore should be considered incorrect
(except where the preconditions of a function imply that the insecure
cases cannot occur). Code that does do the checks certainly shouldn't
be penalised.

> I can sympathize with the people that have to evaluate and
> grade the assignments for not wanting to wade through layers of
> "if memory allocation failed then printf an error message and
> return NULL" when all they're trying to do is see if you know
> how to allocate and link a new node into a two-way list.

"assert(p != NULL);" would be sufficient; that hardly requires "wading
through layers" of error checking. If a university doesn't want its
students' code to be cluttered with such things, it should ask them
to use languages that support exceptions, bounds checks, and garbage
collection. In C, the check you've just described is required for
correctness.

> Even when I was in school, the faculty was pretty faithful
> about pointing out that they were not trying to teach people to
> be programmers; they were trying to teach them to be computer
> engineers or computer scientists.

This is absolutely a computer science issue; insecure code is usually
insecure because it has assumed something that is not actually implied
by the relevant preconditions, postconditions and invariants. Teaching
people how to write secure code is also teaching them principles that
are useful for other aspects of software engineering.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPCALtzkCAxeYt5gVAQEC9wgAq+vaQpE9sqq+pAOMP1jxso1ABhbkwLCV
v41QV/IPaqhoqcCzwLzDSzGno66LgbUockaZavRGPlVcm0PqWBxgYut7gnTbPsPu
ssyqVHPBJc5ROf4FgztnwWGVw13snzWQrufev9q2ZaGMUsyU85AHGsfvz7+ISfrv
6L1r6FjSCaV+57kuKuYsqNydn9wSMqOZ5u5gjbknC/zmaJtR5pEEEWatj9fVzAm5
CXPTk4lLtze6plgnLUCQ2eDAIPZGrQPCbmbQcDseBbl42dnrX0YpmPle3MAGfPlu
LBXqd1bHQ3XAulHmHN45vRuoXSrAZC1yJKLzrYCdUmXuubMTpof8ig==
=xr0K
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/dmEj9WPGrWc/m/guJR6ZaiPdMJ", "n_sections": 84}, {"thread": "dmEj9WPGrWc", "msg": "opquzZ-JAIoJ", "author": "David Hopwood", "date_disp": "Dec 18, 2001, 10:43:15\u202fPM", "subject": "Software abstraction (was Re: Java Crypt and Security)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Richard Heathfield wrote:


> Paul Schlyter wrote:
> > Most software tools can be used for more than just one single line of
> > work. I'm well aware of the versatility of C, however C's greatest
> > disadvantage is that you _always_ have to keep track of all those small
> > details. That's just too much for very large and complex projects.
>
> That's not really true. I can use strcpy() without worrying about how
> strcpy() works. All I have to know is (a) that it does work, if I use it
> properly, and (b) how to use it properly.

Recently I came across an implementation of a C runtime library where
strcpy *didn't* work - the author had tried to optimise it to copy words
instead of bytes, and that failed for a processor that insisted on aligned
accesses. Needless to say, the strings I was copying were *usually*
word-aligned, so it failed only occasionally and apparently at random.

(Of course this could have happened in any language; my point isn't that
it happened in C.)

> In the same way, I can build
> up a library of routines which encapsulate complexity, so that I don't
> need to worry about the internals of those routines except when actually
> writing them. If I encapsulate the complexity properly (e.g. tight
> cohesion and loose coupling), I can more or less ignore the vast
> majority of the real complexity of my C programs.

Absolutely, as long as it is kept in mind that the library routines can
be incorrect. That argues for a white-box approach to abstraction and code
reuse, where the source for any components that are relied on can always
be viewed, and if necessary, changed (even if they are part of the
operating system, runtime library, compiler, or other infrastructure).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPCAMnjkCAxeYt5gVAQHydgf+PT3SOBd6s+HLkEXV/gYM8H6tlb0oiFO0
+h+Ndv5QjQcFNZk8kYLTKTvgmiMp44CjgBusbFoMIc0x5UeE/6IalIATGqM+hJDP
9OaclLDHQCZhSjIZTQEBDeYzIw34ZSpYymMe+0JdTutXnTbnjXf6xzCFfve/PHvm
gP1CbQauMLGygiKlldaEptc6d8rmjwU+7/dHjiJ7tTFZQQOATNdoqSonGf1Fsobk
J+jzFxl8r/B50ucxz3KRTerDyyOqqHTCM/pRBrxCvDauBeaP+mAyXFfn2XuzRf3R
OcL4lzG/Y4qe05dgtYkX/avR5nsxBqHrOoWm/Ys7SvpjUWzOGhAGsw==
=Urvx
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/dmEj9WPGrWc/m/opquzZ-JAIoJ", "n_sections": 84}, {"thread": "dmEj9WPGrWc", "msg": "z12JiWTrbdMJ", "author": "David Hopwood", "date_disp": "Dec 22, 2001, 5:53:03\u202fPM", "subject": "C pointer semantics (was Re: Java Crypt and Security)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> "Richard Heathfield" <bin...@eton.powernet.co.uk> wrote:


> > Tom St Denis wrote:
> > > Instead colleges like mine start by teaching C++ [poorly I might add,
> > > for example, my C++ teacher was convinced that pointer types [e.g pointer
> > > to char, pointer to int] are different types.
> >
> > They are.
>
> They point to different things, underneath the abstraction they are the same
> thing.

No. Underneath the abstraction there is nothing to stop them being represented
differently, and there are C implementations that do represent them differently.

If you want a pointer type that can refer to either a char * or int *, use
void *. (I'm assuming a proper implementation of C that supports a flat memory
model, so that kludges like 'far' are not necessary.)

> Two variables which contain addresses. On the same machine they are
> most likely going to be the same size/nature. e.g. why would you have
> different address spaces for chars and ints?

Because, for example, some architectures (including some modern architectures
for DSPs) are only naturally word-addressable, and doing extra work to keep
track of the char position within a word would be inefficient when the code
only requires an int *.

> > > Which is wrong since you can do
> > > int *a; char *b; a = b;
> >
> > Undefined behaviour. Don't give up the day job.
>
> Actually its perfectly legal.

No, it has undefined behaviour. ("b = (char *) a;" would not have
undefined behaviour IIRC, but it would still almost always be poor style.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPCUOhzkCAxeYt5gVAQHaKQf/UVjkTthpa9GpliJ4j/ZK6TQHnKvsgozg
+eAcd5BGe3yPtAwCZlkw8n7JHMjqpt0uVVop+cAuiBr6sTWmphJoEdHjmDwxFKq3
fj0M57/YV9vir/VZ+WGyE5toROaCHdgshhb4aCgPrDCoX9ybjcIxf0GIpHqeJHF9
WPvx2JEmCYKhCsenJZPX4IwN6JlmRwaDRFBcF1T1c90cXB8G9MxtlIqy4+am2bjF
/x+2YYGSpWKsUXQYhwX5uc8tYITy036UsWmD93cES0g1nnj/663J9x5H/pGNlRdw
vfBGyp0RIgOrDj6gQMcYdL3Bt036aP8l9KhNgyEUypub6zSMTC2KPA==
=svEK
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/dmEj9WPGrWc/m/z12JiWTrbdMJ", "n_sections": 84}, {"thread": "ehCLFxMnQRU", "msg": "XfL7UN2ZaxEJ", "author": "David Hopwood", "date_disp": "Dec 3, 2001, 2:56:59\u202fPM", "subject": "AES Critical Comment-warning why?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

John Savard wrote:
> For these people, I would suggest the following three "real" issues
> that at least make solid starting points for a critique of the AES,
> even if they would not lead to one as devastating as they might wish
> for:
>
> - As noted, there are certain symmetries in Rijndael that, at least if
> it were a cipher with a different structure, would imply that a key of
> 224 bits would eliminate some weaknesses, and that key length was
> eliminated in the final standard;

What is "if it were a cipher with a different structure" supposed to mean?
It has the structure that it has (a Square-style SP network). If your
conclusion is that the weakness you were thinking of is not relevant to
SP networks, make sure you say that, otherwise newbies may get the wrong
impression.

> - The emphasis on security in the AES process was somewhat limited; if
> no known attacks existed, and no new ones applicable to the specific
> cipher were found during the short time the decision was being made,
> the cipher was deemed acceptable. The final choice between ciphers
> instead depended strongly on which cipher could be given the speediest
> implementations on the most limited hardware. This makes sense, when
> the goal is widespread practical use with existing technology.

This is all true.

> - Shortly after the five finalist algorithms were selected, a
> statement relating to a review of those algorithms by the NSA was
> released. Its wording was such that it would have still been true if
> the NSA was satisfied that it could break all five of those
> algorithms, although it was clearly intended to be taken as a
> statement that all five of those algorithms were sufficiently secure
> for the intended use of the AES.

If someone does not trust the NSA's public statements on cipher analysis,
then they should not infer anything from those statements (at least, not
about ciphers); inferring a negative conclusion about Rijndael's security
would clearly be an instance of faulty reasoning.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPAvY+zkCAxeYt5gVAQH9wgf/XQpIIMlSVBVY0p3Uyzw3ciYDdEyYlH05
lYdIHVvh1HOiKfnKPdSn6TfAOsdzkzGaW73DRjADJRYdbyUp3CyOw9nBNG21b+tu
wsLj93G11G+PtrSaVW6Bd1vkKm6u/xN7V1+jQQSByQ7DsrAZ5rItl86/TbpUgnVP
nx1UOpBeqo6w8LR7tpr05cckDehe5QLK8aKohcKQhXSX3oiQsaLrKnpwUIFlvPSx
mZUUzP9HeqpmBXu2gwWxMjtAIyXGZ1S9k4yiKwNiDjcDDtoriMrbi0IUKW88niYs
/4L8UPpJanw2+XU0sCqtwlBWgBTm3VJNciQ/F9Grq7H0kuMUzrCx1w==
=UqUQ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ehCLFxMnQRU/m/XfL7UN2ZaxEJ", "n_sections": 91}, {"thread": "gSt2vVwyA7c", "msg": "d4KeLFRKaHQJ", "author": "David Hopwood", "date_disp": "Dec 28, 2001, 9:53:33\u202fPM", "subject": "Buffer overflow", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tim Tyler wrote:
> wtshaw <jgf...@vgrknf.arg> wrote:
> : Bryan Olson <non...@nowhere.org> wrote:
>
> :> In systems code, many kinds of errors can result in buffer overflows.
>
> : What's wrong with truncation?
>
> 1) the need to do it;
> 2) the possibility of forgetting to do it.

3) the possibility of undesirably changing the meaning of data by
truncating it.
4) [important special case of 3] a truncated string may be a reference
to a resource with different access permissions to the resource pointed
to by the untruncated string.

A field that is too long should often (usually?) be treated as a user-visible
error, not automatically truncated.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPCzvJjkCAxeYt5gVAQGDaQf/SX9Tn7JXwDC2efdv/sOJuAxwL6QP8I7X
sJHTEoa1lNEVdc3AsxOSdha0zrD20/joiBoA9/rRLEm6KsMQSQVC3f9H7+6Pca3G
qez6jLkqumKsdclskiPcmPH1Txm12bEPrHR4ctnurSVrskUhW9q5HWwfKtm0/ZV5
/0JwDKbsyFQYWBwDYPLYle/y9UBwithpSg9Pv/wWmtg2VIZ/noHPNyZ49sBAV0q/
IRsoREcPJBbgxVkPQlUqopDpGVG7seWnh0gcwsMxXE+O3OUcorWCGK24dbLOrB1L
aH5TCa5oFbekYcv9GpQGUD9lJl+jWBqedchRWzCLT3SqGy6UbGm9nA==
=tCCT
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/gSt2vVwyA7c/m/d4KeLFRKaHQJ", "n_sections": 100}, {"thread": "gSt2vVwyA7c", "msg": "Q2NtuEGMfYwJ", "author": "David Hopwood", "date_disp": "Dec 29, 2001, 12:41:47\u202fAM", "subject": "Buffer overflow", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Richard Heathfield wrote:
> Tim Tyler wrote:
> > Richard Heathfield <bin...@eton.powernet.co.uk> wrote:
> > : Tim Tyler wrote:
> >
> > :> Java has an always-accurate checker for buffer overflows.
> >
> > : And Java is not exactly noted as a speed demon, is it?
> >
> > Java is very fast.
>
> Really?

Really. Apart from start-up time and some specific libraries (e.g. Swing,
which can be avoided if necessary), JDK 1.4 beta is very fast.

> > ``Java is dangerously close to C performance. What used to be a dream
> > propagated by Java advocates with blind faith, is now a reality.''
>
> I'm still not convinced. The JVM forms an inefficient layer between the
> program and the machine.

Is the "inefficient" in that sentence based on ideology, or on observing
the performance of real applications? Code produced by a JIT or native
Java compiler runs directly on the underlying ISA with support from a
runtime library, just like code compiled from C or C++.

> > :> Over time, use of better languages will eventually effectively kill
> > :> off buffer-overflow security vulnerabilities.
> > :
> > : I presume use of better *programmers* is out of the question?

Better programmers alone won't solve the problem unless they also have
access to better training, languages, operating systems, and management.

> > Good programmers are expensive.
>
> True. And that's as it should be. Good programming is hard, and should
> be rewarded.
>
> > Bounds-checking is donkey work that
> > should be automated.
>
> No, it's not. Bounds-checking is sometimes the Right Thing and sometimes
> completely unnecessary. Example:

You really should know better than to post C code here in a thread about
program security/correctness without making absolutely sure it is correct.

> char uppercase[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
> int count[sizeof uppercase / sizeof uppercase[0]] = {0};
> char *p;
>
> while(*s)
> {
> if(isupper((unsigned char)*s)
> {
> p = strchr(uppercase, *s);
>
> /* do we check for NULL here? If so, why? */

isupper(c) is defined only when isascii(c) or c == EOF. So the code has
undefined behaviour when the string contains non-ASCII characters.

Actually, the result of the (unsigned char) cast is also
implementation-defined when *s < 0. What you probably wanted was
"if (isascii(*s) && isupper(*s))" (in which case you technically don't
need the NULL check, but it's still really poor style to omit it, IMHO).

> ++count[p - uppercase];
>
> /* bounds check here? If so, why? */

Because an automatic bounds check here would ensure that the error
you made above does not lead to undefined behaviour, and possibly a
security flaw.

> > Wasting your programmers time on this sort of thing
> > pisses them off,
>
> But good programmers realise that bounds checking is sometimes a Good
> Thing and sometimes unnecessary.

Regardless of whether it is necessary, it is harmless. (Even in realtime
systems with tight deadlines, if bounds checking were a problem it would
probably indicate that the system is working too close to the deadlines.)

> When it's unnecessary, to add it is merely a waste of cycles.

Most end-users have supercomputers on their desks now. A few more cycles
aren't relevant, especially when most user-noticeable pauses are due to
I/O, not computation.

> In crypto, which doesn't add any *value* to
> data at all, only *security* against what may turn out to be a
> non-existent threat, it's *crucial* not to waste clocks when you don't
> need to.

Every cycle is sacred? Bollocks. The performance cost of bounds checking
(and other checks done by 'safe' languages) would not be a significant
problem if it were used routinely in the vast majority of software.

In any case, undefined behaviour is unacceptable in any system,
regardless of whether there are any malicious adversaries to contend
with.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPC1XRzkCAxeYt5gVAQHnSQgAsmS8qdqe1h1uowaSpOOLLmot0YcX81Nj
qEeNgn2/akLXY7hP+nORL6tCL9mNS8jzmS5r4k8e6TgYc1Omxe7G/EGALBuQ0wHg
YXoen64vdUZe4rLbMvcKoA77OBjZfOvaqw4bB2aTMBvhfvsXgAGNgkHq2BpfxuOp
w5BlTnw0PGqCImLh6JP7hMXTA9OZ1cWfEtdn8xBjc0et6qmtS4+oAZu5GCTLQFMf
zrZVMyTnDB49C1vqeKhHYnSC0TFofHiBeTVdm1t79laYaJF5dN1PWX9fwELyVWJX
eYk0zseR1Aj2Kc3tPREJSBgv1EjXz34iGDVhFHl4ehV9Tz7I2lsFqw==
=rEbc
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/gSt2vVwyA7c/m/Q2NtuEGMfYwJ", "n_sections": 100}, {"thread": "iUitEbluzk4", "msg": "dB3piNxMDAYJ", "author": "David Hopwood", "date_disp": "Oct 23, 2001, 12:00:40\u202fAM", "subject": "Finding m^gcd(a,b) given m^a & m^b (but not a,b)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"hyd...@mit.edu" wrote:
> Is it possible to find m^gcd(a, b) (mod n) given m^a and m^b
> (Note: "a" and "b" themselves are unknowns).

I assume m and n are known?

If a and b are chosen randomly then there is a significant chance that
gcd(a, b) will be small, and in that case, m^gcd(a, b) can be found by
guessing.

OTOH, we could choose a and b to make this problem hard. Let x = gcd(a, b),
a = xy and b = yz. The problem is to find m^x given m, m^xy and m^xz.
Equivalently, set r = m^x; then the problem is to find r given r^-x, r^y,
and r^z. If m is of large prime order k in Z_n [*], and x, y, and z are
uniformly and independently distributed on [0, k), then this is
information-theoretically secure.

It should also be infeasible if m is of large order and x, y and z are
distributed in a smaller range - say [0, 2^200) - since in that case,
the best attack appears to be a meet-in-the-middle attack with complexity
2^100.


[*] Actually this condition could be relaxed; the proof is just more
obvious when m is of prime order.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO9Tq6DkCAxeYt5gVAQHSZAf+PhMjrnxzqxzJOfpajrNLlJi+HhRmnZeO
ANX2TS2ebbIBi/uZexmKryyFAxYXA5XEAvKnnOMr6Y0QaAoWeJwFxqYcMsLWMkEp
d25tozh2zqE1SjY27UyJ+kbYXHhPI7PG8VgM3FRa20As0y2H3aY6lOo9LbfxKqZE
Auh9tqv+hsUfI7eF4gq/lQUgryt5PBc7UUOlwR0WPF2uofe81qdcKzWn9Ns/ZTXV
WjhzmFEizgGTl1Cy3bDdtrJODABQlQ8S6t5pMu9b4CwtE1+nluTLYRxpKB79wuco
u7Xl3lvxqbRTeN0BeGt1P2UtCZosJjQusSqSQbKYyR+hGL62vL0e7Q==
=MsNf
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/iUitEbluzk4/m/dB3piNxMDAYJ", "n_sections": 33}, {"thread": "iUitEbluzk4", "msg": "Eo2glhwBtBMJ", "author": "David Hopwood", "date_disp": "Oct 23, 2001, 9:15:50\u202fPM", "subject": "Finding m^gcd(a,b) given m^a & m^b (but not a,b)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Hopwood wrote:
> "hyd...@mit.edu" wrote:
> > Is it possible to find m^gcd(a, b) (mod n) given m^a and m^b
> > (Note: "a" and "b" themselves are unknowns).
>
> I assume m and n are known?
>
> If a and b are chosen randomly then there is a significant chance that
> gcd(a, b) will be small, and in that case, m^gcd(a, b) can be found by
> guessing.
>
> OTOH, we could choose a and b to make this problem hard. Let x = gcd(a, b),
> a = xy and b = yz. The problem is to find m^x given m, m^xy and m^xz.
> Equivalently, set r = m^x; then the problem is to find r given r^-x, r^y,
> and r^z.

What was I thinking of? I mean that the problem is to find r given
r^(x^-1 mod k), r^y, and r^z.

> If m is of large prime order k in Z_n [*], and x, y, and z are
> uniformly and independently distributed on [0, k), then this is
> information-theoretically secure.

This is still right.

> It should also be infeasible if m is of large order and x, y and z are
> distributed in a smaller range - say [0, 2^200) - since in that case,
> the best attack appears to be a meet-in-the-middle attack with complexity
> 2^100.

And so is this.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO9YWLDkCAxeYt5gVAQGbMQgAyWUqWjdktTUjmTVp62huInBJZTefbAtT
2S5/2HCbtbkLxEWcqxMz4Ru+HsA7IU36so8i7nPVyvVxROYiFAQaGRPJ7wk1LXi4
8m/niDHM/anRXsE4s19A36ruV3ymoYS96zMhkp7MAgJ5A5smqC6aaHdsP6fx1JGi
swP5HSbs/jwRD2ofJ7gsglVXpKSHSi9iOwZrAJ9mNvW7xMillnYaowURk1MYkd4b
2L9nh+6f12E5kdUFxHsrinR97F/Y1EpT6juGHPJjwZKDS62qXIzPSWa9uhbywHYR
w/H/jTRh/d0lSB9iObB4lpwD/zJJ8fJChRixPG8Pmb+iSu8WgOtUxA==
=jBxE
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/iUitEbluzk4/m/Eo2glhwBtBMJ", "n_sections": 33}, {"thread": "mUaElpOLoIk", "msg": "BHBYSSj15PIJ", "author": "David Hopwood", "date_disp": "Nov 4, 2001, 3:05:13\u202fPM", "subject": "Come on, someone must have some knowledge of MDSR!", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Robert Tweed wrote:
> OK, I posted a brief question last week asking for information about MDSR
> and the only thing I got was 3 separate pointers to the same Casio website!
> (I'd already found that site in Google searches and I'm not impressed with
> it) The site in question is at http://www.casio.co.jp/en/

<http://www.casio.co.jp/en/prize_e2v.html> triggers several snake-oil
detectors, even ignoring the text and just looking at the maths: there are
some clear notational errors (e.g. the definition of op), variables that
aren't defined (e.g. Sigma), and complications that can't improve security
(e.g. applying an apparently fixed and unkeyed "bit-scrambling operator" S
to the plaintext).

Anyway, omitting S since it can't help, the nearest thing to a definite
algorithm that I can extract from that page is the following stream
cipher (or you could consider it to be a very simple block cipher with
an n-bit block):

r_{j+1} = A.r_j + c
C_0 = r_0 XOR P_0
C_j = r_j XOR f(C_{j-1}) XOR P_j

where each r_j, plaintext P_j and ciphertext C_j is an n-bit vector, c is
a fixed n-bit vector, A is an n x n matrix (it isn't clear exactly how
they define a rotation on bit vectors, but it seems to be expressible as
multiplication by a secret matrix), and f is an undefined "checksum"
function.

We can strip out the effect of XORing the checksum because it only depends
on the ciphertext, which leaves a very simple additive stream cipher; it
should be easily breakable with a few known n-bit plaintext blocks.
Of course, Casio would no doubt try to add more complications if the
algorithm were pinned down sufficiently to allow a definite break, but
there's no reason to have any confidence in the ability of whoever designed
this.

> Basically, I've been informed that this standard has been adopted by some
> standards agency or another in the UK for wireless encryption.

I sincerely hope not! Can you find out any more information about what that
standard was? In any case, good luck in your effort not to inflict this on
any other systems.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO+WfFzkCAxeYt5gVAQHrLQf/Y9WCYQxbcLY5ZhVMntWKiHes557xzXCs
6jn5BF5TQvWaR3If3aQvZtIWD8NuYYfkotB+KvWIn/9mB7oqmPHp5NnxkPeHWIhf
MmqYZMWeQN5L+twrb1h0AYPinOCaWwx77fGJ+94qdOaGZuCowIqKGQhvsOl1H802
p3dusEMWETZ25feHlz+WKtYF2t82WHCYOMYSdJW4G1Cfs6R7gz5QnnN94saPZqVr
R1YA6V0ulgADKXBXhjz1YNYGOJSGm/LP1PhuYx0H9p2YP7X5ZfuJELbSmVneG91p
MRRX7HmA5eijQH2hdo8y9A1t2skXV4K5C2AI246wdUhXGZ066tRCxQ==
=LmaD
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/mUaElpOLoIk/m/BHBYSSj15PIJ", "n_sections": 23}, {"thread": "oCQR9ADRzQA", "msg": "D_SMvDjZBZ8J", "author": "David Hopwood", "date_disp": "Dec 23, 2001, 5:31:40\u202fPM", "subject": "ECC material for comparison", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Vera Park wrote:
> Is there any material about Montgomery, Hessian, Jacobi, Weierstrass-form
> Elliptic curves?
>
> I wanna get something about that.

> Under what condition, Montgomery is the most efficient?

A web search (for "Montgomery form elliptic curve") turned up
<http://www.sdl.hitachi.co.jp/crypto/ok-ecdsa/>.

> Hessian

<http://www.cs.bris.ac.uk/Tools/Reports/Abstracts/2001-smart-3.html>.

> Jacobi

<http://www.cs.bris.ac.uk/Tools/Reports/Abstracts/2001-smart-4.html>

> Weierstrass

This is the form used by all the standards and popular descriptions of ECC,
and against which the more "exotic" forms should be compared.

Another motivation that some of the papers above give for using the
non-Weierstrass forms is better resistance to timing attacks. I haven't
looked at this in any detail, but treat anything that proposes using only
a restricted set of curves with an appropriate degree of skepticism;
potentially those curves could be less secure.

You can probably find other related papers from the bibliographies of
the ones above.

> And What is the advantage of these forms in cryptography?

Interoperability, and the fact that a lot more people are familiar with
it, are very significant advantages of the Weierstrass form. Unless you're
an expert or want to experiment on the cutting edge, use Weierstrass, at
least until the others have been subjected to more analysis and
standardisation.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPCZbLjkCAxeYt5gVAQHsEwf/RyJF75Kbvbcddb41/ZhGChNUnUwKkI55
quv+hmkiuj4DXT/roDOgaGDaFmkc8mWcwm2HyjJdMMSZjZuPmoKpJg3udH0lp/KY
uYhsJqmdhxYP1mKLAYj0qgvu4awxyyK9FH5IkNi4y+70LIWFwxOzbYvuXxD6Cgv6
Gx3yAgisvXz24s7owYmhBG24depIEIcqjlSmu/ZPJsmu/4gPXBlRcF4L0NdFSpOO
+8Ra/fd95pTu1ZgXcil1rdGrfOoEk+kbBTVWqxYSybw6XLWc5c4vR8ynU5htT2AY
AteBFqm+lnJsRWYnoOVtaLT8htQjR5bjQk9mz9YN/QyrfTJik6/zBg==
=zAUs
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/oCQR9ADRzQA/m/D_SMvDjZBZ8J", "n_sections": 3}, {"thread": "q4lmq9a1EGk", "msg": "7tbpr5NeTvsJ", "author": "David Hopwood", "date_disp": "Dec 17, 2001, 10:51:51\u202fPM", "subject": "little help generating crc result of 0", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Ursus Horibilis wrote:
> "mike hardy" <no...@m.for_me.org> wrote:
> > ... If I have, say, 64B of data and I generate the


> > CRC, what can I do w/the CRC such that running the same 64B
> > of data through again will get me a final CRC of 0?
>

> One of the respondents got it right. You can check the CRC two
> ways. One is to compute it on the received data and simply
> compare it to the received CRC. Duh! The other way is to
> append a CRC over the received data including the received CRC.
> If you did everything right, the result might be zero.
>
> There are several things to watch out for. Some standards call
> for initializing the CRC shift register to all 1's or some
> other non-zero value. In these cases, the check CRC might
> correctly come out to be some constant other than zero when the
> received data is correct. Also, one big source of problems has
> to do with "endian" considerations and the order in which you
> present the received data bits and the received CRC bits to the
> algorithm.

For more information about that, see

Terry Ritter,
"The Great CRC Mystery,"
Dr. Dobb's Journal of Software Tools,
February 1986, #112: 26-34, 76-83.
http://www.io.com/~ritter/ARTS/CRCMYST.HTM

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPB69MzkCAxeYt5gVAQFhXwf+OHvW1gLha4JwXM0YVj90MZ9u8VwxbgQw
vw1H3jcaSmlP/Lf+rHPbuD6FAjxpifMfWdUQbtROs38i6+HvRaVgVtRhPL/am9uU
dyC8+GiLj2yoVnvUZcYlUgRcyDALFB9rmWJKBm1qLg83lBz0SyrCVPanpp4aIb7a
JWx2cytkSG0Hnw/9TkcN1jZvV0rKK/CO5DREa1DGVM3ndPFDj3Efpuxz3assUP+3
a1vLXWFU6WSfVBEmYawFl/2688czOc2JhbTMeP7LGC7wt9lyqKtHMNMscdFFV2jy
5dnWHLTFf7Kdf7+OKqMaYp0heMKO31CgB8kmhQAWyxyWU1rGnOx8dg==
=jIme
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/q4lmq9a1EGk/m/7tbpr5NeTvsJ", "n_sections": 11}, {"thread": "swSld1KCSw8", "msg": "c3hzr7qbXooJ", "author": "David Hopwood", "date_disp": "Oct 21, 2001, 7:33:26\u202fPM", "subject": "Computing keys such that E_k1(p) = E_k2(p) for given p", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Andreas Sewe wrote:
[Is it hard to find k1 != k2 s.t. E_k1(p) = E_k2(p), for given p.]

> I suppose this heavily depends on cipher E, but is the above problem hard
> for all serious block ciphers; i.e. can one conclude that using any block
> cipher fulfilling common security requirements makes this problem a hard
> one?

No. In fact many ciphers have classes of equivalent keys, i.e.
E_k1(p) = E_k2(p) for *any* p. An example is Triple DES: (KA, KB, KB) and
(KA, KC, KC) are equivalent. A web search also turned up:

http://www.counterpane.com/deal.html
http://www.counterpane.com/safer.html
http://citeseer.nj.nec.com/context/991314/0
http://csrc.ncsl.nist.gov/encryption/aes/round1/comments/990414-mjsaarinen.pdf

This is generally considered a weakness of the cipher, but not one that
necessarily disqualifies it from use (as shown by 3DES, for instance).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO9NbJDkCAxeYt5gVAQFftgf+NTEap09Qo/x8hUlb7DmSM9LMJ/cyV0io
pOk3DU4okKlkPgp4lPejcuFdIvaDPHbUqwT654+3RW17Lyiy5t7RyvRQxQz/57vy
8subYRUXubXoT6AEZGda3Xk+uUGBt087NisOA1OpjCxXvUpyNhSRh0p2WSnBWwoM
E5Wv+ljBGETT1Idql8g4vWxCqtiJgxcKl7QSsCai893SMO4QUCIfdo8Pi2lGdCLc
9gAffOfjEbK+eF2ezcIuuPJiEPNxOVWSDAoTAw4sn+mpDS1VZk6gzO9JLkAS2fke
HVKkym5R0og6AL4vhd7BDDX77+1MS5JJceV2dpHo5KeqVfKj2L8xeA==
=bpYf
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/swSld1KCSw8/m/c3hzr7qbXooJ", "n_sections": 21}, {"thread": "swSld1KCSw8", "msg": "O2KjZ2INAxwJ", "author": "David Hopwood", "date_disp": "Oct 22, 2001, 6:41:38\u202fPM", "subject": "Computing keys such that E_k1(p) = E_k2(p) for given p", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Andreas Sewe wrote:
> > [Is it hard to find k1 != k2 s.t. E_k1(p) = E_k2(p), for given p.]

...


> > No. In fact many ciphers have classes of equivalent keys, i.e.
> > E_k1(p) = E_k2(p) for *any* p. An example is Triple DES: (KA, KB, KB) and

> > (KA, KC, KC) are equivalent. ...


>
> Now the classic counterexample is E_k(p) = p xor k.

I don't think this is a counterexample: k1 != k2 implies p xor k1 != p xor k2.

> > This is generally considered a weakness of the cipher, but not one that
> > necessarily disqualifies it from use (as shown by 3DES, for instance).
>
> Well, for the use I have in mind it would disqualify the cipher if for a
> larger number of plaintexts keys k1, k2 can be found such that [k1 != k2
> s.t. E_k1(p) = E_k2(p), for given p.]. A block cipher perfect for my
> application even has to have no such collisons.

Do you mean, no such collisions that are feasible to find?

In that case, hash k1 and k2 (using SHA-256, say), before using
them as keys. Then the attacker's problem is finding k1 != k2 such that
E_H(k1)(p) = E_H(k2)(p). I don't know of any reasonable hash or block
cipher for which this wouldn't be secure, and it is provably secure
in the random oracle model, considering H as a random oracle, and E
as a cipher satisfying one of the usual security definitions such as
IND-CPA. I'd suggest Rijndael with 256-bit keys (so that a birthday
attack with work ~ 2^128 is completely infeasible).

May I ask what application this is for?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO9SgIzkCAxeYt5gVAQGzjAf/QQs7EQcBbJnaKBqfHvX8QLcIoSsgEia2
+JOOpOwJIg5Ns7NQzV3TGm+6HseJ1+Z9YfPk3BqX/3RTU1a8Gt8KEOFIEcFCr6jH
6oRzeGjlL89ip8KkqgD4kmTxd94VrWQ329uoAs6VaQHHV2tFeM3QMHGmI3AHsCJb
rfuUzUx04bIwv3AUkvbCzwxASUrxw/1bv6BwZCaBwF+oE7CrZ732U6D5wVuEFpND
3676+74ncjBm8OAc3hrO7VTwscLJzitvCkhh072gCIs4BsNf+KIIBrGLVq7qw6QP
aqsBYqfyR92KJ9pIvN1ZEBPbaO/Jo0Se7HkJoDC+H20rhh+/7GQ2fw==
=qT/C
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/swSld1KCSw8/m/O2KjZ2INAxwJ", "n_sections": 21}, {"thread": "uu3LJpr1cg8", "msg": "5FiOWVKUcEUJ", "author": "David Hopwood", "date_disp": "Oct 19, 2001, 3:27:01\u202fAM", "subject": "FreeMe source - ecc.c,h", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> Nomen Nescio wrote:
> > Split into .c and .h files
>
> This looks like the beginning of a crypto program.
>
> Can you please stop posting source here...

These are about the most thoroughly on-topic posts I've seen in this
group for some time. Posting the source to this program anonymously is
quite understandable given the DMCA nonsense.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO8/VpzkCAxeYt5gVAQEmvgf+OS11nvoQQOKtbvhnSF7E++LUV5uKzCfS
k6OmEIbw5gYnPNZNsqhDWecgUqwXYGaYu/2JWasvhGyyzdMYGiBarjZmIuImBI4j
XOO5lrD3mIUnR+4j409kvbhzIdSpD56pa/YArMBQDj+gdrlE3zkpK33rZYmzgV5B
gPsjLRIBz/xxleBuKUPlsoPDpaaPT9PNRkg05EMgs9BHsHOUz2hHYOYZqyoQQoxo
HuHWl8mmrJozjA2ZAmtDC3684D9IrETreqd46fZ+T+89mdDfrbFeR5eFmwUBpTNm
Zav2RKI+iphZdN2aPEUp0aAmp9NFq6heM11+dcpEZr7xrShNI9WpZg==
=wdTU
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/uu3LJpr1cg8/m/5FiOWVKUcEUJ", "n_sections": 11}, {"thread": "uu3LJpr1cg8", "msg": "nDHn0VRUDrAJ", "author": "David Hopwood", "date_disp": "Oct 19, 2001, 11:43:49\u202fPM", "subject": "FreeMe source - ecc.c,h", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:


> David Hopwood wrote:
> > Tom St Denis wrote:
> >>Nomen Nescio wrote:
> >>
> >>>Split into .c and .h files
> >>>
> >>This looks like the beginning of a crypto program.
> >>
> >>Can you please stop posting source here...
> >
> > These are about the most thoroughly on-topic posts I've seen in this
> > group for some time. Posting the source to this program anonymously is
> > quite understandable given the DMCA nonsense.
>
> I don't know if you understand this [I think you would given the domain
> of your email addy].
>
> NOT ALL USENET POSTERS LIVE IN THE STATES.

Obviously I know that. However, I don't presume to tell other people how
to handle the risk of being treated like Dmitri Sklyarov, next time
they visit the U.S. Do you never intend to visit that country?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO9DyyTkCAxeYt5gVAQFg4gf9FK1f2gERAE0/bbHLjGAFoMeQS+8p5BOx
OiHS7QVxL5geC3opXt8LY6aOiknTDPOUt7Ee5HH4yyv4wdG7PdauFhgaSUjCiHjG
ZP6tcEIarQXt6de6MZfVi62AuzEBQfgQ+JVHYN3FLeNjkSYQduODtjkIO0qomBtP
rEZgTWcdlqPFe0y1NEg31mMsW5UWdF8apl7+Gb7Wikw8UVd8kYkiVVTR2SuuOpcz
Rkkssbm5srgbaMXPXhOfm8TtV6+5hKgm9Y1gXmFE2AYdMyfCKuC6ZVKoswZmV925
2OaiX4sw/6/oknLVZQ0/UDHOrvpjPcyts0ToysLaTkLd87i99wmx/A==
=WtWZ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/uu3LJpr1cg8/m/nDHn0VRUDrAJ", "n_sections": 11}, {"thread": "uu3LJpr1cg8", "msg": "28KbVFzXU7gJ", "author": "David Hopwood", "date_disp": "Oct 22, 2001, 6:09:09\u202fPM", "subject": "FreeMe source - ecc.c,h", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Well caught. And I thought I was pedantic :-)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO9SY+TkCAxeYt5gVAQFS6Qf/aY0qjBXniP3waAuTa5FAhrYhEeJCK6sO
1sntPO5qsdxyWgJ5Uw4fe3oUd7/qAMkuG1UVDUV+T0Q2CgIi2Q6j5MoVA+QbfikH
/9IsNCk6wMxX706bQNKohe6FOn0vm8+dUyK+ErEZTHQZxMQ5sCP1I4jhscme8wkJ
3ZH/ew7MIF2fplNQeu+/RcADlH+G9Y1OfNcXRWRFC4ClLX6Led2gub4NAjWKssfM
78v8KFouUdhPnC+wntMgVfRLI4iXoYI99NhIGWtzvnkZ7a3nq7kImzk3l72bnT/F
slZxvlB3xePCN/Wt1+kArFsK2LxUhdhJtiARZk6p8tAxf8ZJFxx8Tg==
=Se4f
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/uu3LJpr1cg8/m/28KbVFzXU7gJ", "n_sections": 11}, {"thread": "wur5ekuW1sY", "msg": "Yb07SXBzJikJ", "author": "David Hopwood", "date_disp": "Oct 19, 2001, 11:17:34\u202fPM", "subject": "Q: AES", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Marcus Menzel wrote:


> Eric Lee Green <er...@badtux.org> wrote:
> > Marcus Menzel wrote:
> > > I'd like do write a chipher program
> > > which based on AES. To encode blocks
> > > works very well but what about files?
> >

> > Use a cipher feedback mode. See, e.g., Bruce Schneier's book


> > "Applied Cryptography" for details
>
> A English Book?! This will take a long, long time to understand it. :-)
> (But it'll be a good practice.)

There is a German translation - assuming you are German from your email
address: "Angewandte Kryptographie", ISBN 3-89319-854-7.
There are also French and Polish translations; see
<http://www.counterpane.com/applied.html>.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBO9DsijkCAxeYt5gVAQFk7wf/e9n7T9JyEE4x5USIFhkZJzK5RGGUjmv8
Zb7XgQHy0M6hlsQiNoxbcWmt/i9H2A2xcYI2Ws588ODxAqfsWBm2ZFAPZIOotKlo
HzQThzVx97wHnL0gmrG3ourd9Yc4laAIbSbvI4CDV9D03GqqXnnZowzsoG87WDMm
tIhONck2mBvgRNkASm4hUJKNgkLCSG4TCsSdD06g1qy/VCyRniNK7nQR1z/Xvk1y
bOovH9dLc547ok9lLKmpRyOO5ctN0A7g8lnrr/U4XlEEc0K+/t1tOR8iUIKAAOKv
zY/a4jxGyBcWm2b/66JpAppjRpyssfXVmpkGTXc6QdyeG4+ClVyP8g==
=KhNv
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/wur5ekuW1sY/m/Yb07SXBzJikJ", "n_sections": 15}, {"thread": "xucHqxtdzJs", "msg": "UtCMvdfQ6IkJ", "author": "David Hopwood", "date_disp": "Nov 28, 2001, 10:56:38\u202fAM", "subject": "prng v prf", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"D. J. Bernstein" wrote:
> David Wagner <d...@mozart.cs.berkeley.edu> wrote:
> > A PRF is a function F that takes a key k and an input x and returns a
> > result F(k,x). A PRG is a function G that takes a short random seed
> > (or key) k and returns a long pseudorandom string G(k).
>
> One can easily unify the definitions by considering random functions
> from b-bit strings to c-bit strings.

I thought the main point of modelling these as two different things was
that a key for a PRF family or PRG is required to be random, but the input
to a PRF is not necessarily random (and may even be chosen by the attacker).

> The poorly named asymptotic notion of ``PRF''

I agree about the poor name.

> has log b in O(log s),
> where s is the security parameter, while ``PRG'' is equivalent to having
> log b in O(log log s). The difference is that a polynomial-time attacker
> can sample all the ``PRG'' inputs but only a tiny fraction of the
> ``PRF'' inputs.
>
> Both extremes are bad ways to look at a real cipher that maps 64-bit
> strings to 64-bit strings. A powerful attacker _could_ sample all 2^64
> inputs, but ignoring factors of 2^64 in the analysis is silly.

Both PRF families and PRGs have sensible non-asymptotic ("concrete")
security definitions, which are preferable to the asymptotic ones for
almost all purposes, IMHO. Your objection doesn't apply to those
definitions, or am I missing something?

Besides, a 64-bit block cipher is more appropriately modelled as a PRP
family, no? That doesn't make the concept of a PRF family any less useful
for things that it does model more closely.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPAUJJDkCAxeYt5gVAQGi6Qf+M+/DWS6P+cbedIxs8kJ4Lhma3J4tF4hg
kU2mkmQE74Z6h4/NAmaJmodDO/9R0OnAOD5Z71609V47sPI0UcHo+R7UwvJBnShf
8amIWbXQ3JS9djToKgycoH4kYH3uP9z0aWU8xSTLwWYaf6kvU7Q+IVB8DVpfYzky
AC52Q1LAW7xtpUKPxazUeY75Tmem/fsGpu+Dx3PsodYGHohgM8RKwsu/z7aKHY5x
QwxHHzWk6TdENMguXc97ZhlNY7uYAaJmu20V43q0c0p9pIHjWqHa0R61LOCh0TOY
UO/3J6B6xRR2Zjr+BHvrx0+nD2nmiGD67ZMyOA58QAi34me/sNzaaw==
=0TIc
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/xucHqxtdzJs/m/UtCMvdfQ6IkJ", "n_sections": 19}, {"thread": "-APER0Q9hWo", "msg": "C8711d0aKnsJ", "author": "David Hopwood", "date_disp": "Feb 1, 2002, 12:32:43\u202fAM", "subject": "How exactly does hashcash work anyways?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Thomas J. Boschloo" wrote:
> In an attempt to lift the post to noise ratio a bit I have this question
> about hashcash <http://www.cypherspace.org/~adam/hashcash/>.
>
> I'm not yet quite clear on how double spending and precalculated
> hashcash is to be avoided. As far as I can see a 'flooder', let's call
> it script-kiddie, can calculate some hashcash on several computers while
> he is away on vacation or in the background as a screensafer and just
> keep it until he feels a need to flood a group again.
>
> Also, it seems to me that script-kiddie can use each instant of hashcash
> on every remailer again and again until there are no remailers left.
> Even the RAB-list has been a less than moderate success, how will remops
> exchange hashcash databases with each other?

Computing hash collisions is parallelisable, so yes, hashcash does have
these problems.

However, you can make a proof of work part of encrypting a specific
message. You can also make it non-parallelisable, for example using
Rivest's time-lock protocol. Tom St Denis recently suggested a way to do
that (in the context of spam prevention, but remailers are a more practical
use for it):

Let M be the message to be encrypted (we assume that the protocol can
detect message replay),
N = pq be the remailer's public RSA modulus,
encode() be XEME+OAEP encoding [*],
decode() be the inverse of encode(),
t be a parameter that determines how difficult it is to encrypt a
message, say t ~= 2^20.
d = 3^t mod phi(N) be the remailer's private key.

To encrypt M, calculate C = (encode(M))^(3^t) mod N.
To decrypt C, calculate M = decode(C^d mod N).

(To make the system provably as secure as factoring, make it more like
Rabin encryption by using 2 * 3^t as the public exponent, and taking
square roots of C^d on decryption.)

If messages can't be replayed, then the effort required to encrypt them
can't be reused. We can prevent messages from being prepared too far in
advance (and limit the size of replay detection databases) by requiring
messages to depend on a public value that changes regularly, and that
no-one could know before it is published.


[*] Note that RSA-KEM wouldn't work here: the attacker could encrypt
a single random seed, and then re-use it on multiple messages.
XEME+OAEP has the required properties, and is efficient in terms
of ciphertext length when encrypting messages to a chain of
remailers. It is possible (but tricky) to modify it so that
decryption preserves a fixed message length, without breaking the
integrity checking. I should really write up how to do that in
more detail.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPFogLjkCAxeYt5gVAQFQGQf/WPeCQoZ2CRX6FJpfNzkfS/mhOFl7xjFu
EqL+BBWpbT8cpsrEBxTyJBrP1fsKPcxxc7GfXA21EFeW3l5F5XlCZTvoZPymlHEe
fmWIyn0yNkyORZOFcYi5/7HVko0x+s8VPSVoZNaVJ56/2njGhJFRGXLO0CYEqJF8
cm5HRx0tHPAyszGvkVdjrSB6gpOYAUXoXQ+iBmEdvew883+y4ew512PwEzfyDbUH
GFECIphvXRiu6aGihriLReeqTWAjWPHqwEz03vuNm9WgKCbB6dx87smnPc6KslGT
4Cvbi+aYXdtistgseQCEzTri47TK4sptH/NA7qHvD6Ha9JM8Y6HEmA==
=aQ0l
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/-APER0Q9hWo/m/C8711d0aKnsJ", "n_sections": 4}, {"thread": "3toUNeZOPtc", "msg": "w6wJoi1asNUJ", "author": "David Hopwood", "date_disp": "Mar 3, 2002, 10:49:34\u202fPM", "subject": "(answer) RSA SecurID Hack?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Francois Grieu wrote:
> In article <3C816264...@acm.org>, Peter Trei <pt...@acm.org> wrote:
> > Francois Grieu wrote:
>
> > > Peter claimed that RSA SecurID is not based on symmetric crypto. The
> > > docs clearly state the contrary at beginning of page 4 in

<http://www.rsasecurity.com/products/securid/whitepapers/ace5/AS50_WP_0601.pdf>.

This is almost certainly vulnerable to an off-line guessing attack - if
the authenticator's seed value is known, then the fact that the server
locks out after a given number of failed guesses provides no extra security.
Basically we have:

Agent -> Server: f(PIN, seed, time)

or possibly:

Server -> Agent: nonce
Agent -> Server: f(nonce, PIN, seed, time)

In either case, suppose an attacker intercepts this, and then steals
or hacks the agent device in order to get the seed (the time of the
interception, and the nonce if used, are obviously known). It doesn't
really matter exactly what f is; if it allows the server to verify the
PIN, and does not use a trapdoor function (i.e. there is no server
public key corresponding to a server secret), then it must also allow
an attacker to verify a PIN guess off-line.

Key update mechanisms are possible, but don't substantially change the
situation. If we had a complete description of the Agent-Server protocol,
then we could presumably flesh this out into a more detailed attack. I've
never seen a password-based authentication protocol using only symmetric
crypto that was not vulnerable to off-line guessing, though.

> while in other cases this combination
> occurs in the SecurID device itself: "In addition to the key fob style,
> other token types include a credit card-sized authenticator and the RSA
> SecurID PINPAD model, which requires the entry of the user's PIN in
> order to display the token code, and the RSA SecurID software token for
> Windows desktops, the Palm(TM) Computing Platform and cell phones, which
> duplicates the function of the PINPAD token in the form of a software
> utility".

This presumably doesn't change the protocol, it just makes it easier to
extract the seed from the software, or to hack it remotely.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPILunDkCAxeYt5gVAQHyZAf/XpBZMfb7QlWCdl1n2LdmB2NsCIEfb589
97yq24SG5xOcz3fS2MIEpcmOjDYAaKlYLSd8zLDk0w8DfGLzg2rc6A1PfYoAXOEO
XR5so+n6axIf9p/L1KO6EsDtPht+frXH0YtgTDhzutHH0do9PgxNudiYTWL34PU4
DVnG24ymK2W/7PoPjK3p6mZmveTP+0MHnmHvDjJ3C83SjGk3gSwJxe5f3xtmaPGg
HPL1KN3AqR/pKUXU82uI1Do36wjMH5DZRvDv2M0RfUhSyOYCt0v86jXTs7OjxYU3
Z5n9uhDtaMBYfQCSFAKDR2Phqezse9sfFp1pE/76MFhy3y/8xdkErw==
=+GF1
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/3toUNeZOPtc/m/w6wJoi1asNUJ", "n_sections": 56}, {"thread": "3toUNeZOPtc", "msg": "Zqk6RaV2amQJ", "author": "David Hopwood", "date_disp": "Mar 4, 2002, 11:32:06\u202fPM", "subject": "(answer) RSA SecurID Hack?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Peter Trei wrote:
> Francois Grieu wrote:
> [...]
> > With that definition, I hope Peter will now agree that in RSA SecurID
> > for the Palm, the generation of the value displayed, including the
> > scrambling of the PIN, uses symmetric cryptography.
> >
> > Or what else ? We know as of now only 4 kind of cryptography:
> > - symmetric
> > - asymmetric (aka public key)
> > - quantum
> > - snake oil.
>

> Sorry Francois, no cigar. It's none of the above. SecurID for
> the Palm uses a proprietary *hash function* to generate the
> token codes (and no, I'm not giving away any secrets here,
> this is widely known).

A hash function is symmetric cryptography.

> While we have never published a description of the hash
> function (due to contractual reasons, not security-by-obscurity),
> it has been subject to review by outside experts, and held
> to be sound.

The one-wayness or collision resistance of the hash is not the issue.

> If you want to bind yourself under an NDA, we might be able to
> discuss this further.

The SecurID hash is public now, so there's no need for any NDA. AFAIK
the agent <-> server protocol has not been published, but it wouldn't
be difficult to reverse-engineer.

The issue here is whether the server lock-out after multiple
incorrect *on-line* PIN guesses, provides any additional security.
I agree with Francois Grieu that it can't, if the protocol between
the agent and server uses only symmetric cryptography, and assuming
that the attacker has intercepted a legitimate session.

[More precisely, the number of sessions that might have to be
intercepted, under reasonable assumptions, is:

ceiling(-log(n)/log(p))

where n is the number of PINs and p is the probability of the
server accepting an incorrect PIN. This is probably 1 session, and
almost certainly not more than 2.]

The RSA documents that were referenced seem to imply that the seed
is static; if that's correct then the agent device can be stolen or
hacked at any time after the interception takes place.

> The more interesting issue is protecting the seeds on an open
> platform. There, I've conceded that the level of protection may
> be less than that on a hermetically sealed token, but there are
> numerous obstacles in the way of a cloner. Hint: even two
> nominally identical Palm devices have distinguishable features
> outside the Flash contents.

Irrelevant; if the agent software can read those features then so
can an attacker's software.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPIQICjkCAxeYt5gVAQH/6ggA0VYpnYv+YkJ2GSRUtMQJ0UhTjSGAkkrD
qoT8vKjepnUKb7mok4P0CXlTFTfxaQjJ2zEfk4vbX0VPS1bXfO9oXXjYnFGgQQhG
2eUPqRS/gpxZHOjUHsm6xAdC5q/+RoRwsaIpd97bgqZSbn3Wlm6hD9CIfbTQwzlW
IJtiOctOV/Z8/sQPbzkQzp0GnDZMX+1Fe9uRL+0dEyYjvD5MGa0sXPAcqW7FIEN/
tHPVB8P2f9AyYdhH6v2h92bs6pkbPGKapcUGIcX0+Rpnwh5EzM4IztuamDlwTk2r
nvneQPRljTPI7xNRwFDhgG5/jdFhLXejF8OtvsnV8yozWQsozivSFA==
=ELXK
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/3toUNeZOPtc/m/Zqk6RaV2amQJ", "n_sections": 56}, {"thread": "4BGAFtuI6-I", "msg": "tEQFUKIi1v8J", "author": "David Hopwood", "date_disp": "Jan 5, 2002, 1:44:08\u202fPM", "subject": "Code to read Pentium time stamp counter (was: Help with algorithm processing speed)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Student wrote:
> Any one else using different ASM code to read the cycle counter?

This will be slightly more accurate than the code you posted, since
it ensures that the RDTSC instruction is serialised.
The MSVC version is from Brian Gladman's AES code; see
<http://fp.gladman.plus.com/cryptography_technology/rijndael/index.htm>.
Note that the default gcc options don't optimise; use -O2 or similar to
ensure that CPUID and RDTSC are inlined.


#if defined(__GNUC__)

/* {{{ Not A License: code to read Pentium time stamp counter
*
* The following code (until "}}}") is in the public domain. However,
* it may not be reliable, secure, or correct, and may not produce
* accurate results. Do not use it in a safety-critical system;
* otherwise, use at your own risk. Do not remove this comment.
*
* Original author: David Hopwood, January 2002.
*/

typedef unsigned long long cyclecount;

__inline__ void cycles(cyclecount *const rtn)
{
// CPUID clobbers eax, ebx, ecx, edx

register cyclecount count;
__asm__ __volatile__ ("cpuid" : : : "%eax", "%ebx", "%ecx", "%edx");
__asm__ __volatile__ ("rdtsc" : "=A" (count));
__asm__ __volatile__ ("cpuid" : : : "%eax", "%ebx", "%ecx", "%edx");
*rtn = count;
}

/* Not A License: code to read Pentium time stamp counter }}} */

#else
/* assume MSVC or compatible */

/*
-------------------------------------------------------------------------
Copyright (c) 2001, Dr Brian Gladman <b...@gladman.uk.net>, Worcester, UK.
All rights reserved.

TERMS

Redistribution and use in source and binary forms, with or without
modification, are permitted subject to the following conditions:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. The copyright holder's name must not be used to endorse or promote
any products derived from this software without his specific prior
\t written permission.

This software is provided 'as is' with no express or implied warranties
of correctness or fitness for purpose.
-------------------------------------------------------------------------
*/

typedef unsigned __int64 cyclecount;

void cycles(cyclecount *const rtn)
{
__asm // read the Pentium Time Stamp Counter
{
_emit 0x0f // complete pending operations
_emit 0xa2
_emit 0x0f // read time stamp counter
_emit 0x31
mov ebx,rtn
mov [ebx],eax
mov [ebx+4],edx
_emit 0x0f // complete pending operations
_emit 0xa2
}
}
#endif

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPDctITkCAxeYt5gVAQHmcQf+N9JDnM2uW3YD2XysgLZk9uVAt3mGpjmR
RnDVghZdEoGEFhhOa1lSnSe9WqhE8kGxjh5jOHMdAt6TDxkQOz3qpjq+H/3RAiwb
GF/EeUDdYzusW6VsWW/CqmSZP8n6vkhYF2vZXPbcE3KQepdtWWim5cFt5hfrMHEl
gcD9J60V3lhDQhSlFAvZ5f757If83wn/8q2JythQwA/3XL87caccQzy7TITDeW+L
3hoH3DyGkOSQKCXUy/2Kv/UbzDYMEpBhFuwAYjlglHK9sq/TGCjL945jwiyY3jr8
AchWh6H/lTYV1T5FUG7N58Uh0P1vjWKRHdz0nQ4t0xw7XIzDQwCwHg==
=ZfEw
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/4BGAFtuI6-I/m/tEQFUKIi1v8J", "n_sections": 11}, {"thread": "63Yxn-uosTE", "msg": "27OHLeo5YqkJ", "author": "David Hopwood", "date_disp": "Mar 30, 2002, 11:13:00\u202fAM", "subject": "ANSI X9.80 prime generation has errors???", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

There should be no need to do more than *one* MR test, if the input is a
random 500-bit or larger integer n, and the base is chosen uniformly at
random on, say, [2, n-2]. The failure probability in that case is < 2^-56,
which should be easily small enough for any cryptographic application, and
considerably less than the probability of an undetected hardware failure.

If you really want a 2^-100 failure probability (although I've no idea why
that would be necessary), only about 8 iterations are needed for random
500-bit or larger n, not 50 iterations. See Table 4.3 in HAC.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPKVNvjkCAxeYt5gVAQGZgQgAu6g1/u5UWwLWfjGr83UO8OKLKwv1RvEQ
ay4EUf6ZemB1sWfipMV1Dy9TbtkKJB4bKXgmWaf+O9AQfQtIyA3C8rvkJO8bP7EX
MXz5smPoe8oLx0Gkpj6ieRYyrkn0OFdRUaYf0emxXe+VEDaRlGHBBcC7TG1y6Fjw
ZqIXbL0b6+Y9XBhkvqZA3SR4zT73aciWOlNDCITbkYd53rfwkIn9JeJKm7zm9maA
aLIleuEzHp0neEx/nhXTlgtMRrR74kZ4im1He8OzjIVUjAKoQ6GFRWqALuakvxXp
4ttUP6lpD/v+ioHgu5W902ZrNnqfFNVXaWYnQo1Cg5KXqZq1GEmRNQ==
=e5Zy
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/63Yxn-uosTE/m/27OHLeo5YqkJ", "n_sections": 22}, {"thread": "63Yxn-uosTE", "msg": "dXd68L0p2ioJ", "author": "David Hopwood", "date_disp": "Apr 3, 2002, 8:46:42\u202fAM", "subject": "Failure probabilities for probabilistic primality tests", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Cristiano wrote:
> "David Hopwood" wrote:
> > There should be no need to do more than *one* MR test, if the input is a
> > random 500-bit or larger integer n, and the base is chosen uniformly at
> > random on, say, [2, n-2]. The failure probability in that case is < 2^-56,
> > which should be easily small enough for any cryptographic application, and
> > considerably less than the probability of an undetected hardware failure.
> >
> > If you really want a 2^-100 failure probability (although I've no idea why

I should have said "an upper bound of 2^-100 on the failure probability,"
of course.

> > that would be necessary), only about 8 iterations are needed for random
> > 500-bit or larger n, not 50 iterations. See Table 4.3 in HAC.
>
> The tables and the formulas of the literature about MR test seem to give a very
> big upper bound of the failure probability.
> My experimental results show a lower probability of MR failing than predicted
> from its mathematics.

The mathematics doesn't predict that the probability is as given in the table;
it proves that it is *less than* the value given in the table (over choices of
n of a given length, and random bases).

> For example, now I'm trying to find a 100-bit number which is declared prime
> with 1 iteration but which is declared composite with 2 or more iterations.
> I'm using 32-bit pseudorandom bases.

Note that the HAC table strictly speaking only applies for random bases in
the range [2, n-2] (or a distribution that is indistinguishable from that).
In practice the MR test will "work" even for a fixed base, but for real
cryptographic applications, I would stick to what can be proven.

> Following what is written in HAC (ch. 4 pag 147), the error which can occur when
> a 100-bit number is declared prime with 1 iteration of MR should be smaller than
> 2 ^ -5 = 0.03125.

And it is. *Much* smaller. Bear in mind that tighter bounds (i.e. smaller, in
this case) are in general more difficult to prove. Table 4.3 of HAC just
summarises what was proven in a particular paper (the reference is in the
chapter notes on page 167):

[300] I. B. Damg\u00e5rd, P. Landrock, C. Pomerance,
"Average case error estimates for the strong probable prime test",
Mathematics of Computation, 61 (1993), pp. 177--194.

[...]


> This is to say that the theory seems to give a bound too much high.

An upper bound can't be "too high", as far as correctness is concerned.
(For example 1 is a correct upper bound on any probability, although not
a very useful one.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPKowDDkCAxeYt5gVAQEylQgAwlTPziE9e9FyPXxpOBgNu7h9NHxlRr6v
45Xd7CNpKLSzeJl9P1H3I636oz29wQ4PR1xrL8fmryG76S2AHkBUiTSWkX14PeA9
Gum9Qy5lQq8zogb7LJ1LpUmRKKCE907s1mf5HBaCT3HJmOUoQxG4efleI5lRcQZh
x/ReIJONp4j1w7n2c4H+0lX+VQ2r7rxEtvjau9E8LMQ+YV5yCH3rX1FkJWSbK+ao
mOCINT3HkR7jwe3dT/BeD0Xyd8mdOHLD/hYA6Tlxk//p8Urz4Zjaap2ql0wnj2PO
SDb9OlCngAfdRRqaOO7Qd5M796rAHABsyw/Y4Zu4lqUTZkpKyeIw3A==
=9TDq
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/63Yxn-uosTE/m/dXd68L0p2ioJ", "n_sections": 22}, {"thread": "BTv9E8YsLiA", "msg": "RxMVB9RpEIkJ", "author": "David Hopwood", "date_disp": "Jan 21, 2002, 8:36:17\u202fPM", "subject": "Attack on RSA with a low exponent?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> I dunno if this has been discussed before, I vaguely recall something like
> this from AC.
>
> Suppose you have three 1024-bit RSA keys where all the moduli are relatively
> prime.
>
> Suppose I have a 1000-bit message M and I wish to encrypt it to all three
> people using their respective keys except that e=3.
>
> Since a 1000 bit message cubed is 3000-bits the product of their moduli is
> 3000-bits could I not use the CRT to recover M^3 mod the product of their
> three moduli and in turn easily find the integral cube root?

Not if you encrypt the message separately to each recipient using a secure
encoding method with independent seeds, which is of course what you should
do.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPEuLnjkCAxeYt5gVAQFfxggAiUP9gb7RtC6K2JrK3H5yRtjNf/zC4vX4
yPE0x4Hlu/aYDCdSzq7whFSNAoMaGfo9EkuIRoVdcgpGomiz5aWUS5WarHFVYiN9
yqpSAwi/YClF8VVb8Ti1E6s7asvg+DPUe/gdZLmC/VnfAFGEvyTkRjVXuTb3aVSF
vZjY7T5kctBkVGatyUvKvCGIqZL5OOOjwephsZ6kYg8et+2zYEUBQ9vcySiRXw7o
U5x/kfBv2GwUGn2tWqRVrfLB963KOmA8Rg+Efp0kXxNBYR0mDYD0Yq8O+mY6MM+G
kJWpvkT85PLt5mG7OzhOOsG10xGFtkWhU713YEpgUYF6WvwJBEgBlg==
=fdQa
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/BTv9E8YsLiA/m/RxMVB9RpEIkJ", "n_sections": 8}, {"thread": "EQDs_PzLs8c", "msg": "rpeushkFGMUJ", "author": "David Hopwood", "date_disp": "Jan 14, 2002, 8:45:45\u202fPM", "subject": "different ways of adding feedback into CBC", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Volker Hetzer wrote:
> Hi!
> I've thought a bit about CBC and found that there are in fact (at least)
> three ways of providing the feedback when using AES:
>
> - the ciphertext is xor'ed into the next plaintext

This is standard CBC, of course.

> - the ciphertext is xor'ed into the key for the next block
> - the ciphertext is appended to the key for the next block

Both of these give the attacker lots of related-key queries (for keys
with known XOR-relations, and keys with a fixed prefix and known suffix,
respectively). They should definitely not be used, since the standard
formal definitions of security for symmetric ciphers say nothing about
security against related-key attack.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPELXSjkCAxeYt5gVAQE86Qf/THtDDD8aDt0HSwZWVoAcVtXmR9NP7uE7
GA61WiL99NoDDFkwhU/Ov72TqgWvTAvNpi1JoPx7Uhv4G35QPzIRUCow7DryTIX/
6x8HGUEWkW2Nr1RwXr/iO9IObUZZLujwXZifTqwZil9LmnLrHttCNKKjL7CL8Gop
raWDhBotmHBWdkpdX1xylk6ETfXq2RejrJoDj9c9p89Ep2p2xVDOsLpiqEM467Fg
9ww+PMP2DZW91Te0QMvq1+Cm7sn8JjXQ9pg3Yhzq4vuntws7AsH1DRcDi/jeB7Qb
mkeLbzqlKZ0cPYzQXvTMJS0sRXLgR6pxsoEfoBy/VdCYI41GwjHwsA==
=w3gw
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/EQDs_PzLs8c/m/rpeushkFGMUJ", "n_sections": 12}, {"thread": "EobGUty6a04", "msg": "XH70aDdoK8sJ", "author": "David Hopwood", "date_disp": "Mar 8, 2002, 10:01:48\u202fAM", "subject": "Important: Anyone have information about \"Secret.EXE\" encryption prog (maybe a trojan??)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jean-Luc Cooke wrote:


> "Svante" <spl...@nospam.com> wrote:
>
> > I have no info about secret 1.0 or secret.exe, but I am of the
> > opinion that encryption software should be open source for the
> > very reasons you specify.
> >
> > I'll also take the opportunity to point out
> > http://axcrypt.sourceforge.net, which
> > is not only open source, but also free software under GNU GPL.
>
> The sky is blue, and it's also blue!

Open source obviously doesn't imply 'under GPL'. Also 'under GPL' does not
imply open source (if it is found not to be usable without infringing a
patent, for example).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPIhXtTkCAxeYt5gVAQF1HQgAoX2jHnU8fvDUBzz9aWMa84hiaJi95DsX
ISOF9yeV3JSInxBIHiIosAMgF11uXTVVfB0v2SdKslrO+F9k6GkcOD/WbTq1V698
IbRyXCM8XSQ6lsYjzqw3FYF6B7/mEB5KU8URAnrl+1v3vkmaNNstjvmKoPftVfIz
95bdIeYPRKsghXmSnH5Qpo1S9y8Nkl+JZeANsNQHwM1A66ExOHOTrAbu+u6bZ0hz
pThPzXpWWJefizw+FQl/v523WzB4CTjwIel+KcOPGduonzKHM2DzF+tFbfSpw674
Ahw2bDxvvAYxo/XVqf8INgzd0+/jXGflfjHTNEp63nHiYf65Rv+4Cg==
=dhSc
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/EobGUty6a04/m/XH70aDdoK8sJ", "n_sections": 5}, {"thread": "Fuml6xKEIs8", "msg": "r118QphOQEEJ", "author": "David Hopwood", "date_disp": "Jan 31, 2002, 2:07:16\u202fPM", "subject": "A method of analyzing radix-2 FFT multipermutations", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> "Benjamin Goldberg" <gol...@earthlink.net> wrote:
> > Could you possibly give me a better definition [of "Branch Number"]


> > than the one I know of?
>
> Chapter five of Daemens Ph.d covers some of the basics.

and is available from <http://www.esat.kuleuven.ac.be/~cosicart/ps/JD-9500/>.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPFj2ZjkCAxeYt5gVAQG3iAf8D3vvd2hT7be59lI7+wFpmxqh+5cSlh5E
DRvh2kl/s6zk0XTvXtNOwWvsNvwWLF0OzhBKxDwgOCSrITvknFxr0lVElxEogOVL
QKfynPMRWpHggci/Js+X/DOubEOwvoYOOwpRaiuGSnOyRuM7F0x/zNuysy8cf//B
Pncx1kNvKdOZPm6F7PWndssWfXK2ZIqk6YBnu0I6SWyEli4h8n7AG3VvmHJLZveR
BvAVYrTO0FvkA8kqxObZ1cWmSM5iVGynihN4M5O/Fp0+CEG6NXT1RHZjCgZWkkla
j2dJuTEWlyXSLX9rPCBy4H+WtdKAdMXNmCw/OsUMMv/pdUUwle+QKA==
=tG42
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Fuml6xKEIs8/m/r118QphOQEEJ", "n_sections": 16}, {"thread": "NLMXaKjC7_4", "msg": "F9I_VHWGJGYJ", "author": "David Hopwood", "date_disp": "Mar 13, 2002, 5:44:41\u202fAM", "subject": "Maybe this is an easier question...", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Anton Stiglic wrote:


> Paul Crowley wrote:
> > I haven't managed to find out about XMAC from Google yet...
>
> Would that be XCBC MAC ?

Probably not; I suspect the reference is to this paper:

M. Bellare, R. Gu\u00e9rin and P. Rogaway,
"XOR MACs: New methods for message authentication using
finite pseudorandom functions,"
Extended abstract in Advances in Cryptology - Crypto 95
Proceedings, Volume 963 of Lecture Notes in Computer Science
(D. Coppersmith ed.), Springer-Verlag, 1995.
Full paper at <http://www-cse.ucsd.edu/users/mihir/papers/xormacs.html>

However, note that the paper describes several variants, and there's not
enough information to specify how to implement an interoperable version of
XMAC with a concrete hash or cipher for the PRF.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPI67XjkCAxeYt5gVAQFJAQf8DHcjX7PLbqArsnM1MkHqtqvkysUEZ9pz
Fw08NcMaoGFDNbLwbFdDk15vlyadP9LUXcxmR+AZraWGKy6p/fFUAwoCVfNVZ32n
LvR9pk2o96Rs+trf9EKbDjrw/xhZ4lqlebhMvtqpIEaz++WmZhBtcKVtYvSoYAmq
1njO4jGfQrTl9hjo7iIQcm/h9JouH+foQiPLCEIJyfFLuM3FcsN9ooJS7EdK5Nlg
M5mvLbhySAqnWqnbdE24G5d1OE6KS09H6iiBbzori0Z8w0GpNKFhjAlkqgoN2sQA
Vrwbqrd63rVJuWWrMzWfaGwReCBtIlymKG6Tv0assEUJiJ1XBH/wew==
=9toH
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/NLMXaKjC7_4/m/F9I_VHWGJGYJ", "n_sections": 14}, {"thread": "POCSfO3hHsk", "msg": "X2OY7p3aMSMJ", "author": "David Hopwood", "date_disp": "Feb 22, 2002, 2:41:18\u202fAM", "subject": "Inverse in G(Z_p)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Computing inverses and/or extended gcd's is very rarely a time-critical
step in cryptographic protocols. The exception is public key methods
using class groups; for that case, see section 1.3 of:

Henri Cohen,
"A Course in Computational Algebraic Number Theory,"
Springer Verlag, 1996.
ISBN 3-540-55640-0

(Note the erratum for Algorithm 1.3.7: move the initialisation of
A, B, C and D to the end of step 2.)

A straightforward implementation of the binary extended Euclidean
algorithm will do fine for any other cryptographic application.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPHX19jkCAxeYt5gVAQHLKQf/XMhRpKolKKR5AG9By+MCVGre7dSu/Rui
0Q2F7cniY4bSyupy8zeHh94A8N+uNVGs3EtWmPYmbvggHxTJxyQuK7TC2r0KmwHk
YaBTBnznCyYgwI4WAyp1pZlRAwdRbtyDdAWb7H5xDnQLWXu/Caz5h3szLC0Dm+LZ
X5X4XO57L4CoGoGgAC5UPwkNJSdcR7iOEmiSoZ6lH6MCoaTp8hy+UUq0q0BxmBV3
4c05eF6XZuuUeBHi0Pr3168sDuMp+2n54nhv5x21+IBjxzJcYxHHh4gV3srGjr+k
UQiedHaNCfynLbn9eyxecm0+5NkfB+A2cDDXpRS8mE9Kkj7MxR+UGg==
=gqhp
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/POCSfO3hHsk/m/X2OY7p3aMSMJ", "n_sections": 6}, {"thread": "PWvxJAl3BOY", "msg": "0eJttef-mToJ", "author": "David Hopwood", "date_disp": "Feb 19, 2002, 12:30:21\u202fPM", "subject": "1024-bit hash function?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Anonymous wrote:
> Damian Menscher wrote:
>
> > I'm looking to generate 1024 bits (or more) from a user's passphrase
> > using a cryptographically strong hash function. Do such functions
> > exist?

Niels Provos, David Mazi\u00e8res,
"A Future-Adaptable Password Scheme,"
Presented at USENIX '99.
http://www.usenix.org/events/usenix99/provos.html

Run EksBlowfishSetup, then Blowfish-encrypt any distinct set of blocks
to get your 1024 bits.

> > Assuming they don't, I was thinking to do it using MD5 by appending
> > to the user passphrase like....
> > md5("user passphrase"+"1") for first 128 bits
> > md5("user passphrase"+"2") for next 128 bits
> > md5("user passphrase"+"3") for third 128 bits
> > ...
> >
> > Is this safe? I would think that it is, but wanted to check with
> > the professionals (that's you!).
>
> Joseph Ashwood replied:
>
> > Depends entirely on what you mean by safe. The idea you supply will
> > only offer 128-bits of security.
>
> How can this be true? Clearly such a statement only makes sense in the
> context of a passphrase with > 128 bits of entropy. So let us suppose
> for analysis that the passphrase has 1024 bits of entropy. How could
> one derive the output above with 2^128 work? Surely there are 2^1024
> different outputs.

Suppose the user passphrase is exactly 64 bytes. Then the output depends
only on the MD5 chaining variable after hashing the passphrase, which is
128 bits. (If the passphrase is not a multiple of 64 bytes, then the
difficulty also depends on the entropy of the left-over chunk in the
last block.)

Attacks with work factor 2^128 are not practical, of course.

> Paul Crowley replied:
> > MD5 is deprecated these days; you'd be wiser to use SHA-1, though it
> > probably doesn't make a difference in this instance.
> >
> > Apart from that, it should be as safe as anything else, so long as the
> > passphrase is 63 characters or less. Otherwise you're slightly better
> > off prepending the digits rather than appending them; this ensures you
> > don't lose any entropy from your passphrase...
>
> How can this be true?

See above; prepending the digits would ensure that the MD5 contexts for
each 128 bits of output are independent.


Anyway, this is pretty much irrelevant to the practical strength of a
passphrase hash. That is determined by resistance to dictionary attacks,
which is why you should use the scheme I described above based on the
Provos/Mazi\u00e8res paper. Alternatively, depending on the application it may
be possible to use one of the strong password-based key agreement protocols
that prevent off-line dictionary attacks (but in that case there is still
some benefit in applying a computationally intensive hash before computing
the verifier).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPHHCwTkCAxeYt5gVAQEIwAgAyLH4ntP7nclIATgiO5e6riZVe4mPrLFY
6QeLxoWNAF0Wa7m/tv6t97Ei9+wNmdg5t2llYwpIZ6Z+TDGoGgWjwO5BSQFap7iL
BNDKPvI87k2GZaLfkBHpPYViV2TnBtOcqMozmKlfLDfGfaZDttIme3OtSGivNlKd
LIQI1Pg5Mg0eX2z/WmqnNsnXMpQZPrg1VXpEnnz33N9O8mNGfc26GiU6ue0BU8lQ
60GThI9P8reJzAGvUhwZJ3LGGH2y93vKWmr4493fH4kj5pS9ZaGSVXYBH6nbMT/M
asq2idruHvlNSKyEn9cDdc8ExTyVWApQQT/3D2dNGlpAOtKLC1QzJg==
=pF8P
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/PWvxJAl3BOY/m/0eJttef-mToJ", "n_sections": 33}, {"thread": "Ufmn2yBez4k", "msg": "6f424u8NMHEJ", "author": "David Hopwood", "date_disp": "Jan 28, 2002, 11:10:01\u202fPM", "subject": "encrypt .class files", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Gus wrote:
> qazmlp <qazml...@rediffmail.com> wrote:

> > What are the best encryption algorithms available to encrypt
> > the .class(Java) files?
>

> I may be missing something, but since you've got to decrypt the files
> in your class loader, you've got to carry the key around with you in
> your Main() and therefore are just obfuscating the examination of the
> class files, rather than really protecting them.

The attacker doesn't even need to look at what encryption is used; they
can just use a VM modified to dump the classes it loads (which are
necessarily plaintext) to files. So there's not even any significant
obfuscation: this technique will break any classfile encryption scheme.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPFYghDkCAxeYt5gVAQEW6gf8DSEjCO/v1TqvBP5zVck018xM3C5rjkI8
XUGjrcXvlRCErtkdo3mwFisf3VI50sQXhJXl6k5QbvF0WWsCNKhnI0AYw2yejfuN
QkAi4J3+trEtHIhVniKj50h+JZ/SWx6Cw3j0I8qc1hmQR1vH0MjHYKZbDlAUI1MF
U4yidXMya+zH4WI3pLi+nbaN9YKtjEFgY9C719zFkxBGjKXb/KXesaHG5mYE8K6q
i28mFqnMcmA3djCrfr1hQXQnCNcEa/2RxxGI++mswItuMdVLcFyK/xcNBBq9voU6
gTpDovIivsdqFUXQ2jBjxuIPX0PHWcoYegjx0PLpkW1toVM+D4d/kw==
=n17O
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Ufmn2yBez4k/m/6f424u8NMHEJ", "n_sections": 11}, {"thread": "Wj6j8FBMBG8", "msg": "BYl8pYtm5v8J", "author": "David Hopwood", "date_disp": "Feb 6, 2002, 12:46:40\u202fAM", "subject": "Computing modular inverses over gf(2^8)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> [Nils Jakobsen] said


>
> > I don't see any use of polynomial division in a GF(2^M) Field, all

> > operations can be expressed with shift operations (x*2 or x/2) and XOR


> > operations.
>
> I was trying to not only point out that he's wrong in several cases, but
> more important that division over GF(2^M)[x] is well defined.

You mean that division in the ring GF(2)[x] is well defined. (Division in
GF(2^M)[x] is well-defined as well, but that isn't relevant to implementing
the Euclidean algorithm for GF(2^M).)

> While its true that division in GF(2^M)[x] can be implemented as "shifts
> and XOR operations", in effect you are still dividing.

Note, though, that the binary Euclidean algorithm applied to polynomials
only multiplies and divides by x.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPGDC0DkCAxeYt5gVAQG7oQgAvtdntP+KJHLs3nJnC9EtgLjavSIKWxa2
pvIdyGixVpieiA0OOaZjOudQqN4qrbfnkqcdKzcJ7NLu7veXM5y/cXw063jrdPYy
F+uJPo7s3QivhGXG2MmAD01FrPs7JJjelpUyjqbs+Bv3JVOg9Be/m8bK71E+UVAG
H0In3ld/HnZAVtmqOcG86PBfvd1s/snxIWBiUbp55FfBRutCYfMkDVnlOfp73FTz
E6lmYxhD60pNK2IjFG6Z42KkDoQfANoZetCfSpmNsNIJFcVGj1DI8Ms47I8MX4t/
64d4T5FzgPVN4IRgNi2kC8LD1CnwuvuTVa15v2yv52ilcOR4FR6nMQ==
=xKnN
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Wj6j8FBMBG8/m/BYl8pYtm5v8J", "n_sections": 100}, {"thread": "WlKFQ3hSpHs", "msg": "UPGuxwPf7e0J", "author": "David Hopwood", "date_disp": "Jan 14, 2002, 7:40:04\u202fAM", "subject": "KEA and SKIPJACK", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

m...@my-deja.com wrote:
> The reader may recall that soon after these algorithms were released
> to the public in 1998, no one could construct a "correct" KEA
> implementations based on the SKIPJACK as defined.

[...]


> What does this mean? Probably that, despite the claims in the
> document that defines it, SKIPJACK is almost certainly little-endian,
> not big-endian.

No, SKIPJACK is by definition whatever that document says it is (and
the SKIPJACK section couldn't be much clearer about byte/octet order).
I suspect it is KEA that is little-endian.

If you're correct about the octet-reversed version working, then the
error appears to be in item h and Figure 7 of section C: if v1, v2 and
the pad are all octet-reversed, and the first (leftmost) two octets of
v2 are XOR'd with the last (rightmost) two octets of the intermediate
value instead of vice-versa, then I *think* you end up with a SKIPJACK
output key that is consistent with SKIPJACK being big-endian.

More formally,
v1 and v2 are as currently defined
V1 = I2OSP_LE(v1)
V2 = I2OSP_LE(v2)
pad = <0B, AB, 98, 41, 82, 92, 7E, A8, F1, 72> (hexadecimal)
K = V1 XOR pad
temp = E[K](V2)
OutKey = (temp[8..9] xor V2[0..1]) || E[K](temp)

where I2OSP_LE converts an 80-bit integer to 10 octets in
little-endian order,
XOR computes the exclusive or of two octet strings,
|| concatenates two octet strings.


[More support for my position in a recent thread about not mixing
bit- and octet-based interfaces, since that is exactly the mistake the
SKIPJACK/KEA spec makes: SKIPJACK is sensibly defined in terms of octets
(and that part of the spec also follows the other recommendations I posted),
but KEA is defined in terms of bits. Note which one was easiest for people
to write interoperable implementations of.]

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPELQLzkCAxeYt5gVAQFIrwgAwOOY7dh3PtjbQrulsE/HVlSBen4AoTUx
36o4otcqxsA62BMIgRoc2qTl9O/8ei0K7p378K/PurtkXwDJw3e/D0T03Y/53zPO
cBlwX56Z+pAcPKRrA+3MwHBpYvYz8H0OkP20AKH5owe4lufLx7OJQa2QNU8/aoiw
C7qU3Yff/QTKi5LSrv5ugmXFOFraPQnTkya4YJGxQZCTEDofB+RLC8s7yIy+MkHx
fP9gv/WzbzXPUWf6zWvkDyOXi0Hy6Ejt+7WpHByCazId1qiOSGspB2lMc2eeH7rP
iMKHyioItcdb23FUQ9mF1XxiaogIeKmfKTKunDEKbDafIiyaCOqD+Q==
=uVrt
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/WlKFQ3hSpHs/m/UPGuxwPf7e0J", "n_sections": 100}, {"thread": "YALQTgcAtUA", "msg": "1Z33aI1K8JEJ", "author": "David Hopwood", "date_disp": "Feb 6, 2002, 12:46:23\u202fAM", "subject": "a[a[i]] = 1", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

In sci.crypt and sci.crypt.random-numbers, Paul Rubin wrote:


> Bryan Olson <fakea...@nowhere.org> writes:
> > Though our sample is imperfect, the cited discussions indicate that
> > the vast majority of C programmers are unaware that the construct is
> > undefined. Most seem surprised, suggesting that it would not even
> > trigger suspicion. I'm not saying the standards committee was wrong
> > to define C this way; there are uses for such a language. I'm saying
> > the minefield of undefined behavior makes C a poor choice for most
> > applications.
>
> The obvious solution in the a[a[i]]=1 example is for the standard to
> require a sequence point so the example does the natural-looking
> thing.

No, that's *not* the obvious solution, and not the right one IMHO.
The obvious solution is to treat a[a[i]]=1 as being well-defined for
the same reason that a[i] = a[i] is well-defined: there is a dependency
such that the assignment cannot take place before the previous value
of a[i] is read. This just means extending an existing rule about
assignments (6.5 #2 in C99) to apply to the computed lvalue as well as
to the right-hand-side.

If I am reading the non-normative model in C99 Annex D correctly, that
interpretation is already implied by the model: a[i] is equivalent to
*(a + i), so we have the constraint E(a + i) < L(a + i, Z(*(a + i)))
from the dereferencing rule, which gets replaced with
E(a + i) < W(a + i, Z(*(a + i))) as a result of the assignment rule -
in other words, the address (a + i) must be evaluated before it is
written to. So much for the undefined behaviour being an intentional
feature to allow optimisations; it looks like a specification bug to
me.


This is way off-topic for sci.crypt or sci.crypt.random-numbers (unless
anyone wants to comment on the effects of ambiguity of language
specifications on cryptography?), so follow-ups set to comp.std.c.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPGDAuTkCAxeYt5gVAQFTwQgAvH5W2sNJng+h4H/rwoQx9JhywQxDH+Rx
y1AR6k3xz6F6zgif6SPHctgV/E9tFcabv9obM9Rfv8QUs1XKuR7MKPTfCKngJPw6
vt6guhz7PUCJALFQStMmKChApSSi2VrXpBipz105jPaIUiLOcj9JU1T2lr+yeY2B
FSQOVpPF3RMzRtDa017dEHWsBc2oOITDNqGl+DWsOIlMpM76lc8+npzhv/7juEOK
77bez2LQIvzUioIZHjPl33kuPForKERRxTh53u32ZN9k2bhx/7pbFB9m21iquIeE
p/6cxy0Ytt14+CVrQzeb0mAAncSDZ0TjXSuvdcvu90BYbmpyL6O6DA==
=bvLb
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/YALQTgcAtUA/m/1Z33aI1K8JEJ", "n_sections": 100}, {"thread": "YedJ16t4V_I", "msg": "EE9xBbkD-wsJ", "author": "David Hopwood", "date_disp": "Jan 7, 2002, 7:54:07\u202fAM", "subject": "MY STUFF", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> #include <stdio.h>
>
> int main(int argc, char **argv)
> {
> FILE *pad, *pt, *ct;
> int ch, k;
>
> if (argc == 1) { printf("%s: infile outfile pad"\\n"); return -1; }
>
> pad = fopen(argv[3], "rb");
> pt = fopen(argv[1], "rb");
> ct = fopen(argv[2], "wb");

This has undefined behaviour if there are one or two arguments.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPDl9VTkCAxeYt5gVAQGNEwgAn1IDT19rVd3n1vDuEIl9Fd43CjRZgXRV
Vzc2qop0A5vRO6X4epNqnvwUIq2dHQaT+TS7ZgMwxVYK4v9v+kITAB376brmwTFL
YiS4qia0lGjPva0Ag7XJUgSvv2lxO2EtOdMWh95FxzXrDC1wNjWGfvOmUSI6VCpa
vy9WkD4271wqCNJsXezixY+MEpWn9ZpjnNOnpAFLqcjJid29vnOibSIze9ktPm5L
mj2AsTi6LyYAfgP0/YuiOwDGwapgyX9SJiyiwtaA5R4sz57raieDSisxJb6pAK44
Vo9B1vUEKYSD89uIYt+MIKXRtXfY2377AMRtYAdnm1s/wvHoR9nkrg==
=q4uX
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/YedJ16t4V_I/m/EE9xBbkD-wsJ", "n_sections": 12}, {"thread": "_fbIpOMxHg4", "msg": "21qLJAnjUBIJ", "author": "David Hopwood", "date_disp": "Mar 13, 2002, 5:45:06\u202fAM", "subject": "RSA double or tripple encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

XTR is patented (or a patent has been applied for, I'm not sure which).
It doesn't give enough of a speed or size improvement over, say, ECDH-based
algorithms, to be worth licensing.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPI7cbjkCAxeYt5gVAQGw8AgAtI4FL31vOXRrgD3UMUX7Ojji64zHzI+H
Uiagxtc9D2vUfDsMzLmVcZLLz3mbaXXb57MmouyCh45d6I0Ou3SpoJtWZWafLYoK
NlqWRP5VFNHTfznid1gRYuLAj3Srd2s9lhXCOpValsvB6oFAJoCPC3l3V19pxOVz
prrY2KtS1g6Z9Kr1hpMVqAGyHYQMcO8oLLExnw3MWuZtp+6rcvnvojsUT9BINCNE
mgxKEhbAw5uWnLif6F8Euqpsq641QHFaeOaE6zJDvMgZM8TEKGLY1eg979mGZYA3
ip/T2Oy/GeG7z7uInrgC4oRN6bDl4+uCvmi/G4h3uKrVh9bDLXhvXA==
=2Lrg
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/_fbIpOMxHg4/m/21qLJAnjUBIJ", "n_sections": 12}, {"thread": "bBT5F3HNYKM", "msg": "yEUHSU88-c4J", "author": "David Hopwood", "date_disp": "Jan 3, 2002, 12:24:39\u202fPM", "subject": "CryptoLib [v0.10]", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

disa...@saiknes.lv.NO.SPaM.NET wrote:
> Paul Crowley wrote:
> > > > if (tmp) {
> > > > fputs("zeromem failed",stderr);
> > > > assert(0);
> > > > mem = 0; *mem = 0;
> > >
> > > Note: Since mem has been bumped past the end of the buffer, *mem=0 is
> > > a buffer overflow.
> >
> > I'm sure you spotted this straight away, but actually he's assigning
> > to address zero. On most modern OSs that will cause a segmentation
> > violation or similar,
>
> exactly.
> because there are compilers that optimizes assert() to nothing (MSVC).

If you want to say abort(), say abort(). Even MSVC won't optimise that to
nothing.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPDSTsDkCAxeYt5gVAQFk5gf/Xfqqenfc9l799Gsnq0kBkwEmwv4COTcC
dlRzd5/7JTt/TqaZLLHWgA1ZWolUERg7RUetgnFAIaDx7ciDQSlHzKgGADhymmPP
qaSOXEn5/Xnm9+HRSsCMzrM1VAE+sc8YUnopXJTPOMMhMQG+6kvGVqbFITa05aUp
OQWwPEX01BSTh1+YU1crSOZApxjoFI08EkwEmBgUz8smjJ+0pf4fp5JnEppi7ABW
OgjOa0US3PGhz0XwtXkaPdzS1IZCwxp0FFqYaTLVk3FMdKxdiuVHgu1Fa328nip/
SJyiKD7p0S+Xv+5EWZDeo5qOYgH+/8NkGdR+QSIzTJ/4DzZXYn+reA==
=LKH6
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/bBT5F3HNYKM/m/yEUHSU88-c4J", "n_sections": 100}, {"thread": "jRFwqvbIMLQ", "msg": "uITHjLWp0EcJ", "author": "David Hopwood", "date_disp": "Mar 8, 2002, 10:01:41\u202fAM", "subject": "Design for a pseudo random number generator", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

By the time you get back, the recording industry will have successfully
lobbied for copyrights to be made permanent :-(

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPIhU7TkCAxeYt5gVAQHHHwgAxyo6ocyUquS2igTvaQo7YceCblppV9Ux
Mo7ada1dfvr4LWSi5NSwSyDpIWhVGT4cdtazBa02Fg7frpoFmRQTxVlWmN78Z/Bl
Mj+eCR64G7S/NSvfYEbpnRhE0gJ1SdDPt4dZyVxDAObaFE6Na/zA83B5leNsyV7J
PbAlNPE755cSO/gk1g4xr7RRNWSZWQUzVveTHXS8PICXwkQiAcbp8AJazs+zdgR4
87o1HAPFpK1tTQprRfbUEUrAqvDVY4L5t+kRxptOTS+5QPFQhoB+i9lyp701hPmj
qXLIYtqwEqbZh+RfM87TpPZv4PE39A1BVyslQ32y3Jrvj5epC6usCw==
=dDWj
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/jRFwqvbIMLQ/m/uITHjLWp0EcJ", "n_sections": 86}, {"thread": "kjekRgNeYZ4", "msg": "Df2GN87RgpIJ", "author": "David Hopwood", "date_disp": "Feb 19, 2002, 9:26:02\u202fPM", "subject": "AES standard and Rijndael", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Svante wrote:
> Also note that "the AES algorithm" or "AES-128", "AES-192" and
> "AES-256" is defined to be a subset of the Rijndael design.

Almost, but not quite: the Rijndael design specifies a mapping between
plaintext/ciphertext/keys and octet strings, but the AES standard only
specifies a mapping between plaintext/ciphertext/keys and bit strings.

This is a bug in the standard that should be fixed. As I said in a
previous article, the definition of AES would be complete if FIPS 197
did any of the following things:

- give a bijection between polynomials in GF(2^8) and integers 0..255.
The correct bijection is:
b_7.x^7 + b_6.x^6 + b_5.x^5 + b_4.x^4 + b_3.x^3 + b_2.x^2 + b_1.x + b_0
<->
b_7.2^7 + b_6.2^6 + b_5.2^5 + b_4.2^4 + b_3.2^3 + b_2.2^2 + b_1.2 + b_0

- give the order of bits within an octet; i.e. whether the first bit
in an octet, written on the left in the FIPS, is most significant
("big-bit-endian") or least significant ("little-bit-endian").
The answer is big-bit-endian.

- say which bit numbers in an octet are most and least significant.
The answer is bits 7 and 0 respectively.

- say which bit of a *block* corresponds to the MS bit of the first
octet. The answer is the first bit, numbered 0.

- say whether the hexadecimal representation 'HL' corresponds to
the integer 0xHL. It does.

- say whether the binary representation {A B C D E F G H} corresponds
to the integer ABCDEFGH in binary. It does.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPHLlVzkCAxeYt5gVAQHAbggAroMr59kPlMTFVflDpAgYLm+ArOghdwLy
pKIWiOGNgeXvQ4SJlwTs2J95lNuf2J2HGgBYDuXC1zwOfh+j3NT6Rkd0/xA6s6ty
LF/Caz8hWWUN5JJn0XyYVXlZgxxVLa6eV5TE9lyvxjA4IvUibzZbySnPL7lgl5qN
xzxV11Nadu4tFvaZHH9X3Uz0RoCyaBdYvh6nte++fDJGHjpj7dZtVQLLw4+FS4gu
Wvt8QjWzAJdHbKaBaJ7xTZ/BBcRmY2lpTNktkWikayBj/0nXVXNtMfnMwwXlM0X/
NiHOmn9RnovplTqvaPzg0yxuPcV3R18GzIAavnzGoG+ti1o1m1vdtQ==
=NEWZ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/kjekRgNeYZ4/m/Df2GN87RgpIJ", "n_sections": 100}, {"thread": "kjekRgNeYZ4", "msg": "Irs2vN_R3wkJ", "author": "David Hopwood", "date_disp": "Feb 27, 2002, 12:11:52\u202fAM", "subject": "AES standard and Rijndael", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

AMSRL-CI-CN wrote:


> "Paul Crowley" <pa...@JUNKCATCHER.ciphergoth.org> wrote:
> > ... And by "octet" I do not mean an
> > ordered sequence of eight bits - I mean an integer between 0 and 255.
> > The term "high bit" has meaning in reference to an octet, but
> > "leftmost bit" or "first bit" does not.
>
> As used in network protocol specification etc. an octet is a
> well-defined group of 8 bits,

No. The value as an integer is well-defined; the value as a sequence
of bits is not (at least, not as part of the definition of an octet).

If you meant a group of 8 bits with no ordering and no specification
of which is the MSB, that's not an adequate definition, and I'm not
aware of any specification that uses that definition. If the bits are
labelled from MSB to LSB, OTOH, then we necessarily have an integer:
"most significant".."least significant" are defined in terms of the
numeric weights 2^7..2^0.

> not necessarily interpreted as representing a nonnegative integer.

What it *represents* is obviously dependent on the protocol. However,
the *value* of an octet is always an integer from 0..255.

> For serial communication
> one needs to somehow specify which bit goes first in time;
> for parallel communication one needs to somehow specify
> which signal line is associated with which bit. Unfortunately
> there is not universal agreement on conventions for either of
> these.

Who cares? The effects of that are localised to the physical layer,
and it really doesn't matter whether different protocols use
different conventions, if they would be physically incompatible
(e.g. because they use different transmission media and speeds,
handshaking, logic levels, etc.) anyway.

> Then there is another issue: When a stored octet is
> accessed by a computer program (at the lowest level,
> "machine instructions"), almost always it is automatically

^^^^^^^^^^^^^


> interpreted as representing an integer value, for all
> instructions that are defined in terms of operations on
> integer values.

Always, without exception. Even bit shift and rotate instructions are
defined in terms of shifting towards the MSB or LSB (and therefore can
be specified entirely in terms of their effect on the integer value);
they are not defined as shifting towards the "first" or "last" bit.

[The naming of "left shift", "right shift", etc. is based on the
Hindu-Arabic numbering system, which possibly was indirectly based
on the Babylonian system [Babylonian]. This convention is now much
less controversial than the big-endian/little-endian conventions -
probably as a result of there having been over 2000 years longer to
get used to it.]

> That representation is very dependent on
> details of the machine architecture, and again there is not
> universal agreement on how to map stored bits into binary
> representations of numeric values.

This doesn't matter either. The bit order of octets within files
(or sent in network protocols) is not specified, and the bit order
of integer registers or variables is not specified, but that doesn't
cause any difficulty in taking the value of a register that holds
0..255 and writing it to a file/stream as an octet, or reading it
back. The reason why it doesn't cause any difficulty is that both
values are modelled as integers, and it's hard to get the identity
mapping wrong.

Of course ordering issues still arise when processing integers that
are represented using more than one octet. However, the fact that
bit order *within* an octet is not normally an issue for protocols
above the physical layer, is still a considerable simplification.

As I said in the last thread where this was discussed, the classic
"On Holy Wars, and a Plea for Peace" paper [IEN137] effectively
presented three options that were necessary, and just about sufficient
for interoperability:

- consistent little-endian,
- consistent big-endian,
- consistent chunk size.

The paper recommended consistent big-endian, but we ended up with
a consistent 8-bit chunk size instead.

> However, there are
> only a few variations in common use. Since what matters
> to most of us is the behavior of the bits within computer
> programs, we usually concentrate on which is the "least
> significant" bit of the representation of an integral value,
> etc. It is a big mistake to talk about "left" and "right",
> but MSB and LSB have well-defined operational meaning.

It is not a mistake if you define what you mean. People use the
terms "left shift" and "right shift" all the time without any
confusion. It would be a mistake to think that this *literally*
means left and right, but I don't see many people making errors
like thinking that "<<" means "shift toward the LSB", for example,
to the same extent that errors are continually made over whether
big- or little-endian byte order is to be used.

Even though in principle this is an arbitrary choice, there have
been almost no cultures that used a consistent-base positional
numbering system with the MS digit on the right (independent of
which writing order they used). The only exception I know of is
Egyptian numerals [Egyptian], which could be written either
MS-on-left or MS-on-right. Some systems have used an MS-at-top
convention (e.g. Mayan [Mayan] and Chinese).

> (People usually draw pictures with the most significant

> position on the left, inspired by ordinary decimal notation,


> but for some purposes it is more useful to draw the LS
> stuff on the left, or even at the top.

LS on the left is asking for confusion, IMHO. LS at the top is
debatable; I wouldn't use it.

> Another requirement for a convention in order to communicate
> properly.)

> It is also a mistake to talk about "bit position numbers"
> within a byte or word, because again there is not
> universal agreement on whether the LSB or MSB is bit 0.

Not universal, but I think most people agree that labelling the
bit with numeric weight 2^i as bit number i is objectively better
than the opposite order, or starting numbering at 1 - regardless
of their byte order preferences. In any case this is purely a
documentation issue, not a protocol or design issue.

> On some platforms one even finds a mix of conventions,
> the PDP-11 32-bit integer arithmetic support in the FP11
> being one example (bytes within the doubleword were
> numbered in this order, MSbyte to LSbyte: 1032, due to
> the FP11 designer thinking of words as big endian while
> the PDP-11 convention for bytes within words was
> already little-endian).

Right, so don't do that.

> The bottom line is that for a program to communicate 8
> bits to another program, both programs need to agree
> on bit order within the octet.

*Absolutely not*. The Internet protocols, and interoperability of
file formats across platforms, work fine without anyone having agreed
on this.

Most binary Internet protocols use big-endian *byte* order within
words, but they do not specify bit order within bytes at all.
In the case of IP over PPP over RS-232, for example, opposite bit
and byte orders are used, and this works fine, because the bit order
only affects the RS-232 layer, and the byte order only affects
higher layers. IP/PPP could just as easily work over a big-bit-
endian physical layer; it really doesn't matter, and certainly
the programs at the end-points do not have to agree on bit order.

> The simplest solution is for the programs to use the internal
> integer representation LSB for the same bit purpose;

I don't even know what bit order you're proposing here.
"The same bit purpose"? What's that - LSB first or last?

The simplest solution is not to define protocols in terms of bit
strings at all. There are a few cases where bit order has to be
specified, for example when defining compression algorithms, or
representing bit arrays efficiently, but they are quite rare.
For those few cases, use big-bit-endian order, i.e. MSB first
and LSB last, since that is consistent with how ASN.1 and
IEEE P1363 represent bit strings.

> this already has to work pretty well in moving data around due
> to the prevalence of ASCII or ISO 10646 coding of characters
> and the tendency for people who find they can't read text from
> somebody else to complain until the problem is fixed.

I could be wrong, but I seriously doubt that any end-user has ever
had to complain because bits were reversed within an octet. It
takes considerable effort to mess up a protocol so badly that
it does that.

> In effect, the order of bits within octets was nailed down
> historically when a choice made for the Teletype commutator.

Not relevant. The software on my computer has no need to know anything
about what bit order is used by the physical protocols used to send
this message.


[Mayan] "MichielB",
Mayan Mathematics page
<http://www.michielb.nl/maya/math.html>
(Notice how the author thinks in little-endian:
"Numbers were written from bottom to top" :-)

[Babylonian]
University of St. Andrews, U.K.
Babylonian Numerals page,
<http://www-groups.dcs.st-and.ac.uk/~history/HistTopics/Babylonian_numerals.html>

[Egyptian]
University of St. Andrews, U.K.
Egyptian Numerals page,
<http://www-groups.dcs.st-and.ac.uk/~history/HistTopics/Egyptian_numerals.html>

[IEN137] Danny Cohen,
"On Holy Wars, and a Plea for Peace,"
IEN 137, 1 April 1980.
<ftp://ftp.isi.edu/in-notes/ien/ien137.txt>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPHxqCTkCAxeYt5gVAQH9FwgAsoT+JGwhlV516T3dE3TGrce1qUJaksUh
4WG1ND/PHwm20eAhPecx7WUcN6cQYTqNHBLlGNNgi8Q6b/1eAkkMG55PI8jPWD4K
r5r9vE1CDO/UPph0hnEqVvKIfkEl58oIMhan8QDQNoQFUzrE+SxFccv0TK5WKgkv
+8tixg/r8BnMhftbErvtfSp/GKvHMupCQmVJjypfYvE3+ZSM+dEWj9nDVpMKU1Ud
C8bulzv8QamaYM147jHhf4Gz9kYQpe4urABZnFlgrdc/zo4MU/KLQwxJFTI7rWre
f7K3tXkAPcrAKI8PC997dlv/8NT8DbyOI/FXhFGqxj5SJgSXTqdyng==
=RFxf
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/kjekRgNeYZ4/m/Irs2vN_R3wkJ", "n_sections": 100}, {"thread": "kjekRgNeYZ4", "msg": "EihHw2KXGZ8J", "author": "David Hopwood", "date_disp": "Feb 27, 2002, 12:15:02\u202fAM", "subject": "AES standard and Rijndael", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Eric Smith wrote:
> Paul Crowley <pa...@JUNKCATCHER.ciphergoth.org> writes:
> > A byte or octet is an integer between 0 and 255.

More pedantically, the value of any octet, in the standard reference
model that everyone uses, is an integer between 0 and 255. I.e.
'octet' is the name of a type; [0,255] is the value set of the type.

('octet' and 'byte' are also the names of a unit of information, in
the Information Theory sense, and therefore of memory capacity, but
that's not the usage we're discussing.)

> You're assuming that the bits are used as a place value representation
> of an integer, using assigned weights of 2^0 (LSB) through 2^7 (MSB).

He's not assuming that a binary representation is used at all.
There are no *bit string* operations defined on, say, the octets
that are transmitted by IP, or that are stored in files on a POSIX-
conformant operating system, or that are used to represent a string
in UTF-8 or ISO-8859-1. Those are modelled as integers from 0 to 255
inclusive; *not* as sequences of 8 bits.

(Some Internet protocol specifications label the bits as 0..7, but
don't confuse labelling with ordering; those specifications don't say,
or need to say, which bit is "first".)

> But there's nothing in the definition of byte or octet that requires
> this. A byte or octet can just as easily represent an integer between
> 308 and 563, a discontinuous range of integers, a fixed point number,
> or even non-numeric data.

You're confusing the definition of what an octet value *is*, with what
an octet can represent. It can obviously represent any set of up to 256
values, but that's not helpful if you want to specify which octet values
should actually be used in a given protocol.

For example, if you want to represent an integer between 308 and 563
as an octet, then one possibility is to use the representation with
abstraction function 'abstract(x) = x + 308'. The type of that
function is 'abstract : octet -> [308,563]', where octet = [0,255].

In other words, a reference model for octet values is needed in order
to specify how they are used to represent any particular set. In some
parallel universe, the reference model could have been defined as
{0,1}^8 instead of [0,255]; there's no particular reason why that
wouldn't work. However, we're not in that universe, as can easily be
demonstrated by the following set of tasks:

- store an octet at a given location in the virtual memory of a
process, using assembler or C.
- store an octet in a binary file, using your choice of programming
language or shell commands.
- transmit an octet over some networking protocol (telnet, say).
- display the character that corresponds to an octet in ISO-8859-1,
if it is printable.

Consider how you would do each of the above tasks:
a) first with the octet value 65 or 0x41.
b) then with the "octet value" <0, 1, 0, 0, 0, 0, 0, 1> (i.e. a sequence
of 8 bits, where you have no information about which is the MSB).

For each task, a) is easy, and b) is impossible. Byte/octet values
are integers, not bit strings.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPHwlDDkCAxeYt5gVAQGaPQf/cwJgGOpURHSCbeOFhKYEPsMvyinwhFEa
lSAvYEow+P90qY0jjbTUXP/0hiktTbfmnH0arFVF2YA0/7Fq8r1xOjV7Ck4KuBZw
K5J4r+MD2y0uMrJu+DTj3uXsrEH0JgZW84rTn8/CiPJO2McqJgtKXZqLi5Bp5hxZ
aGltFYYCoNVuLylxT9+wyTWxZBq3kxMdkmexggrnFimfE8OX3FFj88bmjKkqvzwV
+rt+fsQX01/+chzvQsvz5BwrbXeE06cz8GWV3glSo5rDPEJp1c20Th/bU/COKorB
x6en+WIx2ip8HjUYYBtjw8ksv6h2IZlCcPOg6jMoDP0kdmFBuumPoA==
=Mcz+
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/kjekRgNeYZ4/m/EihHw2KXGZ8J", "n_sections": 100}, {"thread": "kjekRgNeYZ4", "msg": "Q7YRqNhl2TIJ", "author": "David Hopwood", "date_disp": "Feb 27, 2002, 12:19:13\u202fAM", "subject": "AES standard and Rijndael", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Schlyter wrote:
> In article <87ofic3...@saltationism.subnet.hedonism.cluefactory.org.uk>,
> Paul Crowley <pa...@JUNKCATCHER.ciphergoth.org> wrote:
>
> > It's octets I'm defending; I'm not that pushed about whether it's good
> > to use "byte" as a strict synonym. And by "octet" I do not mean an
> > ordered sequence of eight bits - I mean an integer between 0 and 255.
>
> But what if the 8-bit quantity represents a signed integer between
> -128 and +127? What would you call such a thing?

I'd call it a signed integer between -128 and +127. If, in addition,
I knew that the representation was two's complement, I'd call it a
signed 8-bit two's complement integer.

> Since it's not an unsigned integer between 0 and 255, it cannot be a
> byte according to you....

And indeed it is not a byte/octet (or byte/octet value). It can be
*represented* as a byte/octet, which is something entirely different.

[Unfortunately, Java uses 'byte' as the name of its signed 8-bit two's
complement integer type. Misnaming of basic types in programming languages
is just something we have to live with, apparently (c.f. 'char' in C).
However, note that Java's 'byte' type is used to *represent* octet
values in its I/O APIs. The octet values may in turn represent something
else, but what is important here is that there is a well-defined two's
complement mapping between Java 'byte' values -128..127, and octet values
0..255. Neither of these types are bit strings, and I don't know of any
other programming language that uses bit strings in its binary I/O APIs.]

> > The term "high bit" has meaning in reference to an octet, but
> > "leftmost bit" or "first bit" does not.
>
> An octet can represent several things, e.g. a signed or an unsigned
> integer. The "leftmost" aka "high" aha "first" bit is defined from
> the representation as an integer,

"left" == "high" == "first"?? Where did those two assumptions spring
from (not only big-endian, but Hindu-Arabic bias as well ;-)?

I gather you think that the hashes Tiger, HAVAL, RIPEMD-* and Panama,
and the RS-232 serial protocol, all use the "wrong" bit order, then?

> but it's sensible to let the bits

> retain these labels even if the octet is to represent e.g. a bitmap.

OK, let's take a bitmap format as an example. Suppose I tell you only
that, in some hypothetical 16x16 pixel black-and-white icon file format,
the bits of the image (0 for black, 1 for white) are ordered from
left-to-right on the top line, then left-to-right on the second line
down, and so on until the bottom line. The resulting bit sequence is
split into 8-bit octets, and stored in the file without changing the
bit order.

If octets (as stored in files) really were strings of 8 bits, that would
be a sufficient description of the format, right?

Obviously (although perhaps not obviously, if you think that "high"
is "also known as" "first"), it is *not* sufficient in practice.
Specifically, it is not sufficient because the octet values stored
in the file correspond to integers, not bit strings, and I haven't
specified a mapping between those types. This is precisely the mistake
that FIPS-197 makes.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPHxsHDkCAxeYt5gVAQHT4gf7ByMjc85+WcUvRMkaBL8XzoDsAbuQmQUI
UAWgxUzhGFUpjj4ZiaYhbYT5hr4Gg0MWaBqMdEODYaP8FWeqExfuDJUkYyrZGyyK
ctGsb3CSDfFo+jysZAwZYcx8N8pa/86ZXG+Zjf1yytzS+WUVpqUEWfDVTOYWs6QI
TljcPUxnjwjVm+5Yw8U811MIbJ0o+aFucoThV8QbQh5D/r7/GXulRHPhWOq3ocjt
EL5HF9EYIq7CNbOfpSUoPopTj2eVhJfeGhUecUIH8ERYRKahgFyKanPzd2fFC1bG
vnSxqgT0MEpFFEXc1IXXH5qM2ACGmQg779M0jO1yki2LCD6urY6R0w==
=KucK
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/kjekRgNeYZ4/m/Q7YRqNhl2TIJ", "n_sections": 100}, {"thread": "kjekRgNeYZ4", "msg": "EFNekHoHLYwJ", "author": "David Hopwood", "date_disp": "Feb 28, 2002, 4:15:31\u202fAM", "subject": "AES standard and Rijndael", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Eugene Starokoltsev wrote:
> Paul Crowley <pa...@JUNKCATCHER.ciphergoth.org> wrote:

> > euge...@gmx.net (Eugene Starokoltsev) writes:
> > > Sorry, I don't understand still why do you say that the specification
> > > is incomplete. Can you give an example of a valid AES input (i.e. a
> > > string of 128-bits as input data and another string of 128, 192 or 256
> > > bits as a key) and two models of computing in which AES gives
> > > different results?
> >
> > The specification is incomplete precisely because it is specified to
> > operate on strings of bits rather than on strings of octets. The
> > octet, not the bit, is the practical lingua franca of computing; all
> > modern file formats and high-level protocols are described
> > unambiguously in terms of sequences of octets, and it would benefit
> > AES to follow this practice.
>
> OK, I understand. You oppose not to the cipher specification itself
> but to it's interface.

The interface is part of the specification.

> While we have some freedom in choosing of input data presentation I
> strongly disagree with the idea to have two equal in rights input
> formats.

That is the situation for most cryptographic hashes, but in practice,
everyone uses the octet string interface, and most libraries do not
implement the bit string interface.

Note that the octet string interface to Rijndael is what people are
actually using now: all of the implementations use the mapping to
octets that was implied by the Rijndael submission.

> From my point of view the best format for input data of a block cipher
> is bit strings. First of all it follows to a mathematical definition
> of a block cipher.

The usual mathematical definition is generic in the block type.
P = C = {0,1}^n is only an example.

> Next, it is common to define interface of crypto algorithm in terms of
> bit strings only.

No it isn't - in fact I'm not aware of *any* example of that for a
published hash, cipher or MAC, if FIPS-197 is excluded.

There are some word-oriented stream ciphers that only have an interface
defined in terms of words (e.g. ISAAC, LEVIATHAN, SEAL [*], WAKE,
WiderWake), and some ciphers that don't define a byte order simply
because they are poorly specified (e.g. all variants of TEA). These
examples don't specify an unambiguous bit string interface either.

[*] SEAL-3.0 has an interface defined in terms of 32-bit words for
the keystream, and octets for the key.

> Examples:
>
> MD5 (RFC 1321)
> SHA-1 (FIPS PUB 180-1)
> DES (FIPS 46-3)
> Recommendation for Block Cipher Modes of Operation (NIST SP 800-38A)

You're mistaken - all of these have both bit string and octet string
interfaces (which implies that they have an order of bits within octets:
all big-bit-endian, as it happens).


RFC 1321 is commendably clear about bit order:

# In this document a "word" is a 32-bit quantity and a "byte" is an
# eight-bit quantity. A sequence of bits can be interpreted in a
# natural manner as a sequence of bytes, where each consecutive group
# of eight bits is interpreted as a byte with the high-order (most
# significant) bit of each byte listed first. [...]


FIPS 180-1 is much less clear, but the fact that it is big-bit-endian
follows from the examples, e.g. in Appendix A:

# Let the message be the ASCII binary-coded form of "abc", i.e.,
#
# 01100001 01100010 01100011.

(where the previous definitions establish that bit strings are written
left-to-right). Unfortunately this is in a non-normative part of the
specification, which is IMHO a bug.


For DES and 3DES, you have to look at both [FIPS46-3] and [SP800-38A]:

[FIPS46-3]:
# Given two blocks L and R of bits, LR denotes the block consisting of
# the bits of L followed by the bits of R.

(i.e. "left is first")

[SP800-38A] (equivalent definitions were also in [FIPS81]):
# Least Significant Bit(s) The right-most bit(s) of a bit string.
# ...
# Most Significant Bit(s) The left-most bit(s) of a bit string.
# ...
# Given a positive integer m and a non-negative (decimal) integer x that
# is less than 2^m, the binary representation of x in m bits is denoted
# [x]_m . For example, [45]_8 = 00101101.

Therefore DES and 3DES are big-bit-endian ("left is first" and
"left is MSB" => "MSB is first"). This is also confirmed by an example
of encrypting ASCII in Table B1 of [FIPS81].


All of the following ciphers, hashes and MACs also have octet string
interfaces:

3-Way, Anubis, Blowfish, BMGL, Camellia, CAST-128, CAST-256,
CRYPTON, CS-Cipher, DEAL, DESX, DFC, Diamond2, E2, FROG, GrandCru,
GOST, Hierocrypt, HPC, ICE, IDEA, JEROBOAM, Khazad, LILI-128, LOKI91,
LOKI97, MAGENTA, MARS, MDC, MISTY, Nimbus, Noekeon, Panama, Q,
Rainbow, RC2, RC4, RC5, RC6, Rijndael (in the original submission),
SAFER[+/++], Sapphire-II, SC2000, SEAL, Serpent, SHACAL, SHARK,
SKIPJACK, SNOW, SOBER, SPEED, Square, Twofish

GOST-Hash, HAVAL, MD2, MD4, Panama, RIPEMD-{128,160}, SHA-{256,284,512},
Snefru-2, Tiger, Whirlpool

CBC-MAC, XCBC-MAC, HMAC, RIPEMD-{128,160}-MAC, SSL3-MAC,
Two-Track-MAC, UMAC

Many of these have *only* octet string interfaces.

> Do you want to say that all that specifications are incomplete and
> must be fixed?

No, because they're not incomplete. In the case of SHA-1, it would have
been better for the octet string interface to have been specified
explicitly rather than being implied by a non-normative example, but
there is no doubt about what the interface is.


[FIPS180-1] <http://www.itl.nist.gov/fipspubs/fip180-1.htm>

[FIPS46-3] <http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf>

[SP800-38A] <http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf>

[FIPS81] <http://www.itl.nist.gov/fipspubs/fip81.htm>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPH3v8zkCAxeYt5gVAQEMLwgA0cXqpSiB96hNYfKfg17aEOO+x7pygswM
aNRJNI1cROrqfYtY4Xy09ueqp+Y36O3AWi0+co+tb1AGuMnfMt9o+oJzZthHFvze
Nwwb7b1NFKVCpnvUJh6KAcBd0ms5OxtwS2fq6rXbIQgE3Towf4dDxzWUHUYasGax
uMRTFqh3+sT7/WPmF0bi0qODGqvt1Kw6vkX35UJzAnc2Jy6YSZttFtSQkgRvZy08
joJWQs5ZxMpp5VkvAboEWI1uWa6YS6MXvOfGpTpNtRYuyMxYYUnWgcF7uyGYn6uA
WuwHBO7LVgKDOZJFf2jSAVQ62MQ/3uuEa4cttSi0XJHiWf4HVHTXGw==
=0LIJ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/kjekRgNeYZ4/m/EFNekHoHLYwJ", "n_sections": 100}, {"thread": "lf6lA5EBxfk", "msg": "grgZNSh_qIcJ", "author": "David Hopwood", "date_disp": "Jan 29, 2002, 11:33:39\u202fPM", "subject": "Low Exponent RSA", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Gregory G Rose wrote:
> Brian Gladman <b...@gladman.uk.net> wrote:
> > But please don't assume that I am pushing this approach since I am not -
> > OAEP seems like a better path to follow. But I am in no way convinced by
> > any of the arguments that I have heard that such an approach would be
> > insecure when used with a public exponent of 3.
>
> For reasons I can't talk about, I and others (I
> can't say who) have looked extensively at e=3 RSA,
> and concluded that it is perfectly safe in the
> context of using correct padding and in the face
> of the published literature.

Appeal to anonymous authority? ;-) Anyway, the conclusion is the same one
I'd come to.

> There's a bit of a cloud over OAEP, there was an
> entire session devoted to it at Crypto'01. Boneh's
> "simplified OAEP" or Shoup's "OAEP+" seem to be
> the way to go at the moment.

Boneh's SAEP isn't even provably secure for RSA; only for Rabin.

RSA-SAEP+ is claimed to be provably secure, but it is so poorly specified
that I'm not even sure precisely what it is supposed to be: the paper [1]
simply says "The description of RSA-SAEP+ is analogous to the one given
above [for Rabin-SAEP+]". Rabin-SAEP+ is in turn only specified in a short
paragraph giving differences from Rabin-SAEP. This is not sufficient to
analyse RSA-SAEP+ properly for resistance to side channel attacks - the
details of *how* decryption is done matter, not just the function that is
computed.

In any case the claimed reduction is not particularly tight, and despite
the name, it's not very much simpler than OAEP, AFAICS.

> In the real world, enough random padding, OAEP, or
> the newer variants, are secure with e=3. (Note
> that Bleichenbacher's attack (Crypto '98) and
> Manger's attack on OAEP (Crypto'01) require that
> the only response to invalid messages is a single
> "bad message" error, that no detail should be
> given to the attacker about what went wrong.

More precisely, that no detail should be given to the attacker
that reveals information about the direct RSA decryption output.
It is not necessarily a problem to reveal information about a hash
of the output.

> SAEP and OAEP+ don't seem to allow these attacks.)

AFAICS, Manger's attack applies directly to SAEP, SAEP+, and OAEP+ if
they are implemented in a similar way to a vulnerable implementation
of OAEP. (At least, I think that is the case for RSA-SAEP+; it's
hard to be sure for an algorithm that is specified only by analogy!)
Of course it is also possible to prevent the attack for these
algorithms, in much the same way as I've described before for OAEP.

Victor Shoup's RSA-KEM [2], on the other hand, does not have the same
potential side channels as SAEP, SAEP+, OAEP and OAEP+, since there
are no conditional operations that apply to the output of the RSA
decryption function before it is hashed, and there is only one possible
cause for a ciphertext to be invalid. I recommend RSA-KEM for new
protocols using RSA (also because of its much simpler and tighter
security proofs, and ability to provide chosen-ciphertext security for
arbitrary-length messages).

It is also possible to define "Rabin-KEM"; the fact that there are
two possible roots < N/2 can be handled by trying to decrypt using
each root in turn, since the MAC will be invalid except with negligable
probability for the "wrong" root. (It is possible that both roots
appear to be valid, but that should never happen in practice.) Of
course it would be much better if this was formally defined and
analysed somewhere, but it appears to be IND-CCA2-secure with a tight
reduction to factoring in the RO model.


[1] Dan Boneh,
"Simplified OAEP for the RSA and Rabin Functions,"
In proceedings of Crypto '2001, Lecture Notes in Computer Science
Vol. 2139, Springer-Verlag, pp. 275-291, 2001.
<http://crypto.stanford.edu/~dabo/abstracts/saep.html>

[2] Victor Shoup,
"A Proposal for an ISO Standard for Public Key Encryption (version 2.1),"
Revised December 20, 2001.
<http://www.shoup.net/papers/>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPFd2ZjkCAxeYt5gVAQH2Twf/dPbW9UhAwwTDf7u1aSMsZPQl2VaIOwCL
4LVdEIfZ26OncNCnmxgMhedT/Z8a7PEqLOeocuZhvT7bh4GPJP/+v3qdGVjaSkT6
0Ep71n4OVHwV1dqTqLoENVAzdqxmMr3LmH0vS6PbUOg+XbdvgtyRN+01nhgvDhVJ
KI68/iIExYz93DkQjLibM3kTmhxuS/FXEYl8xo7S07SbahCmh7xg0SgpvkG0YHlv
rs2OVI9pGVlNguQURH52xkmrNLnytHuK0SoLeeEJIiZvhD8BMyDVacIIg9Yi5OBu
S/FdAw0NheOvugiaYzdNC6N4bJXdEzPI0xUmoGhTQC/9Q1Z5FVzhNQ==
=YUia
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/lf6lA5EBxfk/m/grgZNSh_qIcJ", "n_sections": 68}, {"thread": "lf6lA5EBxfk", "msg": "CqeyZza-oVYJ", "author": "David Hopwood", "date_disp": "Jan 31, 2002, 2:08:33\u202fPM", "subject": "Encoding methods for RSA (was: Low Exponent RSA)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Rubin wrote:
> g...@qualcomm.com (Gregory G Rose) writes:
> > There's a bit of a cloud over OAEP, there was an entire session
> > devoted to it at Crypto'01. Boneh's "simplified OAEP" or Shoup's
> > "OAEP+" seem to be the way to go at the moment.
>
> I've wondered why not just use a full width "block cipher".

OAEP effectively is a full width block cipher, using two Feistel rounds
with Feistel "halves" of different sizes.

In any case, there are enough alternatives that no-one needs to invent
a new one. IMHO of the published encoding schemes applicable to RSA
encryption, RSA-KEM is the clear winner in all the following categories:

- tightness of security proof (including in the multiple use setting)
- simplicity and clarity of security proof
- simplicity of implementation (relative to schemes with comparable
security properties)
- resistance to side channel attacks
- chosen ciphertext security for arbitrary length messages.

It produces slightly longer ciphertexts than RSA-OAEP+XEME (a hybrid version
of RSA-OAEP+ in which part of the message is squeezed into the encryption
block), but that is not an issue for most applications.

In fact the KEM schemes from version 2.1 of Shoup's ISO paper are also
what I'd recommend for GF(p) or elliptic curve encryption: DLIES-KEM and
ECIES-KEM use the same key encapsulation method as RSA-KEM; they are also
compatible with DL/ECIES from P1363a, but with the security bugs fixed.
If you want a security proof in the standard model rather than the random
oracle model (at some expense in efficiency), there is also ACE-KEM.

Brian Gladman wrote:
> As a matter of interest, if we switch the application from encryption to
> signature verification, to what extent do the same issues turn up in a
> different disguise?

For signatures, the attacker gets the entire output of the RSA private
key operation, but the input to that operation is highly constrained
(usually; there are some broken schemes like ISO 9796-1 where it isn't).

The most commonly used encoding method for RSA signatures is PKCS #1 v1.5
block type 01 (what people normally mean by "RSA PKCS #1 signatures").
The property of RSA used by Bleichenbacher's and Manger's attacks
doesn't appear to be exploitable in that case, but it's still a completely
ad hoc scheme with no possibility of a security proof.

The best standard, provably secure encoding method for RSA signatures is
the version of RSA-PSS that is to be standardised in IEEE P1363a, but I
doubt that many protocols will start using it unless an attack is found
on RSA-PKCS #1 v1.5 block type 01. Note that PSS is royalty-free; the
PSSR variant with message recovery isn't.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPFkRVTkCAxeYt5gVAQHKfwgAlUfedhbyjEd/OQ7lPsaStHb0gOmf97Cv
tZKP0Q0ICuVBAlpNdLUbcIPVJJBMTzBDZuyqiC3bF523TGtyItAei5altKeUW0Zx
DMGmOwtl/PAeP6EOYgpDZQFHxjKmI8X7wyE0PA7cOlSlKLJXAdujTLmOe0aB8yEw
xn7mME8F1zdOGYH5ZSsnJTVngrmwzdnlkJpgLQr/2b6Rm0e5Z1zasJAR1kR0R03l
Slpw9KJrZQDaG2fvjnMi7kzGQLjT9d1+IDlwMw7qb+nsHHA0w1xAI2eWd0GbipYp
CXpDH6LqQPVZDw7UdLBBE4SlvCnPDpc7467ewfAEaN+Gc1ieHmmiDQ==
=plEr
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/lf6lA5EBxfk/m/CqeyZza-oVYJ", "n_sections": 68}, {"thread": "lghaGv8fdaY", "msg": "1Cll2Cq-6ggJ", "author": "David Hopwood", "date_disp": "Mar 22, 2002, 4:36:49\u202fPM", "subject": "Index Calculus", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jacob Chr0is Schuldt wrote:
> If I implemented a ElGamal cryptosystem with the [two] different kind of


> fields (F_{q} and F_{p^n}), which one would be most secure if we
> choose p to be different from 2 and q and p^n have the same bitsize?

If p is small (e.g. 3), then you should assume that this may not be much
more secure than F_{2^n'} with 2^n' ~= p^n, since the Function Field Sieve
algorithm can be applied:

L. M. Adleman,
"The function field sieve,"
In Algorithmic Number Theory: First International Symposium, ANTS-I
(L. M. Adleman and M.-D. Huang, eds.), pp. 108\u2013121.
Lecture Notes in Mathematics 877, Springer, 1994.

If p is sufficiently large then the difficulty is close to that of F_{q},
but I don't know enough about the algorithm to say what "sufficiently large"
should be.

> (And is it reasonable to compare with same bitsize?)

Yes, if p is large enough.

> And if we choose p to be 2 will the Index Calculus algorithm (with the
> Coppersmith modification) be running faster in F_{2^n} than in F_{p}
> if 2^n and p has the same bitsize?

Yes, see <http://www.medicis.polytechnique.fr/~lercier/english/dlog.html>
for the current records: GF(2^607) and GF(p ~= 2^397).

(Records for solving problems have to be treated with some care,
because the popularity of the problem matters as well as the actual
difficulty, but in this case there is definitely a substantial difference
in difficulty.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPJujvjkCAxeYt5gVAQGA/wf7BHOs0iAHUUf2QiInWLmHZcWn+tkJnPzM
VNHQQXMceJt4Mu+ntGeHiqjNQfN5xziTj7I8UwQLygBUUjjw1RWlMVgyHZU8tHzW
MBNros9m/oMXMuZWN0oK58bnSSurrFryKqNM+r9xj0eeA0/SJbW+/qD6l6reIHP1
BqPzB0UEdWYdK8kESGGFwOWBfUOv0uG7mLMD/7qlgciwVsXuMD13gWN67JTJuvCL
fQtivH9auKwLh1GEqlx3rWCs39QfS0MqPtKaiMkmPnPCZjX7gv8rkLz2TLH6Lg/O
ut+fiktTlTkEafSh8xq3sG0eMXfIcjscpLxbF3INZmCWGfTVsm7vhQ==
=bDkH
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/lghaGv8fdaY/m/1Cll2Cq-6ggJ", "n_sections": 3}, {"thread": "qFFqAP4L5og", "msg": "BCm0SPbMAfIJ", "author": "David Hopwood", "date_disp": "Feb 5, 2002, 12:02:04\u202fAM", "subject": "unpredictable IVs for CFB mode?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Wei Dai wrote:
> Appendix C of NIST SP800-38A
> (http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf, page
> 27) says that for CBC and CFB modes, the IV must be unpredictable. I
> understand why this is the case for CBC mode (see
> http://www.cs.ucdavis.edu/~rogaway/papers/draft-rogaway-ipsec-comments-
> 00.txt for the attack), but I don't know why this also applies to CFB
> mode.

For full feedback it just needs to be unique for messages encrypted by
a given key. For partial feedback it needs to be unpredictable. To see
why, consider 1-bit feedback, zero IV, and random key for a single
message.

Actually, I can see how full feedback CFB could be proven secure
assuming the block cipher is modelled as a PRP, but not at all for
partial feedback. Is there any such proof?

I've never understood why anyone would want to use partial feedback
CFB, anyway. I suspect many people who use it only do so because they
mistakenly think that k-bit feedback is necessary in order to send the
data k bits at a time. If you look at section 9.6 of AC2, for example,
it's easy to see how they could get that impression from there.
(IMHO, Chapter 9 is one of the least satisfactory chapters of AC2.)


afn2...@afn.org (Robert G Durnal) wrote:
> The IV must be different (and unpredictable) for the OFB mode,
> since the cipher works only on multiply enciphered IV. But for CFB,
> since the cipher works on the output stream, there is no need to have
> an unpredictable IV, and the IV need not be secret.

This is wrong. OFB (with full feedback) only needs a unique IV, and
CFB doesn't only "work on the output stream". It almost sounds as if
you've got the names of the modes the wrong way round.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPF9mBDkCAxeYt5gVAQG17gf9GT9Pk+PwlXG+FGxcbaabLWtgLOdOcACL
mo9Fv/j6JVOXjzrBOPAN9eh1FEZoiGOpr0YHsSlKoXgXOHSef/qGx+PyZwhuvyS2
kcVP31teNYrkISFaWE4Sqn2uSy4x0K7neX6UC/VDBnNYYBv0pgRxK3PvunyIGk/H
oJLGcug+DRHaNCqW9G1mlZ4ah5VNB2zzgB8IFIhZqC4rngJI0O41TWVBqlSzWNfW
apgyAeoxknw6MkXDsYHJJ8iCqsW5qsAWO6ZsdUvDgg50qhBiK+mcrX6C3eemCRTW
H2ekgqrezc0y8dvMjOl7P43UR49lBB5fE3vWiycAB2OjxPEVXH0M0g==
=wapN
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/qFFqAP4L5og/m/BCm0SPbMAfIJ", "n_sections": 7}, {"thread": "sJT3hn-Rkcs", "msg": "mHa9Zzwt_OEJ", "author": "David Hopwood", "date_disp": "Feb 19, 2002, 9:34:24\u202fPM", "subject": "GSM and A5 encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Thomas Pornin wrote:
> According to Mok-Kong Shen <mok-ko...@t-online.de>:
> > What is the current status of A5?
>
> A5 is actually three algorithms: A5/0, A5/1 and A5/2.
>
> A5/0 is the "null" encrypt (the identity function)
> A5/1 is the "strong" encrypt
> A5/2 is the "weak" encrypt

[...]


> When you think about the consequences of the weakness of these schemes,
> remember that non-mobile phone conversation are unencrypted.

In any case, it is apparently possible to convince a GSM phone to fall back
to an unencrypted mode for *all* communications.

New Scientist, 19th January 2002:

# For now, one way to crack down on stolen GSM mobiles -- without involving
# the networks -- would be for governments to allow police forces to use
# a device known as an International Mobile Subscriber Identity (IMSI)
# Catcher, which has been developed by the Munich-based firm Rohde &
# Schwarz. [...]
#
# [...] The company company producing the Catcher offers two types, says
# Helga Schumacher of the German data protection commission -- one of
# which captures conversations as well as serial numbers. This threat
# of a greater intrusion into people's privacy has dogged the Catcher,
# and Rohde & Schwarz wouldn't talk about the machine at all when contacted
# by New Scientist.
#
# Because of this threat to personal privacy, Germany has this month
# introduced legal restrictions which prohibit the Catcher's use, except
# in serious cases such as those involving organised or drug-related
# crime. So even in Germany, they can't be used to track down stolen
# phones. But civil liberties campaigners are now worried the Catcher
# may be sold to other governments or secret services.
#
# To monitor a phone call the Catcher exploits another weakness in the
# GSM network to defeat the encryption that normally protects callers'
# privacy. It sends a degraded signal to the local base station to mimic
# the effects of poor reception. In such situations, the GSM network is
# designed to instruct the phone to stop encrypting its signal, because
# an unencrypted signal requires less bandwidth and so should suffer
# less interference. [...]

This attack sounds quite plausible, given the poor security design of
the GSM protocols. An unencrypted signal doesn't actually require less
bandwidth, though. In principle it might make error correction harder,
but I was under the impression that A5 was used as an additive stream
cipher, and in that case there isn't any *valid* reason to switch off
encryption, AFAICS. Of course it's a bad idea whether or not it improves
reception.

Has anyone looked at the 3G protocols in sufficient detail to tell
whether similar attacks apply to it? I.e. is there any provision for
the network to tell the phone to stop using encryption?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPHMIpDkCAxeYt5gVAQG6Bwf+I/rsJdGuMHJ7U+G+kdyn7dvwUnYQLtIb
aulE3TTj9uV5edfCpdFrzpHsFZzoEoQYFg+jli+oNJJMrEd6xTRmE5k3GfTXGQry
PfDxH8OLhXvXdattJpIMjUlwTqbYSoa0SPpYrZibdxCyD0KG7m9qI9vdIVyWeb7S
OUHmuHfyOPf+Ljrje8GgtI3+M8EemhmJSIUlKvUx3ysbvNOSUtXaynNEya2n0w98
xCJ7FZYHNsLjdXWUUkwn2cd7RVAbJ9YAz0TNoC+dfQxGrkQdOA/iQsC1pPL6b6Z4
fvM6hBNct/rTtXCnsGD2m3BsKeF43BqzFlJ5LQ17FTeasLvBcT4rpg==
=yxLR
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/sJT3hn-Rkcs/m/mHa9Zzwt_OEJ", "n_sections": 25}, {"thread": "sJT3hn-Rkcs", "msg": "54xUMEfALqoJ", "author": "David Hopwood", "date_disp": "Feb 21, 2002, 11:31:42\u202fPM", "subject": "GSM and A5 encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Lassi Hippel\u00e4inen wrote:
> David Hopwood wrote:
> <...>
> > New Scientist, 19th January 2002:
> <...>
> > # To monitor a phone call the Catcher exploits another weakness in the
> > # GSM network to defeat the encryption that normally protects callers'
> > # privacy. It sends a degraded signal to the local base station to mimic
> > # the effects of poor reception. In such situations, the GSM network is
> > # designed to instruct the phone to stop encrypting its signal, because
> > # an unencrypted signal requires less bandwidth and so should suffer
> > # less interference. [...]
> >
> > This attack sounds quite plausible, given the poor security design of
> > the GSM protocols. An unencrypted signal doesn't actually require less
> > bandwidth, though. In principle it might make error correction harder,
> > but I was under the impression that A5 was used as an additive stream
> > cipher, and in that case there isn't any *valid* reason to switch off
> > encryption, AFAICS. Of course it's a bad idea whether or not it improves
> > reception.
>
> A5 encryption has NO effect on signal bandwidth. There is also the
> frequency hopping scheme, that does spread the signal, but it isn't used

> for encryption or any other security reason. So the explanation appear
> to be FUD.

That's what I thought. However, that doesn't imply that the statement of
what the network does is incorrect.

> Besides, setting up a false base station will not work for long.

Note that the attack as described (I have no idea how reliable the
description is) does not require setting up a false base station:

# It sends a degraded signal to the local base station to mimic the
^^^^^^^^^^^^^^^^^^^^^^^^^
# effects of poor reception. In such situations, the GSM network

i.e. the *real* network

# is designed to instruct the phone to stop encrypting its signal, because
# [doesn't matter why].

This sounds like a different, and probably significantly easier, attack
than any of the "You are now in Libya" variants.

[...]


> > Has anyone looked at the 3G protocols in sufficient detail to tell
> > whether similar attacks apply to it? I.e. is there any provision for
> > the network to tell the phone to stop using encryption?
>
> The network can always refuse to encrypt. But there is a major
> difference in the architecture: in 3G, authentication is two-way.

If the network decides not to encrypt in the presence of induced
interference, then authentication doesn't help - the negotiation not
to encrypt will be authenticated on both sides (phone and network).

The important question is, under what circumstances (if any) can a 3G
network decide not to encrypt? Could any of them be influenced by an
attacker?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPHXJbTkCAxeYt5gVAQGzEwgAt/IPC02BgI4po5qTqh4LWgNa1SoCwssl
ZHFjpRjOfCP9Y++eMn2aZ5zWphR7uRXjp7gNclwXd7aSasYW7WrQvOjAzuS9Eqzn
ZvfzutugppB10sxoNypFX2raIy9tPaRvouOjRIJzL2W58njJXWM1m4IxZ2oSH7Bt
pg1QTT2bL2JbCnAhwZcxbYHhoNh73ZVfxO4fyAEC9uvdu/ie/IzpPMDXAjm1Fyqq
NaRjHqdp5DTNweGiEfXTLBBs/H4jKtxZb6Cuol4M4dhY/RQdHfTqTh5r3WfYxmsI
e+o7qA5rdcO8Wy1y2iUU+/lK1qjBK+4cEwcWQrP+4GTk7crX5dsiBg==
=aPXu
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/sJT3hn-Rkcs/m/54xUMEfALqoJ", "n_sections": 25}, {"thread": "t0coBXt9N_M", "msg": "XkDvH-lpSk0J", "author": "David Hopwood", "date_disp": "Mar 8, 2002, 10:01:27\u202fAM", "subject": "What are the strongest public key and stream ciphers?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

DJohn37050 wrote:
> BTW, ANSI X9 requires chunking in 256 bit steps for DH field p and RSA
> modulus n. Bitwise granularity did not seem to make sense here.

If you do the obvious thing and generate p and q for an RSA modulus as
uniform-random k-bit numbers, then pq may be either 2k-1 bits or 2k bits.
Guaranteeing that it is exactly 2k bits requires extra work. Not much extra
work, admittedly, but for variable-length RSA keys I cannot see any good
reason to impose an arbitrary bit length granularity - if an implementation
of RSA refuses to accept "odd" modulus lengths, that is just another
potential source of interoperability problems.

(Of course X9 has the silly "strong prime" requirements as well, so the
case against unnecessary key generation complexity has already been lost
there. I'm just pointing out that there is no need for new standards to make
this restriction. Imposing minimum key lengths is a different matter; that's
quite reasonable.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPIgmkjkCAxeYt5gVAQFi9Qf/Vy+BjEgoJktx+z6fp2QK6jpfwIxY/Lva
P2Kym5WIhCsvoS/pRc1mjFRT/5l1z/ub5TGZO1fHDGgQxMtykJ7BO6sesE8K/4UZ
TUAVNtIO0lPfDSiIyjpAp/U5IJMYiX8E2uaYZFp7Lc8iG0SagO7yyI2po0Gel1Ij
LLoQa1sksBhnkCKh6onFGGhZzNHArJU2sZja5GqXcWj0gXqaqkDXl+KYYN+uQSQ2
OLFgVi/BuCe/7m8Gg6HSABchK/q+x+WzW/7GfpN6wRzIbrk7/y+ZgmsXQwTl+A1L
ArUZDYlECNQscLdszMPznTZ9vIFyyu1FKKXKreLJfGEi9/E1MT5EBw==
=ju/7
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/t0coBXt9N_M/m/XkDvH-lpSk0J", "n_sections": 100}, {"thread": "t0coBXt9N_M", "msg": "2DDJxd4aa1UJ", "author": "David Hopwood", "date_disp": "Mar 12, 2002, 3:22:09\u202fPM", "subject": "What are the strongest public key and stream ciphers?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

DJohn37050 wrote:

Please quote relevant parts of the message you're replying to.

> ANSI X9 actually ensures the high order bit is one.

The high order bit of what? The high order bit of a variable length positive
integer (as opposed to a fixed-width integer representation) is *always* one.

Presumably what you mean is just the same as what you said in your previous
post: that X9 requires the bit length of an RSA modulus to be a multiple of
256. I've already pointed out why I think that's unnecessary and unhelpful.

> This aids interop as then if the high order bit of something to be
> encrypted is zero, it will always fit.

Why would you be encrypting anything without padding? In most situations
that would be insecure.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPIrluDkCAxeYt5gVAQFgGwf/WblXyZq3CksYDpe2KbhWGYqt0OpKyqTr
5cBnUXo0Kfb8sW+mJGwlySQmcro8CDVwRlxT+jAGdycJODYk4OGyGX8v0gLlL/Ze
zTQ3hN+Mp97twPD/49Lnd5g90iWlaVTE6tkHxAoB6FV2HFVet9Px84LMUluDVR3D
n3UTMYI3NJoYxGuhsnOI4OB0TzxoLKAEtoMaIo3gvn089wBJ8q8PzoUDkE9qbICs
OtLXL03JvmY5+rz1JLeXj4fgPO3hxtuX5cSXOGObQYrGrkUtE5tNxPQtj9uk0r/s
SsAC7pSi/bh1pZrpcziQMcXZXrFbmhYQ1314lHwSXzdIJ+V34i9/MA==
=idXs
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/t0coBXt9N_M/m/2DDJxd4aa1UJ", "n_sections": 100}, {"thread": "t0coBXt9N_M", "msg": "_RDey8TUJ74J", "author": "David Hopwood", "date_disp": "Mar 15, 2002, 2:36:32\u202fAM", "subject": "What are the strongest public key and stream ciphers?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

wtshaw wrote:
> David Hopwood <david....@zetnet.co.uk> wrote
> [about a claimed advantage of RSA moduli being a multiple of 256 bits
> in length]:


> >
> > Why would you be encrypting anything without padding? In most situations
> > that would be insecure.
>
> Certain strong algorithms do not require padding

We were talking about RSA. In most situations, encrypting using RSA without
padding is insecure (the exceptions are where the application data is
effectively already padded - and even then it is safer to use a
well-analysed padding/encoding scheme anyway).

David Scott wrote:
> Becareful the powers that be want people to be stupid enough to belive
> that padding is necessiary.

Beware people who have no idea what they're talking about. Just in case
you're willing to learn, though, I suggest reading the following papers:

Dan Boneh, Antoine Joux, Phong Q. Nguyen,
"Why Textbook ElGamal and RSA Encryption are Insecure,"
Extended Abstract in Proceedings of ASIACRYPT '2000.
<http://www.di.ens.fr/~pnguyen/pub.html#BoJoNg00>

Victor Shoup,
"Why Chosen Ciphertext Security Matters,"
Research Report RZ 3076 (#93122), IBM Research, November 1998.
<http://citeseer.nj.nec.com/shoup98why.html>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPJGkTjkCAxeYt5gVAQFhcwgAniaWueLcMBWxVuGEhE95AVaTksDmFKjW
nAl3kiVy9QHp4z00nF3BlbwQtIFlI6gb7Oi5RAmKBqUNb+TQE/swhqlEcu1/YumD
E4xWMkv77ShvVem9yz72Ngfs6xmF9ASeoH2BugafQ/yn0IKGBzcYYr9CUlGIVIPG
0JklnN6435EXTsAxXak1Gg92Mdc/V0yuo1Wh4hoAEMCKlrYPLm47v723J3MIDf4g
9aLamPG8FyE/CsGIJO+2yEpqm3LLhuC0JP4ltTEN3J9NZpcovix3nlY0vLozcLKf
FWSUGXmEng5zX2fuP51lQbYlxigsFFw81v6C8DTiFqARz3y7Ty8vzA==
=jIIf
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/t0coBXt9N_M/m/_RDey8TUJ74J", "n_sections": 100}, {"thread": "tIGvbm3hJwU", "msg": "WxEIbSBrJ7AJ", "author": "David Hopwood", "date_disp": "Jan 9, 2002, 6:59:48\u202fAM", "subject": "File I/O portability (was: Fast GF Multiplier)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:


> "Richard Heathfield" <bin...@eton.powernet.co.uk> wrote:
> > It depends on what you're trying to achieve. Saying "I need to store
> > 0x01, 0x02, 0x03 into three consecutive 8-bit units" doesn't describe
> > your needs very well. It's like saying "how do I get my bicycle through
> > this turnstile?" when your real objective is to get to your seat in the
> > stadium, and you just haven't yet realised that the bicycle doesn't need
> > to share your journey. Once I can persuade you to leave your bike
> > outside, so to speak, it'll be a lot easier to fulfil your requirements.
> >
> > (In case you're not great with analogies, the bike is analogous to these
> > mythical 8-bit units. This is baggage you just don't need.)

8-bit units (i.e. octets) are certainly not mythical, and the analogy is
pretty bogus. What is not bogus is that you can certainly write octet
values to files in hosted implementations of Standard C (see below for
what that means).

> This is going nowhere fast.
>
> Lets say I do this [incomplete snippet]
>
> FILE *f;
>
> f = fopen("file", "wb");
> fputc('h', f);
> fclose(f);
>
> I write the file where char is 9 bits. The file now has at least 9 physical
> bits stored somewhere right?

If a platform stores more than 8 bits in a char or unsigned char, always
set them to zero on output, and mask them off for input. I agree that this
means it is basically useless to have CHAR_BIT > 8, and such platforms will
be unnecessarily less efficient; I don't agree that this means you can't
write portable programs that work on such platforms.

> Now if I do
>
> f = fopen("file", "rb");
> ch = fgetc(f);
> fclose(f);
>
> Where char == 8 bits, won't it corrupt the format [i.e not aligned].

No. A flat binary file is a sequence of integers in a range defined by the
operating system (or filesystem), but such that each integer can only be
relied on to be able to represent 0..255. Suppose that a file is opened
for writing in a binary mode, only byte values [*1] from 0..255 are
written, the file is closed, and then it is reopened for reading in a
binary mode (even by a different C implementation, or from a different
language entirely). Then assuming all operations were successful and the
file has not been changed in the meantime, you can reasonably expect the
same sequence of byte values to be read [*2] - *except* that some zero
bytes may have been appended to the end of the file.

[*1] It doesn't matter here whether "byte" is being used with its
C-specific meaning, or the modern convention that it is a synonym
for "octet", because both allow values 0..255.

[*2] "The same" obviously needs to take into account any mapping defined
by the languages' I/O routines between the integers 0..255 and values
of the language-specific types used. For example, in C, functions
like fread() take "void *" parameters; the correct mapping is to
cast between that and "unsigned char *". In Java it is to treat the
values of the Java "byte" type as twos-complement.


The ISO C Standard only guarantees the above for the case of a file written
and read back by the same C implementation, but that's because the C
Standard isn't the place to look for guarantees that also involve the
host operating system. Other standards such as POSIX do guarantee the
above (or something stronger). If you find an operating system that claims
to meet one of these standards, and a pair of language implementations
that are supported on that operating system for which the above test
doesn't work, then the OS standard has not been conformed to (regardless
of whether the language standards have).

> So in that sense the whole fstream system of ISO C is non portable since a
> "char" will take different physical sizes on different mediums.
>
> This goes back to my TCP example. If I use TCP/IP to send 10 "chars" it
> might physically send 90 bits.

At the TCP layer it always sends 10 octets. The situation for TCP and IP is
simpler than it is for files; TCP and IP only ever send octets, period.
(What that maps to in lower protocol layers is not really relevant here.)

OTOH, the BSD-style socket APIs use "char *" parameters, when they should
arguably have used at least an unsigned type (uint8_t wasn't available
at the time). In practice, casting between "char *" and "uint8_t *" will
do the right thing on all platforms that support BSD sockets.

> But my system assumes that a "char" is
> 8-bits so I read 80-bits [and everything is out of alignment too!]
>
> I guess that an implementation of TCP will be platform dependent since it
> must convert from 9 to 8 bits [truncating?]?

Of course implementations of TCP/IP are platform dependent (in order to
communicate with network drivers, at least). How could they not be?

> Which gets back to my point, there is no ISO C way to send 32-bits from
> here to there.

Because TCP/IP (or any other network protocol) is not part of ISO C, and
neither is operating system behaviour.


In general, before the introduction of <stdint.h>/<inttypes.h>, I would
have said you had a point about the insufficiency of the C standard in
representing integers of known widths. In C99 this isn't a problem
(although the fact that there's no way to specify that any particular
charset is used for either "char" or "wchar_t", *is* a problem).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPDwMFzkCAxeYt5gVAQEJBQf+Og6OOdTK151k5SJIGrTh8tZ574/wTrDB
2tCjQGv+BmJRcm1oe3XNwEEgH6x+POcW3NjzMurYTS23jKxeOqmQjP2DTeuEEwLx
bTQyz+6XxgjdPvDk8gnCdpESRwj+MvS5QigOWxKCPGvxyV7ZlsawYwuJUu00CA90
HxX01AePJVbBFUi2OzXvAI7Z4TBZIycTKmn+V+b0VL6N/0wE/Iul3rqCZDH0ft1m
0DzOk+XRFUTeG63zo4fmYLVakr28ppGDECSHlom/djE+F+LU9xsFYgGA82BByVNz
GBI1vIWyi75nchnWMDG4nxNOhSUmU9T76UU/hxi/krTyy9LhvCO8MA==
=HDYc
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/tIGvbm3hJwU/m/WxEIbSBrJ7AJ", "n_sections": 58}, {"thread": "vqv60T0aib8", "msg": "vjFLmb5bP0MJ", "author": "David Hopwood", "date_disp": "Mar 3, 2002, 11:15:09\u202fPM", "subject": "Nonrepudiability is a myth (was: choice of p,q ?)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

DJohn37050 wrote:
> For the record, ANSI X9.31 requires strong primes for signatures due to
> fear of repudiation if a modulus could be factored by Pollard p-1 or p+1
> methods. The cost was not that much over non-strong primes and the
> additional assurance was deemed worth it. The idea perhaps was that in
> a court case, if someone shows a key breaking by an old known factoring
> method in reasonable time, this would look bad at best and would take
> some good explaining.

That's a silly argument: if you want to repudiate a signature that you
actually made, claim that your computer was hacked into, or that your
smartcard was stolen. That argument is much more difficult to refute,
and it's easy to manufacture evidence that appears to support it.

No-one should rely on signatures being nonrepudiable, since they clearly
*are* repudiable in practice. They are still useful for *authentication*
(i.e. in making it more difficult for an attacker to masquerade as the
apparent signer) without nonrepudiability.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPIL0kDkCAxeYt5gVAQGDjQf+J0amEFnTgYDVOLBZXfOXvKjxsc7RJ+5r
6uRo0ac8XmpmvAzMgq9oUTnTn1zblUyWL/Z2eTyHjHQgrrAknqfsAX9EEbWyhzd9
ZxXIxjQt0YLA9oe/6oz962fRPkniXvjSDqDyahojtYtk6DEwzXmzibBejT0d9EJr
57uYXBcdihTMSNGAar6LQ6TDntAACC7hS99azQRnEdBueoRXHWYhN68QdVoavCbO
yKm2FQdnJJocJ9R66s/+85HlUxq0c/a8aGPWHWmIjL+XqiEMDWyWmnd8c4nqOiCM
MMnynzDLvgnjVxvz067Xid7ZhCgU/8JUuAG2szYT16z64mg76Wumhw==
=MF/E
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/vqv60T0aib8/m/vjFLmb5bP0MJ", "n_sections": 44}, {"thread": "wIFxJXKAzE8", "msg": "EvxgDttdZWgJ", "author": "David Hopwood", "date_disp": "Feb 8, 2002, 7:53:24\u202fPM", "subject": "MD2 implementations not to spec?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jem Berkes wrote:
> I recently analyzed MD2, as documented in RFC 1319
> ftp://ftp.rfc-editor.org/in-notes/rfc1319.txt
>

[...]


> Specifically, (our) results deviate from the 'expected' results for any
> input longer than 16 bytes. I also did some painstaking simulation of the
> algorithm by hand for a particular 16 byte string, and obtained (our)
> codes' output, not the 'common' implementations.

Post the intermediate values from that simulation. I looked briefly at
the spec, the C reference code, and some Java code (from Cryptix) that
matches the test vectors; they all looked consistent to me.

There is a minor typo/formatting error in section 3.2 of the RFC:

The 16-byte checksum C[0 ... 15] is appended to the message. Let M[0
with checksum), where N' = N + 16.

The missing part is something like "Let M[0..N'-1] be the message
concatenated with padding and checksum", but I doubt that would
confuse anyone.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPGRyejkCAxeYt5gVAQGyxwgA0WzqsvdLaz/BQKTgDoMsk29hXQUnLEDZ
u20J6M4M1dVtaKg4RVBkjCCMZiAPN+yniTP3qznU9qO9Sz4mgVmd1HsS8Ic2C97S
Mt0uV3oDmW6hYrMZgCLT5bOB06uweiF/AGtFFgzI/jZ+3CKtvR2ui4ysMG3SBmm8
wkN0Vk4/jW597EwqCyX/H5Qs5lYgc9OtUhMUQOCxvCqFm29l9qTqH1uFr/JEYlmX
a9j06ejiX+J/Yj0KIFtDKqGPZ+Bavc1dUF+QxNFzRgQTVbWQH3ibwiK9DrBPIQ7J
lWNzF4v/KP5+64OvyXEkGhY6jJBcovccSpNwgDNr4C0Kmpuy4RagDg==
=EkyT
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/wIFxJXKAzE8/m/EvxgDttdZWgJ", "n_sections": 13}, {"thread": "wIFxJXKAzE8", "msg": "fpg3bPmQdGwJ", "author": "David Hopwood", "date_disp": "Feb 9, 2002, 9:17:31\u202fPM", "subject": "MD2 implementations not to spec?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jem Berkes wrote:
> David Hopwood wrote:


> >Jem Berkes wrote:
> >> Specifically, (our) results deviate from the 'expected' results for
> >> any input longer than 16 bytes. I also did some painstaking
> >> simulation of the algorithm by hand for a particular 16 byte string,
> >> and obtained (our) codes' output, not the 'common' implementations.
> >
> > Post the intermediate values from that simulation. I looked briefly at
> > the spec, the C reference code, and some Java code (from Cryptix) that
> > matches the test vectors; they all looked consistent to me.

I obviously wasn't looking hard enough - you're completely right, the
spec is inconsistent.

> The input data used is sixteen X's: "XXXXXXXXXXXXXXXX"
> The sixteen X's are read. Then the data is padded with sixteen pad bytes
> of value 0x10 each. Complete data read is:
>
> 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58
> 0x58 0x58 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10
> 0x10 0x10 0x10 0x10

OK up to here.

> A checksum of these 32 bytes is now computed. The checksum is appended,
> yielding this new message (input data) of length 48 bytes
>
> 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58 0x58
> 0x58 0x58 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10
> 0x10 0x10 0x10 0x10 0x99 0x5B 0x89 0x46 0x32 0x57 0x3F 0x12 0x43 0x9A
> 0xCF 0x39 0x42 0x5D 0x22 0xC4

The problem is that the checksum algorithm is given as

/* Clear checksum. */
For i = 0 to 15 do:
Set C[i] to 0.
end /* of loop on i */

Set L to 0.

/* Process each 16-word block. */
For i = 0 to N/16-1 do

/* Checksum block i. */
For j = 0 to 15 do
Set c to M[i*16+j].
Set C[j] to S[c xor L]. <-----
Set L to C[j].
end /* of loop on j */
end /* of loop on i */

but the reference source implements the arrowed line as if it was
"Set C[j] to C[j] xor S[c xor L]." (That is also what is assumed by the
test vectors and the Java implementation I was working from.)

I.e. the checksum for your example should be
<AC17071BEB3617274D48D19DBEE2D083>.


Incidentally, you do know that there are security weaknesses in MD2?
(Not a complete break, but enough to avoid using it.)

RSA Laboratories Security Bulletin #4,
ftp://ftp.rsa.com/pub/pdfs/bulletn4.pdf

N. Rogier, P. Chauvaud,
"The compression function of MD2 is not collision-free,"
Workshop record, 2nd Workshop on Selected Areas in Cryptography (SAC
'95), Ottowa, Canada, May 18-19 1995.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPGXXyTkCAxeYt5gVAQG+xwgAuyFggpDqPc69AR9YqdBQKs9ZQK6uGW50
32mbxeuiciiXQWjDsa8ZEhEOzPuKoubF7MnvuCdwYjQo9fNpyme12cyHKZPAKkm/
LEQK74U62isRWj91BjzmWaNWI6Gb4Zvz9zN+3KvYXVYLV/nHz2gwbCwyE4ulcBIW
f+iyJYI8chET/vGNNnW+jVsPxvfaWn90y+1HtWP5yKwPBkXYSasOEbVmY10kaCSC
QJmooVtPURx9cTvqfPkQXL2aYqHXi4ouyZ0FF25G1oPAGTze4eQhHALzBTFTodJp
UqRsHfL7F257/hcUZXr5iPbAl/E3n9+M+FHQ77GkSv0sH+CyahEpgA==
=YOw8
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/wIFxJXKAzE8/m/fpg3bPmQdGwJ", "n_sections": 13}, {"thread": "wIFxJXKAzE8", "msg": "UehREtffFGcJ", "author": "David Hopwood", "date_disp": "Feb 11, 2002, 3:22:04\u202fPM", "subject": "MD2 implementations not to spec?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jem Berkes wrote:
> > I obviously wasn't looking hard enough - you're completely right, the
> > spec is inconsistent.
> > The problem is that the checksum algorithm is given as
> > Set C[j] to S[c xor L]. <-----
> > but the reference source implements the arrowed line as if it was
> > "Set C[j] to C[j] xor S[c xor L]." (That is also what is assumed by
> > the test vectors and the Java implementation I was working from.)
>
> Gosh, thanks!! The ^= slipped past my eyes every time I looked at it, so
> I never guessed that the problem was in the checksum.
>
> With that change, everything checks out and it seems perfectly consistent
> with the sample implementation, and openssl.

Rather worrying that no-one else noticed this in 10 years, though!
I know MD2 isn't used very much, but in terms of errors in algorithm
specifications, it's not an isolated case:

KEA (byte order error)
Tiger (bit order changed after several years)
DEAL (error in key scheduling constants)
Twofish (keys <= 64 bits inconsistent between spec & reference code)
Serpent (S-boxes don't satisfy originally specified criteria)
DHAES (error in order of encryption & MAC in figure 2 of paper)

Note that in none of these cases has a corrected paper been published.
(Tiger has a note on its web page, that's all.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPGd1ITkCAxeYt5gVAQEGUQf9HxFmQbfn+z7UJ5xf9m4AHGc1/An94i0l
RBtkBlnlkDFFx0E3PKkUVxeersf4djytn3A3E7J+PldGMkBCgBpSe7P4ptAGqPQM
PYv4hmCWJDiJK40L9sbyxM0SzF/xDfksyN4O/u5zp4f2slNZWv1hv5lATPQFgHzW
1X0TIvo0ci7Xsquc0RaahzS7B0vtG0eIyOclNZKv6UGkv8/MHxziOWO1NE3WGnz4
YaNPAB3NNVchxMRBPDPH86n0Ccf+fDOKBVNwNTrV1VeXMyLv1OS3IcESBsH1zxCU
GOLZeU2X4om/F50nstofkkp6P/kqd50hy5qPBGvfsy9QwL+Hc/HjFQ==
=HwN2
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/wIFxJXKAzE8/m/UehREtffFGcJ", "n_sections": 13}, {"thread": "zRqAA8Zc2kk", "msg": "P5ew5ZD4U4gJ", "author": "David Hopwood", "date_disp": "Feb 5, 2002, 12:23:51\u202fAM", "subject": "another question about rc4 file encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Wagner wrote:
> antirez wrote:
> >To fix this as already suggested I can store an HMAC instead of
> >the MD5 digest, but I don't like to force the user to type
> >two different passphrases for the RC4 key and HMAC key.
>
> Here's what you can do. Let P be the passphrase. Compute
> K1 = HMAC_P("key one")
> K2 = HMAC_P("key two")
> Then use K1 as your RC4 key, and K2 as your HMAC key. If
> you want to use a salt, you can include that as part of the
> HMAC input as well.
>
> (Note that you are using HMAC both as a PRF for key derivation
> and as a MAC for message authentication.

I don't think HMAC can be analysed as a PRF here, since P is not
uniform-random, and the space of likely passphrases is a negligable
fraction of strings of the same length. It has to be treated as an
entropy-smoothing hash, I think. Shoup defines that in [1] as:

# ... [F]or a given set S of byte strings together with a prescribed
# probability distribution on S, then if x \\in S is chosen at random,
# the output Hash.eval(x) is computationally indistinguishable from
# a random byte string of length Hash.OutputLen. Of course, for this
# assumption to be reasonable, it must be the case that the entropy
# of S is sufficiently high.

(More precisely, the probability of guessing S with reasonable work
must be low, which is not the same thing as having a high Shannon
entropy.)

Anyway, passphrase hashes should *always* be used with salt, and
*always* be made computationally intensive to deter dictionary attacks.
bcrypt/EksBlowfish [2] can be used for this - after running
EksBlowfishSetup, you can encrypt any distinct set of blocks to
get as much key material as necessary for K1 and K2.
The additional work required for a dictionary attack can make a big
difference to the proportion of typical passphrases that are vulnerable.

> You can see schemes like this used for key derivation in SSL
> and IPSEC, for instance. It's completely standard, and has
> some theoretical justification.

In SSL/TLS (presumably IPSEC is similar), the Diffie-Hellman
pre-master secret is not uniform-random, so the "PRF" (as it is
called in RFC 2246) is also being used as an entropy-smoothing function
in that case, and strictly speaking not as a PRF. The RSA pre-master
secret is also not quite uniform-random because of the client version
number.


[1] Victor Shoup,
"A Proposal for an ISO Standard for Public Key Encryption (version 2.1),"
Revised December 20, 2001.
<http://www.shoup.net/papers/>

[2] Niels Provos, David Mazi\u00e8res,
"A Future-Adaptable Password Scheme,"
Presented at USENIX '99.
<http://www.usenix.org/events/usenix99/provos.html>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPF9sOjkCAxeYt5gVAQGnMggAoyqKIaZi/5vwWzUJrPKlv6wbtgTPSgzr
BbdvxJzTGr2MHx70VmTzzecCv5dGtAfgDQzXBhKacg8YjVYq/c4ZwfDvudAntDzE
IYpicHsHvLwgCIK3DF8BZ/hTwAD4BZVF7qvMTatK0hVzTNlSuABzeFe7Q9ct+E6/
gcsiu8j5EvE2hJxQqMgH37j47x0E+aqIqHOcYA5SehAAsR9vA59Vv/N+MVOaEfMQ
ZmqNICw1koasL5TpXuiT+Zc7UcBLnh6sORS2abpgMGCvPTU84SEZp9KsOBq92xS5
QyUC0ubpJopNoC242gNnc8iv3rjCM2O0HtnZsbCR+EKpEhjKx8vNXQ==
=cp4I
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/zRqAA8Zc2kk/m/P5ew5ZD4U4gJ", "n_sections": 18}, {"thread": "2px_0kRAq28", "msg": "_Nffyj8EhboJ", "author": "David Hopwood", "date_disp": "May 8, 2002, 10:22:38\u202fPM", "subject": "Square free numbers", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

For what input distribution? Which problem precisely? Proof or reference, please.

(Predicting whether a given random k-bit integer is square-free with probability
greater than the /a priori/ probability of a k-bit integer being square-free, is
trivially easy: use trial division to check whether a small factor is repeated.)

> Nicol So wrote:
> > How do you do factoring given the ability to decide square-freeness?
>

> Finding all p-smooth numbers from 10^n to 2*10^n is as hard as finding
> all p-smooth numbers from 2*10^n to 3*10^n.
>
> Discuss.

I don't see the relevance.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPNndMTkCAxeYt5gVAQGAzQf/aGD8xQIcOKYlKYu2ZfJwJBDtHpZhJMBh
LSD9+Fjf13B5drw3MziYHyhbXRfTdFl42m7018CM6rW4rHJMfbBr+J470lnFVRKW
I0c1RaxZHLlS9VnJ2B7QQ28mQqB1BaqXwtUHvcULKXc3L62SMb+bTyRjkR+ddexN
eLckazmqadcgXOtUBASP4yT2r4T00u76nQuTp4zavDs59aqudjxxFzpKwbbKQNiz
ub9A9ZP0WYXvhwcZMT1csHY7QG0izBKb/yMJ655cym2q8HZxKHx8Fz241HAXNGyA
DQKDwNJuH7D7NTywswbM8b+SgOOoHBDpYRo5BUdj2k+JaV8n85f6iw==
=bsVV
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2px_0kRAq28/m/_Nffyj8EhboJ", "n_sections": 25}, {"thread": "FQH-BMRE8X8", "msg": "c3YJOSg8xMUJ", "author": "David Hopwood", "date_disp": "Jun 7, 2002, 9:47:35\u202fPM", "subject": "IV for CBC mode disk block encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Alan wrote:


> Michael Sierchio <ku...@tenebras.com> wrote:
> > It is axiomatic that an initialization vector should be
> > unpredictable/unknown to a potential adversary.
>
> I have read the Rogaway paper, and I understand that the predictable
> IV may leak information about the underlying data in a chosen
> plaintext attack. However if that is considered a flaw, then doesn't
> that flaw extend to the subsequent blocks encrypted using the CBC
> mode? After all, the (publicly known) ciphertext from encrypting the
> first block effectively becomes the IV for the next block. Keeping
> the IV secret doesn't prevent the leakage of information in the second
> block.

In order to exploit that, the attacker has to be able to choose
the plaintext for block i+1 after knowing the ciphertext for block i.
So indeed CBC is not an acceptable mode if that is possible. OTOH if the
ciphertext is not transmitted until after the whole plaintext has been
input (i.e. can no longer be influenced by the attacker), then CBC mode
is IND-CPA-secure. The Rogaway paper assumes the latter case.

Note that the CBC modes used in SSL, TLS, and IPsec all allow IVs to be
chained between packets [*], thus potentially allowing the next packet to
be chosen after its IV is known. This is difficult to exploit for various
reasons, but it is a weakness in those protocols. (The TLS Working Group
is considering two possible fixes for TLS: either switch to CTR mode, or
use independent IVs.)


[*] For IPsec, the IV is sent explicitly in each packet, but the RFC
specifically suggests chaining the IV between packets to reduce the
amount of random number generation needed.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPQFiLDkCAxeYt5gVAQEp3AgArQE/YON9XFMUY863fpq8o0Q4JITgcXmy
1XT2Ah/97JkO5h8EY+0dCLvtqQM2Kx8GkS3klz8p5vwJ3J8vC8fubw1iMtmVVeLD
4mlSYPDS/eR5gMgJHSzxSE8sevPB+zKFnN8zUimbb097H562tG4o1xl8L3aJzbKE
Wg0lQ5E7iHeW2W1/4GZes+vlBIDQxQuti6n0Nme4TGoYCuB/5iwdisCh8C0SjG5R
8fkxjxjG+63TKB0CRYbcmAwAoKQBGT6hUSTJ1jNlNUkpBLrHfSrs/SlHJzP0ekuT
ZJl7QpJxhJpBys4dfi7+qq4bwig09GlQ+Aof5aiLsjLAEMfZKi2YRg==
=lC5U
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/FQH-BMRE8X8/m/c3YJOSg8xMUJ", "n_sections": 24}, {"thread": "GCYmmw7Qemc", "msg": "BpngDThCCngJ", "author": "David Hopwood", "date_disp": "May 19, 2002, 8:28:43\u202fPM", "subject": "Password-based Keypair Generation", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Richard Parker wrote:


> Bryan at br...@eevolved.com wrote:
>
> > I am curious as to why the the PGP implementors chose to encrypt the user's
> > private key on disk with a passphrase, rather than use that passphrase as
> > input to a keypair generation function? The latter approach certainly has
> > security advantages so could someone please explain what I am overlooking?
>
> I think it was a compromise to improve security against those who can
> eavesdrop on the user's communications channel at the cost of weakening
> security versus those who can violate the user's physical security.

How does it in any way weaken security? If you're thinking of a dictionary
attack, note that that can also be done against the key regeneration function
(by testing whether each private key regenerated from a guessed password
matches the public key).

Also, note that secring.pgp can contain more information than a single private
key.

> The problem is that users have an unfortunate tendency to choose passphrases
> with insufficient entropy. By using a cryptographically secure RNG as the
> input to the keypair generation function they made it more difficult for an
> adversary to intercept a message and perform an offline attack at the cost
> of having to securely preserve the private key (as opposed to regenerating
> it on demand).

If secring.pgp is not secret, the system is still no less secure than it would
be if the key was regenerated.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPOhDKTkCAxeYt5gVAQFoVQgAp9uvfewx6TeOiZcQCtbGRTJdO96JaBsm
k5EHd/hpndbybqxM1sKi0uMKmkYkcn8+BmRKy/hwth0aMms5xkT6usQPaZ2n0695
r4avO7iVYV1VZxih2Zruj87JkAKnzxHwCREwDdzvM7S+BGhuHQBnC2PxhdIySg0X
BUDaB0v6kpxL8u+p3vfrHsFipYzfQw+wkECxCzhQPZhLs1sTwmccKhaBtQdtjDGt
cIcBoXzl5ShqlT5HNzXYJ/s/p5AEfFpTGOurKJbqtg0/+zUmItmuNl/iMTwz5+Aa
DtIEqjk44XjR74nNuA4CFWQAxXIwfJRaLceha0akIe240fTqJjz4rA==
=XWof
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/GCYmmw7Qemc/m/BpngDThCCngJ", "n_sections": 32}, {"thread": "GCYmmw7Qemc", "msg": "NqCPMV1464MJ", "author": "David Hopwood", "date_disp": "May 20, 2002, 12:56:46\u202fPM", "subject": "Password-based Keypair Generation", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Richard Parker wrote:

You missed my point, which was that this attack isn't eliminated. It just
no longer requires the private key file: anyone can perform a dictionary
attack against a key that is regenerated from a passphrase, with no
additional information than Alice's public key.

(If you're thinking that the time to verify each guessed passphrase for a
regenerated key is longer, first of all it's not obvious that that is true;
it depends on how the key is regenerated. Second, the work required to verify
each passphrase guess for the private key file case, can be adjusted to
whatever we want.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPOkqqTkCAxeYt5gVAQGYGQf/VWZfw/3qEdS2yR4P4WKFqUyqLmm08m+q
TFTOYU1pliWt0rI9zA41N2Rrs18K0J7oqK6SNR7LGHs3ivPP1nTjG3m284CqnVGc
XzZEzE7dHizN+wywqZBcAtlHsh+sYHWhVEWXgNGGgXDO/kwBunoht0WY4BcgleKv
k870EKn3DmL16pKD+7S8eO+qd0WrbdDQw0N/b/3rGPbpctHNUgAOWX+6OklAWNP3
O6uadivSUhocpE1SUhTHWrbNCKw79eUdj1On0JaajvJdInkT3e8iUlrFqohgYu6l
4QhsnocMz9hJ4rT/GaR2sDM1sH/vVRIaIbl7bHHdXQb6DOyvJq+xRg==
=Is5S
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/GCYmmw7Qemc/m/NqCPMV1464MJ", "n_sections": 32}, {"thread": "GCYmmw7Qemc", "msg": "9nqowTziMgsJ", "author": "David Hopwood", "date_disp": "May 20, 2002, 6:47:05\u202fPM", "subject": "Password-based Keypair Generation", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Richard Parker wrote:


> David Hopwood at david....@zetnet.co.uk wrote:
>
> > You missed my point, which was that this attack isn't eliminated. It just
> > no longer requires the private key file: anyone can perform a dictionary
> > attack against a key that is regenerated from a passphrase, with no
> > additional information than Alice's public key.
>
> I think we're talking past each other. That was exactly the point I was
> making, if Eve doesn't have the public key

... or any ciphertext ...

> but does have access to Alice's private key file then Bryan's scheme is

> stronger, [...]

Surely you're not saying it's reasonable to assume that, in addition to not
having the public key, the attacker doesn't have any ciphertext?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPOl8tjkCAxeYt5gVAQHPggf8Dn+AMcbSstHbOgZ4H2dZwPx1MGlyQW94
j//cHfcR9Nt3e4n3rd7BLMeraZXQF+NJEWtw+uT2zbXcK1qAS/ppW4fmhrjad6EU
Ux+uvBzQq9nl2xxzOyypFUE+z/eW1qJfWDVFQTNVvneFj7B5GheYJtYWEtF/gwwA
uTx9xslHmTY2wh3euUoxto9UutlWPIMildhdI5fGdYTBBOwtIU+/XP2JYdOEOEHA
qy1sjPEAsecUoyQiyET24FO48qJmVp8kwwpg8/1J50ofnkecdFlA6H6Ir5BU6oGy
099gsI2D7ia8aaZkW6nFZX45b89I1l61zk+hrRay+HzMKqlgqt90ig==
=RwAs
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/GCYmmw7Qemc/m/9nqowTziMgsJ", "n_sections": 32}, {"thread": "GpPGIoCJ928", "msg": "VGk-FH7p9IMJ", "author": "David Hopwood", "date_disp": "May 16, 2002, 9:31:52\u202fPM", "subject": "Idiot's Guife to Secure use of AES", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Douglas A. Gwyn" wrote:
> Tom St Denis wrote:
> > Also, why is it good to assume the cipher is weak to a "plaintext
> > attack" ...?
>
> In effect David devised a "mode of operation" intended to compensate
> for lack of knowledge about whether the underlying block cipher is
> in fact insecure against known-plaintext attack.

Except that it doesn't actually do that, as Daniel Mehkeri pointed out.

In practice it is much simpler to try to make the PRP (block cipher)
resist known or chosen plaintext attacks, than to try to make the mode
resist them. That's why we do it that way; it is not, as David Scott
claims, the result of complacency or of some sort of conspiracy.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPORdSjkCAxeYt5gVAQFWqAgApOkcBbMnlwHG0iTRH9+9MN6zPjm6vNLP
8JTQG6WSJmjM4VBiZSK1L/os6BQh4y8R8fHIez2OxWX1SHIdJpvx0wWtc8tYk7+A
+KSBSmilnft0wCd+8XA68BwKlA5u0IHIcWKn1TMGy8jhU9Bq+0q40mE+GdIKw+P/
a7Qr4gQX2hkL8ktOD4qFHRrFt6ELce9Nd+h+KBvYBvMJKMXAULlum7ZrlIZL+5yv
mCF/ThO1M9VhQ4C+MBH3Os/ehdWWT7V1YPPd2lAr6elYOxlleSM0Eov1+CqPqHZ0
Q3KMIozwbkl5C3+j6jfcGhRsbEfXBuOJrf0ZkRCpG9MU/uy082mzDA==
=UjKj
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/GpPGIoCJ928/m/VGk-FH7p9IMJ", "n_sections": 53}, {"thread": "IN6Arlzz1nI", "msg": "0XDnyjAfySAJ", "author": "David Hopwood", "date_disp": "Jun 30, 2002, 4:09:45\u202fPM", "subject": "NIST TIME KEYSIZE TABLE", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

DJohn37050 wrote:
> A minimum of eighty bits of security SHOULD be provided by most applications
> until 2015. Between 2016 and 2035, a minimum of 112 bits of security SHOULD
> be provided. Thereafter, that at least 128 bits of security SHOULD be provided.

What are these dates supposed to refer to? The time when the system is designed,
or the time that data might need to be secured until?

Also, if for a given protocol the performance associated with parameter
choices that lead to 128 (estimated) bits of security is acceptable, what's
the advantage in choosing anything less now, and needing to change it later?

> This is extract from 2nd draft of NIST Key Management Schemes section 3.8.2
> dated June 3, 2002.

If you want comments on the draft, I suggest posting a pointer to all of it.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPR9ldjkCAxeYt5gVAQHQoggAtlLtMZRzY525r9Hs/pOU6nPn67e+Vfe8
cduuW19Jw+4BV93nzoCrIIXa5e7v6SZ+uAOu47cEHnV1TAwvSBJ2Ktxj7lMUFZvU
tjF2ktO/TI5TDAu/PpKwpNwaPtodX9DAXvm5VWCeaC0V+Rz7JRrh5ue0AA/37Yzs
EBrmy0084I2H5WikX8f+/tfLcx9YhtsRsD2uEOFigVsAhENe/YRG9Kd0i8PADe5U
TH+AGcC9naybiAQuOY7eB4tLR25GZAROYqhMh2B4Su9N3XYP2Fiha3mKE+aKgm4P
GaRkD3+0TiNltxA8or03W4o/4AASI6VhM9svQ6eFVz4IzwTMIEHP+A==
=7laI
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/IN6Arlzz1nI/m/0XDnyjAfySAJ", "n_sections": 19}, {"thread": "J7qnVWXWrZA", "msg": "mv1SX1woViIJ", "author": "David Hopwood", "date_disp": "May 25, 2002, 6:06:48\u202fPM", "subject": "A postprocessing of PRNGs", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
> Many stream ciphers employ keystreams from PRNGs
> that could somehow be neatly (even if inconveniently)
> described mathematically. Thus it could be advantageous
> to postprocess the output of such PRNGs so as to
> introduce as much 'disorder' as possible. One viable
> and simple way seems to be doing a substitution with a
> large pseudo-random substitution table.

Why would you think that? For a wide range of potential attacks
against the underlying PRNG, a fixed substitution on the output would
do absolutely nothing to improve security against those attacks.
For example, the attacker might only need to recognise repeated
output sequences.

> A mapping with such a table
> should in my view be quite satisfactory in practically
> blocking the opponent's attempt to access the direct
> output of the PRNG for analysis purposes.

There's no reason to believe this in general, without analysing its
effect for a particular PRNG.

You seem to be in the habit of proposing constructions that are so vague
that it's impossible to say whether they improve security. It's not at
all productive.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPO+nUjkCAxeYt5gVAQGHAAf7B8dgoZGWr8uKIUEKUEHB3/Q6cRG8e3ku
29dhbK6GWlusdYuDH9NqN9E79TR6Yi0Hy/2GlexUqej0DfqYk+2jb830ujqGwu+J
xbaexeOGU51PQod8pOT5LTK2kIapIx2mjcEYHawC++cQKDn5yIC4nlOexXSdQwdY
5gd/If0FB3zDe/X4wzE029297dkXCY8ELv+yc5tQnp3Fvps8rsfKPqj7OftUrizK
KWHx7vxOTngQsglm4w9VnSA2J6sXksekMKvEdVktX7zkMLW2wkdxtLYWi9/SWnNd
BkLzELqOZUezZrCWF0HqyCf3W5rwFM0UrpkAGNDxiI8g2o99ybP8AQ==
=JUyN
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/J7qnVWXWrZA/m/mv1SX1woViIJ", "n_sections": 25}, {"thread": "KBg3bJ_7L4Q", "msg": "ufFFcUgCcR8J", "author": "David Hopwood", "date_disp": "May 31, 2002, 12:08:07\u202fPM", "subject": "Question: RSA and CRT", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Gregory G Rose wrote:
> In article <pan.2002.05.30.12....@yahoo.com>,
> Lovecraftesque <Lovecra...@yahoo.com> wrote:
> >On Thu, 30 May 2002 09:36:05 -0700, Anonymous wrote:
> >> First, CRT is used only on decryption, not on encryption.
> >
> > Not quite. CRT is used when carrying out a private key operation,
> >be it an encryption or a decryption. The operation is the same; whether
> >it is an encryption or a decryption is a higher consideration.
>
> Since you're correcting terminology, I'd like to
> rant on it too. A private key operation is either
> a decryption or *a signature generation*
> (signing). I hate the way that many people believe
> that signature generation is encryption for all
> systems, when it's really only true for RSA.

It's not true for RSA either. The RSA encryption *primitive* and the RSA
signature generation *primitive* are the same, but secure RSA encryption
schemes and RSA encryption schemes are not the same. [*]

> It just confuses everything.

Indeed. It also suggests that many people are still thinking of the
primitive operations as being adequate descriptions of RSA encryption or
signing on their own.


[*] Random thought: is it possible to produce a scheme that is
simultaneously an IND-CCA2-secure encryption scheme and an
EUF-CMA-secure signature scheme? It is useful?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPPefxDkCAxeYt5gVAQFeIAf/UkOtxutexdg+3FAuMXqA2dtBuGJ7Yqzg
bjRuhPZAQWhzhq4URG41a+sHNjChpSMA8Iqg7Ct2QZiQAqCHCoGKBXgOg+CSNCn8
0KL7AFvg4XrwIyYvC/yBI3NKDD7tpmJeMFPFXt7PUo827MHnrY+NGnzyk4RDTQ6J
CAz1Vx066rECf+7b8jZU9owZnSxb0RDAOQUTuWhrAmhUcY10VtGLJ4kbaXf8HD0Z
HmLLgju+XxxXoWTl+ix5nM1p/iVKO6gLw3DD2EpMHPjlLmKY4PZ3OsmeLr2YOC9g
Tbz4hmbxwzvoKdhMRZ75lgV+ADdhD+f1MvNsF0pZDhw/Z2a+KXuTsA==
=Czg5
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/KBg3bJ_7L4Q/m/ufFFcUgCcR8J", "n_sections": 15}, {"thread": "KBg3bJ_7L4Q", "msg": "pPpezLCjxQIJ", "author": "David Hopwood", "date_disp": "Jun 1, 2002, 11:52:04\u202fAM", "subject": "Question: RSA and CRT", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Hopwood wrote:
> Gregory G Rose wrote:
> > [...] I hate the way that many people believe


> > that signature generation is encryption for all
> > systems, when it's really only true for RSA.
>
> It's not true for RSA either. The RSA encryption *primitive* and the RSA
> signature generation *primitive* are the same, but secure RSA encryption
> schemes and RSA encryption schemes are not the same. [*]

Needless to say, I meant "The RSA decryption *primitive* and the RSA


signature generation *primitive* are the same, but secure RSA encryption

schemes and secure RSA signature schemes are not the same".

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPPjtjTkCAxeYt5gVAQG4kwgAuJrCLwMyQy9fOrDGPocar/GjhBhEwXQe
kSM8x7yGVUW6khn+HVdxRm1J92nSHKdUz27V3SnpJpdw1qQiBtXDTUkHR2UdsJUh
zCmeGyT7e6S9G2HWpsY5TRJhJqSOWiOTBeULKNI79Uh/YbXrg+WHgtuQYiXXxVEb
MOXUQWUkoZ5/vN02u1u/dTEv6qylwJYG3t1hVwzmx9NhpgwKh9wmkxImDAd0P3mf
96Oc7OBh3s+BoUk4TB03xOSmWVFo5pT+typsIB85AgBnBvHEPnFZkJevTxhywell
JPJmKOrENwNQOyqmgTfKaK/ZHJTJVoTdHq+CUwqk38QV7TVNLKikfA==
=roWC
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/KBg3bJ_7L4Q/m/pPpezLCjxQIJ", "n_sections": 15}, {"thread": "MhKr4aDtQDs", "msg": "d0Z9yrt2accJ", "author": "David Hopwood", "date_disp": "Jun 5, 2002, 12:41:34\u202fPM", "subject": "Prime testing medium speed?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Kim G. S. OEyhus" wrote:
> In RSA the primetesting is typically first done with a fast but
> uncertain method, such as trial divison by small primes.
>
> Then the number is typically tested by a slow and safe method, such as
> MillerRabin.
>
> Now, if there was something in between, with medium speed and medium

> certainty, the key generation could be done faster, since fe[w]er heavy


> tests has to be done. The MillerRabin test would not have to fail so
> often.

Yes, many implementations use a Fermat test before the Miller-Rabin test,
for precisely that reason.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPP4/KjkCAxeYt5gVAQGLgggAgtF9RMUfoOatmLF8RqFvmB7vuXDtgvLW
apl7x7kIehDQoTnS4Y9kfyCZQxfrvJ3rU9ivEkGMNzSBmBwMis8mDJMrFXVWp1Xd
Emqfa8CKQfpVmpTVLpO0COPeXrWMt6stsgOto7VtqB/I3CTocaf7L4tdFbIHr/uC
O8a22nZ4EblN1EQ630eikVxaGqrTwiD8LdcmQa4ow4K2C1ro4MUe6Cz6CRydtrUW
ql8WsjdV0MOc3PpcM18v/RR5yrGSr09uPUvkCcsGFSN8iRfmSn+cND98xEdDfbxr
mWP6KccNypBWeG1npuFsrRj6fQrRgk2OSUo6AgZla7/WpzNwCJABSA==
=SSUt
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/MhKr4aDtQDs/m/d0Z9yrt2accJ", "n_sections": 62}, {"thread": "MhKr4aDtQDs", "msg": "OOZAUbHjfFgJ", "author": "David Hopwood", "date_disp": "Jun 5, 2002, 8:28:38\u202fPM", "subject": "Prime testing medium speed?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

You're right. I don't know where I heard that Fermat tests were faster than
Miller-Rabin, but they're not.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPP6HhDkCAxeYt5gVAQHeSwf+Jm922fSN/ows38yWD0TGp5kZSyvrNsqr
6K7wthupVWusAo5VPIreaAyKKiJTNI5ltt7OljFfxG7rGNyRUh6hxVknSWZv9D8K
P7ddZc7L3CbSHizYmB9IUJX7cyYiGObEmjRsT7nwyuDAnHoVSKXDZ+hHU/M2pRik
gONo3V3+88yk2/jGcias/EziGoifpzR2m0qe88p2PgX8lir8T+IcCgFT19kQ6PJa
6ACS6jnZH8XG4z6bFCJrcvIZtoleYvaNdxbJjZDXzH9wrKhyVa6KBrAVlSTzeTrc
euMUwfoQcbNAFiUp2p1tU106VMdRRIVskie3VqVb+iJh92nfceSL4g==
=FBFZ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/MhKr4aDtQDs/m/OOZAUbHjfFgJ", "n_sections": 62}, {"thread": "OJEmpTTqI-Y", "msg": "AfeHE7DqzboJ", "author": "David Hopwood", "date_disp": "Jun 16, 2002, 1:46:56\u202fPM", "subject": "What does 'strong encryption' really mean?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

djohn...@aol.com (DJohn37050) wrote:
> I do not think so due to quantum computing. Recall that they once proved
> that man would never reach the moon, etc.

<off-topic>
Who "proved" that? Would that be the same mythical "they" that "proved that
bumble-bees can't fly"?
</off-topic>

> It depends on your assumptions. I think at least one reason for the 256-bit
> AES key is due to the potential for quantum computing.

In the sense that it's simpler to use a 256-bit key, than to try to convince
everyone that there will never be a practical generic QC attack on symmetric
ciphers with 128-bit keys, yes.

(Of course in the majority of systems that use hybrid public-key/
symmetric encryption, only increasing the symmetric key size to avoid
Grover's algorithm would be rather pointless, no matter how practical
or impractical QC turns out to be.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPQzOuzkCAxeYt5gVAQF44wf+OvtjWkjk1uyL9K2j+/fBcWHFIuC/g6Tv
t5mBIzx85c5kJd6wE++yMB5DrbGVCCSR0iEdfiXQXsatcUL76+DU8JIZixXxbzJX
PUC6vMbXUjmp5mUqRV+R2QBCAe39bsYo0AlXxStDa40QgqldV/Z01sPmGBHTIVIr
y+JA5bH5G5ppB+BZ9FLHe593yrF7WM0OUWYbsfSIPaS2BppZr4iChmVl2ZLddWoO
IPR/IpyCG1PnaBsJaADnUNO0HOIkDQ640ytrf4dSMtYugqfULssWQBi5s8OOhigf
GqKimug6f4GQFOPawgz8qfSnGG5KPrG3U9K0C6CfOW4oLivOccBLcw==
=kZz3
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/OJEmpTTqI-Y/m/AfeHE7DqzboJ", "n_sections": 27}, {"thread": "REmHUqMCgCs", "msg": "1sfJfJkV5bIJ", "author": "David Hopwood", "date_disp": "May 16, 2002, 6:26:16\u202fPM", "subject": "Public Anonymity", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Peter Fairbrother wrote:
> A publicly available file contains random data. Every so often users
> contribute data (either random or encrypted messages) to the file, and
> download the latest increments. Then they look for encrypted messages to
> themselves, and decode them.
>
> This gives anonymity (within the set of users) without a trusted third
> party, or at most limits the TTP role to accurately repeating the messages
> and imposing traffic limits etc. The TTP can't track messages. So far so
> good.
>
> However, if each user was required* to send eg 5kB per day, and a million
> people used it, (at which level it would be useful) that's 5GB per day of
> files, well beyond the practical limits of today's 'net connectivity (say a
> maximum of 5MB/day, for adsl/cable users). Simple partitioning would reduce
> bandwidth requirements, but it also reduces anonymity.
>
> Is it possible to reduce the "feed" to individual users (or subsets of
> users) while maintaining message anonymity across the whole set of users?

This is called "Private Information Retrieval" - a Google search on that
term turns up lots of relevant papers. Be warned that a lot of previous work
on this subject has been highly impractical. (Several of the papers that
Google turns up claim to be practical, but I haven't looked at them closely
enough to see whether that just means "less impractical".)

If you find something useful, a summary to the group would be interesting.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPOQx2TkCAxeYt5gVAQGzjgf/QsREeJLDiOeNgfKbahjtQ05VE1BKgNMx
PTyWXLDZuquP8sbTqVEanr5tbOo5RXvJGxSwgNLfZ8wJs2mGZ4ru/DSOU/4kzwRc
48byIziqMAbBvq/7tCTGBEhByGow2MLw8012jmIwtCSjFYcS+cRONlBUpIG+yf3G
+e9hTY37fXGfdzzwLqvYpBXnbXKE8wpF1JOv7h7JciiRIUcA56yRED1riDafErDd
8kRCPJo5NozPKBzuwF+6BvVqpkuc8I8DzQBJMO1IC+RIYHK97i3+kedyKQy+Ul8P
IzjU4WoZ3c9uFUNLU5b95BOs8UhFddNpHNH7kPYZQVFhz4zNQEW8og==
=kF8G
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/REmHUqMCgCs/m/1sfJfJkV5bIJ", "n_sections": 64}, {"thread": "REmHUqMCgCs", "msg": "79_At5RHdYwJ", "author": "David Hopwood", "date_disp": "May 19, 2002, 8:52:02\u202fPM", "subject": "Public Anonymity", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Peter Fairbrother wrote:
> David Hopwood wrote:
> [snip]
> > This is called "Private Information Retrieval" - a Google search on that
> > term turns up lots of relevant papers.
>
> Thanks :) , I hadn't actually thought of it that way, afair most PIR
> techniques don't allow for a private/anonymous search of the database, which
> would be essential if PIR-only techniques were to be used in this situation.

There has been some recent work on searching; that problem is generally
considered part of PIR.

Anyway, you don't actually need searching for this application (or maybe you
do need it, but the method below is a way of doing a limited type of searching):

Suppose that each article has a tag that is sufficient to tell the recipient
whether the article is addressed to him/her. I think you need about 80-bit tags
assuming shared secret keys, and about 200 bits assuming public keys [*].

A client downloads *all* of the tags, finds the indices of the articles it
wants, and then uses a block-oriented PIR scheme to download the actual articles
efficiently. In your example with a million messages per day, the size of
1 million 200-bit tags is 25 Mbytes, as opposed to 5 Gbytes. (The communication
cost of the PIR scheme has to be added to that, of course.)


[*] Here's one way of doing 200-bit tags: Choose a global 160-bit prime-order
subgroup of an elliptic curve. Each recipient has an ECDH key pair in this
subgroup. The sender does one half of an ECDH key agreement, and forms the
tag by concatenating the x-coordinate of the ephemeral curve point with a
40-bit hash of the x-coordinate of the ECDH result. This can obviously be
verified by doing the other half of the ECDH agreement.
(Note that the hash doesn't have to be long enough to be unforgeable,
only long enough that the recipient can eliminate almost all articles.)

Can anyone think of a way to reduce the tag size significantly, without
assuming shared keys?

> The theory is otherwise similar though (impossible from an information
> theory perspective, but probably possible from a complexity perspective).
>
> [snipped myself - ouch!]
>
> > Be warned that a lot of previous work
> > on this subject has been highly impractical. (Several of the papers that
> > Google turns up claim to be practical, but I haven't looked at them closely
> > enough to see whether that just means "less impractical".)
>
> Utterly impractical would put it better (balloons, crackers, compliments
> booth, fireworks, etc..)

It's not that bad. I downloaded most of the papers that are available
on-line, and this one looks quite promising:

Amos Beimel, Yuval Ishai, Tal Malkin,
"Reducing the Servers' Computation in Private Information Retrieval:
PIR with Preprocessing",
September 29, 2001.
<http://www.cs.bgu.ac.il/~beimel/pub.html>

The most practical schemes are the ones that involve precomputation or
batching; that gets round the problem of having to do O(n) work for each
query.

Why give up so easily? There's no reason to believe it is impossible, or
even impractical - see above.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPOhIpTkCAxeYt5gVAQGzlgf+K8AckTdN6hnciEI6GRtKtbfRbzLa2yXA
FgtvCpiMFf8KZMshVgDO9yPfH42apTp+JMPR4fMh9MziAVQhxr+ZGFgVQ80lXEsb
Bw3Q9AfHcfn+puHJVhViYpQF23djprMhMmz5paU/kBJ9Mf+NQFPim1MlXQFGUNeu
mCi+z8+DZgMiH0aZ7K/ZHY+CBWQ10UyoMzQ5qphOHSOBqpKH6Fg9Ha6SzuutEzzd
jOAO/Zx/Jj/igT2H6oLGCJu4riaM07vue3s5ZTMkkt6KncM2k5gcmIQyt4S6ZgNw
qcUyAfzbBbbbDSyzXAM1tn2QfILDC/LjlJtTqYH1LpSK7Pvdf72TkQ==
=dRGA
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/REmHUqMCgCs/m/79_At5RHdYwJ", "n_sections": 64}, {"thread": "RJz8SyyWSVQ", "msg": "kgazcbG7sA4J", "author": "David Hopwood", "date_disp": "May 27, 2002, 12:10:30\u202fAM", "subject": "IP status of SRP-3 (was Re: 2 party authentication protocol)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

An Metet wrote:
> however SRP[-3] is popular in the open source world because
> it's not patented (most of the EKE's are encumbered)
> http://www.ietf.org/rfc/rfc2945.txt
> http://www-cs-students.stanford.edu/~tjw/srp/design.html

Stanford University have applied for a patent on SRP-3; see
<http://otl.stanford.edu/pdf/97006.pdf>. They say (for example at
<http://www-cs-students.stanford.edu/~tjw/srp/license.txt>), that it
isn't encumbered, although strictly speaking the royalty-free license
grant in 97006.pdf only seems to be valid for 15 years. This clause
is also quite nasty:

# LICENSEE agrees to indemnify, hold harmless, and defend STANFORD,
# UCSF-Stanford Health Care and Stanford Hospitals and Clinics and
# their respective trustees, officers, employees, students, and agents
# against any and all claims for death, illness, personal injury,
# property damage, and improper business practices arising out of the
# use or other disposition of Invention(s), Licensed Patent(s), or
# Software by LICENSEE.

Note that the license is not automatic; if the patent is granted, then
technically you could be infringing on it if you use SRP-3 in the U.S.,
unless you have filled in 97006.pdf and sent it to Stanford.

I notice that RFC2945 doesn't have an IP section, and therefore doesn't
conform to section 10 of RFC2026. Tut tut.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPPGxlTkCAxeYt5gVAQEd0wgAqNggJT/YkkYrAN5BhlkNQAk+LXvDI4bE
JwzinSUwH9eou7N+2CIyNVUUVP5KW4tWM4z1QaW3Su079n9vb/3hC8kINUE6edkX
76Isu8gN/mQ2T0E9GjKaEkBbDOUxneY96e9fq1G97ZfEcWL9aIZAhvftxDc5xuHP
z7ZzE6Ut5kfQIoT0dkItQ4D2OpNx+REO0CVlW5+lGhc9rK4mstE4ivqiGgwqpOvx
U14e8I+aiv9VN/EnxVRQU4/ZoXhtGtGxAQOrCe8I5Xt7JY89ZKhkZ/qV5yJYsSPc
LMeBHF+TyGzertePM5iacaQq/y/5Ps/Srr1LpYm/9xS072Sujn6+5g==
=QJBt
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/RJz8SyyWSVQ/m/kgazcbG7sA4J", "n_sections": 2}, {"thread": "SM5Mji3B72A", "msg": "A2D6M2fRppkJ", "author": "David Hopwood", "date_disp": "May 19, 2002, 8:18:47\u202fPM", "subject": "[OT] Re: Which of these ciphers is the safest?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Does anyone remember:

# This program posts news to thousands of machines throughout the entire
# civilized world. Your message will cost the net hundreds if not thousands of
# dollars to send everywhere. Please be sure you know what you are doing.
#
# Are you absolutely sure that you want to do this? [ny]

:-)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPOhAvzkCAxeYt5gVAQHzuAf/RmpQhz+HJ9s4WdyrAcGc46VW7igKCne1
YCejftrh+Ii/hQyxAnM1rpAv7Jc/Qo6O1DExA9eUawX9cAmuWeczhXbM85dvGQi3
CwCFLWPwJDohDisj/gbmumF7Yz6mW3MK9/8H8i65YfywDYzmn2EImvAvI+oBMzaH
cpZlRs+9QzdMR16ttvaxQ4CbcEDkegBsDLl0/LWWIi+kAz6eUtdBtbvumLdc8uk/
2AddER0SVPKe3cO2ERq6TBDs+GUBBccTfw/3+EbcQrwVpul45RnnSGB+8eehUHhT
UBn2XqdWvJZ122LrM8qMnMCJ6b+hqhCXHaqyLVjqhI+cyqvIV9n0mw==
=zw+7
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/SM5Mji3B72A/m/A2D6M2fRppkJ", "n_sections": 34}, {"thread": "TaKy4HfAseQ", "msg": "4PVfKJzfRjcJ", "author": "David Hopwood", "date_disp": "May 8, 2002, 10:28:27\u202fPM", "subject": "Steganography via sentence sturctures", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Anton Stiglic wrote:
> In allot of RFCs these [RFC2119] words seem to appear in a series that


> follows a random uniform distribution.

ROFL, but IETF standards aren't usually *that* bad :-)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPNnesjkCAxeYt5gVAQFpYQf8DKgP2PGnsLYfIwj7kp/01HQ8vhZxqqYn
WiK8DdMdf5dyc4elWgOARC+hCNBvyiLMelucV78EiYeXmd3gOgy7vDyycDHigmRm
odaGTerbbPnjDIBO5JAqMZcZIwSBryJP/DRiP5oMWcgmLy9UMj/dmZX0pom3zj49
NflMNeihoT9YxbS6hs2Caa1EN9sKkFsXDXXY/L6jyqml8HSmEPQBT7WvG/Dl59HH
qfyh0H8NEwMA4tlBOVf9OrPV/GaGtLmK339Ch6j484C3543J3vqTifj2OjAf6pnX
ETA2ts1jzJCRjleunhuYn52N4K1D/dm/Sb4KbdMB9dxLUIt/nvMCmw==
=aHxv
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/TaKy4HfAseQ/m/4PVfKJzfRjcJ", "n_sections": 13}, {"thread": "X7m_0dcbqak", "msg": "QqeObGlZOVcJ", "author": "Jim Hopwood", "date_disp": "May 13, 2002, 1:02:02\u202fPM", "subject": "Hashing Functions", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:


> Colin Andrew Percival <cper...@sfu.ca> wrote:
> > Disregarding space requirements isn't quite as odd as it sounds;
> > history shows us that space requirements tend to be rather more mutable
> > than FLOP requirements, so a conservative approach is to assume that new
> > techniques (eg DJB's recent proposal) will be developed which reduce the
> > cost associated with the memory requirements.
>
> Ok, then I proclaim here that I have broken AES with any key size.

Tell us how, then (remember to count the number of steps to construct any
tables, including those compiled into the program, in the time cost :-).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPN/xeTkCAxeYt5gVAQEjXwf/R/VUXNABct45NmRFM49+vNUq9MtwlCl9
kPtZeFVJEhKYaya9BiUncau0+Vb/YVuCSc69JVHA9KH6vwGjwH3YiY57cJ1JY0aI
moHQIuNXTrr4sqE3wCauGnLpBOUWzqBJ8s7Py5moKeoNVnUR/5uLW+lEy0bFZrrE
is4njVHtUSZNLBKRTaPLhlen4lrBrJs4DJ0SchyauBmOyF6WZCrlX6oMdCG204cL
SZPw/5kbDn8K+6Qrx0OBH989+msXSJ1M8VeLaYShxH92B+8vYyn4auCSba8oIZpk
z5HqJVnFJMYxJ6qInSxYe0bVf9QZsVb9z+OBNyF8Tojyq8PP2aWQig==
=pttv
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/X7m_0dcbqak/m/QqeObGlZOVcJ", "n_sections": 29}, {"thread": "XB5zpUVUDQA", "msg": "MoJ7_uUMlHgJ", "author": "David Hopwood", "date_disp": "Jun 5, 2002, 1:08:04\u202fPM", "subject": "How to find Blum numbers?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:


> rium...@hotmail.com (James Muir) wrote:
> > Just to clarify your suggestion about using "safe" or "Germain" primes
> > to implement that BBS generator: The BBS generator has a security
> > proof associated with it that depends on that fact that both p and q
> > are congruent to 3 modulo 4.
>
> That fact is just to make square roots easier.

No, it's not. The security proofs (Theorem 4 of the BBS paper and the
Vazirani & Vazirani proof) depend on it. In any case, the BBS generator
doesn't use square root computations.

You're right that safe primes > 5 are always congruent to 3 modulo 4.

However, BBS doesn't need safe primes, any more than RSA does. (A feasible
attack against short cycles in BBS would imply a feasible "cycling attack"
on RSA; those attacks have been analysed in the context of RSA, and it's
generally agreed that they are insignificant.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPP5FCzkCAxeYt5gVAQE1IAgAl5KcC/nRjWdkwYsAxsjJPbKCqVbRzJHT
Kwn+SJXQeJ0QsAtD2QniCsa9PD2/NyfDXE0cXmd/Kuh3kT3GI0h3vEq3474grZtD
3eqamlBhg+huKhr3oAw7M4dRYajLhgTX2gD4dXdc/VuMovT5yUnzIBTY+HcQKIQ4
JMffoa3VbcRwx+gGPbWT19tuj8WCeuRCxSiUUUIW4QZ61W8IrCRFlvqYxlsGpo6a
YA2nVLffXXc1Z80o3K2nuaPqPEYTrEEoyG23SIfVVmkdx+PYB50RMRLF1O92Y2r8
NKm3SCqMVNzrtepRAyy2Kx88VEp+Cys1uGtNnRzK9+9fwvSGhIiozA==
=gFr3
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/XB5zpUVUDQA/m/MoJ7_uUMlHgJ", "n_sections": 11}, {"thread": "YGncdfW8dQw", "msg": "eF-xWnMnk3EJ", "author": "David Hopwood", "date_disp": "May 16, 2002, 9:16:01\u202fPM", "subject": "hybrid of square root and discrete logarithm", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

xuhuad wrote:
> We know DL problem is hard and SQROOT modular n is hard also. If we

> have a setting where the group in DL has the order n, where n = p'.q',
> are the following problems as hard as original DL or SQROOT?
>
> p = k.p'.q' + 1, n = p'.q', p', q' are two large primes. group operation
> is "[multiplication] mod p", g is the generator of a subgroup with order n.


>
> 1)DL+SQROOT
> Given (g^x mod p, x^2 mod n), compute x??

This is unlikely to be provably as hard as either DL or SQROOT, because
it can be solved by solving either. Therefore unless DL and SQROOT can be
proven computationally equivalent in this group, there will be no reduction
from either DL or SQROOT to DL+SQROOT.

> 2)CDH+SQROOT
> Given (g^x mod p, g^y mod p, x^2 mod n), compute g^(xy) mod p. ??

Same argument as above (provided x and y are independent).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPORYlDkCAxeYt5gVAQGWugf/ZkL4Noe4uRl1eWEdrDmr4b1/pQ/SPJXk
2pb380CYzmvT6RY6Wh5zUwr0wHGBsY26qd7HwSI3y57KeKZogmILmTgpPDtRQgUI
ommMq7QIf33aPQ562xKXFzVg4O7IAqFDvQ0l+BaY+PevBfW4LcChsWgXBJ8OGTtC
MTN3m823BhKDnA6WvhwHYYCJGN+M/byKBpZzIuABbnpBSjIVS7NGn1vJvCu7ax5h
8R4cx5niZOcyth8eMNcBIA8wC5sMQbN87wWSYZKLqQIukO51rktqbzlpFGrY9OQp
FyVfwXui1A0W32fwjM06TbBLMsXaIhPWat4QfO9OGJ8lMPcBe8ykLg==
=wE0y
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/YGncdfW8dQw/m/eF-xWnMnk3EJ", "n_sections": 4}, {"thread": "azNKbGY_vJk", "msg": "sKVq88cQZc8J", "author": "David Hopwood", "date_disp": "Jun 29, 2002, 6:00:47\u202fPM", "subject": "PGP Prime Generation Question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> A LL prime differs from a SG prime in the fact that a LL prime p only
> has at least one large prime factor of p-1. An SG prime requires that
> p-1/2 is prime.

A *safe* prime p requires that (p-1)/2 is prime, not a Germain prime.
This is the third time I've had to correct you on this:
<http://groups.google.com/groups?as_q=safe%20Germain&as_uauthors=Hopwood>
Pay more attention.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPR4t/TkCAxeYt5gVAQFwmAf/RBiz7QuI1hYvlEfd0ymRrosQsGpjQ7dH
omGSBudJFnEc91ZgySkT0jbxMbLiMvTl2LthtgmazE9QswTOVtj+tb95uhKOgzwL
9PrKoeoLT3hJ1sHz5MJJHj6NbSOC6Eh1G/05rYmGgcyYapg8+QjVK4cfHha9rSj3
9jl3sEbLqN14RPUOAbeB0BK9ypV/kAihdt5ZYhL4i+GW5Fq1FmdcAeTcl6Z1ylNJ
DJPneKzspKYV8ll1R2jAg74U7L0ImxslGZ0N8Tj+k70TGW+YE5HzvNYgJV94SSoF
yP+xX9mTTnW6yAxEpjYcgwyzFQeQ68yUmq+FLIqppUd80aUawe5exQ==
=kGTV
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/azNKbGY_vJk/m/sKVq88cQZc8J", "n_sections": 19}, {"thread": "azNKbGY_vJk", "msg": "G2jJi5qwP24J", "author": "David Hopwood", "date_disp": "Jun 30, 2002, 5:15:29\u202fPM", "subject": "PGP Prime Generation Question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:


> David Hopwood <david....@zetnet.co.uk> wrote:
> > Tom St Denis wrote:
> > > A LL prime differs from a SG prime in the fact that a LL prime p only
> > > has at least one large prime factor of p-1.

This is wrong as well, BTW. Let's look at what the Lim-Lee paper [LL97]
actually says:

[q is defined earlier as being the subgroup order, which is assumed to be prime]

# The presented attack shows that it is essential in discrete log-based schemes
# using a prime order subgroup to check the order of received numbers before
# applying the secret key. However, such explicit checking requires additional
# exponentiation. As a better countermeasure, we recommend to use a secure prime,

[what is now called a Lim-Lee prime]

# i.e., a prime p such that (p-1)/2q is also prime or each prime factor of (p-1)/2q
# is larger than q. [...] Such a prime can be generated much faster than, and
# seems as strong against any known attack as, a safe prime (i.e. a prime of the
# form p = 2q + 1).

I.e. a prime p is a "Lim-Lee prime for prime subgroup order q", iff *all* prime
factors of (p-1)/2q are greater than q.

(We can also say informally that p is a "Lim-Lee prime" if there exists a prime q,
large enough to be a secure subgroup order, such that p and q satisfy the above
definition.)


[LL97] Chae Hoon Lim, Pil Joong Lee,
"A Key Recovery Attack on Discrete Log-Based Schemes Using a Prime
Order Subgroup",
Advances in Cryptology - Proceedings of CRYPTO '97.
LNCS 1294, pp. 249-263, Springer-Verlag, 1997.
<http://citeseer.nj.nec.com/lim97key.html>

> > > An SG prime requires that p-1/2 is prime.
> >
> > A *safe* prime p requires that (p-1)/2 is prime, not a Germain prime.
> > This is the third time I've had to correct you on this:
> > <http://groups.google.com/groups?as_q=safe%20Germain&as_uauthors=Hopwood>
> > Pay more attention.
>
> Now what type of "safe" prime.

The type of "safe prime" that is used in cryptography. (Ask a silly question...)

> Is there an official definition?

There is no "Academy of English" regulating the English language, and no
"official definitions" for terms in general, no. However, I've never heard
or seen anyone use this term other than to mean "a prime p = 2q + 1 where
q is also prime". I don't know who used it first.

> Because I seem to recall reading about having p-1 have big factors and
> p+1 as well.

For Z*_p, the factors of p-1 determine the subgroup order. There are lots
of possible constraints that may be required on the subgroup order for
various protocols, but yes, a necessary (not usually sufficient) constraint
needed for all DL protocols is that p-1 must have at least one large factor.
The factors of p+1, OTOH, normally do not matter at all.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPR9zkjkCAxeYt5gVAQFOrAf9HLrMhpgU2ttLa9FN+m6SS5tUxXSEEIvM
0DTNmvfoFUVOikmYSVs5JBB7ILgky2qsmeF2OGRN1drgBCM6466H5qun9nP4hxsF
t+0za1ueCQLeaQyc515ZFhQMx4Va75RUTR/+lIIFgFliiUBEauRx6PGsRQlWIvTW
Eo+hBwE47kBDfGJdkV1JaqaJfiaKUVLnZ5YqcHYih/cIYcA4GwWulQSyAbgwaekT
9+Lc/shfm4qXQkw66co0fjX0NlnUYBN/H8YtO729r0jN7xBS2yV9W8TOItG+xJiZ
aFVm1hzAcUHMHBCdpkDwmphWDcHlu35KmskdycdsFYp8idk9rc10HQ==
=rzNb
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/azNKbGY_vJk/m/G2jJi5qwP24J", "n_sections": 19}, {"thread": "azNKbGY_vJk", "msg": "rxeWABqj9PoJ", "author": "David Hopwood", "date_disp": "Jun 30, 2002, 5:25:14\u202fPM", "subject": "PGP Prime Generation Question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Where did you see that? Possibly as a definition of "strong prime" (which
has several variant definitions), but if you saw "safe prime" defined that
way, then the source was simply wrong.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPR93ETkCAxeYt5gVAQF1tgf/WDBtYDUe6rwdPIOisYLynDQ4nEpoq+/q
oWL3sJY4Qaq9m0xt4+GkoTvKRiUmOmulFZK491xPqeya/Nb01cKleJCNJo96hp+w
zy9wr8S6XJJXsKswmBQAlEzCNHxIeWPh42fLeQ9owe0FjWzKh7XQDvTB9+BoBzMC
9siZgWkOwFY4jGl5s2YSVOahp5eZ/G+R2JRjqmCW9kl0R8s6pKvoh9llNHeOsSTF
mxy6lq0NQI4XQn77ejP6DYu01AdrpOImsTRxcf204cdqYwcxi+q4LVI/DQxi9EBR
TzoUNFA+KUD8ntcZroy0deBw6dZT5cQnfN7KzOZ6LvScsbfgPjRCMw==
=rm1A
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/azNKbGY_vJk/m/rxeWABqj9PoJ", "n_sections": 19}, {"thread": "bl_xHDZ-2hE", "msg": "4hNW9POjx-EJ", "author": "David Hopwood", "date_disp": "Jun 28, 2002, 12:02:28\u202fAM", "subject": "3DES or something else?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

However, it's quite possible that 0x02 could be a header (record type tag?)
that is followed by encrypted data. If the number of bytes of random-looking
data is always a multiple of 8, that would be a strong indication that it's
a block cipher in non-streaming mode (for example, but not necessarily,
3DES/CBC).

Even if that's correct, you won't be able to conform which block cipher it
is without reverse engineering the implementation, though - there's no
way to tell from the output.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPRvfrDkCAxeYt5gVAQF7kQf/UY9BwxSw3gzKk4Hg/Iks0c7EKX+oaxpk
84qMmLLwOS1jeNAThNVK9FZJYkY8kZdarkdJlT8nobZhYynEamWkmieXtId3+hlX
5kAfCScG62WUtdo1sUlFNADai76vikkEYLXM+Cw8/0iop9r0waP1b3lawXk8OV98
qacVq8lAfA4oDdfb/QPPz+SO5eW1sgY9ZLF+Epb4ZjGAWDjLD3TeLVTA2HsLyo9O
7FHKQVHxOWBZD5i0HUaW/tkaGzCI/E0Ps0NlGqlYVk969Hm5aV0sZviiYuApWzze
6AGy+ZUH0BTZZQY/jLiIG6TXtSXJMrLC2BJGtoaOou8AMf0OxUEAow==
=UkPq
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/bl_xHDZ-2hE/m/4hNW9POjx-EJ", "n_sections": 4}, {"thread": "cNbawzhZLGk", "msg": "HcUkKUxCFasJ", "author": "David Hopwood", "date_disp": "May 15, 2002, 11:30:45\u202fPM", "subject": "Blum Blum Shub PRNG question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

It's a little more complicated than that. BBS is "polynomially secure" if
you take O(log log n) bits, but that isn't really very useful in deciding
how many bits to take for a specific length of n. What you need for that
is an exact security analysis of BBS, as given by the
Alexi-Chor-Goldreich-Schnorr theorem [ACGS88].

Since I'm too lazy to do the math right now, here's an example that was
given previously by Dan Bernstein, which assumes one bit per iteration
(search groups.google.com for subject "Is BBS provably secure?" in
sci.crypt to see the whole thread):

> The Alexi-Chor-Goldreich-Schnorr theorem, for example, tells you how to
> factor N using 10^54 (lg N)^3 applications of an algorithm that has a
> 1/1000 chance of seeing a pattern in a billion bits produced by a BBS
> generator mod N.
>
> The theorem does not say that predicting the generator is as hard as
> factoring N. It allows a ratio of speeds as large as 10^54 (lg N)^3.
>
> There are newer theorems that clamp down on the ratio somewhat more.
> However, it's still theoretically possible that the ratio is noticeably
> larger than 1, even though we don't have any evidence along those lines.

As an anonymous poster commented:

> Obviously using > 10^54 oracle calls (which is 2^170) to factor say a
> 1024 bit N is not useful, because it takes less work than this to factor
> such an N without a BBS oracle (probably under 2^80 steps). On the other
> hand, this is an extremely weak BBS oracle, one which is only a tiny bit
> better than chance. Stronger oracles will give more effective results.

Since arguably the BBS security proofs aren't strong enough for practical
modulus lengths even if only one bit per iteration is taken, it's a dubious
idea to take more, at least if you want to rely strictly on those proofs.

OTOH, it would not be completely unreasonable to view security proofs that
are not "tight" as heuristic arguments, suggesting that the scheme is probably
stronger than actually proven (AFAIK, none of the schemes that have security
proofs that are not tight, have been broken *because* the proof is not tight).
That is effectively what people are doing when they rely on the (corrected)
security proof of, say, RSA-OAEP, and use it with a 1024-bit modulus.


[ACGS88] Werner Alexi, Benny Chor, Oded Goldreich, Claus-Peter Schnorr,
"RSA and Rabin Functions: Certain Parts Are as Hard As the Whole",
SIAM Journal on Computing vol. 17, no. 2, 1988, pp. 194--209.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPOMnezkCAxeYt5gVAQFj/gf/bqWfMEKwGyZg8CW5x5HLIlX5XlS8Oont
NdMY6cC9gJHjg+6JhLMp6Xynk8h0lc61MBIjTcdmCYhgpP9BV97uKiNLcyIplAyJ
bDbD1AJfW3LIhzMPQ4jqqWcZLXnYUdD72mVoUAt3loOS/I03uFBZRYdUFtSJmy2o
5ZZ5GLoT9yL2m+9B+Vq36ISl6gerrBx6trPNsQT6nCYatxjh9sxXXRC9OyEEVVj7
/KyDZbhb0sXr0rInOKg5CyNYYzJcr1bPfIfV7fKH/x67Mn2i+xh/7SEaNqBeK+xW
JdeIyjR4R3nncNka0voTOTFXNcJnHX2rqZWJC4jV5YZtXseoFImbUw==
=XEXi
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/cNbawzhZLGk/m/HcUkKUxCFasJ", "n_sections": 6}, {"thread": "dkTPhSnxcH0", "msg": "9zSTm5Y0XdoJ", "author": "David Hopwood", "date_disp": "May 26, 2002, 11:33:21\u202fPM", "subject": "\"Blum primes\"", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Aldo wrote:
> > Aldo wrote:
> > > Let p, q be Bloom primes, .......
>

> I meant Blum primes, of course.
>
> The product of two Blum primes p*q is a modulus of
> BBS squaring pseudorandom bit generator.
>
> Blum prime p = 2p'+1, with p' = 2p"+1, where p' and p"
> are also primes. Similarly q = 2q'+1, q' = 2q"+1, ...

That's not a Blum prime, that's the third prime in a Cunningham chain of
the first kind: <http://mathworld.wolfram.com/CunninghamChain.html>

A "Blum integer" or "Blum modulus" is a product of two primes both
congruent to 3 mod 4, but "Blum prime" isn't a commmonly used term.
(Google finds some instances of it being used to mean a prime congruent
to 3 mod 4, but a lot more references to a French prime minister called
L\u00e9on Blum :-).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPPGo0zkCAxeYt5gVAQFxbAgAu8vDHEArBeyMCOYu/L+l7ijeDr3oXkJ1
m9m2iMLXm9i7CDxovGWtvap2dxcP8IZz+Epw1HqJd+4YUb35UxZhQDaWCpuJKKXA
0D8Aj0XIaVtWcVh2E7xn26t8GQ4fEmgBuv2FCr6MZqgBqKNa186hE6vVnJWcUaEU
p/DQmCkZk4MXBE/T7BuGF156TWS+GnCiJSQJK2cu0UIDrk17K/hOPSpQsaSS+sWD
uM51x6zOUO9+1NZqJTEd94/aCUskMVdvitXcT4XNbo3SXUIqS+OqCBVFwXQwhqrD
BrjAWqakU3EhMaMrt/WRE7VKo1k1+5ojGgIl6aFO8Ftj6AK4fXFlwg==
=WbTc
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/dkTPhSnxcH0/m/9zSTm5Y0XdoJ", "n_sections": 6}, {"thread": "fN5pss8uKVQ", "msg": "7ZSCiQ_ts0wJ", "author": "David Hopwood", "date_disp": "Jun 6, 2002, 10:58:12\u202fPM", "subject": "Randomness as a measure of encryption strength", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Richard Parker wrote:
> A proof for the non-existance of a non-deterministic test T with 2-sided
> error is more interesting. The original proof works if one can posit a
> cipher W that is the Devil's cipher - no matter where you look or how often
> you look W always behaves like the strong cipher S. It is only in the
> places you don't look that it is weak.

Informally: consider a cipher that is weak with probability p that is
greater than negligable by a small factor. This is considered broken (by
definition), but T cannot determine that except with probability at most p.
So as long as the attacker can do significantly more work than the defender
(which we normally assume), there will be weak ciphers that T can't find.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPQAhFjkCAxeYt5gVAQHC1ggArPSH3bGxdfsDRSQ/FfnEMJGevHEicytT
ygQPsOT4z9UXLo+nfhyXKpr3XcjD1QkKjbo8Wqgo0PNZgeov6OZCS8BvNiXGAGOZ
THsVhDiPP9TzR7+mHb1/rq2h0rJSHCUMs6KKApSOkCDdyznAt8v3xHrHiSL2D6xQ
5XoUILzL0K3CN0tZi0w+DTLxmbC/sfO1Z8Q+UWESyTZXlgZbOqK0FTiSUfTRZfgx
w4QJostDDvKA3SqRcbx1a615Lv/KswNB1z2CHoQbkNi5efMaAxzVX5xmCU1V7kEL
LLhtOrNl2Hc0KnX7e3KeOjZNFuoLZwa6gn6RXwjgAMVavS+P4NOkeg==
=4Z7D
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fN5pss8uKVQ/m/7ZSCiQ_ts0wJ", "n_sections": 45}, {"thread": "fxFMij5R9fk", "msg": "B1TMPAj1zAIJ", "author": "David Hopwood", "date_disp": "Jun 22, 2002, 12:07:25\u202fAM", "subject": "Why did 120 governments use Crypto AG hardware? <<< Because they weren't smarter than the NSA?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Douglas A. Gwyn" wrote:
> David Wagner wrote:

> > [...] It's not hard to build a crypto implementation that


> > indetectably leaks its key out a subliminal or otherwise hard-to-detect
> > channel, particularly if all the customer receives is a black-box piece
> > of hardware. What does QA have to do with this, and how would ordinary
> > QA checks prevent this attack?
>
> Suppose you were a government or corporate specifier of crypt gear.
> Surely you'd check what was delivered in various ways? One obvious
> one would be that the CT size equalled the PT size for arbitrary PT
> samples. If that check passed, you'd know that the key was not
> being embedded in the CT stream.

That's faulty reasoning, at least when applied to a black box, since the
box might include compression.

(I know you said "for arbitrary PT samples", but that doesn't change
anything: your tests could use uncompressable samples, but most real
plaintext won't be uncompressable. I.e. in that case the tests will only
tell you that there exist some plaintexts for which the key won't be
leaked - which is obviously insufficient.)

Another reason why black box testing cannot detect subliminal channels
in general, is that the subliminal channel might not be active during
testing. For example, it could be activated by an input to the box
(e.g. chosen plaintext, environmental inputs like a radio signal, etc.),
or it could be time-dependent.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPRP31jkCAxeYt5gVAQHFMggAgCbBKcS/F4OGhl31OvpAfn9RqeKEmojB
9mnw06HB998pDElv0esrqmUIEKRnARI+I8LE2bX7fqgEhMX9cvvo88hYzm1NSxXi
rlWp8KTyOE3/HSy4EPwjTTTrq7LZAMt/F/yNuFvwuqsvFlSQg/ZVlYiczO/AMyAU
N1fCqzOCIDY0Qn1fNtIE9AvW8kQrZhXHP8rux9xUxbV+YKVjv/eTYT+FY1sC4vMp
ibo6NPnnB9nduxO0PzfD48RssnPd3jFyJ7WhKthb0QJxhpRwE6pST+08ZnT+B0iZ
KuYIp9Xl1QgyM9jJB+VLliriziPqyt29RcBgZwgtNkZvX9MTofcTqA==
=drFS
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fxFMij5R9fk/m/B1TMPAj1zAIJ", "n_sections": 67}, {"thread": "fxFMij5R9fk", "msg": "FW6wch8jamEJ", "author": "David Hopwood", "date_disp": "Jun 23, 2002, 9:54:53\u202fAM", "subject": "Why did 120 governments use Crypto AG hardware? <<< Because they weren't smarter than the NSA?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
> Having read the different opinions in this thread and
> having also said something myself, I like to repeat
> that, while it is not fair/justified to 'incriminate'
> other people/firms based on non-rigourous or even very
> questionable evidences/claims, it is certainly a
> (trivial and absolute) necessity for anyone, not to
> mention government agencies, never to have blind trust
> in any black boxes.

That's unrealistic. The processor in a PC is effectively a black box,
and there isn't much option but to trust it, even for government agencies.

(Note: using hardware crypto doesn't change this, if the plaintext is
prepared on a net-connected PC.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPRXTGzkCAxeYt5gVAQGOVQf+LoHe1YzUn60azCsWKw9AQv26z3oH4PM2
lnlghD7paElvUk8XIS8Ia7/FiwVcawkIpVU3KQ3P541XvM7gkecYF4vCACGv/u8S
nZtjBye7xrBKgn2BjC8+OhwS7gu0BZ0I8S/srfJgaYzQ4hB5vDAmDZWtYDbKm4ze
yZ0TSou7PWptZIF8S5AitMO+h9hl4WYigzwmtXs/SrBL0386CPX4hxDptjuTX66t
Hv0AqZpEmtNO5A6KjjNSUilFVimbGXubCbu+gxKCpvLiudIQoecKLJyKk5c4YWv5
K2EQbneph6coYgOdufCyUllRMdo7jfV5H14h+U+be3DyYWwTEgQTiA==
=aI7D
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fxFMij5R9fk/m/FW6wch8jamEJ", "n_sections": 67}, {"thread": "j3Jv0_J76VA", "msg": "gE0f-2imwzgJ", "author": "David Hopwood", "date_disp": "Jun 29, 2002, 6:25:27\u202fPM", "subject": "tight crypto for ASIC/firmware", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Philip Pemberton wrote:
> "Benjamin Goldberg" <gol...@earthlink.net> wrote in message
> news:3D1BC5E3...@earthlink.net...
> > David Wagner wrote:
> > > Benjamin Goldberg wrote:
> > > >You left out AES!
> > > Is there any low-end platform where AES is the least
> > > resource-intensive or otherwise a better choice than the alternatives?
>
> > IIRC, AES's key schedule does not need to be fully expanded to work.
> > Also, the sbox and the inverse sbox can be calculated on the fly, with
> > no need for big lookup tables. Thus, AES can be implemented using very
> > little memory.
>
> How little? 200 bytes?

16 bytes: <http://www.dice.ucl.ac.be/crypto/publications/1999/CAESAR.pdf>.

Certainly it's easy to do in less than 50, depending on processor, how
much fits in registers, code size tradeoffs, etc. Another implementation
report is <http://csrc.nist.gov/encryption/aes/round2/conf3/papers/14-fsano.pdf>
(neither are on a PIC, but there's no reason why your challenge couldn't be
met).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPR4zyzkCAxeYt5gVAQEgrAf7BEWqCuPKj3s4ALHCPrbLEGI6C+y2dg/e
rTL3WDGeLbTWhGr9yQaoBGeAWZKWtHDMFI6K5J2yvmj2nV6crsy0IrkS0VQYt6Ve
Upq008Z1/1D99FFI8mbdcDxwTWLL3uheQJZWRTj1bB+mhjMWLuQHMCU3JGB2QsgU
geq+Wme4EbXssmuI65NyKmTFcXa+aUdl6Q66OQ0y/bH8I/l2HCqzqlhBWPAlRaT2
cNVZ5h+q8wFaUM9lhlv/HIhcXkwdl53SYSS+ccEjaGTIU5R2eXBpX+rK9dsDAOF0
wsS/fNmLgd9xdxjXLhFY20eCETP2w8BVbRILJjHTdaU2yqg/wpGjOw==
=6oQV
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/j3Jv0_J76VA/m/gE0f-2imwzgJ", "n_sections": 9}, {"thread": "jS2WqA6gBxg", "msg": "Gx2ojpS7YNEJ", "author": "David Hopwood", "date_disp": "Jun 5, 2002, 8:29:44\u202fPM", "subject": "ciphertext stealing vs padding", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mads Rasmussen wrote:
> Could anyone give a good pointer to information about cipher text stealing?

Unfortunately the reference that is usually quoted (Applied Cryptography,
2nd edition, Figure 9.5) doesn't clearly specify some of the edge cases for
ciphertext stealing - for example what happens when the plaintext is an
exact number of blocks. Here's an unambiguous specification of ciphertext
stealing for CBC mode, which is consistent with the RC5-CTS algorithm in
RFC 2040:

Let E_K, D_K be functions to encrypt and decrypt B-octet blocks using a
block cipher with key K.

To encrypt a plaintext P of length |P| octets:

if |P| <= B, return error "plaintext too short"
n := ceiling(|P| / B) - 1
Ln := |P| - B*n
append B-Ln zero octets to P, and split the result into n+1 B-octet
blocks, P_0 .. P_n.

C_{-1} := a B-octet intialisation vector chosen uniformly at random

if n >= 2, then for i = 0 .. n-2:
C_i := E_K(C_{i-1} XOR P_i)

Z := E_K(C_{n-2} XOR P_{n-1})
C_{n-1} := E_K(Z XOR P_n)
C_n := the first Ln octets of Z

To decrypt a plaintext C of length |C| octets, with initialisation
vector C_{-1}:

if |C| <= B, return error "ciphertext too short"
n := ceiling(|C| / B) - 1
Ln := |C| - B*n
append B-Ln zero octets to C, and split the result into n+1 B-octet
blocks, C_0 .. C_n.

if n >= 2, then for i = 0 .. n-2:
P_i := D_K(C_i) XOR C_{i-1}

X := D_K(C_{n-1}) XOR C_n
P_{n-1} := D_K((the first Ln octets of C_n) || (the last B-Ln octets of X))
P_n := the first Ln octets of X

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPP6sXzkCAxeYt5gVAQE3cggAkIrilRDP5C8y4knGPquod4TjjoXMoHKs
47bX+Z9jCe8t+znTaTt0O5A5VfToz1/nGSQhFBA2cqib8YxTOQNZ6K9JVY7G7qTq
ztEJAjp1X8tlIdvq3+JP/kuNjvz85Is/NbwNIoyG3nOCctrvybz1TmndYITvWUAR
j8i+Yf054x1FdWW0d+vgkc/4Dw6rT8C+/du65lEHnFnnAmciRq+ulx+4O41+7HtP
ntCO4jRz4d5+UW4MG+ckgO8+qpTdDkSeSEcR9FXfqSgIAtKMd470FGu4M6Ns5yB4
Z2iM2oEKb4aathZG/QCoejLa8HnnGQftYqKDbGmQKWPoC4zQB4GV+A==
=3Tie
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/jS2WqA6gBxg/m/Gx2ojpS7YNEJ", "n_sections": 7}, {"thread": "m6auKy_73fY", "msg": "OefhJkcSBFcJ", "author": "David Hopwood", "date_disp": "Jun 3, 2002, 9:14:36\u202fPM", "subject": "Blowfish code error [in AC2 part V]", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

UBCHI2 wrote:
> From: mmo...@dgii.com (Mike Morgan)
> Subject: Blowfish can be cracked! (Fix included...)
> Anybody know which commercially available applications of blowfish contain the
> weakness noted by this poster?
>
> Date: 6 Jul 1996 18:53:18 GMT

^^^^^^^^^^

I doubt that many implementations are using the code from part V of
AC2, since it's pretty much unusable due to portability and interface
problems (and has another bug that causes it to fail to compile).
At least, I hope no-one is using it.

I just checked the first released version of SSLeay that included Blowfish
(SSLeay 0.6.6 from January 1997), and that didn't have this bug. Almost all
subsequent implementations are derived from the SSLeay (later OpenSSL) code.

> I did not notice this bug in the "Applied Cryptography"
> errata. It should be noted there, too.

Yes, it should have been, and still isn't 6 years later:
<http://www.counterpane.com/ac2errv30.html>.

The correction should probably just say "Don't use this code, use an
independent implementation (such as the C reference implementation from
OpenSSL) instead", though.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPPwUTDkCAxeYt5gVAQHYpQf/YFV1/Zq5KSUiyc4iCc7/C01exyaAA0vK
5dvqLXOtQgFJEmMJ/RUJY6NzN1Aaz0+CBPNtdtwIp9W1TZ5ZurzJ4lkcinNurBDQ
YEcvC7O1ONcjfRH0f2+JAbbIIoGkvTanR/GhsWQibpXPMknXQewz6IOdFwMSVYVp
XoxiQbj9dycyBbF9J9jI92ImAsjLrL4nOnZ1SWhAQbGSRR7sqc+L1jnbLNuszX9f
81wW33sZSgc8tyaqyrS42IxyhGOxO+kWL+x0sfWx9HcFc5KZobZ97dntVvP7tVau
AVylCUjQB41TzUKWmZ+0hYwNtFsWB2Js3kk2yX6BWyQMS84MQ9MoPA==
=VYCX
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/m6auKy_73fY/m/OefhJkcSBFcJ", "n_sections": 10}, {"thread": "m6auKy_73fY", "msg": "yzCfDx43XgkJ", "author": "David Hopwood", "date_disp": "Jun 3, 2002, 9:20:40\u202fPM", "subject": "Blowfish code error [in AC2 part V]", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Hopwood wrote:
> UBCHI2 wrote:
> > From: mmo...@dgii.com (Mike Morgan)
> > Subject: Blowfish can be cracked! (Fix included...)
> > Anybody know which commercially available applications of blowfish contain
> > the weakness noted by this poster?
> >
> > Date: 6 Jul 1996 18:53:18 GMT
> ^^^^^^^^^^
>
> I doubt that many implementations are using the code from part V of
> AC2, since it's pretty much unusable due to portability and interface
> problems (and has another bug that causes it to fail to compile).

Correction: it doesn't actually fail to compile, but it doesn't initialise
the P array, so it probably wouldn't be able to decrypt data that it had
encrypted.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPPwVzTkCAxeYt5gVAQHnWwf/QxUNxDbazpQBzRiSPSwTlC/78UqRdlle
ijiyNz6zdZvrsI/lmEqVl7rkYIktJp9r7Ei3ja7aS08lKXj8cNrpmbd+IoHFvH6l
t61lqCLQQ+28PyIZmeDfVL6N+FYC16EjJag/O66kfcu3z8Zr0bVLmjNWENnUUMpG
ThJVnjVnkZE3Z43VjwxeAe26DDf+Y0T/jQulGF4yE22fCB8fNOSHiRqdQfLRbNb5
3DczN+OKFbA0uNIwQjE1rrpN6zoqyD/yLp58u8XVwn5ammnTd+LTHqzuiXcnXEjS
xOgrZdgSrP0rgVZNRtypGK1mmLp3i0Mh2tmSj/WS+9IHykQCIJ69pQ==
=uf3G
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/m6auKy_73fY/m/yzCfDx43XgkJ", "n_sections": 10}, {"thread": "pYZM2lfPg54", "msg": "1PjVZPFE_Q4J", "author": "Jim Hopwood", "date_disp": "May 15, 2002, 12:05:13\u202fPM", "subject": "Real man-in-the-middle attacks?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Joe Bruno wrote:
> Man-in-the-middle attacks are a favourite theme in the design of
> secure protocols - and quite right too. But do they ever really happen
> in real life? There seems to be no clear-cut case of a single one, on
> the public Internet: or have I missed something?

There have been plenty of examples of DNS spoofing, which is the easiest
(not the only) way of doing a MITM attack on the Internet. A famous
example is <http://www.wired.com/news/politics/0,1283,5414,00.html>.

<http://rr.sans.org/firewall/DNS_spoof.php> has a reasonably good summary
of the attacks; you can also do a web search for descriptions of bugs in
BIND.

> I'm looking at this in the context of SSL without certificates (ie.
> anonymous Diffie-Hellman key setup).
>
> I know that in theory it is possible to subvert the initial DNS
> lookup. But does this mean that if I told you that at 1300 Zulu on 23
> May 2002 I was going to connect to www.google.com, from my account
> with btopenworld.com, you would **genuinely** be able to mount a real
> attack and get me connected, instead, to an IP address of your choice?

Absolutely. (I wouldn't, because the nice people at Google would get annoyed.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPOKHDzkCAxeYt5gVAQGSdwf/YcmGNpXFRp0l/Rf3PiLmNPlmSa9Q7C8p
cDB6HMpdLfEiZQ42IPq64Ulm37dQtujLbpZEaCb8XR/dAXvmSnTAi1CGMUOENp7R
0wHAb8Lrru2haYOAfkzcE/aEffRD3D9xlbMFhIhlSKZTNNiNhCso+Qn6uP8vDRSB
9eR83v4pn+XkgbhvaRqVn9EHzTEfe/pKSv8WdFig4nq1o3Kny0tewiTtVZlMydGv
/YawU2dymnjsbi6+/++H8eW9bTgj6pkcb2BuS2EtlBboUF2QKg923oqMykNkAiUc
YNw5b5M0wvNn7Hzele2JRjFlmKsIHbXcyWA7kKSwonx6JzkgHiTTJQ==
=cirI
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/pYZM2lfPg54/m/1PjVZPFE_Q4J", "n_sections": 11}, {"thread": "uZCscBz5udg", "msg": "txoStmW7TzkJ", "author": "David Hopwood", "date_disp": "Jun 18, 2002, 11:37:30\u202fAM", "subject": "\"Rule 30\" PRNG", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

AC2 gives this reference [83]:

Paul H. Bardell,
"Analysis of Cellular Automata Used as Pseudorandom Pattern Generators",
In Proceedings of 1990 International Test Conference, pp. 762-768.

which does not appear to be on-line. However, a Google search for
"linear cellular automata" seems to turn up some relevant tutorial
material and papers, e.g.
<http://cell-auto.com/inv_linear/>
<http://www.santafe.edu/~moore/pubs/quasi.html>
<http://www.santafe.edu/~moore/pubs/semi.html>.

Stephen Wolfram's 1986 paper ([1608] in AC2) is at
<http://www.stephenwolfram.com/publications/articles/computation/86-random/>.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPQ9TrzkCAxeYt5gVAQHNSwf/RgJhQznL0IyzSCKxPEJESOM67cjvH2ff
eaG1mI+0ns7ChVyLILuZDPY5yWfR5bJfJpO+gxcFHZhI14fifxooKLAOQ/N0FOqA
0/hdS4+THQlrm6wQ9GnHowD/f0I/8vZarKmG5h4VsYC8EBD8DeVy4C+C8x9aXgSo
BDL9ODvdQvcV3khKzmrj9di6PlmjhNfA2Ytip9cEFFlgCOfhXzHp2RZzDORCgkfD
02VIEgG2Wzxy3p3D5VmTTgvgTiTAdtIjPw71JkydkYcZ5hnXukLS2+FN7Cgy/dpM
5pTMid+g9y+z5RqL+y2R/PUxX9ppqD+WQKkpQ2wE90XJZ7SqOc0aDQ==
=dAVM
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/uZCscBz5udg/m/txoStmW7TzkJ", "n_sections": 56}, {"thread": "uZCscBz5udg", "msg": "SA6PZFjnFtkJ", "author": "David Hopwood", "date_disp": "Jun 22, 2002, 11:40:42\u202fAM", "subject": "\"Rule 30\" PRNG", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Bryan Olson wrote:
> Douglas A. Gwyn wrote:
> > Tim Tyler wrote:
> >>Here is a diagram of an O(1) shifter:
> >
> > Hey! The O() notation refers to asymptotic complexity
> > for a finite sequential computer, not for some inifintely
> > large parallel computer. No wonder there was disagreement.
>
> No, that's wrong. O() notation refers to functions, not computers.

O() notation refers to (sets of) functions, but that's not very
useful unless it is specified what the function is supposed to be
describing. Here it is the cost of an *algorithm*, in terms of a
specified cost metric and model of computation.

> In this case, the issue was specified to be time complexity for a
> hardware circuit as the LFSR state grows.

You can use whatever cost metric you like, but this isn't a particularly
sensible one - at least not unless you quote both the asymptotic time
and the asymptotic circuit size.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPRSaSTkCAxeYt5gVAQHRWwf/aiJA4JOdv8tkFW7sA3k05qwbYDKCmy51
RcGHnToEiRvx0ntpdRoAF1Qywq5UYx7TW3eLWEx3mI6KWe3fWaJxyzcemtkMA0/g
NUjRGyOvNigvSTLksZwtlT4TcZH/nduyU5PMtzLTd6htlkNFGzjgxBCgzdtIOM5U
6MOC70mP1m4zUeO/mr71eSFdAMZzpCIWF8V10KChcu31XNCqad7/nBUx/mYu8B+y
u5sC+jYKETuMqKaJ9DC1EmBU11tJr9nSX8v0nQweIqxkehDCmZ3XF0w6HlbzOkVA
wLT4p6VSbthnS/BrblK3SIgaG02MyBZghATrhywIGg24rr0wcJ0NPA==
=wptV
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/uZCscBz5udg/m/SA6PZFjnFtkJ", "n_sections": 56}, {"thread": "ukr_xvlvfVs", "msg": "Gex-zly4_RIJ", "author": "David Hopwood", "date_disp": "May 8, 2002, 11:31:08\u202fPM", "subject": "How to use RSA 'securely' ??", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Joseph Ashwood wrote:


> raimu...@yahoo.com (Eddy) wrote:
> > In quite a few posts you read the sentence "RSA is very safe if used
> > 'securely' but this is not as obvious as it looks."
> > So, my question is: What does it take to use RSA securely or safely?
> >
> > I can think of a few items myself:

> > - use a modulus n of a high enough bitlength (at least 1024 bits),


> > - use large primes for p and q,
> > - use strong primes for p and q,

Strong primes are not necessary, and there's no reason to believe they
provide any benefit.

> > - pad the plaintext message with random numbers to make the message
> > length equal to the lengt of n. But message M must be smaller than n
> > (?).
> >
> > Are there other important issues to consider to be able to use RSA
> > securely?
> >
> > I understood that it is generally considered safe to use a small
> > number for the public key exponent e (like 3, 17, 65537,..)
>
> Actually that scheme is weak in some cases. Currently the preferred
> methods are OAEP, and Simple RSA. While I'm not going to cover all the
> details of either of them (doing so takes quite some typing), the
> basics are:

I'm not sure I approve of giving just "the basics" even if they were
vaguely correct, given how critical the detail of these schemes is to
security (including details beside the mathematical algorithms, such as
the order of steps in OAEP decryption to prevent side channel attacks,
among other things).

However, what you've written actually bears little or no relation to
either OAEP or Simple RSA.

> OAEP:
> Encrypt, requires a hash function, the message is m:
> verify that the secret is no longer than length_of_hash
> r = random(length_of_n - length_of_hash)
> M = r, (hash(r) XOR m)
> encrypt M

OAEP uses two mask generation functions. This is nothing like it.

> Simple RSA
> encrypt:
> choose random r one bit shorter than lenght_of_n
> encrypt r

Simple RSA actually chooses r uniformly on [0, n), and that's essential
to the strength of the security proof in the multi-user model.

Actually, I see I've corrected you on almost the same point before
(see post below). So, why are you repeating the same mistakes? That's
something that normally only Mok-Kong Shen does. Please pay more attention.


In any case, to the original poster, I'd recommend using Simple RSA
(the preferred name for the same scheme is now RSA-KEM), as described
in version 2.1 of Shoup's ISO paper (http://www.shoup.net/papers/).

[Anyone know whether RSA-KEM is implemented in any of the usual crypto
libraries yet?]


====
In sci.crypt on 21 July 2001, I wrote:

Joseph Ashwood wrote:
[snip stuff I agree with]

> Since RSA is a likely ending position (even though it is the weakest per
> size/computation) I will recommend that you look into some of the more
> interesting ways of using it. For example encrypting simply a large random
> number (1 bit in size less than the size of the modulus) and using SHA-256
> to derive a symmetric encryption key, [...]

For this method, which is called "Simple RSA", the random number should be
uniformly distributed on [0, n-1], not [0, 2^floor(log2(n))-1]. The reason
is given in section 8 of [Sho01], which says:

# ... Quantitively, it is clear that Simple RSA provides a much better
# security reduction than RSA-OAEP+ (or RSA-OAEP). This advantage becomes
# even more pronounced when one analyzes the security of /many/ cleartexts
# encrypted under a single public key (as formally modeled in [BBM00]). In
# this setting, one can exploit the well-known random self-reducibility
# property of the RSA inversion problem to easily show that the security of
# the Simple RSA key encapsulation mechanism does not degrade at all as the
# number of ciphertexts increases. Note that this argument will be valid
# only if the number r in the encryption algorithm for Simple RSA is chosen
# uniformly modulo n, or at least with a distribution that is computationally
# indistinguishable from the uniform distribution.

Also, it's important that the derived key is used to calculate a MAC on
the ciphertext (as described in section 2 of the same paper), as well as
for encryption.


[Sho01] Victor Shoup,
"A Proposal for an ISO Standard for Public Key Encryption
(version 1.1),"
Revised May 29, 2001.
http://www.shoup.net/papers/

(Note: in equation (8) and in the corresponding proof, "nBound/q_D"
should be "q_D/nBound".)

[[I was right about this mistake; it's corrected in version 2.1.]]

[BBM00] M. Bellare, A. Boldyreva, S. Micali,
"Public-key encryption in a multi-user setting: security proofs and
improvements,"
Extended abstract in Advances in Cryptology - EUROCRYPT 2000.
Full paper at http://www-cse.ucsd.edu/users/mihir/papers/musu.html

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPNntIjkCAxeYt5gVAQFRrAf/flVOW4oGwOXOQOiot4z3UyxBAGP80io5
uQYPdq5vT+LqXO7/3l8o+B6MHern8s9B6cNWaA9Gl1319ZUzUxgvJn4XwSL8TTVm
Gx9kyME6yE/BizZNpov6npbzr9huxOgsWj8VoPF8M9aC/7h/id07t8rRi1krjeSJ
LeWwe809v6mk3q/2PXNxHTzRbCbVpODYBNhglbNc8iK+VQoDRcgVZjMe/aPzj6ms
fKuWRUAWmLxYNoiDmeiMe1YMDmVEbvY3W8XiWqChqd++42GRs/BXfv0IqGMMV0vl
psgPOGBlkvdUmfxVCGvTCrsM7S/yLp9yflWN/UDIeMP/AJJ9GCVWYw==
=UtHl
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ukr_xvlvfVs/m/Gex-zly4_RIJ", "n_sections": 4}, {"thread": "vHUatG4CgGE", "msg": "GRqFzuL5O8MJ", "author": "David Hopwood", "date_disp": "May 31, 2002, 11:47:34\u202fAM", "subject": "Cryptanalysis question on the RSA algorithm", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Francois Grieu wrote:
> In article <YDrJ8.11678$Ed1.1...@news20.bellglobal.com>,
> "Anton Stiglic" <sti...@cs.mcgill.ca> wrote:
>
> > you can prove that if e2 = k*e1 (e2 is a multiple of e1), then it
> > is secure to use both e2 and e1 as exponents simultaneously.
>
> Interesting. There is another way to look at that: in a sense,
> if public exponent e1 is secure then any e2=k*e1 (k odd and small)
> is at least as secure,

k doesn't have to be odd or small. If it is even then you have
super-encryption with a variant of the Rabin scheme (obviously in that
case there must be some way for the private key holder to recognise
the correct root when decrypting).

> because anyone that can break RSA with public
> exponent e2 can break RSA with e1 using nearly the same effort. All
> there is to do to recover a message encrypted using e1 is
> - find an e2=k*e1 for which you can break RSA
> - raise the ciphertext m^e1 mod n to the kth power mod n, giving
> m^e2 mod n
> - recover m as if for e2.

Note that this argument strictly speaking only works for ciphertext-only
attacks (or chosen-plaintext attacks, which are equivalent for PK schemes).
For chosen-ciphertext or side-channel attacks, it can't be excluded that
decryption with d2 (the private exponent corresponding to e2) leaks
different information than decryption with d1.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPPea5TkCAxeYt5gVAQHS6wgAoZ20yURXzyrC+xRmx+N2FyVTxC5+X8fi
YDuhaU826m3MTGS0Mg+SAACSiDxpYbRJ+f5G9URRR1o0RHrp8dOwllYXA/Egvibz
2ykwpFQkFfU69LToewmq4u8oLP3jVwTIqtiRuUBLmqWVHhP5GL/obZPAxDwAI1eA
VjVzm2J0y0nlMllc7meKUVa/qhOkDjSp+KDiZi++qHg1qF7GliGfvq8B4sfeGx+J
UCftPbr2/jnThTlgi3uAx5z8xTS9dr+KdasQCOnhqrc1J8kPlisceWO5o+t7j9Jx
Y29++GBWxUQxpz3EQsXuggcF1gSULo1xNsHiXt7CSkMbU4HuI7aIFQ==
=sab8
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/vHUatG4CgGE/m/GRqFzuL5O8MJ", "n_sections": 36}, {"thread": "vHUatG4CgGE", "msg": "n1vMbrZY8VoJ", "author": "David Hopwood", "date_disp": "May 31, 2002, 11:51:03\u202fAM", "subject": "Cryptanalysis question on the RSA algorithm", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Anton Stiglic wrote:


> "Gavin Brooks" <brooksgj@-nospamplease-ses.curtin.edu.au> wrote:
>
> > I'm assuming there is more than one factorisation for n. Am I wrong?
>
> n is the product of two distinct primes, how can there be more than one
> factorisation? Do you know what integer factorisation means? By definition
> factorization of a positive integer is unique.

Note that even if n is the product of more than two primes, phi(n) still
depends only on n, so the same attack still applies.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPPebxTkCAxeYt5gVAQGeQQf+LowQ9h/OqHOuEAuJQ0mypyt2viLRUdEg
DMwRr8S7lhXUp5CFNfYuyJXy5S31/e3N1wbArEp3iWvADA+jolmmqmjT4S6Y2BlZ
bIT+mZvUFFl3OKstHBnHUjPY9/AbY/+f5X4cQzHxaucBIbzph/R67Uz/X16kpEvt
tQ9q5AnatDpvUP8PdhsJmkYDIJ2io783HL31Jfa4NIwfBSbe9tJkIusFmQVWCEO7
bT9ZufEpmyoUrgj1J1GuNFD7h2Y0K1l/fAHbe96fL/hjjFw71+ka4scU32SI6Zi4
HbvAcIrrdE30xUd3WEJH5JD5hY2mWEMXslJg/GAugmlD2AyN6XDIBg==
=Pz2K
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/vHUatG4CgGE/m/n1vMbrZY8VoJ", "n_sections": 36}, {"thread": "xy1nePANv2c", "msg": "E8K9nsp7jFEJ", "author": "David Hopwood", "date_disp": "Jun 12, 2002, 12:32:21\u202fPM", "subject": "semantic security definition", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Nicol So wrote:
> Anton Stiglic wrote:
> >
> > Semantic security is equivalent to polynomial security. The definition of
> > polynomial security involves the indistinguishability thing mentioned above.
> > Look-up "Semantic security" in HAC and follow the references.
> > It's sometimes easier to work with the definition of polynomial security,
> > sometimes it's easier to work with the definition of semantic security,
> > you can use both interchangeably since they are equivalent.
>
> Polynomial security and semantic security are based on different
> intuitive notions of what constitutes a secure cipher. I'm aware of
> equivalent results for *particular* formalizations of the underlying
> ideas, but I'm not sure if the equivalence holds for all "reasonable"
> formalizations of the underlying ideas. That's why I try not to use the
> terms interchangeably.

Section 2.3 of [Dodis] proves the equivalence in a way that works in almost any
"reasonable" model. I completely agree, though, that without this proof it is
not obvious that they can be used interchangeably to that extent, and there
has been a lot of handwaving and fuzzy thinking on this point. (In particular,
Dodis' proof, only published in August 2000, is the first proof I'm aware of
that works for the adaptive chosen ciphertext case.)

> Personally I don't like the term "polynomial security"--it is not very
> descriptive. I wonder what other people think.

I like it probably even less. Advantage in the sense of indistinguishability can
be defined either exactly or asymptotically - as can *any* other security
notion. I.e. whether the definition is asymptotic is orthogonal to which
notion is being used. The term "polynomial security" is used to refer to a
security notion (i.e. indistinguishability), but it is only "polynomial" for
the asymptotic version of that notion - and any asymptotic security notion
other than indistinguishability is as much "polynomial" in that sense. IOW the
name is just plain wrong.


[Dodis] Yevgeniy Dodis,
"Exposure-Resilient Cryptography,"
PhD Thesis, MIT, August 2000.
http://www.toc.lcs.mit.edu/~yevgen/ps/phd-thesis.ps
(1.7 MByte, but well worth reading)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPQdlSTkCAxeYt5gVAQEWfQf/QjheYv5h04osK3yNZIQ/l5Iks3aCtba/
uuKJnkWt8PX4AEcp6XMf6nxN1N46Dd8xXXGm/uF/VWa8sJAoDf+1S9xVpevGdEzS
qxYgkfjZXbQPVOoH4wXMT9Dr9AKks2H+Mt5mdJLGj2bHIUvy3qwzJGadiTK0YATO
d3ZaXWOA4eLZuT01Xb2GQs6cFCVU3uIow7zDARCg35E4fAfC/AV54cegmz3lUXtq
Apwfec11FFllBIhrVPtF2z/W1INyHCZMV8EK3SSZN14yRc0y1mbyTPXuYHEmMw5V
iOjrYTuzSZPsuO4+lpriQrn9meBucsGT6KK852O7VI6mfmUGclAr3g==
=04Nh
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/xy1nePANv2c/m/E8K9nsp7jFEJ", "n_sections": 25}, {"thread": "3Ktt1mnkoUE", "msg": "RR82WNhQORwJ", "author": "David Hopwood", "date_disp": "Aug 3, 2002, 12:08:39\u202fPM", "subject": "Meyers hashing", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

AC2 says (page 448):

# [...] Table 18.1 lists the 12 secure schemes remaining: The first 4 are
# secure against all attacks (see Figure 18.9) and the last 8 are secure
# against all but a fixed-point attack, which is not really worth worrying
# about.

The statement that any of these schemes are "secure against all attacks" is
careless and wrong. They are only proven secure against generic attacks on
collision resistance and on random-target preimage-resistance [*], in a
particular model [BRS02]. Personally, I believe that model to be unrealistic
and not a adequate description of real-world ciphers.

In any case, the only ciphers with a block size suitable for this construction
that have had any analysis at all are Rijndael-192 and Rijndael-256 (i.e.
with 192- and 256-bit blocks), and those have had much less analysis than
Rijndael-128.

[BRS02] John Black, Phillip Rogaway, Thomas Shrimpton,
"Black-Box Analysis of the Block-Cipher-Based Hash-Function
Constructions from PGV" (full version),
IACR e-print 2002/066, June 3 2002.
<http://eprint.iacr.org/2002/066/>

[*] Random-target preimage-resistance (definition 2.3 in [BRS02]) is a weaker
property than standard preimage-resistance.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPUv60jkCAxeYt5gVAQH4ygf6AncN8wspYwE6+dJ6yetlnl2Hss7RpmWu
1hqFuxUuU2iHwjlRhSPzCy0DiG0rPijWjdQl1G9i4FAMFWT6fXDP5m7/4Jc7yy2C
m5X8kZeOmJY09RWLZz/OuhxhXO1NWUtHVpHWHepT1n76aSPuJ+YPukfkeaA6m2/A
3PGjVrUNyIZWUITOAd+Cek08L9pqXU858LuIFzRX0W+Alxyq7LbnuBK3xkFKug/E
Yven5V539YmbTn6OQ1zTqp5jVqZ1eUpHv5kLr9oOViPnqCxADKdCtsQ01NmBo9OW
NE9/JPNUNSgH2WnFpumWImVyl6Dhd8QeNZ9c1U83YI7ZBy9DfCZNSg==
=2x3o
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/3Ktt1mnkoUE/m/RR82WNhQORwJ", "n_sections": 13}, {"thread": "3Ktt1mnkoUE", "msg": "MtRy61FvhIoJ", "author": "David Hopwood", "date_disp": "Aug 4, 2002, 8:50:10\u202fPM", "subject": "Black-box analysis of cipher-based hashes", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Richard Parker wrote:


> David Hopwood wrote:
>
> > The statement that any of these schemes are "secure against all attacks" is
> > careless and wrong. They are only proven secure against generic attacks on
> > collision resistance and on random-target preimage-resistance [*], in a
> > particular model [BRS02]. Personally, I believe that model to be unrealistic
> > and not a adequate description of real-world ciphers.
> [snip]
> > [*] Random-target preimage-resistance (definition 2.3 in [BRS02]) is a weaker
> > property than standard preimage-resistance.
>
> They do include a proof, for the generic attacks addressed by the black-box
> model against the 20 hash constructions under consideration, that the
> difference in advantage to the adversary due to their weaker definition of
> preimage resistance is at most l/2^(n-1).

[Actually \\ell / 2^(n-1) where \\ell is the input length in bits.]

> So while their definition is weaker than standard preimage-resistance, its use
> doesn't appear to significantly prejudice their results.

You're right, I had just skimmed the paper and missed Appendix B. Adv^owf is
a reasonable definition of preimage-resistance (although I'm not sure why
they call it OWF; that's something else).

> This doesn't address your concern
> that the black-box model is not an adequate description of real-world
> ciphers, but maybe the results of Black, Rogaway, and Shrimpton will inspire
> someone to build a proof in a more conventional model (namely one that
> assumes E is a PRP rather than an ideal cipher).

That's not possible for at least 16 of the hashes. For each of H_{5..20}
(numbered as in [BRS02]), there is a property that could be true of a PRP or
SPRP, and that gives a counterexample to collision-resistance:

For H_{5,10,15,16}:
E_{m_i}(x) = E_{m'_i}(x) (equivalent keys)

For H_{8,11,13,19}:
E_{m_i}(x) = E_{m_i XOR c}(x XOR c)

For H_{7,12,17,18}:
E_{m_i}(x) = E_{m_i XOR c)(x) XOR c

For H_{6,9,14,20}:
E_{m_i}(x) = E_{m_i XOR c)(x XOR c) XOR c
(for c = all-ones, this is the DES complementation property)

In each case, there only needs to be one known pair of keys for which the given
relation holds, and it does not necessarily need to hold for all plaintexts.

For H_{1,2,3,4}, the situation is more complicated, so I'll post this now and
discuss those in another post if I have time. (I'm pretty sure that H_{1..4}
also do not have standard model proofs of security, although it may be more
reasonable to use the black-box model for these than for H_{5..20}.)

> I have the same sort of reservations about their black-box model as I do
> about the random oracle model - namely that, simplistically, they both say
> something like "if the primitive is perfect, then the construction is
> strong" rather than "if the primitive is strong, then the construction is
> strong." In both models the possibility exists that a subtle attack can
> exploit an otherwise unremarkable feature of the underlying primitive to
> devastating effect. However, I suspect that if an attack were found on
> Matyas/Meyer hashing constructed from AES that, rightly or wrongly, this
> would likely be interpreted by the cryptographic community as a weakness in
> AES as opposed to a weakness in Matyas/Meyer hashing.

You're probably right, simply because people are looking for even the tiniest
weaknesses in AES. However, its key schedule has still had much less analysis
than the rest of the cipher. Also note that it it's quite likely that
Rijndael-256 would be used for Matyas/Meyer hashing, instead of 128-bit
block AES.

In any case, such an attack would probably be the final straw for
Matyas/Meyer, as well as being considered a weakness in AES.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPU3K4DkCAxeYt5gVAQFSVAf/aixgp41W3N1Zaa+xoYbRc0K7LMzqqL5w
2U5yNF/eHa9NjznUo0NPWAfLUx9tKWiotYI0X7z3aVcxhBkHINTTMAn1Zyjr5tfc
wDBcazx/Vs3pYEYYNntUM6Ly6+rA05rboD1NSdFYqbnqMAuAwNYm2slqBm35e9ac
FESCMJNQFfLNw9QMs2qjldaF5aAtZiCtW4BuX4BCdB58r6ZoobLmul4RwZB7sCdS
S+x609kQErEG9GDyeSPnw7DUnWtEHBnGOlU1X019p2r0lVT3ZCVlW0n06O/WjcDM
2KEdyLnaJhdNU4+YgQRSB4CM0Os1RamZOlKvYS5EqkNs53Qp68C1jA==
=1Q7F
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/3Ktt1mnkoUE/m/MtRy61FvhIoJ", "n_sections": 13}, {"thread": "4MqYagwWHrM", "msg": "H7HHMt25D-YJ", "author": "David Hopwood", "date_disp": "Aug 19, 2002, 2:34:07\u202fPM", "subject": "SHA-1 signing & padding (EMSA): is padding mandatory ?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Axelle wrote:
> Hi,
> I've got a question regarding signing in regards to padding to apply
> first to the message to sign.
>
> - I understand that PKCS#1 v2.1 _suggests_ use of
> EMSA-PKCS1-V1_5-ENCODE (/DECODE) on the message before signing.

No, the only options that the standard says are "suggested" are hash
functions and mask generation functions.

> Is this mandatory for _all_ people that wish to perform signatures ? or
> is it only mandatory for people that wish to follow PKCS#1 v2.1 ? or
> is it just a suggestion ?

PKCS#1 v2.1 specifies only two (parameterised) signature schemes:
RSASSA-PKCS1-V1_5 and RSASSA-PSS. EMSA-PKCS1-V1_5-ENCODE is mandatory
for the former, and EMSA-PSS-ENCODE is mandatory for the latter.

In general, the requirements of any technical standard only apply to
things that are intended to conform to the standard.

> - If this padding is not mandatory, then how does one know if a
> signature has been done using the padding or not ? I mean, the OIDs of
> algorithm say "Sha1WithRSA", but then do not say "EMSA-Sha1WithRSA"
> for instance ?!

The OIDs with names that include the name of a hash function all imply
RSASSA-PKCS1-V1_5.

> - If one performs a SHA-1 signature of a message that is not padded,
> are there security risks at stake ?

Yes. The scheme that applies RSA to a raw SHA-1 hash (called "PKCS#1 type 0"
in previous versions, but not included in v2.1) is broken in the following
sense: if the attacker gets access to an oracle for the RSA private key
operation, then it can obtain sufficient information to allow it to forge
"type 0" signatures after its access to the oracle is lost.

To get security that is provably related to that of the RSA function, use
RSASSA-PSS.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWEoijkCAxeYt5gVAQFzVAf+LMRh6jA2Yvw7pV6baf6fWrzCWcR8WiG6
1ZbzoyhbpSIG4I9o0euEFGIJiqhXaWVctnItibilarj6oKeL6lAU0dPPyrwSTnir
IJbX7CatOJYoE+sNQe4uIu5frifXM0CFoQzTYPMoD6uL3DLxmIkAhOQ4zfzs7nN4
oWqB6A64uoTfokgWPvQ2xbhq2278vD6F42sTkrjB4sq8Q4RIS1E0kbpSHzOGcwmf
ze14nXmT9mRwvCNt4HEwHQxa684wkJ2GkVhCJs0FO06ven32RHoyBkfjvgc212Lr
NmTEHelCX8ZinJbPy105I+Rog4j3NtVbQTzY3o1Q0vS1swoPh2mGuQ==
=N/b+
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/4MqYagwWHrM/m/H7HHMt25D-YJ", "n_sections": 4}, {"thread": "5ZTuFycCcKg", "msg": "vwTZr206qe0J", "author": "David Hopwood", "date_disp": "Aug 11, 2002, 6:43:48\u202fPM", "subject": "``PRIMES is in P''", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Bernier wrote:


> David Hopwood <david....@zetnet.co.uk> wrote:
> > Zhan' Zhon'-Pyon' wrote:
> > > Origin: <http://www.cse.iitk.ac.in/news/primality.html>
> >
> > What is the largest prime factor of 1? I wasn't aware that it had a prime
> > factor.
> >
> > I'm guessing that this is what is meant:
> >
> > if (n is of the form a^b, b > 1) output COMPOSITE;
> > if (gcd(n, 2) != 1) output COMPOSITE;

[Actually the last line above can be omitted, since the loop over r will
always reach r = 4 and then return COMPOSITE if n is even; it cannot break
at r = 3, because 3-1 < 4.sqrt(3).(log_2 n) for all integer n > 1.]

> > r = 3;
> > while (r < n) {
> > ... (rest of algorithm as in the paper)
> >
> > Is that correct?

I'm now sure that it is.

> Before Step 1, we have:
>
> ``Input: integer n>1"

Yes, but the problematic step was "let q be the largest prime factor of r-1"
when r = 2.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPVboZTkCAxeYt5gVAQEr7wgAmWp2Wc6efjrfDPd/9CBcWwIBks597ut5
oAJEx4ntDqmLXo6+HkTgThQModRrK8MC/RpzgSVpHYg7R2k3mcXWjJFCXyp9TuQ2
QpaGqY5HC8ff4oD4VqmIaQG2cXqpTdisfFR7wpu9PvHTqzw3qV0gP/R+ZLmYb0MP
+hY0otEHGy6/IU00TonC2LIhxcoX6On3i4oSpShkL7OOnng2Gx0mcLHMSB3rGjNE
z4a9BImfkZLhlpcNvya2v3md/jHa6Jg6lqu11ThzpNwg726hm3aPonbo07CHRWqT
KT+PRbAFQChW0QyM10EMeuI7eOoDva1pt5tLMi5nQNYwYXPkMUINvQ==
=u5kK
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/5ZTuFycCcKg/m/vwTZr206qe0J", "n_sections": 40}, {"thread": "5ZTuFycCcKg", "msg": "8MsFiAr2oWAJ", "author": "David Hopwood", "date_disp": "Aug 11, 2002, 8:44:40\u202fPM", "subject": "``PRIMES is in P''", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Chip Eastham wrote:
> > David Hopwood <david....@zetnet.co.uk> wrote:

[...]


> > > I'm guessing that this is what is meant:
> > >
> > > if (n is of the form a^b, b > 1) output COMPOSITE;
> > > if (gcd(n, 2) != 1) output COMPOSITE;
> > > r = 3;
> > > while (r < n) {
> > > ... (rest of algorithm as in the paper)
>

> Technically [the above] fix is wrong for n = 2; his interpolated step


> should perhaps be:
>
> if (gcd(n, 2) != 1) output ( (n == 2) ? "PRIME" : "COMPOSITE" );
>
> to use a bit of C syntax.

Oh, good point. Alternatively, omit this step and require n > 4.
(The argument I gave in my previous post as to why it can be omitted
was incorrect for n <= 4. Possibly the algorithm would give the right
answers for n = 2, 3, 4 anyway; I haven't checked.)

I wrote:
> > > Is that correct?
>
> I'm now sure that it is.

For suitable values of "sure" ;-)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPVcEaDkCAxeYt5gVAQF3JQf/WX1oBYBTrsci0eifZlUCU0EZDsXWkY1O
9Il10CdEC/HggU3sAgYlT6acKIhotTNkQjlAkxDyt3s9MZKglQT9FdNDjYxzTMsW
W6Ulj8Kd1IM60l7HV8Mm3NUiPmyWPZwg4BnsYeVmEfMsXMq44jLM4sr32K/ZmT7x
hUrfxgQTCdlEPhjLVjumuRQCIazrcGWP0JbL1S1DkDHfJ88zI+sGPwXHT7vwad4K
JruUKvwWwG0HkB/5mHVTxWM4dHfSxcuZiMgKTdchi0aPHUHcmt2WiHu/X121K/Iu
ubmZG52V/urEU5pOzUhdRQBDaSxM3yGg0JzEuhvBgc6Zn8SeDuioIg==
=QZE4
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/5ZTuFycCcKg/m/8MsFiAr2oWAJ", "n_sections": 40}, {"thread": "8w3z4rZ-HVg", "msg": "GiRRrd6loysJ", "author": "David Hopwood", "date_disp": "Aug 28, 2002, 10:47:28\u202fPM", "subject": "Synthetic languages (was: Is Voynich MS Christian holy text?)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"John A. Malley" wrote:


> Edward Elliott wrote:
> > See The Silmarillion by JRR Tolkien.
>
> What a great example! But, Tolkien was influenced by his knowledge of
> Old English - I thought he patterned the elven tongues on it. So your
> example is more of a derived (but still manufactured) language.
> Esperanto is another example of a derived language (heavily influenced
> by Indo-European tongues IIRC).
>
> An example of a totally synthetic human language is hard to find.

Blissymbolics.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPW2LHTkCAxeYt5gVAQHFdwf9GT8CBTBTD1O5NL+wsP9ZMq0ErcL7dpVv
W4qp2GUszvwt+T/LekivAp3ZN3lnR0bNYb1Tz1RDnrxOc/uG6ukzxijAsQAzGLsg
Ek/G5+ST3/fq9TaNmMAmReFajtsJuk54gLrezso6d48JFW625580s+Uj6e+08/c+
SzUruhuc4Wp8dZooKMOOj+bNYIEfytT3WRnBl+A/dzyAAvisVvy+qcvWtoCGY7xu
/QnRaurvdzCJkxIihmi2CNCrP6/rxzsJgfxWIIARA/JQCtpno7XdS9D3V7vSpinc
zYs6X38tO9QcUaDsx2Hd2XhqMV34rmFNROUIrHubsEaW5eeGp0VfDA==
=YErB
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/8w3z4rZ-HVg/m/GiRRrd6loysJ", "n_sections": 40}, {"thread": "9LTN2y4xVGA", "msg": "9XJt44K4zI8J", "author": "David Hopwood", "date_disp": "Aug 23, 2002, 6:24:12\u202fPM", "subject": "Stream ciphers for rand() (was: one time pads easily breakable?)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Ursus Horibilis wrote:
> The built-in PRNG in MSVC++, rand(), is a 16-bit (!!) linear congruential
> generator. If you'd like to see how bad it is, step into it using the
> debugger.

I don't know why C libraries don't use stream ciphers for this (other than
inertia and an incorrect perception that they are slow). For example,
WWNFSR would be faster than an LCG - although for rand() the RNG performance
is probably swamped by the function call overhead anyway.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWa1mjkCAxeYt5gVAQFyAwgAs8G1cJpzY77zyvOVxj73xQved4KG7NSI
ro3SbEpqXwfWGP921Rm0HDywbSaXgklrZXstQ1EyKg6ycqBG+4ll7CXU2GSeALZ0
Gbg2t8ZFVZLeEXAWcDLhngrafdTqrW3RRmJYQLazk4oOEMmRYbw5Z9HuRTtEKocj
bXbjANFpq34ZLIVkKEzcBKEtR3dvplv+u6UR9o68td6WiKRDOBEjfvh9vnqLKG18
Zv7sj43jDBqLIQJXK4bGl5ZyHG7GKx66DvUjbp5HIB4p5gmqGvkKBwZYrOHbNjlw
NrxakM+wkhGfVe0YFbrJt+Y/zYeorfvRpSPPxCjKSCQ8aLKa9wBiOA==
=dNyM
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/9LTN2y4xVGA/m/9XJt44K4zI8J", "n_sections": 64}, {"thread": "ANzpkr-XQAk", "msg": "_jlIbj7FVDcJ", "author": "David Hopwood", "date_disp": "Aug 26, 2002, 4:05:38\u202fPM", "subject": "Key wrapping", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Maybe I'm missing something, but isn't the security property required for
key wrapping just symmetric IND-CCA2? That's certainly sufficient, and it
is almost necessary (you could probably get away with the slightly weaker
version of IND-CCA2 described in [Shoup01] that allows "benign malleability").

So, why are people designing obscure special-purpose schemes for this? I'd
just use Encrypt-then-MAC. (How to derive the encryption and MAC keys from a
password, if necessary, is a separate issue.)


[Shoup01] Victor Shoup,
"A Proposal for an ISO Standard for Public Key Encryption
(version 2.1)",
Revised December 20, 2001.
<http://www.shoup.net/papers/>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWqJDTkCAxeYt5gVAQEi9Af9F2ikAWPzqlg7ricYAKpKw6kCzGkHWfPR
0HLt+dQ+3i9ku9SWzXzGx/pNVUZGZaW9dWP/ztmqIfrAiMLg7axkH5g/NL0y5s/7
aetfakg2AZM5a2JbXcHwaWm9yVVB8miu2RtKgsSUN9FaWtnK62Co46xYb3S6SKGB
+unZW+CaLMqHiPFNIUXCUt3uiZtE7tcNWyzTVHFLjHkKbQhjTM9KhcYzUXeTzJ7q
+KP0rPnbtQQsxF+wWeL2PWuSfMVzPouhhlMdE27w/YvRA6NahExA6K3hv3MfzVIB
e8V6sSbNuepAkgv4XdQE923G35nb/W0eVt04LKnB/VRMVSHQOt+IaQ==
=e5TX
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ANzpkr-XQAk/m/_jlIbj7FVDcJ", "n_sections": 55}, {"thread": "ANzpkr-XQAk", "msg": "UZDJmHHWV58J", "author": "David Hopwood", "date_disp": "Aug 27, 2002, 5:27:29\u202fPM", "subject": "Gutmann - theory vs practice", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Peter Gutmann wrote:
> [One problem with designing a key wrap of this kind is that there are
> different (and opposing) criteria depending on what you want to do. The
> design rationale for password-based key wrap won't apply for all situations,
> in particular in this case you don't want 100% detection of manipulation but
> just enough to weed out mistyped passwords without making it easy to perform
> a dictionary attack.

The attack will *always* be able to do a dictionary attack, if not by using
the key wrap redundancy, then by checking whether the recovered key decrypts
some ciphertext associated with it. There is no benefit to weakening the
manipulation detection in an ineffective attempt to prevent this.

Also, the passphrase-based KDF is logically a separate component. The things
that need to be standardised are:

- Data Encapsulation Methods (like a symmetric encryption scheme but
optionally with a nonmalleable 'label' input, which need not be
recoverable from the ciphertext),
- Passphrase-based KDFs (with salt, and able to be slowed down by a
variable amount),
- VIO-PRFs (PRFs with variable-length input and output, which can also
be used as KDFs).

A variable length SPRP would also be useful, but I'm not sure we know how to
do that provably and efficiently yet.

Here are my suggestions:

[define I2OSP(n, k) as a k-byte big-endian representation of n]

- for a DEM, use DEM1 from Section 10 of [Shoup01]. This is the same
as Encrypt-then-MAC except that it applies the MAC to
(ciphertext || label || I2OSP(8*length(label), 8)). It's compatible
with the use of symmetric encryption in P1363a.

- for a PBKDF, I suggest a minor variation of "bcrypt", which is the
OpenBSD password hash [PM99].

Two other obvious candidates would be "IteratedAndSalted" from OpenPGP
(section 3.6.1.3 of RFC 2440), and "PBKDF2" from PKCS #5 v2.0 (section 5.2
of RFC 2898). However, both of those have the following weaknesses:

- the computationally intensive part is repeated for each block
of output required (say n hash outputs). This means that an attacker
doing a dictionary search will gain an n-times advantage relative to
the optimum.
- unlike bcrypt, there is no attempt to make the hash difficult for
an attacker to optimise for a hardware-based keysearch machine.

To use bcrypt as a PBKDF, run EksBlowfishSetup to set up a Blowfish key
schedule (it might seem inelegant to use a Blowfish-based algorithm to
derive a key for a different encryption scheme, but IMHO that doesn't
matter). Then use CTR mode to get a variable-length hash output (note
that this gives a result that is unrelated to the hashes stored in
OpenBSD password files, even if the same password is used).

- for a VIO-PRF, use HMAC-PRF defined as follows:

HMAC-PRF(hash)(key, seed) =
HMAC(hash)(key, I2OSP(0, 4) || seed) ||
HMAC(hash)(key, I2OSP(1, 4) || seed) ||
HMAC(hash)(key, I2OSP(2, 4) || seed) ||
...

This is obviously a PRF if HMAC is. To use it as a KDF, set seed to the
zero-length string.

Alternatively, use one of the KDFs from [Shoup01], applied to (key || seed).


[PM99] Niels Provos, David Mazi\u00e8res,
"A Future-Adaptable Password Scheme,"
Presented at USENIX '99.
<http://www.usenix.org/events/usenix99/provos.html>

[Shoup01] Victor Shoup,
"A Proposal for an ISO Standard for Public Key Encryption
(version 2.1)",
Revised December 20, 2001.
<http://www.shoup.net/papers/>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWvuaDkCAxeYt5gVAQHAAAgAjS4u72aKsvNkqCqYCkqwtglfCqx7xx2F
3n7LRFN1Ie5L9uIg4uHmKE0w65S1Qki0HOkg/Bw+skM0JPw6fhHLUAMSHTCeDA+r
jF27ScXjOnjSb+pkta9alteKyaCuQEb9XdfDz9qfZb2eQJs+24pGbuUSJ76h2L1P
ZpBvyQusmrCCSmv1ebgyQvGkw+ze4tfJ7pm4PyNoTYDqzxwCRvcyljMaNIESesmw
G42Lyy6BCdxBIzSzOWC3+0HBIaFUZ1RYBNedxsNATTAIR9H6FHs1P/f9jlsxDCd4
d8NBHJBf8OiGpeQzlk3mI26plgLyS2Sa1x3Vgci/CpMgXEDvJKNNkg==
=3o7k
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ANzpkr-XQAk/m/UZDJmHHWV58J", "n_sections": 55}, {"thread": "ANzpkr-XQAk", "msg": "cuYThr67HwQJ", "author": "David Hopwood", "date_disp": "Aug 27, 2002, 5:31:31\u202fPM", "subject": "Key wrapping", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Richard Parker wrote:
> David Hopwood at david....@zetnet.co.uk wrote on 8/26/02 1:05 PM:
>
> > Maybe I'm missing something, but isn't the security property required for
> > key wrapping just symmetric IND-CCA2?
>
> Technically I think you'll also want INT-PTXT,

Yes. (Of course Encrypt-then-MAC implies both.)

> but I get your point. I too
> suggested the use of Encrypt-then-MAC as a key wrap algorithm in my original
> post. Interestingly, the proposed NIST key wrap algorithm specifies a
> "default method" that is deterministic and stateless, so it doesn't meet
> IND-CPA, much less IND-CCA2.
>
> > So, why are people designing obscure special-purpose schemes for this?
>
> I don't know. NIST hasn't disclosed the rationale behind the design of
> their key wrap algorithm, so I don't know what constraint led them to
> believe that a standard encryption scheme like Encrypt-then-MAC was
> inappropriate.

I'll send them a comment suggesting to replace it with Encrypt-then-MAC
(or DEM1), then.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWvvojkCAxeYt5gVAQFXbggArfyX/KkhZqcb+3U4jIrZGRwmHqebdCKV
A4heEfEz8evKsit6vydRgrxOIBXkZCUzhaeRYgjCgqkng60Qy2KA5OmRjpK9+QNl
Iy9HoE+YEMbJanc7l9CJ4akJznjOAeJqDMdvPpksE81uc5jaQRVC/sh3l8gh2jHj
6//Acz6Eqt8zYCapvbF1ZJ30uFP15BXjY9OY/izg1DZmKWSTfISh7Db4ZDhT70XC
CF8tBiYTRld5kGc46fOoEyFCjO5OPTaUsPNUoYJ+eXBBf6VB8XKqDbZALxtLTX+g
Gnu5waKfj3saSZTaGrdRZx8TENxl+UfeenwjAITr0TdEqhFxba9BmQ==
=51s5
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ANzpkr-XQAk/m/cuYThr67HwQJ", "n_sections": 55}, {"thread": "ANzpkr-XQAk", "msg": "RKZgZMKa-mwJ", "author": "David Hopwood", "date_disp": "Aug 28, 2002, 10:15:03\u202fPM", "subject": "Gutmann - theory vs practice", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Richard Parker wrote:


> David Hopwood wrote:
> > - for a VIO-PRF, use HMAC-PRF defined as follows:
> >
> > HMAC-PRF(hash)(key, seed) =
> > HMAC(hash)(key, I2OSP(0, 4) || seed) ||
> > HMAC(hash)(key, I2OSP(1, 4) || seed) ||
> > HMAC(hash)(key, I2OSP(2, 4) || seed) ||
> > ...
> >
> > This is obviously a PRF if HMAC is. To use it as a KDF, set seed to the
> > zero-length string.
> >
> > Alternatively, use one of the KDFs from [Shoup01], applied to (key || seed).
>
> I prefer your VIO-PRF based on HMAC to the VIO-PRFs constructed by applying
> one of the KDFs from [Shoup01] to (key || seed).

So do I - consider the latter suggestion withdrawn.

> Used as you describe I am concerned that Shoup's KDF1 and KDF2 would be
> vulnerable to extension attacks on the seed since they use the "secret
> prefix" method to key a hash function.

Yes, technically this breaks KDF{1,2,3,4}(key || seed) as VIO-PRFs.

> A minor point for KDF3: to use KDF3 as a VIO-PRF it is best to use
> (seed || key) instead of (key || seed). It uses the "secret suffix"
> method so it would be vulnerable to collision attacks on the plain hash
> function.

Agreed (also for KDF4). HMAC-PRF is a better idea anyway.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPW14fzkCAxeYt5gVAQERkQf/eW8zEDJRYXCueQkulyQJevIZ58D6EdoD
Vpukaee/zRJHe7tQnqMBPcu8ze3wynzYhGnOHyRDCBzoT97STPJsCqDvAYEZi0w+
R/grtD5StNgKI0iGNlx5IEMKBj74WEJGpW0iGEQHP9tjnk9mWbTrRi6QNUEdoWOl
tsbh6lS0h+0Bj29wnVph1GgJcUusOrbVyUKn8laSLFqmBoa/NVVc/b90obijhf8G
/Vw7tovyVLp2hgBmdPoUGz5bfRqaushjkbDh9j6i4CLIFrLWjYCvmINNuSjHpzr9
m8vEd4vSg49+ERIOwUgIkJaZiPSG8wc/6lik+MODijkCiOsJW0ANyA==
=Xphw
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ANzpkr-XQAk/m/RKZgZMKa-mwJ", "n_sections": 55}, {"thread": "ANzpkr-XQAk", "msg": "zToDy4SafPMJ", "author": "David Hopwood", "date_disp": "Aug 31, 2002, 4:14:45\u202fPM", "subject": "Gutmann - theory vs practice", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Peter Gutmann wrote:
> David Hopwood <david....@zetnet.co.uk> writes:
> >Peter Gutmann wrote:
> >>[One problem with designing a key wrap of this kind is that there are
> >> different (and opposing) criteria depending on what you want to do. The
> >> design rationale for password-based key wrap won't apply for all situations,
> >> in particular in this case you don't want 100% detection of manipulation but
> >> just enough to weed out mistyped passwords without making it easy to perform
> >> a dictionary attack.
> >
> >The attack will *always* be able to do a dictionary attack, if not by using
> >the key wrap redundancy, then by checking whether the recovered key decrypts
> >some ciphertext associated with it. There is no benefit to weakening the
> >manipulation detection in an ineffective attempt to prevent this.
>
> Yes there is. Consider the (unfortunately far too common) case of someone
> using the output of a single pass of SHA-1 over a password to encrypt a
> private key.

So don't do that. Passwords should always be well-seasoned with salt and vinegar
(vinegar = a computationally intensive hash).

I mentioned two half-decent PBKDFs (IteratedAndSalted and PBKDF2), and recommended
another one (based on bcrypt) in the same post. If a designer doesn't pay attention
to choosing a secure PBKDF, he or she probably won't pay attention to choosing a
secure key wrapping scheme either.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPXBzNzkCAxeYt5gVAQE5Kwf/VILvwNvMmL04hC7kxEuV9M7WqSc2ze5y
4PupAQCHorbuNOBFqIJw+c8bdPZChRYg7Zgxz5Y9PJEAZj53n1mEcskvBdv+8W6S
ii319Ahv78vr4uuACpzJdzLWcGZL3GQ09JJLbv5W31272DT2Zp9vecmwfEzRCG3H
N+Pacx8J7O5e3kcdOZERTwLOUY5ivMP28kVOESzsr7Y625LY30zTPhu0YhFaOX3H
30Zre/vvdOuwESNPRyRLDNGElj9eav8GmAxVH8z8GeB6xzIBwWcWA7r8C+KAaqEY
90+YMdeozmhVt1O0shT/kB7RpJuaxmfvN4lhhcGfYejVoX5bqxa9PQ==
=OXjz
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ANzpkr-XQAk/m/zToDy4SafPMJ", "n_sections": 55}, {"thread": "B2JQ6tffYGo", "msg": "xWrLV-x61QYJ", "author": "David Hopwood", "date_disp": "Aug 26, 2002, 4:32:15\u202fPM", "subject": "old public key papers in electronic form", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mads Rasmussen wrote:
> No doubt I can get the DH paper at a university library

It's at <http://citeseer.nj.nec.com/340126.html> (without figures).

On the subject of early (1970s) papers on public-key cryptography, the
original papers on RSA, the Rabin cryptosystem, and the work of Ellis,
Cocks and Williamson at CESG/GCHQ, are also on-line:

<http://citeseer.nj.nec.com/rivest78method.html>
<http://hdl.handle.net/ncstrl.mit_lcs/MIT/LCS/TR-212>
<http://www.cesg.gov.uk/publications/index.htm>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWqQJTkCAxeYt5gVAQHpQAf8Dtzr2s6jCQdDesGGWMZvwlBLiOVy4bVT
+BQzmLlxTUxwlADyrKCDGNY6FDMqYktHmjuV6aF+uQS3xpJyHZbyKuVIAxkle1ps
O0VDTfn4FFScll25hUvQJTvpWEwve+aDmtGaUDDk5btPdcaW6oVYXge4o3O0kK5w
36NBlBygE10kyfOglGNVRzTlcyPrif6lEEl3KD3wugCwvUKdRvJ+10iIOCq65aUi
E/mQQLOgNamH5F7tP4ZQFIGHHa6MABml/6snyborVNljH5gSzrpqM0hybL0zwo90
ik52Vgp3aMSccMkMwAOgN9z/01PSrJPMOMKL3TAg2Kcs6J4UJ8v5ug==
=Tv0+
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/B2JQ6tffYGo/m/xWrLV-x61QYJ", "n_sections": 5}, {"thread": "FoUVbMISTpk", "msg": "COhm-gh_0CMJ", "author": "David Hopwood", "date_disp": "Sep 22, 2002, 9:11:20\u202fPM", "subject": "simple cryptproblem", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

zhor wrote:
> how can we solve this problem?
> We want to create a random bit string the length of the key, XOR it
> with the key, and send the result. A partner XORs the incoming block
> with the key (which should be the same as your key) and sends it back.
> If what you receive is your original random string, you have verified

> that your partner has the same secret key, [...]

No you haven't. If an attacker knows the XOR-difference between your
key and your partner's key, then it can easily make the check come out
correctly.

(Why might it know the XOR-difference? That depends on what protocol was
used to agree the keys. In any case the point is that you haven't
confirmed that the keys are the same.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPY5qJTkCAxeYt5gVAQGT3Qf/RtQehmkFuW9GKaBPCpVfptBDUQdYk9Ci
LBJnXpVIbqHZ/SsMk+qo8rqHn7+5SdVDuZm3GR9wrlLjpHgLwd+5ALkUOE1NExwA
BaxqyZy8TzCMa32fKq30ErHds0AHUMU2evS3IGb4aGspKvqKXT/dRkiaZGuCN/jg
TnqPOjY8gfD2XHNGy4hb/akuh337yvKShFN6oL7THQBeqFmWbJlLerRL+EKh7GTG
F1h6Vl6g1vXJqIkh/a3vgtSND56UHoWqebtJUGqG4QuGjx7f+CiYBaokOkCFHmeK
1wdFGysfrXY4K4MjHi6isbsurBjth2a8kw0M3dbZxX9K8ZyKoM4YMQ==
=DzWu
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/FoUVbMISTpk/m/COhm-gh_0CMJ", "n_sections": 5}, {"thread": "FoUVbMISTpk", "msg": "0tzLk6cEhT0J", "author": "David Hopwood", "date_disp": "Sep 22, 2002, 9:19:36\u202fPM", "subject": "simple cryptproblem", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Hopwood wrote:
> zhor wrote:
> > how can we solve this problem?
> > We want to create a random bit string the length of the key, XOR it
> > with the key, and send the result. A partner XORs the incoming block
> > with the key (which should be the same as your key) and sends it back.
> > If what you receive is your original random string, you have verified
> > that your partner has the same secret key, [...]
>
> No you haven't. If an attacker knows the XOR-difference between your
> key and your partner's key, then it can easily make the check come out
> correctly.

Oops, I stopped at the first attack and missed the much easier one.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPY5sETkCAxeYt5gVAQHllwf/T3PnNIGERE3xl3qZv59ck+Gr4Csja64M
IuoRy6bZEZ9HEReKX1S2QQUe5ikKMRHjBCoB73XysesL3fYooBqhZWKKGyocxb++
5L4WFB36pU/pmYU26JpuRoQFD6B2UYDE0o1FsWk0kfOFS5mH3KsX3nP/t0waaNnW
px2wpVc+9wwOxw97ReLhU/biRMLrXEuI4UHEDGOaWS+hdrIZUgu1pJxshZ/qDimf
jFCL5hoyw8lj0qYwv/nERf9PG5EN7p9pZbBSNSHmR4Mu8WJ8xr0ioaEjOohbHYeq
hYo+hOG24EQRVtD0HVS25NJTzlIs7/ZTT3ClbPIBpcE8r4X7K36Txw==
=JQS3
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/FoUVbMISTpk/m/0tzLk6cEhT0J", "n_sections": 5}, {"thread": "JVKQOq8TowQ", "msg": "CCXZW7i5c3sJ", "author": "David Hopwood", "date_disp": "Aug 24, 2002, 2:25:53\u202fAM", "subject": "Security of OAEP-RSA against chosen ciphertext attacks", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Peter Krener wrote:
[big snip]


> So I do not understand why it is secure against chosen ciphertext attacks,
> because:
> 1. Evil get c=w^e= (m||0^k1 XOR G(r)) || (r XOR H(s)) after the decryption.
> 2. She defines c1=c*s^e
> 3. She gets m`=c_1^d mod N=(c*s^e)^d

No, she doesn't - she gets INVALID (* in your notation) from the decryption
oracle instead, because c_1^d does not have the required redundancy.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWcmezkCAxeYt5gVAQExdQf/Y5YLcmD+97xx+1fPe4qMMfjoRKOYN2uR
ulY6zKwdkVgaS8Zc+/x13aQgOwqwpV03/XJz1IaH02ILpSSEngVpXM/hVGb7q8kW
u1i5gn/L5Z+0cx8Pbhc+ZtiFvcQVzNo45CGzcAzAIXnEwS/TtbTlnAwC+JS7zrEu
GchqaBXLyIXHmzHvAuwGQXMb2TFt/sBmr+OB/JxnFSjh7VdyVWFYgUq2JrfHR05U
rCzC2BFm2IqB/VO1J3yYlTQDDojMF1jSsyiGanqWxxJppPWghAjTkZkP+4WIVdFD
nNpPLbUh/WezDMPVimqTDW4SPA8FdT0e6SR6Ske13mBfazmKfhNsdw==
=6ph/
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/JVKQOq8TowQ/m/CCXZW7i5c3sJ", "n_sections": 6}, {"thread": "Kf9lQrxUBaE", "msg": "uuQy7VmyXOwJ", "author": "David Hopwood", "date_disp": "Aug 17, 2002, 4:55:29\u202fPM", "subject": "GOST white paper?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

martin vesterlund wrote:
>
> Someone who knows were I can find a white paper, in english, for the
> Russian algorithm GOST in plain text, pdf or HTML?

- From <http://www.users.zetnet.co.uk/hopwood/crypto/scan/>:

[Def] GOST, Gosudarstvennyi Standard 28147-89,
"Cryptographic Protection for Data Processing Systems,"
Government Committee of the USSR for Standards, 1989
(in Russian).

[Def, Inf] Bruce Schneier,
"Section 14.1 GOST,"
Applied Cryptography, Second Edition, John Wiley &
Sons, 1996.

[Inf] J. Pieprzyk, L. Tombak,
"Soviet Encryption Algorithm,"
Preprint 94-10, Department of Computer Science, The
University of Wollongong, 1994.
ftp://ftp.cs.uow.edu.au/pub/papers/1994/tr-94-10.ps.Z

[An] Markku-Juhani Saarinen,
A chosen key attack against the secret S-boxes of GOST,
http://www.cc.jyu.fi/~mjos/gost_cka.ps

[An] C. Charnes, L. O'Connor, J. Pieprzyk, R. Savafi-Naini, Y. Zheng,
"Comments on Soviet encryption algorithm,"
Advances in Cryptology - EUROCRYPT '94 Proceedings,
Volume 950 of Lecture Notes in Computer Science (A. De Santis, ed.),
pp. 433-438. Springer Verlag, 1995.

[An] C. Charnes, L. O'Connor, J. Pieprzyk, R. Safavi-Naini, Y. Zheng,
"Further comments on GOST encryption algorithm,"
Preprint 94-9, Department of Computer Science, The
University of Wollongong, 1994.
ftp://ftp.cs.uow.edu.au/pub/papers/1994/tr-94-9.ps.Z

[An] John Kelsey, Bruce Schneier, David Wagner,
"Key-schedule cryptanalysis of IDEA, G-DES, GOST, SAFER, and
triple-DES,"
Advances in Cryptology - CRYPTO '96 Proceedings.
Springer-Verlag, August 1996.
http://www.cs.berkeley.edu/~daw/papers/keysched-crypto96.ps

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPV64JzkCAxeYt5gVAQEmsAf/WaZCYZ7xF94Vw6IK3lIdCQVDmGY6R6dO
z6n9F5zcH+u1B+Xv13uw0Z1gx6mOn6nKlnGmbrx20ryTaIwpVxVQ4dkmwSMpaI9C
V7Ce3wPhSQN9ufXA1LjJf31YZhNoqlgbc2jmELuJlvHNHiEsOXagdVvAJXjhPcsd
TTKp2Z82kYB4MPoKFpl9ud4sDK/KCCgiNv4rlKxVYFaN6BvtO2/SBR22iQDmrzjr
HcgVLDR6/Tq4E74nKymwjVa1Iq6wA7P++3i9vrHiR9sttf2Q76Fc7bMxwW9T5CTs
jpmW8ynjy6u0XSbDCNmTFYJB7ucTtWGCz5ChayQL15+4hB6Yb4XOZA==
=Ykma
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Kf9lQrxUBaE/m/uuQy7VmyXOwJ", "n_sections": 9}, {"thread": "KmWKTh4YEyw", "msg": "SZxjVeGrhaoJ", "author": "David Hopwood", "date_disp": "Sep 15, 2002, 6:55:16\u202fPM", "subject": "MD5 bit count padding query - Big endian or little?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Dave Crypto wrote:
> With regard to the part of MD5 padding which indicates Message bit length
> (therefore the value placed into the last 64 bits of padded message). Do I
> always place the bits into each byte in "big-endian" order, regardless of
> the underlying architecture?

The message length is an integer. The order of bits within a byte is only
relevant if you're converting from a bit string, which you're not in the case
of the length field.

> E.g. therefore, as Intel is little endian, once
> I have calculated the number of bits in original message, do I then have to
> do a translation of the number from a representation in little endian, to
> one in big endian?

No. The platform byte order isn't important, because you should be using
byte-order-independent code anyway. For example, if your array containing
the input to the MD5 compression function is declared as "uint32_t X[16];",
then you would write:

X[14] = /* low order 32 bits of bit count */;
X[15] = /* high order 32 bits of bit count */;

There's no conversion between pointers to different-width types here, and so
no dependency on the Intel byte order.

(You could think of the above code as implementing a little-endian conversion
of a 64-bit word to a byte array, followed by another little-endian conversion
from the byte array to two 32-bit words, but this is obviously equivalent to
converting directly without using the intermediate byte array.)

In general, it is much simpler to write portable code that avoids conversion
between different pointer types entirely, and uses shifts and masking in the
obvious way for conversions. *If* you then find by benchmarking that the byte
order conversion is a significant cost, then you might try to optimise it in the
case where the algorithm byte order matches the platform byte order. However,
I frankly doubt that this is ever worthwhile in C: if performance is that
much of an issue, then you should be using an assembler implementation anyway.

> From Section 3.2 Step 2, regarding the padded bits it states,
>
> "(These bits are appended as two 32-bit words and appended low-order word
> first in accordance with the previous conventions.)"
>
> Earlier in section "2. Terminology and Notation" (therefore the "previous
> conventions") it states,
>
> "where each consecutive group of eight bits is interpreted as a byte with
> the high-order (most significant) bit of each byte listed first."
>
> and later
>
> "where each consecutive group of four bytes is interpreted as a word with
> the low-order (least significant) byte given first.
>
> Am I right in thinking that from this, no matter the underlying architecture
> it is up to the algorithm author to make sure that the 64 bit representation
> is always presented in a big endian format.

No, the words are in little-endian order. The big-endian bit ordering is
only significant if you are presenting a bit string as input to MD5. If your
implementation only supports byte string inputs, as most do, you can safely
ignore the sentence about bit order (except to note that it implies that the
padding for the last block starts with 0x80, not 0x01).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPYQ9EDkCAxeYt5gVAQFe6Qf+MShML1v4ZhBKHCVry+nEEmaudr1RpbQc
FOqss+WFaOZfmxVc0uTC0RvMYN4327HsBit813ca/u+tAvZAQ7uxtlBel7a0HA9W
gYiAIViNnTdm0+zzcq3Mexi0s4Ub6vFqb2hw4/yqKQjN6rEONQM7lfzfHK9HW8QP
Q9ZnQ9luW6BhLr25XGJpZI5CV6FXXMNJMetyxiq3Hu1g6Q7u9kxNCLQozcQd9+uF
OTaSwfrCFP76udynDWvzqz1Vg8EoNxYDnugg+bwcMw4NY/bGsCUk9oxZTgKRQv7F
52PV/26631TcgMJUSPXolgnAAnpCi5MNhZYbmxvfbJTuo4ROt5n/hA==
=E9KD
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/KmWKTh4YEyw/m/SZxjVeGrhaoJ", "n_sections": 8}, {"thread": "Nu64iuDXrbI", "msg": "ff_cyf0p02MJ", "author": "David Hopwood", "date_disp": "Aug 24, 2002, 11:26:30\u202fAM", "subject": "Most trusted hash algorithm", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Darrien wrote:
> The last time I checked, I saw that the reason for the transition from SHA
> to SHA-1 was not disclosed by the NSA and, as such, was under the false
> impression that it was not a freely available algorithm.

The reason for the transition from SHA-0 to SHA-1 is almost certainly the
one described in:

Florent Chabaud, Antoine Joux,
Differential Collisions: an Explanation for SHA-1.
<ftp://ftp.ens.fr/pub/dmi/users/chabaud/sha.ps>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWefLDkCAxeYt5gVAQGNxAgAsyD+lJ2sGuQk/sk9Tfkn5KBRJWNGyt4v
i5oHavaIps9MAuJheUjcTWz2Hn4LcXS/X1+67XznP5RARZGCHfC5uXBlUkIHhHeN
y6LT9v8o/DRD0YPOtPmtLvAkC3SWZGGh9hpBkjs++Nkkft0qzSSPxpOWhIXex4j9
XxHs6zlxcDP+c57+ITSrwiRcDTKkTKFHil6IwiDvcHCwKFB2C/lRWV00D5mCSNA5
orJfclW4UnkJsXU9iVA4QKy0Rr8kQTezx98/7tEKm8i4lTTLJqWI9uprXx/cKh5w
ZhMihbRtmYhVu5VjUf+yoOaP3H3POqNWEFNua89vPp540d8ftf0WMA==
=mgCC
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Nu64iuDXrbI/m/ff_cyf0p02MJ", "n_sections": 13}, {"thread": "UUqgYYq8QtQ", "msg": "eQyzE118c5UJ", "author": "David Hopwood", "date_disp": "Aug 9, 2002, 10:04:32\u202fPM", "subject": "Edsger Dijkstra Passes Away", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Roger Schlafly wrote:
> "Edward Elliott" wrote:
> > You would be presuming too much. I've never encountered another
> > professional programmer who's used a single goto in the last 5 years.
> > We're smart enough not to go near that quagmire.
>
> We? You just don't know many professional programmers. Avoiding
> all use of goto is foolish. There are situations where the goto is useful.
> I don't want to start a debate here, but this page summarizes the
> pros and cons of goto.
> http://www.construx.com/stevemcc/ccgoto.htm

All examples I've seen of cases where goto is supposed to be useful,
including those on that page, can be written more clearly using the
constructs that in Java are called labelled breaks [*], exceptions, and
finally clauses.

However, in ~15 years of programming in C I've never written a goto in
that language either: I find the approach of adding a status flag clearer
in languages that don't support exceptions.

[*] Labelled breaks label the loop that is being broken, not the exit
point. Therefore they preserve the single-exit property of structured
code.


Anyway, the field of computer programming owes a great debt to Dijkstra.
Only 2 days ago I cited one of his papers from 1968 on synchronisation
constructs.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPVR0MDkCAxeYt5gVAQHzUQf+MnnACf/WjMQSV0yjQh4NIRY1TBPQ550v
wSKfJZiB3cappM9yajLIr/CuSCxc2pI2/G6xvvWQdeu0O7eh+jNOVYEIqZiaceOO
X6HW2ne8BV8KH1rm4sa87gHRHzpt3jM2kMsX9egUb5egD1/+DtUP4g/yGwtfA5hV
2CkSVgC+UHpTS671hI6cfhOnjOBaceMQ0gHRRjLnuEMuUloJnBF0bjgpwDNore6/
T3i8YpFGAgP6b2cph+sM0UeRPQyAZXHlNxdauBxZjAIuvHdEiXXh12OqcpJyZ021
/u01BdUfV2PiVrol+7pQlW4BJ8fsEy0LOLYnCtCXdt9fxtVP1vMX0g==
=FxmB
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/UUqgYYq8QtQ/m/eQyzE118c5UJ", "n_sections": 100}, {"thread": "UUqgYYq8QtQ", "msg": "NCEaTIKmw6wJ", "author": "David Hopwood", "date_disp": "Aug 11, 2002, 8:57:23\u202fPM", "subject": "Gotos and side-channel attacks (was: Edsger Dijkstra Passes Away)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Bryan Olson wrote:
> David Wagner wrote:
> [...]
> > In C, if you have complicated error cleanup code, and lots of places
> > where an error might occur, it is often helpful to use 'goto' to escape
> > to a cleanup section when an error occurs. (This is basically making up
> > for the lack of exceptions and try {} finally {} constructs.)
>
> To bring this back on topic, I find such cases happen frequently when
> writing crypto code in C. Many cryptographic schemes and standards are
> specified as interleaved lists of checks and computations. The first
> check that fails indicates an error.

This is actually an important case where you shouldn't use a goto (or
anything that compiles to a jump) for a reason that is crypto-specific:
it may allow timing or other side channel attacks. For a concrete example
see James Manger's attack on OAEP. The description of OAEP decoding in
P1363a and PKCS #1 v2.1 has been modified precisely so that all the steps
are computed whether or not there has been an error.

> It doesn't repeat blocks of code, and doesn't execute or test anything
> it doesn't need to.

For side channel attacks, that is the problem.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPVcHXTkCAxeYt5gVAQGdAQgAyLyO0wpSNgEtKiFO6f1Sa/YUERjgRVkW
MrE2no9m2ukmLj418Z+0LjyCKxmClyRFeJPJ4s9UduhRwtwKCcRuqr2qcJHUjwif
OdV8aD9nUR1z+k0YTRufHuOO9hGbZT0M5N2sYW0cGWswTfww4gNweVKdszoajmze
xj8dYm3Re+5e7FdcIFkcW8IXc2D25L/Fg5j0xTANiEt8wVUOsyz2bYgiYEUOy4Vc
vrpn/fgO46jdzMvpLEc1XTW6gzwPO/8tOvGseJ4uaMrn2AsOQKEFKxKldfuzCssB
LDgfWGEDDoswB6sNvAxOciwQk3HlRb3LSOMtBnBdj7on+TLCidYl/g==
=Dywt
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/UUqgYYq8QtQ/m/NCEaTIKmw6wJ", "n_sections": 100}, {"thread": "VRDt6xrvqpI", "msg": "HJnDY_-smcMJ", "author": "David Hopwood", "date_disp": "Aug 15, 2002, 9:45:10\u202fPM", "subject": "Question to a Counterpane paper that talks about a safety factor for AES finalists", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

UBCHI2 wrote:
> Again the arguments come down to practical versus theoretical encryption
> tactics.

There is no such dichotomy. The purpose of theory is to produce designs
that are implementable and secure in practice.

> In a practical world, you must "overdesign" the rounds to insure
> safety against future attacks. In the theoretical world of academics, you
> design according to currently known principles.

Academic-bashing annoys me. IME, cryptographic protocol designs by academics
tend to be considerably more conservative and robust against both known and
unknown attacks, than protocol designs from non-academic sources (especially
from commercial companies). If more implementors took notice of theoretical
results, the quality of deployed crypto in general could be considerably
improved.

> Get out of your ivory towers,
> think ahead and acknowledge your ignorance of the future. --Amazing how
> cryptographers are so caught up in their community findings that they ignore
> the possibility of new attacks or undisclosed computing power breakthroughs.

Where do you think the majority of new protocol attacks come from?
Academia - in particular researchers affiliated with universities.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPVxY6jkCAxeYt5gVAQG/dggAtSiuOTwGcylc2wCtiH5OK3iIh1eALx7I
DOrLvJvgqV2JR83tjD6G7h7oLM79fRKV7SQhFpVlwRtfHn/zCWDoHLmIjuKuWb4t
bnl0aSg6gRf1Bsvf/4aee5RHk8VPz2Z4QyEPameUEQOZwar0evssqFZxMiVxHEJh
nXUJIQVz6nPe6uZoOKAMTGUXDC0bfT/EWDev0LebNIaqKbcNs9m8rHBLbFAPu+Ly
L19P4f9SZ+YDngRKokyA7eWADoGhw+UKaH/mevUWrohljjXG9glb83X4cHCdfdTC
qHxfOph8f3cWLNio7IaHPizFvNTc5L/9uaINZggcG1udxMx5YVYj8A==
=ATWb
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/VRDt6xrvqpI/m/HJnDY_-smcMJ", "n_sections": 37}, {"thread": "ZhR98p3fpXk", "msg": "BWxNS-HpRCsJ", "author": "David Hopwood", "date_disp": "Aug 18, 2002, 1:51:37\u202fPM", "subject": "Triple Diffie-Hellman (ECC compatible). Any attacks against it?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

C01D B100DED wrote:
> Side 1 generates a random number Local_Sec, multiplies it by a
> randomly chosen point known to both parties, the resulting Local_Pub
> is then sent to Side 2, Side 2 calls it Remote_Pub.
>

> Side 2 generates a random number Local_Sec, [rest snipped]

You're reusing variable names. Write it out again without re-using
variable names, and preferably a bit more concisely.

Incidentally, double DH exchanges using both static and ephemeral public
keys are a well-known technique (for example see the "DH2" schemes in [1]),
although I couldn't tell whether what you wrote exactly matches a
published protocol. There seemed not to be any checks against small
subgroup attacks.


[1] <http://P1363:Mars...@grouper.ieee.org/groups/1363/tradPK/P1363/draft.html>
(The final standard, IEEE Std 1363-2000, was not significantly different
from draft D13.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPV/ebzkCAxeYt5gVAQEvJQf7B5cGyG9mAGsO0HVCFqdwrFkN9c7RJrxO
EPcg3wEepnxs3aTowxJ2YTStxwasfyki0mEW3rrW9FVKtD+yf9GOO7u25YGq9SGN
xGacfUKBwR15qV5HonjoZge0unIrHZAvlgwKrL7qOTcnB6t7rTXbPw5xSkP1Bun/
hTP1Y/pfaouBgsPLwECbC4wnD/v1ErmRQ9swZQk75BA3/6D7ZiBZivQ0bg9DJ3YF
QDFI0sYbffk0Zj3v7vST86tMw01Xvx2XL1tM83JmVqdg9VHmE7DnN/FFI9R6Debd
Uyhly0WEBfIr4TnyGk2qh5cX0e9Ukf1Zs48vqAc9P1d7yT1ACDdMeA==
=djer
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ZhR98p3fpXk/m/BWxNS-HpRCsJ", "n_sections": 3}, {"thread": "_6KuUbTjFZg", "msg": "EWUNAn1hxuAJ", "author": "David Hopwood", "date_disp": "Aug 28, 2002, 11:13:09\u202fPM", "subject": "Peer 2 Peer Twice RSA and Twice AES", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Joseph Ashwood wrote:
> First the obvious solution to your problem using RSA does not require
> using RSA twice. It works like this:
> Client looks up Server pubkey
> Client generates key kernel KK
> Client encrypts KK to Server (using OAEP of course)
> Client sends KK to Server
> Server decrypts KK
> Server generates 4 random values RV1, RV2, RV3, RV4
> Server sends RV1, RV2, RV3, and RV4 to Client
> Both generate Key1 = hash(KK, RV1), Key2 = hash(KK, RV2), Key3 =
> hash(KK, RV3), Key4 = hash(KK, RV4)
> Key1 is used for Client->Server encryption
> Key2 is used for Server->Client encryption
> Key3 is used for Client->Server authentication
> Key4 is used for Server->Client authentication

I don't like the key derivation much. If an attacker modifies, say,
RV1 to be equal to RV3, then the client will use the same key for
encryption and authentication. Since there's no key confirmation, the
attacker can block the server's application data, and just listen to
the client with Key1 = Key3. (How much of a problem that would be
depends on which authenticated encryption scheme is used, and how much
data the client will send without getting a server response.)

In general, explicit key confirmation should almost always be used in
secure channel protocols.

[...]


> If this is something of significant economic or personal security
> importance, I suggest you bring in a cryptanalyst as a consultant, as
> there are many seemingly innocent choices that can be made that will
> effectively destroy security.

Indeed. Unless there are very good reasons not to, just use TLS or IPsec
as a secure channel protocol. You may still need a consultant to help
with other application-specific security issues, though.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPW2RFDkCAxeYt5gVAQErpwf+PNDv4zCbp+HgNmyeXiD1m8nk//wcdWMF
Ori9yrhmeWPyvj3cDH2/EWTM1KeUht6HmuEypP96MWs/BLd++5570MAQc3WYW9l9
yXASuCMtIoG4J/syhVzTwYM0KEf1Y7cTVxIoLxcUJVdtJObTS6oLRXcxng6F8tKf
MuRXrcLVYFvaU8+ufBMoQT5/ttNHpoUv2wU8evcciYg6TEBDKpsrqT6KQn10xlMr
19BSZQqdSD5+5/AB/PYfJgOou0nNXX2WgxhZirsIe2OuuSfurz88PVkDbBeN6d2i
8pp7ugFMiejD1jDmPO3hvFufyFhmnVgebtYfxZ/uSGS39Id9JlQhEQ==
=Ls90
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/_6KuUbTjFZg/m/EWUNAn1hxuAJ", "n_sections": 17}, {"thread": "aS7a9YWMN9g", "msg": "BJz5RD8DV8EJ", "author": "David Hopwood", "date_disp": "Sep 3, 2002, 11:11:10\u202fPM", "subject": "checksum with length constraints", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Wagner wrote:
> It's probably a good idea to raise alarms if you see an invalid checksum,
> or if the number of invalid checksums exceeds some threshold.

Yes.

> It's also probably a good idea to change your keys fairly frequently
> (much more frequently than every 2^32 messages). These can help reduce
> the risk of the sort of "blind luck" attack outlined above.

The frequency of key changes doesn't have any effect on the risk of a
"blind luck" attack on a MAC. (I'm sure you knew that really.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPXVfUjkCAxeYt5gVAQH8wAgAx2M3YeUFN/AwU3e9++hK/xkLeKGMPQlp
j2PzPCFyslXqAGZQ9x6z5lNFfYglvo3Jc5DXxCoWWteyEPYjH6VPtbnfeDr24LVf
n+cefHz0yw1NnDVdOW5sAzh3okIA8mcL7l5+6NDwPEjKfGhKFuU/WI67piTvSNHz
16fUk9fRH+kAbPPFJaGLCYJpy7rWuMRMBInC1/YFKG6+ZYvyGLQfrjx06UlYY28O
YGDZqXdH31kaZL39W2ayvRRmSLQvb8nV8UHabXTbh+4ynYpru3etCP1q8P/EPnXv
BUxdz+gzrr7crF/wdBThR5/mSV52aTLESQcUlyQCQD4wcvLb5dzmlA==
=wTYX
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/aS7a9YWMN9g/m/BJz5RD8DV8EJ", "n_sections": 19}, {"thread": "ahJg3y0mnlQ", "msg": "xs_y4bpUDLYJ", "author": "David Hopwood", "date_disp": "Aug 16, 2002, 9:08:06\u202fPM", "subject": "DES secret IV cryptanalysis", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Wagner wrote:
> Daniel Mehkeri wrote:
> >I'm under the impression that the proofs for CBC require unpredictable but
> >not necessarily secret IVs.
>
> Well, they require pseudorandom (not merely unpredictable) IV's,
> but the IV's can indeed be made public (and almost always are, in
> real systems).

To be more precise, they require uniform pseudorandom IVs if the key is
reused for more than one message. If random independent keys are used for
each message, then it's safe to use a fixed IV - as IEEE P1363a does in
its "CBC-IV0" schemes, for example.

(This assumes, as required for any use of CBC mode, that no part of the
ciphertext becomes available to an attacker before it could have the
opportunity to choose any part of the plaintext. I.e. a "message" is
something that is chosen, then encrypted, then sent, with no pipelining
between these stages. Note that CTR mode does not have this restriction.)

> >So does a non-constant pre-agreed
> >unpredictable IV work, such as encrypting a counter with a different key?
>
> Absolutely, as long as it's pseudorandom.
>
> >And what happens if you use same key for encryption as for IV generation?
>
> Ick. :-) I'd be surprised if this happened to be secure.

It is secure, because the probability of a collision between the counter
value and any other input block is no greater than the probability of a
collision between any two input blocks in the standard proof.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPV2hvTkCAxeYt5gVAQE+Rgf/e+pKWNUtXuDZhFRPrfme6pI07nXr0ByO
5prlHZIwDrMvgb4ktDO9tzctYl+S6GOtfLgjKUHJ+MQ86iwKOPMw0QCPlcaY7XVK
bgHK957sL/3EEfs+zvsvZFsmFIqhDiR4Si9KN1xjn/CAuyVZQrW6fxG6lnD736gW
gMme7r1EE/5p93+u7h8yngAaTzo0pnvW2LlNiqszumoYHsM4UYohcV0WVkujc6cJ
SV89CAGbmT16OlijrR8d5blFSHESy89+s3PmJJxVRjJrIPpFyE98Y/YmLyNsXjdc
hXNvl+RXHnD9Ql2e/Odrur9wjs5/O2NkUqRIyGy1cuEWqg8GyIDcPg==
=vMbu
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ahJg3y0mnlQ/m/xs_y4bpUDLYJ", "n_sections": 29}, {"thread": "ahJg3y0mnlQ", "msg": "fu2-YQyGHcgJ", "author": "David Hopwood", "date_disp": "Aug 16, 2002, 9:26:33\u202fPM", "subject": "DES secret IV cryptanalysis", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Richard Parker wrote:
> David Wagner wrote on 8/16/02 4:50 AM:
>
> >> I'm under the impression that the proofs for CBC require unpredictable but
> >> not necessarily secret IVs.
> >
> > Well, they require pseudorandom (not merely unpredictable) IV's,
> > but the IV's can indeed be made public (and almost always are, in
> > real systems).
>
> Isn't it the case that if an ensemble is unpredictable in polynomial-time
> then it is pseudorandom and vice-versa (i.e. only pseudorandom ensembles are
> unpredictable in polynomial-time)?

It's better to use exact analysis here, since we're talking about fixed-size
IVs:

Isn't it the case that if a distribution (random variable) is not feasibly
predictable then it is pseudorandom and vice-versa?

Depends what you mean by "predictable". If you mean "indistinguishable from
[uniform] random" then this is a tautology. If you mean that it's infeasible
to predict the exact value, then no; a distribution that is uniform except
for one fixed bit is unpredictable in that sense.

> >> And what happens if you use same key for encryption as for IV generation?
> >
> > Ick. :-) I'd be surprised if this happened to be secure.
> > I definitely wouldn't take any chances with doing this.
>
> I looked around to see if I could find any reference that analyzed CBC using
> an encrypted counter as the IV. I couldn't find anything definitive
> regarding using the same key.

I'm surprised if there's nothing published on this. It definitely is secure,
with the same security bound.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPV2l+TkCAxeYt5gVAQHP2Qf+P1Q/B+qKEvJkucbV25jK/INNJMHD1E9V
9F1s0e23+j0Sj+qd6icPenbTE32GR5PSw/exZ+cCeOcW9qB+zdX2CJPj5U3TL3AY
UDuG0RHKWZ/O2ka1EOQNeQGehnV6QH+SUWmcO7K7iA3cWZs0Su5FFNaIR0j92TEC
SPsPYVFk+wcahpL2rA++TiHK/xdxd+7Fl/h424rq+P28fQTSJAhj6aNjEx/imu/r
tc8UOpvcVyl1YCTUCzfydQ+FGIEPXg0FUbbFxSo/i+XUJyq15pHBu+ddtgbqJrm+
OY2scIFzdzVBEDpSGDKD1L4nThwek7prO2eXKNpiUjrsUNo5XJ2eog==
=iqEY
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ahJg3y0mnlQ/m/fu2-YQyGHcgJ", "n_sections": 29}, {"thread": "beOM0L5Sv2A", "msg": "PMpYgOAtjuwJ", "author": "David Hopwood", "date_disp": "Aug 3, 2002, 12:07:43\u202fPM", "subject": "another libtomcrypt bug", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:
> the md4_process() function [contributed by Dobes V.] has a serious bug
> in it. Basically if you pass inputs >64 bytes it won't handle them
> correctly.

What's the point of including MD4, anyway? Is it likely that anything
being designed or implemented now would use MD4?

SAFER and RC2 are also of dubious usefulness, IMHO.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPUtWmTkCAxeYt5gVAQGx4ggArp4tMe1PITa5AYtZ0uf/15HReuh3RIQc
eSf8bHSsJljFlbjTimm3ZfVIlTAr7QNGfDEfp6TER3AW6ulIt2dBdzTCTdh9mlzJ
HH4vHFYODnaxth6dGbHJl+pbG86110hJ0edvtRfxtTubLKFTqn41xIBTlY6bQy5t
5ZUJHCwFFDcjGgTW+tjU2zhrxY/kyU68Nek15m5Eht58GfZyAJwHcBVfYFc+bQgH
BnoW8zlYp3C8auosv6iDYh/YlEqvsV7g0GlYbY5msRehqiaAvshugXHNoqCFKeEY
yCp6r8YAVV1klxl6pCvDwNKjYvt9EQO1yOnysuhIL48QjMG8aFtNYQ==
=rEmw
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/beOM0L5Sv2A/m/PMpYgOAtjuwJ", "n_sections": 11}, {"thread": "bsBXdx2NQ1o", "msg": "6Eo-G6jXtlkJ", "author": "David Hopwood", "date_disp": "Aug 26, 2002, 4:03:38\u202fPM", "subject": "HTML postings", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

If that code executed in any newsreader, the newsreader is seriously
broken. It was tagged as text/plain.

(I'd be quite interested if anyone found that it did execute, though,
since as part of an anonymous remailer protocol design, we'll want to
support a policy where exit nodes only output plain text messages.
The most reliable way of doing that is to construct the MIME headers
yourself, rather than trying to filter out unsafe headers. However,
if any mail or news clients are automagically treating body parts
containing "<html>" as HTML, that won't be sufficient.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWqCpDkCAxeYt5gVAQGKJQf/YTRE8sOGSGbnF5XtnFVZVtREabNVRHaI
RZvWciWmAzHNea6WQ8I+x5hz3KSSNpr4jsyc9xa8A3dD3i2cBaVCP4LAIjzxCSHX
ixMSUjrAAfBUO/3HCKTAa1c1vurN7NAc79KB+/tJXiGqRvmcM1vCydYU/AkaJH1l
CcCQbH8bcLs3lI2Us5RgzoPZNUUVxBIDXOUtBgIt7nB6usLw2qNatPZqT5GnkM8G
52Q2tGcvskejwBQljqeYZT3ZX50eCAJcn2qPBskpqElcSDp1FpNgwupKyUANx+68
QSjRZYu8Ff7PJ368hTUAA6+ZoIhUREhPkbhEcZfhXh18qudCLe5sVQ==
=mqk/
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/bsBXdx2NQ1o/m/6Eo-G6jXtlkJ", "n_sections": 5}, {"thread": "f29QFUDkfdY", "msg": "9vSLcY1nf1cJ", "author": "David Hopwood", "date_disp": "Sep 22, 2002, 12:27:49\u202fAM", "subject": "Root certificate definition", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Johan St\u00e4ck" wrote:
> Hello,
>
> In PKI, is there a commonly accepted definition of "root certificate"?

When most people say "root certificate", they actually mean "a certificate,
usually self-signed, that is being used as a trust anchor".

For X.509-based PKIs, "trust anchor" is defined in section 6.1.1 (d) of
RFC 3280:

(d) [...] The trust anchor information includes:

(1) the trusted issuer name,

(2) the trusted public key algorithm,

(3) the trusted public key, and

(4) optionally, the trusted public key parameters associated
with the public key.

The trust anchor information may be provided to the path
processing procedure in the form of a self-signed certificate.
The trusted anchor information is trusted because it was delivered
to the path processing procedure by some trustworthy out-of-band
procedure. If the trusted public key algorithm requires
parameters, then the parameters are provided along with the
trusted public key.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPY1GlDkCAxeYt5gVAQEpCQf+LwXMUGLJKNLjiJ0m8Oynt1U6eBk9uWqz
MEzxHWyERDXGGNzNV9Ebajx23QsEzOXv3MiCKbgjIt/41NVAHoON/QDwSNiY/qE8
0bQ49FugeELDKFe7IS+lw4WXPlBzrsMdZv4sXav75USPfL/k0t9F297y4xL/lG9I
i3yHizFUwcoBIuji58oHC9Q8zBvSudbrELE5bNz2oAQfnnI5uFtOuCmckyg2ZDT1
ebtLS3oqelD0NnxiiSQLDkz7ebDxOl3Z64DSutxr2Mb4K4AR3nZUd3Z0+gnW0MzA
cYsCgrq8sJ+0AFE+fYYdf3CsnLhCcx/AAbA5ow43Ou0HfoYqvypmrg==
=13t6
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/f29QFUDkfdY/m/9vSLcY1nf1cJ", "n_sections": 9}, {"thread": "lpp5ZAvw9tM", "msg": "IEGpniMMvwoJ", "author": "David Hopwood", "date_disp": "Aug 9, 2002, 9:32:22\u202fPM", "subject": "Question on pseudorandom permutations under CPA", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"John A. Malley" wrote:
[snip usual model of a block cipher as a PRP family F: Keys(F) x D -> D]
>
> What about the key's behavior? Why can't we use the way the key
> pseudorandomly chooses a permutation on D to distinguish a pseudorandom
> family of permutations from a family of permutations where the
> permutation is chosen uniformly at random?

[big snip; the important parts are:]

> World 0: An Adversary A draws as many key values k out of Keys as he
> wants. For each key, A gets oracle access to g: <- a permutation chosen
> at random out of the set of permutations on D.

> World 1: The Adversary A draws as many key values k out of Keys as he
> wants. For each key, A gets oracle access to g: <- F_k where F_k is the
> pseudorandom permutation corresponding to the value k.

> This looks like a way to examine the effectiveness of the key provided
> to the block cipher in choosing permutations at "random" out of the set
> of possible permutations. It's a way to address related key attacks.

No, if I understand correctly what you're trying to do, this doesn't work:

a) If the adversary is drawing keys at random, it's infeasible for it to
draw related keys.

b) If the adversary knows the key, and also the block cipher F, it can
test whether g(x) = F_k(x), so it always has perfect advantage.

b) is the main difficulty, as Edward Elliott pointed out.


In another post, you wrote:
> So the prf-cpa advantage model _does_ address related key attacks.

No, it doesn't. First, I think you may be slightly confused by referring
to PRF-CPA. Adv^prf, Adv^prp, and Adv^ind-cpa are definitions of
advantage against a PRF family, PRP family, and encryption scheme
respectively; there is no Adv^prf-cpa.

(PRP and PRF families by definition only have to be secure in the
forward direction, so it would be redundant to say "-cpa". A permutation
family that has to be secure in both directions - i.e. indistinguishable
from a random permutation and its inverse where the attacker is given
oracles for both - is called an SPRP family. The "S" stands for "super".)

Neither Adv^prf nor Adv^prp address related key attacks: the key is
assumed to be uniform-random in the experiment, and so if the key isn't
uniform-random in the real world, the experiment doesn't correspond to
the real-world situation.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPVRtFjkCAxeYt5gVAQG9qwf/b+hV75x7DD3Jx/Xr7DpPywV+YKfZOQIY
JzEWhMxKrB+qKlX0drFTF/aVISAXqUT2x+hqpy3jvnuCdpfeOBgV+Srn1HOdW8UR
croY+zBeylceHw4AfEVlDj1ZeczBRXyN4ro2vGha2lP0TanPZpd2IswJcIfsb/Mw
TW71NpZNo3lOQojbtBvIty4r5q+iWkPKbUEqDLzP8dcc6P60O5Yu99sbYxBdqJA7
O2MEWaGqSqFlZALV8jFu7ikoIAs3SCGd7Lj5EKri7oDNHyARc4zcNBcNkofTUpPC
Prb25knHJS6Yhx32a9+pcDiahtfPTRX0v9fJESfskQ6r7yaNMJkC+w==
=AiIi
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/lpp5ZAvw9tM/m/IEGpniMMvwoJ", "n_sections": 48}, {"thread": "lpp5ZAvw9tM", "msg": "xrYvPuufiIEJ", "author": "David Hopwood", "date_disp": "Aug 16, 2002, 8:25:35\u202fPM", "subject": "Question on pseudorandom permutations under CPA", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Wagner wrote:
> Maybe we could try the following? In World 0, the referee secretly
> chooses a family of permutations, i.e., R : Keys x X -> X where each R_j
> is a permutation chosen uniformly and independently at random. Also,
> the referee chooses a random key k. Then, World 1 is just like World
> 0, but with F replaced by R, so that for instance when the adversary
> provides pi, the adversary receives an oracle for R_pi(k). (Note that
> R is always kept secret.)

I find this kind of prose description too vague. Can you write it out
in a format similar to this description of Adv^prp?

P : Keys x X -> X
Adv^prp(A, P) = 2.|Pr[b <-R {0, 1}; Exp^prp_b(A, P) = b] - 1/2|

Exp^prp_0(A, P) {
O <-R Perm_X;
return A(O)
}

Exp^prp_1(A, P) {
k <-R Keys;
return A(P_k)
}

(If the adversary has to work in more than one stage, write A.stage(...).
In that case I also prefer to include a state variable that is returned
from each stage and passed to the next.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPV2W1DkCAxeYt5gVAQFLRwf/f6pMRfXTFW1w0OMi2Due30oDvzxJbwlc
Y7drywS+WyBNwiocgPDOarj4xGkinZ4gbO4zsl3Ui1bwfQdb9oliGm1/gpweocg0
L6Wn5xooUCiBrsWnAdiiKNAoecLBxcoyl2rhhuw52uWO0kio7HEjJx2wY5aNKRd/
bX5mA0dFmZOP/hNlzy71F02GpnfkQkzfeUJ49exfOCQG3Y3RGM+MxkRLPn+OMite
//hx3Pk3lIDIApryod89MGuTxlw4WOx+gzh3eWYu+QZT2vw+4iBCP2actN9l+x5i
7W9prSnvGFE/cuttQsYJGAYJ658Gtwb2ItSm+d+PuLKsiAHneNynFw==
=Yn1f
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/lpp5ZAvw9tM/m/xrYvPuufiIEJ", "n_sections": 48}, {"thread": "lpp5ZAvw9tM", "msg": "WplvFPh259MJ", "author": "David Hopwood", "date_disp": "Aug 17, 2002, 4:37:22\u202fPM", "subject": "Question on pseudorandom permutations under CPA", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"John A. Malley" wrote:
> David Wagner wrote:
> > Good point.
> >
> > Maybe we could try the following? In World 0, the referee secretly
> > chooses a family of permutations, i.e., R : Keys x X -> X where each R_j
> > is a permutation chosen uniformly and independently at random. Also,
> > the referee chooses a random key k. Then, World 1 is just like World
> > 0, but with F replaced by R, so that for instance when the adversary
> > provides pi, the adversary receives an oracle for R_pi(k). (Note that
> > R is always kept secret.)
>
> Just to make sure I understand, to paraphrase:
>
> in World 0 the referee secretly chooses a family of permutations, R:
> Keys x X -> x where each R_j for 1 <= j <= |Keys|, is a permutation
> chosen uniformly and independently at random.

Why use '1..|Keys|' instead of just 'Keys'? I'll simplify it to 'Keys'
below.

For a change, I'll label various attempts at definitions using Hebrew
letters (alef, bet, gimel, dalet, he, vav, zayin...).

> So R is a indexed table
> where the ith entry is a permutation chosen uniformly and independently
> at random out of the set Perm ^D. Then the referee chooses a random k
> and returns g <- R(k). The Adversary gets oracle access to g to permute
> messages. The Adversary provides pi() to the referee. The referee
> selects another random k and returns g <- R(k). Again, the Adversary
> gets oracle access to this new g to permute messages. A can repeat this
> as many times as desired.

IOW,

P : Keys x X -> X
A : Perm_X x State -> {0, 1, again} x Perm_Keys x State

Adv^prp-any(A, P) = 2.|Pr[b <-r {0, 1}; Exp^any_b(A, P) = b] - 1/2|

Exp^prp-alef_0(A, P) {
R_j <-r Perm_X for all j \\in Keys;
state <- null;
for (round <- 1..) {
k <-r Keys;
g_round <- R_k;
(guess, pi, state) <- A(g_round, state);
if (guess != again) return guess;
}
}

which is obviously equivalent to:

Exp^prp-alef_0(A, P) {
state <- null;
for (round <- 1..) {
g_round <-r Perm_X;
(guess, pi, state) <- A(g_round, state);
if (guess != again) return guess;
}
}

> In World 1, the referee secretly chooses family of permutations, R: Keys
> x X -> x where each R_j for 1 <= j <= |Keys|, is a permutation chosen
> uniformly and independently at random. So R is a indexed table where the
> ith entry is a permutation chosen uniformly and independently at random
> out of the set Perm ^D. Then the referee chooses a random k and returns
> g <- R(k). The Adversary gets oracle access to g to permute messages.
> The Adversary provides pi() to the referee. The referee assigns g <-
> R(pi(k)). Again, the Adversary gets oracle access to this new g to
> permute messages. A can repeat this as many times as desired.

Exp^prp-alef_1(A, P) {
R_j <-r Perm_X for all j \\in Keys;
state <- null;
k <-r Keys;
pi <- Identity_Keys;
for (round <- 1..) {
g_round <- R_pi(k);
(guess, pi, state) <- A(g_round, state);
if (guess != again) return guess;
}
}

But where does P come into this? Maybe you meant to say:

Exp^prp-bet_0 = Exp^prp-alef_0
Exp^prp-bet_1(A, P) {
state <- null;
k <-r Keys;
pi <- Identity_Keys;
for (round <- 1..) {
g_round <- P_pi(k); // note P instead of R
(guess, pi, state) <- A(g_round, state);
if (guess != again) return guess;
}
}

This still doesn't work because if the adversary ever repeats a permutation
(including the identity permutation), it can easily distinguish the two worlds.
There are two approaches we could take to try to fix this.

1. (prp-gimel) Say that the adversary is not allowed to repeat a permutation,
e.g.:

Exp^prp-gimel_1(A, P) {
state <- null;
k <-r Keys;
pi <- Identity_Keys;
PI <- {pi};
for (round <- 1..) {
g_round <- P_pi(k);
(guess, pi, state) <- A(g_round, state);
assert pi \\notin PI;
PI <- PI \\union {pi};
if (guess != again) return guess;
}
}

and make the same change to World 0 (Exp^prp-gimel_0).
["assert C;" means that adversaries that can cause C not to be true are
excluded. It must be feasible for the adversary to avoid being excluded,
so C should not depend on secret information - which it doesn't in this
case.]

2. (prp-dalet) Use Exp^prp-dalet_0 = Exp^prp-alef_1 and
Exp^prp-dalet_1 = Exp^prp-bet_1:

Exp^prp-dalet_0(A, P) {
R_j <-r Perm_X for all j \\in Keys;
state <- null;
k <-r Keys;
pi <- Identity_Keys;
for (round <- 1..) {
g_round <- R_pi(k);
(guess, pi, state) <- A(g_round, state);
if (guess != again) return guess;
}
}

Exp^prp-dalet_1(A, P) {
state <- null;
k <-r Keys;
pi <- Identity_Keys;
for (round <- 1..) {
g_round <- P_pi(k);
(guess, pi, state) <- A(g_round, state);
if (guess != again) return guess;
}
}

prp-gimel is a weaker security property than prp-dalet, because it means that
the adversary cannot go back to a previous key, which is potentially important
in an adaptive attack. It's realistic that an adversary would be able to do
this, so we should discard prp-gimel.

Is prp-dalet a useful security property? I think so: heuristically we would
expect a block cipher modified so that the input key is hashed to be a
PRP-dalet. Also if we define Adv^prf-dalet analogously (with the R_j chosen
as random functions), then a PRP-dalet is a PRF-dalet and vice-versa, with
the same tightness of reductions as for a standard PRP and PRF.

OTOH, I can't think of any way to construct a provably secure PRP-dalet from
a standard PRP (or a PRF-dalet from a standard PRF). Also I still think it's
preferable to prevent related-key attacks at the protocol level. Note that
a PRP-dalet is not sufficient to construct a provably collision- or pre-image-
resistant hash using Matyas-Meyer or similar constructions.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPV6z8zkCAxeYt5gVAQGolggAmWNhKcoHme+yw7yudaYGGENR8nR8Yqaw
0KfKIq5tHVMk/nLTWc2VPMNjYj6m7cgIPvrtiL3/nuFdlWJCSD6ZC6cEx+6JKHBY
7jHzXWXUFts+x2KdSlp3VpmPusYzlnt89CgE8c9EPXv+k8V+qwGluCn1dZ0lIpC5
dtHeE9gfy5Hk8tWLdUOUeoahUcZZX9bMBKkvtfoR2OC0r5C575kixN9EUyWeScpp
Pc2C68Nyqi2IfYBHcZxpeYcbldVaW6EczenPpZGsIZ5QQryW1XdqgPoQ9/BCEEWL
ak0aQEdjKoufKOl8yEeC0PtsLIO0i+Cgq1SdYkGpf7M4Y9mm4YNwjg==
=NGJL
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/lpp5ZAvw9tM/m/WplvFPh259MJ", "n_sections": 48}, {"thread": "lpp5ZAvw9tM", "msg": "nXDBQzQA6mEJ", "author": "David Hopwood", "date_disp": "Aug 17, 2002, 4:46:42\u202fPM", "subject": "Question on pseudorandom permutations under CPA", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

I wrote:
> Exp^prp-alef_0(A, P) {
> R_j <-r Perm_X for all j \\in Keys;
> state <- null;
> for (round <- 1..) {
> k <-r Keys;
> g_round <- R_k;
> (guess, pi, state) <- A(g_round, state);
> if (guess != again) return guess;
> }
> }
>
> which is obviously equivalent to:
>
> Exp^prp-alef_0(A, P) {
> state <- null;
> for (round <- 1..) {
> g_round <-r Perm_X;
> (guess, pi, state) <- A(g_round, state);
> if (guess != again) return guess;
> }
> }

I should have said that these are indistinguishable when |Keys| is large,
not that they are equivalent.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPV62DzkCAxeYt5gVAQG3DAgAoG94xd54rBPVm/nXr1jn9UCZnlaNYt9g
peoMAEV8yvUmDcF3f8cGr+oys8KzGniVg8gn/x7LlImbBKv/1Ek8Cyl5B/AmuPdZ
rnItgE1WZ/bD/LzghbkiQ432UHwQxdFgZGgbA7mbCctzmt3QL6uk36MA5eYDVbOt
08kMTOloYHLIZEfV4AW235szaVb2gK8Ms5Y5Vgg12VDE+lpsAttJG+z9kPlUhmeP
FTRU7dF83/QkWP2htQFBX3Y1blceDmCi+j7m4AQFbkpxVvz/gI1pR0ByByRot3vA
cDs4Qiu45UE0Hmwi6NiI8i+7+VD6o7upfmuuIEIXI5Tx5rOvdBs0eg==
=nqDz
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/lpp5ZAvw9tM/m/nXDBQzQA6mEJ", "n_sections": 48}, {"thread": "lpp5ZAvw9tM", "msg": "2FIP8JDIYEgJ", "author": "David Hopwood", "date_disp": "Aug 22, 2002, 12:21:26\u202fAM", "subject": "Question on pseudorandom permutations under CPA", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Wagner wrote:
> Let S denote the set of functions R : Keys x X -> X such that,


> for each fixed k, R(k,.) is a permutation.
>

> Let E : Keys x X -> X denote the real block cipher.
> (Note, for instance, that E is in S.)
>
> Let A^O be an adversary with oracle O : Programs x X -> X.
> I will insist that A be bijection-preserving, i.e., for every
> query (\\pi, x) to O, we have that \\pi is a permutation on X.
>
>
> Adv^rk(A, E) = 2 |Pr[b <-R {0,1}; Exp^rk_b(A, E) = b] - 1/2|
>
> Exp^rk_0(A, E) {
> R <-R S;
> k <-R K;
> define f by f(\\pi, x) := R(\\pi(k), x);
> return A^f;
> }
>
> Exp^rk_0(A, E) {
> k <-R K;
> define g by g(\\pi, x) := E(\\pi(k), x);
> return A^g;
> }

Adv^prp-dalet and Adv^rk are exactly equivalent. However, I like your
definition better; I should have thought of having the permutation as an
oracle input instead of introducing state.

> The above definition has one major deficiency: it only considers
> chosen-plaintext attacks, and ignores chosen-ciphertext attacks.

I don't think that's a serious deficiency. Existing constructions for
IND-CCA2 encryption schemes that only rely on a single PRP or PRF (e.g.
CCM mode), applied to a PRP or PRF that is secure against this class of
related key attacks, should yield an encryption scheme that is secure
against the same class of related key attacks, if I'm not mistaken.

The same may not be true of encryption schemes that use more than one
PRF or PRP, because under related key attack the keys for each scheme
may not be independent. Maybe that could be fixed, but it would require
further analysis.

BTW, the usual term for a PRP where the adversary is given an oracle
for the inverse function is "SPRP" (super-pseudorandom permutation family),
rather than "PRP-CCA". An SPRP isn't necessarily required for CCA-secure
encryption (although it's plausible that most good block ciphers would
be SPRPs anyway).


"John A. Malley" wrote:
> After reading David Hopwood's post and David Wagner's post, I think
> there's another way to describe the problem. David Hopwood comes close
> to what I had in mind with prp-dalet but its state variable makes me
> think of Adv^ind-cpa.

If you make pi an input to the oracle as David Wagner did, then you avoid


the need for a state variable.

[snip]


> Let S = the set of functions R: K x X -> X such that for each fixed k,
> R(k,.) is a permutation.
>
> Let SE = ( K, E, D ) be a private key encryption system, terms defined
> as in Chapter 6 of Lecture Notes on Cryptography, Shafi Goldwasser and
> Mihir Bellare, August 2001.
>
> SE is in S.
>
> Let Perm^K denote the set of permutations of K. Let pi() denote a
> permutation from Perm^K.
>
> Let < pi(k), m > denote a pair of a change to a secret key and a message
> to encrypt under that new key.
>
> Let < pi, M > demote a sequence of <secret key change, message> pairs,
> or < pi(k)_i, M_i > for some value i >=1.
>
> The oracle PI_k( < pi, M >, b ) // b is an element of {0,1}, k <- R K //
> is defined as follows:
>
> World 0: Whenever the Adversary makes a query < pi(k), m > to its
> oracle, the oracle computes c <- R_pi(k)[m] and returns the result as
> ciphertext.
>
> World 1: Whenever the Adversary makes a query < pi(k), m > to its
> oracle, the oracle computes c <- E_pi(k)[m] and returns the result as
> ciphertext.
>
> Define the experiment Exp^ind-dalet-b( SE, A ) as follows:
>
> Exp^ind-dalet-b (SE,A) {
> b <- R {0,1}

If b is an input to the experiment, it can't also be the result of tossing
a coin in the experiment.

> k <- R K
> d <- A^PI_k( < pi, M >, b )
>
> return d
> }

You seem to be missing the step "R <-r S;" in World 0 (since this is only
done once, it seems odd to put it in the definition of the oracle rather than
the definition of the experiment, although I suppose it could be done that
way if the oracle is stateful). Otherwise this appears to be the same
property that David Wagner described.

> Define the ind-dalet advantage of A as
>
> Adv^ind-dalet (SE,A) = | P[ Exp^ind-dalet-1 (SE,A) = 1 ] - P[
> Exp^ind-dalet-0 (SE,A) = 1 ] |

(In case anyone is confused by the difference between this way of writing
the advantage function and the 2.|Pr[b <-r {0,1}; Exp^prop_b(scheme,A)] - 1/2|
way, it's just a matter of taste - they are entirely equivalent.)

> and denote the ind-dalet advantage of SE via
>
> Adv^ind-dalet (SE)(t, q_e, u_e) = max { Adv^ind-dalet (SE,A) }
> A
>
> where the maximum is over all A having time-complexity t, making to the
> PI_k oracle at most q_e queries the sum of whose lengths is at most u_e
> bits.

Incidentally, I don't think it's necessary to define a maximum over all
adversaries as part of a security definition; the security property is
specified completely and rigorously by the Adv^prop(scheme, A) form.
If you're proving the security of a specific scheme, you can include
constraints on the attacker that are relevant to the proof at that point,
instead of having to predict what they will be in advance.

> We should be able to add a decryption oracle D_pi(k) and <secret key
> change, ciphertext> pairs < pi(k)_i, c_i > and its analogous sequence <
> pi(), C > to define the experiment Exp^ind-dalet-cca-b( SE, A ).

See my comments about chosen ciphertext attacks above.

So in summary, we can define three properties, PRP-RK, SPRP-RK, and PRF-RK,
using the following experiments:

P : Keys x X -> X
A^prp-rk : (Perm_Keys -> Perm_X) -> {0, 1}
Adv^prp-rk(A^prp-rk, P) = 2.|Pr[b <-r {0, 1}; Exp^prp-rk_b(A^prp-rk, P) = b] - 1/2|

Exp^prp-rk_0(A, P) {


R_j <-r Perm_X for all j \\in Keys;

k <-r Keys;
for pi : Perm_Keys, let f(pi) = R_pi(k);
return A^prp-rk(f);
}

Exp^prp-rk_1(A, P) {
k <-r Keys;
for pi : Perm_Keys, let g(pi) = P_pi(k);
return A^prp-rk(g);
}

- ----
P : Keys x X -> X
A^sprp-rk : (Perm_Keys -> Perm_X) x (Perm_Keys -> Perm_X) -> {0, 1}
Adv^sprp-rk(A^sprp-rk, P) = 2.|Pr[b <-r {0, 1}; Exp^sprp-rk_b(A^sprp-rk, P) = b] - 1/2|

Exp^sprp-rk_0(A, P) {


R_j <-r Perm_X for all j \\in Keys;

k <-r Keys;
for pi : Perm_Keys, let f(pi) = R_pi(k),
finv(pi) = {R_pi(k)}^{-1};
return A^sprp-rk(f, finv);
}

Exp^sprp-rk_1(A, E) {
k <-r K;
for pi : Perm_Keys, let g(pi) = P_pi(k),
ginv(pi) = {P_pi(k)}^{-1};
return A^sprp-rk(g, ginv);
}

- ----
F : Keys x X -> Y
A^prf-rk : (Perm_Keys -> (X -> Y)) -> {0, 1}
Adv^prf-rk(A^prf-rk, F) = 2.|Pr[b <-r {0, 1}; Exp^prf-rk_b(A^prf-rk, F) = b] - 1/2|

Exp^prf-rk_0(A, F) {
R_j <-r (X -> Y) for all j \\in Keys;
k <-r Keys;
for pi : Perm_Keys, let f(pi) = R_pi(k);
return A^prf-rk(f);
}

Exp^prf-rk_1(A, F) {
k <-r Keys;
for pi : Perm_Keys, let f(pi) = F_pi(k);
return A^prf-rk(f);
}

We also should have something like Adv^ind-rkcca, defined for encryption
schemes. I'll do that in another post.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWRmSzkCAxeYt5gVAQHm+wgAtVngCdennnNgFwJcm3m4V+rIWEKLN87b
ANogq3brSUtltHirqzsrD7/GAKS+CbGGUDpUOzXtIvk6+vcSM86lZMK0gy0Y7ZNm
Ja1koDsqFIAjLzgTtMc2hs/r4YOKW49ukAHsMqT3oG9ioVHFL/GkUbbNGFvMCfxo
yiScXJcdI64Hwczwx0zi/rM/6S7vFPYSD/EpXRgCMvFhNrmNLs/iOR5iXwszWlEJ
FjXekqbOUwx0/AfUqZoLWd52ov/gVQLeE7NKLbg8ECaf7z1HeMguZUTKEmqCUs3F
YiIdOKCURZIaH7eL5j3wAxMJa3sX1leVKIRglqgY4L7Y5BXPtwCg2w==
=sVh+
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/lpp5ZAvw9tM/m/2FIP8JDIYEgJ", "n_sections": 48}, {"thread": "lpp5ZAvw9tM", "msg": "enY3N2HTv8gJ", "author": "David Hopwood", "date_disp": "Aug 25, 2002, 11:55:00\u202fAM", "subject": "Question on pseudorandom permutations under CPA", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"John A. Malley" wrote:
> David Hopwood wrote:
> [...]
> > So in summary, we can define ... SPRP-RK ....
> > using the following experiment(s):
>
> > - ----
> > P : Keys x X -> X
> > A^sprp-rk : (Perm_Keys -> Perm_X) x (Perm_Keys -> Perm_X) -> {0, 1}
> > Adv^sprp-rk(A^sprp-rk, P) = 2.|Pr[b <-r {0, 1}; Exp^sprp-rk_b(A^sprp-rk, P) = b] - 1/2|
> >
> > Exp^sprp-rk_0(A, P) {
> > R_j <-r Perm_X for all j \\in Keys;
> > k <-r Keys;
> > for pi : Perm_Keys, let f(pi) = R_pi(k),
> > finv(pi) = {R_pi(k)}^{-1};
> > return A^sprp-rk(f, finv);
> > }
> >
> > Exp^sprp-rk_1(A, E) {
> > k <-r K;
> > for pi : Perm_Keys, let g(pi) = P_pi(k),
> > ginv(pi) = {P_pi(k)}^{-1};
> > return A^sprp-rk(g, ginv);
> > }
> >
> [...]

Above f/g and finv/ginv are oracles that return another oracle, which is
probably unnecessarily confusing. Also I should really distinguish between
the types of oracles and the types of functions.

Here's a simpler version:

P : Keys x X -> X

A^sprp-rk : oracle(Perm_Keys x X -> X) x oracle(Perm_Keys x X -> X) -> {0, 1}


Adv^sprp-rk(A^sprp-rk, P) = 2.|Pr[b <-r {0, 1}; Exp^sprp-rk_b(A^sprp-rk, P) = b] - 1/2|

Exp^sprp-rk_0(A, P) {
R_j <-r Perm_X for all j \\in Keys;
k <-r Keys;

for pi : Perm_Keys and x : X, let f(pi, x) = (R_pi(k))(x),
finv(pi, x) = ({R_pi(k)}^{-1})(x);
return A^sprp-rk(f, finv);
}

Exp^sprp-rk_1(A, E) {
k <-r K;

for pi : Perm_Keys and x : X, let g(pi, x) = (P_pi(k))(x),
ginv(pi, x) = ({P_pi(k)}^{-1})(x);
return A^sprp-rk(g, ginv);
}

> > We also should have something like Adv^ind-rkcca, defined for encryption
> > schemes. I'll do that in another post.
>
> I looked at the experiments for SPRP-RK and reread crypto lecture notes
> on-hand, and still I'm stumped:
>
> what is the input to the decryption oracle in Exp^sprp-rk-0(A,P) and
> Exp^sprp-rk-1(A,P)?

In the simplified version, it is (pi \\in Perm_Keys, x \\in X).

> The encryption oracle takes chosen plaintexts and returns ciphertexts.
> The decryption oracle can't decrypt those ciphertexts.

No, there's no restriction on decrypting those ciphertexts. It doesn't help
the adversary to decrypt them, since it already knows the answer (in
both worlds). This is different from IND-CCA2, where the ciphertext that
results from the "find" stage is not allowed to be decrypted. Here there's
no "find" stage.

> I can see applying a function to the encryption oracle's outputs and
> feeding the result to the decryption oracle. I can see that not being
> labeled a chosen ciphertext attack since the Adversary must work with
> whatever results he gets from the encryption oracle.

The adversary can input anything (of the correct types) to either oracle.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWj9kzkCAxeYt5gVAQGXFAf/WlkbmcOLxzhaYlZiWHk51FO9NyXRejoc
0W5ROrG2qfz2Ew7k1Fh6dfc12Fxjd8cff9FQ/EwnLh8BbagJJLhuTtnmDV7yOMkZ
uIKlx+rUl/zTJgmX5I1Am6XZALvTSLxaH3KC/mWQAxw0ZVWi0y3TV12o3s71giP1
mMIsd24pA2qcaSSWSPT+iEEiWhRlEAV1vXTk07+stAj55cns3wIGYW49DBSme/wj
CBnysgLtsb/B9VuB0YesDBljUFmzVp9gEwv3fVaDUBhd86D4y4lYN9O3PDqaRmDb
wjix7YH0RcbUpeg7OnfTH0RRqPINW0aJJD/AVGnjPrT4nYKF5gzQfA==
=tB/K
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/lpp5ZAvw9tM/m/enY3N2HTv8gJ", "n_sections": 48}, {"thread": "lpp5ZAvw9tM", "msg": "6ltowvVdh_YJ", "author": "David Hopwood", "date_disp": "Sep 2, 2002, 10:56:29\u202fPM", "subject": "Modelling security against related-key attacks (was: Question on pseudorandom permutations)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

I wrote:
> So in summary, we can define three properties, PRP-RK, SPRP-RK, and PRF-RK,

> using the following experiments: [snip]


> We also should have something like Adv^ind-rkcca, defined for encryption
> schemes. I'll do that in another post.

Here it is. I'll use the "left-or-right" formalisation of indistinguishability
(e.g. see [BN00]), and call the property LOR-RKCCA.

[Additional notation: 'f : X r-> Y' and 'let f(x) r= y' are used for
nondeterministic functions or oracles.]

Recall that in the left-or-right formalisation, for key k and coin toss b,
we define the "left-or-right encryption oracle" E'(x_0, x_1) = E_k(x_b).
To adapt that to take into account related-key attacks, we let the attacker
specify two (key permutation, plaintext) pairs, instead of two plaintexts:

E : Keys x PT r-> CT
D : Keys x CT -> PT
A^lor-rkcca : oracle(Perm_Keys x PT x Perm_Keys x PT r-> CT) x
oracle(Perm_Keys x CT -> PT) r-> {0, 1}

Adv^lor-rkcca(A^lor-rkcca, E, D) =
2.|Pr[b <-r {0, 1}; Exp^lor-rkcca_b(A^lor-rkcca, E, D) = b] - 1/2|

Exp^lor-rkcca_b(A^lor-rkcca, E, D) {
k <-r Keys;

for pi_0, pi_1 : Perm_Keys and x_0, x_1 : PT with |x_0| = |x_1|,
let E'(pi_0, x_0, pi_1, x_1) r= E({pi_b}(k), x_b);

for pi : Perm_Keys and y : CT,
let D'(pi, y) = D(pi(k), y);

// it is not permitted to query D' on (pi*, y*) if y* was
// the output of a query to E' with pi_0 = pi* or pi_1 = pi*.

return A^lorind-rkcca(E', D');
}

Adv^lor-rkcpa is straightforward; just remove the decryption oracle.

We also need an INT-RKCTXT property analogous to INT-CTXT:

A^int-rkctxt : oracle(Perm_Keys x PT r-> CT) x
oracle(Perm_Keys x CT -> {0, 1}) r-> ()

Adv^int-rkctxt(A^int-rkctxt, E, D) =
Pr[Exp^int-rkctxt(A^int-rkctxt, E, D) = 1]

Exp^int-rkctxt(A^int-rkctxt, E, D) {
k <-r Keys;

for pi : Perm_Keys and x : PT,
let E''(pi, x) r= E(pi(k), x);

for pi : Perm_Keys and y : CT,
let D''(pi, y) = 1, if D(pi(k), y) != INVALID,
= 0, if D(pi(k), y) = INVALID;

if (A^int-ctxt(E'', D'') makes a query D''(C) that returns 1,
but C was never a response of E'')
then return 1; else return 0;
}

and a property SUF-RKCMA for message authentication codes:

Tag : Keys x M r-> T
Ver : Keys x M x T -> {0, 1}
A^suf-rkcma : oracle(Perm_Keys x M r-> T) x
oracle(Perm_Keys x M x T -> {0, 1}) r-> ()

Adv^suf-rkcma(A^suf-rkcma, Tag, Ver) =
Pr[Exp^suf-rkcma(A^suf-rkcma, Tag, Ver) = 1]

Exp^suf-rkcma(A^suf-rkcma, Tag, Ver) {
k <-r Keys;

for pi : Perm_Keys and x : M,
let Tag'(pi, x) r= Tag(pi(k), x);

for pi : Perm_Keys, x : M and y : T,
let Ver'(pi, x, y) = Ver(pi(k), x, y);

if (A^suf-rkcma(Tag', Ver') makes a query Ver'(pi, x, y) that returns 1,
but y was never returned by a query Tag'(pi, x))
then return 1; else return 0;
}


[BN00] Mihir Bellare, Chanathip Nampremprey,
"Authenticated Encryption: Relations among notions and analysis of
the generic composition paradigm,"
Preliminary version in Advances in Cryptology - ASIACRYPT '00,
Lecture Notes in Computer Science Vol. 1976 (T. Okamoto ed.),
Springer-Verlag, 2000.
Full version (September 25, 2000) available from
http://www-cse.ucsd.edu/users/mihir/

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPXQkezkCAxeYt5gVAQEcfAf+KvnUsI2mpQgN0c+gJjHpgqKahqKhJKpq
MbjaPXVhpENaIJYXUvNq3+/6VQjQ/BZAMr33yf37fACUud9g1aaKFcTj8TcXK2BZ
ObN+FaPKDo4T+dCAWMxKR0um9PDj1QdksLux6y0vf3zzzzldaJPfXxCCNddL6h//
JKwfo3a1tHQpz76P0TLa4H9l5tM2o9KQXw1uL+KCU6Vro8Pz8/qo5wR2Y1uiRLn9
3YeS00OHs5JW7iPy9YwX/Foh1jA7XiBrYMhTHnhdgZE063qtmqrOeMDI1KP3A1ZQ
iCY0g/44rA2N0ZXjJtGo54IF55B+wVUJBQDk0obedgFG1nx4V57JRQ==
=fagp
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/lpp5ZAvw9tM/m/6ltowvVdh_YJ", "n_sections": 48}, {"thread": "lpp5ZAvw9tM", "msg": "orFQKSr31gwJ", "author": "David Hopwood", "date_disp": "Sep 2, 2002, 11:31:50\u202fPM", "subject": "Modelling security against related-key attacks (was: Question on pseudorandom permutations)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Hopwood wrote:
> Exp^lor-rkcca_b(A^lor-rkcca, E, D) {
> k <-r Keys;
>
> for pi_0, pi_1 : Perm_Keys and x_0, x_1 : PT with |x_0| = |x_1|,
> let E'(pi_0, x_0, pi_1, x_1) r= E({pi_b}(k), x_b);

I should also have mentioned the constraint that either pi_0 != pi_1 *or*
x_0 != x_1.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPXQsnTkCAxeYt5gVAQFvXwf+OnWoMRPgFO1H+px+YWEA4Cov9djnM/HK
lEe17Z/9mhCAUZu9PB3OK+qw5EHBx8o05pd27spFNY3HMZWO3/3/5iwDz3i/cE1l
A6GbvIi5selHln6W/Z2sOzOEV+v8XoxiJ4ocPl/DGJNXKKOXC4avGRyJdX8t/cAe
3uMpPtBhgbB1ig8o91I3mi9FE+BptJsjFmNzGWQtXdAXMvbYIDcRwUub4aJOpcd/
38VGfoKe4w+QNcs3SugPou11eGvk9Dtha0Mdy7V+Zf6L/WawkXGcpue518DFiN1w
TZS8C6eiwadCT34eNwk62APiF68Gk6hdIN0eo7avF2jUj9Rnr7ZiAw==
=tCrf
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/lpp5ZAvw9tM/m/orFQKSr31gwJ", "n_sections": 48}, {"thread": "lpp5ZAvw9tM", "msg": "7aRMuoWeS4gJ", "author": "David Hopwood", "date_disp": "Sep 3, 2002, 2:04:52\u202fPM", "subject": "Modelling security against related-key attacks (was: Question on pseudorandom permutations)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Hopwood wrote:
> David Hopwood wrote:
> > Exp^lor-rkcca_b(A^lor-rkcca, E, D) {
> > k <-r Keys;
> >
> > for pi_0, pi_1 : Perm_Keys and x_0, x_1 : PT with |x_0| = |x_1|,
> > let E'(pi_0, x_0, pi_1, x_1) r= E({pi_b}(k), x_b);
>
> I should also have mentioned the constraint that either pi_0 != pi_1 *or*
> x_0 != x_1.

Sorry, ignore that followup. There shouldn't be any such constraint.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPXT5nTkCAxeYt5gVAQGl0wgAy0rXJ9tVgdkHok6kb3hmyBIsb1lttV++
5AH+FOl9SdtYAWIiN66aNjS/FsYt+3SFJqxyS/vLIAlze7SzmIkjXQ98u2npskVN
O20jhrvOnK/kH/Mi74YmvnP3fLpGb3Hg1UFKpOUDi74JAoYRw+tmGYmyrRCUoDrp
lBOjyDr9TbPpqfU/7FLuXkg5KUwmYJJe4Oe/kI9N025PiHe8xJgU47nbrpi3nqCr
Mg4jQXQ+l1YWi4gm37AS9AjNMvY7Sito7YmJNN8Qezam8vroI6Dm87t/9+vFxHMk
a4YK8tXRr/hskzkvcI2yLKmyoHlqqLRw9upj53nMvI+Frmr0bhVXzQ==
=uA0G
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/lpp5ZAvw9tM/m/7aRMuoWeS4gJ", "n_sections": 48}, {"thread": "oPtyZm4yeVE", "msg": "6caovQ9qDUcJ", "author": "David Hopwood", "date_disp": "Aug 2, 2002, 11:30:56\u202fPM", "subject": "Challenge to David Wagner on TCPA", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"AARG! Anonymous" wrote:
> Roger Schlafly wrote:
> > "AARG! Anonymous" <rema...@aarg.net> wrote
> > > Do you think this makes sense? This form of "open" Palladium is much
> > > more consistent with what Microsoft describes in its white paper, and
> > > also with the documented workings of TCPA.
> >
> > No, I don't think that makes sense. With no signature, the Sony app
> > could be hacked to do something different from what Sony wants it to do.
>
> No, it could not. Look back at my proposal:
>
> : 3. When connecting to the Sony music service, Palladium lets the
> : Sony music client app prove that it is running.
> : 4. The service downloads songs to the client app based on the subscription
> : model.
>
> Remember that Palladium provides for "attestation", that is, securely
> reporting to third parties what software is running. If the Sony
> app is hacked, it will have a different hash than if it were legitimate.

Whether the Sony app is authenticated using a hash or a signature is hardly
relevant. The content is still restricted from being played other than by
the Sony app (which will probably only be available for Windows, or at least
TCPA-compliant OSes). I don't see any sense in which this could be called
"open".

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPUtOADkCAxeYt5gVAQHlOgf+KhS0hMS/h++x1sLcQ9BBjh4H3XTKjPGG
XLtWymgNAy3S6FOZxQ1Q+WbbnC1JDsrwS9yQwbBevF4VIgIaaAqQ7jhr4I2UC0qr
mn54wsGSWr2nhmrI6p03oZpO33989SoyxOzuiSbXI2qO867h2x/Jg3SjL1B+sXS0
rjOMa+31xDtXSgPxzT/tcnm/wZHBiqU+eZtE5YqoXeK20U/Mh7lESnRrJ3cNx3on
DffsxnGP7MuPR6Xa7Pxl5lzx6UgQUqTINoVcx7V2CyT3R0SVqczI0wmw8CdqmrQP
OSRhP8Xe1R0z9j0aByKP7ZfUTVt/oHONKWa/0IQvJWIbqfhYaA4AvQ==
=AEO6
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/oPtyZm4yeVE/m/6caovQ9qDUcJ", "n_sections": 79}, {"thread": "rRgZdSUK7g8", "msg": "2fCOGPWlW9cJ", "author": "David Hopwood", "date_disp": "Aug 20, 2002, 3:26:20\u202fPM", "subject": "How the cypherpunks were defeated and how the west was won", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Thomas J. Boschloo" wrote:
> Remember nym reply-blocks? Any reply-block can be replayed by sending a
> new and different message to your nym. The message tail will be
> different, the reply-block will be the same after exiting each remailer.
> No remailer directive will help you prevent this. The protocol is
> fatally flawed.
>
> So how does this break cypherpunk security? Well, in the same way a nyms
> security is broken above. An attacker can replay any intercepted message
> at every cypherpunk hop they want by feeding the same 'reply-block'
> (your cypherpunk message before ariving at that hop) and appending a
> different tail. They can repeat this process at every remailer hop and
> thus follow any message you send through the remailer network.

Yes, I was under the impression that it was well known that cypherpunk
(Type I) remailers are subject to replay attacks. What is less well known
is that there are active "tagging" attacks that also work on Mixmaster
(Type II) remailers, although they require modifying several messages
sent along the same path.

> If only there were ways to make it known to the remailers that a message
> was send from a nym and not from a normal account..

Doesn't solve the problem.

> So what is a better way to fix this problem? Well, instead of fixed
> reply-blocks nym users could send 'tokens' to their nym. Each token
> being a new reply-block for single use. When a nym runs out of tokens,
> its owner will no longer receive messages. The last token could be
> either used to send a warning message to the user or be used for the
> last message.

Yes, that's one of the proposals for how Mixminion (Type III) nyms will work.
Did you read the design document I pointed out (www.mixminion.net)? This is
in Section 6.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWKXnTkCAxeYt5gVAQExbQgAlpilxRepsgDeJDCLA/lVouh5DP94Qk4+
P5hK7VEOfiy0eOr2v9Io51CKEwR3eVa/Z97atITF9MLScREGVdud12HfJX80WDoW
RbLJJ0uPF2DtTGNs3ZpgMJK+0u5FL3n4loWkLT3Rj5i8M0m56/t0MLdD26iDkvG5
9ogLuCdnQSNEgJj9xaD3aW96CsvR4C2hk74x89/QLEhIiU5IY6u7DvoDAFdLQRSH
1FzEMjUh5Uwbwmy0GZud3s+WuKrJrowxd6fQ9wipfRh6c/6wuKwOaBc+YTZl7ZzP
1LVkxxCfLEOC4zZ9PI0g1uDH/BS6IMHP+BlJ/7ik17p3KpHTKpKqYw==
=2pmA
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/rRgZdSUK7g8/m/2fCOGPWlW9cJ", "n_sections": 5}, {"thread": "samM4g3_OBg", "msg": "iaDBmkkg74cJ", "author": "David Hopwood", "date_disp": "Aug 24, 2002, 2:03:37\u202fAM", "subject": "good encryption algorithms", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

James Yates wrote:
> Anyone know where I can get the source code and/or description
> (papers) for some encryption algorithms?

<http://www.users.zetnet.co.uk/hopwood/crypto/scan/>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWcNaDkCAxeYt5gVAQFZiQf/XxAn+6wGMQf61dgiD0z/HG4aJlCUFOsH
lOe9cj2lGfDS/hP7jvLvoKmSZGb5j46dZcO7TvJob16xh69P9ZzimZLK9VA3IFH/
nWR6LYS9v7FBSTAHNDOKUohkHDBVWo9AwsVV06matfoe8+mvfN0BF0lc7aW0AAPm
hMinkDCtCQjNQr+klxOQtVzjSlaiXDUjFuiNr51uMJNRC+rNdzCeyI+Et8/HTHKX
nmjcnusISD+12ehGPOsJKE2ZVAnAJOW31mQdYsq61+K/3kK/1ZAFUdKmvMwkvFnh
2ev3mizyHoUgt8vYMAsgs6LY2qLz68Gr32O4oEjxmNzXHOim+0mqjg==
=Ena2
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/samM4g3_OBg/m/iaDBmkkg74cJ", "n_sections": 6}, {"thread": "sqjge6O1JuI", "msg": "giEvd9bPBw0J", "author": "David Hopwood", "date_disp": "Aug 27, 2002, 8:51:51\u202fAM", "subject": "streaming ciphers not suited for out of order packet encryption ?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

skybuck wrote:
> I would like to encrypt the complete payload of the udp packets.
>
> So the packet number will be encrypted to.

Why do you think you need to encrypt the packet number? Assuming that
the number just increases by one for each packet sent between any
(sender, recipient) pair, it doesn't give any information about the
plaintext. It only gives information about how the packets are reordered
by the network, and that's not secret - the attacker could observe it
directly.

OTOH, if packet numbers are reset at specific plaintext boundaries,
then the positions of those boundaries are leaked. So don't do that,
as far as possible. It's probably impossible to hide session boundaries,
though, whether you encrypt packet numbers or not.

Other posters have explained why you shouldn't be trying to invent
your own secure channel protocol anyway (especially over UDP).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWt1tzkCAxeYt5gVAQEqLQgAlf8zXI/aXJnZmXckIAyDw4bqCAskxBxJ
CfOpBWRYmtNkD6qalfzNQvNdfn82xbQbdqejrK9G4xFsHaDDB13e7EdXg5XP0DmR
YtBKsLIPFOQCGgFlSezgiD/YYgRmbvxFoHj0EKLxDBvex7aujAN43sMAK+1ENUUf
Udcwwd55tZ8QxP6xSja+dv2sT5C4PYZzh49sffyAFkqbyC6kZgsPooBr2ltocZp/
nBqjPblHg3GQ7upXQAOTTLcJN9DQ6ohUQH8BehO+FwFISzVE7QTNrWcigJJMYycC
WsEWiSKBG796iW4d+pEKFcZYmBAUJA965nt8z2GfjFQvsvScoRjXTg==
=N0DM
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/sqjge6O1JuI/m/giEvd9bPBw0J", "n_sections": 15}, {"thread": "wOfMAWJ2XeE", "msg": "2jh0O4yoc8MJ", "author": "David Hopwood", "date_disp": "Aug 19, 2002, 9:49:45\u202fPM", "subject": "Privilege-escalation attacks on NT-based Windows are unfixable", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

In <http://security.tombom.co.uk/shatter.html>, Chris Paget describes a
class of attacks on NT-based Windows that involve raising privileges by
sending messages to windows of privileged applications.

Although specific cases of this problem has been discussed before (e.g.
see <http://online.securityfocus.com/archive/1/80827>), what's
particularly interesting is the following part of Microsoft's response,
at <http://security.tombom.co.uk/response.txt>:

# [...] We also advise that all windows are peers on the desktop, regardless
# of privilege level of the processes that own the windows--the desktop
# is the security boundary for windows messages.

Note carefully what this means: it is impossible in principle on
Windows {NT,2000,XP,CE} for any process that has a window on the desktop
(including invisible windows) to protect itself from any other process
running on the same machine, regardless of the privilege levels of either
process. This is by design; Microsoft do not even view it as a bug.

As Chris Paget says:
> The simple fact is that Microsoft KNOWS that they cannot fix these flaws.
> The mechanism used is the Win32 API, which has been fairly static since
> Windows NT 3.5 was released in July 1993. Microsoft cannot change it. The
> only way they could stop these attacks is to prevent applications from
> running on the desktop with privileges higher than those of the user logged
> on. Microsoft believe that the desktop is a security boundary, and that any
> window on it should be classed as untrusted. This is true, but only for
> Windows, and because of these flaws. Either way, Microsoft break their own
> rules; there's numerous windows on a standard desktop that run as localsystem.
> Use my shatter tool to verify this - there's a whole load of unnamed windows
> which might be running as Localsystem, and a few invisible windows (like the
> DDE server) that definitely are. Security boundary my arse.

We knew in practice that NT was not secure against privilege escalation
attacks, but now we have confirmation in Microsoft's response that it is
not even intended to be secure in that sense.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWGdYDkCAxeYt5gVAQGnJQf+I8ptd/0XXoRSYHx+qoWfT77Hh18i2s/D
2DfLZOuPM4R3qd3BpETfE3lKXF2pL4NLQOwG+yM0A4UppGvDkZKUUedkwupZifhS
GGPBH78aIAXy4l8l+PDEIILwujeqawyW0fiPMofXiw374uoooXbv1nDM+zTsKYdx
lV2qx0HMIEmDroxNu1KAGVE7YXJoHkaYzy7EHKDesqLi8lUTK+L61s1xSx+mRWs9
shMO+2JopWwzSGoL+LkzTQkqfjK2beWpI9FJgrcUhptUUN8DSlnEYFy2Du5IeUQU
+jICRcIHlp4bKYnnoNMJBRE/+dmg570ENJmGe+d1zZq3Ezm9ORqd3A==
=2+7L
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/wOfMAWJ2XeE/m/2jh0O4yoc8MJ", "n_sections": 100}, {"thread": "wOfMAWJ2XeE", "msg": "c_uYH-MwnzcJ", "author": "David Hopwood", "date_disp": "Aug 21, 2002, 10:16:27\u202fPM", "subject": "Privilege-escalation attacks on NT-based Windows are unfixable", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Douglas A. Gwyn" wrote:
> "John E. Hadstate" wrote:
> > There are many operating systems that have successfully built and
> > maintained unscalable walls between applications.
>
> I only know of one *possible* candidate, and that was back when we
> weren't forced to support inherently flawed network protocols.
>
> Even MULTICS was violated.
>
> Modern processors have a number of "features" that make it hard to
> be certain that applications have no unintended consequences. If
> we had commercial equipment that directly supported capabilities,
> we might be able to do much better.

Capabilities can be supported on current hardware; it's not even that
difficult. See the EROS project (www.eros-os.org). In terms of its design
EROS is about the nearest thing available to a descendent of Multics.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWRJTjkCAxeYt5gVAQFhOQf/eelfV66k8YxJG6/CZ7ne8FRBKBmGyONJ
F9g51LNpBWkpjuqIrR4pZq7S+KVi3H0j6gfdKNRE0lf2RelxB0t8zUI33lBahcLM
DfvirghundU2muqq5qDPYMxK6/iBpz73ifHVc8LdZD1EWFrAQ9qXr7RCZsheolSI
iYYmdAR0ag/SagJXPHKJ1JX6IZtdkubC7tn8L1D3rIGF2zaZEkh6gg7C+cpvGP95
Mfmcg04FJrpJHdZdKMBOKIqH2Cr/EgeF6H1wqopVNTvZdsMr1mh0/D0ZuAJt9Ta4
XS6Tv+twCq0kxc1+Q1iypa6fJnxSr/eX+Kuf981OIrGCTppCez4e2w==
=tqCK
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/wOfMAWJ2XeE/m/c_uYH-MwnzcJ", "n_sections": 100}, {"thread": "wOfMAWJ2XeE", "msg": "6T3lOWS8cEMJ", "author": "David Hopwood", "date_disp": "Aug 21, 2002, 11:39:17\u202fPM", "subject": "Privilege-escalation attacks on NT-based Windows are unfixable", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

RCC wrote:
> I'd say the only real issue with this "feature" is Terminal Server services
> in user mode. You will not allow users to log on locally on your servers
> other than terminal server (I know , IIS, but this is not a CONSOLE login
> therefore users cannot get the tools to it); if the users takes over the
> workstation, this is only a local machine issue, which does not compromises
> a well secured (layered) network.

So you're basically saying that local privilege escalation doesn't matter,
because it doesn't in itself allow remote attacks? That seems completely
bizarre to me.

What exactly is the point of an OS having all the security-related APIs,
file permissions, auditing features, etc. that NT has, if it doesn't seriously
attempt to prevent privilege escalation? Might as well use a single-user OS
in that case.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWRbWDkCAxeYt5gVAQEEuAf/fS0ZdjI7WNFN/OVjmt/lewiUs0wdDosm
YORGDa4tQHkJxc9kG1VxKWoM1yaBJ2CKHspFR4KyKGVRmw4R9TMaorA17Lm2C6OQ
o/94LT7QorRwvWSjt0E4VfVqlYQpkoobmjdavuO3Q4UvsE6eRDp9L9psJr1aoZnO
16motD9EpZU5IZLWKayqbuAlE1bnUx0gQJx+7/GSN9naB91zSXbXEUM2ngdcwt79
CHFS/oEsTDiE8ZpRpah7OOj2XhauL9uyvzUZyiy0lD9G1YjzmTAm2cm8fC3CphnR
RIZa0rtno2pvKC9Cm8im3nJRVi4nb8N/456bN6XVYRVcuknYhO1Efw==
=vyQD
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/wOfMAWJ2XeE/m/6T3lOWS8cEMJ", "n_sections": 100}, {"thread": "wOfMAWJ2XeE", "msg": "7Ag8_vrbL1IJ", "author": "David Hopwood", "date_disp": "Aug 21, 2002, 11:40:39\u202fPM", "subject": "Privilege-escalation attacks on NT-based Windows are unfixable", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Alun Jones wrote:
> Edward Elliott <nob...@127.0.0.1> wrote:
> >If I understand correctly, it's not even possible to program defensively
> >against the Windows messaging exploit in question. The OS doesn't pass
> >any information about the source of messages. The application has no
> >way to distinguish a message from Admin and a message from JoeUser. A
> >setuid unix program can at least check the owner and permissions on a
> >file or set its own signal handlers.
>
> Sure it's possible. The application, since it's the one with the privilege,
> needs to make certain of its inputs. This is no different when the input is a
> Windows message queue than it is when the input is something sent over a
> network line, typed at a keyboard, or read from a file. You are correct in
> that the OS provides no information about message source to the application,
> but you are wrong in your conclusion that the application has no way to
> distinguish between messages from a privileged source and those from any other
> source -

If the OS doesn't provide any information about message source, how is the app
supposed to know? The OS kernel is the only component that can reliably provide
information about privilege levels. If we were talking about newly defined
message protocols, then there might be at least a possibility of rectifying
this problem, but we're not.

> again, it is the application that is privileged, it is the
> application that must pass and verify information validating its inputs.

No. The message protocols for GUI objects are fixed; the privileged app
can't require that the kernel pass some extra information that distinguishes
it from an unprivileged app. Also note that if Chris Paget's article is
correct, there are apparently some messages that the app doesn't have any
opportunity to validate:

# The final message that we're going to make use of is WM_TIMER. This is a
# slightly odd and very dangerous message, since it can contain (as the second
# parameter) the address of a timer callback function. If this second parameter
# is non-zero, execution will jump to the location it specifies. Yes, you read
# that right; you can send any window a WM_TIMER message with a non-zero second
# parameter (the first is a timer ID) and execution jumps to that address. As
# far as I know, the message doesn't even go into the message queue, so the
# application doesn't even have the chance to ignore it. Silly, silly, silly...

(I'm actually a little skeptical that there are messages that don't go into
the message queue, but I can well believe that it would be difficult to do
strict filtering of messages and still use any of the Windows common controls.)

> If there is no way for the application to communicate securely between its
> service component and its desktop component through Windows messages, then
> this simply says that the application must choose another avenue of
> communication that it can secure.

You seem to have completely missed the point. What I said in my original
post was:

[...] it is impossible in principle on Windows {NT,2000,XP,CE} for any
process that has a window on the desktop (including invisible windows)
to protect itself from any other process running on the same machine,
regardless of the privilege levels of either process.

You're saying that privileged processes should not have windows on the
desktop; they should communicate via IPC with an unprivileged process
instead (never mind that many privileged processes written by Microsoft
fail to do this). Fine, but that doesn't contradict the above statement,
and it also doesn't solve the problem: because the "desktop component" can
still be taken over, there's no way for the service component to require
that the unmodified desktop component is the only way to interact with it,
no matter what "validation" it does.

Also note that this approach at best only allows for two privilege levels.
If there are really only two non-equivalent privilege levels in NT, many of
the security APIs are ineffective and redundant. The original NT security
design based on VMS clearly wasn't intended to reduce to only two levels,
and it is disingenous for Microsoft or anyone else to try to claim that
this attack isn't the result of a design flaw.

Compare with, say, X-Windows, where it's perfectly possible to have windows
owned by processes with different privilege levels on the same desktop. If
by design, any process could simulate keystrokes in an xterm where the user
was logged into an administrative account, we'd consider X-Windows to be
hopelessly insecure and unfit for purpose.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWRcczkCAxeYt5gVAQHF3ggAg5IXZ37lZKXb3MgY/4HNPRO6sB5O1LX8
SJx11LKT0mEALy7W195IsuIExSI1sMxwaIBUpL6JN73EyLY8LM+9fSruqrYZ46+T
jcU7LpkV0IrNqvdRafzmSRmj3f7y78T8jDt6nYgAilsNv4ZWbbKU6bmjovB6do2f
1Jv4zX5eMWlHuTEnpA2xC76QGDZ3fMyKbCp6CDN5RYu8/zpDpKhfGZpmYUkLBbyk
d+cuE9/zVlcvHFx6KcOGMGSVyPJ4afUE/8gqTdr3A2Ymw0Mp0UMT5XzfwtJHR7R6
UwodX+7JyU9tctzboAJZE/5xiQlDiuGATgvIQc1jQYjTmwiTx5pNmw==
=DBnR
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/wOfMAWJ2XeE/m/7Ag8_vrbL1IJ", "n_sections": 100}, {"thread": "wOfMAWJ2XeE", "msg": "QIjn3lPRLRkJ", "author": "David Hopwood", "date_disp": "Aug 22, 2002, 1:12:21\u202fAM", "subject": "Privilege-escalation attacks on NT-based Windows are unfixable", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Goldberg wrote:
> Edward Elliott wrote:
> > Barry Margolin wrote:
> > > For instance, if you write a setuid application on Unix, you're
> > > bypassing some of the built-in security checks that the OS provides,
> > > and you have to program your application carefully to make sure you
> > > don't open a security hole as a result.


> >
> > If I understand correctly, it's not even possible to program
> > defensively against the Windows messaging exploit in question. The OS
> > doesn't pass any information about the source of messages. The
> > application has no way to distinguish a message from Admin and a
> > message from JoeUser.
>

> Sure it does -- just have Admin sign it's messages!

That won't work if Admin has a window on the same desktop as JoeUser, because
then there is no way for it to protect its private key.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWRyIzkCAxeYt5gVAQEaswf/Z6ghF0caukJYX+gT11Qj5ubmjEM3tXqJ
0MwC2DRN8LQsNtIUaMVI2B5xGuHY/00US+HJZkKFvfJenu+mL49v3KAa2B0O9HjP
9QS3E08ABk0vIxARR/Xz1h4peM2KnvRqo9EHu+TClQ0wlrVEexpSBlqZNUE/5HyC
ApVYxZzNhDibX3CpgnM/WZEnHctEL8yQqBwXpDmooHpyXlYNxf+J0Iej1GYZwvkm
Xhww9xROXycHCiCN+DT+pjq5AiGnOOl3ct/5i7yCfAl086HwtAVpSTsw0sT8YEP4
u+dHokIGEgkKFHA+8hWWasx3YhVkpoAwHLEPNroD6YLDxDiGxjJIJQ==
=Fub8
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/wOfMAWJ2XeE/m/QIjn3lPRLRkJ", "n_sections": 100}, {"thread": "wOfMAWJ2XeE", "msg": "K_9zzDDyKlUJ", "author": "David Hopwood", "date_disp": "Aug 22, 2002, 1:12:03\u202fAM", "subject": "Privilege-escalation attacks on NT-based Windows are unfixable", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Barry Margolin wrote:
> Alan <a__l_...@hotmail.com> wrote:


> >al...@texis.com (Alun Jones) wrote:
> >> I was saying, and you seem to have backed me up, that the problem is in the
> >> application and not in the operating system.
> >
> >You are missing a fundamental point. If I'm writing a program to run
> >on Windows, and if access control is important to my app, I have to
> >trust that EVERY OTHER program running on the box is following the
> >rules.
>

> Or you implement it in a way that prevents those other applications from
> sending fake user input to your application.

You're missing a__l__a__n's point. If any other privileged app doesn't follow
the rules [*], then any other app can elevate itself to those privileges. If
they are high enough, then your app's security is hosed no matter what checks
it does itself.


[*] noting that there is some question about whether it is practical to
follow them at all.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWRwMjkCAxeYt5gVAQHZIwf9G/DbpvFQ17seGWQne7Xv2RiaTvAElNxc
MWyOz7tZTeb9ZqDak6qJD6lgs9XVWB59ckKE5izBvFlNLaRTrlTJyBrbogol66s1
kI9oIjMgxwigMUW6ZPzcTEOv+tD7ytcgI9BGI1QjM9QjQBqpiqK5eXzuk5cwRiZ5
5iFv5C7KNjjj0rZygYJSw7he3S8h/pxbA1lgh92wO3OjXb93167ijSsjPrGek3Jj
2aJIOOjaaSVAIZhchffWRAkZtOfG7P4L7piCjgrHNXi4BwAKtLMaetFeJtvKYjcl
px+MzFr3cQtmhK1Vy41y9YBjcpw7CrizvboNXsFBdC4EKnWqQJWEaA==
=Bnto
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/wOfMAWJ2XeE/m/K_9zzDDyKlUJ", "n_sections": 100}, {"thread": "woWFtQUjSWY", "msg": "TjdRhR_o638J", "author": "David Hopwood", "date_disp": "Aug 19, 2002, 10:38:12\u202fPM", "subject": "K-of-N information dispersal for Mixmaster", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Nomen Nescio wrote (on alt.privacy.anon-server and sci.crypt):

I suggest discussing it on the mixminion-dev mailing list, which is
designing the Type III remailer protocol (archive and subscription info
at <http://archives.seul.org/mixminion/dev/>).
See <http://www.mixminion.net/> for a draft paper on the design.

My immediate take on this is that it's an end-to-end issue, and does not
require support in intermediate nodes. But yes, it would probably be a
good idea to support an IDA when fragmenting/reassembling messages.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWGrejkCAxeYt5gVAQEYuwf/fiMfYhVtTlVaJU+5UEGL/hOEvfLm9h3A
eAkNx2zGXncq8gPboJGr9Ed0H4Dt2ln84Tm7PcRxgp4nkgk5D/FUGwbVZF6Qe9dQ
+NVrOFzf3THiWn0IByUjWPZ/HEAZ0DT7NVFr6JFNbJSbzxEOVlV+aUQXEP5zwjuv
JlrND1tDTiymiub4c6KdNhS94wjkGDdM7j7R6hypUAPO2xxi3w6H6h6xtMUK6eqB
NTzkp3lg51iykljObFQZrlGoF+agflxX85fUjoccsPZLKiKUVztUEiinshcg4B1O
vBrX7yzPHq9WunOaQ4S4BhLwH6EvB503s/jtelkJA50PmZNHCAgyxQ==
=QoE2
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/woWFtQUjSWY/m/TjdRhR_o638J", "n_sections": 6}, {"thread": "woWFtQUjSWY", "msg": "s1pFDKW0OxoJ", "author": "David Hopwood", "date_disp": "Aug 20, 2002, 9:44:39\u202fAM", "subject": "K-of-N information dispersal for Mixmaster", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Thomas J. Boschloo" wrote:
> David Hopwood wrote:
> > Nomen Nescio wrote (on alt.privacy.anon-server and sci.crypt):
>
> > > Wouldn't this be a good case for using an Information
> > > Dispersal Algorithm which is redundant enough to allow full
> > > recovery of the original data even in a lossy environment?
>
> You mean like 'Copies=2'?

No, he means like
<http://www.google.com/search?q=information+dispersal+algorithm>.

> Also, delivery sureness between every hop, like TCP adds to IP will be
> much more better.

TCP strictly does only end-to-end error detection and retransmission, so
it's not a good example. However, the Type III protocol will try to ensure
delivery between each hop.

[...]


> > I suggest discussing it on the mixminion-dev mailing list, which is
> > designing the Type III remailer protocol (archive and subscription info
> > at <http://archives.seul.org/mixminion/dev/>).
> > See <http://www.mixminion.net/> for a draft paper on the design.
>
> Without having read the document, I have no great trust in the Mix3
> protocol.

This is not the protocol originally proposed for Mixmaster 3.

> Type I and nym servers should be completely retought for this
> to be an improvement.

Can I suggest that you read the document, then? It does completely rethink
nym servers, and obsoletes Type I.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPWJHmTkCAxeYt5gVAQGyMgf/VNos6nNmB9V0lN+vX2ZrrQcLxmVfQ6uf
cfP0T4ZGdbBlwxZ+wirjc0UShDHFi1tdZSV5Lik4n6mj0gNjzN1re6K6pecULgR7
dnkTyu3sLrmvQQ2e/j0b09hP1D/JOZGoftuK4N43c1rMI8yGoTz0+Olur7piGG1o
4IUcFb2/hQe1oLS+owj0dHvRtyiw+8vNtv93fj/BCT61LssH2xPUIinXagkPya4v
3rZogGnKGNkqUgDGl1X6cKYDxhdUo9zvQ21oT2w0KH2JxmU4sNnCXXo0KvmYYJDK
kxKNPENrRU/j4lM7B9CNfh5gjbv0dizEkkcImjd6NKl5tSlkRf5T5w==
=pixs
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/woWFtQUjSWY/m/s1pFDKW0OxoJ", "n_sections": 6}, {"thread": "y76scm0MbUo", "msg": "SvDhL7vw0oAJ", "author": "David Hopwood", "date_disp": "Aug 10, 2002, 11:56:32\u202fAM", "subject": "Q: Trust in an X.509 certificate", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"John E. Hadstate" wrote:


> "Paul Rubin" <phr-n...@NOSPAMnightsong.com> wrote:
> > Edward Elliott <f...@bar.com> writes:
> > > And unfortunately Internet Explorer doesn't even verify the validity
> > > of the signing certificate, much less the constraints placed on it,
> > > making CAs next to useless for 85%+ of end users.
> >
> > That is freaking brilliant. Incredible. Great work, Microsoft.
> >
> > Verisign (or anyway Thawte)'s user agreement for SSL certificates
> > requires the user to agree to not use his certificate to sign other
> > certs. They phrase it in terms of implementations that don't bother
> > checking the attribute bits. I can't help wondering if they knew of
> > this bug. Wow.
>
> This isn't exactly new news. It is well known that they don't even
> bother checking the CRL/CKL for revoked or compromised certs.

It is new news. Allowing anyone to act as though they were a CA (as far
as IE is concerned) is much more serious than not checking for revokation.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPVU3dTkCAxeYt5gVAQGInQf/YvVD5SMP3gIH1sT81cRgBPFBA3AEGLh3
yVZksGJhkd+nFt2ChSJFAC5imohMxYlUBm8ciAzpha88JD9jxHEmh9HN9HaIdT3D
T7DBK9FYGtgHn1RcoCL92kkjEwbUGOf3x7YzOk8RhZRn9p4jmQtWSdd0QR2TmHfj
s+p0oC902JddS4D6ETmFDDoYYyMfkznSBzyaXjHMSq3AEuP+nQQaUbO3keW8BObD
tXyuvH+gPM1tFtacty+sOr/ihJLOQxcmI+8a2IaJQ30Kd3+6nfTpghmDpXNZw3Z3
FSXiwVVAoZx+tu1cM/vI4dCWCeZuuCuVf6I1MaYk7s9z6HMa29KqFg==
=jaCy
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/y76scm0MbUo/m/SvDhL7vw0oAJ", "n_sections": 9}, {"thread": "1OMcwqq_8N8", "msg": "d9-rhT0zKRoJ", "author": "David Hopwood", "date_disp": "Nov 6, 2002, 1:43:06\u202fPM", "subject": "Blowfish Initialization", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Kris wrote:
> I have a quick blowfish initialization question. I cannot
> seem to correctly get the values of the P-array. According to the
> specification, P[0] should be the hexadecimal value of the leftmost 32
> bits of pi (fractional parts, that is). I've read that the correct
> answer is 0x243F6A88 for P[0], but I can't seem to find out how this
> number is gotten.

Suppose that you want the first n base-B digits of the fractional part of
some constant x; this is:

big_endian_conversion_to_base_B(floor((x - floor(x)) * B^n))

where ^ means exponentiation, and floor(x) is the largest integer <= x
(i.e. rounding down).

So for pi in base 2^32:

big_endian_conversion_to_base_{2^32}(floor((pi - 3) * 2^32n))

For example with n = 2, we get floor((pi - 3) * 2^64) = 0x243F6A8885A308D3,
which converts to <0x243F6A88, 0x85A308D3>.

I can't immediately think of any crypto algorithms that use expansions of
constants but using some other definition than this one (although that
doesn't mean there aren't any).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPchk/TkCAxeYt5gVAQG4ZQf9EUuldwwLMG/oPy9NrdGXb1PyFmVR3qdp
glVufFuU0fscWXaFYzrOJ8F6qPIe/rP/WU9eadJW6pGMnB/8I/zeQkMphS6HWR60
WXGCP9m/6PVtEWvc4Uj4Lv10A6o3UHOhZ4TVy/n0ZOnx1g9lRicZXooVlofZTmha
zEgEdA5DNWOfOGir5TmAWAVhuZGPyy21N4zgIOogEj6ZWH2uLEJlIkxOovne/3In
E8NnAaJ8+bVKiYvJ7emmA3Oi0xwEkoB8S8sRal7R8QCjG8R7SFHFAYzqCJJremRv
Hxcg7QJkplzBR5GrI8pGz6sllb3b2eH1yXD9THy32EH89SmIBAtD+w==
=6A2w
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/1OMcwqq_8N8/m/d9-rhT0zKRoJ", "n_sections": 11}, {"thread": "1a_KjlCIUHg", "msg": "4fjT5fcvLYUJ", "author": "David Hopwood", "date_disp": "Oct 8, 2002, 6:50:32\u202fPM", "subject": "Proposal for secure communication protocol", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jesper Nordenberg wrote:
> I am implementing a secure protocol between a client and a server. The
> server has a public RSA key for each client and each client have a
> private key. The obvious problem is if someone obtains the private key
> of a client, in which case the person can act as the client and connect
> to the server. To protect against this a common method is to encrypt the
> private key with a secret password. The problem with this method is that
> the person which steals the private key can use a brute force attack to
> crack the password.

These are similar to the requirements for a "strong password protocol";
examples are SRP-3, PAK-X, B-SPEKE, etc. Most of these assume that the
client can't store any data at all (apart from the password in the user's
memory), but assuming that it can't store data securely is much the same
as far as the analysis goes.

Here is my analysis:

- it's essential that the DH result in step 1 can't be forced into a
small subgroup (otherwise, there are several attacks including replay
and off-line dictionary search).

- for most of the steps, 'encrypt' would have to be authenticated
(a.k.a. nonmalleable) encryption.

- in steps 6 and 7, the outer encryption is with the symmetric key a.
This *must not* be authenticated encryption, and the ciphertext of
the inner encryption (with dh) must be indistinguishable from random.

These problems would be fixable, but there is one that can't easily
be fixed given your threat model:

- if an attacker steals pri, then it can perform a MITM attack. The
values of dh for client <-> attacker and attacker <-> server will
be different, but the attacker can hide this by decrypting and
reencrypting. At step 6, the attacker gets the message
"encrypt(a, encrypt(dh_server, d))", which given "encrypt(pass, a)"
can be used in an off-line dictionary search to confirm a guess for
the password.

Even so, this is quite an interesting attempt, similar in some ways
to DH-EKE. Don't feel too discouraged: most strong password protocols
proposed here get thoroughly shredded.

> The security relies on that a man in the middle cannot (likely) generate
> the same DH keys for both the client and server communication. Is this a
> correct assumption?

It's not a correct assumption, but actually that isn't what the security
relies on. You're relying on the fact that a MITM won't know either 'pri'
or 'pub' in step 2, and therefore the client's check in step 3 will fail.
The message in step 2 can't be successfully replayed provided that small
subgroup attacks are prevented.

OTOH the assumption that the attacker won't know 'pri' or 'pub' is invalid
in your threat model.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPaNg7TkCAxeYt5gVAQFtAQf+JWqKmJNsJOS4CySl/0yHN4+2qXvDPEzl
aFU0PzFzzYwHwIfa0xYNwHTbS5CdnIVy82ntIjAVojiWnaRL12VvcGkPNItWXNVJ
QyVK0NeLuaa1KoPvRciuHa0AX3v0hTCDJ5IeAFpQ5+XSDp4DPZiWWDuHyOM+T9Rq
bvgZtAageS5QfThvhBJDWCoEbdUProjTSGjT638CSJ0dJfQ2WvAXPxsm/4RlHiNe
9rrXzlpicdopDW7xsAGmr0bzlcGRMrnzxxE5KpZ9xCyj5cz2E0JxkqcMcd21mxyo
h2G5TUSUvLHL2Uj94AZrv6YtYW9E0JkqjBv+tHHmQmJ88Ip2+1N4+w==
=4cby
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/1a_KjlCIUHg/m/4fjT5fcvLYUJ", "n_sections": 4}, {"thread": "2opuLaqd2Ew", "msg": "1b3tZEknslUJ", "author": "David Hopwood", "date_disp": "Oct 16, 2002, 1:24:14\u202fAM", "subject": "Off-topic: trademark acknowledgements (was: RC4 Lecture)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Anonymous User wrote:


> Paulo Jorge Matos wrote:
> >Is it possible to give a lecture presenting RC4? Is that legal?
> >Or RC4 has no more problems like trade-secrecy, etc?
>
> Yes, it is legal to give the lecture and describe the algorithm.
> But you should use the R-in-a-circle (R) symbol if you write a
> paper; the first occurrence of "RC4" in the body text has to
> look like "RC4(R)", and you put a note at the end of the paper.

AFAIK, there's no need to mangle the body text like that. Even including
the acknowledgement isn't a legal requirement; the requirement is just not
to use the trademark in an infringing way, and the acknowledgement is one
way of making clear that you're not doing that (or encouraging other people
to do it).

> According to the RSA legal dept, "The mark RC4 is a registered
> trademark of RSA Security Inc." "The following attribution
> notice needs to be added at the end of the document"...
> (RC4?) is a registered trademark of RSA Security Inc.
> [where the "?" needs to actually be the (R) symbol]
> David Hopwood, please make a note of this. :-)

IANAL, but I was under the impression that it's sufficient to spell out
"registered trademark" in full in the acknowledgement, as opposed to just
using "(R)". (Similarly for a copyright notice, you can use either
circled-C or the word "copyright", but not just "(C)".)

After all, no less august a publication than Applied Cryptography,
2nd edition, has this as its only trademark acknowledgement:

"Designations used by companies to distinguish their products are often
claimed as trademarks. In all instances where John Wiley & Sons, Inc.
is aware of a claim, the product names appear in initial capital or
all capital letters. Readers, however, should contact the appropriate
companies for more complete information regarding trademarks and
registration."

In any case, given that I say:

"DESX", "RC2", "RC4", "RC5", "RC6", "MD2", "MD4", and "MD5" are registered
trademarks of RSA Security, Inc.

and in the absence of any threatening e-mails from RSASI complaining about
the absence of typographically correct trademark symbols, I'm not too bothered.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPazlcDkCAxeYt5gVAQGoCQgAtyZayn2Dv80eyiu+4LL+XBArU2xF1Ju+
7MEuOIMxunqxq73HKqTXMArGNBoq3dL08/BxxFxtalCQAdlSLkH6ef7JYAUdX/3c
Cg/h/QfyMzgyj1o27EcqTE7r4VrP/17VNPY6QMhQwy937ui8u/HobiifEqZ2stLU
Pu07mpYwVRxdUUyzNjzvABhC74GzN0mSwib9v05Bi3te+uSxX3DFiL5xJpBPcpyo
WfOoQmM85kcrV56PBEuACgum+d95PxRWV+P4Us1eEebqHGWu3QgIafQ4XERXwSm3
RN+oN/a33hxCmhdIf45gk/irXpDIjskDTEHsgoBtAbKzUG8gJw1XDQ==
=wsvV
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2opuLaqd2Ew/m/1b3tZEknslUJ", "n_sections": 5}, {"thread": "44ck9CHIvME", "msg": "3-H2sSu3aRUJ", "author": "David Hopwood", "date_disp": "Oct 16, 2002, 2:01:31\u202fAM", "subject": "Byte order and writing order (was: Origin of the use of Alice, Bob, etc.)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Carl Lowenstein wrote:
> In article <N0eq9.2658$f93.93...@twister2.starband.net>,
> Roger Schlafly <rog...@mindspring.com> wrote:
> >"Paul Schlyter" <pau...@saaf.se> wrote
> >> When adding two numbers with pencil and paper: do you add in
> >> little-endian or big-endian order?
> >
> >Little-endian. It is conceptually simpler. Where little-endian gets
> >confusing is when you use a debugger that displays your data
> >without having type info. Then people complain that the bytes
> >look backwards.
>
> Historically speaking, computation with place-valued numbers was done with
> Arabic numerals by Arabic people who wrote their numbers as little-endian,
> right-to-left.

Arabic numerals were derived from Hindu numerals, devised by people who
wrote using left-to-right scripts. They were adopted by Arabic mathematicians
without changing the visual arrangement; I doubt that an explicit choice of
which digit should come first had anything to do with it.

In any case, modern computer standards, including ISO-8859-6 and Unicode,
encode Arabic numerals left-to-right, i.e. most significant digit first.
- From what I can gather, some Arabic users find left-to-right input more
natural, and some right-to-left input (the MacOS input methods allow both),
so there's no clear conclusion here.

The order in which numbers are spoken doesn't help either, because
English has historically had more than one order in which numbers can be
spoken, Arabic still does, and e.g. German uses an order that is neither
consistently MS-first nor LS-first.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPa0AejkCAxeYt5gVAQFEswf/ZJvloL6uet+yC8+ctsADt6pT+ncXeIou
g36DD1kTfZgrHM7rLAS6kK6h0/iUPnrlDGb8iaAUEqAB1cUWVfwkyFyeP8zCyKMP
rnszgeYUdZahgTrb2c8EzBrfCb7V32dHfft9QypDcQiyFwLDiGKy2hwj+bP3AI4H
OzQ4jQJnO6zbfCSlKhhaBOmrgiIY/qXO0eGsXMvCkHnFz7XYNu+S+HtOTiTgfAf/
76khFPPFkO8eGiHLJpbbt3anVCWVa1uRt/PTJruhn/+ZD/70H5kVieq9LtXFQx8N
xtRaira6SeVVPC+2UJRGLmlPqSoEgGT5kL33BnKLwqW4TSCVxAJ+eg==
=Lx91
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/44ck9CHIvME/m/3-H2sSu3aRUJ", "n_sections": 25}, {"thread": "4cn3jRH-F2A", "msg": "ZQYp5LY4ZwwJ", "author": "David Hopwood", "date_disp": "Oct 26, 2002, 10:01:45\u202fPM", "subject": "SSHA", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Ben Mord wrote:


> "Tom St Denis" <tomst...@yahoo.com> wrote:
> > http://www.ameritech.net/users/mhwood/ldap-sec-setup.html
>
> Ok, so there's some context, answering David Wagner's question. I heard a
> network administrator say that their user database stores passwords using
> SSHA, which he thought stood for "Salted SHA". That's the context in which
> I've heard it. If there is a default standard for how to use salt with SHA
> and if this standard has stood up to analysis by reputable cryptographers,
> then I'd like to see the formal definition so I can use it in my
> applications.

SSHA is simply SHA-1(password || salt); see
<http://developer.netscape.com/docs/technote/ldap/pass_sha.html>.

> My question was if this is a standardized, analyzed technique? Or if SSHA
> just means "SHA with salt thrown in somehow."

It is just "SHA with salt thrown in somehow". Don't use it in your own
applications, use something like bcrypt instead:

Niels Provos, David Mazi\u00e8res,
"A Future-Adaptable Password Scheme,"
Presented at USENIX '99.
<http://www.usenix.org/events/usenix99/provos.html>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPbtIcTkCAxeYt5gVAQFVlAgAqyksbu99F7ImIu8btEnQ1ec6JuHqfcfY
ejJWzk1pINA3imQ9GLmYZIwArSkvE+VtY20Z3qyPFedawvky0jVQQURd7ZxKNYhd
D2EidgzP3dJNwA0JHqz9DyIHXsQtHFAFBJv8J2JYKWAh/O870qfGNgDfH7YrEpgU
376tIYcfJK1P7G6iq6IZuV37jzEIv84exyYl6JzSUs8zbOkNFwcj2VFRPYtqMaXU
UAIiS0+fPx6qgIVU7jMP+TIf9dmdwbu5I/Np63FMQrg1Cd70TACz4+BfCjtwGose
0WqkjH78I+SYsD1hlIheRqXiX0io28hrEYc//I5GJwkCE928bIjZOQ==
=+7RH
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/4cn3jRH-F2A/m/ZQYp5LY4ZwwJ", "n_sections": 13}, {"thread": "4cn3jRH-F2A", "msg": "JEEOzi2qeMcJ", "author": "David Hopwood", "date_disp": "Oct 27, 2002, 7:18:03\u202fAM", "subject": "SSHA", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Yama wrote:
> [...]


> But you are recommending something like bcrypt because of the higher
> effort involved in attacking the keys compared to SSHA, then?

Yes.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPbvZWDkCAxeYt5gVAQECuwgAj/+UZ5fvxDWCzBQF/TiqqIEOq5gtjOje
Xeyf28N9ADH7gAIrBg0LMVao61TgGk2h8rhsHOR058qiExEn3pT8oZTN0T5sJhsW
l7qM9J7AlEYp3f5K9sLLa6KYQCn7pSN9ig3/k+ntU2cQPNeURHRBLQEo+tmYjZgR
a+Kt68G2aC3tNx8dx2Yc00RHVt4WZWKB/iIpwNaVVvuk3CaPrYacDON7TFDnGYhu
vxR+ijly54DxX/PNc5zU5Sho93n21HKLmvhev6cFrlOSXxRh7Azm0O9paqG9Ez1t
dKUxq26JjtvxromD+gA6J1ksUo8yucMDHmGH4614suzaCeLmwhAzVg==
=vkHG
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/4cn3jRH-F2A/m/JEEOzi2qeMcJ", "n_sections": 13}, {"thread": "7BFmNKqC4WE", "msg": "Ag4vMdm6Z3sJ", "author": "David Hopwood", "date_disp": "Oct 3, 2002, 11:57:31\u202fPM", "subject": "Where to put challenge when doing E-then-A?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Anton Stiglic wrote:
[...]


> In any case, let us say that T is this time variant value that prevents
> replay attacks.

[...]


> My question is: is there any theory to where T should be placed?
> Should it be concatenated to the message that is to be encrypted,
> or concatenated to the ciphertext that is to be MACed. In other
> words, is E(M || T), Mac( E(M || T) ) better or is
> E(M), Mac( E(M) || T ) better?

Assuming T is public information, it doesn't matter. However, if T can be
variable-length then you should use encodings that make its length unambiguous,
not just concatenation. For example:

E(length(M) || M || T), Mac(E(length(M) || M || T))
or
E(M || T || length(T)), Mac(E(M || T || length(T)))

or

E(M), Mac(length(E(M)) || E(M) || T)
or
E(M), Mac(E(M) || T || length(T))

Incidentally, the last of these is DEM1 from [Shoup01], where T is the "label".


[Shou01] Victor Shoup,
"A Proposal for an ISO Standard for Public Key Encryption (version 2.1)",
Revised December 20, 2001.
<http://www.shoup.net/papers/>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPZzz+zkCAxeYt5gVAQEpmQgAsdbo/bLd97RH2FD4UCtyyvdXcZ9/R8b/
qFA4VXZsUzFci6DI1WB28sYicq4A/defxmSzAKOEzgONCh8B4CRC60p0bU1TlMS4
AnDXgGKD8x8WXgyRl+7ShLIRfcPr2dxbV7+/tO0tjLKz6r51NZiHREt/au19bufm
mZVF9vpZvsg/jT8XVsMybCXA7vMDiUUGvRPa6jZYXQ9WjzrpGFEpP7fBAC1OhZcG
P1JFrhh3l0GSR6qE1NYntts0FZfPVqguVdvauwkNz2GS2HHgAUKeUwSJfMqMPgNs
Nfamcqk3IYCRLU0H3eBvJYvwLdiXYhA+gwOKXtZDpnBJW2g4QBdnIQ==
=ZBee
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/7BFmNKqC4WE/m/Ag4vMdm6Z3sJ", "n_sections": 16}, {"thread": "7BFmNKqC4WE", "msg": "AfU28Vs8qyMJ", "author": "David Hopwood", "date_disp": "Oct 3, 2002, 11:58:51\u202fPM", "subject": "Where to put challenge when doing E-then-A?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

DJohn37050 wrote:
> In theory, theory is the same as practise, except when it isn't.

Both in theory and in practice, the best way to design security protocols is
to pay attention to the theory.

> One attitude
> is to go for some ideal, claim you have it and then forget about trying to
> improve it, as it cannot be done. But in real life, we can only approach the
> ideal, never achieve it, and settle for approximations that get the job done.
> No MAC is perfect and assuming that, it is better to mix before rather than
> after.

Why? Roughly speaking, if you have a MAC based on chaining a particular function
f (as all the MACs that are used in practice are), then if f is broken, the MAC
is broken. It doesn't matter where the entropy is in the input (in fact, the
input to a *MAC* shouldn't need to have any entropy).

> I agree it SHOULD make little difference, but why not be conservative?

One reason is that adjusting data formats to correct perceived potential
weaknesses in crypto primitives tends to make those formats more complicated.
Simplicity is important.

It is easier to achieve any particular overall security goal if at every
intermediate protocol level you put strong requirements on the primitives
used. Also, it's often not easy to determine what impact a distinguisher
will have independent of application data formats, which are in general
not under the control of the crypto protocol designer (and may change even
when the crypto does not). It's better to try to eliminate such weaknesses in
all cases.

If this is not easy, that's because no crypto is easy; not because we don't
know how to design protocols to obtain indistinguishability in particular.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPZz6oDkCAxeYt5gVAQGf0AgApDnvaQMDroXN6ajvRz5yIKzY6OpEOzcy
ssRr+F67uiaHo8VSfmh/wRKP4i50yhHW1r9x9USoBQH5+CWCAgSgidhZ8jKiPuhi
QK3CDfVa3kPg9pLZvioedbYU/lnNGZRtKLhGsarJncWMHZvdd7HaRYNfcAGb9cn6
i5GZ9zwb2Y6IJNG4ss8kDqcn/qk1mJ7gI/isPNiL1TFVVqa5OeMLrAIX3Z4ODfom
39bZiBqPulMI93qlQDan9O/AO2cRbO/yER0X18hHJyVVEY6KaHBd7LPvpBUE3ew3
j3Aoq645CSuRxxeA7d1xejZ8VfLXAEWYUH0Eb6t+0b4HBBmxMFqiUA==
=XFPI
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/7BFmNKqC4WE/m/AfU28Vs8qyMJ", "n_sections": 16}, {"thread": "7iyHETKeCpg", "msg": "TQVTycDEIpYJ", "author": "David Hopwood", "date_disp": "Oct 2, 2002, 10:16:23\u202fPM", "subject": "Call for attack on MD5 (wrt. Distributed.net RC5-64)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

If the contracts differ only in the last block, it doesn't matter how many
previous blocks there are.

In fact we can improve on that: it is only slightly more difficult to find
a collision between any 2 of k different functions (say, the MD5 compression
function with k different initial chaining vectors), than a collision in a
single function. One way to do it is to apply the functions in sequence
during the cycle finding algorithm; then when a collision is found, it will
be between different functions with probability 1 - 1/k.

So, first choose k different message prefixes, for say k = 50. Then choose
a protocol in which a random last block in the message to be signed will be
ignored (if this sounds like cheating, remember that real attackers *would*
cheat). For example, OpenPGP using v4 signature packets definitely has this
property (put the random data in an ignored subpacket), and I think S/MIME
also has it.

I.e. the complete attack would look like this:
- prepare k message prefixes P_1..k.
- let H_i(x) = MD5(P_i || x)
(this can be computed with only one compression function evaluation).
- use a cycle finding algorithm to find a collision between
H_i(x) and H_j(y), for random i, j \\in {1..k} and x, y in {0,1}^128.

If there is any concern that MD5 might be broken by other means before the
attack finishes, use RIPEMD-128. The idea is to prove that all 128-bit
hashes are inadequate (for applications requiring collision resistance),
anyway, so it doesn't really matter which hash is chosen.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPZunpzkCAxeYt5gVAQEfzggAivmC6Y74NUq8kvHkUHgu7b6PjiEaa8Rx
y74k5/YVy1zdhAb62HBbvn1oC0gEi5EVTMlMauH4QE7OM4rpf9EGyyRpLhha1FuE
khjsnu64y7BwkpaGou9rfCVtV8FiPrL5EDJ0tXHEgwFJd+WO/mkIdFc/R58ZtjL3
BCmHW9VVAkgqKTxLB6hNj1lSNlJQahzqtubyLBW2YZcg9DlZfUcnX/vvOgPtWO99
2mUQkcLt1LvRfRiqu26JgIZ9QviMSRJ0qD9ghiXLfSyiR6/CnhprBFgx+/sSe85d
XMgh9WBg43MIGXbOfgl1aMXD6bKbWA7O7Uz0uYjhnW7GXChuymMR+Q==
=pf3P
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/7iyHETKeCpg/m/TQVTycDEIpYJ", "n_sections": 21}, {"thread": "7iyHETKeCpg", "msg": "FlKeHtGDRoEJ", "author": "David Hopwood", "date_disp": "Oct 2, 2002, 10:49:13\u202fPM", "subject": "Call for attack on MD5 (wrt. Distributed.net RC5-64)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

I wrote:
> In fact we can improve on that: it is only slightly more difficult to find
> a collision between any 2 of k different functions (say, the MD5 compression
> function with k different initial chaining vectors), than a collision in a
> single function. One way to do it is to apply the functions in sequence
> during the cycle finding algorithm; then when a collision is found, it will
> be between different functions with probability 1 - 1/k.

What was I talking about here? That approach won't work (because a collision
between different functions won't follow the cycle). What *will* work is to
make the choice of chaining vector dependent on a few bits of the previous hash
value. In that case, we are technically finding collisions in a single function,
but the effect is that the message prefixes can be any of k possibilities.

"*" marks changes to my previous post:

* So, first choose k different message prefixes, for say k = 64. Then choose


> a protocol in which a random last block in the message to be signed will be
> ignored (if this sounds like cheating, remember that real attackers *would*
> cheat). For example, OpenPGP using v4 signature packets definitely has this
> property (put the random data in an ignored subpacket), and I think S/MIME
> also has it.
>
> I.e. the complete attack would look like this:

> - prepare k message prefixes P_1..k, where k = 2^r.
* - let H(x) = MD5(P_i(x) || j(x)),
* where i(x) is the first r bits of x, and j(x) is the remaining bits.


> (this can be computed with only one compression function evaluation).
> - use a cycle finding algorithm to find a collision between

* H(x) and H(y), and therefore between messages P_i(x) || j(x) and
* P_i(y) || j(y).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPZuv5jkCAxeYt5gVAQFucQf/Vskm+n5CnwYJEveY/k0jGP8TreKIwlzE
lLoSWohwMeLu5UUZrJxkPPFi7uH2vYQ/FjYH30fEgxwXRKO/p7XuE8QEUCm8Bh+y
6xaUsAxlC8shzn8Z33wJks7+dC5eeWA+bs0+drKM7CsfDqgWaDGHYrT5aOjhNUWg
P50MUEDt600QFUQVwpuXZV/gzmPJE+eCr16Pn6MB3Z0LDsE1WzpAi8+7huhs364a
m/8JVEbCcw5r12WafA86o2ZajcgFjYgehgZiqRdg0MjOOlnB0845TP3KErFU2SfH
tLt1lHbYodMvmEcPZYHVJEp/jHIvzZ5kRoDnqTJ89iXUzztjmviyCg==
=Jf3G
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/7iyHETKeCpg/m/FlKeHtGDRoEJ", "n_sections": 21}, {"thread": "8EacJLJ7Cts", "msg": "sUEufBF2ESgJ", "author": "David Hopwood", "date_disp": "Nov 5, 2002, 2:00:42\u202fPM", "subject": "why is RSA so good?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Carlos Moreno wrote:
> jsa...@ecn.ab.ca wrote:
> > Todd Smith (smi...@auburn.edu) wrote:
> > : The only thing I can think of to mathematically prove that an
> > : encryption algorithm is good, is to prove that to break an encoded
> > : message is an NP-complete problem. Is that why RSA is considered the
> > : standard?
> >
> > No, it is not. RSA is not provably as hard as factoring
>
> Negative!! I'm no expert on this, but all the literature that
> I've seen, plus what I remember reading here insist that it is
> *conjectured* that RSA is as hard as factoring numbers.

No. In fact, some cryptographic protocols (for example, RSA-based blind
signatures), rely on the conjecture that RSA *isn't* as hard as factoring
in a particular sense. More precisely, the conjecture is that given an
oracle for the RSA Problem, it is not feasible to factor the modulus.
This is called the "Gap RSA Problem".

The following paper provides some support for this conjecture:

D. Boneh, R. Venkatesan
"Breaking RSA may not be equivalent to factoring,"
Proceedings of Eurocrypt '98, pp. 59-71.
LNCS Volume 1233, Springer-Verlag, 1998.
<http://crypto.stanford.edu/~dabo/abstracts/no_rsa_red.html>

[the title understates the strength of the result, IMHO.]

Also see this paper about gap problems in general:

Tatsuaki Okamoto, David Pointcheval
"The Gap-Problems: a New Class of Problems for the Security of
Cryptographic Schemes"
Proceedings of the 2001 International Workshop on Practice and
Theory in Public Key Cryptography (PKC 2001) (K. Kim ed.), pp. 104-118.
LNCS Volume 1992, Springer-Verlag, 2001.
<http://www.di.ens.fr/~pointche/pub.php?reference=OkPo01b>

> The evidence so far says that both problems have been so far
> equally hard: none of them has been solved (at least not by
> the scientific community, or by anyone we know of).

They can both be hard (specifically, hard enough to base a cryptosystem on)
without being equally hard. That's what the evidence so far suggests.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPcgVJTkCAxeYt5gVAQHlvAgAiIXnsrrWVM6wyIHhsyfHfAFqAPz3evCa
Fh3ZS2cF+R153Nk5ZHSGrDcaEwCALBpW2cQbauG4bvx1NhLNFYP23SZhCL/bi23K
6AdcrypPQnFARozc656GI+/m7BTv40kw8Wz4/QjNoM29NPRbdY9QZ0xuqB5AGuPF
pI5HOdeYu9zf7OkkrgkI6EDjeveHLFXF8ohqWQObNCG0nAihL3kXbCL9/ni6id8L
UF3fmeeixJwUFsOB1n7jpazFc46C0WL9T8CbQsL+WVv7OkCGSjy0+2VHjrjdy6v9
fP4YxQdygOexyhehx3LC/lTBICAUhA00GFCkAdskhQWdctXFzUDVgA==
=AFfQ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/8EacJLJ7Cts/m/sUEufBF2ESgJ", "n_sections": 61}, {"thread": "ARhhuxNIuTc", "msg": "utAiokNaqqQJ", "author": "David Hopwood", "date_disp": "Oct 3, 2002, 11:56:22\u202fPM", "subject": "Hmac strength", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

DJohn37050 wrote:
> The reason is that NIST says so.

And if you say that NIST says so, it must be true, right?

> One can argue that using SHA-1 where
> collisions are a concern (as in HMAC) only has a strength of 80 bits anyway,
> so a longer key might be considered deceptive.

One could argue that, but one would be wrong. When using HMAC as a MAC [*],
collisions are not a concern.

Even if collisions were significant, I'm suspicious of arguments that say
"there exists some attack with computational cost 2^k, therefore we must reduce
the key length to k bits". For that type of argument to have any validity at all,
the attack must be equally as practical as a brute-force key search, and always
applicable in the same situations.


[*] If you're using it as a PRF or in some other situation that relies on more
than the normal MAC security properties, collisions *might* be a concern;
that would depend on the protocol.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPZ0ROTkCAxeYt5gVAQH3owf+N0OK6Wjewn7xxnfRW3HwsIsDfn6Lj+T5
gjarEJuQDx8JVOHO8HRVLaNBKBDJo6oLqZg6jvETPG1WWHqKptjrA3wbSZp8MWnr
fj8OY8tx5S7hhI6ErPbxwBRmpp/22+VdT4Ecn04mRF+dbGIBWluRKo8dsLO+iF0l
JpEXTv674X0MVIwN8ufhBKjLZlozs6YeMFS50Y1ZDQNtRqvDxIYOcyWjY21ZGnUm
DLUXQuuuxh4N4GXNc2FEaZXHBbOdL36VjBV/QSI4k6yO7ggoVuQQXSDA1Z2Y9pZl
5jQUIsaRKM1soCh9RlhdLojkZ48tyeMBvL8LwJ3HF6KRJno2Fz56Ag==
=hJDO
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ARhhuxNIuTc/m/utAiokNaqqQJ", "n_sections": 41}, {"thread": "ARhhuxNIuTc", "msg": "O-jKiJpLsyYJ", "author": "David Hopwood", "date_disp": "Oct 6, 2002, 2:31:17\u202fAM", "subject": "Hmac strength", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

DJohn37050 wrote:
> There is a reason to use appropriate size keys, etc. It is so one can easily
> tell that one has appropriate security across the board. HMAC with SHA-1 has
> 80 bits of security.

This is patent nonsense. It's a massive oversimplification, at best, to say
that HMAC with SHA-1 has "80 bits of security". In general for an iterated MAC:

- the security against tag guessing is determined by the tag size,
- the security against brute force attacks is determined by the entropy of
the secret key,
- the security against internal collision attacks [PO95] is determined by the
square-root of the state size, *exactly like a block cipher chaining mode*.

Although the third type of attack is a square-root attack, if you think that
this means that HMAC(SHA-1) only has "80 bits of security", then you must
also consider ciphers with a 128-bit block, like AES, to only have 64 bits
of security. Does that mean we should reduce AES keys to 64 bits (or that
the block size is inadequate and we should start using Rijndael-256 for all
applications)? No, it doesn't.

All else being equal, to prevent generic attacks the key size for a MAC should
be determined on the same basis as key size for a symmetric cipher, and its
state size should be determined on the same basis as the block size of a block
cipher. We know that because the formulae for the attacker's advantage are the
same:

- w / 2^K for a brute-force attack against a uniform-random K-bit key for
either a MAC or a cipher, where w is the number of *off-line* key trials,

- Theta(q^2 / 2^B) for an internal collision attack on either an iterated MAC
with B bits of state, or a cipher used in a chaining mode with a B-bit block,
where q is the number of *on-line* oracle queries (roughly speaking, the
number of blocks encrypted or MAC'd by a party who knows the secret key).


> Using 160 bit keys may lead one to believe it is stronger than it is.
> My take is that the designers of HMAC were sloppy in this area of
> key length and MAC length.

My take on this is that you don't know what you're talking about, particularly
with regard to the difference between off-line and on-line attacks. The
designers of HMAC were perfectly well aware of that difference.


In another post, you wrote:
> The adversary is always assumed to attack the weakest link. OK, I find a data
> collision with 2**80 SHA-1 hashes, it is a simple execise to show why HMAC
> security is broken in this case.

Very well then, please enlighten us. Using only a SHA-1 collision and some
feasible amount of work, show us how to break HMAC(SHA-1) with a uniform-random
key of >= 128 bits.


[PO95] Bart Preneel, P.C. van Oorschot,
"MDx-MAC and building fast MACs from hash functions,"
Advances in Cryptology - CRYPTO '95, Volume 963 of
Lecture Notes in Computer Science (D. Coppersmith, ed.), pp. 1-14.
Springer-Verlag, 1995.
<http://citeseer.nj.nec.com/preneel95mdxmac.html>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPZ/WiTkCAxeYt5gVAQFEkQf+ItH9de2a8KnAnNfn/UDSHQPp9xzbheFf
xLjfZRTmspDmr9YcmuE5Ogb+F+NzspTVrzcRfULtV4WPlNLtUSKpdYbgJ1jSYRBt
2N391B2JaO9oHNFttb/1cdDLPJ7XVxn/21doTaFq3e0o+6msK164jKtKT+4p0OlP
4f+M9Kwj/GdHAlA6erwW3h80ElDQgdvQGd1xaHxfpgCv1AX3JyOw99gXCgeMiX1b
c6y4rS/e3+jmu2mQFSJQIPhY+EHIxvSoXiZ4/14i3fZ/YSDKlNEAnuAapInB9c57
NTIPyUXDvr1OCd/kv4NwOOIXzAoVFbscGbF91EJfev1oVMRPdlIq0w==
=tyCF
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ARhhuxNIuTc/m/O-jKiJpLsyYJ", "n_sections": 41}, {"thread": "FZsjJ-lJXeE", "msg": "r0_pAj85TjsJ", "author": "David Hopwood", "date_disp": "Dec 25, 2002, 8:45:03\u202fAM", "subject": "DIY Phonecall Encrypting Hardware", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:


> "Paul Rubin" <phr-n...@NOSPAMnightsong.com> wrote:
> > For example, try:
> >
> > http://www.l-3com.com/cs-east/programs/infosec/privatel.htm
>
> I wouldn't buy from them.
>
> "strong 168 bit voice encryption"
>
> While using a 256-bit exponent for the key exchange [hint: a GNFS or even
> baby-step giant step attack

YM Pollard lambda (possibly combined with small subgroup attacks if they are
not defended against); this is always more practical than baby-step giant-step.

> on the key exchange is less than 2^168 work].

So what? I don't know any more details about the system than are on the web
page, but this is not a valid reason to criticise it. The symmetric encryption
is Triple-DES, which is a perfectly reasonable match for D-H with a 1024-bit
modulus and 256-bit exponent. It doesn't matter that they have different work
factors, as long as both are hard enough to break. In this case, provided that
the key exchange is implemented with proper precautions, its work factor
against a Pollard lambda attack would be 2^128, which is quite sufficient.
As it happens, Triple-DES is the probably the cipher that is most widely trusted
to protect against attacks up to a work factor of 2^128 (excluding some attacks
that are impractical in this context). Also note that the goal of FIPS 140-1
certifiability limits which ciphers can be used.

In general, if the symmetric algorithm is being chosen from a limited number
of ciphers with fixed key sizes, there is no reason why the match between
security provided by the symmetric and asymmetric parts of a protocol should be
more than very approximate. Even if a symmetric cipher with a variable key size
had been chosen, the key size typically does not affect performance in the same
way as the D-H exponent size (and also the levels of confidence in work factor
*estimates* are different for brute-force vs. Pollard lambda vs. DL-GNFS), so
it's still too simplistic to say that the work factor estimates should
necessarily be matched.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPgm19DkCAxeYt5gVAQFjPQf/c1dNV3gwxB1idUrpNuUVmu1XiAFAr1iI
p4EjzrNRrOV3DSkf1QE0akapgGfA/Gm1X63LSrea9mvOL4Rr8r/0FonmRXCkGJYm
/eZ3aTbkRkNbNbDVPI2YP/iYExhdDNe0jxZzYGA3EgKn226e7XZo5jomgO7gb+8b
wgPwXthOuuDxSLRuekFtZ0hL9Wyt4BpZm+SprWdDDYtOWjrBc5Gg5kqWL9z6yCVR
rOgVWbIqIjF7A3IAfygITKIE/06sBl8IiB9Vygxv3j7+Rg7KybszglVTdWANIfKh
fJRzjv5C3ykJkCP2ePUvGYwPs46xaIxpjYNcvpztmv1CgdDXmqQQXQ==
=UVzu
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/FZsjJ-lJXeE/m/r0_pAj85TjsJ", "n_sections": 12}, {"thread": "Fi4ggMq_UFg", "msg": "2IKGSScg9WYJ", "author": "David Hopwood", "date_disp": "Oct 5, 2002, 8:22:18\u202fPM", "subject": "Beware, Intel to embed digital certificates in Banias processors", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

patte...@SKIPTHIS.sbcglobal.net wrote:
> [...] The purpose of a digital certificate in


> the hardware is to allow both you and the businesses you are dealing
> with to trust the hardware, and, by extensuon, the OS and everything
> else involved in the storage, management, and display of unencrypted
> stuff.

Can I have some magic fairy dust too, please?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPZ+CIzkCAxeYt5gVAQGfdQf/Z6lUX0p8dNkBmd31mqH0JpFSpayjqfrx
gojwqS/I4OUIijX0GwVwAiHweAjw4ABTLy3k9onkZ/ytt/uyDkcAWohfTKdC/uNU
Ya1cYLpdYP0LyM/5g3tspA+LNH5cbBkpGullA7S+lFz5hEgpqPc3TrAcb+lBq85F
t3NlpMZkJW2TqQsz7g0ZpvPeLxy62B7sjgKc0EMVXCzPZfM4pfHz+acyJ9M/hQxG
P6tFxcO18nYmCli5C2UAyda4Y6b7YrgV3RYEWpaLFeHsseeoz0NNeKNKYGzCS0rt
jnu33ANdKzqFLsqXySq+D/sIF4kLCi3jgYIXWAhhk7Ufw3MO73Nkfw==
=PxTn
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Fi4ggMq_UFg/m/2IKGSScg9WYJ", "n_sections": 63}, {"thread": "KOvsfJusrg8", "msg": "pzkQN7WkK0MJ", "author": "David Hopwood", "date_disp": "Oct 23, 2002, 8:48:44\u202fPM", "subject": "SCAN comment: Counter-{BE,LE} and PKCSPadding", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jack Lloyd wrote:
> Is there some reason that the Counter modes both specify PKCS#7 as the default
> padding method?

No. I think I must have just pasted the entries from CBC mode, and forgotten to
check the part about padding.

> It seems that they should be defined in a manner analogous to
> OFB mode, as they have very similiar properties. And to be honest I don't see
> any reason that padding should ever be neccesary, or even desirable.

Agreed.

> Specificaly, I would suggest replacing the following comment in Counter-BE and

> Counter-LE: [...] With:


>
> "Implementations MUST support immediate processing of individual bytes, in a
> similar fashion to a stream cipher. This means that it is never necessary to
> specify a padding scheme (and therefore the standard name always has two
> components)."

I'll do that (and note it as an incompatible change). I also need to add the same
comment for KFB mode.

(Incidentally, do people think that BMGL / KFB is better classified as a stream
cipher construction, or as a mode for a block cipher? At the moment, it's
classified as a mode, and "BMGL" is just an alias for Rijndael-256/KFB(40).)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPbdDSzkCAxeYt5gVAQG3zQf/WQUVIhZoFB26HDx65akwK3Wa7fYRXzoe
9icfWjaawLhv3/QTIT2LcjvEz7glPWZKs51CtfreoEQXRB+nboOIbqmL+1bO/3Gk
YGCsLB9DsOCrH7kFKMeCeQ9Hq2alM2Iit23EcoHWJ/xliYRveNaqJeJMKj4rSIwZ
XQRURTdQefvOSb5yZiWXxVEbTrGfC8cGeQim4D+te4EUzetkCvAzxfcf7EU70RJi
obBvQHjqhr0LApteNEuK5C5tEgRteMUeG4ZWg+QvpeKuM4OSXbEElC8lH4qP1BGA
d2JpHDteY4ySn/r9NoeVB7LqkGPuRPWXTdMPQyh1MMskcezQEpy4qw==
=ZVTg
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/KOvsfJusrg8/m/pzkQN7WkK0MJ", "n_sections": 4}, {"thread": "LYhyy1C6Ot4", "msg": "Up3-gpZS87oJ", "author": "David Hopwood", "date_disp": "Oct 22, 2002, 3:33:18\u202fAM", "subject": "SCAN comment: Generic/Base64-ASN.1", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

You're absolutely right. I'll fix it in the next version.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPbT/JjkCAxeYt5gVAQE63ggAhvbPsoWX03vVZJRXW8e6OuuR80xSZpE3
GmiYjfEGrnv7297Kbe4CvSFOwhsbwkYgWxeT39/flzaSXuMyvpDETlEwZNPkuNl4
Rvt/MS/py0WKuqXISs9kQXXT39HQvzds6ryTKoOKXIMmtMHwtrXE1zGFzxPB/5Gl
UQg3jv5OTxzuoGFUEu2bJIct+1pMDG78dyYlt1FFh+/Ncv4w4yUhYxfLcPIbKDK5
/j59IFUooTQS6ZnsTrMiFM3m2hRsSjR/uzQ0oQG6bwgVHgobffVn/v+VoddIY0sX
KZdAn9qMbVrG4inGYQuR4WA9p7aDDYfPOlkFaLOTBu1JQunXcRy/nQ==
=Bqno
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/LYhyy1C6Ot4/m/Up3-gpZS87oJ", "n_sections": 2}, {"thread": "QV-nWL24Tzg", "msg": "Op27CbPbeUYJ", "author": "David Hopwood", "date_disp": "Oct 10, 2002, 3:42:11\u202fAM", "subject": "Does Gzip add strength when used with a cipher?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Joseph Ashwood wrote:
> So the short answer to your question is, nothing worth sweating over,
> it is far more useful to sweat over the disk space difference between
> the compressed and not compressed versions.

and:
- potential security bugs in (de)compression libraries, e.g. [ZLib02],
- the need to authenticate *all* data input to decompression, including
options and previous state,
- increase in protocol complexity due to having to negotiate a compression
algorithm, and possibly having to flush (de)compressor state at the right
times,
- the effects on leakage of plaintext length information [Kelsey02],
- the performance cost.

Overall, I think it's far more likely that compression could cause a security
failure than improve security. These problems can be avoided, but if you're
deciding whether to add compression to a security protocol, you need to consider
all of them.


[ZLib02] Zlib Advisory 2002-03-11
zlib Compression Library Corrupts malloc Data Structures via Double Free
<http://www.gzip.org/zlib/advisory-2002-03-11.txt>

[Kelsey02] John Kelsey,
"Compression and Information Leakage of Plaintext,"
Proceedings of Fast Software Encryption 2002.
Volume 2365 of Lecture Notes in Computer Science, pp. 263-276.
Springer-Verlag, 2002.
<http://link.springer.de/link/service/series/0558/bibs/2365/23650263.htm>
(abstract; full text requires subscription)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPaUvFTkCAxeYt5gVAQGQpwf+M3n+KasTzG5XBo22cW05nKI6wm8UMsgU
b7NP4Ew+saSYAM1/bmbY1NDHcpYeTpzRDd8rSdO3CGWPSYMfOqT5RHeRAa2dnI1E
hHMgZRUb2z0Je8MQuuN75SEbLNFApXqQuhgWAJN5MiJ8z1PWUf32hp9+vtiZhbTJ
6S/yRJQHrEoooFi6S38+UldZxbuL9VvNJMz1ALUBF0Hiiier4CLEbncyg6sifVJV
ms++SRspbmK+KXpG9WqhX6+ewA2XHyQKcE3w+G2dwBY8JhTXqB4fykoaY+Tn7MXV
Gw9Ilz8gsS/XFxF3n44vl+KTpC2N+mGnS6vDTTFpkqASO3GbVSeeeQ==
=gv9I
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/QV-nWL24Tzg/m/Op27CbPbeUYJ", "n_sections": 20}, {"thread": "RsR_cuoraUs", "msg": "QB_vT6NxCb0J", "author": "David Hopwood", "date_disp": "Oct 23, 2002, 1:29:47\u202fAM", "subject": "Factoring", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"John A. Malley" wrote:
> I've been looking into the relationship between TFNP and computational
> distinguishability of keyed PRP function families and RP function
> families over the past month so this stuff is somewhat fresh in my mind.
> :-) (I'm trying to show that if NP = coNP then every algorithm that
> distinguishes a keyed PRP function family from a keyed RP function
> family is also capable of recovering the PRP secret key,

That can't be right, surely. What about PRP families that do not use part
of the secret key?

> but if NP != coNP then there are distinguishing algorithms that cannot
> help recover a secret key for a PRP. I'll post my results when I'm done.
> :-) )

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPbTM1TkCAxeYt5gVAQFiZwf9FitDaZ9O1y069A3AMiQYaQY8zhaoMTWr
4VTEYJeUPksjf6QPdhpn0VCLmKSh2Y42Redp0BC+uBryyKrOxr+P6JSBNnwp6GeQ
AHdrf80CpbL4JScsFdgQ7m4LGF+ypUG3UOC6yO9CIKi0fFWgZH/3a9aYHFrJsyUE
eOi2li8+cRzHKCoZU7JpsBQNps2UmdOvj8fUBQhcSErbSbIpqlobpv6wbf+G5uBn
t7J9RYbhedRz24DHPPTiaI+Ti7EuXHh+kTXyaa/4TwOPQxnqMa1Hmup70cpXTnxS
TWHnwaMIQIg9MU4UulvoI6oQQP+1t/F15gBi+R3T7CTxflyKfj4F3A==
=MBl8
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/RsR_cuoraUs/m/QB_vT6NxCb0J", "n_sections": 24}, {"thread": "UGS9Yccrqi4", "msg": "RDeKJ5HJH-gJ", "author": "David Hopwood", "date_disp": "Oct 26, 2002, 7:23:45\u202fPM", "subject": "extension attacks and adding salt to hashed passwords", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Ben Mord wrote:
> "Ben Mord" <ben...@earthlink.net> wrote:


> > "John E. Hadstate" <jh11...@hotmail.com> wrote:
> > > for i = 1 to 2^t do:???
> > >
> > > He must be assuming salts of no more than three bytes. (I read the
> > > paper and you did copy his algorithm correctly.)

You can use a longer salt and make all but t bits of it public. This improves
security against precomputation attacks (but has no effect on dictionary
attacks without precomputation, obviously).

> > However, in Java it seems I can iterate a hash over a short string about
> > 75 times per millisecond with SHA-1 on a Pentium III,

What clock speed?

> > using the default SHA-1 implementation provided with Sun's VM.

75000 blocks/second is horribly slow for SHA-1 on any PIII (in Java or otherwise).
You should be getting at least 1000 blocks/second/MHz in C, and maybe a third
of that in pure Java. Use a better implementation.

(Actually, for this application, use an assembler implementation, making sure
that all of the code and data fits in L1 cache.)

[...]


> Ok, taking a step back, here's how I think this technique is properly used.
> This algorithm primarilly embraces the strategy of slowing down the hash
> function. As a side benifit, it *slightly* increases the spread between the
> work of the adversary versus the work of the legitimate user by allowing you
> to add a couple bits of effective strength to the key. It does this by a few
> bits, maybe a byte. If you're patient and its a single-user system, *maybe*
> two bytes.

With a decent hash implementation, ~20 bits. This is not to be sneezed at, if
you consider that lots of users will choose passwords with entropy of only ~40
bits or so: in that case, it makes the difference between a hopelessly weak
system, and one that is strong enough.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPbsjwDkCAxeYt5gVAQGIIwf9HnminK0EDpqG5Rn+/tjWE3v99ZPjLvHX
7WgBL3ik0i7xMzVwLQJVI/BqwGhOjZ/TF2zS5t833uAUZ1NvZXeliLaioMSPpq7c
7alyEk4q+/nX04S/6n9iT1/7NqaddfQ99vx0gRAkV6Bd0clpEraNJe9y/KAef/fw
J05znvqWzZESh8n1UoR2V7hJ/4H4V3pNTNDZGVZJv3hsLRchEh5VccpUGRf17//B
4clMTUiAPuNM3/dv+AYMNL1xTHvFBQbYcuD6/+nPgwCVmg0PB50FvQPMd5aDdzcM
sNM7XkluXeMujddYFXL2JKlOkZnLVXJjl56duXp3RiVZKG60oFS9NA==
=o0rF
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/UGS9Yccrqi4/m/RDeKJ5HJH-gJ", "n_sections": 20}, {"thread": "UMsqwCBDgEg", "msg": "l3o2zxvx8ocJ", "author": "David Hopwood", "date_disp": "Oct 30, 2002, 10:10:33\u202fPM", "subject": "SCAN key format proposals", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Wei Dai wrote:
> ll...@jhu.edu says...
> > I don't see any problems with this specification (in fact if you look at the
> > thread "SCAN proposal: DSA/ASN.1" from the 23rd of this month, this is basically
> > the same as what is proposed there).
>
> Sorry, I forgot you already wrote one up. I wonder if David is waiting
> for something before putting in the entry, so just busy with other
> things?

I'll be busy with other things until next Monday, probably. I don't see
anything wrong with the DSA/ASN.1 proposal.

On the issue of how many OIDs to assign, there are several (not necessarily
exclusive) options for how specific an AlgorithmIdentifier could be:

1. A P1363 key family: DL, EC, RSA, RW, OU, ESIGN.

2. An algorithm: DLIES, DH, MQV, DSA, NR, PV, ECIES, ECDH, ECMQV, ECDSA, ECNR,
ECPV, RSA, RW, EPOC, ESIGN. (Some of these could also be interpreted as
more than one algorithm under a single name.)

3. A fully specified scheme, e.g.:
RSA/KEM(HMAC-PRF(SHA-1),DEM1(AES/Counter-BE,HMAC(SHA-1))) or
ESIGN/EMSA5-MGF1(SHA-1).

There are clear security advantages to being able to associate keys with a
fully specified scheme when encoding them (and therefore when certifying or
fingerprinting them). They should also be associated with the protocol in
which they are going to be used. This eliminates many potential chosen-scheme
and chosen-protocol attacks, and it provides a way to enforce the assumption
usually made in security proofs that keys are only used for the scheme that
is being analysed.

However, that is not what the ASN.1 / X.509-based standards currently specify.
Most current software would not recognise scheme-specific OIDs in a
SubjectPublicKeyInfo or PrivateKeyInfo object. What those standards currently
specify is close to option 1 (apart from there being two formats for DL keys).

Adding new OIDs for algorithms that don't yet have them, i.e. option 2, would
be quite straightforward, but it's only a partial solution: it is more
information than necessary to decode the key, but less than is needed to
prevent all chosen-scheme/protocol attacks. (It might prevent *some* attacks,
though.)

Option 3 runs into a technical problem: there are two sets of parameters
(the domain parameters, and the parameters associated with the scheme), and
only one 'AlgorithmIdentifier.parameters' field to encode them in. As it happens,
the only algorithms for which an ASN.1 scheme parameter format has already
been defined are RSA/OAEP and RSA/PSS (see PKCS #1 v2.1 appendix A.2), which
don't use any domain parameters. That is only a coincidence, though; DLIES
and ECIES, for example, need both domain and scheme parameters. It would be
possible to squeeze all of this information into a single parameters field,
but only by inventing new types that are different from Dss-Parms and
ECParameters. (Another possibility would be to encourage protocols to always
encode the standard SCAN name together with a key, rather than a more ASN.1-ish
encoding.)

Note that the purpose of SCAN is not to change existing standards, only to
describe them. Any proposal to change how X.509 or PKIX encode keys or
certificates would really need to go through the ANSI or Internet standards
processes. OTOH, the fact that X.509 certificates don't certify scheme
parameters is IMHO a pretty significant design flaw, and we don't want to
perpetuate it (especially not in protocols that may use the ASN.1 key formats,
but not the rest of X.509). I'm open to suggestions.

====
About the ESIGN proposal:
P1363a A.2.10 suggests precomputing the CRT exponents.

# To apply this algorithm to IFSP-ESIGN, observe that step 3 in IFSP-ESIGN
# requires the computation of exp(r, e) mod n where n = p^2.q. This can be
# done by computing exp(r, e) mod p^2 using the above algorithm for
# multiplication in (Z/p^2 Z), computing exp(r, e) modulo q, and then
# combining the results using the Chinese Remainder Theorem similarly to
# A.2.9. This can be done more efficiently if components such as p^-2 mod q
# are precomputed.

Should the ESIGN private key format include these components (not at all,
optionally, or in all cases)? Should it end in "...", like the OU proposal
below?

====
Finally, here's a proposal for the remaining P1363a key format: OU
(Okamoto-Uchiyama) keys, as used by the EPOC algorithms.


OU/ASN.1 KeyFactory

Designers:
T. Okamoto, S. Uchiyama (OU/EPOC),
David Hopwood (ASN.1 format)
Description:
A KeyFactory for DER-encoded OU public and private keys, as
defined in the IEEE P1363a draft standard. The OU key type is
used for the EPOC encryption schemes.

In P1363a, an OU public key is defined as (n, u, v, k), and an OU
private key is defined as (p, q, k, w). However, since p and q MUST
each be exactly k bits, k is redundant in both cases.
(Note that 2^(2k-2) < n < 2^2k, so k can be computed from n as
ceiling(bitlength(n)/2).)

The ASN.1 public and private key types are defined as follows:

OUPublicKey ::= SEQUENCE {
modulus INTEGER, -- n
u INTEGER,
v INTEGER
}

OUPrivateKey ::= SEQUENCE {
p INTEGER,
q INTEGER,
w INTEGER,
u INTEGER,
v INTEGER,
...
}

Encodings MUST correspond to a valid OU public or private key as defined in
P1363a.

u and v are included in the private key format since they cannot be inferred
from (p, q, w), but decryption (including the optimised decryption algorithm
in P1363a appendix A.2.11) requires them.

Output MUST be encoded as DER.

Alias: "EPOC/ASN.1"
References:
[Def] P1363a
[Inf] EPOC submission to P1363a
[History] previous EPOC/OU papers

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPcCV+zkCAxeYt5gVAQEGlQf+Muzk59ktMbATh79pwsvGkmhj9nnyssch
L1DkHtOaMwijQ2bFZtVu5K4TvDt1XFHXy6DZnJijB7R6K7vuRvS8/K3aZY4kyE1x
C9jsKvIonq1/AaorndvydgYEGMhL4/wdMQsdN0ZlDniTf+ozs7Tqn0qtz2IQmq37
3bSEOLfJCnmkwuVohwGG3CJGMLNYPPpjWLyfsLdzM/otfJdziO45/3Uh/VLObFIf
U408F6KXbZCi80KWMTC0YHnh3qiZyuaC30Dg/TeLPPQKpOS1GN5ZwQOmgk3Dapup
RGt9qssAFVrwTb65My1G0spdShecLADei8QYHV2AtbrA4rNZVP0LGw==
=B7rh
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/UMsqwCBDgEg/m/l3o2zxvx8ocJ", "n_sections": 9}, {"thread": "VjisbKsrCKY", "msg": "7V4p_s4HPRkJ", "author": "David Hopwood", "date_disp": "Oct 2, 2002, 10:15:24\u202fPM", "subject": "RC4 Info", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

pxlai625 wrote:
> > > > pxlai625 wrote:
> > > > > anyone know where i can find in-depth information on RC4?

> [...]


> i was looking for cipher definition and known weaknesses.

<http://www.users.zetnet.co.uk/hopwood/crypto/scan/cs.html#RC4>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPZuT8DkCAxeYt5gVAQEJGwf6A0hIUak30LP+1H3F3JiN2kuZ+MSdCivJ
SSD8rBQQ0qzrkfDEBJhHN2w9hugQYkuhUmWV72ouaeFV0HJjX5K6lOZT5F9xBlig
QyPMzyVpORp/0DcEI1B0E/lUQThk66DGDvh5bVA8RAmuyKCXxbcfOsIzYax1Esjz
Rb06G6Ye81i32r8YqzRSDbIvBRZvgIJk3CrZSsgMi+RV12M0qb8x6TQ9j4rRq58t
gcyc9UFBhW3zWkuoofJWfZ46JqEZRiw9V09mWNMh0fOQM8oTIROLls7RKLn9fPqV
QRH3TRKVLom+btgmemYwccxm8jMJw8YHzbA5gaw8pYqYZPo7xryMoA==
=4dZm
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/VjisbKsrCKY/m/7V4p_s4HPRkJ", "n_sections": 6}, {"thread": "a4p8uiAO_W8", "msg": "HoO0-4C4OpEJ", "author": "David Hopwood", "date_disp": "Dec 29, 2002, 7:37:42\u202fPM", "subject": "RSA 174 digit challenge as base 256", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Carlos Moreno wrote:
> Simon from Essex wrote:
> >
> > Let me guess... This is all inspired by that 'base numbering systems
> > and factoring RSA' thread, isn't it?
> >
> > I think you need to stop and think about it first. Converting a number
> > from one base to another doesn't do anything to help factor it.
>
> Hmmm... "Lighter-than-air flying machines are impossible"...
>
> Yes, that *is an actual quote* (and I routinely keep forgetting
> who said it! Someone by the end of the 19th century).

In the interests of historical accuracy, I think you're referring to the
following quote:

"Heavier-than-air flying machines are impossible."
(or possibly "Flying machines, heavier than air are impossible.")
-- William Thomson, Lord Kelvin (president of the Royal Society), 1895

However, since Lord Kelvin also said:

"Radio has no future."

"X-rays will prove to be a hoax."

"It seems as if we may also be forced to conclude that the supposed
connexion between magnetic storms and sun-spots is unreal, and that the
seeming agreement between periods has been a mere coincidence."

"There is nothing new to be discovered in physics now. All that
remains is more and more precise measurement." [in 1900]

... I think that says all that needs to be said about his predictive abilities,
however talented he may have been as a scientist.

A closer analogy to the statement:

> > Converting a number from one base to another doesn't do anything to
> > help factor it.

would be to say that an unaided human can't fly by jumping up and down and
flapping their arms about.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPg+VHjkCAxeYt5gVAQFNmwgAiIYeuRTqdydkIZIk4I5xR9QOPdCyVyqY
iixyoAQ40A3OZgzrT0C7tpgNRa1hDzv24Y7TCs9pin18uNmr7Q4b/FOVAgy3C3tC
UanCrTOqstXQhcj1UHrMDl0QhucQqURgJvsshFrrF4itmP55IzuVCmvU3+ZaYq5C
fYKJs4/TxT/Fqt86SL9/xUrA5ukXSd7IxLK/id/EZUwsm7x9W0gQcWHVVJz1utAv
qawUdDCqemSYpjNgRPazLArIOZUkQi0h+TeQGhkokvnD62RaaZ29OEfDQKOWGrca
tMOON5zTQAp8SDVrCPSYDLwQ5fq++F/QlZA5z1enUGU2Gt7quRRcRw==
=vHM+
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/a4p8uiAO_W8/m/HoO0-4C4OpEJ", "n_sections": 28}, {"thread": "cmQJfsyP2Vk", "msg": "e7x8HcAPlF4J", "author": "David Hopwood", "date_disp": "Oct 22, 2002, 3:26:05\u202fAM", "subject": "SCAN proposal: RW/ASN.1 keys", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jack Lloyd wrote:
> A suggestion for formatting Rabin-Williams keys. Specifically, do so
> identically to RSA keys (as defined in X.509 + PKCS #1). This is
> primarily motivated by the fact that no relevant RW standard exists,
> and RW can use the same CRT optimization that RSA can.

Sounds reasonable to me. Do you think that multi-prime RW should be
allowed (using the same format as RSAPrivateKey from PKCS #1 v2.1)?
This isn't defined by P1363, but it's an obvious extension.

> RWPublicKey ::= SEQUENCE {
> modulus INTEGER, -- n
> publicExponent INTEGER -- e
> }
>
> RWPrivateKey ::= SEQUENCE {
> version Version,
> modulus INTEGER, -- n
> publicExponent INTEGER, -- e
> privateExponent INTEGER, -- d
> prime1 INTEGER, -- p
> prime2 INTEGER, -- q
> exponent1 INTEGER, -- d mod (p-1)
> exponent2 INTEGER, -- d mod (q-1)
> coefficient INTEGER -- (inverse of q) mod p
> }
>
> Version ::= INTEGER
>
> The version field should be 0.
>
> Because (AFAIK) no OID has been assigned to RW, this can't be used for
> X.509 subjectPubicKeyInfo or PKCS #8 privateKeyInfo formatted keys (yet).

I'll assign one.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPbT9azkCAxeYt5gVAQH0kAf8DLLWmTVUi4Ni4KgHAGla1GCLKNOa3SKM
i+lx3UJHmWJURq1ZhyS81ZIhhnBivO4wk1w9EXXCL8vhw0czJGM80wBq45WIGtCL
zuWxzqOYVZT3ll5pFMBa/BIuOLdG8IMKyBENPB/qjt5kO3c7fPHqgwvKXlPanQzi
Np/2QWXAdLoNPr+7TMKtJTBzR3dZIn4/QUDxPoNTyJwI/xspTPUmgn4RVpR9q0gF
TRPzUnFPdmn5bzTqZcsUab51hUrg2LeMjnGPVHggnWU1NCpgPXOlmhNDb97X/tEt
8NUxfZhuvbYAgtUxvd53P6gvZFC0iPdZL1FxW7uyKaXiDHf86VOk7Q==
=rQ8s
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/cmQJfsyP2Vk/m/e7x8HcAPlF4J", "n_sections": 18}, {"thread": "fUB1vZivW7E", "msg": "Dlp68NavY34J", "author": "David Hopwood", "date_disp": "Oct 19, 2002, 8:23:47\u202fAM", "subject": "SCAN proposal: ESIGN/EMSA5", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Wei Dai wrote:
> Here is a proposed entry for SCAN (Standard Cryptographic
> Algorithm Naming,
> http://www.users.zetnet.co.uk/hopwood/crypto/scan/index.html) for ESIGN
> as defined in the IEEE P1363a draft standard.
>
> I added several older references which I've marked [His]. The idea is to
> give a history of where the design came from.

That's a good idea, also applicable to some of the other entries. I'll
use [History].

> ESIGN/EMSA5(digest) Signature

In addition to the hash, EMSA5 is parameterised by
"A mask generation function G, which shall be MGF1 (see 14.2.1) with the same
underlying hash function Hash, or a technique designated for use with EMSA5 in
an amendment to this standard".

If we follow the same pattern as for OAEP-MGF1 and PSS[R]-MGF1, that would
give the name "ESIGN/EMSA5-MGF1(digest)".

Also, signature schemes and encoding methods are given separate entries
even if they are designed to be used together, as EMSA5 is with ESIGN.

> Designers:
> Eiichiro Fujisaki, Tatsuaki Okamoto
>
> Published:
> Submission dated November 1998. Standard still in draft form.
>
> Description:
> ESIGN signature algorithm, as defined in IEEE P1363a.
>
> References:
> [Def] IEEE,
> "Draft Standard Specifications for Public Key Cryptography Amendment 1:
> Additional Techniques"
> http://grouper.ieee.org/groups/1363/index.html
> [Inf, An, Test, Impl, Patent] Nippon Telegraph and Telephone
> Corporation,
> "ESIGN Signatures Homepage"
> http://info.isl.ntt.co.jp/esign

I get a "403 Forbidden" on this page. Google says that it was there:
<http://216.239.39.100/search?q=cache:OqNNjiOwZhUC:info.isl.ntt.co.jp/esign/>
but doesn't find a replacement. I've informed NTT.

> [An] J. Stern, D. Pointcheval, J. Malone-Lee and N.P. Smart.,
> "Flaws in Applying Proof Methodologies to Signature Schemes."
> Advances in Cryptology - Proceedings of Crypto 2002, LNCS 2442, pp.93-
> 110
> [An] Fujisaki, E. and Okamoto, T.,
> "Security of Efficient Digital Signature Scheme TSH-ESIGN",
> manuscript, 1998 November,
> available as appendix A of "TSH-ESIGN: Efficient Digital Signature
> Scheme Using Trisection Size Hash".
> [Inf] Tatsuaki Okamoto, Eiichiro Fujisaki, Hikaru Morita
> "TSH-ESIGN: Efficient Digital Signature Scheme Using Trisection Size
> Hash", submission to IEEE P1363a, November 1998.
> http://grouper.ieee.org/groups/1363/StudyGroup/contributions/esign.pdf
> [His] Fujioka, A., Okamoto, T., Miyaguchi, S.,
> "ESIGN: An efficient digital signature implementation for smart cards.",
> Advances in Cryptology - Proceedings of EUROCRYPT 91 (1991) pp. 446-457.
> [His] Okamoto, T.,
> "A Fast Signature Scheme Based on Congruential Polynomial Operations",
> IEEE Trans. on Inform. Theory, IT-36, 1, pp.47-53 (1990).
> [His] T. Okamoto and A. Shiraishi,
> "A Digital Signature Scheme Based on Quadratic Inequalities",
> Proceeding of Symposium on Security and Privacy, IEEE,
> pp.123-132 (Apr., 1985).

This looks pretty good. I don't think there are any other parameters not
encoded in the public key that need to be specified.

An ESIGN key type is needed as well. Is anyone using a particular format for
ESIGN public or private keys? (For that matter, is anyone here using ESIGN,
period?)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPbFOnTkCAxeYt5gVAQH1pwf9EPSuqoXN/jdh3pEnMUZcJTqq5gCre1Rd
BSLrxviQ7vzpzBdAZDF5QjgNWt1iuEySHwclREM7TD+6Mu/iRHW4TEGUdb0yyXlG
79m2G1tCwn8E1G4bCmjlwaJ8pcmfVrH7lYnUdpA/PmyHhcHNMODi/PTodXtJz9BU
8o/2LI7nOwR9s1R6SuYpcvaKRinXkzJtKk42CSVweSJ4pdjLplKNl0D8Em9GKvrt
mdTxGBI0jRP5rvSjw6U1w2J4dxLB+7N0XKZp4kj/7mSrAjtUl9cyarx1bWAefzxN
HhXAtcLPH2PV3k5idHV1KQPGxOJAt9A4pzfNVQoHKb5o/I/9ZF6eNg==
=pXqo
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fUB1vZivW7E/m/Dlp68NavY34J", "n_sections": 29}, {"thread": "fUB1vZivW7E", "msg": "-2vRlphJiUoJ", "author": "David Hopwood", "date_disp": "Oct 20, 2002, 4:08:12\u202fAM", "subject": "SCAN proposal: ESIGN/EMSA5", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Wei Dai wrote:
> In article <3DB14ED3...@zetnet.co.uk>, david....@zetnet.co.uk says...

> > > http://info.isl.ntt.co.jp/esign
> >
> > I get a "403 Forbidden" on this page. [...]


>
> Wierd, it was working just yesterday. This link,
> http://www.nttmcl.com/sec/Esign/esign.html, goes directly to reference
> implementations and test vectors and is still working. Please add it for
> redundancy.

OK.

> > An ESIGN key type is needed as well. Is anyone using a particular format for
> > ESIGN public or private keys? (For that matter, is anyone here using ESIGN,
> > period?)
>
> Crypto++ 5.0 includes an ESIGN implementation, and it's being used in at
> least one commercial product (Groove, http://www.groove.net). I'm using
> the following formats:
>
> ESIGNPrivateKey ::= SEQUENCE {
> modulus INTEGER, -- n = p*p*q
> publicExponent INTEGER, -- e
> prime1 INTEGER, -- p
> prime2 INTEGER, -- q }
>
> ESIGNPublicKey ::= SEQUENCE {
> modulus INTEGER, -- n = p*p*q
> publicExponent INTEGER, -- e }

This seems fine (for the P1363a version where the bit-length of n must be a
multiple of 3). Any object identifier for AlgorithmIdentifier fields?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPbJkMzkCAxeYt5gVAQF2xgf/VawSnP7B9h8jtUJlwINKEYk9QFi5acVV
yqFWVYOnBf0oWEUNGjOVuvnmqkeK8G4Fj7ahWBWRcilnExABrDVzZX2YneanR5tb
8vVU/uGxyH73WM7TyChTg/tGbSnbbRZ2V1QXRwjA2PqHXVk20veArq4DN7aZHlLq
94DSOZZTJDXCjLCFHJWCIm9CYi6SDtjCfmN5YZlX94e1YtY/cr8x/ZMRl7bj6XlI
vLCkvN0gatWZGGh9Htyh159z3wpwazkixXhtcea1wo0agoNoOO+6ogPSc2A9QgVW
kxZCyfVgiI7+62XMbDg3qhgrp/uI7RDGLdpY9LFy4mPbBqYMwV583A==
=jM3N
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fUB1vZivW7E/m/-2vRlphJiUoJ", "n_sections": 29}, {"thread": "fUB1vZivW7E", "msg": "nqjWDrucI24J", "author": "David Hopwood", "date_disp": "Oct 22, 2002, 2:55:45\u202fAM", "subject": "SCAN proposal: ESIGN/EMSA5", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Wei Dai wrote:
> david....@zetnet.co.uk says...
> > This seems fine (for the P1363a version where the bit-length of n must be a
> > multiple of 3). Any object identifier for AlgorithmIdentifier fields?
>
> I'm not aware of an OID for ESIGN, but I'll look into getting one
> assigned.

I have an Enterprise Number:

SCAN OBJECT IDENTIFIER ::= {
iso(1) org(3) dod(6) internet(1) private(4) enterprise(1) 8619 }

but I'm reluctant to assign anything that might result in duplicate OIDs, so
I've asked NTT about that.

Here are the other OIDs I have that identify key types (i.e. that go in
AlgorithmIdentifier fields for SubjectPublicKeyInfo, etc.; not OIDs for specific
schemes):

RSA {1 2 840 113549 1 1 1} (from PKCS #1, for RSA encryption or signing keys)
DL {1 2 840 113549 1 3 1} (from PKCS #3, for DH key agreement keys)
EC {1 2 840 10045 2 1}
(from <http://www.globecom.net/ietf/draft/draft-ietf-pkix-ipki-ecdsa-02.html>.
Does anyone know what happened to this draft?)

Besides ESIGN, that leaves RW and EPOC/OU, of the P1363[a] key types.

> BTW, the ESIGN link under KeyFactory is going to the wrong place in SCAN
> 1.0.20.

Oops, I uploaded the wrong version - thanks. The scan.zip file was also wrong.

> Also, please consider putting SCAN in a CVS repository, because now it's
> not easy to see what has changed between versions.

There are now .zip files for versions 1.0.11 and .13-19, e.g:
<http://www.users.zetnet.co.uk/hopwood/crypto/scan/scan-1.0.11.zip>, but
I agree that a CVS repository would be better. I don't have a machine that
is always on-line - can you host it (using CVS over SSH)?


(PS. I haven't forgotten about your DLIES proposal.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPbT2KjkCAxeYt5gVAQEJTQf/USbG+lF/8+c95tNB+pHtf/+TDS4QVvWd
+CNjdesdhp5TqxuHbhy9sd0cVsNxz7apMzqYU9LqN3Or6yUmYDw/tR2wJB15dygF
7GTLOoO8AdGvg8gnVJDS1Zbw23LKUrsHOyWGe9wPvXb0yz7lB9Giyg2kpKKqvjRb
eqOz7y57dD2lnbYQZpU3sPRoIgrzbKx9AkLZXBKi7FK0rHholLd6M7LmnWMXKXHP
DLNJIcNC+poVmR5js9S7rq+n+j0fcfce6i+VpQKCpeQuntgU5mkicbmc3VAn0Hrg
J5FAMZaW2O+YW7TFA4b+kPrWGvf2bv7ZXyrGaHzEtU1ioYDecNNx8Q==
=h2hf
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fUB1vZivW7E/m/nqjWDrucI24J", "n_sections": 29}, {"thread": "fUB1vZivW7E", "msg": "Jx8hZD0_6UwJ", "author": "David Hopwood", "date_disp": "Oct 23, 2002, 4:44:49\u202fAM", "subject": "SCAN proposal: ESIGN/EMSA5", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Wei Dai wrote:
> In article <3DB4F671...@zetnet.co.uk>, david....@zetnet.co.uk says...
> > I have an Enterprise Number:
> >
> > SCAN OBJECT IDENTIFIER ::= {
> > iso(1) org(3) dod(6) internet(1) private(4) enterprise(1) 8619 }
> >
> > but I'm reluctant to assign anything that might result in duplicate OIDs, so
> > I've asked NTT about that.
>
> Ok, thanks. Who is your contact at NTT?

I'm using the address <esign AT isl.ntt.co.jp>.

> And please cc me on future ESIGN related communications with them.

Will do.

> > Here are the other OIDs I have that identify key types (i.e. that go in
> > AlgorithmIdentifier fields for SubjectPublicKeyInfo, etc.; not OIDs for specific
> > schemes):
> >
> > RSA {1 2 840 113549 1 1 1} (from PKCS #1, for RSA encryption or signing keys)
> > DL {1 2 840 113549 1 3 1} (from PKCS #3, for DH key agreement keys)
> > EC {1 2 840 10045 2 1}
> > (from <http://www.globecom.net/ietf/draft/draft-ietf-pkix-ipki-ecdsa-02.html>.
> > Does anyone know what happened to this draft?)
>
> (1 2 840 10045) is assigned to ANSI x9.62, so I assume you should be
> able to find the ECDSA public key OID in there.

I found an old draft of X9.62 that looks similar to the I-D, but I'd prefer to cite
something freely available. I suppose I should ask on the PKIX WG list why the I-D
wasn't taken forward.

> Here the OID for DSA public keys:
>
> id-dsa OBJECT IDENTIFIER ::= {
> iso(1) member-body(2) us(840) x9-57(10040) x9cm(4) 1
> }
>
> BTW, all four of these can also be found in PKCS #11 2.1, section 12.11
> (or search for "algorithm identifier").

Thanks, that's useful.

> It also gives this OID:
>
> dhpublicnumber OBJECT IDENTIFIER ::= { iso(1) memberbody(
> 2) us(840) ansi-x942(10046) number-type(2) 1 }
>
> but I'm not familiar with it. Does anyone know what it is for?

Presumably, DH as defined in X9.42. RFC 2631 appears to be an equivalent RFC,
but I haven't checked how it is different from PKCS #3, yet.

> > There are now .zip files for versions 1.0.11 and .13-19, e.g:
> > <http://www.users.zetnet.co.uk/hopwood/crypto/scan/scan-1.0.11.zip>, but
> > I agree that a CVS repository would be better. I don't have a machine that
> > is always on-line - can you host it (using CVS over SSH)?
>
> I don't have a machine that's always online either. Why not host it at
> SourceForge? It's pretty easy to create a new project, or I can create a
> module for SCAN in the Crypto++ CVS repository at SourceForge.

I've submitted a new project request.

> > (PS. I haven't forgotten about your DLIES proposal.)
>
> Ok. BTW, where is DLIES-ISO defined in Shoup's ISO proposal? It has
> ECIES, but a search for "DLIES" turned up nothing. Is it in there under
> a different name?

The description of ECIES works for any "abstract group", as defined in section
13 ("cofactor multiplication" becomes cofactor exponentiation, etc.).

> Do you know what is the status of Shoup's proposal in the ISO working group?
> Is it in a draft standard?

Apart from what it says in the document ("This document is an initial proposal
for a draft for a forthcoming ISO standard on public-key encryption."),
I've no idea.

> Also, what's SCAN's policy about different standards that define the
> same or compatible algorithms? For example the ECIES proposal in Shoup's
> paper is supposed to be compatible with the ECIES in IEEE P1363a, but
> only allows a subset of its options. How do you think that should be
> handled?

Probably they should be the same algorithm, but the superset should allow
additional creation parameters. Adding creation parameters is an allowed
change, as long as the default values define the same algorithm as before.

(I shouldn't really have used the names DLIES-ISO and ECIES-ISO; they
should just be called DLIES and ECIES. Since they have experimental
status, there's no problem with renaming them.)

> On a somewhat related issues, about the SCAN policy of forbidding

> backward-compatible revisions: [...]


> Why not allow backward-compatible revisions, but also assign a new name
> for each new revision, so the user of the crypto API can explicitly
> specify the new name to avoid this masking problem?

That's allowed by the policy, because the new name defines a different
algorithm. DSA-1363 is an example. It is also allowed for an implementation
to define the subset name as an alias for the superset algorithm (provided
that it doesn't include options that the subset entry says MUST NOT be
supported). I'll try to make this clearer.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPbZhPDkCAxeYt5gVAQE6VwgAnXjqpWwPEuJqUc/dxzrLqiQF9gqB3k4y
e0ULSCk/yYj7Nfzn+kTX9CGPLDtYRnUPDtfm0Rp2vzaRVJIb7AsT8JlbFyVmfYQv
wzxL3scFDMlRlKonXd//hlvUdN5KtoPOydSPl0HitFp4FhweyabG6KwSZR1U17LW
qxTo85ACjwW+DHk+DkZ8NJHytbaE8NQOODkxpduSMnPrt2k/P6REuWv5GRjoI2tr
R9cR1PrplFqNgg9Oe4mMutEgD2n1n1sa7Rn/jeIBrFB2qh5IS5E2D81JcEKtSaVx
Q+D8ue10Fm3Opn0aQ02yxQyesDOPQG/FvntSJEmz/DcoF6/ElK+hEA==
=YhR6
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fUB1vZivW7E/m/Jx8hZD0_6UwJ", "n_sections": 29}, {"thread": "fUB1vZivW7E", "msg": "_3IBVhagk_MJ", "author": "David Hopwood", "date_disp": "Oct 23, 2002, 4:55:38\u202fAM", "subject": "SCAN proposal: ESIGN/EMSA5", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Hopwood wrote:


> Wei Dai wrote:
> > dhpublicnumber OBJECT IDENTIFIER ::= { iso(1) memberbody(
> > 2) us(840) ansi-x942(10046) number-type(2) 1 }
> >
> > but I'm not familiar with it. Does anyone know what it is for?
>
> Presumably, DH as defined in X9.42. RFC 2631 appears to be an equivalent RFC,
> but I haven't checked how it is different from PKCS #3, yet.

Ah, found it: RFC 2459 section 7.3.2.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPbZj8DkCAxeYt5gVAQEmWggAqidZqzPkGRlEWE+Ayy+j92b3oQBdFQzv
3Y5/SOVvF3va2OWJ2LmX66YwWUZaqebWmQtU0EV6s2/E6VREuai8b48ErZ4qHQkU
L8Q5lixsHRDMCmAJwtgqa865HvXW9qLmwFFCgDx4GaCbYWuHmZIYURclW7fh5MHH
jxcttJvARo08Cy/QeCWdCe1eypqcEP2xHLOJQyEhBPeDA+Zof2CCawcKf3LerkFq
0MxzEMDjxhhCTJcwWR+rleKFxQGd4vOnBN3NhngP6Ci2fLjYjuTEu3bhPU9U7c5S
t5/vbsLX/1DkTFAx3XzdD8UkUHAwnZRFgZcBEbcLkeeRXcemnD4KqA==
=sfPc
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fUB1vZivW7E/m/_3IBVhagk_MJ", "n_sections": 29}, {"thread": "fUB1vZivW7E", "msg": "hytFoolmFVEJ", "author": "David Hopwood", "date_disp": "Oct 23, 2002, 5:04:06\u202fAM", "subject": "SCAN proposal: ESIGN/EMSA5", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

NR (and also PV) uses the DL key type. So there's no need for a separate
key type OID and public/private/parameter formats for NR; just OIDs for
NR signature schemes. For the time being I'm just considering how to
encode keys and parameters.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPbZl2TkCAxeYt5gVAQHP0wf/RSJSAK3tyduG8i2t6SMeCZAa3UK+3RTj
PnfH7k+DsHouWVypgpXLHAHJwtnoP6059XglG3AdRqxHUZYQ/xs9IYqFSWbaKzty
tvao+xmAF94SLRW3juZPFV+mdzZb7Ww3KvindNxUqvpFx0IAXhd3fdDd0TxIeYJc
K/HFXOr0zfztjsfvsIMAilNkHoPvLwaZjomIzQgRpevIMAsijgYTdAcuFBRHvQO4
b8mDloXAf2Ba9fx36hETiVumFl29bLHk8IdYtmkXCeLIzVboaQlWdm41C+hwCA+l
gTbgYz+nEuXkU/nEthyxR39jszWnvDQean8Vt23TTErZrc7TdzcsKg==
=ATLT
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fUB1vZivW7E/m/hytFoolmFVEJ", "n_sections": 29}, {"thread": "fsthuDF8cUM", "msg": "mrMMn0G_prYJ", "author": "David Hopwood", "date_disp": "Oct 22, 2002, 1:30:47\u202fAM", "subject": "Trying to understand CRC formula in old Fluke test equipment", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

John Robertson wrote:
> I am not sure if this is the correct newsgroup to post to, however it
> is the only one I can find that speaks to CRCs.

These articles describe most of the common CRC variants:

Terry Ritter,
"The Great CRC Mystery,"
Dr. Dobb's Journal of Software Tools,
February 1986, #112: 26-34, 76-83.
<http://www.ciphersbyritter.com/ARTS/CRCMYST.HTM>

and

Ross N. Williams,
"A Painless Guide to CRC Error Detection Algorithms (v3.00)"
<http://www.repairfaq.org/filipg/LINK/F_crc_v3.html>

> 3) Seems to use the basic formula X16 + X15 + X2 + 1 but with some
> "seed" binary number - maybe.

This is the CRC-16 polynomial.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPbTiczkCAxeYt5gVAQHLqgf7BPwHdO7cwR59OC+HdSGndFtTwAmEuBsr
OjcjQfG4CniKOgvFl6wDGxofiLRLZ3GqaM9ofnREG43aXgCGMeKK54dU8KUWqREY
/6Ove7LCvfZf/7k7T2v8XGkNFi1ry093rFwPCaJv6SAzK98g/wXdO/kOPTGs6Uzz
51YN+vTFmwyUZHO6tnPs987NjjCY1IezaMphieV3q0h8oOe6txKfaVWwULhkfyoJ
6DldQATYygXfIFeqAUsgQvsxdgQFgxMqzprzr0t4izyaR6wgtDM9lgfzNE+ACXxY
7Vr6S8RM8uK50dQ3CnUcQoa8CImtm0u5t/WNvrP3kyuK5EoexxrqHw==
=YLN+
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fsthuDF8cUM/m/mrMMn0G_prYJ", "n_sections": 10}, {"thread": "gCFh7JvtAzY", "msg": "rl78v1TttnEJ", "author": "David Hopwood", "date_disp": "Oct 6, 2002, 2:45:31\u202fAM", "subject": "RSA encryption exponents (was: Caesarion v4)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

gamo wrote:
> On Fri, 4 Oct 2002, gamo wrote:
> > > > http://www.rcarey.org/cion.html
> > ...
> >
> > What that this mean? A crypto-joke?
> >
> > | 10. The encryption exponent has been hard-wired at 65537 which is a
> > | particularly good choice for security reasons.
> >
> > 2^16+1? Is 2^33+1 a worst choice?
>
> Yes, 'cause it's not prime and it's RSA, stupid.

There's no particular reason why an RSA encryption exponent must be prime.
It has to be relatively prime to phi(n), and so making it prime may slightly
simplify key pair generation, but there's no security reason.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPZ/b6jkCAxeYt5gVAQGaOwf+JLoL/EZfvfCC3Tn+NVY03E9U6LcX2Im0
gpMFLpQ96HOngRIzNER8LTgncmypcrlr8Ts9Gxzk03njnuasnfq2TgDTiDrmwwJ/
owCvHFYSoIVJUq7h06Z6UUpQ9CAEVtpzGWTLMUy1+jUCmgnFEmiV5r4jsaeTP4bs
OPJb9R+ikEU8y/k4vDcV48rAEIQzQioc+j0LMQaUzwPFW4VblQwMCOgHzJCA9Sg3
VIvSLV6FhiaW364pI+6llO087NVoD4dzWC4Js7sR3kXP7Mq7u1hfV9guI54dJHgc
VVnydd0OgvCkqdIhyJDy2fkrpQRYumx0gYPEGaAWvWeaE1CJpAqsIQ==
=dm9o
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/gCFh7JvtAzY/m/rl78v1TttnEJ", "n_sections": 23}, {"thread": "h7KUqkUtYX0", "msg": "c1NlOvdVHPMJ", "author": "David Hopwood", "date_disp": "Oct 19, 2002, 7:02:21\u202fAM", "subject": "SCAN comment: DSA", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Thanks.

> Also, the DSA entry lists the HTML versions of FIPS 186-2

FIPS 186, actually.

> as the definitive references, but no NIST page links to them any more.
> Perhaps the PDF version linked above should be the definite reference
> instead.

Strictly speaking, FIPS 186-2 + Change Notice 1 allows only 1024-bit keys:

# The Size of the Prime Modulus
#
# Section 4 of FIPS 186-2 specifies that the prime modulus p of DSA is
# defined for the range of prime integers 2^{L-1} < p < 2^L, where
# 512 <= L <= 1024 and L is a multiple of 64. This change notice specifies
# that L should assume only the value 1024 for DSA as specified in FIPS 186-2,
# i.e., the prime modulus p should be defined in the range 2^1023 < p < 2^1024.

I don't think this has been entirely thought out - is an implementation
nonconformant if it accepts existing signatures verified by a public key with
modulus length < 1024 bits? I don't disagree that implementations should
only generate 1024 bit keys (and should been doing so from when FIPS 186 was
first published, really), or that protocols using DSA should require all keys
to be >= 1024 bits, but the FIPS itself should not be making incompatible changes.

Anyway, the SCAN algorithm "DSA" *is* defined for all p such that
2^{L-1} < p < 2^L, 512 <= L <= 1024 and L is a multiple of 64. The policy for
allowable changes to stable algorithms
(http://www.users.zetnet.co.uk/hopwood/crypto/scan/conventions.html#status)
wouldn't allow this to be changed. So in fact FIPS 186 is a correct
defining reference. (FIPS 186-2 *without* Change Notice 1 would also be a
correct defining reference, since it just added RSA and ECDSA; its definition
of DSA is technically equivalent to that of FIPS 186.)

The other change made by Change Notice 1 is to give a new algorithm
for generating the random nonces, instead of the two algorithms that were
given in FIPS 186. However, those were never a normative part of the
specification. I'll include a note in the Security Comments about the nonces
needing to be independent and uniform on [0, q), and references to some
papers about that.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPbE7YDkCAxeYt5gVAQGQAwf/XwA+CVYptqm6mUqdLyD3OH1JA76JqA2D
IDNgZhs/gVZvhi17uEyzHRGRNKsb6z/LtZLZpS0t+wmDCkIPUfityu7N8Fuh1NVJ
0BWn+3VbwaWl87C8lkO6gx8+PETmMUIpiU2jbYzd1eXWAfm7e8VZHeM4zy3LqYwP
KAsk9kTQqDwpIyjT4GsbPaEd216vA4iM6Y0sxcZKaiEbK79PLVX+7yxF7o0cdfUD
hJm18b/wq6IT+SyRHEScp6LREvQDZ9t1XLqOZ4WjYYeB6ys4XDX2b/mC/HOYTBQY
9KuBamO0Qk3aWT71w+VMqhac/VLdNtQnEnmDsH137zKJL86xR+JINg==
=MSXN
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/h7KUqkUtYX0/m/c1NlOvdVHPMJ", "n_sections": 3}, {"thread": "ljdNSqt4inc", "msg": "Skol8WJ0m-4J", "author": "David Hopwood", "date_disp": "Nov 5, 2002, 2:17:15\u202fPM", "subject": "SCAN proposal: HAS-160", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jack Lloyd wrote:
> Here is a proposal for giving the HAS-160 hash function a standard SCAN name.
> The only official standards are in Korean, but the [Inf, Test] reference below
> should be enough to allow working implementations. Everything I know about the
> history and background of the algorithm is also given there.

Yes, this is enough for an entry at 'provisional' status. I'll add it when I
add the new ASN.1 key formats.

(I'll be away for the rest of this week, though, so that will be next week.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPcgYkzkCAxeYt5gVAQHr3wf/bnz/gWb/pGegjXvu7JT52fmGDpFt+XM/
9wcvXXSiuf4noR4m4uM0IE9M6PI1cxEHtiqlJ2s9r9MOvid7gfzANU2AATfvuGKD
clwu8EDaUhe3cSqsC1vLg6w/UXY7LireUVgiibCxrllOoCR0Vog1GTNU1ihPMrA9
zMrcK65ekoHGK+tSyAuGXwORB+SO8XVzcCDKsNterWcOquCwHX9u6VjvuZ5ARxoX
wV2lO1JjXNUZI5ZF+AjTk3/XKrq0/hTkET2l7x30BwMWUtlxQFIWW8bo2N/Ns0aP
oTr62Fxl8F2Qp8N2I+mO5bj9Jhnmk91OlEmk5+89/Uk8vWARAynzuA==
=+iJf
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/ljdNSqt4inc/m/Skol8WJ0m-4J", "n_sections": 3}, {"thread": "njnlMVrZoqI", "msg": "sze9vasWwlsJ", "author": "David Hopwood", "date_disp": "Nov 20, 2002, 3:23:08\u202fPM", "subject": "What is the (hottest) fractal algorythm for hiding data in images or sound files?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jean-Luc Cooke wrote:


> "MP" <mike...@u.washington.edu> wrote:
> > What is the (hottest) fractal algorithm for hiding data in images or sound
> > files?
> >
> > Also, are there any implementations of these algorithms that are 'easy' to
> > use?
>
> Take your data D, D_len bytes in length. Take an image at least
> (D_len*3/B) pixels in size. Store your data in the B lest significant
> bits of each Red/Green/Blue 8bit value.

Why do people keep suggesting this? It's not secure against even casual
detection methods [*]. We don't get answers to questions on sci.crypt saying
that repeating XOR ciphers should be used for crypto, so why do we get the
equivalent for steganography?


[*] <http://wwwrn.inf.tu-dresden.de/~westfeld/attacks.html>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPdvvDTkCAxeYt5gVAQGlwQgAtMlTZwn+J0AobXLXkVKp4ascBxcHxaLg
K4eJRPeWlGRG9GJv1jfyasKE/O9w96kE3SNobCMfyw9PC8Fvf1HserrZSq/aT2CK
E9fJZCeYn+ilB/xquyh38vDAMxTLoEuzfUN8iWKEEwb6iNUnOiL+1QlToGb3YIPy
qQFwL2ykZvYQacueUJgdODC7MGyBZse0+7IC5SZIWlLSYbnQPE+bdFAulqds0tVj
cP3tSIlqZm9q+dNQHiqC7m/JXtJkLtkZcru/yZAw2ZbuOsn8UuyEAhLyjA2mhaHY
O1knmeSykjLur07zJzjTNDWsKlgHIyJOZjnoLa6SZ3UhKbtNSEnHmA==
=nFix
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/njnlMVrZoqI/m/sze9vasWwlsJ", "n_sections": 9}, {"thread": "npGPuw6DiAQ", "msg": "LH4ReC2K2VoJ", "author": "David Hopwood", "date_disp": "Oct 13, 2002, 8:41:59\u202fPM", "subject": "RC4 Algorithm Specification", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paulo Jorge Matos wrote:
> Where can I find a specification for the RC4 implementation online?
> I'd like a mathematical analysis of the RC4 too. Any ideas where I can
> find these?

<http://www.users.zetnet.co.uk/hopwood/crypto/scan/cs.html#RC4>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPaoSwDkCAxeYt5gVAQFGNwf/bMU+o5U1z+gg3i9+KwSn373xeLCkor2f
GLkcv/ABD2WjKQ0U15O5QyFpFhcU+PXUl56FAMBm0be6hvmfzDdWzyAKZ83sqJqG
nL4wfFsOo2p3OfKgreMCdV8Rxj4HGn1cAzSrVlUxlv2KxZQjFnIVuG9wHtY6u7uJ
O1PzX+jnfwAJN5LLQkLRNr+q/z4suRa+MtMUzSrMR8qJKdVj/ioJXp4LfEF/npmk
WKcmH3w8wQFVY3cUHEhWstgqFu9lrQ+Yexzr4zztpBfADOYf4xn5joDw8UpcNa61
ZWUV6n+VRYfbwskgQJwnDBRzTq3sPg6CXpGww9xj5yVerTDvmzWU4w==
=jGeo
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/npGPuw6DiAQ/m/LH4ReC2K2VoJ", "n_sections": 5}, {"thread": "v2awCQsg07U", "msg": "6daMyYxBwuIJ", "author": "David Hopwood", "date_disp": "Dec 22, 2002, 9:17:06\u202fAM", "subject": "The 'right' security property for general-purpose symmetric encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Wagner wrote:
> Bob Mathews wrote:
> >Here is a rough sketch of a chosen ciphertext attack on GE. [...]
> >None of this gives you the entire cipher key on a silver platter. However,
> >it is generally considered undesirable for a cipher to leak bits of
> >information about its key. Who knows how far an opponent might be able to
> >stretch those bits?
>
> Also, if the attack is correct, it would show that GreatEncryption
> is malleable and hence not IND-CCA2-secure. Since IND-CCA2-security

> is the right standard for general-purpose encryption, [...]

Note that IND-CCA2 =/=> INT-PTXT (see Figure 1 and Proposition 3.3 of [BN00];
the counterexample isn't even all that artificial).

If you don't have INT-PTXT then existential forgery of new plaintexts is
possible, and that would be a bad thing in practice for the symmetric
encryption component of many protocols. For instance, we might expect that
using an IND-CCA2 encryption scheme with packet sequence numbers would be
sufficient to prevent an attacker who does not know the key from forging
packets, but that is not true unless the scheme also has the INT-PTXT
property.

(For a while I also thought IND-CCA2 was sufficient, but was corrected by
Richard Parker. INT-CTXT, OTOH, doesn't appear to be necessary for most
protocols.)


[BN00] Mihir Bellare, Chanathip Nampremprey,
"Authenticated Encryption: Relations among notions and analysis of
the generic composition paradigm,"
Preliminary version in Advances in Cryptology - ASIACRYPT '00,
Lecture Notes in Computer Science Vol. 1976 (T. Okamoto ed.),
Springer-Verlag, 2000.
Full version (September 25, 2000) available from
http://www-cse.ucsd.edu/users/mihir/

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPgXI6DkCAxeYt5gVAQHNfwf/S/ZlDjxFblbIFAQwygXLjlbQok/IFZgn
YO62v4/s+SlojI7xbgcL4Hm+AkejnRyyHudbwdnXfxcIjUU9PbXilTrlTAyj5V24
zCLFfAaxVmb+SeYnkHb/JgTbH2n8uaLwxkPeYcRycY1nOxg1pwcLILe+sWNb1jNv
PN4rZr/Y1hPUUzwV3yUavY0WQU4jHfE4AdJIVc3bVrUE/a1oEU4Q8MM/sndAfZie
7bw0avfVMyCfqtazhesjuS+Bk40HWjgDnLmkIT536So63ohkmyvZEw0i52NAxfIX
7xK2RfwVijhRIVCRTtN9phBUqlZjLMh9YLoRpDgYPV1Z5RLR3nelaA==
=RFU2
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/v2awCQsg07U/m/6daMyYxBwuIJ", "n_sections": 49}, {"thread": "v2awCQsg07U", "msg": "m4foNLaKOGMJ", "author": "David Hopwood", "date_disp": "Jan 11, 2003, 6:09:40\u202fAM", "subject": "The 'right' security property for general-purpose symmetric encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Yes (for symmetric encryption, that is; INT-PTXT isn't defined or necessary
for asymmetric encryption, and you would normally use a signature scheme
for authentication in that case).

> Is this sufficient, or is there something else I'm missing?

The only issue would be whether the slightly stronger property
IND-CCA2 /\\ INT-CTXT is necessary. (INT-CTXT means, roughly speaking,
that the attacker cannot forge a ciphertext that has not been seen before;
INT-PTXT means that it cannot forge a plaintext that has not been seen before.)

AFAICS, this would only make a difference if you were doing something like
detecting replays by checking for duplicated ciphertexts. That probably isn't
a very practical way to detect replays, anyway: sequence numbers are better.
When using sequence numbers, or if replays are not important,
"IND-CCA2 /\\ INT-PTXT" should be sufficient.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPh/7MDkCAxeYt5gVAQGmtwgAo3Z2nNMLPdCy0aax7t20Ujl6wm9/uBrI
GDHWo7BSjxM/k0aOaOCjJJrOyzvsVTGZ7S2ppRbfBbzu9+G6el7KCOZCkCMCvu+p
gJsGg5qpVfVksr1a9Z4yJ1TTfduLZYUEsH6arIs5UbM+iw+QLgAbfD9GQQ7cnDs1
n7bzHlmT14GsR6DHgg2QswNEH1zns9Dcrj+JViIMeDpf2kjBSMiBCm7uaHwkBWYO
Hzu/7ZuLYJumfmSnP3o7+gTRZ1U44gAvOc9FDsYq8ySdVA8aWEqiwUUtVU5J6hq6
2F6gpvgtp3IdeKOXOLNQbadvsK1EjYX9vAJeweUZOrVmrw1Nlrck+w==
=kRZk
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/v2awCQsg07U/m/m4foNLaKOGMJ", "n_sections": 49}, {"thread": "v2awCQsg07U", "msg": "g8FZAjBsWDMJ", "author": "David Hopwood", "date_disp": "Jan 21, 2003, 3:25:05\u202fPM", "subject": "The 'right' security property for general-purpose symmetric encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Wagner wrote:
> Bodo Moeller wrote:
> >If the adversary breaks IND-CTXT by creating a new ciphertext related
> >to a previous ciphertext obtained from an encryption oracle (such that
> >both ciphertexts decrypt to the same plaintext), this does not
> >necessarily mean that he can break IND-CCA2: the new ciphertext can be
> >related to *any* previous ciphertext, we cannot target a specific
> >challenge ciphertext.
>
> It's not clear to me. I guess I'm not willing to give up hope

> just yet. [...]


>
> >As a particular example, consider the case of length zero: if, given
> >one encryption of the empty string, you can derive a different valid
> >encryption of the empty string, this means you have broken IND-CTXT,
> >but you can't do much else with this.
>
> This I'm willing to believe! But I'm led to think that the empty
> string might be a special case here.

It's not. Consider the case of length 1 bit: the attacker is given two
ciphertexts that are encryptions of <0> and <1>. It then (somehow) finds
a different ciphertext that decrypts to either <0> or <1>, but it is unable
to tell which (assume that encryption expands length so that there are
more than two possible ciphertexts).

This does not break IND-CCA2 or INT-PTXT, but it does break INT-CTXT.
An explicit separation should be fairly easy to prove - for example
let the key be {K1,K2} where E'_{K1,K2} = E_K1, but suppose that when
the ciphertext C is not in the range of E_K1, D'_{K1,K2}(C) = PRF_K2(C)
(truncated to the right length).

I agree with Bodo's conclusions:
- IND-gCCA2 & INT-PTXT is sufficient for applications that don't rely
on whether ciphertexts can be duplicated,
- IND-CCA2 & INT-CTXT is required for applications that do rely on
ciphertexts not being duplicated,
- IND-CCA2 & INT-PTXT does not imply IND-CCA2 & INT-CTXT.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPi2sZzkCAxeYt5gVAQFcqwgAnKdS3PEviLhK5Eu/CPyNEYLQyuPS1W8e
PzJe8+w6IgUWDCuuOnc/01f8/xK0miZHewdToc6rcnDCwx4vN1Yb6qqzwmuuHVcm
deIWUNRpUYgEBN2X/FGyZrxb1ddR9TCFL/u56UjrcLECSX2EYmksyVWxrY6uIdz+
1ip7U+l0UxljbfNWKKPWiz88y2Vwz+TOaYO+Kkz8GDPo7HgD+U1p9tCruzdJCvCi
3zzo28plMyxmdDzlVymU5NIFrwROx2rkuf7zPS6YqpvSEiuP6gKsHhZMTzqNftRJ
WFdgnCSpHHxm1het1Qsc2juJY+skY0Xh8J4goNei8MS2XbGuMrsnYA==
=yWRw
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/v2awCQsg07U/m/g8FZAjBsWDMJ", "n_sections": 49}, {"thread": "v2awCQsg07U", "msg": "CW2laj5J-kUJ", "author": "David Hopwood", "date_disp": "Jan 22, 2003, 8:52:22\u202fPM", "subject": "The 'right' security property for general-purpose symmetric encryption", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Wagner wrote:
> David Hopwood wrote:
> >It's not. Consider the case of length 1 bit: the attacker is given two
> >ciphertexts that are encryptions of <0> and <1>. It then (somehow) finds
> >a different ciphertext that decrypts to either <0> or <1>, but it is unable
> >to tell which (assume that encryption expands length so that there are
> >more than two possible ciphertexts).
> >
> >This does not break [...] INT-PTXT [...]
>
> How do you ensure it doesn't break INT-PTXT? You're going to have
> to ensure that the attacker can only generate the third ciphertext
> once it knows the encryptions of <0> and <1>.

You're right, the approach I was thinking of doesn't work.

After thinking about this a bit, I now have no idea whether
IND-CCA2 & INT-PTXT => IND-CCA2 & INT-CTXT or not. It seems to be
difficult to either prove or disprove.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPi9KYzkCAxeYt5gVAQEANAf+NrZjg3CEvg074ID8oXxoq5ot27qMRwpy
csRjLrdivDE6ZS/1p8WccQIjQVWopv+GzSuJ8/Z8V9ysbowS1NATsjGccHpyt9TR
mHTcMjDfD/SBdNi1B1YCmFnsW68v+SRM+AlNpB5lTufv2rAZ9oDN1rJJQBXA4fth
hea1iwiguWeUZeQsBlFE79SEa9AcmEat6Ev6sFrLr4zxKk4aoDN34WsMPtKRPyr2
SiaAjfamh7mWLqyzj7na0JCKZxGl9laKL0grgrCvNHmOz9DkUwSFl1W+V6kCWU8H
OvB1T8SryDmVhSiIvxpi8PvIt1FTiqDedSFhNMDcE6+uFOR2opOwYQ==
=OgzV
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/v2awCQsg07U/m/CW2laj5J-kUJ", "n_sections": 49}, {"thread": "xHHuXBuFUXM", "msg": "S8WXm2XZXiYJ", "author": "David Hopwood", "date_disp": "Oct 30, 2002, 12:55:29\u202fPM", "subject": "Blowfish and encryption strength", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mike wrote:
> I am interested in using Blowfish in a project that I am working on and need
> to know how to properly control, or limit, the encryption strength.

Why do you think you need to do that?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPb4XRjkCAxeYt5gVAQHV0gf+O309oDPN9l8sQQCvV/cv8f3OLvOqkW1F
/FogeyQ4E4ileZXXTI+gcgPdq71ZL9zKiqls78/2N8oUgSOVv7k6TK4sybFZqWQm
gZKBPqyjSjSkamcgg/vWOil3mG6hFfDzws9+DwHHgWcxv9IJI9ngOpxILlqFG0Em
suOb1AAQHboNj2f+wuAgijF2LrQ2i1trbL99E60B48BwT9tELu+ZcicOZXo3IFM+
lt0/xC0enUHNzT1d8NT5pex8L24SCqgQ/2PRok/pFJD9+RIqQopOs113KiZwQogY
lnxKFf8spxzgzhBzfQCLFT53lZ4xOkgtdj52OmKAihcECtYbeSwplQ==
=41/U
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/xHHuXBuFUXM/m/S8WXm2XZXiYJ", "n_sections": 5}, {"thread": "2LgZUcmbHzk", "msg": "IyExxBZ7VZoJ", "author": "David Hopwood", "date_disp": "Mar 29, 2003, 5:06:57\u202fPM", "subject": "Cohen's paper on byte order", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Brian Gladman wrote:


> "Francois Grieu" <fgr...@micronet.fr> wrote:
> > Endianness is an important subject, with no simple answer.
> > <http://planetx.bloomu.edu/~bobmon/readings/ien137.Cohen-Holy_Wars.html>
>
> I agree - it's 'horses for courses' since there is no 'right' solution.

It seems very odd to say that you agree with Cohen's paper and also that there
is no 'right' solution. Cohen implicitly gave three possible solutions:

A. standardise on big-endian representation for all chunk sizes
B. standardise on little-endian representation for all chunk sizes
C. standardise on a single chunk size for external representation of
data.

Any of these are 'right', with the (important) caveat that A and B are mutually
exclusive. (A and C are not mutually exclusive, and neither are B and C.)

The paper does not describe the solutions in the same way I've done here,
but all three are implicit in this sentence:

# If an inconsistent bit order is used, the chunk size must be understood
# and agreed upon by all parties.

However, Cohen expected 16-bit communication protocols to become common (they
never did), and so he thought that it would be politically infeasible to
agree on a single chunk size:

# Those who use such an inconsistent order (or any other), and only those,
# have to be concerned with the famous byte-order problem. If they can
# pretend that their communication medium is really a byte-oriented link
# then this inconsistency can be safely hidden under the rug.
[...]
# Wouldn't it be nice if we could encapsulate the byte-communication
# and forget all about the idiosyncrasies of the past, introduced by RS232
# and TELEX, of sending the narrow-end first?

(This sentence is talking about solution C at the upper interface of the
physical layer, and A at higher layers. IOW, the approach that is actually
used by the TCP/IP protocols.)

# I believe that it would be nice, but nice things do not necessarily
# occur, especially if there is so much silicon against them.


Therefore, the main thrust of his argument is in favour of solution A:

# SUMMARY (of the Memory-Order section)
#
# To the best of my knowledge only the Big-Endians of Blefuscu have built
# systems with a consistent order which works across chunk-boundaries,
# registers, instructions and memories. I failed to find a
# Little-Endians' system which is totally consistent.
[...]

# SUMMARY (of the Transmission-Order section)
#
# There are two camps each with its own language. These languages are as
# compatible with each other as any Semitic and Latin languages are.
#
# All Big-Endians can talk to each other with relative ease.
#
# So can all the Little-Endians, even though there are some differences
# among the dialects used by different tribes.
#
# There is no middle ground. Only one end can go first.
[...]

# We would like to see some Gulliver standing up between the two islands,
# forcing a unified communication regime on all of us. I do hope that my
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# way will be chosen, but I believe that, after all, which way is chosen
# does not make too much difference. It is more important to agree upon
# an order than which order is agreed upon.

IOW, either A or B has to be rejected, and it would be necessary to do so
arbitrarily even if there were absolutely no objective reasons to favour one
over the other.

Also, Cohen makes it quite clear that he considers some approaches to be 'wrong':
specifically, those that use inconsistent orders for different chunk sizes. To use
some examples that are more recent than the paper, MD5 is wrong because it uses
big-endian bit order and little-endian byte order. Similarly, PPP over an RS-232
link is wrong because it uses little-endian bit order and big-endian byte order.

(The reason why these two examples don't cause serious problems in practice is
that, in the MD5 case, bit string inputs are hardly ever used, and in the PPP over
RS-232 case, the two protocol layers are cleanly separated with a byte string
interface between them. Nevertheless, Cohen clearly finds this kind of mixing of
orders distasteful, even when it works.)

Bizarrely, the paper is most often cited in support of claims that byte order
"doesn't matter", and might as well be chosen on a per-application or
per-protocol basis - even though this would in fact lead to many more
instances of inconsistent byte order when combining different protocols into
systems. This is probably because Cohen chooses his metaphors poorly:

- the paper starts by describing the disagreement as a "holy war". Normally, and
especially in the figurative technical sense, neither side in a "holy war"
has any greater claim than the other to be 'right'. That is absolutely
not what Cohen means; on the contrary, he spends most of the paper arguing
in favour of the big-endian side, especially in the "Memory order" section.

- in /Gulliver's Travels/, the satire relies on the fact that it wouldn't
matter if everyone cracked their eggs at different ends. But this is the
*opposite* of Cohen's argument, that everyone should use the same byte
order so that they can more easily communicate with each other.

Anticipating the confusion this might cause, Cohen says at the end of the
paper:

# SWIFT's POINT
#
# It may be interesting to notice that the point which Jonathan Swift
# tried to convey in Gulliver's Travels in exactly the opposite of the
# point of this note.
#
# Swift's point is that the difference between breaking the egg at the
# little-end and breaking it at the big-end is trivial. Therefore, he
# suggests, that everyone does it in his own preferred way.
#
# We agree that the difference between sending eggs with the little- or
# the big-end first is trivial, but we insist that everyone must do it in
# the same way, to avoid anarchy. Since the difference is trivial we may
# choose either way, but a decision must be made.

Unfortunately, this point seems to have been almost completely lost, in favour
of the idea that any attempt to argue for use of a particular byte order should
be considered analogous to fighting a "holy war". The moral is that if you must
use metaphors in a technical paper, *make sure they are consistent with your
conclusion*.

As it turned out, we ended up with a situation where solution C is used almost
universally: effectively all protocols and standards that require external
representation of binary data use a chunk size of 8 bits, which they call a
"byte". For each protocol/format, the byte order is either fixed or specified
using a tag field. This is not ideal because it still requires some byte order
conversions. However, it at least means that there is sufficient information to
do those conversions correctly, and without having to deal with more than one
chunk size in APIs (which would cause a great deal of ugliness that could not
be fully hidden from end-users).

For the standard Internet protocol stack, solutions A and C are used together
(cf. "network byte order").

> And the same is true about identifying bits within larger units - the choice
> between 'significance naming' or 'enumeration naming' depends on which is
> more appropriate for the purpose at hand.

When identifying bits in the binary representation of an integer, there are
clear advantages to identifying the bit with weight 2^k as bit number k
(independent of byte or bit order). I don't see why this would be dependent
on the purpose at hand. An integer is an integer, whatever it is being used
for.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPoYY6zkCAxeYt5gVAQEXQQgAkKovv+QdhbYMO8jAp0QYRlyaj67qCS2P
os5faDJN5QC5Ri5k8KykDkyYBEMBhnnHyV+3ZMKsL18q5+9n1P5l0eiDxg14fK5h
SzPxcsif/MC11hQOUke8+vvUUOteFGC2ZPxVRuuxyjbvS7BTVWe/BcqTsmNItNMT
WZCZry9bxpcLXhvcbP+esOawBYgbIyVMp00X47PHD3cDj4/hnn3az2OJJsVAnugf
Oln6CAJHwqhoLvXdy1MUwmM81/wNivHi+4DiHXTc+xd5v1Ca7bSci2hsTWT7an0T
FtDfVwNpzRoPG2/ByRlxTe9CuAuKhD1MgDNQlDmOKIN+Mu/eJHCaRA==
=YuCZ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2LgZUcmbHzk/m/IyExxBZ7VZoJ", "n_sections": 100}, {"thread": "2LgZUcmbHzk", "msg": "jPd_o-VB7zIJ", "author": "David Hopwood", "date_disp": "Apr 1, 2003, 11:32:14\u202fAM", "subject": "Cohen's paper on byte order", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Brian Gladman wrote:


> "Roger Schlafly" <rog...@mindspring.com> wrote:
> > "Brian Gladman" <b...@gladman.plus.com> wrote
> > > However my point is a more general one - namely that it is wrong to
> > > assume that strings of bits necessarily represent integers.

That was never assumed by anyone in this thread, AFAICS.

> > Once you load a string of bits into a computer register, then there
> > is an implied numeric equivalent, and hence a least-significant
> > and MS bit. Maybe somewhere there is a CPU with a register
> > of just bits, where the CPU can only AND, OR, XOR, and
> > maybe other bit operations. But all the ones I know let you
> > ADD, and hence define an integer meaning. (Except that CPUs
> > have floating point registers, with only a floating point meaning.)
>
> I agree that there might be a numeric interpretation of a non-numeric bit
> string on a particular machine but this is irrelevant if the bit string does
> not represent a number.

It is certainly relevant. You seem to be confusing what a collection of
octet values represents (which could be any type at all), with how it is
modelled in the specification of a machine architecture or of a protocol.

Regardless of which type is being represented, in order to describe how octet
values relate to abstract values in that type, there *must* be a canonical
model for the possible values of an octet, and this model should be universally
agreed on.

In fact, it is agreed on: the model that everyone uses is the integers 0..255
inclusive. This *directly* corresponds to something that you can store in a
8-bit processor register, in a memory location of an octet-addressable
architecture, in a binary file, transmit over an Internet (or OSI) protocol,
etc. A 8-bit string, OTOH, cannot be stored or transmitted in these ways without
first choosing a bit order.

> Most computer systems have instructions designed to interpret bit strings
> with several different semantics, it being up to the programmer to apply
> only those insructions for which the semantics match those of the objects
> that they are manipulating.
>
> > So it is usually necessary how a bit string might be an integer,
> > since any implementation is going to make it an integer (or
> > integers) anyway.
>
> Not so - I have a many implementations in which bytes do not have any valid
> numeric interpretations. The most numerous of these use bytes to represent
> finite field elements in GF(256).

What is the type of the abstraction function associated with this representation?
The answer is "{0..255} -> GF(2^8)". That is, an abstraction function of type
{0..255} -> GF(2^8) is sufficient, on its own, to specify how the field elements
are represented in terms of octets; a function of type {0,1}^8 -> GF(2^8) would
not be.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPom+oTkCAxeYt5gVAQFOwwgAyTRX8kHCNXe6mecyyBhJ7OKHUS9EutTL
s2xIq23PovaA2tVEynm8Ci4ojoske9Q+KfKFXHm/hp/acsgfnEKMTdNDi6y6BEEt
Q+BfgZAcWnHlfZ5Z3qg6jex8/d4UUdFa5lTnzFvxrPEIfvtb1tZKm1p/25ffhZhG
EWgG21B/jZ50GjZvAzJ2/Vz9MxT5g+7TXRip95OUvK39ZsFfepLgT6QkxQyjyvmf
fVETUuawbdhaEdAIOZFVqub4ZUSMpP5F2YJCzq001RlpdWTVChl1/HmuynYftOA8
wgGTE5i+a2JoCAczVyIPidGqDsFdhwgmKvorHRaci+6WO+87IbT9rg==
=4uxL
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2LgZUcmbHzk/m/jPd_o-VB7zIJ", "n_sections": 100}, {"thread": "2LgZUcmbHzk", "msg": "_KjSx1OrFPcJ", "author": "David Hopwood", "date_disp": "Apr 1, 2003, 5:55:45\u202fPM", "subject": "Cohen's paper on byte order", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Brian Gladman wrote:


> "David Hopwood" <david....@zetnet.co.uk> wrote:
> > Brian Gladman wrote:
> > > "Roger Schlafly" <rog...@mindspring.com> wrote:
> > > > "Brian Gladman" <b...@gladman.plus.com> wrote
> > > > > However my point is a more general one - namely that it is wrong to
> > > > > assume that strings of bits necessarily represent integers.
> >
> > That was never assumed by anyone in this thread, AFAICS.
>
> This was assumed in suggesting that the early evaluation of a bit stream
> representing a big-endian number could not be evaluated unless the bit
> length of the complete representation was known in advance.

That was suggested only in the context of a particular example ('For example,
suppose I was reading the digits of your electric bill to you. If I start out
with "3", you don't know if that's "3", "30", or "300".')

> I pointed out that a fractional numeric representation did not have this
> limitation.

I agree with Roger Schlafly's comment: 'But that is really an exceptional


situation. Hardly any software will act on a partial number before the entire
number arrives.'

In any case, no-one assumed that strings of bits necessarily represent integers.

> > > > Once you load a string of bits into a computer register, then there
> > > > is an implied numeric equivalent, and hence a least-significant

> > > > and MS bit. [exception for floating-point regs snipped]


> > >
> > > I agree that there might be a numeric interpretation of a non-numeric
> > > bit string on a particular machine but this is irrelevant if the bit string
> > > does not represent a number.
> >
> > It is certainly relevant. You seem to be confusing what a collection of
> > octet values represents (which could be any type at all), with how it is
> > modelled in the specification of a machine architecture or of a protocol.
>
> General purpose machines offer several different semantic models for data
> objects,

Some registers on some architectures are reserved for floating-point values,
vectors, pointers, flags, etc. However, the context was clearly general-purpose
registers, and representation of values in octet-addressed memory or octet-based
protocols.

> it being up to the programmer to choose instructions whose
> semantics match those of the objects that they are manipulating.

In a trivial sense yes, but that doesn't affect the point that for instructions
that operate on octets, the octet values correspond unambiguously to integers
(this applies also for bit shift instructions, etc.)

> If they are not manipulating some entities that a machine is capable of
> processing then the way that the machine handles such entities is irrelevant
> for their purposes.
>
> > Regardless of which type is being represented, in order to describe how
> > octet values relate to abstract values in that type, there *must* be a
> > canonical model for the possible values of an octet, and this model should
> > be universally agreed on.
>
> I agree that for each distinct semantic object that a processor is designed
> to handle,

The discussion was about octets. No assertions were made about other types of
value/object.

> there must be a mapping of this object to the bits within the
> machine.

That's not important. The physical machine could be analogue, for all we care,
as long as the virtual machine presented to the programmer is well-defined.
In effectively all virtual machines that have general-purpose registers, those
registers are specified as holding integers.

> As far as I am aware there is no universal agreement on what
> these mappings should be.

I claimed only that there is agreement on how to model octets. This is not
rocket science: on every octet-addressed architecture, if I read the value of
the octet at some virtual address (without triggering a trap or fault), then
the value that is read can be unambiguously expressed as an integer from 0..255.
The same applies to reading an octet from a binary file, a TCP socket, or
whatever. If I say that a particular integer was read, no-one will claim to
misunderstand what that means, unless they are being deliberately contrary.

[...]


> > > Not so - I have a many implementations in which bytes do not have any
> > > valid numeric interpretations. The most numerous of these use bytes to
> > > represent finite field elements in GF(256).
> >
> > What is the type of the abstraction function associated with this
> > representation? The answer is "{0..255} -> GF(2^8)". That is, an
> > abstraction function of type {0..255} -> GF(2^8) is sufficient, on
> > its own, to specify how the field elements are represented in terms
> > of octets; a function of type {0,1}^8 -> GF(2^8) would not be.
>
> I use "finite_field_element -> set_of_8_named_bits".

I was talking about abstraction functions; this is a representation function.
(In this particular case, there are no abstract values that have multiple valid
representations, so the representation relation is a function. In general, it
need not be.)

Anyway, how do you name the bits? If they are named by their numeric significance,
i.e. by the *set* of names {2^0, 2^1, 2^2, 2^3, 2^4, 2^5, 2^6, 2^7}, then we have
an integer. To insist that there is any fundamental difference between this model
and the model using integers from 0..255, is just splitting hairs - they are
completely equivalent (isomorphic, to be precise). I prefer the integer model
simply because it is less complicated, as we can see by writing out the octet
value 0xAB in both models:

{ (128,1), (64,0), (32,1), (16,0), (8,1), (4,0), (2,1), (1,1) } (your model)
vs
171 (integer model)

> As you know from previous debates, this is not the same as the abstraction
> you use.

It is isomorphic to the abstraction I (and most other people) use, which is good
enough. It is *not* isomorphic to a bit string (which was also the issue in our
'previous debates'). A bit string is something else entirely.

The bottom line is: octet values correspond to integers from 0..255.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPooYKDkCAxeYt5gVAQHPngf9EIADpUYu3RZ/lpj7TI8Gri1Fnl0wuei6
N+UiSbl700dhVd34vXqu+CufwrOsThLq0Ia9c+w6JC6gMoiKwA2SorDLZYzeLYBd
Wb3tXttrRdpfWM1Y5PUZ4yyDyNL0ZchIj475JigN2bCVo6Lp5+XrbKOzLTlJ3WBr
vjdCRbfpO0vHtsGpGbPEG53JJPGK8b4h23KulTxU8heFjV8mq+CRyjipSmjJTVy+
e2n05MtvkH+axs2brCpYHFUJ8hblxR9v7IRq1HEDatvYUMBVrp0EgjjxDcH2WPkj
q7aItqVylKiGOKNKfncKUlbNfDN+sIA6dB8B3BrNaSLxymGsg+yehw==
=9cq9
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2LgZUcmbHzk/m/_KjSx1OrFPcJ", "n_sections": 100}, {"thread": "2LgZUcmbHzk", "msg": "QZ46g7irAQgJ", "author": "David Hopwood", "date_disp": "Apr 1, 2003, 6:35:08\u202fPM", "subject": "Cohen's paper on byte order", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Douglas A. Gwyn" wrote:
> David Hopwood wrote:
> > In fact, it is agreed on: the model that everyone uses is the integers 0..255
> > inclusive. This *directly* corresponds to something that you can store in a
> > 8-bit processor register, in a memory location of an octet-addressable
> > architecture, in a binary file, transmit over an Internet (or OSI) protocol,
> > etc.
>
> It should be pointed out that none of those involve *numeric value*,
> except processor register when used in conjuction with arithmetic-
> oriented machine operations.

Yes they do. Read some RFCs or file format specifications: it is absolutely
commonplace to refer to the numeric values of octets, without specifying any
additional conventions such as bit order, and whether or not any arithmetic
operations are used. The numeric value unambiguously specifies an octet value,
whereas a bit string, by itself, would not.

Of course the octet might not *represent* an integer in the higher-level
protocol (and even if it does, the octet with value x might not represent
the integer x). Nevertheless, the octet corresponding to any integer from
0..255 is always well-defined.

> > The answer is "{0..255} -> GF(2^8)". That is, an abstraction function of type
> > {0..255} -> GF(2^8) is sufficient, on its own, to specify how the field elements
> > are represented in terms of octets; a function of type {0,1}^8 -> GF(2^8) would
> > not be.
>
> The point is, somebody needs to specify that mapping or else we
> do not know how to use the storage representation of the GF element.
>
> The absence of such a specification for the AES, after it was revised
> from numerically-oriented notation to GF notation, is something
> worth complaining about, precisely because without some specification
> for that one does not know how to exchange AES-encrypted information.
> It is likely that both ends would *guess* the same encoding, but it
> should not have been left up to guesswork.

We agree on this, then.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPoohzjkCAxeYt5gVAQFtqggAz2mMd7VRxLMZLaARCKOYq5BtwL1uymx3
iBGbvx6uBWT9u7XQgM1M4ESH2QcDPFJtHwD2Le1ngpkEIbkVepneZxcKBxwpemwk
AW8w2CQ/14mH0Ff0pMJ67mRcdBWZOHX2skBB8Mo1AdpCBzv04QHRDqw6/cd/ym9y
MhaJFzXLTTIhtuXQS0r1d5OV+uK2r6VMFGYEaFRBadp3ioMv3DPJFflpZ1wMi2lG
jD5iWKw76v3PGKJaajKerqSBRtG+zO+X1VAvl/R8fEcrdEefmp+eTIZ7eAycYx6F
gQgTdeb5uIEI8HlnL+jh4RIrZ0WsCW77j4TKv1fTiknG32EBonUGpw==
=L0L4
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2LgZUcmbHzk/m/QZ46g7irAQgJ", "n_sections": 100}, {"thread": "2LgZUcmbHzk", "msg": "f4qSg4u-rb0J", "author": "David Hopwood", "date_disp": "Apr 4, 2003, 10:58:57\u202fPM", "subject": "Cohen's paper on byte order", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
[snip much silliness that ignores the purpose of defining standards]

> Further, suppose someday certain hardware has 9-bit bytes, what should one


> do in a standard for the said mapping?)

One should treat the hardware as if it had 8-bit bytes, leaving the 9th
(most significant) bit unused.

More generally, for hardware with any other size of "byte": one should treat
the hardware as if it had 8-bit bytes packed into a word in the same order
as the architecture's natural byte order, leaving the remaining (most
significant) bits, if any, of each word unused. Unused bits should be set
to zero on output.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPo5GZDkCAxeYt5gVAQHUgAgAnBWPawPGAi5EXwR3MBn1+7xOliGdvaDn
mLTByjEfuIZSXJ0xRYgzuBZOER1elnPaFUMcIN6r405ugtPo/HoYXLX9fvkBMJr9
K1IrA7nWJmog+JV6UjSGbacoX+5QFmuqXnVWNvJFBT8zgnDt2rD4oeMQAgVJUPte
AQ91vI5CEz350LXaiZp37BYJ6410Gy5GC8K50pMzOxkj2o7Z3YHCGCxVn8yT23HU
t75k/rvnjJNLaX76SqQ92ixll0RhOzuwOnrnFkGjO3WRHwLSjj7GpZOQk15V3GWm
zdE9UoL/6OIuOz9zfqHcO46QTrPl3+oq9WVgC3z8Vk+ar0+Fzs86zA==
=4ylD
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2LgZUcmbHzk/m/f4qSg4u-rb0J", "n_sections": 100}, {"thread": "2LgZUcmbHzk", "msg": "EN2cNODLppYJ", "author": "David Hopwood", "date_disp": "Apr 4, 2003, 11:01:46\u202fPM", "subject": "Cohen's paper on byte order", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Brian Gladman wrote:
> "Lassi Hippel\u00e4inen" <lahi...@ieee.orgasm-research.invalid> wrote:
> > > Brian Gladman wrote:
> >
> > > > I would be grateful if you could point me to _the_ universally
> > > > agreed, unambiguous definition of an octet since I agree that this
> > > > would be useful.


> >
> > The definition of OCTET in ASN.1 ("an ordered sequence of eight bits")
> > is as universally accepted as can be.

Wrong. It is not actually used even by ASN.1 (see below).

> > The standard is jointly published by three international organisations
> > (as ITU-T X.680 and ISO/IEC 8824-1),

That has never been a guarantee of implementability, never mind clear use
of terminology.

> > and is always used in that sense in the RFCs of the IETF.

Take back that unwarranted slur on the IETF! All IETF standards documents
that I'm aware of get this right: they use numeric significance to define
bits within octets, and *only where necessary*, they define a bit order
for conversion between octet strings and bit strings. For example, from
RFC 1951 (DEFLATE):

# Bytes stored within a computer do not have a "bit order", since
# they are always treated as a unit. However, a byte considered as
# an integer between 0 and 255 does have a most- and least-
# significant bit, and since we write numbers with the most-
# significant digit on the left, we also write bytes with the most-
# significant bit on the left. In the diagrams below, we number the
# bits of a byte so that bit 0 is the least-significant bit, i.e.,
# the bits are numbered:
#
# +--------+
# |76543210|
# +--------+
[...]
# 3.1.1. Packing into bytes
#
# This document does not address the issue of the order in which
# bits of a byte are transmitted on a bit-sequential medium,
# since the final data format described here is byte- rather than
# bit-oriented. However, we describe the compressed block format
# in below, as a sequence of data elements of various bit
# lengths, not a sequence of bytes. We must therefore specify
# how to pack these data elements into bytes to form the final
# compressed byte sequence:
#
# * Data elements are packed into bytes in order of
# increasing bit number within the byte, i.e., starting
# with the least-significant bit of the byte.
# * Data elements other than Huffman codes are packed
# starting with the least-significant bit of the data
# element.
# * Huffman codes are packed starting with the most-
# significant bit of the code.

The diagrammatic and numbering conventions in RFCs are local to each document.
RFC 791 (IPv4), for example, uses the opposite numbering convention to
RFC 1951, but this is harmless since it uses the same model of a byte/octet,
where bits are identified by their significance:

# APPENDIX B: Data Transmission Order
#
# The order of transmission of the header and data described in this
# document is resolved to the octet level. Whenever a diagram shows a
# group of octets, the order of transmission of those octets is the normal
# order in which they are read in English. For example, [...]
#
# Whenever an octet represents a numeric quantity the left most bit in the
# diagram is the high order or most significant bit. That is, the bit
# labeled 0 is the most significant bit. For example, the following
# diagram represents the value 170 (decimal).
#
# 0 1 2 3 4 5 6 7
# +-+-+-+-+-+-+-+-+
# |1 0 1 0 1 0 1 0|
# +-+-+-+-+-+-+-+-+
#
# Significance of Bits
#
# Figure 11.
#
# Similarly, whenever a multi-octet field represents a numeric quantity
# the left most bit of the whole field is the most significant bit. When
# a multi-octet quantity is transmitted the most significant octet is
# transmitted first.

So when we transmit a DEFLATE stream over TCP/IPv4, for instance, there is no
ambiguity, because the most significant bit in each octet of the DEFLATE
stream is matched with the most signficant bit in some octet of a TCP/IPv4
packet. (I chose this example because it demonstrates that the behaviour
would be visibly different, if bits were matched either by their bit numbers
in each document, or by their original order in cases where the octet sequence
is the result of a conversion from a bit sequence.)

> ITU-T X.680 is the specification of ASN.1 notation and does not (as far as I
> recall) deal with encoding.

The definitional problem I mentioned above is precisely with the notation and
not with the encoding rules. Everyone agrees that the encoding rules (at least
BER, CER, DER and PER) are big-endian.

The ASN.1 standards are on-line at
<http://www.itu.int/ITU-T/studygroups/com10/languages/>.
Here is what X.680 says about octet strings (*emphasis* corresponds to bold
text in the original):

# 22 Notation for the octetstring type
#
[...]
# 22.3 The value of an octetstring type shall be defined by the notation
# "OctetStringValue":
#
# OctetStringValue ::=
# bstring |
# hstring
#
# 22.4 In specifying the encoding rules for an octetstring, the octets are
# referenced by the terms *first octet* and *trailing octet*, and the bits
# within an octet are referenced by the terms *most significant bit* and *least
# significant bit*.
#
# 22.5 When using the "bstring" notation, the left-most bit shall be the most
# significant bit of the first octet. If the "bstring" is not a multiple of
# eight bits, it shall be interpreted as if it contained additional zero
# trailing bits to make it the next multiple of eight.
#
# 22.6 When using the "hstring" notation, the left-most hexadecimal digit
# shall be the most significant semi-octet of the first octet.
#
# 22.7 If the "hstring" is not an even number of hexadecimal digits, it shall
# be interpreted as if it contained a single additional trailing zero
# hexadecimal digit.

Taken on its own, this is fairly clear:
- bits within octets are labelled by their significance, two of the
labels being "most significant" and "least significant". Although the
standard does not actually define these terms, it would be perverse not
to consider them to have their usual numeric meanings.

- the "hstring" notation is such that each pair of hex digit characters
("0".."F", case-insensitive) maps to the octet with the same hexadecimal
value according to the MS-on-left convention, and the pairs are ordered
from left to right.

- the "bstring" notation is such that each 8-tuple of binary digit characters
("0" or "1") maps to the octet with the same binary value according to the
MS-on-left convention, and the 8-tuples are ordered from left-to-right.

IOW, ASN.1 (both the notation and the encoding rules) relies on numeric
significance naming, as we've been referring to naming conventions in this
thread. This is consistent with a definition of octet in which octet values
are integers from 0..255; or equivalently, bits are labelled using names
from the set {2^i : i <- 0..7}, where "most signficant" is a synonym for
2^7 and "least significant" is a synonym for 2^0. And in fact, that is how
everyone implements ASN.1.

Unfortunately, X.680 also includes the following definition:

# 3.8.48 octetstring type: A simple type whose distinguished values are an
# ordered sequence of zero, one or more octets, each octet being an ordered
# sequence of eight bits.

Since there is no specification of how the significance of the bits maps to
their sequence order, there is no way to reconcile this definition with the
way that octets are used in the text of the standard. Note that this has
nothing to do with encoding; the issue is that if octets are defined as
sequences of bits, we cannot say which octet value corresponds to a given
string in the ASN.1 value syntax. The definition is just plain wrong.

> What Glynn and David are pushing for is a
> standard mapping (encoding) between the abstract entities defined in the AES
> FIPS and objects that are already defined in the implementation environment
> (such as bytes or octets).

What I am saying is that for almost all real-world standards, *including* ASN.1,
the things that are referred to as either "bytes" or "octets" in the text of
those standards, and when they are discussed informally, correspond unambiguously
to integers from 0..255. FIPS 197 should not be an exception.

(Yes, I know the C89 and C99 Standards are exceptions, but in that case only in
the size of bytes, rather than the fact that byte values correspond to integers.)

> I suspect that the closest that ASN.1 material comes to this is X.690 but
> this too is abstract and stops short of defining an abstract to physical
> mapping.

X.690 (BER/CER/DER) and X.691 (PER) also use numeric significance naming.
- From X.690:

# 6 Convention
#
# 6.1 This Recommendation | International Standard specifies the value of
# each octet in an encoding by use of the terms "most significant bit" and
# "least significant bit".
#
# NOTE -- Lower layer specifications use the same notation to define the
# order of bit transmission on a serial line, or the assignment of bits
# to parallel channels.

I.e. the ASN.1 specifications explicitly make the same argument I am
making in this thread. The definition of octet string in X.680 is simply
an aberration.

# 6.2 For the purposes of this Recommendation | International Standard only,
# the bits of an octet are numbered from 8 to 1, where bit 8 is the "most
# significant bit", and bit 1 is the "least significant bit".

This is just a convention local to X.690, but note that it defines the
convention for bit numbering *in terms of* significance.

> In my view it is an implementor's job to set a mapping between the abstract
> objects that they are handling and architecture defined entities within the
> implementation environment.

Indeed, and that's why it is important to agree on what the abstract objects
are. The X.680 definition of an octet as a bit sequence is inconsistent
even with the rest of the ASN.1 standards documents, never mind with other
standards. Just ignore it.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPo5VEzkCAxeYt5gVAQFBuggAvm8WKhz3TKRnjP5LYt8oovrMKGCBShTt
3arwJsM6WiVMdVEv2iRWg5X0/2g5UlzogJExMEFoUnDkADhxs4Dp7AaPmd91CVeL
t3QC0/mH72nWVRO0naYWlT+TrSb3m35VgQS27lObZlVHOhhSdHRxZSRgI/k0tce6
9uK5tdeGpCaJ/YBC+pEvnlj0up7uwy3+M671i1Zwmpao8RHoCrzpuqCyVxboBfoK
wpA4SVc7GHVAF+E8/tuhCRnLedS/zNOss/lZZSG7GCw8gdx8zaNiBwdeftKcT23M
3fXN9xlsjUm3Ki2GmKowKhwY+iD1ndxpDgo2Qg/EOCs3Fwq/B0/E7A==
=t3us
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/2LgZUcmbHzk/m/EN2cNODLppYJ", "n_sections": 100}, {"thread": "52QqzszfjLI", "msg": "Tmhy9xjoDoUJ", "author": "David Hopwood", "date_disp": "Feb 9, 2003, 9:22:01\u202fAM", "subject": "Who is an expert? (was Re: Why was Rijndael...)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

DSCOTT wrote:


> pa...@JUNKCATCHER.ciphergoth.org (Paul Crowley) wrote:
> >So if you ask them who they consider to be experts, you can be
> >confident you're getting reasonably authoritative answers.
> >--
>
> I think if you look at many sciences you will find that
> people are people and tend to view those that share similar
> beliefs as ones own as more credable.

This makes absolutely no sense as a criticism. *Of course* people view
those who share similar beliefs as more credible: at any given point
in time, each person believes their own opinions, by definition.
Reasonable people are prepared to change their opinions where they
conflict with evidence, or depend on a situation that has changed.
So, it is perfectly rational to give additional weight to the opinions
of people who share *some* of the same beliefs as you, while retaining
an appropriate degree of skepticism about things that can't be
demonstrated directly. It only causes a problem if you're in the habit
of forming beliefs about things you know too little about, or if you're
insufficiently skeptical by default.

Anyway, you're never going to dissuade anyone of any opinion by claiming
that they're ideologically motivated. Effectively the only way to
dissuade anyone of a strongly held opinion is to point out cases where
what they believe doesn't work, or necessarily has implications that
they don't want.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPkWrTDkCAxeYt5gVAQE/KQf7BQwYFWzxAP8wCkYFCJYQ+qBjjxjw5uTD
AaUiU5h2XNgFuYkvlIlTYVuTTSZPi1dwHqCB55E2GUI/qQBKXB1BI1lqo8KTf1sl
aOloWvBmtg4OtK1wu9ycoMBJzqmS6TDtKV+OXSEYePyW0e0BD+NaTJnuWroope1h
5v6J6Q8uodTpc5Ro4du9D+nG0MnsK7gJDHOC/pMt30NlfHnJrOC9GhfzUV6pSOx5
P4v6t4KJsjFkQ6Jq4PAu8gjOxzGzVFmbgWkrrZ7zF2uaipe1wSF7r1ZN/G6NFpMg
YZjw+xgd+FWq4o8tkAciKkk2AAgQ633R3z/nnibgWeTcN0r9j9WvdA==
=5eqg
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/52QqzszfjLI/m/Tmhy9xjoDoUJ", "n_sections": 47}, {"thread": "83J_G1Ai3Jg", "msg": "Fs4q2_yQkMIJ", "author": "David Hopwood", "date_disp": "Feb 17, 2003, 4:07:11\u202fAM", "subject": "Looking for bruteforce times", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Taking this argument to its natural conclusion, we can expect a further
improvement from using chemical rockets to accelerate the upside-down room
sharply upwards. It will of course be necessary for the human operator to
be inside the room when it achieves escape velocity, in order to read the
results.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPlASDTkCAxeYt5gVAQEd9gf/YXjOKQb0T4uoBEvMfHV7pBGVbVc+dLz9
Lz96Qru0kTm4mFdTQlKeEgKe/V4GNH54yuPmxvXjBKc+ofHYYq4SYtvWmReMabb9
gda5QtUhwa/mHuudE0tUecIIufy0d163yY7OTq+g58MHtw5EXdV32jal4ZPfo9uG
RQUy8JEVNbQKdDCIWI90Lqv8M35Rd/UEmpUXcLoMsTrUOX+SVDd1CHoGF87kDqEQ
CAb/FcQg3LDgDxGIoS+FwQo4i5cd2R01rGArsVXUVuAFdlZZNy0mMU5FbOu37p4E
PwZlnbSQNJ+Xbkb5oa/VyHHMWfz6SLjfcJJ2/3NCdXm4994m3TkMeQ==
=qrxU
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/83J_G1Ai3Jg/m/Fs4q2_yQkMIJ", "n_sections": 15}, {"thread": "9MhPl0o4k6Y", "msg": "SJ-bTgmnwb4J", "author": "David Hopwood", "date_disp": "Jan 15, 2003, 3:39:51\u202fAM", "subject": "RARC C++ code", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mrsjunecarey wrote:
> It's been a while since I looked at RARC,
> but I seem to remember thinking: XOR'ing state[x] and state[y] *almost*
> precludes a result of 0, since during PRNG/cipher operation, most of the
> time x != y.
> Indeed, the PRNG/cipher is designed to break the condition of x == y (or it
> would get "stuck").
>
> Thus, adding state[x] and state[y] together does not skew the possible

> result, [...]

Wrong. The result is less likely than expected to be even.

Just randomly fiddling with the choice of operations is unlikely to lead
to anything more secure; I suggest paying closer attention to the literature
on RC4 (see http://www.users.zetnet.co.uk/hopwood/crypto/scan/cs.html#RC4),
and to Bob Jenkins' paper, before posting any more variants.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPiT/BTkCAxeYt5gVAQFlfQf8DQeeh/2EATA/PaUzO06SbpooP7EqgWLQ
/GReFR9KwGyzt6xxnE+o8y8UV7PAI4+aM+P82Py6PqBUYilClWNvF49f0QCja9ES
hSLswB+nnGbrdZ+2BBEsPKmZmVJAQBE0ooG0XVh6hRuUpEFQiC3CY4j1t3+Akknj
L5MtCviObOQ0Rcsmdc6ztfui+ADhYhG59D6oc4kyTvHgscfezYPlWI4P5jwWy2KL
EQJW3MvrJpHqmf0ZtRQrP83Vci5gkbvAJRZyXaThhFn/WlXtHDID4SsdcDyVFjix
wXQyIRgaMGFQhS6qRqIjGm7s3LOnuV3utEjRDltndYo8Ptv8jr1prw==
=zcxg
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/9MhPl0o4k6Y/m/SJ-bTgmnwb4J", "n_sections": 71}, {"thread": "9MhPl0o4k6Y", "msg": "D5acwsmAKzIJ", "author": "David Hopwood", "date_disp": "Jan 17, 2003, 6:11:49\u202fPM", "subject": "RARC C++ code", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mrsjunecarey wrote:
> David Hopwood wrote:
> > [...] I suggest paying closer attention to the literature on RC4 [...]
> > and to Bob Jenkins' paper [...]


>
> As I've already mentioned I have read Bob Jenkins paper (and I liked it).

Yes, you read it, but did you pay close attention to it? For example,
did you try any of the statistical tests that Bob used on his ciphers?
(Statistical testing of ciphers is no more than a sanity check, but in
this case if you had tried such tests, you would immediately have concluded
that RARC is weak.)

> I feel that your choice of words "randomly fiddling" is ...... well .......
> almost insulting.

My words are almost always carefully chosen. Specifically, what led me to
conclude that you were "randomly fiddling" was the suggestion that
"(state [ x ] ^ state [ y ]) % 2" might be changed to
"(state [ x ] + state [ y ]) % 2", when obviously they are equivalent.

> Just what is the problem with posters in sci.crypt ?

They post too many symmetric cipher designs that have had no analysis.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPiiNlDkCAxeYt5gVAQFXYQf/eKRRyY6eQssmKlFmIc2Ehv9wb/0xSODk
0gNEBs4g5sy3JnNsxFUd7x70XR5Lc3Ia+8G8O8JHRalxK1F20FX7o2fmrrYlZu9u
0fqhr5WjBkIbnw8uqy2czLa11vsWcDxU6ttNtPFShkC6rmT2CtwwP9x0mnyjC3PA
F3dAwEeiH5NghQJ9XGtKPCu2Ue4h/2Zg/2A8bHnxAe4XgTuBdakBjuewY/wijbo8
BBFexGfr108yzkUt0Erh3ZOxxFtnVujfS/7XP3ftvIy+gOsJ2anVorTY1wlHrGTt
T/1N+0pyuwITzRBcJBi8otaOea1g90fOYd2lJZtLw4W0y0KfgK0DWg==
=1m4x
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/9MhPl0o4k6Y/m/D5acwsmAKzIJ", "n_sections": 71}, {"thread": "GpEsKM-VI9s", "msg": "OGWSRE-KXrQJ", "author": "David Hopwood", "date_disp": "Jan 29, 2003, 4:12:06\u202fPM", "subject": "Client/Server ASP/VBScript/JavaScript encryption scheme", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Michael Amling wrote:
> Paul Rubin wrote:
> > Rijndael's block size is always 128 bits. Where did you find a JS (or
> > is it VB) implementation anyway?
>
> AES's block size is always 128 bits. Rijndael supports block size
> 128, 192 or 256 bits.

<pedantic>
Rijndael, as specified in [1], supports block sizes of 128, 160, 192, 224,
and 256 bits.
</pedantic>

[1] Joan Daemen, Vincent Rijmen,
AES Proposal: Rijndael (corrected version),
<http://www.esat.kuleuven.ac.be/~rijmen/rijndael/rijndaeldocV2.zip>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPjhDljkCAxeYt5gVAQGyVAf/T2PjTjaE1Uj6Q5GEoVygV3WHMPxv32tU
aOgHTQWT9cNvXSuoJR7KMaqt1RHrHrWe49Lb9IvqNKdztkon3F/g1JqL+MzyAAJ4
2J5HnLnVFeSXQsc/7eqM2c5LO8zoIk+l4/yOQTJVkSe1Jl8CxE2kUkjDLtYuFLF8
D7G5LWDX690m+nH7b7sWdT7hQd0aHqcIBqqSHjekWrfUQUbTbwmRpwY91rzOL6wY
nNCUmSFb4D+kTOyF/j9vv6tn1/M2EbfYRL5opvQ2lUBarWdLmtFFj2T1F/KYvaBB
2szIEkH3ykcezgNEXHuNcL7pOeyZ7koK1dhuM79oEcZuUBB3F+AA1g==
=EAAe
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/GpEsKM-VI9s/m/OGWSRE-KXrQJ", "n_sections": 5}, {"thread": "HkCgNiBIUTA", "msg": "9blcD7Gt4JAJ", "author": "David Hopwood", "date_disp": "Mar 3, 2003, 7:07:15\u202fAM", "subject": "A public key authentication scheme based only on hash functions", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Rubin wrote:
> Bryan Olson <fakea...@nowhere.org> writes:
> > I have to disagree. SKEY does have the PK property of not
> > needing a private chanel to send the initial key, but that's not
> > enough. An SKEY key is only useful for one pair of prover and
> > verifier. According to the Diffie-Hellman paper that defined
> > public-key cryptography, a public key is usable my many
> > independant parties.
>
> OK, fair enough. By that definition a Diffie-Lamport signature is a
> hash-based public key signature.

But SKEY is not.

> This scheme can be improved incrementally until you end up with the
> Merkle hash-tree scheme, which I think is still patented.

The Merkle-Winternitz signature scheme [Merkle87] was published more
than one year before the filing of the patent I think you're referring to
(claims 20-23 of [MGE88]).

The "inventors" cited in the patent did not invent the Merkle-Winternitz
scheme. In my opinion claims 20-23 of this patent are downright fraudulent,
and, given that [Merkle87] is even cited in the patent, the fact that they
were accepted just demonstrates the examiners' incompetence.


[Merkle87] Ralph C. Merkle,
"A Digital Signature based on a Conventional Encryption Function,"
Advances in Cryptology - Proceedings of CRYPTO '87.
Held on August 16-20 1987.

[MGE88] Silvio Micali, Oded Goldreich, Shimon Even,
U.S. patent #5,016,274,
"On-line/off-line digital signing."
Filed November 8 1988, issued May 14 1991.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPmNFNzkCAxeYt5gVAQHflQf/QQnLJAB0ZQGfj7Is+gSn1mOoFJMUn+UX
bTjzivgc7lui3nMNYXyC8fYPj/KBagfLGY+A9F4judvUoMOq87UXM77U4k1wRqGk
ffTrviQ38uDTlxdQCeXC5RaNLjXqkpT3Wb9ZuCtC2rRFWEJkL8m05BtCy2vssdjB
AnTGLHLkT9ncPZBMwxzW8wPuEsfD1r0EL4Zye55a7cpiWY8KzXKaNSfy9TzMztWC
dcVnUGI2L9MDK/FLTl4/GIdHYzYfZhHFvZz99TY2n4OA7Mb/lx4CU7dG5aHSVznC
1goYQnmC1RB0Mz15+2toq1CWqldPtasMqTWmHHkOWVBbKEubDNyXLQ==
=hChz
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/HkCgNiBIUTA/m/9blcD7Gt4JAJ", "n_sections": 22}, {"thread": "HkCgNiBIUTA", "msg": "FqMkUkv6jiUJ", "author": "David Hopwood", "date_disp": "Mar 3, 2003, 7:14:01\u202fAM", "subject": "A public key authentication scheme based only on hash functions", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Hopwood wrote:
> Paul Rubin wrote:
[...]


> > This scheme can be improved incrementally until you end up with the
> > Merkle hash-tree scheme, which I think is still patented.
>
> The Merkle-Winternitz signature scheme [Merkle87] was published more
> than one year before the filing of the patent I think you're referring to
> (claims 20-23 of [MGE88]).
>
> The "inventors" cited in the patent did not invent the Merkle-Winternitz
> scheme. In my opinion claims 20-23 of this patent are downright fraudulent,
> and, given that [Merkle87] is even cited in the patent, the fact that they
> were accepted just demonstrates the examiners' incompetence.

Correction: I meant to say claims 24-26, in both cases.
(Claims 20-23 are for on-line/off-line signatures, which were indeed invented
by Micali, Goldreich and Even.)

> [Merkle87] Ralph C. Merkle,
> "A Digital Signature based on a Conventional Encryption Function,"
> Advances in Cryptology - Proceedings of CRYPTO '87.
> Held on August 16-20 1987.
>
> [MGE88] Silvio Micali, Oded Goldreich, Shimon Even,
> U.S. patent #5,016,274,
> "On-line/off-line digital signing."
> Filed November 8 1988, issued May 14 1991.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPmNG7DkCAxeYt5gVAQFiswf+NSJc2NN/q1K5go/NP2Ppaaetn+duM5Wq
CLVkky7gkay3VoIfLe5NQhGqyKscL1LGSyvRgyDJHC0mmmWBin2QZX+Hn/FttJhM
BFg4XAe5DwNZw5T4+9IrDEdzinDH2rn9ZDvZ5U/KQmPo+Crwg0zXTFMVzQ7B+Rmp
Thsb3bn/HOADE5BPtcKG+/thlsqj8hoqdQE9pv3e/J7qkJVpudykWf5xnCVjtfv+
tr40ARiPK8lewhUlzUr18cM9tlYgUwfS6soyBndyEoX2wZut3MqtUv9++F+E9J0c
Cu5hGiut4b810EqSyUL2gibbDrsoxb/C6vQHe+9BWIVsHm5fJc3v0Q==
=nUy9
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/HkCgNiBIUTA/m/FqMkUkv6jiUJ", "n_sections": 22}, {"thread": "IHD72I1IcQ4", "msg": "vttGpfKtzkkJ", "author": "David Hopwood", "date_disp": "Jan 20, 2003, 3:24:09\u202fPM", "subject": "attack on Rabin cryptosystem", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jana Bierbach wrote:
> I have the following chiffre-function: f(x) := x^2 mod n and now the values
> for the variables:
> n, f(m), f(m+d), d.
> Is there a possibility to get the m?

Yes, but note that this is not the Rabin cryptosystem. Rabin encryption
includes randomisation of the plaintext, so that it would not be possible
for an attacker to obtain both f(m) and f(m+d) for known d. Rabin never
proposed using f(x) = x^2 mod n directly as a cryptosystem without
randomisation.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPixavjkCAxeYt5gVAQG1ZAf/erHC+TKY/50qrmvsSOwJiX9HvGYb4+A0
0rLPJattOFCcHTOStQdyKL3pWn0PuoTWaylsic7KLW6sCO4Yv3/wEB+5ya+EZZkc
IKUdf5IphgAHXLw8tXnfE/lLexMdR+eEoQ+SJeRgMe7kohHA5V5DNBsPGWaKip5a
33Nf9U+BlCQzcW3JzemJFN+aEoAwvAYjNuqrcvgu0HzjodxFKlzjwtZH/Zq6S20J
Sx11AgDVCd69sWwtluyYjQ4mZFS/tj1mjFGke5q4rE75BANqwGD26nOIxJJFxauZ
MhKnmbYv+Cc6DgPYX5hQF3YBJRx01eh5SS3kejIDn4JrJD9Nxbt5Xg==
=qi5S
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/IHD72I1IcQ4/m/vttGpfKtzkkJ", "n_sections": 5}, {"thread": "IHD72I1IcQ4", "msg": "TZfRLctqqlkJ", "author": "David Hopwood", "date_disp": "Jan 20, 2003, 3:41:56\u202fPM", "subject": "attack on Rabin cryptosystem", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Hopwood wrote:
> Jana Bierbach wrote:
> > I have the following chiffre-function: f(x) := x^2 mod n and now the values
> > for the variables:
> > n, f(m), f(m+d), d.
> > Is there a possibility to get the m?
>
> Yes, but note that this is not the Rabin cryptosystem. Rabin encryption
> includes randomisation of the plaintext, so that it would not be possible
> for an attacker to obtain both f(m) and f(m+d) for known d.

I should have said, for known d where m is the randomisation of an unknown
message. It obviously doesn't matter if an attacker can do this for chosen
messages.

Rabin didn't specify how to do the randomisation for the case of encryption,
but in practice you'd probably use a function like OAEP+, and on decryption
choose the root that can be correctly decoded. The probability that more
than one root can be correctly decoded is negligable.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPixe6jkCAxeYt5gVAQHATwgAxIchEk61QvL4a+hw4zir5aVoygmvbuc9
ULPBsdhF1qZ+t/kY/HI5hM7sbU5RIiaLrWy9Z5215QiWb+VF05dF/mTUi5313W19
Xh+sK9WVjf+/URQpVX7jU6Xp4MBQjVTEoBlMFKxThojd6jaBxEyHp25YD8viUlY8
/SmuxnCSVO5Cw1SbEEnihpOPAq+mthFIo5rZzs37KiwfflpKkn1YVpQ1f584yn4c
2DuobwM41zmRVxff5YAOHobbI7/nwoKcFM7B6q1rXEPn6lMgPPku2hV8uYdgTI5Q
OAdSk8Nq11/uMFc2cIQCxqbQ1N1+JnVYKciglX3U3fsRf8I95ILTWg==
=eTN5
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/IHD72I1IcQ4/m/TZfRLctqqlkJ", "n_sections": 5}, {"thread": "JgBaQemIfLQ", "msg": "FhRW0VxdfhAJ", "author": "David Hopwood", "date_disp": "Mar 15, 2003, 1:21:56\u202fPM", "subject": "SSL/TLS DHE suites and short exponents", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Gregory G Rose wrote:
> David Wagner <d...@mozart.cs.berkeley.edu> wrote:
> >Michael Amling wrote:
> >> May I assume then, that if the group modulus is known to be a safe
> >>prime that it's sufficient to check that k**2 is not congruent to 1 (or
> >>zero) mod p?
> >
> >Yes, I believe that's right.
>
> Yes, that's the only runtime check needed for
> defense against the small subgroup attack, but
> for full security there's a constraint on the
> system parameters missing. Because that isn't
> the only attack. In this case let q=(p-1)/2,
> which is known to be prime. The generator g
> should be chosen to be a generator of the order-q
> subgroup, not of the whole group. Otherwise,
> Alice can choose her private key to be odd,
> yielding a public key of order p-1. Now, when Bob
> returns his public key, Alice can test the order
> of the result g^ab; if it is p-1, Bob's private
> key was odd, otherwise it was even, thus leaking
> a bit of Bob's private key to Alice.

True, but this doesn't matter, because it is always the same (least
significant) bit.

[...]


> Anyway, the moral is clear: g should generate a
> large prime-order subgroup, not the whole group,
> whether it's a safe prime or not.

If g generates a large prime-order subgroup then the effect is the same
(at least with respect to this attack) as if g generates the whole group,
but the private key is always odd. So the remaining entropy in the private
key is the same in either case, and there's no reason to believe that being
able to obtain the LS bit would give any information about other bits. Note
that this analysis only holds when p is a safe prime.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPm0lsDkCAxeYt5gVAQEOiwgAjyRBSbw1Uv35Ly2QmMvwLo/ceQ9iTO9r
JyOz2AcfEYymlvnCYHXaQyVLmdaJemA9YhUGhR6zt1nLFoy0RW7TXI94G8mjMmo+
KOTXCpG8LcwvqrcY8yTbJgScm5P3E/Mwt2VrELBfzJXzzMxkTPiLJJLcM2No50KH
Sz0BsmUmAbiBqFPkF/wDMF8pj8YCP18ZSyzj3yN083YzOn1yVFNgr2jD0RCcnDdo
EEToSHTOx+Lj8f6BU6DfQNqC7tCpQhNaaBp5qdCmorVGQoqRlbKOmQbpsMfESBhf
fyvmatN64EKFMjy12yQ+atnaDdv04/OHbaykScmVrIuI1s9pcoonBA==
=VuQo
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/JgBaQemIfLQ/m/FhRW0VxdfhAJ", "n_sections": 35}, {"thread": "KGpgNPd5gYM", "msg": "e5Ie3v3QobYJ", "author": "David Hopwood", "date_disp": "Feb 7, 2003, 2:18:02\u202fAM", "subject": "File Encryption: CBC vs ECB+IV modes", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jean-Luc Cooke wrote:
> Both of you get a clue.
>
> CTR mode is best for "write once, read many".
>
> Turn the encryption inside-out and you get RTC mode, an option in the Linux
> encryption filesystem. This is better suited for "write many, read many".
>
> CTR:
> C_i = P_i ^ E(K, IV + i)
> P_i = C_i ^ E(K, IV + i)
>
> RTC:
> C_i = E(K, P_i ^ (IV + i))
> P_i = D(K, C_i) ^ (IV + i)

This is insecure. Isn't that obvious? (Consider any case where
P_i ^ (IV + i) = P_j ^ (IV + j).)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPkNdjTkCAxeYt5gVAQFNfAf/WZpeHdHfGcdAJGZ3NthWnm24sbf3ohzO
UyqL9k7Ncw1tT4ZgPYtZ/OwT03V7NzYuwwlfIP/XE7PYtdhl8bTbHGH+f/okzC8g
rbubiMJGzDP0vrU/sMrHapiuRzf52tYf2dlcPpBElT64RgYU4vZkQfegCajBC0eo
slY6pIPxrdHZ940wggWE9bKfu/ZqFhITUJNnHzGBYa2FQAape0JzPY/vGcewktvn
5/2VQESBWwSBgp3oW3rb3Yu2pNfU+9xx6QcgZa80NchQ/I0Eg8E9tAnoFL9NeTXx
hIPuFjaJd057dpw1zHKzUbRFda+M3mEMGyyefACH7yf4icVrXz35Lg==
=B8u1
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/KGpgNPd5gYM/m/e5Ie3v3QobYJ", "n_sections": 14}, {"thread": "KGpgNPd5gYM", "msg": "GYeor5pUgMEJ", "author": "David Hopwood", "date_disp": "Feb 9, 2003, 9:21:17\u202fAM", "subject": "File Encryption: CBC vs ECB+IV modes", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

But that has probability bounded above by the security proof for CBC [*],
whereas the case I mentioned has no nontrivial bound on its probability.

[*] q^2 / 2^B for q ciphertext blocks each of size B bits, which is
negligable in practice for a 128-bit block cipher and typical file
sizes. (This is from memory; I might be missing a factor of 2.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPkWV1TkCAxeYt5gVAQGklQf9ESpSunAr1gFDskPOqiHPftrimOzrkMLA
w2UNRW/TVWzsoS0nckJvQmhS7GZg9C2BkNR1HFm6Fi0r8autMO/tIQmbVO8DTS/A
zpgc1vqEZGo7JtBoV96ZWK7AOopOPAJMZg+PY3Dzf5gEqlYJnK6/hyjXVyOqMgVC
pzsS1Toja+D/5g6O3znG/mAxCTHflPyrxmO73gdZ36/iOd83KVuc5wK6SK5nldyh
l3x+7VuNt3pHYx44sDUz/o3ZunoqdjWymDGSkrOP6nk7Ozc4DuGXpcCuvqxBYDxg
7VLqDFB8JzHPXOXOXCjXVIlaBP33IE7EgUOP1gtCB5qkrRS650yvhw==
=R7Hc
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/KGpgNPd5gYM/m/GYeor5pUgMEJ", "n_sections": 14}, {"thread": "PfvyIzCscyw", "msg": "wF__xiERNuMJ", "author": "David Hopwood", "date_disp": "Feb 25, 2003, 4:14:28\u202fPM", "subject": "ECC", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:


> "EC-AKD" <akd...@yahoo.com> wrote:
> > "Ref:Mike Rosing(Implementing Elliptic Curve Cryptography)"
> >
> > This is with reference to Elliptic Curve Cryptography in polynomial
> > basis for F(2^m) form.
> > Could any one tell me weather the ORDER of points on the curve is same
> > or do they vary from POINT to POINT.
>
> A point on the curve will have an order that divides the order of the group.
> E.g. if there are k points on the curve then every point P will have an
> order g such that gP == P.

You mean gP == O (where O is the point at infinity).

> The value g must divide k.
>
> Normally the order of the curve k is a prime which means g is either 1 or k
> [trivial case being 1].

I don't know where you got that idea. Curves can be constructed to have a
prime order, but the order of the curve is just as often not prime (in practical
cases used in cryptography). You may be confusing this with use of a prime order
subgroup, which is indeed "normal" (and required for some protocols).

> > How do I calculate the order of a POINT?
>
> Several algorithms exist. Most of which are complicated. Look up Schoof's
> Algorithm.

He asked how to calculate the order of a point. That's straightforward, given
the factors of the order of the curve. Let the order of the curve be k, with
prime factorisation k = p_1^e_1 * ... * p_s^e_s. Then,

r := k;
for i = 1..s {
for j = 1..e_i {
a := r / p_i;
if aP != O then break; /* inner loop only */
r := a;
}
}
output r;

(Note that this is an algorithm for finding the order of an element in any
finite group, not just elliptic curves. If the group is written multiplicatively
then replace aP with P^a.)

> > I was just wondering that during the process of point multiplication,
> > if some infinite point occurs then the solution would be all wrong.
>
> There are no "infinite points" on a finite curve.

There is a point that is normally called the "point at infinity". Check
for it explicitly when doing point addition and doubling.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPlvcgDkCAxeYt5gVAQE2dQf/SrRFsaU5TN1bo0iT36MZJRKzbr2yQsqP
yf1xzTFpu4P9zSS4EJ4x/tU3/5UMfKMUiAeksKNlTV7t7r4dybHdXWIks6SpxgT6
5Cq7bS/iyb+PoUDueiWWoJb6GuIZzJTDUSG6LyGy7zBhqRCKKC+On0ss8jfrcgkX
mViIW7inKUP8ymLNqCpQmjBqa/OH+ggm1cTAF3YIfW4t/TZMrX9tfwsUq9jpcmTJ
AmUs/1wx2oxQ6gBcraida8uoQ9fVC+8huSUSJt4oSIAHBQdXkoiI0u1YUqnqJ42d
v+3DoxS45j+vnyKYmKNLx5iCxW30YWBYHQweuPRGDaPAaolFpAQ3OQ==
=80+r
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/PfvyIzCscyw/m/wF__xiERNuMJ", "n_sections": 8}, {"thread": "Q4X05Au5oYo", "msg": "kXfIpJ15mFwJ", "author": "David Hopwood", "date_disp": "Jan 11, 2003, 3:35:17\u202fAM", "subject": "DH ciphersuites in SSL3/TLS", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mikk wrote:
> Paul Crowley wrote:
> > Could you explain what you mean about "security holes"? AFAIK there
> > are no problems with the use of Diffie-Hellman in TLS (the current SSL
> > standard).
>
> In TLS, no there isn't.
>
> But, SSL3 there is.

If you're referring to the possible confusion between RSA and DH parameters,
that applies to both SSL3 and TLS, AFAICT. However, it's easy for an
implementation to fix that while still conforming to the specs, and IIRC
the implementations in common use do fix it.

If you're referring to anonymous ciphersuites, then obviously, don't use
those. (This also applies to both SSL3 and TLS.) Most implementations don't
enable them by default.

If you're referring to some other problem, then what?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPh/XMDkCAxeYt5gVAQFE3QgAgpHCq9w4GX7mi2pB56NiyPhotAagFRjn
9Fgh6/Ge7ylUumBi87Qi37BPsMGs+OJNSxabM2Jhp6D8xJSDK0QT8+cX42fyzuOO
eaDRx8QPYTg+KCG0P0+L95ostHS+PQF6fhVMx71NRpyJ41S+zQEvGHsygtzp6pAU
aH+xA43WaJr+n7yzfI6zo0tLjgU5VIi519jogdyx8wle3QcJem/geM7s7AEwqosu
qbsRLM8jTAife7F/c9/3f4/dvO/M0YR0loK8IbL2N3WRodOTcergZzLn0MatXv2d
8lzxgJUKhlAOKi2BSc4U8wIuJKK90rSbr7Z1xLmipdK/FxY5wcHjcQ==
=b0P0
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Q4X05Au5oYo/m/kXfIpJ15mFwJ", "n_sections": 76}, {"thread": "Q4X05Au5oYo", "msg": "d7UyM6mk2vMJ", "author": "David Hopwood", "date_disp": "Jan 11, 2003, 4:12:17\u202fAM", "subject": "Message (authentication/integrity); was: Re: CRC-32 collision rate", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Tom St Denis wrote:


> "Bryan Olson" <fakea...@nowhere.org> wrote:
> > Tom St Denis wrote:
> > > Yeah, me thinks the thread got distracted by some lingo.
> > >
> > > Integrity is just a question of "is this message intact". A
> > > simple hash would do for that.
> >
> > Well, not so much. It's true that if one has the intact digest,
> > then one can answer the "is this message intact" question
> > (assuming the hash security properties). But in the usage
> > proposed here, the hash travels with the message. How do we
> > know they weren't *both* altered.
>
> That's a question of authenticity then. Integrity is question of if the
> message is intact not if its authentic.

In practice there is no clear distinction between these terms, either in the
crypto literature or in informal technical usage. For example the relevant
formal security property is "INT-PTXT", where INT stands for integrity. This
definitely corresponds to what you are calling authenticity.

In any case, using your interpretations, integrity of the stream of messages
received on a particular channel implies their authenticity (in the sense of
coming from the other endpoint of that channel).

> > An example: Alice, my commander, sends "Attack at dawn", but
> > Fred, the enemy, successfully substitutes the forgery "Remain at
> > camp". Is that a failure of integrity because the enemy
> > modified it, or a failure of authentication because the enemy
> > was the author of the message I accepted?
> >
> > It's tricky. References disagree.
>
> Not really. You should check that the messages are authentic from Alice.
> In that case you don't want merely intergrity you need authenticity.
>
> I don't know why you're making a big deal of it. The distinctions are quite
> clear. If you want to detect medium errors then a simple integrity check is
> all you need.

That's a checksum. Almost all references agree that it should be called a
checksum.

> If you want to check that the messages are authentic, that is
> the message is intact and attributed to a specific sender, then you need a
> digital signature or MAC.
>
> Considering reading
>
> http://dictionary.reference.com/search?q=authentic
> [definition 2]
>
> and
>
> http://dictionary.reference.com/search?q=integrity
> [definition 3]

You're referring to general dictionaries for definitions of crypto/security
terms? Those are clearly not intended to be technical definitions.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPh/fsDkCAxeYt5gVAQGE1gf/WOioJW0X11lD7pnXVxmOvpM4cq8ZGerL
Aar2UZMsQU7wTjNrWYII+SmMOyDwAwYQgW4o88Zzy3Lnq2C26H2PWroesNerRgoq
+0Zr534UElxZU9Jw2wWajcYSrc1fQ0j8IXMffXjHzkwGfOBLYSOBV2gQU6AtM7k+
Rpqy2rdLNeCRFEH08ALz4ODu/TDUhDi6uAna2tMrl6rp+6ghZWlVOjYVb0jYCKwg
mHlB+Hs6DEbRIkSDV8p56jozycViBBsPqSV1R12lIRlk6jkLkqwp/5V83VzOjxF7
kJOZ2Z618/rjmCdCzQfV97zs/X+h9MXjztf3RxBs1A0SePsdslKDlw==
=y1I+
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Q4X05Au5oYo/m/d7UyM6mk2vMJ", "n_sections": 76}, {"thread": "Q4X05Au5oYo", "msg": "uEgtZ16ecpIJ", "author": "David Hopwood", "date_disp": "Jan 11, 2003, 4:21:56\u202fAM", "subject": "Message (authentication/integrity); was: Re: CRC-32 collisionrate", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Douglas A. Gwyn" wrote:
> Tom St Denis wrote:
> > ... There is a distinct difference in the definitions of integrity and
> > authenticity.
>
> Yes, there is. Message integrity means that modification
> of what was originally sent by the legitimate source is
> detectable. Message authentication means that the identity
> of the source is reliably verifiable.

*Identity* is a separate issue. In the case under discussion (crypto
communication protocols), what is normally authenticated is a channel
endpoint; this corresponds to an identity only indirectly, if at all.
For example, consider the client end of an anonymous TLS connection,
which is authenticated as being the "same" principal for the duration of
a session (and across session resumptions), but is not associated with
a known identity.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPh/iETkCAxeYt5gVAQHwAwf/ZGzC0Uq0myR7Zk6Jap8owsNrijfYjVIk
oGfydeNy4hiDx5tMJhWVZh6SX5Gm3oXw66224dBg/GnMQAqXN3G5juTaW6MBbVKd
oIHozDbG6iyyvyBYG9DT6kAYSuNDjUpT7SyaCJFc7ksMMziNhoC6TPGjvkBqcnV1
2Nnow9mSeNq9I1Yz15FzufqmpB1ADdQJp2c36KkWVEa14MX3AkKeQym9hXnzbIwL
Pk9oqWJgbCZfMf6Ku61OKk+MNklZWFPWL1vV3nYU6OcpFQPD0lsu+K8yGUERs24o
WZPsV+jc0YhybkSRZidVQqmg0lgINV7J2Uh1Abgzla4SGvI/DRLFJg==
=6Pi0
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Q4X05Au5oYo/m/uEgtZ16ecpIJ", "n_sections": 76}, {"thread": "Q4X05Au5oYo", "msg": "Vf7x8Cal0yEJ", "author": "David Hopwood", "date_disp": "Jan 11, 2003, 5:32:58\u202fAM", "subject": "TLS and message integrity", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jan Bruns wrote:
> Paul Crowley:
> > And hash-then-encrypt does not provide integrity. Use a real MAC -
> > some MACs (eg UMAC) are very fast to calculate - faster than CRC-32 -
> > and provide good provable properties for message integrity. MAC after
> > encryption, not before.
>
> Hm, would you please explain this a bit more?
> You could send a copy of your work to the TLS-workinggroup's
> mailinglist, too.

The TLS WG is very much aware of this issue (there were ~100 articles
discussing this and other weaknesses in TLS's CBC ciphersuites, which is
quite enough even for those of us who find this stuff interesting :-).

As a result, there will be changes to those ciphersuites in TLS 1.1
(i.e. when both client and server support 1.1). There are also things
that TLS 1.0 implementations can do to prevent some of the CBC-related
weaknesses - in particular, send only the 'bad_record_mac' alert, not
'decryption_failed'. Although TLS 1.1 will still use MAC-then-Encrypt, the
other changes are needed in order to make this safe. Designers of new
protocols should choose Encrypt-then-MAC, as Paul Crowley recommends.

[I should perhaps note that these attacks are fairly impractical for
current typical uses of TLS, and only allow a small amount of information
to be leaked to an attacker. The changes were made in order to make TLS
closer to a generic security protocol, that provides strong security
properties with as few assumptions as possible about how it is used.]

Incidentally, although there is a proof of security for CBC mode with
MAC-then-Encrypt under certain conditions, there is no such proof for
CBC mode with Hash-then-Encrypt. <handwave>I suspect that the latter might
be vulnerable to some replay attacks.</handwave>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPh/ypzkCAxeYt5gVAQGYpgf+NlN89Eb71LsK5X58qkF3vhxSSKeG98o0
bu0EJwI7FJkDBf79k+ZNUKvnecHTQ1K2cXa4kURa+LviLp5YE6hISws404YJaikP
s9mwhDIS04r01Ks9iCPGge6WE2L6dYZSQ22xK6RVSzU9UlGQwpAqrv8+YNihrL4D
cXtuynBzs8zZexStHTOA8I/0S/bCFk/HNpsdpP0REuXQPlZQMcfi0RKTqugkCbjb
NoY1Qo9jRVmRUzJSY1cYeYuIvjM5lJ19O8uAaj2HM5tx1Ee+xCOjnepow4m6s6F9
TlnFFQRZ80FiRzuMFx0MbyZMXxWcopl2YJTAkfDsxLM0Oj5bcQHNcQ==
=Encu
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Q4X05Au5oYo/m/Vf7x8Cal0yEJ", "n_sections": 76}, {"thread": "RbV0XcPPe3A", "msg": "rICXlk64FDAJ", "author": "David Hopwood", "date_disp": "Jan 17, 2003, 10:38:47\u202fPM", "subject": "Fast small integer multiplication modulo N", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Dann Corbit wrote:


> "Rajeev Ayyagari" <araj...@cs.umbc.edu> wrote:
> > I'm interested in dot-products modulo C in [Z(C)]^M (M-dimensional
> > vectors whose elements are integers modulo C). Specifically, given x,
> > y in [Z(C)]^M, I want to find
> >
> > (\\sum_{i = 0}^{M-1} x_i y_i) modulo C.
> >

[...]


> > C is typically less than 50. M is large (hundreds or thousands). The
> > entire dot product will be evaluated many times (around 10^6).
> >
> > Is there a fast way to do this?

I'm surprised no-one has spotted the following trick, which applies
when C < 32:

Let K = 2048,
x = a*K + b,
y = c*K + d

So x*y = ac*K^2 + (ad + bc)*K + bd.

Since ad + bc < K, it's easy to extract ac and bd. So you can
halve the number of 32 x 32 -> 32-bit multiplications. (In principle
K need not be a power of 2, but if it isn't then extra multiplications
and divisions are required, rather than bit operations, so this would
not be worthwhile.)

It's also possible to sum several of these "x*y" products before
extracting the coefficients and reducing, provided you make sure
that the carries can't cause an overflow from any of the terms.
For example, if C < 16, then it is possible to add 4 products without
overflow.

If you have an efficient 32 x 32 -> 64-bit multiplication instruction,
as most processors do, then setting K = 2^16 or 2^20 would allow
using a larger C and/or adding more products before reducing.

Note that use of vector processing instructions is orthogonal to
the above optimisations; doing both effectively doubles the number
of coefficients that can be stored in a vector register.


An alternative approach would be a bitsliced implementation (look at
papers on bitsliced DES to get the idea). I think that would only be
competitive if C is very small (say 3).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPijLwDkCAxeYt5gVAQHNqwgAjCHoKZ4dY6pCPKTEtRgOsFsR2cVI3CFG
k3G7aMi5f2CDJ4HFFJNYRoJhEJobIp8zqT7uVfR65Hq7YihAR6W3XKnM44jR8duU
RTAANF6/UaRJQdu041OV5atYFFhkfi5tE0ZAipQIPNyrL6FVokEgzcu/jueIBNla
nmRKOkh1arWIwkZ5X0H8fUFLkTHomiYo2jm9nDjDm07MqzvOPQGjusbuHDqEz8Rb
KSM2AWKNWfF9uJN/HATLz/435a5Prljz+soXYjiqvjvFz6oIWmvD7MA4uwjKt++k
T5hP6+D8uIxFvP9SyPlJ66xlOoHgB0kgIEVMsN/Jeh0CJ8N70SceRw==
=Fp4n
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/RbV0XcPPe3A/m/rICXlk64FDAJ", "n_sections": 29}, {"thread": "RbV0XcPPe3A", "msg": "JxPVEBfz5XAJ", "author": "David Hopwood", "date_disp": "Jan 19, 2003, 5:38:59\u202fAM", "subject": "Fast small integer multiplication modulo N", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

That's true, mea culpa.

It also occurred to me that it might be worth considering using logarithm
tables (using a generator of Z_C as the base). That would depend on whether
there are any zero coefficients, how expensive multiplication is relative to
a table lookup, whether you need to perform several dot-products consecutively,
and what other mix of operations need to be performed on these coefficients.
For C < 50 the log and antilog tables will be small enough to fit in on-chip
cache (you only need the antilog table when computing the dot-product, if
coefficients are kept in logarithmic representation).

Note that *if* this approach is applicable, you can implement several
multiplications in parallel using a single addition. It might also be worth
looking up two elements at once in the log/exp tables (i.e. squaring the
number of elements in each table, if this still fits in cache).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPioIijkCAxeYt5gVAQHE0wf+Or00okSTpKZqhLa3bogO+EOJ7a8/ZJZC
grplVQgh8c3m0yMOCoe7cfaj1CJKa4WoqFsLy+rzkrffdeTD5VmSS9J9ThESdC8y
B8wNxFS3ONV6R3kp6WdusAiQLGr0AcubNvQxqZ2X0AvUi7ZnjB+IJPE/v9A2CZ8B
uJviYOZRYF82vt5yNuUC0wmYVknGRFjdUqSPjVkxxrKjmjA/1dRsen+IQ46Z9yKV
1/8JbO0IPznRLz0JF9SsmNnLdFlM0SYHlGcyjPdcpsel4DRHwBpUXorHiC3pQAZ2
EbxqlQ2/vwvNrurI0XDjSUpyaUgK0rsFA1MVcEO9NTLIBUeQTLfPAQ==
=7Ibd
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/RbV0XcPPe3A/m/JxPVEBfz5XAJ", "n_sections": 29}, {"thread": "U6GYaZr0zyo", "msg": "DXIioc4YpWsJ", "author": "David Hopwood", "date_disp": "Jan 18, 2003, 10:04:45\u202fPM", "subject": "Strange cryptanalysis results using bad RNGs", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Gregory G Rose wrote:
> We've seen two results recently that seem to
> indicate a very bad interaction between a random
> number generator and a completely unrelated crypto
> algorithm.

Or you could interpret the SNOW result as meaning that SNOW
(specifically, it's key handling) *may* be related in some way to
an LCG. That's just speculation, though; I haven't looked at the
SNOW key schedule in any detail.

> Now we have Eric Filiol's paper as discussed here
> over the last couple of days. Here there is a
> result with some theoretical justification, but
> which can't be reproduced by third parties; the
> difference seems to be that the quality of Eric's
> random number generator has been questioned.

That was one possibility, but I suspect just mistakes in the
statistical analysis. (In particular, apparent biases of the magnitude
seen are *expected* if you do enough experiments, but don't take into
account how many experiments have been done.)

> Anyway, has anyone seen other such results, where
> two apparently unrelated processes generate
> significant anomalies?

ISTR a paper on interactions between Elgamal and an LCG RNG. Ah yes:
<http://www.homeworlds.com/papers/SECLCG.pdf>. That interaction can
be interpreted as resulting from the fact that Elgamal is not semantically
secure, though.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPioVGjkCAxeYt5gVAQED9Af8Cnq/NzAra0ZWR85HI+fHWyGeqFpvwewV
8CaCo568u0dopPOieUQ3jJCcg0yV0e/zKRYBbZXWyay15LefRO5v93NN8ylF0pZA
bEvSFZ1vJ90n10pOu9D34YP8U2ddJQs9OCWLEKzkkVn++KDHmrUsnM4mUVAOTTAj
wc6C1hRg8w2lV1ApErshDv+mNMw1GbaD/3C33rWtDfeSZIKwmP4f+QP+Ik9XkO8n
oWrZGoYUZc4jf2/xYieoaiVqqQ4Dv58xvayioDpFWJs9tESZ3j4PQA1jZBm4DAB8
OWltjWLDadBAtbxo804SewQ1dt2NIs4zMmiN8NJAD0Rs9t9IKOysfw==
=RS3d
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/U6GYaZr0zyo/m/DXIioc4YpWsJ", "n_sections": 7}, {"thread": "U6GYaZr0zyo", "msg": "MjceXBJ5rtUJ", "author": "David Hopwood", "date_disp": "Jan 22, 2003, 9:21:24\u202fPM", "subject": "Strange cryptanalysis results using bad RNGs", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

jsa...@ecn.ab.ca wrote:
> David Hopwood (david....@zetnet.co.uk) wrote:
> : Gregory G Rose wrote:
> : > Now we have Eric Filiol's paper as discussed here
> : > over the last couple of days. Here there is a
> : > result with some theoretical justification, but
> : > which can't be reproduced by third parties; the
> : > difference seems to be that the quality of Eric's
> : > random number generator has been questioned.
>
> : That was one possibility, but I suspect just mistakes in the
> : statistical analysis. (In particular, apparent biases of the magnitude
> : seen are *expected* if you do enough experiments, but don't take into
> : account how many experiments have been done.)
>
> Certainly, if you use input blocks of plain ASCII chosen by, say, a
> linear-congruential PRNG, then two things come to mind:
>
> - the bias due to the blocks being ASCII text is much greater than that
> due to the PRNG;
>
> - if the weaker PRNG bias survives the block cipher encryption, then an
> interesting weakness in the block cipher has still been found, even if it
> is slightly more subtle than what was initially concluded.

If I understand correctly, no significant bias has been found (even for the
keys specified in the paper), by people who have tested a sufficient number
of blocks. Even though that testing was done with different PRNGs, I would be
very surprised if the same conclusion did not apply for the PRNG used in the
paper.

IOW, it seems that authors simply didn't test enough blocks to confirm their
results. If so, this is a less subtle statistical mistake than the mistake
(a form of "reporting bias") that I thought they had made. Without this
confirmation the paper shouldn't have been published even on an e-print server.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPi9RhjkCAxeYt5gVAQHlrwf/QSJEP61yMERYB14nxrNCEJw0jqQ+Z54R
ap1cHddJ1jip2z4mV59Ou9fZcdgPjPXQLVFsuajrlyg2cl+OlIiWqAglrim8oNbD
noYlZhd+EB4s/P1rBo9jHr1OE1p+piPomPTJ8jxKi9CLM+9DM/6SCdTjWGvVbTjh
rBQkzVveTysA6vWps6tNUwtwM56lAHMczupqQvyuSETOTcuM2wUMwJnvIC7E42Lg
zNRiRL7rD3qWGWAOMY5rJI3uZDw71JW3ixw1StYdDnJVzfWNFpmzZWIdHtAZnnND
PK04eNplH9iGvAeJ7X+8lS/ofhHVkqj//l8qYV8XJ0DTzTbx6W3xLg==
=6y2f
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/U6GYaZr0zyo/m/MjceXBJ5rtUJ", "n_sections": 7}, {"thread": "Xx19-rvVYnk", "msg": "yupr7b3ib-YJ", "author": "David Hopwood", "date_disp": "Jan 17, 2003, 11:01:46\u202fPM", "subject": "Random", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Goldberg wrote:
> Actually, each interval length isn't *completely* random -- it will
> occur in some particular distribution, based on the sensitivity of the
> geiger counter, and on the amount and half-life of whatever radioactive
> substance(s) are nearby. However, whether an interval is longer or
> shorter than the previous one *is* completely random.

No (or at least, it's not independent of previous bits). Think about the
conditional probability of getting a "shorter" bit after a sequence of
several "longer" bits.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPijRjjkCAxeYt5gVAQF4LAf/XZRXD6/zPbZd/I21cEpH9AOEJUMTC+Zx
BDjpmRoG5Xq9Rb9BqmYqYoY1J5bBlojA25s7Nza7IeNNqBGPf/mEg2ysP95t3x/+
D3zFXyxbdvx/ecgeVx7rtl0YGhWJjDd+ffI+CaxBS+WW4wb35yLOAQ8XG3luZ/Qe
bTY6VVFK9CbBEaUjmagpXN9aGW4oPmumsdCGrYabZu9lYLauowoh/YALc1QqW1tc
PyZvQzxL4M1DCiM5vU3r+gpPdEsrdzPqKmEcenjAcwXdnjmaiQnEBfRppiQXD+gN
lcy3Xb7BDtpds/4Sc6MKOg9LJrLbZ1RbBxaJ8wVaV0O5xOZhKLUkdg==
=x9Be
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Xx19-rvVYnk/m/yupr7b3ib-YJ", "n_sections": 49}, {"thread": "Xx19-rvVYnk", "msg": "MRHyTEaDUpcJ", "author": "David Hopwood", "date_disp": "Jan 18, 2003, 9:36:14\u202fPM", "subject": "Random", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Benjamin Goldberg wrote:
> David Hopwood wrote:
> > Benjamin Goldberg wrote:
> > > Actually, each interval length isn't *completely* random -- it will
> > > occur in some particular distribution, based on the sensitivity of
> > > the geiger counter, and on the amount and half-life of whatever
> > > radioactive substance(s) are nearby. However, whether an interval
> > > is longer or shorter than the previous one *is* completely random.
> >
> > No (or at least, it's not independent of previous bits). Think about
> > the conditional probability of getting a "shorter" bit after a
> > sequence of several "longer" bits.
>

> Your logic feels wrong. [...]

Oh, I see the cause of the confusion. You meant to take intervals in pairs,
and test whether the second interval of a pair is shorter or longer than
the first. I thought you meant the statement to apply when a bit can
derived from any two consecutive intervals.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPioO+jkCAxeYt5gVAQHeewf/YliSwWps01k64pyxeIa6rHH/JDtZeUUI
6r6xIO9DC6/7O3kFJUYh9CstStlT9ayQNTzaknuWYRLtw5VnW2kLUdJ2bdx8e5BH
DEpuqY2zWnDN9sJ4oDnSx3vMaeLQrD6LHcyZXutZhOAkbt6peRbSsGCSwzrpgpya
mafHeRexfNUVO8JPUt7hH6AOvixGqgfFuy0ctfggr6phIpBlJFcIdiZFfHymeFmt
dQN7Y874WG9AMjoCBpLD6kQMZ0wmrrS0aBnxWNdwTPOsyOSWpw2S5YkuxoPZ5qno
CNt8eLQG6MZAalRMlBF8YQsx0sViB9fZgTc1SBBk7Fd+uNFoX6norA==
=+Vvh
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Xx19-rvVYnk/m/MRHyTEaDUpcJ", "n_sections": 49}, {"thread": "hRT1v23Eu5k", "msg": "Ro2qgVm4rBEJ", "author": "David Hopwood", "date_disp": "Feb 10, 2003, 10:11:00\u202fPM", "subject": "Revisions to the FAQ", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jason wrote:
> I've gone through the sci.crypt FAQ and tried to make it somewhat less
> misleading. It could stand to be largely reworked, and I'm sure the
> effort started in 1999 is well underway, but perhaps this will do
> until they're finished. (Besides, the last major revision to some of
> the parts was listed as 1993, so I figured there ought to be at least
> *token* changes once a decade.)
>
> You can see my changes from here:
>
> http://www.lunkwill.org/pubwiki/wiki.cgi/SciCryptFaq

I've added my comments (in [[...]]) and fixed some of the most obvious
errors. It still needs a lot of work; especially part 4 could do with
being rewritten.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPkhpszkCAxeYt5gVAQEdoQf/WpVH0boduOxfsv4vhs1cvixus6e2WTyN
53iN9gNOb0bGJdLGhS3nGzQUPHEG8jVh14QzXIrRvhrcEaqSDUWckoK31aNTN3Lb
h5yDnEhMFVl+HZtD07Cd04rdpeL5Okp5CXehsrLNRsY/0WcIjMfzJ7odQAjF7Eva
qLQUx2WvSss9X3HxCda2Vd27IKVMU0KGaIhO4MYht5vupHmJThv+dTVTNW0z7wqd
ASsfLHbAolFORUa00Eeb7FWgBjrWwOBGAQm0XVAJ53aAgXlnxv0cL8RGW0wbxP8K
T/EMoBgOUM54LN3P6FOjbNLDyj8OsEO+4DpY+yYCg/QHepDOEpsKGw==
=+V19
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/hRT1v23Eu5k/m/Ro2qgVm4rBEJ", "n_sections": 7}, {"thread": "oPRlwXcCw6o", "msg": "YD3Z6ZKA5iMJ", "author": "David Hopwood", "date_disp": "Mar 24, 2003, 1:37:51\u202fPM", "subject": "What is the accepted technical definition of the word break?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

e...@ekj.vestdata.no wrote:
> On Mon, 17 Mar 2003, Florian Greinecker wrote:
>
> > Trivially chipher is also broken if brute force can be done in
> > reasonably time.
>
> I don't agree. Neither does Schneier.
>
> It is a *given* that any cipher with a 40 bit key can be broken with at
> most 2^40 work. This is not a weakness.

Of course it's a weakness. There's no practical difference in strength
between an algorithm that is too weak because its parameters preclude it
from being strong, and an algorithm that is too weak because of a successful
cryptanalysis (with the same work factor and success probability). Note
that the formal definitions of security properties such as IND-CPA, etc.
do not make any distinction between these cases.

However, the normal definition of "broken" (in this technical context) is
that an algorithm meets its *claimed* security goals - no matter how weak
or strong the goals. So a cipher with a 40-bit key is necessarily weak, but
may not be broken.

> It is true that this makes such a cipher useless for modern
> applications, but this is a different matter.

It's the same matter: it is useless because it is weak. I think you have
the definitions of "broken" and "weak" the opposite way round to their
normal usage (which most posters to this thread seem to agree on).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPn9QTTkCAxeYt5gVAQHahQf8CBH7Fu214fNEE8rVswGyX2O+/PA1otZ3
NqeLDIOTKAz4BLV+YqEVmvIdifpWXwHOhYfC1zY1oDAodnZpagZj5IIYC+FP1/v1
NcPXQrppLbG+Q6jKNeC6vaQCOXht2iSzh7LFky6lfRwGa8rD7HL1rM3oD9RsA+53
ecelJPVbe2VVCjvLUP1KScIOqzi40Uga+03yYIqlJKQRPO1Y7I9YT/OgrqWWqLAn
hWgteIoCMTbG4XhSE4RSaDVImLi7fUki72tUxthOICL8oR96CMBIDFTaobGyw5Kq
2dv7Wb39AvBiCZybqJpW8LJ0jiKWnfoVsH6wiZzaCfa85uoktLFNSQ==
=ECb0
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/oPRlwXcCw6o/m/YD3Z6ZKA5iMJ", "n_sections": 22}, {"thread": "pWqZNZHdJ7k", "msg": "weDaD2J2gXUJ", "author": "David Hopwood", "date_disp": "Jan 11, 2003, 3:04:01\u202fAM", "subject": "The wrath of division returns!", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Douglas A. Gwyn" wrote:
> Tom St Denis wrote:
> > "FizzyMagic" <fizzy...@yahoo.com> wrote...
> >>... "Tom St Denis" <tomst...@iahu.ca> wrote:
> >>> if ((res = mp_sub(&x, &t1, &x)) != MP_OKAY) {
> >>This is a bad, bad, bad thing to do. Sending the same address twice
> >>to any function is likely to produce unstable results with any
> >>compiler.
> > And that is based on what logic?
> > My functions don't modify the pointers themselves,
> > they modify the contents that the pointers point to.
>
> You're both somewhat right and somewhat wrong.
> In practice some C implementations (which don't
> perfectly conform to the standard)

I doubt that any implementations perfectly conform to the standard - but
what we're talking about here is a bug, plain and simple.

> will generate,
> for such a function, object code which assumes
> that the pointed-to storage is not aliased, i.e.
> excessive caching in fast registers might not be
> properly synchronized betwen the two objects.

Which compilers are these, so that we can avoid them (or at least avoid
"optimisation" levels that cause this bug)?

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPh+EQzkCAxeYt5gVAQFN6wf+IaOXoqKrktvIIkBc8RZwmzApHZCP5r/x
tSTNbwn3J9Bn0ZHonU7/pvD0XX3haWu9M9zv8e12R0It8lbQPqSxHMVpP75XsID6
+Ad7D2QWgrPp3zv69s8ENo0yMIGCrGjY7JV1ubrzeEs5miuyNh6a/FLu/OdF8T5x
JFkLcogZl7OX4onfbA6QhI18otn6TDIarA9Wes8kubCXD7jWXZx3KdVE34HaRAJ7
ZsrqpPdNcIVI0jqa584dFbs9uB1SFhV6VU4NecY4Vt1ZZVB561LcH6OchWnfxKDZ
y0jJ24Vcb8sxQG4bUo3Rq4LgUtWaunDPmcZhhfVhfskXq7eC3FIQew==
=uRJA
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/pWqZNZHdJ7k/m/weDaD2J2gXUJ", "n_sections": 28}, {"thread": "pWqZNZHdJ7k", "msg": "NwXYXweRAZAJ", "author": "David Hopwood", "date_disp": "Jan 11, 2003, 6:22:14\u202fAM", "subject": "Incorrect C optimisations that assume no aliasing", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

That it is a deliberate choice, does not make it not a bug. It means
they are choosing not to correctly implement C (standard-compliant or not).
There's no ambiguity about the fact that this is not a permissible
optimisation (without "restrict"), in any version of C.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPh/+RTkCAxeYt5gVAQEN6gf7BVhDEoppJHJA+aI28BU2+v5b86exO01G
ZklevM261pNDF40pV3AlkNlIAwqnY/nZyZCYM6x+jmC9EQlTd+SnwBS/8s3aS4gh
Z3YK9JyYI3h3UTEalUzY7aI52eQ55z2OYb68GTbgUxg3YAomNLFuii5L2sT6DxM8
xSphfgWWm9vfMeAoFz3Z9DGkL+vlJ33VcKzmF8PNIMBZSlhla72j/G6Zsz9nsiX+
nXJJiXSVzM6Xz8XsfYmnuE3wFfP5VugsrFLZisKTL1eApCtkVvozKQ7+8oegM4kQ
dz5vF3hqY6nDq0UsvY5PUQcTIRuN/q2Gouj4LKYPlO7VGTySC3JJhw==
=Ibi0
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/pWqZNZHdJ7k/m/NwXYXweRAZAJ", "n_sections": 28}, {"thread": "rtnGX4FngBc", "msg": "cVZJKKOF6cwJ", "author": "David Hopwood", "date_disp": "Jan 1, 2003, 11:49:21\u202fPM", "subject": "libtomcrypt [v0.80]", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

If you're referring to Standard C in the general case, that's not correct.

If plain 'char' is signed and CHAR_BIT == 8, then '\\xFF' is converted to
type 'int' according to the representation for signed integers, giving -1
(two's complement), 0 (one's complement) or -127 (sign-magnitude).
Casting the result to 'unsigned char' gives 255, 0, or 129 respectively.
In the one's complement case, all-ones may be a trap representation for
'char', resulting in undefined behaviour. If plain 'char' is unsigned or
CHAR_BIT > 8, then the result is always 255.

Therefore the possible outcomes of "(unsigned char) '\\xFF'" are: 255, 0,
129, or undefined behaviour.

Conclusion: using numeric character constants >= '\\x80' in C is not fully
portable; they only work correctly if 'char' is unsigned or the
implementation uses two's complement arithemtic. There was a Defect Report
against C89 on a closely related problem (I forget the number), but the
committee chose not to fix it.

As for lint complaining about "unsigned char x = 0xFF;" - that kind of
nonsense is one of the reasons I don't use lint.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPhPEGzkCAxeYt5gVAQEr8wgAz+ICYaz/8OKr+WMBPabL+W+cMtyFL9tA
//sOcC27/KiCa620ykEpXUsJqFnkxDH/H52zeUvigSpqVsXZSKqP3diyIKgXWcDJ
iflcVAg46DIbk0gwTmKYJ1AsXgZAZaLC7yFeFL/o4S7F7hr9c7CXiZdS/nE0HSY0
8e5X646lYhzWjI16iushIFZT/PmeIE9Iwxu3yH/vqJa4zkOCnL+TdbOD5/y3Qzg/
HzkUih9cj8nb8sZ1+jVFQIIRJhfBcYVP9DwUWS0VVA6SLNjnSO3fGeAdaNSMSW8R
xNrtVAW+a/YbGw8i/4Xz/yH+06/eC1EbF5Ouylrd1TIP+5NhGdAdPA==
=4mzt
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/rtnGX4FngBc/m/cVZJKKOF6cwJ", "n_sections": 40}, {"thread": "uLQW9TdBtcs", "msg": "fL5ZKlqvZJMJ", "author": "David Hopwood", "date_disp": "Feb 24, 2003, 7:10:26\u202fPM", "subject": "authenticated anonymous communication question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Wagner wrote:
> Paul Rubin wrote:
> >Or maybe anonymous isn't the right word. I'm wondering if there's a
> >standard protocol that lets Alice and Bob have a secure, authenticated
> >conversation, that's anonymous in the sense that an eavesdropper or
> >MITM can't tell that the conversation is between Alice and Bob (i.e.
> >the attacker can't see the identity credentials). Alice and Bob are
> >not anonymous to EACH OTHER. However, they don't necessarily know
> >each other (or have each other's public keys) in advance: they
> >authenticate by some kind of certificates issued by a CA that they
> >both trust. For example, SSL doesn't work for this, because it
> >involves sending the initial server certificate as cleartext.
>
> I can't see how to do it, in the presence of active attackers.

It is possible if you construct the authentication protocol using a
recipient-hiding cryptosystem. Obviously you also need an anonymous
communication network.

(See <http://www.users.zetnet.co.uk/hopwood/crypto/rh/>,
but note that this paper is unfinished and there are some problems with the
formal security definitions.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPlq0UzkCAxeYt5gVAQEgkAf6AmPIU0lIoqASe06JxUwVo7DO+X0gO8MK
/cG/gNLppbsSLgiBpc5es3Vi2B3uWhQY9xyU3xUDpl08vJ4ntwUEpE9KCurkU8kh
24BCaTwklwferRn9HF/lkpZNuVEqtRDFtQ0zlwiyvbCPiqdsbx8XAzzXlfz99naz
QFm1m6vvZZRNEgU3H7aGI8mYQO/axLb8+h18qhPgHQwF6jQh8JAbaZcxCNtJPIPf
SRBwki7OAT8/Bw4VknU4ANpr00vl4cmpbT6y22wisLnYGCR9WjWgvz7m88L8TY37
v8OCoyXgYRJc101IgPKJpCwdr4eN/U9dnM9XRmR3zrtbNmvTr1GwUw==
=KLes
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/uLQW9TdBtcs/m/fL5ZKlqvZJMJ", "n_sections": 27}, {"thread": "v8I0HLlypfQ", "msg": "PeIktrhfdlEJ", "author": "David Hopwood", "date_disp": "Feb 21, 2003, 7:27:17\u202fAM", "subject": "Please Cure My Ignorance (I know that may be difficult :-)) on Hash Functions", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

TC wrote:


> "Douglas A. Gwyn" <DAG...@null.net> wrote:
> > TC wrote:
> > > Well, lets' split it even finer! Construct a hash function that takes
> > > any input, and prduces *no* output! Clearly there are more possible inputs
> > > than outputs, but no multiple inputs map to the same output. There ain't any
> > > output!!
> >
> > Wrong, there is an output (empty), and it is the same
> > for *any* input.
>
> No. There is a difference between an empty output, and *no* output. The
> proposed hash function does not ever return an output - empty or otherwise.

... and therefore the proposed function is not a hash function (unless its
domain is restricted to the empty set, in which case there are not more
possible inputs than outputs). A hash function must be an efficiently
computable total function on its specified domain.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPlP+VDkCAxeYt5gVAQFfeAf/QMuLA917Fku4lHqz3mZ87BOdJ1wAnWA9
S36eNTOXOdsRx92dGWI3isJJ4tgnDinTkh7yNw+f5bJbQLbHUFSf3gHoDpPzp+cD
/Lai4aWJdB+VBxwEFBgQSc7Msgi8msc0TCHVyU9BoFMz7Masx/P+1/WF9qnx+91u
6DOQ3xPEuflsvlu5oUcoJmDpCuSgQnm9DYBuHhb0G21CsJqV+p4a7bOzTh9cPR0P
wmQlRPhxsI4GsLLm2bjvPrvOWQkyJrSP9BkIorMkxHKOG/8/9jQSmPV15qACiCkr
hnhd7jUZ2bvT9AcmdNi3JvPatqumnlcT1T6j+pUrZz1D4H1aRk2/LA==
=lVlL
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/v8I0HLlypfQ/m/PeIktrhfdlEJ", "n_sections": 38}, {"thread": "vf96z6MPvLU", "msg": "D1bW7eti_1QJ", "author": "David Hopwood", "date_disp": "Jan 15, 2003, 3:36:40\u202fAM", "subject": "The NEO project... again", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mike Curry wrote:
>
> > > If you want to discuss parallel/distributed computing, and come up
> > > with some sensible projects, I'm quite willing to help. I want to see
> > > distributed computing work -- that's what I'm doing here in Oxford (when
> > > I'm not thinking about factoring).
>
> Good advice, what would be sensable?

As several people have already suggested: find a collision for MD5 (or any
other 128-bit hash) using a parallel collision-finding algorithm.

This is about the right level of feasibility to say something interesting
about how much work can be done by a new distributed project, and a successful
outcome would be useful to encourage people to upgrade from protocols that
still use 128-bit hashes. It's also easy to create similar problems of any
desired complexity, to test and optimise your code.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPiS72DkCAxeYt5gVAQEtpwf/YG116Xs7nwGko8C3NR+VEMyqR4HTxEgO
BPf1BxPnGdH65R0LbSIiBC6GybA/cFoYQ+uPlNSKF1MQsEJFd5UXMIeYDOYSjoLx
4kVLkJr4Verh1Pvbf9IH29gobhhNuw1LCT63dBYULiMLj+hy6pVq393bdKyZ989Y
pGsYf1QOTG2ZSZNLj7/JmIVjn+E3e8togvMr3x77wRDSMPQso93kZEoOkb+vmTS+
kcj5GT6Mr2Gq7AjAhB99PJILp+59o8/ZSsxePInwljEODBjY9NQOLTB2eb7YHP6n
EGgzFf6anjO4AgRIPjI1THb0G0rx6FoicbNOS3tttuWDQP7BfrvIRA==
=qRyh
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/vf96z6MPvLU/m/D1bW7eti_1QJ", "n_sections": 63}, {"thread": "xFbu_JL4_es", "msg": "Zm4V0mZHJpQJ", "author": "David Hopwood", "date_disp": "Mar 18, 2003, 11:14:09\u202fAM", "subject": ":::Does someone have IEEE 1363-2000?:::", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Pathos wrote:
> Hi there!
>
> I've been looking for the standard specs on MGF's, i got, from another post
> i did here, a link to a site (http://grouper.ieee.org/groups/1363/) that was
> full of standards, i think the one that will have the specs on the MGF will
> be, IEEE 1363-2000: Standard Specifications For Public Key Cryptography, but
> there is a problem, to download this file, i need to be a member, and i'm
> not, to become a member i need to phone, e-mail, or send a letter to some
> address asking for a 'registration access code' and only then i can
> register, i actually found a site where they asked money for the specs.

The username is "P1363", and the password "MarsRoks". Only the drafts are
on-line, but the last draft is identical in its technical content to the final
published standard.

(The username and password have been public for some time, and the standard was
developed by people working on the understanding that it would be publically and
freely available.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPnZO0DkCAxeYt5gVAQHyRggAtj72IMTu803ABNaYDcFHjYXAHd4IHjPn
kED1btzhd+xluguDzlbKXFS0PvRF6Mq4MY+ofxocHeOTVb1nblum37HzpPvi/LOf
Z2TgGod7e+3cQFsaYs25S/Qr7qIzaBUOzGoqF2tZN76Zw4ros76KgabQMz+Y2Q3S
zHUFmIxbYdLnqWrqn/AuRDNHdLudtnphanuPaf/xDv4fguWNIJTrGZNmaQP1Naa1
sjn4SbUNl18AUU3VHOiItIv0QHVoQVZ5Nmb0si6fgOKMQs5zwuxBQ3Biau5Ai0PQ
cvnNVvmc2U2msxnplsRoi/pCdfC2/5V03h3eEQIoH/uwO7l8eu/cOQ==
=eH2C
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/xFbu_JL4_es/m/Zm4V0mZHJpQJ", "n_sections": 2}, {"thread": "xFhtkiuaP8c", "msg": "q94cP7xEnU8J", "author": "David Hopwood", "date_disp": "Feb 19, 2003, 7:12:45\u202fAM", "subject": "Use of SSL as a VPN", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

dazedandconfused wrote:
> I'm not a cryptographer either, but I can tell you that there is a
> perceived deficiency in SSL because of its use of MD5 for generating
> key material. According to this document, TLS is ok though.
>
> http://www.corsec.com/fips_whitepaper.php
>
> I'll leave up to the real crypto people to say whether this is a valid
> claim or not.

It's not valid. Both SSL 3.0 and TLS 1.0 use both MD5 and SHA-1 to generate
key material, although in different ways. Despite being a little ad-hoc, there's
no reason to believe that there's anything significantly wrong with the way
SSL 3.0 does it. If anything, the change to the PRF for TLS 1.0 can only
have weakened security, because in the case where a server supports both TLS
and SSL 3.0 (which is almost all servers in practice), an adversary has the
choice of which PRF to attack. It certainly makes the protocol more difficult
to analyse for that case.

Also, the claim in RFC 2246 that the TLS PRF is at least as secure as the
component PRFs, P_MD5 and P_SHA-1 (it actually says something less precise
than that, but that's what it means) is incorrect in general. It's incorrect
because only half of the key material is input to each PRF, and the key
material (i.e. the pre-master secret) may contain structured data; it is not
just a uniform-random string. For example, in the RSA ciphersuites the version
number that supposedly protects against version rollback attacks is only input
to the MD5 part of the PRF. (As it happens, the version number doesn't help
much against rollback attacks anyway, and the differences between SSL 3.0 and
TLS 1.0 are not large enough that rollback from TLS 1.0 to SSL 3.0 would be
much of an issue. The other standardised ciphersuites also don't appear to
have pre-master secret formats that would interact badly with this property
of the PRF. This property should be considered when designing new ciphersuites,
though.)

Note that the above criticisms do not lead to any practical attack on either
SSL 3.0 or TLS 1.0. Nevertheless, the design goals of the change to the PRF
were IMO not achieved.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPlNz4DkCAxeYt5gVAQGHzggAi4FN7UMjqyp4AhzrYki6irP9elChjj3C
sXhJkNl4KZ7KpKPycZa3q4SV33h7cuFFvyjV9Ld4z1Vvz+bC0zg2M9gKUq8icCyH
333MpGUZhD3Mf1GmWdkGSKBkADgHr66WjXJ9psx6pU/aH05DFs7fmjRwusYvjEya
C5DEqwdKzCCpKTs80YbW/pQbGa9NgzE8+NtU/Pd15JpNgDNYOiug/XN4SGZN5ao5
vHd1/FRaJEonslY2NkpoaU7/ohperR952RTXa4eqFiHvhznQwuzVtIcxzXvKZ7cp
x8AJVx0soFY8Kt4+rhTnCGtBB5+acYfvsyxAP+Lr99SfMDWUcN5BGQ==
=zY0F
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/xFhtkiuaP8c/m/q94cP7xEnU8J", "n_sections": 39}, {"thread": "xTo5uL8gdoY", "msg": "1xhcu421yDYJ", "author": "David Hopwood", "date_disp": "Feb 7, 2003, 3:00:04\u202fAM", "subject": "What's the bottom line on RC4??", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Yama wrote:
> On Tue, 4 Feb 2003 17:07:17 -0500 (EST), "Info"
> <info-n...@reflective-technologies.com> wrote:
>
> >I followed all of the discussion about RC4, but I'm left wondering what
> >the end result is. The only thing I ever encrypt is files-- is RC4
> >secure for that purpose, or not. I can use a separate key for each file
> >if necessary. I don't think my files ever contain any known text.
>
> This is not meant to refute what Mr. Goldberg advises.
>
> RC4 is strong if you use proper current RC4 hygiene:
>
> 1. You provide between 80-bits and 128-bits of non-repeating (not
> non-predictable) data (a nonce), you merely append that to your master
> key to create the session key and then prepend those same bytes to the
> data.

No! This is (almost) precisely the mode of usage that was broken in the
attack on WEP.

There are two commonly used, secure ways of generating a symmetric key:

- use a uniformly distributed key from a strong cryptographic RNG, that
is unique to this data stream and not used for anything else,

- use the output of a cryptographic hash function, *provided* its input
is unique to this data stream and has sufficient entropy. (If it might
not have sufficient entropy, which is always the case for a password or
passphrase, then use a password-based key derivation function, such as
bcrypt or PBKDF2.)

Actually this advice is reasonable when generating keys for any symmetric
cipher, but it's particularly important for stream ciphers or where the
cipher has known key scheduling weaknesses (both counts apply to RC4).

> 2. Drop some bytes, preferably at least 16 and better 256 before you
> encrypt/decrypt, then you thwart the known-attacks, I believe. There
> is some argument that 512 or 768 would be even better, but from what
> I've read, this may be overkill.

The argument for (say) 768 bytes is that someone has actually analysed the
effect on the randomness of the internal state for this number of bytes,
and found that it should be sufficient on theoretical grounds (see
<http://eprint.iacr.org/2002/067/>), whereas 256 was simply a guess.
It's true that no attack has been found if only 256 bytes are dropped.

> 3. Have a strong (high-entropy) key. Hard to guess. You can use the
> easy technique here www.diceware.com as it is considered quite
> effective for choosing a key.

A password should never be used directly as a key. If you must use a
password, then as well as choosing it with diceware or similar, derive
the actual key using a computationally intensive PBKDF with salt (e.g.
see <http://www.usenix.org/events/usenix99/provos.html>).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPkNnRzkCAxeYt5gVAQFZ7AgAxSFkDLLcZkTHCxl7pWc07zTuOdsA+I8r
WB22bDdGeGU0CyHiy8LFjHH9DQbfxcJoY93Bw8li+kM4dbdn5BEe4wyOFFbwF7qy
YPxEZkU6XwOki+rvQc3fNgqKN/4LNCU+wuFqpV6qxNrclM+ZsU2a7SNadUXU1XaV
tT5pXl9BuGo+MfpQ68OWwkJvwS9/w9glDbP/pOQsmGKZtMI8elKx+51HKr5gWv0Q
Y3UwDVajkGrUjsln6Bv1hH8SMTbbGqv7ot/xtak63MNv9V5jECUDj8xYZpEuikB1
AuxlSf7VK1aWcGZ3TDV7MsxUmU1ZQfB4YvzaMfc7h4pxh2sFcnnvzA==
=IvQ9
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/xTo5uL8gdoY/m/1xhcu421yDYJ", "n_sections": 15}, {"thread": "-ujjSzr7rEs", "msg": "P8tTzC9ie7MJ", "author": "David Hopwood", "date_disp": "Apr 4, 2003, 8:48:38\u202fPM", "subject": "sci.crypt FAQ", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

The version at <http://www.lunkwill.org/pubwiki/wiki.cgi/SciCryptFaq>
corrects some of the more egregious errors; it's no longer embarrassing.
It's still not a particularly good FAQ, and the questions it answers don't
really correspond to the questions that are frequently asked.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPo41wzkCAxeYt5gVAQGOGwf/XpXZn9IQ2qL72Jg0thgzV43s++aBExNH
xmoBdA6DCgsw3RC8Ei0dc4z4hy0ITrJRCtc7RfCPtbqEzCUMMDFbGWP9ttkfnV8O
YHJDbgFVuzs1JxrePMhCRCoiRu1G8Dc7kTJUDau3mYmR9ItINAF9qifi6QyowABl
Wg6h9Ruyra1EKybjTH1+BgexCyh3ylRMdABX8V9UUSi1dhbrUZsJEP/Vd+gtCHjV
7U7Kd+2j11P01cAqfTvNYEo/lLJnq0d5/MsxvgSRLYQPkHeFiSCR06pmoKQ7Itxz
Kxrbj/ojbxo3lJxeF4uwZyyBogPU4dgmQm6NU4m6qAWSnumdJFe1Gw==
=yFmI
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/-ujjSzr7rEs/m/P8tTzC9ie7MJ", "n_sections": 3}, {"thread": "3_v5dRyDZPM", "msg": "xT2KumcJE2YJ", "author": "David Hopwood", "date_disp": "Jun 29, 2003, 4:07:54\u202fAM", "subject": "Stream cipher against block cipher", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"John E. Hadstate" wrote:


> "aditya" <tru...@rediffmail.com> wrote:
> > You guys seem to be having an interesting conversation out here. Whats
> > a block cipher? At times it helps to get back to the basics.....so can
> > I add?
>
> > A block cipher encrypts plaintext in blocks. While a stream
> > cipher encrypts plaintext 1-bit or 1-byte at a time.
>
> The distinction is not so black and white. Some have suggested that a
> better characteristic is to look for the preservation of state across blocks
> or "encryption units". Even this is very slippery ground. How big is an
> "encryption unit"? It could be the size of the whole message. That
> point-of-view sees every "stream cipher" as a very-large-block cipher in ECB
> mode.

A block cipher is any symmetrically-keyed *permutation* (or a family of
symmetrically-keyed permutations on blocks of different lengths, in which
case it is called a "variable-length block cipher"). A stream cipher is any
symmetrically-keyed *encryption scheme*.

Thus modes, including ECB, construct stream ciphers from block ciphers.
Equivalently, they construct encryption schemes from keyed permuations.

The problem occurs when people assume that because these terms have the form
"<foo> cipher" and "<bar> cipher", they must be subclassifications of a class
of "ciphers" such that "cipher" has a consistent meaning for both cases.
"stream cipher" and "block cipher" should each be treated as indivisible
phrases, not as applications of an adjective to "cipher".

(A similar problem occurs with "dynamic typing" and "static typing",
incidentally, but that's off-topic.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPv6RQzkCAxeYt5gVAQG/Ngf+KmnmkXHpHWBFUwXg5fNCeA/0a9ErH8bU
M7UUrG+g2o2T8WBWB7vV28i6yOl+GpbVyvy1RoiL3/yP/igMmghaSSh6CZJsBaY/
qTzcGTYvoTgFu/CCd+7owHfQ19JBY7cxNtBXwI7crxIsnaj3Xj3dH13afqQM2p6p
Pd9l+KYqRnj5g4xESomIpd7aw6J06x5I/xrFzpsQMGolSGRsGut/mCk0n6gOBiKb
aYianntvnv8NzgahGKOq4iYHwrDHmfMiS7eph67/dHWhqz+t967J/u4c/+75n4xg
gE9srvENgGaOzdvIwroUWYwlA28OEM8thqd91jDu0czFOMTCeJnpKA==
=m5XX
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/3_v5dRyDZPM/m/xT2KumcJE2YJ", "n_sections": 43}, {"thread": "44GqG5P_yb8", "msg": "VdS-L4kpS14J", "author": "David Hopwood", "date_disp": "May 19, 2003, 12:39:31\u202fPM", "subject": "convert stream ciphers into block ciphers", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

If you're going to dismiss all of the work that has been done using the
PRP model of block ciphers as "not a useful point of view", then you'd
better give a coherent argument to support that.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPsg/YTkCAxeYt5gVAQE/1ggAz18Oxlun1TyHPqVjgtJbqHim5fgebDoe
m+q395OiKhhbUoil5zbKKUxVllybjEr+itppkfJEYPrzs09wrwlS1Oq+aZSpBKcq
yrJn0Pu7gNzoF4k4rcEfV4C/yZCOA/6yvp6FPDw+7O95AYAImkOfdnAHbuVOfxF+
P9P0d4+jVtmuj8jR4crN+75IlwjyD7h36ZiNABvh3SrTYgEd7dFCaoyqb5rN4FuM
982NnHhhs1em0xkJEJmVD5dmm102/gsmJg33IZjocL65foGZS76Lgj+Dh8n0sluR
ozEiS+m/9wQkqNToa8IgAi4cTdlMD9sEg9x9HgqVwz7kSND106OKEQ==
=a+XH
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/44GqG5P_yb8/m/VdS-L4kpS14J", "n_sections": 53}, {"thread": "9VF1XGdy9bM", "msg": "OyC_Pk9_VOUJ", "author": "David Hopwood", "date_disp": "May 24, 2003, 3:43:42\u202fAM", "subject": "Triple AES (3AES)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

jsa...@ecn.ab.ca wrote:
[snip]


> Rijndael with a 128-bit block and a 224-bit key is not part of the AES
> standard, although I feel it may be, for certain subtle structural
> reasons, more secure than the standard lengths.

Why do you persist in saying that, when I've pointed out at least twice
before that the argument you used to reach this conclusion does not apply
to SP networks like Rijndael?

(The earlier threads are at <http://groups.google.com/groups?
as_q=Rijndael%20224%20Savard&as_ugroup=sci.crypt&as_uauthors=Hopwood>.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPs8ijjkCAxeYt5gVAQHqgQgArhaEf6FUI1ryelI3NHnkVCnWJz5hXBe7
Lq+wZjWC1n7ooPBd0/UewQ5dztbD0lhTAWZMGM2bu18q/ncs84FBkD/dLB+NJ6ft
vR0od414eNqFiTuZdqQ+X+3OW5rq1XwFOb2nZM9SzbSw9ZKFzoJosW3L6C5yLF+i
2c+fxh9U/7GNrs0kDTP5tISECCNh70zYXv3DH8wGd33tLpskmjswOuKCz1XDZffA
ZYVMTDi65y1/D37/n5OO2ruDnb6rVEqlAR+FDdb4otrLv4On8Ng+jnTGcm0pTgGx
W7izcnZ6c065tVY8jnqB3Z/5WUyLnos+mAnSfI1M5LPnD1JlZ2GKfQ==
=JSBF
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/9VF1XGdy9bM/m/OyC_Pk9_VOUJ", "n_sections": 100}, {"thread": "I2IaaQxu8U8", "msg": "NuUNcyNRIrAJ", "author": "David Hopwood", "date_disp": "Apr 4, 2003, 7:39:55\u202fPM", "subject": "BBS PRNG strength recommendation parameters", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Here's a previous post on this subject:

Colin Andrew Percival wrote:
> John Savard <jsa...@ecn.asblokb.canada.invalid> wrote:
> > It produces *one bit* from performing a large modular exponentiation.
>
> Is my memory playing tricks on me, or was it proven to be secure to take
> the lowest log log n bits?

It's a little more complicated than that. BBS is "polynomially secure" if
you take O(log log n) bits, but that isn't really very useful in deciding
how many bits to take for a specific length of n. What you need for that
is an exact security analysis of BBS, as given by the
Alexi-Chor-Goldreich-Schnorr theorem [ACGS88].

Since I'm too lazy to do the math right now, here's an example that was
given previously by Dan Bernstein, which assumes one bit per iteration
(search groups.google.com for subject "Is BBS provably secure?" in
sci.crypt to see the whole thread):

> The Alexi-Chor-Goldreich-Schnorr theorem, for example, tells you how to
> factor N using 10^54 (lg N)^3 applications of an algorithm that has a
> 1/1000 chance of seeing a pattern in a billion bits produced by a BBS
> generator mod N.
>
> The theorem does not say that predicting the generator is as hard as
> factoring N. It allows a ratio of speeds as large as 10^54 (lg N)^3.
>
> There are newer theorems that clamp down on the ratio somewhat more.
> However, it's still theoretically possible that the ratio is noticeably
> larger than 1, even though we don't have any evidence along those lines.

As an anonymous poster commented:

> Obviously using > 10^54 oracle calls (which is 2^170) to factor say a
> 1024 bit N is not useful, because it takes less work than this to factor
> such an N without a BBS oracle (probably under 2^80 steps). On the other
> hand, this is an extremely weak BBS oracle, one which is only a tiny bit
> better than chance. Stronger oracles will give more effective results.

Since arguably the BBS security proofs aren't strong enough for practical
modulus lengths even if only one bit per iteration is taken, it's a dubious
idea to take more, at least if you want to rely strictly on those proofs.

OTOH, it would not be completely unreasonable to view security proofs that
are not "tight" as heuristic arguments, suggesting that the scheme is probably
stronger than actually proven (AFAIK, none of the schemes that have security
proofs that are not tight, have been broken *because* the proof is not tight).
That is effectively what people are doing when they rely on the (corrected)
security proof of, say, RSA-OAEP, and use it with a 1024-bit modulus.


[ACGS88] Werner Alexi, Benny Chor, Oded Goldreich, Claus-Peter Schnorr,
"RSA and Rabin Functions: Certain Parts Are as Hard As the Whole",
SIAM Journal on Computing vol. 17, no. 2, 1988, pp. 194--209.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPo4lgTkCAxeYt5gVAQGVgwf+MXBXtB9Rkx4y/BUXgdRBBvSbDIKNumvy
X3c2DG98oQfJXt7lERHz1xXj3pyaGAlMza04DCuS9QzSsYSYXx/cwHzRe8kQtOFG
j49jtqcI3Oxa852hNbdA6NrsoWjnQGJbFDL/S6ywDoyG5rRQrmIyXuQmWijWVEHR
BmF5UkyFXBW83qou2p/4gk4lWjspHgOAm7g2lMUzulXqPUM5MrDuJwUUS0eq0aKg
2b1Eo3nLkXvix/LlW0ycB28So6PygvehYJuIsfZ0+G7bjehp/Maw2NU7qZC7WKU7
PkEn3OVaSMHUX2pCwouenqxofSjqrWciQQ/Crs/PmIYrUAoC8DorTg==
=uFb5
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/I2IaaQxu8U8/m/NuUNcyNRIrAJ", "n_sections": 2}, {"thread": "IX7kClgT1Vc", "msg": "RStHKV4-FRwJ", "author": "David Hopwood", "date_disp": "Jun 23, 2003, 10:49:10\u202fAM", "subject": "public key confusion", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"John E. Hadstate" wrote:


> "aditya" <tru...@rediffmail.com> wrote:
> > secondly, the
> > generation of the public key is a mathematical function of the private
> > key- is that correct?
>
> There may (must?) be some relationship between the two, and in the systems I
> know about, there is a relationship.

"Must", but in general, it is an arbitary relation rather than a function in
either direction. I.e. there exist schemes for which there is more than one
private key for a given public key, and/or vice-versa, and these equivalent
keys are unlinkable rather than just being trivial reencodings of the same
data.

Those schemes are a bit esoteric and probably only useful for anonymity-related
protocols, but even when designing APIs for more common cases, you should allow
for a "key-pair generation algorithm" that generates both the public and
private keys together, rather than assuming that the public key can be generated
from the private key. (For instance, in RSA, the pair (n, d) is a possible
encoding of the private key, but it is not in general feasible to calculate
the public exponent e from it.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPvcTKjkCAxeYt5gVAQFC9ggAzB8M1zOuUtLo+RI91dPHgIle1jmAEwrU
79xEHcD7uC8r1OkaOQWYbnUY2uwHCdI8xAAF/thIH+p8/lM5EJRZuPXKOFqKXe0E
UxKFeiyt8zm7avhSPjA5Bvkdm3NJgCWbgDWvl33i4pVlncmJ6mKKy+iJfh5b++T7
Czjl1cGX2uNZfyLLorbgrKcYUNfuHSpSg+T3nFHMJ5ogibmE1TahNTeLD28vTlPw
NmDpLJEFahjan2T24D66/GVewssL6HB6jD7HmRH1EKVpWgjOJ9bWLy+PRDp1sXuc
wIll81A4OGyF4JkaENDHJ/zIqsvZ6pzErBw/y1PInflIpVyLegd0/g==
=fU2E
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/IX7kClgT1Vc/m/RStHKV4-FRwJ", "n_sections": 10}, {"thread": "KdkZyfKQUD8", "msg": "qJet-aFn8SQJ", "author": "David Hopwood", "date_disp": "Jun 7, 2003, 10:04:01\u202fPM", "subject": "Seal vs RC4", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Satyakam Mishra wrote:
> Yes the number of possibilities would be that high. moreover I feel
> the Probability that compiler(BRK in case of LINUX) alllocates the 16
> bytes of key as seperate 16 bytes should also be taken care of.

The only practical situation in which the key could be discontiguous in
the swap file is if it straddles a page boundary (and then only if the two
pages are discontiguous in the swap file) [*].

Since Linux on x86 uses a 4K page size, the probability of this is about
15/4096 (assuming the starting address is uniformly distributed, which it
isn't, but that will do as an estimate). If an attack works with probability
at least 255/256, the attacker is likely to just ignore the remaining
possibility, and so should we.

[*] Technically it would be possible, at considerable cost in efficiency
and complexity and with no discernable benefit, for a C implementation
to allocate arrays discontiguously in virtual memory. No actual C
implementations do so, AFAIK (for Linux or any other platform).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPuIGfzkCAxeYt5gVAQGtHwgAki1Kyxq+5x7mOWV/Bw02sJVt+sSTEe+0
p3/onoqEbbZy3RB2RPIlXR7GJmw6+c7mKNDNd04pBSzx3x5Art4cG4GtZc9gJ/nz
ijppjnJz0QZgeEVNlIQsRmg2FYWSDhrsSxVyq2GLfCNqpQYYzStrznf/U3/7fXhg
cVk5WqJoCQdyNCRQIG6rJ3R2PYKB6w89olV2niw0bc7j3OmGl+l/SBQkaaQTcMrc
siUEJgYOimptD6sRgQLXuewWP/ux6zEPxrgFxcKtWL2haRq5TLQoIhAncjmHX4tT
QcHl/95dJl4YYw1u+K5qyLtOr+LPQvpWwnPizDoxW/kYP0h1YZ7uPQ==
=FLZV
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/KdkZyfKQUD8/m/qJet-aFn8SQJ", "n_sections": 21}, {"thread": "KyvcYiuj428", "msg": "kxoHcatWtvwJ", "author": "David Hopwood", "date_disp": "Apr 1, 2003, 11:40:09\u202fAM", "subject": "Does Block Size Affect Security", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Paul Crowley wrote:
> krus...@hotmail.com (Crusader) writes:
>
> > But remember that the operations in the cipher have to be more complex
> > if the block size is 128.
>
> Eh? The 128-bit block cipher Rijndael is the simplest block cipher I

> know of, [...]

Simpler than RC5? (But yes, I agree that block size doesn't have any clear
relation to complexity.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPonA2jkCAxeYt5gVAQEGQwf/f1kXJlhponIEXASETNjatLAAZYyImFJZ
1QNbtpS7u5GT9PJzKtb4tPSUrU8jiWAPD8+PnwlEkXQ0TcQ/fUAqmpwWcMg0Zokp
B3QeclAtAlxyUgLYDFvTHprnA/Vps84UrCBUgVz3LK3OR9FIBoDWOcZCVEaIJQD3
GtXcJkRT23iBGFTjzVXd462oGkcGcova/QWK6s9jlZ0RBfTrVRKFzjINMLwdiNnP
rOC5c7XeVwpd1W5T+bGBDn6/xbI2N+euPVqF1+sSFd/qlN/zb+LXXhsxUdvy/Y5Y
1EM4XmmfEu9Xg+EFmkANHHxAC00se8M1fD59rRZbOPL+/yQdqfhwFA==
=GjHy
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/KyvcYiuj428/m/kxoHcatWtvwJ", "n_sections": 9}, {"thread": "LRJVBSBO1eI", "msg": "-a2tNh2F_CMJ", "author": "David Hopwood", "date_disp": "Apr 6, 2003, 1:16:00\u202fPM", "subject": "Why Micosoft products using RC4 failed", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

1. They were not designed (or even reviewed) by experienced cryptographers.
2. The aim seems to have been to make products that could be sold as
having security features, whether they are actually secure or not.
Unfortunately, such products do sell.

The specific technical flaws (some associated with use of RC4 and some
not), are almost beside the point: flaws were inevitable given the approach
described above.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPo9snjkCAxeYt5gVAQEc3gf+KEJqcjbK1ENlod4L677bV7cHUOegxwJf
evhemvKXbRTeQZ3m4iDwt/pnKlbbuAKhNtgWgDVmLeAETs+vZ4+sD8UUc2y3ypTM
CyPk8ZQ9cuOgNitUGS6+Szd46rF4Q68Ix14/nymZ9BigttXc3Q6zYl8rZ4ea4Dho
ZMed+Orz+rr+xwv9ScuiDBbYIA6IDvRT3+31QQcnUUlNVd3RtDsIc6RqJL8dxh7o
Fbv+58n8mMZAcwme86Ln4/wTW0hmS49lGaU3pFMpdb3QZmSa5ZaSTPrzk0ht/BAm
WZ+XfTD1K6iy2S3P6I0b60iMt3T0jzK0gi08/p6g9t5+DSWFqrFUEw==
=M7X5
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/LRJVBSBO1eI/m/-a2tNh2F_CMJ", "n_sections": 33}, {"thread": "LYtnxuFSFE8", "msg": "g1P-v98ptsQJ", "author": "David Hopwood", "date_disp": "Apr 13, 2003, 1:40:15\u202fPM", "subject": "Asymmetric ciphers", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Andrew Plater wrote:
> Diffie-Hellman is an example of a protocol where the objects involved
> can lie in any (finite) abelian group.

Any finite (not necessarily abelian) semigroup, in fact. Also there have
been variants of DH proposed for particular kinds of infinite abelian
group, in which the participants can calculate an agreed value sufficiently
accurately to perform a key exchange, even though it is not possible to
calculate g^ab exactly. For example see:

"A key exchange system based on real quadratic fields,"
Johannes A. Buchmann, Hugh C. Williams,
Extended abstract in CRYPTO '89.

AFAIK this scheme has not been broken, although it's too complicated and
didn't have clear enough advantages over standard DH and RSA to have been
used in real systems.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPpi/3jkCAxeYt5gVAQFXDggAnUMs/g5ClGmeinVd5+w+dgdjYvmoRi4H
HM02OOVCfOZ/QXghOLs2+Ewlr7WHmx4kLE9OgeZ5vEbEvKV/WDegG0KM1Q7HqE1m
x5pheBhhqTHgoaUtO5yes4exMYL3heYpW+7bT7cN2Zc5NfFTS8rUXriGpiLZl8T5
LcSdmqW6dCkRthdMiqS+NYhC9LiAslTpzE7ETZ3ZmruR3gSQro+m/upRRTKL5c1/
5YH00Vf3Kpn8dH7CuBfw3kNhOdwCeAGZcGtqgbDwfCe/jW4oHMwwpGFtVKZX8Ws6
jHmr9TUFUQEo3QBS5lPmAURn6DYbn++sZGzNylFX1IDZo25U0W6/+A==
=7+7H
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/LYtnxuFSFE8/m/g1P-v98ptsQJ", "n_sections": 11}, {"thread": "Lj8dowpIGXE", "msg": "2E4Y1zCZT-AJ", "author": "David Hopwood", "date_disp": "Apr 13, 2003, 1:39:36\u202fPM", "subject": "*Quantum Computing* expert Bill Munro", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Bill Unruh wrote:
> Mok-Kong Shen <mok-ko...@t-online.de> writes:
> ]I remember to have read that all public key schemes
> ]depend on the assumption P != NP. Isn't that right?
>
> It would be nice. But no, they depend on the assumption that calculating
> the inverse is much harder than calculating the function itself. Eg,
> factoring is not known to be not in P. And if it were in P but the most
> efficient algorithm for calculating the factors went as L^(10000000)
> noone would care that it was in P, it would be fine for a trapdoor
> function.

If N is the number of operations for normal use of the protocol, and N
can be chosen arbitrarily without resulting in an impractical key length,
then even a strength of N^3 would be just about adequate for a trapdoor
function (consider N ~= 2^30). Merkle's puzzle protocol was N^2, which
isn't really good enough.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPpmguTkCAxeYt5gVAQFEFQf/VyJtaxvkbj8dGfmSTeL3LNTdmZ4TFbJ9
36qS5WOjsD+XfqowE/4Ug5+r6jS2uvAeFK+r7FMRGU+Pe9DEly/Uw3/vsHIDpz+6
sZsndsFduxbuT2fYNq9hR9ftDw5eLBDRf2lrDL8MyFovw+9bAxhecCFTr5pEd9mJ
bQpOlrCGo8Th6c5YUzaoXPk4x6z63vHGp5M6AcIEuoGM62MW48pgyTtlC+nZ+rbr
l6nkhFO734Azw5ylODqgGqE3/NcZaxhRMHr8EWlGy/usJ7CDlfV/LXV21M+RTDv7
txCOeetifqthJzDng8aF0Dd0KVCCXANgrBT41noS9iKM7ooSK9pPrQ==
=JfDs
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/Lj8dowpIGXE/m/2E4Y1zCZT-AJ", "n_sections": 22}, {"thread": "MAeCuRu6FSA", "msg": "R_s9n4wzHx0J", "author": "David Hopwood", "date_disp": "Jun 28, 2003, 9:37:31\u202fAM", "subject": "Key length for ARC4 and RC5 key lenght contradiction (Please, help me)", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Gustavo Rios wrote:
> I am implementing ARC4 and RC5 and found some misguiding
> documentation, at least to my eyes! The problem is the key length for
> both algorithms. The IETF Draft for Arcfour, i.e.,
> <draft-kaukonen-cipher-arcfour-03.txt> states for following:

[...]


> My doubt is: The code prevents keylength of 0 bytes to be used, right
> ? In other words, ARC4 do REQUIRES for key length bigger than 0, this
> is a MUST be!

[...]


> The RC5 Algorithm is the same. The paper "The RC5 Encryption
> Algorithm", by Ronald L. Rivest states one contradiction:

[...]


> c in this case the the length to bytes expanded, if b was 0, than so
> is c. My question is where is the error, the allowable sizes for b or
> the computation itself?

In the case of RC4, the minimum key size is one byte/octet. The Internet
Draft (which is expired anyway) does not contradict this, although if the
draft were revived it should probably be specified more clearly.

In the case of RC5, the minimum key size is zero bytes/octets, and the
key scheduling algorithm in RFC 2040 handles that case correctly - not
that anyone should want to use zero-length keys.

The paper "The RC5 Encryption Algorithm" has a revised version that
corrects this as well as another error in the reference code (see
<http://theory.lcs.mit.edu/~rivest/publications.html> and search in page
for "RC5").

<plug> The SCAN site at <http://www.users.zetnet.co.uk/hopwood/crypto/scan/>
would have given you the answers to these questions. </plug>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPv2Z6DkCAxeYt5gVAQFhmAf+IWliOoIKNajPOoA39f89NjuYUTWHMXwn
aIHrlTY1czyJAKxEceh0RuEzhywFlizhmhJfF2grg8bFjxKBCo3mb8PBRDSZseoz
KXArrRlmhbnVPOVeHEzc6orB2ZUFKfoNffZmErPDZP11rZsbd9qNpoVKQzUDG260
l1+BgUD2fMOjO0xvZv3ufVPx6SKmpVJQS1rQyoDFi525Ov06y1IbjN1U/4KGGGlL
Yadx2PTPgDFx6Rp8hjEwn+ziQa9VphCQAxL91jeqFUqeaIAe8FSB7fq6Z3oOOMJg
9q+2ixySyBuPRjWl8bTmpSD/f71RAeX1rwzCOu46bR0bN8rIf2vr3Q==
=19Gr
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/MAeCuRu6FSA/m/R_s9n4wzHx0J", "n_sections": 2}, {"thread": "RMqzFtL-fiU", "msg": "IB3CkbonD5gJ", "author": "David Hopwood", "date_disp": "May 10, 2003, 7:21:30\u202fPM", "subject": "TEA Byte Order", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Germaine Dabbs wrote:
> Is there any convention regarding byte order and the "Tiny Encryption
> Algorithm" when this algorithm is used to encrypt a string of bytes?

It wasn't defined in the original paper, but most implementations
seem to be big-endian. Why do you want to use TEA, anyway? It is subject
to related key attacks and has had very little analysis. The variant
XTEA (a.k.a "tean") that was supposed to fix the related key attacks
was inadequately specified and so is not implemented consistently; it
has had even less analysis.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPrzFijkCAxeYt5gVAQHidwgAiOQL9BmLRN6jkQuWc1DgN/sa5uMs8f91
zoCFzlYGvNj6KUggPI6vbMPH/YEoDGYmo3C8bY9WL0HklQLSih5x+HPJwcIqVQl/
TQGcX0kpdW7sJGFdYeCQ+beOnbSNn6iatRu+PjonOSZDv32Coudc9Cuol7QfTosC
JoI+gSxYmKBgs29oCaaXv8YzXlAKJbq7LRX0uhno3GKleHfc4oeQxsuIv3ZU8xPe
eYc32IkI4kqP4o5WE0GlB+DSQQtpj2AGQLTbO4YpThRAEnwFupQqCcSNJeewws4F
XUsivZ+RgD+8yUSPqGW5poXg0y6qFsq+uOKajANCDGjlQ/hqyaX4bg==
=Dh1b
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/RMqzFtL-fiU/m/IB3CkbonD5gJ", "n_sections": 3}, {"thread": "RrEN87s44ws", "msg": "muYcLJjCVFsJ", "author": "David Hopwood", "date_disp": "Apr 1, 2003, 6:41:40\u202fPM", "subject": "Q: One-way functions", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Douglas A. Gwyn" wrote:
> Mok-Kong Shen wrote:

> > Perhaps one should continue to keep in mind what is
> > stated in HAC: '... non-existence [of one-way function]
> > would have devastating cryptographic consequences ...'.
>
> But that's nonsense. Suppose I told you, and you
> believed, that there exists somewhere a proof that
> OWFs cannot exist. What has changed, operationally?

I think this probably would have a significant (probably not
"devastating") effect on many people's confidence in computational
cryptosystems, even if there were no immediate prospect of the
proof being turned into a practical attack. That loss of confidence
would certainly have operational consequences.

> The same crypto systems would continue to be used.
> RSA would still be just as hard to crack, for example.

That would depend on the nature of the proof.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPoojnDkCAxeYt5gVAQHjjAgAn9QtL3sJdeCvonUztWIYPPjX4hKqC38F
7WIm35cMTh/sQP/Kqr6VAWHYzS/o988OZ1cbxl8pqTw6/6V7h9PonkBvKhstBQGT
oYV2M3DpELKUDsF7ZLIQMTXWFc7MPNkzcPPPxIhDgHFDoaOAdyo4hwWu9isl2xUW
K22Gm7HnREteGj6azr8tWqesLttOkGhm4hxO1DMVPYMTmbM6+Nhs+9vUsS9pdvro
bK/y4Mv41dr6NBz8a1LMdSdFmKVRJeEaR/Uo3I79Lc9oTHGtZePSBXX1y0bNhQGo
Dl4BTB1PY4BR9xk9xnM0GTw92/UArKSrtX7K7Y7CQ4FAgOG9B6oZCw==
=cvr9
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/RrEN87s44ws/m/muYcLJjCVFsJ", "n_sections": 39}, {"thread": "T5_F8Pl0IxQ", "msg": "hlOJEOPAk0MJ", "author": "David Hopwood", "date_disp": "Jun 24, 2003, 8:00:06\u202fAM", "subject": "Authenticated Encryption Modes", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

There is at least one easy attack against this mode, requiring a single
known plaintext. Don't propose any other modes until you've found it.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPvg8sDkCAxeYt5gVAQHe/wf9FU6HBfY8kG+uMkpa1YFm9XaWZG79gPVH
MjbghA8TV+yEJoSrNoXiLZVoD6duAGYo0Ri7gsj2jItwt4aZiIA0XsjT/Ras2F08
7bIzLe7J+IAcGpXmu7A0Ul1rAXQ8lUKAQPp0wWlNjTRIyH+f+N7mdy/YwwMJd9xw
OXBZipUkUactfAFVB+0F9+OHJI3wXOg44P4vmjGn109o9lNnKn5ZUCzvqO65rP2e
+477Rrxw5jxtCs7EynXshwPUN1hTCPiLEcTtperSpF54KBkMqobC2aDbM8MGZxlK
sncA19H3N1FpNOpXvQ4Mg1HoxPB5rZH66P6V00iFuejBLLa3aB1iPw==
=1jFe
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/T5_F8Pl0IxQ/m/hlOJEOPAk0MJ", "n_sections": 36}, {"thread": "a6MiqM9TV5Y", "msg": "p8chamvFiVQJ", "author": "David Hopwood", "date_disp": "Jun 23, 2003, 10:28:34\u202fAM", "subject": "Can we obtain securer data encryption if we encrypt the data once more?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

It is provably true if at least one of the ciphers is secure against chosen
plaintext or chosen ciphertext attacks, e.g. IND-{CPA,CCA,gCCA,CCA2}.

It is also not false that, provided the first cipher in the chain is an
actual independently keyed encryption algorithm, not chosen by an attacker,
in some mode that produces pseudo-random output (including stream ciphers
and any of the commonly used block modes), then even if it is very weak by
normal cryptographic standards, it's completely implausible that it would
actually set up the second cipher for a known/probable plaintext attack.

> Their article, "Cascade Ciphers: The
> importance of being first" that you can find at
> http://www.crypto.ethz.ch/pubs/MauMas93a contains a nice counter
> example.

A totally artificial counterexample that isn't relevant to cascades of
real-world ciphers.

> Also you forgot to require that the keys must be independent.

That had already been stated in a previous post:

# In fact it's plain to see that composing two encryption schemes /with
# indpendently chosen keys/ can't harm security.

Mark's later post failed to restate this, but he wasn't trying to provide
a completely formal proof.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPvcOSTkCAxeYt5gVAQHiqgf+NgRA/q6Tep5Gdyy5DngWiuEiObnTe+Ss
VsOTB/YSvvNyFeDH7dRKlO5hmJaP9YnTMn5V9bEAZxDgbgsYLOWpwRytXvigwgkT
0kyynFY0Qv3XS/CpgeZtGWY9U7hrJ/Hh6oEPnHrzsaFD9ElwPI5Ol2pKBfQQk7Pc
dnnvzM3FhfspSsM1JVpF5kjVsmycJbmy8yNlVBFy6C54RFHRrhrjEk7Q4jSKRkWO
DGBIYeKvCp93/ZIT/0aHbuJAjeFra4HqECEGTiskWYG6q0MHn+3wbV6VNjb7Wvpw
BlbevCfaGaWXUDNt8yYI+KvYDUbl+zubPQAW7Nnmfz0nkCUAm7z2NQ==
=64rM
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/a6MiqM9TV5Y/m/p8chamvFiVQJ", "n_sections": 24}, {"thread": "auZL1K-il4E", "msg": "NhqdDi5O7yYJ", "author": "David Hopwood", "date_disp": "May 17, 2003, 6:42:05\u202fPM", "subject": "I want a public-key system with smaller keys", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

It's also worth pointing out that, unlike some other standards, the last
draft available from that web page is technically identical to the final
standard, IEEE Std 1363-2000, with no significant corrections. It is
fine to implement based on the draft.

(You'll probably also want a copy of the most recent draft of P1363a,
also available from that site.)

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPsWObjkCAxeYt5gVAQHrGwf+MjUrj4IwzuODFcMv54Qvkd3NnImsEz2o
FcHgY3hS5Wglphzu2/peHpvs8pAKTx5KM255WLYOOLulojQtf13KBK4OUQ1jWNSB
KDIiA15NEA0+op/KyFAWFE8h7mWQW/yyFGo7wWniT58qnEj/WSYNyQjZM2tgBfn7
AxXqHrjdRErBOUJMfUSl+fQ1SddJVgpDgtEB9ZX6uuK2QNsshxoCTowl9XThSPLY
Dl8Y1qg6ipSpmfakzkhhlBPM+Inf1UDST38JFCxcgnpHf5DDvwm9sGzzq2ZK2A7L
FPm50X9LUmcvuXM9QJiwxtcL1dS7rT+CO66+kqLkD2uRJuYL17y19Q==
=lA4F
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/auZL1K-il4E/m/NhqdDi5O7yYJ", "n_sections": 18}, {"thread": "bR6RJrdnfYc", "msg": "sXQT5lMdYtsJ", "author": "David Hopwood", "date_disp": "Jun 20, 2003, 3:34:44\u202fPM", "subject": "integrity aware PCBC paper", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

unknown wrote:
> Does anyone know were I can find the paper entitled
> "Integrity-aware PCBC encryption schemes", V. Gligor, P. Donescu, 7th
> International Workshop, 1999.

The iaPCBC-related papers that were on Steve Bellovin's site have disappeared,
but I've temporarily put up the Internet Draft that described iaPCBC at
<http://www.users.zetnet.co.uk/hopwood/crypto/temp/draft-bellovin-iapcbc-00.txt>
(it's odd that it isn't in the IETF archive; maybe it was not an officially
published I-D).

If you also need a copy of the paper "Critical Weaknesses of iaPCBC", by
Ferguson, Whiting, Kelsey and Wagner, send me your real e-mail address.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPvNhADkCAxeYt5gVAQEEsQf/TtQF3qewczf1vzCsmMX4ijwUSBKV4tEt
Sp0IJBOofQuovgDkrtHqEW7DvTnlPXoEqWrRXJIdWwLAaM9uJUXsQ54iRn2gP5oa
aZMyvQwF+q/c/LUjSOqz56rZf4o7C6QpV3I8/F9s4IoNAMSpeKdZHlGRcLiOjvb8
UCeaiLPYWMUt1vj95rf8hyh+prNzUpLQbVX2GlVkaeroDwbkUXLdnkzWbDFl2re6
Vwvt6UtfsY6nXIqDEKIGcAlbZ8H9M18g89UtckbENEzTIVwIORKkBvoY72Uk6dSx
xajiVpQNHqvNw3mBU/FGQOnOskC0gm/oxqduQXkGCGMCFNssfqnssg==
=VbBZ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/bR6RJrdnfYc/m/sXQT5lMdYtsJ", "n_sections": 6}, {"thread": "fi-HmD8Yeqg", "msg": "QKZpYiro9KUJ", "author": "David Hopwood", "date_disp": "May 8, 2003, 12:30:25\u202fAM", "subject": "Bernstein factoring machine one year later", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

"Larry williams


> About this time last year, everyone was panicked that 1024-bit RSA keys
> were in danger of being easily factored.
>
> Eventually, guys like Schneier downplayed the risks,

Schneier doesn't know what he is talking about on this issue. His first
article about Bernstein's paper in Cryptogram clearly indicated that he
didn't understand the cost metric it used (in particular that simple
use of parallelism would not produce any improvement in that metric), and
his conclusions were based on that misunderstanding. If any of Schneier's
conclusions were right, they were right by coincidence.

> and everyone calmed down.
>
> So, approximatly one year later...is Bernsteins paper debunked, or is his


> proposal still merit some consideration?

Bernstein's paper never claimed that "1024-bit RSA keys were in danger of
being easily factored". The asymptotic estimates of the cost of breaking RSA
in that paper are correct, and have not been disputed.

There was some dispute about what the asymptotic cost of breaking RSA was
*before* Bernstein's paper - see <http://cr.yp.to/nfscircuit/history.html>.
(This is significant only in that it affects how much of an improvement
Bernstein's algorithm can be considered to be over the previous state of the
art; it is clear that it is the best algorithm, or collection of algorithms,
now.)

Basically, it was argued by Lenstra et al in <http://www.cryptosavvy.com/mesh.pdf>
that it was correct to measure cost on the basis of number of operations, because
*for small problem sizes*, say up to 512 bits, memory was not a limiting factor.
The problem with this argument is obvious: optimising only for operation count
doesn't scale to larger problem sizes (it's unlikely that it scales even to 1024
bits), and therefore it can't be considered a true asymptotic cost measure. The
*right* way to measure asymptotic cost is the way Bernstein does it, using the AT
(area*time) metric. Lenstra et al's argument against the AT metric is entirely
bogus (and not even self-consistent, since operation count suffers from the
same limitations that their paper criticises AT for).

In terms of practical rather than asymptotic costs, there have also been
considerable improvements, in particular for the matrix step on purpose-designed
hardware for ~1024 bit keys (see the appendix of Lenstra et al's paper, which is
derived from one of Bernstein's suggestions as described at
<http://cr.yp.to/nfscircuit/historyrouting.html>). This uses a physical
hardware arrangement involving chips that overlap, which could also be
useful for non-crypto applications requiring high bandwidth between processing
elements.

Before Bernstein's paper, a lot of people were saying that the NFS matrix step
was memory-limited. Now Lenstra et al are saying that the matrix step is not
memory-limited, and that for 1024 bit moduli the "bottleneck" is the sieving step.
However, as pointed out at <http://cr.yp.to/nfscircuit/balance.html>, if either
of the sieving or matrix step is significantly more costly than the other (for
any reasonable definition of cost), that just means that the trade-off between
the two steps needs to be recalculated, since the optimal choice of NFS parameters
always makes these two costs about the same. I have not seen any paper that does
this recalculation yet, but that is what Bernstein's grant proposal was for:

<http://cr.yp.to/nfscircuit/exactcost.html>
# The National Science Foundation has funded the grant for summer 2002, summer
# 2003, and summer 2004. Results will be announced on these web pages.

Meanwhile, IMHO 2048 or 3072 bit RSA keys are not unreasonable overkill, and
performance for keys of this length is unlikely to be a problem for most
applications. In particular, it would be a good idea to increase the size of
critical keys, such as CA root keys, to at least 2048 bits now (many are
still 1024 bits).

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPrmJujkCAxeYt5gVAQHm3Af9EclxEPx1b+WJg6dS4A0yALCVwqcxV3FP
oU+bNjKyilE0ouXkbYk+okA8dbjczuncb5piOBTOAi1CCY279MHyTnbMbiz5ZznS
Td67quaN9SrKzYcaMuVO9gZDvZ7XZJCgKwavLWSwcjPYIw4Yb1eMcx/Z+sRnRu2n
q/kQK0Ch2AS+ppJ6CosTW34mV5iKbO3JNOSmTqc2XC2nDV60aHI9U2f+/BMLrg1F
bRnSXgd2vbbHlKplfVwnBZaUGwoxXvb1hnn1cqTgwiQAzDu2VTs9zG3VpJ3dBaRU
ecZsEZW1DGtQwmu8K8Sj8bGcOfWyAtAd+3yUQ8Gi7OAe+tukS8j7qQ==
=kAo8
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/fi-HmD8Yeqg/m/QKZpYiro9KUJ", "n_sections": 10}, {"thread": "hakeSoU5I78", "msg": "AqDvHFaFh1gJ", "author": "David Hopwood", "date_disp": "Jun 9, 2003, 12:31:07\u202fAM", "subject": "Avoiding C++ Templates In Cipher Implementation", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Brian Gladman wrote:


> "Russ Lyttle" <lyt...@earthlink.net> wrote:
> [snip]
> > Code I write often must meet some combination of the following 3
> > requirements. : (1) It must be easy to maintain; (2) It must be proven
> > correct; or (3) it must be secure. Pick two.
> > (1) requires readable source and easily debugged execuitables. That means
> > any one can reverse engineer the object code. Thus less (3).
> > Templates make it difficult to meet requirement (2) even though they help
> > lots for meeting (1).
> > The crypto I do has (3) more important than (2) and often does not have to
> > meet (1) at all. The crypto algorithm must be correct.
>
> So you are happy to have incorrect code as long as it is secure?
>
> I personally doubt that (3) is achievable in the absense of (2) since
> assurance of security to a certain standard of proof will require proof of
> correctness to at least the same standard.

Correctness implies security (why would anyone consider an insecure system
to be correct?), but security does not imply correctness. For example, suppose
we have a system that should always produce a result, such that we can easily
demonstrate that it *either* produces a correct result or reports failure.
However, demonstrating that there is no input for which it can fail may be
very difficult. Provided that failure is reported in a secure way, and provided
that an attacker cannot influence whether the system fails, there is no reason
why we should not consider it to be secure.

I agree completely with Ernst Lippe's conclusion, though:

# I am absolutely convinced that readable source code is
# essential for all three requirements. If it is unreadable
# it is unmaintainable. If it is unreadable, how are you going
# to prove that it is correct? If you can't prove that it
# is correct why should you believe that it is secure?

More directly, if it is unreadable then it is unlikely we can demonstrate
to any useful degree of confidence that it is secure, regardless of whether
or not it is correct. ("Proof" is rarely possible and rarely required.)

> > Crypto devices should have lots of anti-tampering mechanisms. This is only
> > one.
>
> This might be a requirement but it will not always be necessary.

Agreed.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPuQNgjkCAxeYt5gVAQFFHQf7B980JY0e1rlTglF7Gzi7dePdHJWZ099x
y9KjS9EJ10WtZQRhlV0zMdljLQ/iN2+snZNk55vAmdjngct1HdQaACJgzlSJCtV1
UV499gQFq4+uzxh8o9u4qvmUl/m50qxKvSnTjWRiaIWh6Up2T4PPKSG8/lLIgKTu
O1dEFb9U0SSt7/IMcEJWbFdTyuKjl5iF3EFF+0wjBjaqc3hx5xU82SEVORzmTFs9
FcL/b0N9/qAogdP1YSkLQ0mW1LaaL78R/h3EILs9qwnD9/+/m3TS7lp8yESHC1z7
FO9jaJrLnTz1JiEe2/2ppbWBNVnBofIJLOJukz/T5ONinMgp6n1UNA==
=mLRm
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/hakeSoU5I78/m/AqDvHFaFh1gJ", "n_sections": 100}, {"thread": "oQrpjmI3TlM", "msg": "oUx_4ThM7F4J", "author": "David Hopwood", "date_disp": "Apr 4, 2003, 8:23:06\u202fPM", "subject": "Q: How to determine the input to ciphers", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mok-Kong Shen wrote:
> Bryan Olson wrote:
> > Mok-Kong Shen wrote:
> > > This effectively means that the blocks are being
> > > encrypted by a number of (slightly) different ciphers.
> >
> > How naive would one have to be to think that's a good thing?
> > Note that we're talking about slightly different ciphers with
> > the *same* key.
>
> Right, the same user-given key and the same set of
> round keys but ordered in a different way (permuted),
> i.e. the i-th round key in the original would be
> the j-th. Since it can be reasonably assumed that
> the round keys are equally good, a permutation shouldn't
> deteriorate the cipher. (Otherwise some of the round
> keys could have been improved.)

It's unlikely that we'll ever get Mok-Kong to pay attention, but for the
benefit of anyone who didn't follow the previous thread cited by Bryan, this
reasoning is clearly fallacious: it would apply if the cipher is used only
with the modified round keys, but not when it is used both with the original
and modified keys. Practical attacks against this construction were given
(and explained in some detail) in the previous thread.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPo4v1zkCAxeYt5gVAQF76Qf6A+6xO9J0H0OXdT4NBbvtGdqFG0nQhLtq
yOR06mCgibQ7LeylTFCaOv6y1TD2mDT5jd+daftu1EbikXZBeRdSAVVO7c4UTAWm
OcKV642laA4UuB23Qhic95xxCOTSje4OkkdWPCJHKvBAhcByism/Rq31U+tzwPCj
74JuRkd/ZHxkVDuUVq2HuyKM+UvAmRdUD4qoyuE7PaWT7kCHd547gD5zDgR0wuvR
pYl106KG8FBj9bdFl19wTYypl71toOCupzks0nALCoHUqerXVVmwFKmv2+enmcLw
rMIE9O5OJ9iQ5ll8t6ObpSzk0fhgqZDimpROyuSZ5wLzL4deF4bC1w==
=mEMh
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/oQrpjmI3TlM/m/oUx_4ThM7F4J", "n_sections": 10}, {"thread": "tui1t5PzMlo", "msg": "h_vN0ggZlh8J", "author": "David Hopwood", "date_disp": "Apr 1, 2003, 3:21:36\u202fPM", "subject": "SETI project detects first extraterrestial message.", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Ernest Hammingweight wrote:
> DrPostman <Lo...@mysig.foremail> wrote in message
> > Damned inaccurate dumbass aliens. Today is still March 31st!
> Oops.
>
> In my previous post I wrote some crud about stars harbouring life. I
> meant with a planetary system. I know that most planets known outside
> the solar system are pretty inhospitable/Jupiter-sized and relatively
> close to the stars they orbit.

It's quite possible that some of those Jupiter-sized planets could have
moons that are relatively hospitable.

> I'd still be interested to know whether we know the distances to

> typical stars with better than 1% precision (i.e. less than one light
> day).

According to <http://www.alphacentauri.org/centauri.html>, the distance
to the stars in the Alpha Centauri system is known to "within 0.2 percent".
If this is correct it would correspond to +/- just over 3 light days
(I think your maths is a little out; 1% would be +/- 16 light days in this
best case, and more for all other stars).

OTOH, that page gives 4.34 l.y. for Alpha Centauri A and B, while the
most often quoted figure (from the Hipparcus catalogue) is 4.36 l.y., which
is different by 0.5%.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPon0ojkCAxeYt5gVAQE6KggAh0YUkMPzZP/34pVf83iod2zQjXMOOkhX
D39KRMwwOjCfLvPFMxujsrHeTgODnHLcI2oxBcb89odchgZFhV3h43iPcDkH3EOo
aaK1gAOWn/52M6gnncT6AokKrdPozHF4l7/E1E63FzR31kbJ98Um6IZ6uNLGYnOE
fLGgMeiOgUg0yRBmIQ5IobK2V7wkHtXAaJwL3l9fIdGO7CNABq7isxY7wri9t/Ej
BZj1cy4UXxw3AqWKM8EvYva3K4qmQ3Y2fl5HKZM46KAQrBd1I/zx5RoFY7ZDPu+3
fqKb6m1CDAYUMwF+eRqJzDz35yBmAuu+787D71zks96BO93jKiJVdQ==
=7tRA
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/tui1t5PzMlo/m/h_vN0ggZlh8J", "n_sections": 13}, {"thread": "z2RUxo38GFY", "msg": "G9r4pu9c9QQJ", "author": "David Hopwood", "date_disp": "May 19, 2003, 12:40:04\u202fPM", "subject": "Symbol help needed...", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Kim Hyldgaard wrote:
> Kingpin is right, it's the greek letter delta above the equal sign.

This is really pedantic, but: it's not a greek Delta, it's a triangle.
I don't know why a triangle is used, but it has nothing to do with the
use of delta to mean "change".

> 'Defined as' makes sense in the context, so I'll settle with that
> explanation.

Yes, that's the correct explanation.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPshNGDkCAxeYt5gVAQGUywf+KMBeNAuCqbFzjAcwvPUSwZwmBHq758cz
c2N5nMSb+Cg4V8y2I9XvsfBCx9FqvtbsvFq9axunuOBjP22HYbzWBZ8wGlYGZRRz
DcfIX/c9h8J9/x7YlYntuYWvNc9veE7BW9K4pR69vDWJDRtuLZ7sW0vTtuLm1m5F
DGYOnO0BzaLMG3AkICi9ScDjU8UDlq2M5FV2gy13nP8YMi9yUGhV/HAGf2uknfk1
3K7BAkLPokZDtYB7qb7xcHVUIu7q1FAljxZ0U33Mgfoa2h1u4gv5VYb8ATyaleOI
Z1mBRYoWJHgJFNp/UIhJpKEHTRbLEp+4xHn1kOwq3MOj+lhJ2WZSpw==
=f9qm
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/z2RUxo38GFY/m/G9r4pu9c9QQJ", "n_sections": 8}, {"thread": "-k8WZvFmxl0", "msg": "LjtnBoGT9ZQJ", "author": "David Hopwood", "date_disp": "Jul 5, 2003, 11:28:45\u202fAM", "subject": "A password problem", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

RR wrote:
> 2. All web servers on the computer run as user "nobody".

There's your problem. They should all run as separate users (or at the
very least, the web server that needs to read the secrets file should run
as a separate user). Otherwise you're hosed.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPwZBcjkCAxeYt5gVAQEEmwf+Px1buPwXrg9fA/nl3s3yojL5AEB0C8U9
g8K9fA7+1w5bFT+rwl+ki7NnDTdklpfs8vR6ulWqw7a0MHZ68IGwPNKRgJ7YjpyG
9a0rO9uFvaSYGy+IVssJLEFYE4QOHMXzB575mh1Zz9uU/ZUiKVYLRO7GAHhwY4gK
8WOG4bAUsDYWhofOc7JX333k/6et61qdEPokIJsicBoEImfFM2tJeCE23EO+bAoj
JcsdDdRots70iNv1gCu2R4U7XWoUHNJ7aaw7zX02gaDb4Poi9vztTEGzyXKcwAjJ
CzH26H2xLIjJC2m1NY0sFC0xGo0OUU5hnIUYaSJ3FNmuQ+pTCFWgeA==
=/8lH
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/-k8WZvFmxl0/m/LjtnBoGT9ZQJ", "n_sections": 23}, {"thread": "7SkpZHxofXs", "msg": "_c8gVheEtEoJ", "author": "David Hopwood", "date_disp": "Jul 13, 2003, 4:55:30\u202fPM", "subject": "WANTED: trapdoor one-way function", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Ezhiha wrote:


> Tom St Denis wrote:
> > You question is also worded strictly as somewhat grasping at straws.
>
> I agree. I read the question again. I doesn't seem polite one.

Don't mind Tom. He's so eager to shoot down silly questions (of which
there are many asked in this group), that he didn't recognise that your
question is not in that category, and has at least one sensible answer -
see my other reply.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPxHHKzkCAxeYt5gVAQGrAQf/c3MPkRL33BYs82+KkpBer9fGGfFbhSbH
p924rUgATkYsm3yseAaTanTbESK0IGH1/XM1djBvaTMZE8z7i4Pt296O6GB4wQU/
SOtyN4tShQljJGkP6hECklXoWmVFElP4vh90BRlctv7V08fun8xJLdnfNII64tCy
TfjWruSJHAIG/XdjX8zaAYk9X8FzA3WRgjP2nQpbVNPsX65C5k4jQbxlQOOovgyX
nmie8B5VI70ZXjOlraN0Fu3B0bbOaH92uqwfo7p25nG8UUe7tjP65hDpvemNmnGk
vHpSxU3ue5982bQpqUbbDs2/oruA+DrLnSwr9hXB2D07I9rcYGM2SQ==
=6NgQ
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/7SkpZHxofXs/m/_c8gVheEtEoJ", "n_sections": 13}, {"thread": "7SkpZHxofXs", "msg": "7Yd9YbLt45UJ", "author": "David Hopwood", "date_disp": "Jul 13, 2003, 4:45:44\u202fPM", "subject": "WANTED: trapdoor one-way function", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Ezhiha wrote:
> I'm looking for a candidate for trapdoor one-way function that satisfy:
>
> 1) security isn't based on the factoring (i.e., RSA, Rabin, ElGamal aren't
> suitable)

The security of ElGamal isn't based on factoring. Actually ElGamal isn't
secure in the sense of semantic security, but the class of schemes it belongs
to is based on the Diffie-Hellman problem, roughly speaking.

> 2) the function is one-to-one

f : [1,r] -> Z*_p where f(x) = g^x mod p, and r is the order of g in Z*_p,
is a one-to-one trapdoor function. It is bijective if g is a generator of
Z*_p.

> 3) for all trapdoor keys the outputs of the function form the same set,
> i.e., for any k1,k2
> {f_k1(x)}_{x \\in X} = {f_k2(x)}_{x \\in X}, where X is the set of all
> inputs.

A trapdoor function has only one input. However, the family of trapdoor
functions defined by f_k(x) = g^kx satisfies this condition, if g is a
generator of Z*_p and X = [1,p] (or [0,p-1]).

Also, it's secure to use the same parameters (p and g) for multiple users,
which is a condition you didn't state but may need.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPxHE3DkCAxeYt5gVAQHD2gf/TZKcEhvr9QbSJpKyZ4MiYO8CtAiwoH5V
pElu1jwPxD0Zea3DoK/IWueXYhefSFPtFrvhJnhqeJhfi3pExYRj9TA63ZmZrML3
eJW7JTk+4efYovYIGtIc80+39+90h3dz0sdSb/a7Dr9xlI117mNM22Ncd2X2exFP
VHRXMpXXzxMvOYhU6Cip2p/SKUwq6ZlVeFgfsYUrS1CxNRQVzFpz9fL8RLEs/6WM
2eZcqDTNgu6r6Ug6nn6hA9D8HJqBiOLCYKvzq80bc5mgxPUua1OYm5A5EVhNu5lD
Qqj6IDcyPHW1FnonppQhtbQebOY2O2sgJ5WUSu2FxNRAhihB8C9sXg==
=fuPO
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/7SkpZHxofXs/m/7Yd9YbLt45UJ", "n_sections": 13}, {"thread": "7SkpZHxofXs", "msg": "7BIZe7-q0lsJ", "author": "David Hopwood", "date_disp": "Jul 13, 2003, 8:38:31\u202fPM", "subject": "WANTED: trapdoor one-way function", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

David Hopwood wrote:


> Ezhiha wrote:
> > 2) the function is one-to-one
>
> f : [1,r] -> Z*_p where f(x) = g^x mod p, and r is the order of g in Z*_p,
> is a one-to-one trapdoor function.

Sorry, this is not a trapdoor one-way function, it's only a one-way function.
That's the second silly mistake I've made recently; I should check my posts
more carefully.

I think that a *trapdoor* one-way function that satisfies all of your criteria
can be constructed from a pairing, such as the Weil or Tate pairings. For
background on pairings see the paper below on the IBE cryptosystem, where the
trapdoor information is used as the master key.


[BF01] Dan Boneh, Matthew Franklin,
"Identity-Based Encryption from the Weil Pairing,"
<http://crypto.stanford.edu/~dabo/abstracts/ibe.html>

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPxHY4zkCAxeYt5gVAQFacwgAr2QK0WFd8QH+kP1aoNW33BkG0uzcPi5U
2VyTNyVhqtPNYP/ZSRQ8E2suYFVNzzb16M4pyvRhgCNSlpzkb+qddeHUrfWDol3C
4g9cNojoL+PoFu/ma+104ryprONbp1hrCyvAlvDnzFGmsrAHeaR3MYa2iV4eG1BH
nM8QCq2//yeLd4Znc/ntehSOWNKtANScEXUP0pU2raYh0GdB8LYD8WtjCIHTZX1J
PQl4fSgEE53eMZgV3/ZZwJnDvs73eAhU2LY1H7Di8mm2EKcAwCLHNMmlBhfcbVYA
5HAfwcAdwIaArxg2uGAdXQWww/HUNYcJp3qDjWMGX27hvMOrHDdFtw==
=2VOX
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/7SkpZHxofXs/m/7BIZe7-q0lsJ", "n_sections": 13}, {"thread": "GoEGPJ4rAck", "msg": "82xYeL6vFvIJ", "author": "David Hopwood", "date_disp": "Jul 13, 2003, 4:23:45\u202fPM", "subject": "Xbox hacks", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Roger Schlafly wrote:
[...]


> Now people have figured out a scheme that does not modify any
> hardware. The Xbox only loads games that Msft signs. They wanted
> Msft to sign a Linux kernel, but Msft refused. Now they have a hack
> that involves saving a game's state to disk, modifying the (signed)
> game state, forcing a buffer overflow when reloading the game,
> changing the last 4 bytes of Msft's RSA key so that it is easily
> factorable, and using that private key to sign a Linux image.

The wider relevance of this is that exactly the same kind of attack
will apply to "T"CPA and NG"S"CB, with signed device drivers in place
of signed games.

It's always been obvious that signed code approaches have this kind of
vulnerability (and it has been demonstrated before for ActiveX code
signing). However, maybe another concrete demonstration will help in
convincing people that "T"CPA and NG"S"CB can't improve PC security -
i.e. it is not a matter of "balancing" their potential anti-competitive
effects against a security improvement, because there will be no actual
security improvement.


DJohn37050 wrote:
> See what an invalid public key can do to you?

Public key validation would provide no protection against this class of
attack. Modifying the public key was only the most convenient way of
exploiting a buffer overflow, and it would not have been significantly
more difficult to change the whole modulus to another valid one with
known factors, for example.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPxG/iTkCAxeYt5gVAQG3awgAu36Th+/rHW5js1u9L+TxFubayyx0NNje
4yFDU/9J2Ns2Vi/sD2sFHYpiE0ZlUMa/lKp7dZyPFW5rsKvuYZSpxFC6QhmPMFZQ
ecIPqK9PNerW60rgsP7YBip5VEEnMzG1Bj2c8UeoyA39uIw/mviLCLmginU/F7BS
TcoxtF/m1F/QfDDTfmuE869xTsErVkdbv1gtYfMCLb4XmDExwq9FEYkat3/b/2aB
GGDFNau/vkteUfDjmNY3NSDl2Tm7s7ywZ/chypG00O4btkmNPfoNQGib1pZ6Zhmv
wJstvrPqPffHVxmG39hhpbFyXi9PvCtHvBKf6dDk0O/3dPknw790JQ==
=OJ9a
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/GoEGPJ4rAck/m/82xYeL6vFvIJ", "n_sections": 69}, {"thread": "KojE_xngT4k", "msg": "95gGLoN1kIYJ", "author": "David Hopwood", "date_disp": "Jul 11, 2003, 8:04:06\u202fAM", "subject": "A basic cryptanalysis question", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

DSCOTT wrote:
[huge snip]


> An example of such a system using
> modern AES as basis with bijective matching transforms is BICOM
> http://www3.sympatico.ca/mt0000/bicom/bicom.html
> it was done by a friend of mine. It does a PPM compress on file
> then does full block CBC AES encryption and transforms back to
> the set of all files. Any file is either an input or output and
> any key works. The example I like to use is take a one byte
> output file say "0x00" try decrypting it with a thousand different
> keys. You will get a thousand different input files each of which
> when encrypted with key used for decryption come back to that
> same single byte. Many here are not bright enough to understand
> the concept and falsely assume that there can only be 256 files
> on decryption.

This is completely irrelevant to the security of BICOM, because the
probability of a 1-byte ciphertext being produced as the BICOM
encryption of an uncontrived plaintext is negligable.

> The funny thing is the most vocally critic are so pompus they will
> not get off there fat asses to even test this simple fact.

We don't need to do the experiment to understand why the result (which
indeed should be as you describe) is not important.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPw4NpzkCAxeYt5gVAQFAhwgAlYX0MkbXjVteL1oeHrKeoqRC4sPs5wFP
vJRGuoGg6ND7W6B2TS15hmZAlA/wbUH1fwpJhLpCeQfqzRWWDoO+NdZ+rIgKl+JM
vOC2boNPGJnl1bjTKDnfNr1Syh/jSqJuxdcFHdlbNKZpk5EDMMOvQApCZnNaIM6P
gDufLO1Yrba5gzXYQANshWUsXQ1qeRVnlO72iN5hxr9nt7P08JYSEzv4OkbIDb2J
2lZPACkj7e4SM8QkFEqMlqGGanP2+3/Re0EtdB/MBexJYPRS4KfyTjBJNqhT4Zpo
bll/7jG1F7f7dtvWu8DZsjJKS5KGIPU95dpQxGG4FySPuS+SliCwhA==
=SNmp
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/KojE_xngT4k/m/95gGLoN1kIYJ", "n_sections": 82}, {"thread": "WNJXU-D1z8A", "msg": "Xg8tuKGro24J", "author": "David Hopwood", "date_disp": "Jul 6, 2003, 8:14:43\u202fPM", "subject": "Performance tests of some AES implementations in C", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Phil Carmody wrote:
> On Fri, 04 Jul 2003 20:22:40 +0100, Michael Scott wrote:
> > OK, do you guys just want to brag, or would you like to get involved in some
> > serious research?
> >
> > Eric Filiol claims to have found a serious weakness in the AES.
> >
> > http://www-rocq.inria.fr/codes/Eric.Filiol/PDRC.html
> >
> > He has come up with two equations which basically show a relationship
> ^
> he claims
> > between certain key bits and certain ciphertext bits.
>
> If you search sci.crypt archives from earlier this year (was it last year),
> you should see that several people here refuted such claims, and that the
> issue was one of his poor PRNG.

It was never demonstrated that there was anything wrong with the PRNG. Rather,
it was shown that the "bias" in the results was no more surprising than would
be expected by chance. Since the method or program used to find the supposed
bias was not made public, that was all the analysis that could be done at that
point.

Eric Filiol has since generated a new set of results, available from the above
web page (still without publishing the program or the method used to find the
supposed bias). I'd be inclined to give these one more chance before
considering the claims refuted.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPwi7XzkCAxeYt5gVAQESCwgAxuxEE1eVAMWN2EpqWVip0SbABq9LlCm5
3gvYP77LzsYC4lZIGhNO0fsq9PSJYp4yYJsnYNJnaOTXr4FLEsnZzUuCD/QWccCr
RrJ+HTl1sfjMVGa1adaAv+Ij6NrScu0hUV8MldoRN9ohRBzjsdivgq9umhZr5iFB
dBNNe9RemlXVeejODfXtZz3jk49sPr5jb3jfjPpmcEh0q0UeHUmfcdlu5AEr450Y
XLft01Y7dfN7NV9Ow7ZQq4xGNYIizy7QnTqlWxGLzD0rwMvLQXHJJTboFxh0B8f3
mDTrMj0PyqOK/33H8VlvqTRZ4kF/qshtL+4qV2agJ1qG7ndc4YiH3Q==
=4/Dg
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/WNJXU-D1z8A/m/Xg8tuKGro24J", "n_sections": 46}, {"thread": "WNJXU-D1z8A", "msg": "7VBP0Zzs_fEJ", "author": "David Hopwood", "date_disp": "Jul 8, 2003, 2:03:16\u202fAM", "subject": "Eric Filiol's AES claims", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

If you mean sstic03.pdf, there is no useful information there about how to find
the linear approximations; the cryptanalysis algorithm simply takes them as an
input, and the *only* information given about how they were found is that a
software package named "Vauban" was used. (Presumably, named after the
engineer to Louis XIV, Marshal Vauban, not that that's very helpful :-)

OTOH the page does say:

# The theoretical model of PDRC cryptanalysis has been accepted for presentation
# at the Workshop in Coding, Cryptography and Combinatorics 2003. The extended
# version is to be published.

When that is published, there will be something concrete to discuss.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPwpefTkCAxeYt5gVAQFvIgf8CJAtHFxMP2UWb7MTiu6RiTa16pt8mUQW
0C80Jlr4UfQ+MNkvxIW5vhLOLR/aJWVz2rs3l2flp9erb2UpqAkErlbRfaTySiR4
EesV4AOXR3oaoyxHFQ5EmQn6Xy/z9n0+b/u7uuf3kbO+ltOSw01rlUVgm1NByGHY
0DfSP78KIoWpZWS0uAWefWLMLbDQ4QWGcY3nFfWBhBt23CzBgXgksckh+Wsdwp37
25LJNAhE6PCGP+nFjVVc0rdEOKNR//vyylYzVBQTwTENzlKm2xuxo0092smepKIA
f+crNXKKDzJnZceAM/cpN2T/qyXuOY5017675qT+XOdf7MAUQjy+OA==
=1CGo
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/WNJXU-D1z8A/m/7VBP0Zzs_fEJ", "n_sections": 46}, {"thread": "XeJCJ51vCJg", "msg": "LxA-BSEnH1wJ", "author": "David Hopwood", "date_disp": "Sep 2, 2003, 11:49:56\u202fPM", "subject": "Presenting complete cert chain from IIS", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

It is common for SSL servers to omit the CA's root cert, on the grounds
that the client must already have the CA's key in order to verify the
chain. It sounds as though the chain is only two certs long in your case,
and so you are only getting the leaf cert. The SSL spec explicitly allows
servers to do this, so there is not necessarily any way to configure IIS
not to do it (I don't have any direct experience of IIS configuration,
though).

See RFC 2246 section 7.4.2 (this is the TLS specification, but the same
applies to SSL).

BTW, use a more secure server, like Apache. IIS has had more security
bugs than you can shake a stick at, and almost certainly it has many
more undiscovered bugs.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBP1U+GDkCAxeYt5gVAQHnIAgAlpgcGlAXTUeRC0TYIts4PxdvVTni4tUR
mcMutYfKnWzqynEAxHM22RQneyvOrhP0q8ppzK6TpxWZuMcxPyNUzW772adR+9M5
/mZx6KYf4LikH8A4pXpC618b+UbFciPix6J65RDE9V5Xq5rgY99iJ9/89mTMZIT5
qh5yXUYAen/Y8q0OMl7EbMyj1B/fvwYIsopFhmAFfL3pbpKMoe+DcdkZMwNnKnwK
HuCjh3V5+bH3wGKohuavli1uhPG464vLLTEyh4qH5f6XNe1B6vOsuDxn/Hej5Cxk
M2/9DLH56AisvcU4oGpbSVi1JwyO7rFd+1fa/MTUrLt9QCHHyoh9QQ==
=vdp4
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/XeJCJ51vCJg/m/LxA-BSEnH1wJ", "n_sections": 2}, {"thread": "eLnfmsfx9HU", "msg": "NDH4QFad2tAJ", "author": "David Hopwood", "date_disp": "Aug 20, 2003, 4:21:30\u202fPM", "subject": "Magic Flight: latest version of a public-key algorithm using max-plus algebra", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jim Steuert wrote:
> I have worked on the minmax.c question for quite a while, and I really
> can't see a similar break at all. In fact, it seems to be a constraint
> logic problem.

Constraint logic programming is a general approach to solving a very wide
range of problems of various complexities. Frankly, using a constraint solver
to break your last three schemes would be like using a sledgehammer to crack
a nut. It would work, though.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBP0O/sjkCAxeYt5gVAQFxGQf8DGfFIXSBY5JyFVqaSWRa8CdkIiL05JSV
upYmnETmb/3DztvQg7oFnqYuRS0s6xe7TPJTKQVPzJQZELK0/Vlva81zHwJ6sVDj
jbTBQfX7JGBEWwYSS68gFXjzRdyVkIWo+28FCegOfwGShHawbIi5HebO9X/m93os
ZKed/+vxDL9zNOEzMBiC2NDcJV7v/kxP8IO2XDNai5PDs0qXeaG2qQUScH1O88Wm
Y6WE99GV03PORdyraGrAkZkG10p1wLUdHSMRVje9T3xEYKMpnLdRlyD8EJX73U2f
3WKqQZ6nQaKou2O4IVfrSMiW0h6s6+DByVF+tVtOo1qP2MEDrj6QEw==
=1Hrk
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/eLnfmsfx9HU/m/NDH4QFad2tAJ", "n_sections": 57}, {"thread": "gidUeOx-AH4", "msg": "M0J1KYHCxWEJ", "author": "David Hopwood", "date_disp": "Jul 12, 2003, 9:59:54\u202fPM", "subject": "Magic Flight: A New Public Key Algorithm stronger? than factoring", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Jim Steuert wrote:
> Hello Francois,
>
> Thanks for your careful cryptanalysis.
> You have brought up some important points which
> apply to the choice of underlying ring operations,
> if such a commutative mixer is to be non-invertable.
>
> However, as I pointed out before, it is not true that
> Gaussian Elimination can be applied to commutative rings
> **in general**.

Indeed; for example, it cannot be applied to the ring Z_n where n
is the product of secret primes p and q. But that ring is closely
associated with an existing public key system, and so using it with
Magic Flight would give a system with no advantages over, in this case,
RSA (even if it doesn't introduce any weaknesses relative to RSA, which
I haven't checked). The same applies to all the other examples I know
of. Without giving such a ring explicitly *and* showing that using it
with Magic Flight has advantages over existing PK systems, you've
discovered nothing useful.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPxC87TkCAxeYt5gVAQHzBggAwvBlcbPhUTmLZCbFReW+YII4OBy/lWJb
cse35uENLf8I8B0KvJXhtTvdCwJ5F1ldgtbDwjZJZ+Hy/xMhnCME6nv6SBylZ8qJ
2WNkPDOoCM1ZSxP19ens4ZpxyftSWClgk13BD48v38DQ2Y2iop7GsaPLnwlLiGSH
T8BBXh2bt1EgZK7f0ftTtWQzcXsp/4cjdg+HF/1BSQQG6gGekYLJ9hJwI6U8vHAL
mlf3Xg5MEA3X/3Ypk/RQrajdSBIn2VH4JdUPqDBpR5HulSucc2xc9Zdp0GmCUmvn
Bu2aRpG36h3buhrye/JCyiXokPwJ53gZ/3yBYV16jgtlFOK3WOoJkQ==
=6kSS
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/gidUeOx-AH4/m/M0J1KYHCxWEJ", "n_sections": 63}, {"thread": "gidUeOx-AH4", "msg": "jmfmoTfH-OoJ", "author": "David Hopwood", "date_disp": "Jul 13, 2003, 2:29:34\u202fPM", "subject": "Magic Flight: A New Public Key Algorithm stronger? than factoring", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Bryan Olson wrote:
> The generally reliable David Hopwood wrote:
> > Jim Steuert wrote:
> >>However, as I pointed out before, it is not true that
> >>Gaussian Elimination can be applied to commutative rings
> >>**in general**.
> >
> > Indeed; for example, it cannot be applied to the ring Z_n where n
> > is the product of secret primes p and q.
>
> Hmmm ... why not? Finding inverses is easy when they exist, and

> finding a [non-zero] element without an inverse promptly reveals


> p and q. What prevents one from applying Gaussian elimination?

You're right, I was mistaken.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPxGk9TkCAxeYt5gVAQGjewf/UtUsolAt6Lwdf0mhfCPGFRkqy+sBzyJb
HBN5iyJ4tXJL5ZgZ7Gn2ODI4XzRd6ZzXkruCN4o03cxw5qL6168/0yUYGuqgaeEm
KPLK1sF1bLwYDejFmizNII0xk23WK0p3Zrsp0XSewgmkA46xtHukgIpv+/bTVAY7
ypDYThc/5EJY6cj8+8gAj08XPM2K0DXTV9V8Zp0aUzkzDMhEe1VzjmIQ0XfdCPHe
dEDz9hlD+QntpLQMSgLQ0QTYj4EGqTkXj1QlVxAhX38L8Rg15bg8WFdns/1s+IUc
vOFsuwjvyeJxxjACIzeQ5tl4KElB3Zf14Y3JrOp7/PZY1C4E0zDpqA==
=skNu
-----END PGP SIGNATURE-----


", "url": "https://groups.google.com/g/sci.crypt/c/gidUeOx-AH4/m/jmfmoTfH-OoJ", "n_sections": 63}, {"thread": "rw9WVzuDJp4", "msg": "b7v2wzdnH8cJ", "author": "David Hopwood", "date_disp": "Jul 8, 2003, 2:34:28\u202fAM", "subject": "[OT] Re: Patent valid, Shamir secret sharing?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

C Rode wrote:
> > > Making the development public is a claim of ownership...In other words
> > > the development is logically associated with the developer who brings it
> > > forward.
> >
> > OK, you're very vague with this "claim of ownership" phrase. Are you
> > saying that I can't steal precisely your implementation? If so, then
> > you'd be right, but that would be a copyright issue, not a patent
> > issue. So if Shamir published code for secret sharing, I couldn't
> > take his code and do whatever I wanted to with it (unless he allowed
> > for that, of course). On the other hand, I could reimplement the
> > ideas behind the invention (the secret sharing scheme) in my own
> > independently developed code, and I could sell it or do whatever I
> > wanted, as long as Shamir hadn't filed for a patent on that
> > technique. There is *no* ownership of the invention (the technique)
> > unless a patent is applied for.
>
> I'm saying that if you know that a development is associated with a
> developer then unauthorized use would be stealing.

Why? What makes you think that there is any moral obligation not to implement
an idea because it was invented by one or more people other than yourself?
The assertion that this is "stealing" depends on a metaphorical extension of
the concept of stealable property that is dubious at best. I don't accept
that metaphor, so please express your argument in terms of actual costs and
benefits to society and to the people involved, not in terms of metaphorical
ones.

[...]


> What is happening here is that patent office requirements for patent
> registration is being equated to validity of the claim. That's just not
> true. The patent application could be perfect but the claim could be bogus
> or the patent application could be flawed but with the claim
> legitimate...

In practice, provided the applicant jumps through the relevant procedural
hoops, whether or not a claim is bogus seems not to be a consideration for
patent offices.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBPwploDkCAxeYt5gVAQEMagf9Gj0XoYJBrKYR0AXB1Q9iE5ixSvr2YWQi
OsKYGPnXmiCBE0DJlcw33OD1zJ6+Fx3dE/y3rxf3q+LULJe3eSM3+1id5GHUK5hO
iVg+eSo2VqdaMSG5Xv0POM6yk0PPc6JtCwmXlTv+kCTIHpY5YUc7OnfOJ/0HA2Lh
vFKri7BAD7pnuftMN7PComqk6GEtiJq19YhzbVPAU6niFXRa7IV0CZmU7HLPSSgk
vz7gUWtRS9cce3Gr9XSvF1N5AaIHMIQY5up79UX1GXg9Goh8SlOunBj/0ZetzKpl
SsTCvQuUQKIApoXfs6qUH/xFA1BkTDiC/omI7frzKn1pjcVvjeD31Q==
=lyHU
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/rw9WVzuDJp4/m/b7v2wzdnH8cJ", "n_sections": 40}, {"thread": "wy58kUa5J1E", "msg": "-x3_V5eIAGQJ", "author": "David Hopwood", "date_disp": "Sep 20, 2003, 10:05:33\u202fAM", "subject": "Has anyone really cracked anything recently?", "body_html": "-----BEGIN PGP SIGNED MESSAGE-----

Mxsmanic wrote:
> [...] Has anyone ever factored any RSA modulus actually in use for
> production encryption?

Yes, for the "GIE cartes bancaires" system used in France (well, IIRC
it was a signature rather than an encryption key). See for example
<http://www.parodie.com/english/smartcard.htm>.

- --
David Hopwood <david....@zetnet.co.uk>

Home page & PGP public key: http://www.users.zetnet.co.uk/hopwood/
RSA 2048-bit; fingerprint 71 8E A6 23 0E D3 4C E5 0F 69 8C D4 FA 66 15 01
Nothing in this message is intended to be legally binding. If I revoke a
public key but refuse to specify why, it is because the private key has been
seized under the Regulation of Investigatory Powers Act; see www.fipr.org/rip


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQEVAwUBP2xekjkCAxeYt5gVAQG5TAf+J3msI6I4y9lwD1eEIzZyCuwrJ/FqJvKz
kiqECasnyzETo2vmaHgcP8q19wcx0Tbu2NhlrdhPTnQpZVs//g8AJwf/Yu6k/7Xh
ooIJ/bdAQsddvBEC/55rMfhisGsoRwfMK+eua5NMzlTwhdgOOAhFIrzA2CNosL0x
ANOuZzRXPIvydx8wD/zf6IaKoBK+5HTlo/uwArzYvqr3g91G3jEH8VSCFUDXLVLj
lbAY+e8OH+X1Gd21bAp5RJ4GycRvhIMOaSgFDRjUKcoYgImk2C3SUyezSgIsLK0j
qoWohM4QzJbk9iAEkCB/I8BuPg6j+XQ0EBhCYfzVEAx3fgX3Ew08VQ==
=o2Co
-----END PGP SIGNATURE-----

", "url": "https://groups.google.com/g/sci.crypt/c/wy58kUa5J1E/m/-x3_V5eIAGQJ", "n_sections": 100}]