Introduction to Cryptography
Cryptography is the science of secret communication. It lets you prove ownership, verify authenticity, and keep information private—all without needing to trust anyone. Bitcoin relies entirely on cryptography to work without banks or governments.
What is cryptography?
- •Definition: The practice of securing information using mathematical techniques.
- •Goal: Enable secure communication and verification in an insecure environment.
- •Foundation: Based on mathematical problems that are easy to do one way but nearly impossible to reverse (one-way functions).
- •Bitcoin's use: Proves ownership of coins, secures transactions, and creates digital scarcity without central authority.
Key Definitions:
- •Encryption: Converting readable data (plaintext) into unreadable data (ciphertext) using a key.
- •Decryption: Converting ciphertext back to plaintext using a key.
- •Key: Secret information used to encrypt or decrypt data.
- •Cipher: The algorithm or method used for encryption/decryption.
- •Plaintext: The original, readable message before encryption.
- •Ciphertext: The scrambled, unreadable message after encryption.
Two Types of Cryptography:
Symmetric Encryption (Shared Secret)
- •Same key encrypts and decrypts
- •Example: AES, used for file encryption
- •Problem: How do you securely share the key?
- •Fast and efficient
- •Like a physical lock—anyone with the key can open and close it
Asymmetric Encryption (Public Key Cryptography)
- •Two keys: public key (share freely) and private key (keep secret)
- •Public key encrypts, private key decrypts
- •Example: RSA, ECC (Bitcoin uses elliptic curve)
- •Solves key distribution problem
- •Slower but enables trustless verification
- •Like a mailbox—anyone can drop mail in (public), only you can open it (private)
How Bitcoin Uses Cryptography:
- •Ownership: Your private key proves you own your Bitcoin.
- •Transactions: Digital signatures prove you authorized a transaction.
- •Addresses: Public keys are hashed to create addresses.
- •Security: Even if someone knows your public key/address, they can't steal your coins without the private key.
- •Verification: Anyone can verify signatures are valid without knowing private keys.
- •Mining: Hash functions (cryptographic) secure the proof-of-work system.
One-Way Functions (The Magic Behind It):
Cryptography relies on mathematical operations that are easy one way, nearly impossible the other:
- •Easy: Multiply 7,919 × 7,907 = 62,615,033
- •Hard: Factor 62,615,033 back into its prime components
With large enough numbers (256+ bits), reversing these operations would take longer than the age of the universe with current computers.
Test Your Knowledge
This lesson includes a 3-question quiz (passing score: 75%).
Quiz functionality available in the mobile app.