Giter Club home page Giter Club logo

bitcoin-address's Introduction

Generate Legacy Bitcoin Address

An exercise in creating a legacy Bitcoin address, as described here.

Python Implementation

Usage:

  1. Clone this repo
  2. cd into the python project directory
  3. Make a virtual environment: virtualenv -p python3 venv
  4. source the virtual environment activation script - e.g. source venv/bin/activate
  5. Run pip install -r requirements.txt

Run python/main.py.

C++ Implementation (Linux)

For the purposes of the C++ implementation, I've used openssl to provide the necessary hashing functionality.

You can get reasonable information on the openssl functions on the Linux man pages - for example enter man SHA256_Update.

Note that the int SHA256_Final(unsigned char *md, SHA256_CTX *c) function places the message digest in md, which must have space for SHA256_DIGEST_LENGTH bytes (i.e. 32) bytes.

Bitcoin Core does not use openssl - the hashing algorithms are built in to the project.

Usage

Compile the C++ programme from the cpp directory. Run ./bin/main.

Enter a public key in hexstring format when requested. The output includes the various stages of Base58Check encoding - this is just for educational purposes.

Run ./bin/p2sh for the address output only.

References

bitcoin-address's People

Contributors

csknk avatar

Stargazers

 avatar

Watchers

 avatar  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.