The Digital Signature Algorithm (DSA) is a "Federal Information Processing Standard for "digital signatures. In August 1991 the "National Institute of Standards and Technology (NIST) proposed DSA for use in their Digital Signature Standard (DSS) and adopted it as FIPS 186 in 1993.^{[1]}^{["not in citation given]} Four revisions to the initial specification have been released: FIPS 1861 in 1996,^{[2]} FIPS 1862 in 2000,^{[3]} FIPS 1863 in 2009,^{[4]} and FIPS 1864 in 2013.^{[5]}
DSA is covered by U.S. Patent 5,231,668, filed July 26, 1991 and attributed to David W. Kravitz,^{[6]} a former "NSA employee. This patent was given to "The United States of America as represented by the "Secretary of Commerce, Washington, D.C.", and NIST has made this patent available worldwide "royaltyfree.^{[7]} "Claus P. Schnorr claims that his U.S. Patent 4,995,082 (expired) covered DSA; this claim is disputed.^{[8]} DSA is a variant of the "ElGamal signature scheme.
Key generation[edit]
Key generation has two phases. The first phase is a choice of algorithm parameters which may be shared between different users of the system, while the second phase computes public and private keys for a single user.
Parameter generation[edit]
 Choose an approved "cryptographic hash function H. In the original DSS, H was always "SHA1, but the stronger "SHA2 hash functions are approved for use in the current DSS.^{[5]}^{[9]} The hash output may be truncated to the size of a key pair.
 Decide on a key length L and N. This is the primary measure of the "cryptographic strength of the key. The original DSS constrained L to be a multiple of 64 between 512 and 1,024 (inclusive). NIST 80057 recommends lengths of 2,048 (or 3,072) for keys with security lifetimes extending beyond 2010 (or 2030), using correspondingly longer N.^{[10]} FIPS 1863 specifies L and N length pairs of (1,024, 160), (2,048, 224), (2,048, 256), and (3,072, 256).^{[4]} N must be less than or equal to the output length of the hash H.
 Choose an Nbit prime q.
 Choose an Lbit prime p such that p − 1 is a multiple of q.
 Choose g, a number whose "multiplicative order modulo p is q. This means that q is the smallest positive integer such that g^{q}=1 mod p. This may be done by setting g = h^{(p − 1)/q} mod p for some arbitrary h (1 < h < p − 1), and trying again with a different h if the result comes out as 1. Most choices of h will lead to a usable g; commonly h = 2 is used.
The algorithm parameters (p, q, g) may be shared between different users of the system.
Peruser keys[edit]
Given a set of parameters, the second phase computes private and public keys for a single user:
 Choose a secret key x by some random method, where 0 < x < q.
 Calculate the public key y = g^{x} mod p.
There exist efficient algorithms for computing the "modular exponentiations h^{(p − 1)/q} mod p and g^{x} mod p, such as "exponentiation by squaring.
Signing[edit]
Let $H$ be the hashing function and $m$ the message:
 Generate a random permessage value $k$ where $1<k<q$
 Calculate $r=\left(g^{k}{\bmod {\,}}p\right){\bmod {\,}}q$
 In the unlikely case that $r=0$, start again with a different random $k$
 Calculate $s=k^{1}\left(H\left(m\right)+xr\right){\bmod {\,}}q$
 In the unlikely case that $s=0$, start again with a different random $k$
 The signature is $\left(r,s\right)$
The first two steps amount to creating a new permessage key. The modular exponentiation here is the most computationally expensive part of the signing operation, and it may be computed before the message hash is known. The modular inverse $k^{1}{\bmod {\,}}q$ is the second most expensive part, and it may also be computed before the message hash is known. It may be computed using the "extended Euclidean algorithm or using "Fermat's little theorem as $k^{q2}{\bmod {\,}}q$.
Verifying[edit]
 Reject the signature if $0<r<q$ or $0<s<q$ is not satisfied.
 Calculate $w=s^{1}{\bmod {\,}}q$
 Calculate $u_{1}=H\left(m\right)\cdot w\,{\bmod {\,}}q$
 Calculate $u_{2}=r\cdot w\,{\bmod {\,}}q$
 Calculate $v=\left(g^{u_{1}}y^{u_{2}}{\bmod {\,}}p\right){\bmod {\,}}q$
 The signature is invalid unless $v=r$
