Skip to content
ecdsa.com

DSA (Digital Signature Algorithm)

The finite-field discrete-logarithm signature algorithm of FIPS 186 (1994), withdrawn by FIPS 186-5 in 2023 for new signatures and kept only for verifying existing ones.
Also written asDigital Signature Algorithmssh-dssDSS

Domain parameters are a prime p (1024–3072 bits), a prime q dividing p − 1 (160, 224 or 256 bits) and a generator g of the order-q subgroup. A signature is r = (gᵏ mod p) mod q and s = k⁻¹·(z + x·r) mod q, the same structure as ECDSA, which is its elliptic-curve analogue, and it shares the same failure mode: a repeated or predictable k reveals the private key x. RFC 6979 covers DSA as well as ECDSA.

FIPS 186-5 states that DSA "is no longer specified in this standard and may only be used to verify previously generated digital signatures". OpenSSH disabled ssh-dss keys by default in 2015 and removed DSA support entirely in OpenSSH 10.0 (April 2025); GnuPG still reads old DSA/ElGamal keys, and many libraries keep DSA verification for archives.

Signatures are encoded like ECDSA ones: a DER SEQUENCE of the two integers in X.509 and CMS (for example dsa-with-SHA256, 2.16.840.1.101.3.4.3.2) or two fixed-length integers elsewhere. If you still find DSA keys, replace them with Ed25519 or ECDSA P-256 and keep DSA only where old signatures must be checked.

Standards and references

All terms