TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Elliptic Curve Cryptography for Beginners

328 pointsby deafcalculusover 7 years ago

12 comments

tptacekover 7 years ago
So far, the best single-page elliptic curve primer for generalist programmers I know of is Adam Langley&#x27;s:<p><a href="https:&#x2F;&#x2F;www.imperialviolet.org&#x2F;2010&#x2F;12&#x2F;04&#x2F;ecc.html" rel="nofollow">https:&#x2F;&#x2F;www.imperialviolet.org&#x2F;2010&#x2F;12&#x2F;04&#x2F;ecc.html</a><p>I understand the urge to try to get a high-level grok of curves without much math, but I spent years bouncing off the outermost surface of curve understanding by trying to start with the curve picture and the intuitive geometry of curve shape, and what finally made curves click for me (and quickly) was to simply take the curve equation --- which is itself high school math! --- and play with it a bit.<p>So if you&#x27;re a programmer and you want a baseline understanding how curves work, do what you&#x27;d do with any other subject you&#x27;re trying to understand: pop open an editor, take the Weierstrass curve equation, pick a y, solve for x; then do it in a finite field (ie, mod a prime). Then write an &quot;add&quot;, then a &quot;scalar mult&quot;. It&#x27;s a couple hours of noodling, tops.<p>As always, but particularly with curves, remember that the basic understanding of what&#x27;s going on is nowhere nearly enough to ever use them safely!
评论 #15455699 未加载
dsaccoover 7 years ago
This is pretty good! The arithmetic of elliptic curves gets very complex, but I like how you arrived at points on an elliptic curve just by defining groups and fields. It might be a slight improvement to give a short, Rudin-style explanation of the difference between a set and a field. You could do this from first principles of set theory without being so terse as to be incomprehensible or diving into the axioms; I think the stated goal of little math is fine for the audience, but at the same time such an audience might not immediately understand what “field = set with addition and multiplication defined on it” means. I think a small expansion of the treatment on <i>why</i> the ECDLP is hard would also be good. It&#x27;s intuitively easy to follow that hard problems can exist, but maybe continue on in showing why this particular hardness assumption works for cryptography (because there are many that do not).<p>Places to go from here if you enjoyed reading this and want to learn more about elliptic curves and cryptography related to them:<p>1. <a href="http:&#x2F;&#x2F;blog.bjrn.se&#x2F;2015&#x2F;07&#x2F;lets-construct-elliptic-curve.html?m=1" rel="nofollow">http:&#x2F;&#x2F;blog.bjrn.se&#x2F;2015&#x2F;07&#x2F;lets-construct-elliptic-curve.ht...</a><p>More on an elliptic curve and constructing a hypothetical one.<p>2. <a href="https:&#x2F;&#x2F;medium.com&#x2F;@VitalikButerin&#x2F;exploring-elliptic-curve-pairings-c73c1864e627" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@VitalikButerin&#x2F;exploring-elliptic-curve-...</a><p>Elliptic curve pairings.<p>3. <a href="https:&#x2F;&#x2F;www.lvh.io&#x2F;posts&#x2F;supersingular-isogeny-diffie-hellman-101.html" rel="nofollow">https:&#x2F;&#x2F;www.lvh.io&#x2F;posts&#x2F;supersingular-isogeny-diffie-hellma...</a><p>An intro to supersingular isogeny cryptography, which has a basis in elliptic curves as a mathematical structure, but is fundamentally different from elliptic curve cryptography.
wycover 7 years ago
If you want to see a &quot;from scratch&quot; implementation using existing algorithms, here&#x27;s short working snippet of elliptic curve cryptography (specifically Bitcoin&#x27;s) without 3rd party libraries:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;wyc&#x2F;haschain&#x2F;blob&#x2F;master&#x2F;Secp256K1.hs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;wyc&#x2F;haschain&#x2F;blob&#x2F;master&#x2F;Secp256K1.hs</a><p>The implementation doesn&#x27;t concern itself with groups or fields, but they&#x27;re still very useful to make sense of the code at all. Actually, I should add some types and implement an instance of Data.Group when I have more time.<p>Of course, it&#x27;s for fun and not production use. I didn&#x27;t give the slightest thought to timing attacks, optimized performance, etc.
enedilover 7 years ago
As nice as it is, integers are not a field (i.e. most of them don&#x27;t have multiplicative inverses, or 1&#x2F;n usually isn&#x27;t integral).<p>Another good writeup: <a href="http:&#x2F;&#x2F;andrea.corbellini.name&#x2F;2015&#x2F;05&#x2F;17&#x2F;elliptic-curve-cryptography-a-gentle-introduction&#x2F;" rel="nofollow">http:&#x2F;&#x2F;andrea.corbellini.name&#x2F;2015&#x2F;05&#x2F;17&#x2F;elliptic-curve-cryp...</a>
评论 #15452442 未加载
评论 #15449741 未加载
评论 #15465359 未加载
mleventalover 7 years ago
more in depth and just as gentle: <a href="https:&#x2F;&#x2F;jeremykun.com&#x2F;2014&#x2F;02&#x2F;08&#x2F;introducing-elliptic-curves&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jeremykun.com&#x2F;2014&#x2F;02&#x2F;08&#x2F;introducing-elliptic-curves...</a>
drcodeover 7 years ago
In case anyone here is interested in Cryptography as it pertains to Cryptocurrency specifically, here&#x27;s a talk I gave recently that might be interesting to you: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=Fyqtl7eGQZY&amp;t=1062s" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=Fyqtl7eGQZY&amp;t=1062s</a>
评论 #15450470 未加载
fallingfrogover 7 years ago
In the image for A+A=C (multiply by 2) I see the intersection point C, but what if you wanted to multiply by 3? That would be A+C=D and I don&#x27;t see any point on the curve that the line through A and C intersects. In fact it looks like for any A you choose, adding A+A gives a C which has that property (in other words A*3=0 for any A). This is just by visual inspection. What am I missing?
评论 #15449564 未加载
gewoonkrisover 7 years ago
The article gives a nice intuition about how encryption works using elliptic curves without going too deep into the math.<p>I&#x27;m curious for a similar explanation for how decryption would work though; a trapdoor function is nice and all, but it&#x27;s only half of the story if there is no &#x27;way out&#x27;.
评论 #15451441 未加载
评论 #15449187 未加载
red_admiralover 7 years ago
I always get a bit annoyed when someone tries to explain ECC with an image of an elliptic curve over the reals. The whole point of ECs over finite fields in cryptography is that they don&#x27;t have any regular structure like that!
评论 #15450618 未加载
jrubinovitzover 7 years ago
Well done, loved the use of interactive graphics. Curious if you will continue this approach, but for more advanced cryptography, or move on to other things. Would love a more in depth guide to cryptography in this format.
landmark3over 7 years ago
Well written and even I understood it - recommended!
jlgaddisover 7 years ago
I&#x27;m not aure if this page uses MathML or something like that but it does not render correctly on the iPad.