DSA is similar to the "ElGamal signature scheme.
Correctness of the algorithm[edit]
The signature scheme is correct in the sense that the verifier will always accept genuine signatures. This can be shown as follows:
First, if ${\textstyle g=h^{(p1)/q}~{\text{mod}}~p}$, it follows that ${\textstyle g^{q}\equiv h^{p1}\equiv 1\mod p}$ by "Fermat's little theorem. Since $g>0$ and $q$ is prime, $g$ must have order $q$.
The signer computes
 $s=k^{1}(H(m)+xr){\bmod {\,}}q$
Thus
 ${\begin{aligned}k&\equiv H(m)s^{1}+xrs^{1}\\&\equiv H(m)w+xrw{\pmod {q}}\end{aligned}}$
Since $g$ has order $q~({\text{mod}}~p)$ we have
 ${\begin{aligned}g^{k}&\equiv g^{H(m)w}g^{xrw}\\&\equiv g^{H(m)w}y^{rw}\\&\equiv g^{u_{1}}y^{u_{2}}{\pmod {p}}\end{aligned}}$
Finally, the correctness of DSA follows from
 ${\begin{aligned}r&=(g^{k}{\bmod {\,}}p){\bmod {\,}}q\\&=(g^{u_{1}}y^{u_{2}}{\bmod {\,}}p){\bmod {\,}}q\\&=v\end{aligned}}$
Sensitivity[edit]
With DSA, the entropy, secrecy, and uniqueness of the random signature value k are critical. It is so critical that violating any one of those three requirements can reveal the entire private key to an attacker.^{[11]} Using the same value twice (even while keeping k secret), using a predictable value, or leaking even a few bits of k in each of several signatures, is enough to reveal the private key x.^{[12]}
This issue affects both DSA and "ECDSA – in December 2010, a group calling itself fail0verflow announced recovery of the "ECDSA private key used by "Sony to sign software for the "PlayStation 3 game console. The attack was made possible because Sony failed to generate a new random k for each signature.^{[13]}
This issue can be prevented by deriving k deterministically from the private key and the message hash, as described by "RFC 6979. This ensures that k is different for each H(m) and unpredictable for attackers who do not know the private key x.
In addition, malicious implementations of DSA and ECDSA can be created where k is chosen in order to "subliminally leak information via signatures. For example an "offline private key could be leaked from a perfect offline device that only released innocentlooking signatures.^{[14]}
See also[edit]
References[edit]
 ^ "FIPS PUB 186]: Digital Signature Standard (DSS), 19940519". csrc.nist.gov.
 ^ "FIPS PUB 1861: Digital Signature Standard (DSS), 19981215" (PDF). csrc.nist.gov. Archived from the original (PDF) on 20131226.
 ^ "FIPS PUB 1862: Digital Signature Standard (DSS), 20000127" (PDF). csrc.nist.gov.
 ^ ^{a} ^{b} "FIPS PUB 1863: Digital Signature Standard (DSS), June 2009" (PDF). csrc.nist.gov.
 ^ ^{a} ^{b} "FIPS PUB 1864: Digital Signature Standard (DSS), July 2013" (PDF). csrc.nist.gov.
 ^ Dr. David W. Kravitz Archived January 9, 2013, at the "Wayback Machine.
 ^ Werner Koch. "DSA and patents"
 ^ Minutes of the Sept. 94 meeting of the Computer System Security and Privacy Advisory Board
 ^ "FIPS PUB 1804: Secure Hash Standard (SHS), March 2012" (PDF). csrc.nist.gov.
 ^ "NIST Special Publication 80057" (PDF). csrc.nist.gov. Archived from the original (PDF) on 20140606.
 ^ "The Debian PGP disaster that almost was". root labs rdist.
 ^ DSA kvalue Requirements
 ^ Bendel, Mike (20101229). "Hackers Describe PS3 Security As Epic Fail, Gain Unrestricted Access". Exophase.com. Retrieved 20110105.
 ^ https://arxiv.org/abs/1501.00447v1
External links[edit]

Algorithms 

Theory 

Standardization 

Topics 




)
)