cuECC is a CUDA-accelerated Elliptic Curve Cryptography library designed for secp256k1. The primary goal of this library is to enhance the throughput of ECC by utilizing the parallelism of GPU. This library includes not only the basic operations of ECC but also 256-bit unsigned integer arithmetic operations, operations over finite fields, and curves.
It can be easily integrated into other Python projects using the included Python bindings and is zero-dependency.
- 256-bit unsigned integer arithmetic operations
- Finite field arithmetic operations
- Elliptic curve point operations
- Parallel public key generation
- Python bindings
To use cuECC, follow these steps:
- Clone this repository.
- Navigate to the cloned directory.
- Run
make all
to build the library. - Use the built
libcuecc.so
in your code.
To use cuECC in Python, follow these steps:
- Build the library as described above.
- Import the
Ecc
class fromecc.py
. - Initialize the class with the path to the built library, e.g.,
ecc = Ecc('./libcuecc.so')
To compare the performance of cuECC with a pure-python implementation, follow these steps:
- Clone this repository.
- Navigate to the cloned directory.
- Run
make all
to build the library. - Run
poetry install
to install the dependencies. - Run
poetry run benchmark-public-key
to benchmark the public key generation process.
Note that the Python implementation is from cryptography-python
.
Note that this library is not intended for production use. It is unoptimized and may be insecure. It is provided solely for educational purposes, specifically for the CSED490C course at POSTECH. Any usage is at your own risk, and the contributors are not responsible for any potential issues.