neeboo / cuECC

POSTECH: Heterogeneous Parallel Computing (Fall 2023)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cuECC: CUDA-accelerated Elliptic Curve Cryptography Library

CSED490C@POSTECH CSED490C@POSTECH

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.

Features

  • 256-bit unsigned integer arithmetic operations
  • Finite field arithmetic operations
  • Elliptic curve point operations
  • Parallel public key generation
  • Python bindings

Usage

To use cuECC, follow these steps:

  1. Clone this repository.
  2. Navigate to the cloned directory.
  3. Run make all to build the library.
  4. Use the built libcuecc.so in your code.

To use cuECC in Python, follow these steps:

  1. Build the library as described above.
  2. Import the Ecc class from ecc.py.
  3. Initialize the class with the path to the built library, e.g., ecc = Ecc('./libcuecc.so')

Benchmarks

To compare the performance of cuECC with a pure-python implementation, follow these steps:

  1. Clone this repository.
  2. Navigate to the cloned directory.
  3. Run make all to build the library.
  4. Run poetry install to install the dependencies.
  5. Run poetry run benchmark-public-key to benchmark the public key generation process.

Note that the Python implementation is from cryptography-python.

Disclaimer

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.

About

POSTECH: Heterogeneous Parallel Computing (Fall 2023)


Languages

Language:Cuda 60.6%Language:Python 37.2%Language:Makefile 2.2%