Bitcoin python tutorial for beginners – keys and address


Video is ready, Click Here to View ×

This video is for people who wants to use (almost) raw python code to create a private and a public Bitcoin keys and to convert them to Bitcoin address.

In this video I’m using the external libraries: ecdsa and base58

You can watch the complete code on github:

My blog:

I suggest that you’ll also make sure you’re familiar with the following concepts.

hexadecimal basics by Corey…

13 thoughts on “Bitcoin python tutorial for beginners – keys and address

  1. '4' and '0' are Octal, the hex should be 'x04' and 'x00', how lucky you are
    because in memory they are the same。
    这哥们把16进制的0x04在python的字面量里写成 '4', 应该是 'x04'的,也算瞎猫碰上死耗子了

  2. Hello! I'm trying to generate a testnet address with no luck. I just change the network id byte from '0 to '6F' but i get a different format(first letters are not "m" or "n").Am i missing something ? Thanks!

  3. Hello! Great tutorials, I want to make them all, although this one is not working for me. Here the log, can you give me a hand? can't find the solution on the web.

    Traceback (most recent call last):
    File "", line 18, in <module>
    ripemd160 ='ripemd160')
    File "build/bdist.linux-x86_64/egg/", line 87, in __py_new
    elif name in ('SHA512', 'sha512', 'SHA384', 'sha384'):
    File "build/bdist.linux-x86_64/egg/", line 80, in __get_builtin_constructor
    elif name in ('SHA256', 'sha256', 'SHA224', 'sha224'):
    ValueError: unsupported hash type

    Thanks a lot!

Leave a Reply

Your email address will not be published. Required fields are marked *