Registry / auth-security / lightecc

lightecc

JSON →
library0.0.7pypypi✓ verified 85d ago

LightECC is a lightweight Python library for Elliptic Curve Cryptography (ECC) arithmetic. It provides support for various elliptic curve forms, including Weierstrass, Koblitz, and Edwards, along with many pre-defined curves. The library simplifies fundamental ECC operations such as point addition, subtraction, scalar multiplication, and division. As of its current version 0.0.5, LightECC aims to make ECC operations accessible without requiring deep understanding of the underlying mathematical principles. The library appears to be actively maintained, with recent updates.

pip install lightecc
INSTALL
IMPORT
SIG · LIGHTECC
L
lightecc
auth-securitypythonv0.0.7
Install
1.7s avg
Import
64ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.067s · 18.7MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.7s · import 0.060s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

LightECC
from lightecc import LightECC

This quickstart demonstrates how to initialize a LightECC object, retrieve the base point, and perform basic elliptic curve point arithmetic operations like addition, subtraction, and scalar multiplication. It also shows an example of point division, noting its computational complexity.

from lightecc import LightECC # Initialize an elliptic curve (defaults to Weierstrass if no form_name is given) ec = LightECC(form_name="edwards", curve_name="ed25519") # Get the base point G of the curve G = ec.G # Perform point arithmetic _2G = G + G _3G = _2G + G _5G = _3G + _2G _10G = _5G + _5G _9G = _10G - G # Scalar multiplication _20G = 20 * G _50G = 50 * G # Division (solves ECDLP - computationally intensive) _25G = _50G / G print(f"Base point G: {G}") print(f"2G: {_2G}") print(f"50G divided by G (25G): {_25G}")
Debug
Known issues
gotchaElliptic curve point division in LightECC involves solving the Elliptic Curve Discrete Logarithm Problem (ECDLP). This operation is computationally difficult and has an O(n) time complexity with brute force, making it very slow for practical cryptographic sizes.
fix
Avoid using point division in performance-critical or real-time applications. For cryptographic schemes, typically the ECDLP hardness is exploited, not solved.
affects: All versions
gotchaLightECC supports a specific set of pre-defined elliptic curves across different forms (Weierstrass, Koblitz, Edwards). Using an unsupported curve name or form, or one with an insufficient 'order' (n), will result in errors or a cryptographically weak system.
fix
Refer to the official LightECC documentation or source code for the list of supported `curve_name` values and their corresponding `form_name` to ensure proper and secure curve instantiation.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'lightecc'
The 'lightecc' package is not installed in the current Python environment or there's a typo in the import statement.
fix
Ensure the package is installed using `pip install lightecc`. Verify the import statement is `from lightecc import LightECC`.
AttributeError: 'LightECC' object has no attribute 'some_nonexistent_attribute'
Attempting to access an attribute or method on a `LightECC` object that does not exist or is misspelled. This often happens when mistaking object properties or methods.
fix
Check the LightECC documentation or the object's available methods (e.g., using `dir(ec)`) to ensure the correct attribute or method name is used.
TypeError: unsupported operand type(s) for +: 'Point' and 'int'
Attempting to perform an arithmetic operation (e.g., addition, subtraction) between a LightECC `Point` object and an incompatible type, such as a plain integer, when a `Point` or scalar is expected.
fix
Ensure that arithmetic operations are performed between compatible LightECC `Point` objects or between a `Point` and a scalar (for multiplication). For point addition/subtraction, both operands must be `Point` instances.
Upgrade
Version history
0.0.7latest on PyPI · released Jun 9, 2026
Audit
Dependencies
pythonrequiredRequires Python 3.5.5 or higher for execution.
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
lightecc — pip install lightecc · libregistry