# Digital Signature Algorithm signature creation

I was studying DSS from "Cryptography and Network Security" by William Stallings. What puzzled me was the DSS approach figure described in the text. It says it uses Public and Private Keys for creating signature.

But the algorithm for creating signature in DSA doesn't use it.

$$r = (g^{k}\mod p)\mod q$$ $$s = (k^{-1}(H(M)+ x\cdot r)) \mod q$$

Someone please tell me the importance of public key here. Is it needed in verification only?

-

## 1 Answer

It depends how you define what a "public key" is.

Typically it is the value of the key itself ($y$), plus information about the group (safe prime $p$, subgroup size $q$, generator of subgroup $g$). For signing a message, you do not need the value of the public key itself. So if you are strict in defining a "public key" to only be $y$, it is not needed to sign (only to verify).

On the other hand, you do need the group description ($p,q,g$) to sign a message, as well as the secret key ($x$). If you are liberal and define "public key" to include the group description, then the public key (or parts of it) is needed to sign.

I am not sure what is meant by PU$_\mathrm{G}$ in the diagram, but I suspect it is the group description? In that case, Stallings is being liberal in his definition of a public key in that it includes the group information ($p,q,g$).

As an aside, even though you do not need the public key, you do need $g$ and $x$ and since $y=g^x$, you do "know" the public key at signing time even if you do not use the value $y$ explicitly.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 13, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9418500661849976, "perplexity_flag": "middle"}