[45221] in Cypherpunks

home help back first fref pref prev next nref lref last post

Re: Timing Cryptanalysis Attack

daemon@ATHENA.MIT.EDU (Perry E. Metzger)
Tue Dec 12 00:36:46 1995

To: Tom Weinstein <tomw@netscape.com>
Cc: cypherpunks@toad.com
In-Reply-To: Your message of "Mon, 11 Dec 1995 12:58:52 PST."
             <30CC9B8C.6201@netscape.com> 
Reply-To: perry@piermont.com
Date: Mon, 11 Dec 1995 20:00:14 -0500
From: "Perry E. Metzger" <perry@piermont.com>


Tom Weinstein writes:
> Perry E. Metzger wrote:
> > The trivial way to handle this is simply to check user time with the
> > right system calls and make sure it always comes out the same with an
> > apropriate number of sleeps.
> 
> The problem with that approach is that if the system is heavily loaded,
> it can take an arbitrarily large amount of user time.

Totally untrue. The process can take an arbitrary amount of wall clock
time, not user time.

In the case of the heavily loaded machine, the problem is gone -- the
opponent can't precisely predict this. Provided you take the same
amount of process time no matter what, you are okay.

(To be technical, user time doesn't pass during sleeps, but that
doesn't matter -- the problem gets fixed anyway).

> Somewhat better is to sleep for a random amount of time after you're
> done.

I don't think so. First of all, you can still extract some
information. If you have been gone as long as the maximum computation
plus the maximum random fudge, you know that you had to have conducted
the maximum computation. This means that some bits are indeed
leaking. Your approach also has the disadvantage that it is hard to
produce good random numbers -- you are perhaps familiar with that problem?

Perry

home help back first fref pref prev next nref lref last post