Giter VIP home page Giter VIP logo

bitp0wn's Introduction

Bitp0wn

This repo is a showcase of algorithms to get some fun with bitcoin cryptography.
The scripts are not optimised and are only proof-of-concepts (not suited for production).

keys

  • keys/brute_force.py : You will find a simple bruteforce algorithm wich test every possibilities to retrieve a private key from the public key.

  • keys/bsgs.py : The Baby-step Giant-step algorithm, it has order of 2^(n/2) time complexity and space complexity.

  • keys/pollard_rho.py : The Pollard Rho algorithm, it has order of 2^(n/2) time complexity but is slower than bsgs in practice. However, this algorithm has a constant space complexity.

miscellaneous

  • miscellaneous/double.py : This file is more about finding an arithmetic relationship between 2 public keys on the curve. Most of formulaes are specific to secp256k1.

  • miscellaneous/playground.py : This file contains relations between values of differents signatures for an identical address.

  • miscellaneous/secret-sign.py : A proof-of-concept to build a signature for a particular public key. Only the owner of this public key will be able to assert that the signature is correct.

  • miscellaneous/shamir-shared-secret.py : Shamir Shared Secret Scheme to distribute a secret to n entities wich can be recovered with k < n shares.

  • miscellaneous/tiny-curve.py : This script let you generate your own elliptic curves (not secure, never use the curves in production). This will be useful to test some of our algorithms on smaller curves.

signatures

  • signatures/fake_sig.py : In this script, we show why hashing the message in ecdsa is important. Because without it, you can generate plenty of signatures that can be verified with the public key of your choice.

  • signatures/r_exploit_ecdsa.py : This algorithm exploit a failure in signatures generation. If the same address use the same k in 2 differents signatures (i.e same r-value), then you can recalculate the private key instantly.

  • signatures/r_exploit_schnorr.py : Same as precedent exploit but for schnorr signatures instead of ecdsa signatures.

bitp0wn's People

Stargazers

 avatar

Watchers

James Cloos avatar

Forkers

totulik

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.