Ruby LibECP is a wrapper around LibECP, an elliptic-curve cryptography library for producing and verifying ECDSA signatures.
Use the gem in a project managed with Bundler adding it into Gemfile:
gem "cf-ruby-libecp"
This gem is a native extension gem. The native library will be compiled on your platform automatically at install time.
The required packages to build the gem are:
- GMP, a multiprecision arithmetic library.
- GCC, a compiler for C, C++, Java, Fortan and other program code that can be used in Unix.
$ sudo apt-get install libgmp3-dev build-essential
$ brew tap homebrew/versions
$ brew install gmp4
$ CPPFLAGS=-I/usr/local/opt/gmp4/include LDFLAGS=-L/usr/local/opt/gmp4/lib gem install cf-ruby-libecp
$ sudo port install gmp
require "libecp"
LibEcp.private_key(LibEcp.gen_uid(1234), "coinfloor")
Released under the Apache License Version 2.0.