Skip to content

Instantly share code, notes, and snippets.

View ismaelsadeeq's full-sized avatar
🍭
learning and building

Abubakar Sadiq Ismail ismaelsadeeq

🍭
learning and building
View GitHub Profile
@NeilMadden
NeilMadden / crypto.py
Last active September 10, 2025 16:46
A Lazy Developer’s Guide to Modern Cryptography
#!/usr/bin/env python3
# Copyright 2024 Neil Madden.
# License: https://creativecommons.org/licenses/by-sa/4.0/deed.en.
# Like this? I do training courses & consultancy:
# https://illuminated-security.com/
import hashlib
import math
import os

A description of known problems in Satoshi Nakamoto's paper, "Bitcoin: A Peer-to-Peer Electronic Cash System", as well as notes on terminology changes and how Bitcoin's implementation differs from that described in the paper.

Abstract

The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power.