GithubHelp home page GithubHelp logo

ecdsa-opencl's Introduction

ECDSA-OpenCL

This library is a fork of Sipa's Secp256k1 library, currently in use for Bitcoin. The change we made here is the signature verification unit, we re-wrote it in OpenCL in order for it to be run on a GPU and thus to accelerate signature verification for a Bitcoin block, we wrote the kernel call as well. The choice of OpenCL as a programming language was to have it run on a wider range of GPUs (unlike with company-owned programming language for GPUs).

We've changed secp256k1-ocl/src/tests.c and we've created secp256k1-ocl/src/k.cl

Compilation

To compile it:

1.Clone the Git directory.

2.Go inside secp256k1-ocl/ dir :

run

chmod u+x *
./autogen.sh 
./configure
make
./tests

Set OpenCL Environment

On Linux, in order to set an OpenCL environment, if you haven't done so before, you must run the following steps:

export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib64
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/lib:$LD_LIBRARY_PATH
export C_INCLUDE_PATH=/usr/local/cuda/include

And then, run:

ldconfig

Signatures Number

To change the number of signatures that are beig verified, modify in secp256k1-ocl/src/test.c the NUM_OF_SIGS Define.

Results

for 100,000+ signatures the GPU run is x25 faster than the CPU run

STATUS: In a near futur, we're going to integrate this library to the Bitcoin-Core.

Copyright

Copyright Ilay Chen & Yakir Fenton, the project's supervisor was Alex Manuskin. March 30th 2020.

ecdsa-opencl's People

Contributors

ilaychen avatar vidlefak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.