Interactive demo: manual DSA math in the browser + Web Crypto ECDSA
Generates a DSA key pair with parameters p, q, α and private key d. Educational small primes (p ≈ 20,000–100,000) — not secure.
Sign a message with the generated private key. The signature is a pair (r, s).
Verify a signature with the public key.
Generates an ECDSA P-256 key pair via the Web Crypto API. Keys are shown as JWK JSON (not PEM DSA).
Sign with the ECDSA P-256 private key. The signature is a raw (r‖s) hex string.
Verify with the ECDSA P-256 public key kept in this tab.
| Characteristic | Manual DSA (JS BigInt) | Web Crypto ECDSA P-256 |
|---|---|---|
| Algorithm | DSA over a finite field (SHA-256) | ECDSA on NIST P-256 (SHA-256) |
| Key size | Small primes (not secure) | 256-bit elliptic curve (production-grade) |
| Performance | Slower (pure JS, trial-division primes) | Fast (native browser crypto) |
| Security | Educational only | Production-ready |
| Key format | Raw numbers (p, q, α, β, d) | JWK (JSON Web Key) |
| Use case | Understand the algorithm | Real applications |
Times a full keygen + sign + verify cycle for both implementations (real wall-clock, not simulated).