15 ms·
Here's Sean Devlin explaining ~85% of the same detail in a general introduction to invalid curve attacks: https://toadstyle.org/cryptopals/59.txt https://toads
by tptacek 8y ago
Here's Sean Devlin explaining ~85% of the same detail in a general introduction to invalid curve attacks:
https://toadstyle.org/cryptopals/59.txt https://toadstyle.org/cryptopals/59.txt
I like Sean's definitions best and find them the most accessible way to get a the topic. Don't think about curves as geometric objects and don't think of points as coordinates. Think of the curve as an equation y^2 = x^3 + ax + b --- come on, you did this in high school --- and a point as an x,y pair that satisfies the equation (pick an x at random! solve for y!). Now host that equation in a finite field, so the x and y needs to be an integer mod p. You can code this in Python or Ruby, right now, and get an intuition for the basics of how it works.
For invalid curve intuition, I also think Sean is right: understand DH and subgroup confinement first:
https://toadstyle.org/cryptopals/57.txt https://toadstyle.org/cryptopals/57.txt
I think the fundamental thing to get your head around even if you're not going to take the hour or two to code the attack up (do that, though! it's a fun couple hours!) is to notice that, if for prime p a curve has order q < p points, most combinations of integers mod p can't be valid points. If you've got a "sage" prompt lying around (always have a sage prompt lying around), make a curve E = EllipticCurve(GF(17), [3,4]). Look at the length of E.points(), and notice how much smaller it is than the number of possible x's and y's.
Then, the interesting part about the attack is that if you send an x,y pair that doesn't satisfy the curve, it might satisfy the equation for some other curve. If you're smart you pick a point that lands in a curve that's insecure, for which you can quickly use brute force to solve the DLP.
I agree that the hook in this blog post title is misleading; you would not have found this attack. But it's misleading in a sort of empowering way: you are not a graduate course in mathematics from grasping the intuition of the attack or coding a model exploit. You might not even be a day away from it.
If you read this blog post and Sean's posts and you're stuck on something, I'd be interested in knowing what and seeing if I can push you through it.