ArticleslgStudy

computer science

Digital Signature Algorithm

Digital Signature Algorithm is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Digital Signature Algorithm rather than just read about it. In short: The Digital Signature Algorithm (DSA) is a public-key cryptosystem and Federal Information Processing Standard for digital signatures, based on the mathematical concept of modular exponentiation and the discrete logarithm problem. In a digital signature system, there is a keypair involved, consisting of a private and a public key.

Key takeaways

  • Digital Signature Algorithm belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Digital Signature Algorithm to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Digital Signature Algorithm from memory before moving on to harder problems.

Reference excerpt

The Digital Signature Algorithm (DSA) is a public-key cryptosystem and Federal Information Processing Standard for digital signatures, based on the mathematical concept of modular exponentiation and the discrete 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 the Schnorr and ElGamal signature schemes. The National Institute of Standards and Technology (NIST) proposed DSA for use in their Digital Signature Standard (DSS) in 1991, and adopted it as FIPS 186 in 1994. Five revisions to the initial specification have been released. The last standard, however, removed NIST's approval for DSA signature generation.

Overview The DSA works in the framework of public-key cryptosystems and is based on the algebraic properties of modular exponentiation, together with the discrete 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 provides message 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) and non-repudiation (the sender cannot falsely claim that they have not signed the message).

History In 1982, the U.S government solicited proposals for a public key signature standard. In August 1991 the National Institute of Standards and Technology (NIST) proposed DSA for use in their Digital Signature Standard (DSS). Initially there was significant criticism, especially from software companies that had already invested effort in developing digital signature software based on the RSA cryptosystem. 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, FIPS 186–2 in 2000, FIPS 186–3 in 2009, FIPS 186–4 in 2013, and FIPS 186–5 in 2023. 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 as EdDSA. DSA is covered by U.S. patent 5,231,668, filed July 26, 1991 and now expired, 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 NIST has made this patent available worldwide royalty-free. Claus P. Schnorr claims that his U.S. patent 4,995,082 (also now expired) covered DSA; this claim is disputed. In 1993, Dave Banisar managed to get confirmation, via a FOIA request, that the DSA algorithm wasn't been designed by the NIST, but by the NSA. In February 2023, NIST released FIPS 186-5, which deprecates DSA for generating new signatures but allows it to be used to verify pre-existing signatures. OpenSSH announced that DSA was going to be removed in 2025. The support was entirely dropped in version 10.0.

Operation The DSA algorithm involves four operations: key generation (which creates the key pair), key distribution, signing and signature verification.

1. Key generation 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 a single key pair for one user.

Parameter generation Choose an approved cryptographic hash function H with output length |H| bits. In the original DSS, H was always SHA-1, but the stronger SHA-2 hash functions are approved for use in the current DSS. If |H| is greater than the modulus length N, only the leftmost N bits of the hash output are used. Choose a key length L. The original DSS constrained L to be a multiple of 64 between 512 and 1024 inclusive. NIST 800-57 recommends lengths of 2048 (or 3072) for keys with security lifetimes extending beyond 2010 (or 2030). Choose the modulus length N such that N<L and N≤|H|. FIPS 186-4 specifies L and N to have one of the values: (1024, 160), (2048, 224), (2048, 256), or (3072, 256). Choose an N-bit prime q. Choose an L-bit prime p such that p−1 is a multiple of q. Choose an integer h randomly from {2…p−2}. Compute g:=h(p−1)/qmodp. In the rare case that g=1 try again with a different h. Commonly h=2 is used. This modular exponentiation can be computed efficiently even if the values are large. The algorithm parameters are (p, q, g). These may be shared between different users of the system.

Per-user keys Given a set of parameters, the second phase computes the key pair for a single user:

Choose an integer x randomly from {1…q−1}. Compute y:=gxmodp. x is the private key and y is the public key.

2. Key distribution The signer should publish the public key y. 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 x secret.

3. Signing A message m is signed as follows:

Choose an integer k randomly from {1…q−1} Compute r:=(gkmodp)modq. In the unlikely case that r=0, start again with a different random k. Compute s:=(k−1(H(m)+xr))modq. In the unlikely case that s=0, start again with a different random k. The signature is (r,s) The calculation of k and r amounts to creating a new per-message key. The modular exponentiation in computing r is the most computationally expensive part of the signing operation, but it may be computed before the message is known. Calculating the modular inverse k−1modq is the second most expensive part, and it may also be computed before the message is known. It may be computed using the extended Euclidean algorithm or using Fermat's little theorem as kq−2modq.

4. Signature Verification One can verify that a signature (r,s) is a valid signature for a message m as follows:

Verify that 0<r<q and 0<s<q. Compute w:=s−1modq. Compute u1:=H(m)⋅wmodq. Compute u2:=r⋅wmodq. Compute v:=(gu1yu2modp)modq. The signature is valid if and only if v=r.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Digital Signature Algorithm

Start with the simplest possible case. Write down what Digital Signature Algorithm claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Digital Signature Algorithm before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Digital Signature Algorithm ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Digital Signature Algorithm

In research
Digital Signature Algorithm appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Digital Signature Algorithm in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Digital Signature Algorithm is common in secondary-school and first-year university syllabi. It links to neighbouring topics 1991 introductions, Digital Signature Standard, Digital signature schemes, so understanding it makes those chapters shorter.
In everyday life
Look for Digital Signature Algorithm outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Digital Signature Algorithm” →

How to study Digital Signature Algorithm in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Digital Signature Algorithm means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Digital Signature Algorithm out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Digital Signature Algorithm in simple terms?

The Digital Signature Algorithm (DSA) is a public-key cryptosystem and Federal Information Processing Standard for digital signatures, based on the mathematical concept of modular exponentiation and the discrete logarithm problem. In a digital signature system, there is a keypair involved, consisti…

Why does Digital Signature Algorithm matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Digital Signature Algorithm?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Digital Signature Algorithm.

Tags

  • 1991 introductions
  • Digital Signature Standard
  • Digital signature schemes
  • Public-key cryptography

Keep exploring