People are asking how long it would take to brute force the infamous 4 key by ha...

@sophieschmieg@infosec.exchange

People are asking how long it would take to brute force the infamous 4 key by hand.

Let's do the math.
The first decision is whether we want to use 115 digit decimal numbers or 96 digit hex numbers. Hex is less familiar, but we'll have to do a lot of computation modulo 2³⁸⁴-2¹²⁸-2⁹⁶+2³²-1. In hex that's just adding/subtracting four numbers (possibly a few times, but not too much), in decimal it's…not that.

Next, let's see what we need for a single point addition:
We first need to compute either X²-3/2Y or (Y1-Y2)/(X2-X2) for the slope.
The -3 is a parameter from the curve spec, and the only time the spec is going to be nice to us.
This is an inversion modulo p. We can use the extended euclidian algorithm for that (your computer will do a more expensive operation when handling private key material, as the euclidean algorithm isn't constant time)

The Euclidean algorithm requires ~log2(x) iterations. Unfortunately, in the P384 spec, the generator is just a random point, so this log2 is 384. 384 divisions with remainder, followed by multiplications. The numbers will get smaller, but long division is quadratic, so that's roughly 384*(384+1)*(2*384+1)/6 / 16 ~ 1 million hex digit operations, for one inversion. You'll also need to multiply in each step, so I think you end up with something like 2 million hex ops per inversion.

The rest of the equation is negligible, just a few multiplications and additions, which will drown in the noise of my ballpark estimate.

Doing this four times gets you ~8 million hex operations.

At one hex operation per second, that's 2.5 years of non stop computation.

Meanwhile a computer does 3 billion 64 bit word operations per second. It takes a few milliseconds.

You could shave a couple of operations by not using long division, and switch to Toom–Cook, but you'll still be busy for quite some time.