You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
A digital signature is a cryptographic mechanism that provides authentication, integrity, and non-repudiation for digital documents, messages, and transactions. It is the digital equivalent of a handwritten signature — but far more secure and verifiable.
| Property | Description |
|---|---|
| Authentication | Confirms the identity of the signer |
| Integrity | Proves the message has not been altered since signing |
| Non-repudiation | The signer cannot deny having signed the document |
Note: Digital signatures do not provide confidentiality — the message itself is not encrypted. Use encryption separately if confidentiality is required.
1. Hash the message: digest = SHA-256(message)
2. Sign the hash: signature = Encrypt(digest, signer's PRIVATE key)
3. Send: message + signature + signer's certificate
1. Hash the received message: digest₁ = SHA-256(received message)
2. Decrypt the signature: digest₂ = Decrypt(signature, signer's PUBLIC key)
3. Compare: if digest₁ == digest₂ → signature is VALID
if digest₁ != digest₂ → signature is INVALID
Signer Verifier
│ │
│ 1. Hash message ──▶ digest │
│ 2. Encrypt digest with private key │
│ ──▶ signature │
│ │
│ ──── message + signature ────▶ │
│ │
│ 1. Hash message ──▶ digest₁
│ 2. Decrypt signature with public key ──▶ digest₂
│ 3. Compare digest₁ and digest₂
| RSA Key Size | Security Level |
|---|---|
| 2048 bits | 112-bit security (minimum recommended) |
| 3072 bits | 128-bit security |
| 4096 bits | ~152-bit security |
| ECDSA Key Size | Equivalent RSA Key Size | Signature Size |
|---|---|---|
| 256 bits | 3072 bits | ~64 bytes |
| 384 bits | 7680 bits | ~96 bytes |
| Property | Value |
|---|---|
| Key size | 256 bits |
| Signature size | 64 bytes |
| Deterministic | Yes — no random nonce needed, eliminating a class of implementation vulnerabilities |
| Speed | Very fast signature generation and verification |
| Usage | SSH keys, Signal Protocol, Tor, WireGuard |
EdDSA/Ed25519 is considered the best choice for new implementations due to its speed, small size, and resistance to implementation errors.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.