secp256k1

Elliptic curve used in the public-private-key cryptography native-library secp256k1 bitcoin ethereum ec ecdh ecdsa ethereum-addresses bitcoin-addresses compressed checksum byte
0.1.1 released
q9f/secp256k1.cr
48 6 4
Raw Pong Ghmoa

secp256k1.cr

a native library implementing secp256k1 for the crystal language

installation

add the secp256k1 library to your shard.yml

dependencies:
  secp256k1:
    github: q9f/secp256k1.cr
    version: "~> 0.1.1"

usage

# import secp256k1
require "secp256k1"

# generate a keypair
private_key = Secp256k1.new_private_key
public_key = Secp256k1.public_key_from_private private_key

# display the compressed public key
puts Secp256k1.public_key_compressed_prefix public_key

contribute

create a pull request, and make sure tests and linter passes.

this pure crystal implementation is based on the python implementation wobine/blackboard101 which is also used as reference to write tests against.

it's a complete rewrite of the abandoned packetzero/bitcoinutils for educational purposes.

secp256k1:
  github: q9f/secp256k1.cr
  version: ~> 0.1.1
License APLv2
Crystal 0.32.1

Authors

Dependencies 0

Development Dependencies 0

Dependents 0

Last synced .
search fire star recently