Digital Signature Algorithm

From Wikipedia, the free encyclopedia

The Digital Signature Algorithm (DSA) is a United States Federal Government standard or FIPS for digital signatures. It was proposed by the National Institute of Standards and Technology (NIST) in August 1991 for use in their Digital Signature Standard (DSS), specified in FIPS 186 [1], adopted in 1993. A minor revision was issued in 1996 as FIPS 186-1 [2], and the standard was expanded further in 2000 as FIPS 186-2 [3].

DSA is covered by U.S. Patent 5,231,668 , filed July 26, 1991, and attributed to David W. Kravitz, 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 the NIST has made this patent available world-wide royalty-free. [4] Dr. Claus P. Schnorr claims that his U.S. Patent 4,995,082  covers DSA; this claim is disputed.

Contents

  • Choose a 160-bit prime q.
  • Choose an L-bit prime p, such that p=qz+1 for some integer z, 512 ≤ L ≤ 1024, and L is divisible by 64.
    Note: FIPS-186-2, change notice 1 specifies that L should only assume the value 1024.
  • Choose h, where 1 < h < p − 1 such that g = hz mod p > 1. (Recall that z = (p-1) / q.)
  • Choose x by some random method, where 0 < x < q.
  • Calculate y = gx mod p.
  • Public key is (p, q, g, y). Private key is x.

Note that (p, q, g) can be shared between different users of the system, if desired.

The forthcoming FIPS 186-3 (available as a draft [5]) uses SHA-224/256/384/512 as the hash function, q of size 224 and 256 bits, and L equal to 2048 and 3072, respectively.

There exist efficient algorithms for computing the modular exponentiations hz mod p and gx mod p. Most numbers h satisfy the requirement, so the value 2 is commonly used.

  • Generate a random per message value k where 0 < k < q
  • Calculate r = (gk mod p) mod q
  • Calculate s = (k-1(SHA-1(m) + x*r)) mod q, where SHA-1(m) is the SHA-1 hash function applied to the message m
  • Recalculate the signature in the unlikely case that r=0 or s=0
  • The signature is (r,s)

The extended Euclidean algorithm can be used to compute the modular inverse k-1 mod q.

  • Reject the signature if either 0< r s
  • Calculate w = (s)-1 mod q
  • Calculate u1 = (SHA-1(m)*w) mod q
  • Calculate u2 = (r*w) mod q
  • Calculate v = ((gu1*yu2) mod p) mod q
  • The signature is valid if v = r

DSA is similar to the ElGamal signature scheme.

The signature scheme is correct in the sense that the verifier will always accept genuine signatures. This can be shown as follows:

From g = hz mod p follows gqhqzhp-1 ≡ 1 (mod p) by Fermat's little theorem. Since g>1 and q is prime it follows that g has order q.

The signer computes

s=k^{-1}(\mbox{SHA-1}(m)+xr) \mod{q}.

Thus

\begin{matrix} k & \equiv & \mbox{SHA-1}(m)s^{-1}+xrs^{-1}\\   & \equiv & \mbox{SHA-1}(m)w + xrw \pmod{q}.\\ \end{matrix}

Since g has order q we have

\begin{matrix} g^k & \equiv & g^{{\rm SHA-1}(m)w}g^{xrw}\\     & \equiv & g^{{\rm SHA-1}(m)w}y^{rw}\\     & \equiv & g^{u1}y^{u2} \pmod{p}.\\ \end{matrix}

Finally, the correctness of DSA follows from

r=(g^k \mod p) \mod q = (g^{u1}y^{u2} \mod p) \mod q = v.

Public-key cryptography
v  d  e
Algorithms: Cramer-Shoup | DH | DSA | ECDH | ECDSA | EKE | ElGamal | GMR | IES | Lamport | MQV | NTRUEncrypt | NTRUSign | Paillier | Rabin | RSA | Schnorr | SPEKE | SRP | XTR
Theory: Discrete logarithm | Elliptic curve cryptography | RSA problem
Standardization: ANS X9F1 | CRYPTREC | IEEE P1363 | NESSIE | NSA Suite B   Misc: Digital signature | Fingerprint | PKI | Web of trust | Key size
Cryptography
v  d  e
History of cryptography | Cryptanalysis | Cryptography portal | Topics in cryptography
Symmetric-key algorithm | Block cipher | Stream cipher | Public-key cryptography | Cryptographic hash function | Message authentication code | Random numbers
Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.