# Elliptic Curves as Python Objects

DevFeed: [Elliptic Curves as Python Objects](<https://devfeed.tech/articles/elliptic-curves-as-python-objects-40347.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2014/02/24/elliptic-curves-as-python-objects/>)

Published: 2014-02-24T10:00:28Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Code](<https://devfeed.tech/topics/code.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [classes](<https://devfeed.tech/topics/classes.md>), [object](<https://devfeed.tech/topics/object.md>), [constructor](<https://devfeed.tech/topics/constructor.md>), [test](<https://devfeed.tech/topics/test.md>), [unit test](<https://devfeed.tech/topics/unit-test.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [classes](<https://devfeed.tech/tags/classes.md>), [code](<https://devfeed.tech/tags/code.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [elliptic-curves](<https://devfeed.tech/tags/elliptic-curves.md>), [groups](<https://devfeed.tech/tags/groups.md>), [object](<https://devfeed.tech/tags/object.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [test](<https://devfeed.tech/tags/test.md>), [unit-test](<https://devfeed.tech/tags/unit-test.md>)

## AI overview

This tutorial translates elliptic-curve point addition from its geometric and formal description into Python code. It introduces curve and point classes, associates each point with its curve, implements relevant operators, and includes checks that points lie on smooth curves.

## Source excerpt

Last time we saw a geometric version of the algorithm to add points on elliptic curves. We went quite deep into the formal setting for it (projective space $ \mathbb{P}^2$), and we spent a lot of time talking about the right way to define the "zero" object in our elliptic curve so that our issues with vertical lines would disappear. With that understanding in mind we now finally turn to code, and write classes for curves and points and implement the addition algorithm.