DSA Key Generator
Free online DSA key generator: generate DSA key pairs in your browser with pure JavaScript BigInt cryptography. Pick FIPS 186-4 domain parameters (1024/160, 2048/224, 2048/256), export OpenSSL-compatible DSA private key and DSA public key PEM files, and test DSA signatures with RFC 6979 deterministic signing. No install, no sign-up, 100% client-side.
1 — Generate DSA key pair
Key pair
Private key PEM (DSA PRIVATE KEY — keep secret)
Public key PEM (PUBLIC KEY — safe to share)
Domain parameters
2 — Sign & verify playground
Sign a message with your freshly generated private key using deterministic RFC 6979 k (HMAC-SHA-256), then verify the (r, s) signature. Edit the message and re-verify to watch it fail.
How this DSA key generator works
A DSA key pair starts from domain parameters: a large prime p (L bits), a prime divisor q of p−1 (N bits), and a generator g of the subgroup of order q. Key generation itself is then trivial: pick a random secret x in [1, q−1] and compute the public key y = gx mod p. The expensive part is finding p and q — this tool uses the Miller-Rabin primality test (the same family of test OpenSSL uses) with fresh entropy from crypto.getRandomValues.
What you get from this free DSA key generator online
- DSA parameter generator: generate DSA parameters online — fresh
p, q, gvia Miller-Rabin, or instant built-in FIPS 186-4 sets. - DSA private key generator + DSA public key generator: secret
xand publicy = gx mod p, with the math re-verified in your browser. - DSA PEM generator: download OpenSSL-compatible
DSA PRIVATE KEYandPUBLIC KEYPEM files. - DSA signature lab: sign messages with deterministic RFC 6979
kand verify the(r, s)signature — the complete workflow to generate DSA keys online with zero server contact.
Supports legacy DSA 1024 (1024/160) through DSA 2048 (2048/224 and 2048/256) FIPS 186-4 pairs. Remember: DSA is deprecated for new cryptography — FIPS 186-5 removed it — so treat every key from any DSA key generator online free tool as a test key, never a production secret.
| L (p bits) | N (q bits) | Status | Generate fresh in-browser |
|---|---|---|---|
| 1024 | 160 | Legacy only | ~1 second |
| 2048 | 224 | FIPS 186-4 approved* | tens of seconds |
| 2048 | 256 | FIPS 186-4 approved* | tens of seconds |
*Approved by FIPS 186-4, but DSA itself was removed from FIPS 186-5 (2023) — approved ≠ recommended for new systems.
DSA vs ECDSA vs RSA
| DSA (this tool) | ECDSA | RSA | |
|---|---|---|---|
| Math basis | Discrete log, modular arithmetic | Discrete log, elliptic curves | Integer factorization |
| Key size for ~112-bit security | 2048-bit p | 224-bit curve | 2048-bit modulus |
| Signatures only? | Yes | Yes | No (also encryption) |
| FIPS 186-5 status | Removed | Approved | Approved |
| Use for new systems? | No — testing/legacy only | Yes | Yes |
OpenSSL command equivalents
Prefer the terminal? These OpenSSL commands do the same job. PEM files downloaded from this page are directly readable by OpenSSL:
openssl dsaparam -out dsa.pem 2048 # domain parameters p, q, g openssl gendsa -out dsa-key.pem dsa.pem # DSA private key (x + params) openssl dsa -in dsa-key.pem -pubout -out dsa-pub.pem # DSA public key (y) openssl dgst -sha256 -sign dsa-key.pem -out sig.bin file.txt openssl dgst -sha256 -verify dsa-pub.pem -signature sig.bin file.txt
Frequently asked questions
What is a DSA key generator?
How do I generate a DSA key pair in my browser?
Is DSA still secure? Should I use it for new systems?
What are the DSA parameters p, q, and g?
What is the difference between DSA and ECDSA?
What are the OpenSSL equivalents of this tool?
Are my generated private keys sent to a server?
Why does signing use RFC 6979 deterministic k?
Free tool by NRTechStudio