Learning Objectives – after this chapter you will be able to:
- Distinguish symmetric and asymmetric (public-key) cryptography.
- Explain how private keys, public keys and addresses relate.
- Describe how a transaction is signed and verified with ECDSA on secp256k1.
- Recognise newer signature schemes – Schnorr and BLS – and why they are used.
Symmetric vs Asymmetric Cryptography
| Basis | Symmetric | Asymmetric (Public-Key) |
|---|---|---|
| Keys | One shared secret key | A key pair: private key (secret) + public key (shared) |
| Key distribution | Hard – the secret must be shared safely | Easy – public keys can be published |
| Speed | Fast | Slower |
| Main blockchain use | Encrypting wallet files and backups | Digital signatures and address generation |
| Examples | AES | RSA, ECDSA, Schnorr, BLS |
Blockchains mostly use public-key cryptography for signing, not for encrypting data. Transactions on public blockchains are readable by everyone; signatures prove who authorised them.
Keys and Addresses
Private keyRandom 256-bit secret number k.
Public keyK = k × G (elliptic-curve multiplication on secp256k1). One-way.
AddressHash of the public key (Keccak-256 in Ethereum; SHA-256 + RIPEMD-160 in Bitcoin).
- Both Bitcoin and Ethereum use Elliptic Curve Cryptography (ECC) on the curve secp256k1.
- ECC provides strong security with small keys: a 256-bit ECC key gives security comparable to a much larger (about 3072-bit) RSA key.
- Computing K from k is easy; computing k from K (the elliptic-curve discrete logarithm problem) is infeasible.
Digital Signatures – Sign and Verify
Signing (sender’s wallet)
- Build the transaction data.
- Hash it (Keccak-256 in Ethereum).
- Use the private key and a fresh random value to compute the ECDSA signature
(r, s)(+ recovery idv). - Broadcast the transaction with the signature.
Verifying (every node)
- Hash the received transaction data.
- Use the signature and the hash to check validity against the sender’s public key (Ethereum recovers the public key from the signature).
- Derive the address and check it owns the funds.
- Reject the transaction if the check fails.
What a digital signature guarantees
- Authentication – the holder of the private key created it.
- Integrity – the data has not been changed after signing.
- Non-repudiation – the signer cannot later deny signing it.
ECDSA requires a unique, unpredictable random value for every signature. Re-using it for two signatures reveals the private key – a mistake that has caused real losses. Modern wallets derive it deterministically (RFC 6979) to avoid this.
Other Signature Schemes in Blockchains
| Scheme | Key idea | Used by |
|---|---|---|
| ECDSA | Standard elliptic-curve signature. | Bitcoin, Ethereum transactions |
| Schnorr | Simpler maths; multiple signatures can be combined into one, improving privacy and efficiency. | Bitcoin Taproot upgrade (BIP-340, activated 2021) |
| BLS | Thousands of signatures can be aggregated into one short signature. | Ethereum consensus-layer validators (attestations) |
| Multi-signature | Requires m of n keys to approve (e.g. 2-of-3). | Treasuries, exchanges, DAOs |
Future large-scale quantum computers could break ECC; research on post-quantum signature schemes is ongoing.
Key Takeaways
- Private key → public key (secp256k1) → address; each step is one-way.
- Signatures prove authorisation, integrity and non-repudiation of transactions.
- ECDSA secures transactions; Schnorr and BLS add aggregation and efficiency.
Question / Answer (15 questions)
Answer : It is cryptography that uses a pair of mathematically related keys: a private key kept secret by the owner and a public key that can be shared. Data signed with the private key can be verified by anyone using the public key.
Answer : Symmetric cryptography uses one shared secret key for both operations and is fast but requires secure key exchange. Asymmetric cryptography uses a public/private key pair, solves the key-distribution problem and enables digital signatures, but is slower.
Answer : Both use the secp256k1 elliptic curve for their key pairs and ECDSA signatures.
Answer : The public key is computed as K = k × G by elliptic-curve point multiplication. Reversing this requires solving the elliptic-curve discrete logarithm problem, for which no efficient classical algorithm is known.
Answer : A digital signature is a value produced from a message (usually its hash) and a private key. Anyone with the corresponding public key can verify that the signature was created by the key holder and that the message has not been changed.
Answer : Authentication (it was created by the private-key holder), integrity (the data was not altered after signing) and non-repudiation (the signer cannot later deny having signed).
Answer : The node hashes the transaction data, uses the signature values (v, r, s) to recover the signer’s public key, derives the address from it and checks that this address is the sender with sufficient balance and the correct nonce.
Answer : Public blockchains are meant to be transparent so all nodes can validate transactions. The main need is proving who authorised a transaction, not hiding it, so signatures are the primary use.
Answer : If the same random value is used to sign two different messages, an attacker can solve equations from the two signatures to compute the private key. Deterministic nonce generation (RFC 6979) prevents this.
Answer : The best known attacks on the elliptic-curve discrete logarithm problem are much less efficient than attacks on RSA factoring, so a 256-bit ECC key offers security comparable to a roughly 3072-bit RSA key.
Answer : Schnorr is a signature scheme with simpler mathematics that allows multiple signatures to be combined into one. Bitcoin adopted Schnorr signatures (BIP-340) in the Taproot upgrade activated in 2021.
Answer : BLS signatures can be aggregated: many validators’ signatures on the same data combine into one short signature. This makes it practical for hundreds of thousands of validators to attest each epoch.
Answer : A wallet that requires m of n designated keys to approve a transaction, for example 2-of-3. It reduces the risk of a single lost or stolen key.
Answer : No. Signing adds proof of authorisation and integrity, but the transaction data remains readable by everyone on a public blockchain.
Answer : A large-scale quantum computer running Shor’s algorithm could derive private keys from public keys on elliptic curves. Blockchains would then need to migrate to post-quantum signature schemes, which is an active research area.
MCQ Test : Check Your Understanding (5 questions)
Select an option and press Check Answer, or answer all questions and press Submit Test to see your score. Each answer comes with an explanation.
Bibliography/References
The notes, questions and MCQs on this page are original explanations written for this course. The works listed below were consulted and are cited for attribution and further reading. Product names, logos and trademarks belong to their respective owners. Short quotations, where used, are marked and attributed.
- National Institute of Standards and Technology. (2023). Digital Signature Standard (DSS) (FIPS 186-5). https://doi.org/10.6028/NIST.FIPS.186-5
- Certicom Research. (2010). SEC 2: Recommended Elliptic Curve Domain Parameters (Version 2.0). Standards for Efficient Cryptography Group. https://www.secg.org/sec2-v2.pdf
- Wuille, P., Nick, J., & Ruffing, T. (2020). BIP-340: Schnorr Signatures for secp256k1. Bitcoin Improvement Proposals. https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki
- ethereum.org. (n.d.). Proof-of-stake (PoS). Ethereum Developer Documentation. https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/
- Narayanan, A., Bonneau, J., Felten, E., Miller, A., & Goldfeder, S. (2016). Bitcoin and Cryptocurrency Technologies: A Comprehensive Introduction. Princeton University Press. ISBN 978-0-691-17169-2.
- Antonopoulos, A. M. (2017). Mastering Bitcoin: Programming the Open Blockchain (2nd ed.). O’Reilly Media.
- Antonopoulos, A. M., & Wood, G. (2018). Mastering Ethereum: Building Smart Contracts and DApps. O’Reilly Media.