GithubHelp home page GithubHelp logo

gionasoldati / bitcoinblockchaintechnology Goto Github PK

View Code? Open in Web Editor NEW

This project forked from btclib-org/btclib

0.0 0.0 0.0 4.04 MB

Python library and Excel spreadsheets for the Bitcoin & Blockchain Technology course

Home Page: https://www.ametrano.net/bbt/

License: MIT License

Python 100.00%

bitcoinblockchaintechnology's Introduction

btclib: a bitcoin cryptography library

http://github.com/dginst/btclib

Build Status Coverage Status PyPI status PyPI pyversions PyPI version GitHub License

btclib is a python3 type annotated library intended for teaching and demonstration of the cryptography used in bitcoin. It is used for the Bitcoin and Blockchain Technology Course at Milano Bicocca and Politecnico di Milano.

To install (and upgrade) btclib:

python3 -m pip install --upgrade btclib

Algorithms are not to be used in production environments: they could be broken using side-channel attacks. Moreover, they might be subjected to major refactoring without care for backward compatibility.

The library includes:

  • modulo algebra functions (gcd, inverse, legendre symbol, square root)
  • octet / integer / point conversion functions
  • elliptic curve class
    • fast algebra implemented using Jacobian coordinates
    • double scalar multiplication (Shamir's trick)
    • point simmetry solution: odd/even, high/low, and quadratic residue
    • SEC 1 v1 and v2 curves
    • NIST curves
    • low cardinality test curves
  • ECDSA signature and DER encoding
  • Sign-to-contract notarization
  • Schnorr signature (according to bip-schnorr bitcoin standardization)
    • batch validation
    • threshold signature
    • MuSig multi-signature
  • Borromean ring signature
  • RFC-6979 to make signature schemes deterministic
  • EC Diffie-Hellman
  • Pedersen Committment
  • base58 encoding, addresses, WIFs
  • BIP32 hierarchical deterministic wallets
  • BIP39 mnemonic code for generating deterministic keys
  • Electrum standard for mnemonic code

A very extensive test suite reproduces results from major official sources and covers basically 100% of the library code base.

bitcoinblockchaintechnology's People

Contributors

fametrano avatar leocomandini avatar gionasoldati avatar alessandromiola avatar danielefornaro avatar andreabrandoli90 avatar clelli 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.