Skip to content

potehinre/genesis-blockchain-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Genesis BlockChain Tools

Setup

Prerequisites:

Currenty five cryptographic backend modules are supported:

Setting up cryptography

It's default and required module. Should be installed automaticaly. But you can install it manually nevertheless:

pip install cryptography

Setting up python-ecdsa

python-ecdsa is pure python implementation of ECDSA. It's also the slowest. Use this module if you have issues with dependencies installation (on Windows for exapmle):

pip install ecdsa

Setting up ECPy

ECPy is pure python implementation of ECDSA. Use this module if you have issues with dependencies installation (on Windows for exapmle):

pip install ECPy

Setting up fastecdsa

fastecdsa is C/C++ module. It's the fastest between others. Use this module if you have no issues with dependencies (on Debian/Ubuntu Linux for example):

pip install fastecdsa

Setting up rubenesque

rubenesque is pure python implementaion of ECDSA also. But it's not on PyPI. So if you want to use it you have to install it from github repository directly:

pip install git+https://github.com/latchset/python-rubenesque

Manual installation:

Using pip:

Using pip/requirements:

Usage

To get public key by private key:

from genesis_blockchain_tools.crypto import get_public_key

priv_key = '2922bee6973370915cc63ab5ab8b7a57e1cab909477d7a030b2e4661e7aa2202'
pub_key = get_public_key(priv_key)

To sign message/data:

from genesis_blockchain_tools.crypto import sign

priv_key = '2922bee6973370915cc63ab5ab8b7a57e1cab909477d7a030b2e4661e7aa2202'
data = "Some data to sign"
signature = sign(priv_key, data)

Requirements

Tested on Python 3.x only yet

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages