Coder Social home page Coder Social logo

keyfuse / tokucore Goto Github PK

View Code? Open in Web Editor NEW
71.0 4.0 14.0 431 KB

A Simple, Powerful, Modular Library for Bitcoin Blockchain As a Service(BAAS)

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.38% Go 99.62%
bitcoin blockchain micropayment cryptocurrency golang segwit dapp multi-party-ecdsa secret-shares schnorr

tokucore's Introduction

tokucore โ€“ A Simple, Powerful Library for Bitcoin Apps.

Build Status GolangCI Go Report Card codecov.io BSD License

tokucore

tokucore is a simple Go (golang) library for creating and manipulating bitcoin data structures like creating keys and addresses (HD/BIP32/BIP39/SegWit) or parsing, creating and signing transactions.

Overview

  • Base58 encoding/decoding
  • Block headers, block and transaction parsing
  • Transaction creation, signature and verification
  • Script parsing and execution
  • BIP 32 (deterministic wallets)
  • BIP 39 (mnemonic code for generating deterministic keys)
  • BIP 173 (Base32 address format for native v0-16 witness outputs)
  • Two-Party ECDSA Threshold Signature Scheme (TSS)
  • Mult-Party Schnorr Threshold Signature Scheme (TSS)
  • Scriptless Adaptor Signature

Focus

  • Simple and easy to use
  • No external dependencies
  • Full test coverage

Tests

$ export GOPATH=`pwd`
$ go get -u github.com/keyfuse/tokucore/xcore
$ cd src/github.com/keyfuse/tokucore/
$ make test

Examples

Performance

The performance was done on an Intel i5 (2.50GHz) with golang benchmark.

Implementation
2P-ECDSA KeyGen 2.13 ms
2P-ECDSA Signing 426.05 ms
2P-Schnorr KeyGen 0.01 ms
2P-Schnorr Signing 4.31 ms
$ go test -bench=BenchmarkMpc*  ./xcrypto

goos: linux
goarch: amd64
pkg: github.com/keyfuse/tokucore/xcrypto
BenchmarkMpcEcdsaKeyGen-4      	    1000	   2133566 ns/op
BenchmarkMpcEcdsaSigning-4     	       3	 426058258 ns/op
BenchmarkMpcSchnorrKeyGen-4    	  100000	     11310 ns/op
BenchmarkMpcSchnorrSigning-4   	     300	   4315631 ns/op

Can I trust this code?

Don't trust. Verify.

License

tokucore is released under the BSD License.

tokucore's People

Contributors

bohutang avatar shafisher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tokucore's Issues

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.