TheDigital Signature Algorithm (DSA) is apublic-key cryptosystem andFederal Information Processing Standard fordigital signatures, based on the mathematical concept ofmodular exponentiation and thediscrete logarithm problem. In a digital signature system, there is a keypair involved, consisting of a private and a public key. In this system a signing entity that declared their public key can generate a signature using their private key, and a verifier can assert the source if it verifies the signature correctly using the declared public key. DSA is a variant of theSchnorr andElGamal signature schemes.[1]: 486
TheNational Institute of Standards and Technology (NIST) proposed DSA for use in theirDigital Signature Standard (DSS) in 1991, and adopted it as FIPS 186 in 1994.[2] Five revisions to the initial specification have been released. The newest specification is:FIPS 186-5 from February 2023.[3] DSA is patented but NIST has made this patent available worldwide royalty-free. SpecificationFIPS 186-5 indicates DSA will no longer be approved for digital signature generation, but may be used to verify signatures generated prior to the implementation date of that standard.
The DSA works in the framework of public-key cryptosystems and is based on the algebraic properties ofmodular exponentiation, together with thediscrete logarithm problem, which is considered to be computationally intractable. The algorithm uses a key pair consisting of a public key and a private key. The private key is used to generate a digital signature for a message, and such a signature can be verified by using the signer's corresponding public key. The digital signature providesmessage authentication (the receiver can verify the origin of the message),integrity (the receiver can verify that the message has not been modified since it was signed) andnon-repudiation (the sender cannot falsely claim that they have not signed the message).
In 1982, the U.S government solicited proposals for a public key signature standard. In August 1991 theNational Institute of Standards and Technology (NIST) proposed DSA for use in their Digital Signature Standard (DSS). Initially there was significant criticism, especially fromsoftware companies that had already invested effort in developing digital signature software based on theRSA cryptosystem.[1]: 484 Nevertheless, NIST adopted DSA as a Federal standard (FIPS 186) in 1994. Five revisions to the initial specification have been released: FIPS 186–1 in 1998,[4] FIPS 186–2 in 2000,[5] FIPS 186–3 in 2009,[6] FIPS 186–4 in 2013,[3] and FIPS 186–5 in 2023.[7] Standard FIPS 186-5 forbids signing with DSA, while allowing verification of signatures generated prior to the implementation date of the standard as a document. It is to be replaced by newer signature schemes such asEdDSA.[8]
DSA is covered byU.S. patent 5,231,668, filed July 26, 1991 and now expired, and attributed to David W. Kravitz,[9] a formerNSA employee. This patent was given to "The United States of America as represented by theSecretary of Commerce, Washington, D.C.", and NIST has made this patent available worldwide royalty-free.[10]Claus P. Schnorr claims that hisU.S. patent 4,995,082 (also now expired) covered DSA; this claim is disputed.[11]
In 1993, Dave Banisar managed to get confirmation, via aFOIA request, that the DSA algorithm hasn't been designed by the NIST, but by theNSA.[12]
OpenSSH announced that DSA was going to be removed in 2025. The support was entirely dropped in version 10.0.[13][14]
The DSA algorithm involves four operations: key generation (which creates the key pair), key distribution, signing and signature verification.
Key generation has two phases. The first phase is a choice ofalgorithm parameters which may be shared between different users of the system, while the second phase computes a single key pair for one user.
The algorithm parameters are (,,). These may be shared between different users of the system.
Given a set of parameters, the second phase computes the key pair for a single user:
is the private key and is the public key.
The signer should publish the public key. That is, they should send the key to the receiver via a reliable, but not necessarily secret, mechanism. The signer should keep the private key secret.
A message is signed as follows:
The signature is
The calculation of and amounts to creating a new per-message key. The modular exponentiation in computing is the most computationally expensive part of the signing operation, but it may be computed before the message is known.Calculating the modular inverse is the second most expensive part, and it may also be computed before the message is known. It may be computed using theextended Euclidean algorithm or usingFermat's little theorem as.
One can verify that a signature is a valid signature for a message as follows:
The signature scheme is correct in the sense that the verifier will always accept genuine signatures. This can be shown as follows:
First, since, it follows that byFermat's little theorem. Since and is prime, must have order .
The signer computes
Thus
Since has order we have
Finally, the correctness of DSA follows from
With DSA, the entropy, secrecy, and uniqueness of the random signature value are critical. It is so critical that violating any one of those three requirements can reveal the entire private key to an attacker.[17] Using the same value twice (even while keeping secret), using a predictable value, or leaking even a few bits of in each of several signatures, is enough to reveal the private key.[18]
This issue affects both DSA and Elliptic Curve Digital Signature Algorithm (ECDSA) – in December 2010, the groupfail0verflow announced the recovery of theECDSA private key used bySony to sign software for thePlayStation 3 game console. The attack was made possible because Sony failed to generate a new random for each signature.[19]
This issue can be prevented by deriving deterministically from the private key and the message hash, as described byRFC 6979. This ensures that is different for each and unpredictable for attackers who do not know the private key.
In addition, malicious implementations of DSA and ECDSA can be created where is chosen in order tosubliminally leak information via signatures. For example, anoffline private key could be leaked from a perfect offline device that only released innocent-looking signatures.[20]
This sectiondoes notcite anysources. Please helpimprove this section byadding citations to reliable sources. Unsourced material may be challenged andremoved.(June 2024) (Learn how and when to remove this message) |
Below is a list of cryptographic libraries that provide support for DSA:
{{cite web}}: CS1 maint: bot: original URL status unknown (link)