The Digital Signature Algorithm (DSA) is a method for creating and checking digital signatures, published as a United States federal standard by the National Institute of Standards and Technology (NIST). A signer uses a secret private key to produce a signature on a message, and anyone holding the matching public key can confirm that the signature is genuine and that the message has not been altered. DSA was proposed in 1991 and adopted in the Digital Signature Standard, FIPS 186, in 1994.
DSA belongs to the family of public-key methods studied in cryptography. Its security rests on the discrete logarithm problem: calculating powers of a number modulo a large prime is easy, but reversing the calculation is believed to be infeasible for well-chosen sizes. It is used for authentication and integrity checks rather than secrecy: DSA only signs; unlike RSA, it is not designed for encryption. Its elliptic-curve version, ECDSA, uses the same structure with shorter keys and is the signature scheme behind the Bitcoin blockchain and the Ethereum blockchain.
DSA in plain terms
A handwritten signature is easy to copy and says nothing about whether the page above it was changed. A digital signature fixes both problems. The signer has a private stamp that only they hold, and everyone else has a public magnifying glass that can check the stamp. The stamp's mark depends on the exact words of the document, so changing a single letter makes the check fail.
DSA is one recipe for making such stamps, and it is one of the technical methods that can sit behind a legally recognized e-signature. The maths ensures that seeing many stamped documents does not reveal the private stamp itself. The method relies on a fresh random number for every signature, and if that number is reused or predictable, the private key can be worked out, which has caused real losses.
How DSA works
The system uses public parameters: a large prime , a smaller prime that divides , and a generator . The signer chooses a private key and publishes the public key . To sign a message , the signer computes its hash with a cryptographic hash function, picks a secret random number and calculates the two parts of the signature:
- is the number that multiplied by gives 1, working modulo .
- is the private key and the message hash.
- The pair is the signature.
A verifier computes , and , then checks whether equals .
A toy example with tiny numbers shows the steps. Take , , , private key , so . Let and . Then , so . The inverse of 7 modulo 11 is 8, so . To verify, , , , and , which matches . Real systems use primes thousands of bits long.
ECDSA and use in crypto
The Elliptic Curve Digital Signature Algorithm replaces calculations with large primes by operations on points of an elliptic curve. It offers similar security with much smaller keys and signatures, which saves space on a blockchain. Bitcoin and Ethereum use ECDSA over a curve called secp256k1: transactions are hashed with functions such as SHA-256, and every transaction carries a signature proving that the owner of the address authorized it, and nodes verify it before accepting the transaction. Bitcoin added Schnorr signatures as an alternative with the Taproot upgrade in 2021, and many newer blockchains use the Ed25519 scheme.
Weaknesses and incidents
The random value , often called a nonce, is the scheme's weak point. If the same is used for two signatures with one key, anyone can calculate the private key from the two signatures. This flaw exposed the signing key of a major games console in 2010, and in 2013 a faulty random-number generator on Android devices led to thefts from Bitcoin wallets that reused values. Modern implementations derive deterministically from the key and message to avoid this problem. Keys are often protected in a hardware security module in banking.
Status and the quantum threat
NIST's 2023 revision of the standard, FIPS 186-5, withdrew approval for creating new signatures with classic DSA, leaving it only for verifying existing ones, while keeping ECDSA and adding EdDSA. A large quantum computer running Shor's algorithm could break DSA, ECDSA and RSA alike, so NIST published post-quantum signature standards in 2024, including ML-DSA in FIPS 204. Banks, certificate authorities and blockchain developers are planning migrations, a slow process for blockchains whose old addresses expose public keys.