Account
Computer Science & Technology

Programming Bitcoin

Learn How to Program Bitcoin from Scratch

Programming Bitcoin by Jimmy Song builds a working bitcoin library in Python, from finite fields to Segwit, so you understand the protocol instead of trusting it.

  • 321pages
  • 17chapters
  • 16chapters plus solutions
  • Firstedition

This book is for you if you are

  • a Python developer who wants to read raw transaction bytes and understand every field
  • an engineer moving into blockchain protocol work and tired of API wrappers
  • a self-taught builder who learns best by implementing rather than reading definitions

Why this book

Programming Bitcoin by Jimmy Song teaches you how Bitcoin actually works by having you build it — line by line, in Python — until you have a working bitcoin library. Published by O'Reilly Media in 2019, it takes the topic most books only describe at arm's length and makes you implement it. That difference shapes every chapter.

Retail listings for this title recycle the same three-line blurb. What they never show is the book's structure, and the structure is the argument:

  • Started from finite fields and elliptic curves before any code touches a wallet
  • Every cryptographic primitive is implemented, not imported from a library
  • Transaction parsing, serialization, and validation built at byte level
  • Script, P2SH, and Segwit explained as program logic rather than glossary terms
  • Bloom filters and simplified payment verification tied to real light-client behavior

Readers consistently underestimate the early chapters, so be warned: finite fields and elliptic curve cryptography come first, and they are the foundation for everything after. Skip them and the signature code in later chapters reads as magic. This is the edition to keep open beside your editor.

It suits Python developers who want to read raw transaction bytes and understand them, engineers moving into protocol work, and self-taught builders tired of API wrappers hiding the mechanics. This edition is not a survey of crypto markets or a node-operator manual. Get your copy today.

What you'll learn

  • Implement finite fields and elliptic curve cryptography from first principles
  • Derive and verify ECDSA signatures without relying on a crypto library
  • Parse, serialize, and construct Bitcoin transactions at the byte level
  • Write and evaluate Bitcoin Script, including Pay-to-Script Hash
  • Build transaction creation and validation logic end to end
  • Model blocks, networking messages, and simplified payment verification
  • Apply Bloom filters and Segwit rules as working code

Not the right book for: readers looking for a crypto investing or trading guide

Questions about this book

Do I need advanced math to get through Programming Bitcoin?

Only comfort with modular arithmetic and basic algebra. Song derives each finite field and elliptic curve operation step by step and shows the Python implementation alongside it.

What Python version does the book's code target?

The examples use Python 3 and are written to run without external crypto dependencies, so you implement the primitives rather than import them.

Does Programming Bitcoin cover Segwit and light clients?

Yes. Dedicated chapters treat Segwit, Bloom filters, and simplified payment verification, so you see how wallets and light clients filter for relevant transactions.

Is this a book about trading or investing in Bitcoin?

No. It is purely technical: transactions, Script, blocks, networking, and validation. Market analysis and investment strategy are outside its scope.

Why does the book start with finite fields instead of transactions?

Because signatures, keys, and public key derivation all rest on elliptic curve math over finite fields. Building that first means later chapters are implementation rather than assertion.

Can I get it in another format?

Yes. You get the PDF right away. Need EPUB, Kindle, Word or any other format? Email support@ebooksonline.si with your order number and we send it.

Does it work on Kindle?

Yes. Email support@ebooksonline.si with your order number and we send you a Kindle-ready file.

How many times can I download it?

As many times as you like. Sign in to your account and download it again at any time.

What if the file does not work?

Contact us with your order number and we will fix it or refund you.

Contents

  1. 1Forewordp. 0
  2. 2Prefacep. 0
  3. 3Finite Fieldsp. 1
  4. 4Elliptic Curvesp. 19
  5. 5Elliptic Curve Cryptographyp. 41
  6. 6Serializationp. 73
  7. 7Transactionsp. 87
  8. 8Scriptp. 103
  9. 9Transaction Creation and Validationp. 129
  10. 10Pay-to-Script Hashp. 143
  11. 11Blocksp. 163
  12. 12Networkingp. 177
  13. 13Simplified Payment Verificationp. 189
  14. 14Bloom Filtersp. 211
  15. 15Segwitp. 221
  16. 16Advanced Topics and Next Stepsp. 247
  17. 17Solutionsp. 251

Details

Author
Jimmy Song
Publisher
O'Reilly Media, Inc.
Edition
First edition, 2019
ISBN
9781492031499
Pages
321
Language
English
Formats
PDF (EPUB, Kindle or any other format on request)
File size
13.3 MB
Licence
Personal use, keep forever

Jimmy Song

Jimmy Song is the author of Programming Bitcoin, published by O'Reilly Media.

Buy with confidence

If your file does not open or download, we fix it or refund you. Read the refund policy.

More in Computer Science & Technology

See all

Think Bayes

Allen B. Downey

PDF · 338 pages

$9.99 Regular price $30.99 −68%

You save $21.00

Add to cart
Cover of 10-Minute Focus by Daniel Walter

Get a free ebook

Join the list and get 10-Minute Focus free, plus a short note when new books arrive.

Your cart

No products in the cart.

Subjects

More

Look inside

Sample