Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Bitcoin Developers Basics 02: Crypto + Digital Signatures
Rating: 4.8 out of 5(42 ratings)
1,069 students

Bitcoin Developers Basics 02: Crypto + Digital Signatures

Dive deep into the cryptography and digital signatures that keep Bitcoin secure
Last updated 1/2024
English

What you'll learn

  • Developers looking to learn about Bitcoin basics
  • Learn how elliptic curves and private keys work
  • Understand the parameters for secp256k1
  • Implement ECDSA in Python
  • Learn about Bitcoin Sighash flags
  • Write P2PK, P2PKH, and P2WPKH scripts
  • Make and spend a multisig Bitcoin transaction

Course content

10 sections80 lectures9h 34m total length
  • Welcome To Base 58's Bitcoin Developer Basics: Digital Signatures1:22

    Welcome to Base58'sBitcoin Developer Basics! Meet your host, @niftynei

  • Prerequisites and Additional Resources2:13

    Things you should already know:

    - Python basics

    - Bitcoin transactions (see part 1)

    - Bitcoin script (see part 1)

    - bitcoin core node

    - Basic Algebra

  • OPTIONAL: Bitcoin Script & TX Parsing Overview4:08

    We take a transaction from mempool dot space, break it into the different parts by hand (review of part 1 of Bitcoin Developer Basics: Transactions + Scripts)

Requirements

  • No prior blockchain or cryptography experience necessary.
  • It's assumed that you're familiar with the material in the Base58 Developer Basics: Transactions, Scripts + SegWit
  • Some basic Python and algebra knowledge will be useful

Description

So you've heard about bitcoin? Ever wondered what's going on with the data in a transaction, or how bitcoin gets locked up and transferred from one holder to another?


This course by Base58 instructor niftynei, will take you on a deep dive of the fields, bytes, and scripts that make up the bitcoin blockchain data. In an software engineer focused manner, we'll go over everything you need to know to build your own bitcoin transaction parser, write your very own custom bitcoin locking scripts, and adapt your transactions to the modern SegWit format.


Step 1: Let's learn about Elliptic Curve Cryptogaphy

First we figure out what the building blocks for making digital signatures on blockchains are: elliptic curves! We'll do a very basic walk through of how these work and work through where Bitcoin's secp256k1 curve comes from. Finally we'll pick some private keys and learn how to find the public key version of it.

Topics: elliptic curves over finite fields, secp256k1, public and private keys

Step 2: P2PK, P2PKH: Locking Bitcoin up to Public Keys

Now that we've got some private and public keys, we're ready to learn about standard Bitcoin scripts with signatures. We'll write some P2PK, P2PKH, and P2WPKH scripts and lock bitcoin up to them (so we can unlock it later).


Topics: compressed keys, P2PK, P2PKH, P2WPKH


Step 3: Digital Signatures

Now that we've got Bitcoin locked up to some public keys, we need to learn how to make signatures to unlock it. We'll walk through how ECDSA works.

Topics: digital siganatures, ECDSA


Step 4: Sighashes

Now that we've got ECDSA under our belt, we're ready to make signatures to spend the bitcoin we locked to our public keys. Here we use sighashes to build the message to sign with ECDSA. Sighashes are how we commit to data in a transaction, to prevent anyone else from tampering with the data on its way into a block.


Topics: sighashes, SegWit, legacy, SIGHASH_ALL, SIGHASH_NONE, SIGHASH_SINGLE


Step 5: Multisig

Finally, we'll take a look at how you can lock bitcoin up to threshold signatures using OP_CHECKMULTISIG.


Topics: multisigs, OP_CHECKMULTISIG, Script

Who this course is for:

  • Developers that want to learn more about the cryptography used in blockchains
  • Bitcoiners that want to really understand how Bitcoin works
  • Cryptocurrency curious devs!
  • Protocol designers that want an in-depth course on bitcoin design decisions
  • Cryptographers that want an engineer-focused understanding of bitcoin transactions
  • Beginning blockchain developers