L03: Cryptographic Foundations
Experience hash functions, the avalanche effect, and public-key cryptography using interactive tools.
SHA-256 Hash Demo
Guided Activities
1
Hash Functions Hands-On
Anders Brownworth Hash — Embed- In the embedded hash demo above, type "Hello" and observe the SHA-256 hash.
- Now change it to "hello" (lowercase h). Notice the entire hash changes completely!
- This is called the "avalanche effect" — a tiny input change produces a completely different hash.
- Try typing your name. Now add a single space at the end. Compare the two hashes.
- Try to predict: will "Alice" and "Bob" produce similar hashes? Test it!
Discussion: Why is the avalanche effect critical for blockchain security? What would happen if similar inputs produced similar hashes?
- Go to emn178.github.io/online-tools/sha256.html
- Type "Bitcoin" and note the resulting hash.
- Now type "bitcoin" (lowercase b). How many characters of the hash are different?
- Hash an empty string (clear the input). What result do you get? (This is a well-known constant!)
- Try hashing a very long paragraph of text. Is the output still the same 64-character length?
Discussion: Can you find two different inputs that produce the same SHA-256 hash? Why is this practically impossible?
- Go to gchq.github.io/CyberChef/ (this is a tool built by UK's intelligence agency GCHQ)
- In the "Operations" panel on the left, search for "SHA-256" and drag it to the "Recipe" area.
- Type "Cryptoeconomics" in the "Input" box. The hash appears instantly in the "Output" box.
- Copy the hash output.
- Now search for "To Base64" in Operations and drag it AFTER the SHA-256 step in your Recipe. Notice how the output changes — this is encoding, not hashing.
Discussion: What is the fundamental difference between hashing and encoding? Can you reverse a hash? Can you reverse an encoding?
- Go to bitaddress.org (this tool runs entirely client-side in your browser — no data is sent to any server).
- Move your mouse randomly across the screen to generate cryptographic entropy (randomness).
- Once complete, observe the generated: Private Key (WIF format), Public Key, and Bitcoin Address.
- Notice: the private key is 256 bits (64 hex characters), but the Bitcoin address is much shorter.
- WARNING: Do NOT use these generated keys for real funds — this is for educational purposes only.
Discussion: Why can you derive the Bitcoin address from the private key, but NOT derive the private key from the Bitcoin address? What mathematical concept makes this possible?
Alternative Tool
- If bitaddress.org triggers a browser security warning, try iancoleman.io/bip39 as an alternative for BIP-39 mnemonic and key generation.
© Joerg Osterrieder 2025-2026. All rights reserved.