Image for post
Image for post

Barebones P256: There Is Beauty in Elliptic Curves

The basic form of an elliptic curve is y² = x² + ax +b, and a plot of y² = x³-3x+10 is [here]:

Image for post
Image for post
(48439561293906451759052585252797914202762949526041747995844080717082404635286,36134250956749795798585127919587881956611106672985015071877198253568414405109).
suite := suites.MustFind("P256")one := suite.Scalar().SetInt64(1)
two := suite.Scalar().SetInt64(2)
three := suite.Scalar().SetInt64(3)
G:=suite.Point().Base()

n := suite.Scalar().Pick(suite.RandomStream())
G_1 := suite.Point().Mul(one,G)
G_2 := suite.Point().Mul(two,G)
G_3 := suite.Point().Mul(three,G)
G_T1 := suite.Point().Add(G_1,G_1)
G_T2 := suite.Point().Add(G_1,G_2)
Curve: P256
Point G (48439561293906451759052585252797914202762949526041747995844080717082404635286,36134250956749795798585127919587881956611106672985015071877198253568414405109)
Point 1G (48439561293906451759052585252797914202762949526041747995844080717082404635286,36134250956749795798585127919587881956611106672985015071877198253568414405109)
Point 2G (56515219790691171413109057904011688695424810155802929973526481321309856242040,3377031843712258259223711451491452598088675519751548567112458094635497583569)
Point 3G (42877656971275811310262564894490210024759287182177196162425349131675946712428,61154801112014214504178281461992570017247172004704277041681093927569603776562)

Point G+G (56515219790691171413109057904011688695424810155802929973526481321309856242040,3377031843712258259223711451491452598088675519751548567112458094635497583569)
Point G+2G (42877656971275811310262564894490210024759287182177196162425349131675946712428,61154801112014214504178281461992570017247172004704277041681093927569603776562)
Curve: P256
Point G (48439561293906451759052585252797914202762949526041747995844080717082404635286,36134250956749795798585127919587881956611106672985015071877198253568414405109)
Point 1G (48439561293906451759052585252797914202762949526041747995844080717082404635286,36134250956749795798585127919587881956611106672985015071877198253568414405109)
Point 2G (56515219790691171413109057904011688695424810155802929973526481321309856242040,3377031843712258259223711451491452598088675519751548567112458094635497583569)
Point 3G (42877656971275811310262564894490210024759287182177196162425349131675946712428,61154801112014214504178281461992570017247172004704277041681093927569603776562)

Point G+G (56515219790691171413109057904011688695424810155802929973526481321309856242040,3377031843712258259223711451491452598088675519751548567112458094635497583569)
Point G+2G (42877656971275811310262564894490210024759287182177196162425349131675946712428,61154801112014214504178281461992570017247172004704277041681093927569603776562)

Value 05
Point vG (36794669340896883012101473439538929759152396476648692591795318194054580155373,101659946828913883886577915207667153874746613498030835602133042203824767462820)


Random scale (n) 310f986f0f00a77455666c5eae9562a05302af5117ba52e491d5304f59e9014f
Point nG (78494224767026010845293406669882772940749287347599241954953609326585048933324,91347054593758823544042866206920974212996319719285507232050206961209393062005)

Conclusions

Beauty exists in many forms, and for cybersecurity, elliptic curves are the nearest thing to providing beauty.

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. EU Citizen. Auld Reekie native. Old World Breaker. New World Creator.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store