Public and Private Keys
Bitcoin uses the ECDSA digital signature algorithm, an asymmetric encryption method. Asymmetric encryption involves paired keys: public and private keys.
Public Key: Shared openly for digital verification and encryption.
Private Key: Kept securely by the owner for digital signing and decryption.
Below is a simplified explanation of the underlying principles—without delving into specific algorithmic implementations.
Encryption and Decryption
Setup
- Private Key:
k - Public Key:
K Elliptic Curve Base Point:
G- Relationship:
K = k * G(private → public is irreversible).
- Relationship:
- Message:
Message - Message Digest:
Digest - Encrypted Message:
Encryption - Random Number:
X
Encryption Process
- Message Digest:
Digest = G * X - Digital Signature:
Encryption = K * X + Message - Send
DigestandEncryptionto the recipient.
Decryption Process
Message = Encryption - K * X
- Breakdown:
= Encryption - (k * G) * X= Encryption - k * (G * X)= Encryption - k * Digest
Digital Signatures & Verification
Setup
- Private Key:
k - Public Key:
K(withK = k * G) - Temporary Private Key:
r - Temporary Public Key:
R = r * G - Message:
Message - Hashed Message:
hash - Signature:
Signature
Signing Process
- Compute temporary public key:
R = r * G. - Generate signature:
Signature = [detailed formula](omitted for brevity). - Send
R,Message, andSignatureto the recipient.
Verification Process
Verification checks if the computed r * G matches the received R using:
- Public key
K. - Original
Message. Signature.
👉 Explore more about blockchain security
FAQ
Q1: Why use asymmetric encryption in blockchain?
Asymmetric encryption ensures secure transactions without exposing private keys, enabling trustless verification.
Q2: How does ECDSA enhance Bitcoin security?
ECDSA provides robust mathematical security, making private key forgery computationally infeasible.
Q3: What happens if a private key is lost?
Lost private keys render associated assets irrecoverable—underscoring the need for secure storage.
👉 Learn advanced key management