{"id":194,"date":"2018-07-12T06:54:19","date_gmt":"2018-07-12T06:54:19","guid":{"rendered":"http:\/\/itp4.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=194"},"modified":"2019-05-14T09:35:25","modified_gmt":"2019-05-14T09:35:25","slug":"digital-signature-algorithm","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/itp4\/chapter\/digital-signature-algorithm\/","title":{"rendered":"Digital Signature Algorithm"},"content":{"raw":"<div><span style=\"float: right;\"><a href=\"https:\/\/youtu.be\/yhVFk_uQFxo\" target=\"_blank\" rel=\"noopener\"><img src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a>\r\n<\/span><\/div>\r\n\r\nThe need of Digital Signature:\r\n<ul>\r\n \t<li>Message signed by the user such that all recipients or intended recipient of message can verify the digital signature.User A signs a message <em style=\"text-align: initial;font-size: 1em\">m<\/em><span style=\"text-align: initial;font-size: 1em\"> so that any user can verify the signature;<\/span><\/li>\r\n \t<li><em>d<\/em>A(<em>m<\/em>)User A signs a message <em style=\"text-align: initial;font-size: 1em\">m<\/em><span style=\"text-align: initial;font-size: 1em\"> in a way that only user <\/span><em style=\"text-align: initial;font-size: 1em\">B<\/em><span style=\"text-align: initial;font-size: 1em\"> can verify the signature;<\/span><\/li>\r\n \t<li><em>e<\/em>B(<em>d<\/em>A(<em>m<\/em>))Sending a message <em style=\"text-align: initial;font-size: 1em\">m<\/em><span style=\"text-align: initial;font-size: 1em\"> and a signed message digest of <\/span><em style=\"text-align: initial;font-size: 1em\">m<\/em><span style=\"text-align: initial;font-size: 1em\"> obtained by using a hash function standard <\/span><em style=\"text-align: initial;font-size: 1em\">h<\/em><span style=\"text-align: initial;font-size: 1em\">:<\/span><\/li>\r\n \t<li>(<em>m<\/em>, <em>d<\/em>A(<em>h<\/em>(<em>m<\/em>)))Cryptosystem: Let each user <em style=\"text-align: initial;font-size: 1em\">A<\/em><span style=\"text-align: initial;font-size: 1em\">uses a cryptosystem with encryption and decryption\u00a0<\/span>algorithms: <em style=\"text-align: initial;font-size: 1em\">e<\/em><em style=\"text-align: initial;font-size: 1em\">A<\/em><span style=\"text-align: initial;font-size: 1em\">, <\/span><em style=\"text-align: initial;font-size: 1em\">d<\/em><em style=\"text-align: initial;font-size: 1em\">A<\/em><\/li>\r\n \t<li>Message: <em>m<\/em><\/li>\r\n \t<li>PUBLIC-KEY CRYPTOGRAPHY<\/li>\r\n<\/ul>\r\nEncryption:\u00a0<em>e<\/em><em>A<\/em> (<em>m<\/em>) Decryption:\u00a0 \u00a0 \u00a0\u00a0<em>d<\/em><em>A<\/em> (<em>e<\/em><em>A<\/em> (<em>m<\/em>))\r\n<ul>\r\n \t<li style=\"text-align: justify\">PUBLIC-KEY SIGNATURES\u00a0 Signing:<em style=\"text-align: initial;font-size: 1em\">d<\/em><em style=\"text-align: initial;font-size: 1em\">A<\/em><span style=\"text-align: initial;font-size: 1em\"> (<\/span><em style=\"text-align: initial;font-size: 1em\">m<\/em><span style=\"text-align: initial;font-size: 1em\">) Verification of signatures:\u00a0<\/span><em style=\"text-align: initial;font-size: 1em\">e<\/em><em style=\"text-align: initial;font-size: 1em\">A<\/em><span style=\"text-align: initial;font-size: 1em\"> (<\/span><em style=\"text-align: initial;font-size: 1em\">d<\/em><em style=\"text-align: initial;font-size: 1em\">A<\/em><span style=\"text-align: initial;font-size: 1em\"> (<\/span><em style=\"text-align: initial;font-size: 1em\">m<\/em><span style=\"text-align: initial;font-size: 1em\">)) A digital signature system (DSS) consists:<\/span><\/li>\r\n \t<li style=\"text-align: justify\"><em>P <\/em>- the space of possible plaintexts (messages).<\/li>\r\n \t<li style=\"text-align: justify\"><em>S <\/em>- the space of possible signatures.<\/li>\r\n \t<li style=\"text-align: justify\"><em>K <\/em>- the space of possible keys.<\/li>\r\n \t<li style=\"text-align: justify\">For each <em>k<\/em> <em>\u03b5<\/em> <em>K<\/em> there is a signing algorithm <em>sig<\/em>k \u03b5 <em>S<\/em>a and a corresponding verification algorithm <em>ver<\/em>k \u03b5 <em>V<\/em> such that- <em>sig<\/em>k :<em> P <\/em>\u2192<em> S<\/em>. - <em>ver<\/em>k :<em> P <\/em>\u00c4<em> S <\/em>\u2192 {<em>true, false<\/em>} and\u00a0<em style=\"text-align: initial;font-size: 1em\">ver<\/em><span style=\"text-align: initial;font-size: 1em\">k (<\/span><em style=\"text-align: initial;font-size: 1em\">w<\/em><span style=\"text-align: initial;font-size: 1em\">,<\/span><em style=\"text-align: initial;font-size: 1em\">s<\/em><span style=\"text-align: initial;font-size: 1em\">) =\u00a0 true, if<\/span><em style=\"text-align: initial;font-size: 1em\"> s <\/em><span style=\"text-align: initial;font-size: 1em\">=<\/span><em style=\"text-align: initial;font-size: 1em\"> sig <\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">w<\/em><span style=\"text-align: initial;font-size: 1em\">);\u00a0<\/span>false, otherwise.<\/li>\r\n \t<li style=\"text-align: justify\">Algorithms <em>sig<\/em>k and <em>ver<\/em>k should be computable in polynomial time. Verification algorithm can be publically known; key of the signing algorithm must be kept secret.Signing a message <em>w<\/em> by A for <em>B is\u00a0<\/em><em>e<\/em>B (<em>d<\/em>A (<em>m<\/em>)) but a symmetric solution with encoding as\u00a0<em>c <\/em>= <em>d<\/em>A (<em>e<\/em>B (<em>m<\/em>)) is not proper. Indeed, an active enemy, the tamperer, can intercept the message, then compute\u00a0\u00a0<em>d<\/em>T (<em>e<\/em>A (<em>c<\/em>)) =<em> d<\/em>T (<em>e<\/em>B (<em>m<\/em>)) and send it to Bob, pretending it is from him (without being able to decrypt the message). NIST Digital Signature Algorithm<\/li>\r\n \t<li style=\"text-align: justify\">The National Institute of Standards and Technology(NIST) has published Digital signature Algorithm(DSA) which was published as Federal Information Processing Standard FIPS 186.<\/li>\r\n \t<li style=\"text-align: justify\">DSA uses Secure Hash Algorithm.<\/li>\r\n<\/ul>\r\n<p style=\"text-align: justify\"><img class=\"size-full wp-image-195 aligncenter\" src=\"http:\/\/itp4.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-112.png\" alt=\"\" width=\"480\" height=\"360\" \/><\/p>\r\n<strong>The DSA approach \u2013 Sender perspective<\/strong>\r\n<ul>\r\n \t<li>DSA approach makes use of a hash functions.<\/li>\r\n \t<li>Signature function takes two inputs \u2013 hash code and random number k<\/li>\r\n \t<li>The signature function takes sender\u2019s private key(PRa) and global public key(PUG)<\/li>\r\n \t<li>Set of parameters known as group of communicating principals constitute PUG<\/li>\r\n<\/ul>\r\n<strong>The DSA approach \u2013 At Receiver<\/strong>\r\n<ul>\r\n \t<li>The hash code of the incoming message is generated.<\/li>\r\n \t<li>This plus the signature is input to a verification function.<\/li>\r\n \t<li>The verification function takes global public key and PUa (paired with sender\u2019s private key).<\/li>\r\n \t<li>The output of the verification function is the value that is equal to the signature component r if the signature is valid.<\/li>\r\n<\/ul>\r\n<strong>The Digital Signature Algorithm<\/strong>\r\n<ul>\r\n \t<li>DSA is based on the difficulty of computing discrete logarithms.<\/li>\r\n \t<li style=\"text-align: justify\">p - a prime modulus, where 2L\u20131 &lt; p &lt; 2L, and L is the bit length of p. for 512\u2264L\u22641024 and L a multiple of 64. bit length between 512 and 1024 bits in increment of 64 bits.<\/li>\r\n \t<li>q - a prime divisor of (p \u2013 1), where 2N\u20131 &lt; q &lt; 2 N, and N is the bit length of q.<\/li>\r\n \t<li style=\"text-align: justify\">g = h(p-1)\/q mod p a generator of a subgroup of order q in the multiplicative group of GF(p), such that 1 &lt; g &lt; p. h is any integer with 1&lt;h&lt;(p-1) such that h(p-1)\/q mod p&gt;1<\/li>\r\n \t<li style=\"text-align: justify\">x the private key that must remain secret; x is a randomly or pseudorandomly generated integer, such that 0 &lt; x &lt; q, i.e., x is in the range [1, q\u20131]. [User\u2019s private key]<\/li>\r\n \t<li>y the public key, where y = gx mod p. [User\u2019s public key]<\/li>\r\n \t<li style=\"text-align: justify\">k a secret number that is unique to each message; k is a randomly or pseudorandomly generated integer, such that 0 &lt; k &lt; q, i.e., k is in the range [1, q\u20131]. [User\u2019s per message secret number]\u00a0 Selection of Parameter Sizes and Hash Functions for DSA This Standard specifies the following choices for the pair L and N (the bit lengths of p and q, respectively):<\/li>\r\n<\/ul>\r\nL = 1024, N = 160\r\n\r\nL = 2048, N = 224\r\n\r\nL = 2048, N = 256\r\n\r\nL = 3072, N = 256\r\n\r\n&nbsp;\r\n\r\n<strong>Signing<\/strong>\r\n\r\n&nbsp;\r\n\r\nr= (gk mod p) mod q\r\n\r\ns=[K-1 (H(M)+xr)] mod q\r\n\r\nSignature (r,s)\r\n\r\nVerifying\r\n\r\nw=(s\u2019)-1 mod q\r\n\r\nu1=[H(M\u2019)w]mod q\r\n\r\nu2=(r\u2019)w mod q\r\n\r\nV=[(gu1yu2)mod p]mod q\r\n\r\nTest: v=r\u2019\r\n\r\nM = message to be signed\r\n\r\nH(M) = hash of M using SHA-1\r\n\r\nM\u2019,r\u2019,s\u2019 = received versions of M,r,s\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-196 aligncenter\" src=\"http:\/\/itp4.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-113.png\" alt=\"\" width=\"480\" height=\"360\" \/>\r\n\r\n&nbsp;\r\n\r\nDSA Signature Verification and Validation:\r\n<ul>\r\n \t<li style=\"text-align: justify\">Signature verification may be performed by any party (i.e., the signatory, the intended recipient or any other party) using the signatory\u2019s public key.<\/li>\r\n \t<li style=\"text-align: justify\">A signatory may wish to verify that the computed signature is correct, perhaps before sending the signed message to the intended recipient.<\/li>\r\n \t<li style=\"text-align: justify\">The intended recipient (or any other party) verifies the signature to determine its authenticity.<\/li>\r\n<\/ul>\r\nThe signature verification process is as follows:\r\n<ol>\r\n \t<li>The verifier shall check that 0 &lt; r\u2032 &lt; q and 0 &lt; s\u2032 &lt; q; if either condition is violated, the signature shall be rejected as invalid.<\/li>\r\n \t<li>If the two conditions in step 1 are satisfied, the verifier computes the following:<\/li>\r\n<\/ol>\r\nw = (s\u2032)\u20131mod q.\r\n\r\nu1 = (H(M\u2019)w) mod q.\r\n\r\nu2 = ((r\u2032)w) mod q.\r\n<ul>\r\n \t<li>v = (((g)u1(y)u2) mod p) mod q.<\/li>\r\n<\/ul>\r\n<ol start=\"3\">\r\n \t<li>If v = r\u2032, then the signature is verified.<\/li>\r\n \t<li>If v does not equal r\u2032, then the signature is invalid. The message or the signature may have been modified, there may have been an error in the signatory\u2019s generation process, or an imposter may have attempted to forge the signature.<\/li>\r\n<\/ol>\r\n<img class=\"size-full wp-image-197 aligncenter\" src=\"http:\/\/itp4.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-114.png\" alt=\"\" width=\"480\" height=\"360\" \/>\r\n\r\n&nbsp;\r\n\r\nStrength of DSA\r\n<ul>\r\n \t<li>It is infeasible to recover k from r or to recover x from s because of difficulty in taking discrete logarithm.<\/li>\r\n \t<li>gk mod p is computationally heavy but this value does not depend on the message so can be computed in advance.<\/li>\r\n \t<li>Calculating k-1 is demanding task.<\/li>\r\n<\/ul>\r\n\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>you can view video on Digital Signature Algorithm<\/strong><\/td>\r\n<td><a href=\"https:\/\/youtu.be\/yhVFk_uQFxo\" target=\"_blank\" rel=\"noopener\"><img class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n<strong>Suggested Reading:<\/strong>\r\n<ol>\r\n \t<li>Cryptography and Network Security Principles and Practice by William Stallings, sixth Edition, PEARSON.<\/li>\r\n \t<li>Security in Computing by Charles Pfleeger &amp; Shari Lawrence Pfleeger, fourth Edition, PEARSON.<\/li>\r\n \t<li>Network Security by Charlie Kaufman, Radia Perlman, Mike Speciner, second Edition, PHI.<\/li>\r\n \t<li>The Complete Reference \u2013 Network Security by Roberta Bragg, Mark Rhodes-Ousley &amp; Keith Strassberg, Tata McGraw Hill<\/li>\r\n \t<li>Network Security Bible by Eric Cole, Ronald Krutz, James Conley, Wiley<\/li>\r\n \t<li>Hacking 6 Exposed by Stuart McClure, Joel Scambray &amp; George Kurtz , Tata McGraw Hill .<\/li>\r\n \t<li><a href=\"http:\/\/www.snort.org\/\">www.snort.org<\/a><\/li>\r\n \t<li><a href=\"https:\/\/nmap.org\/\">https:\/\/nmap.org<\/a><\/li>\r\n<\/ol>","rendered":"<div><span style=\"float: right;\"><a href=\"https:\/\/youtu.be\/yhVFk_uQFxo\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a><br \/>\n<\/span><\/div>\n<p>The need of Digital Signature:<\/p>\n<ul>\n<li>Message signed by the user such that all recipients or intended recipient of message can verify the digital signature.User A signs a message <em style=\"text-align: initial;font-size: 1em\">m<\/em><span style=\"text-align: initial;font-size: 1em\"> so that any user can verify the signature;<\/span><\/li>\n<li><em>d<\/em>A(<em>m<\/em>)User A signs a message <em style=\"text-align: initial;font-size: 1em\">m<\/em><span style=\"text-align: initial;font-size: 1em\"> in a way that only user <\/span><em style=\"text-align: initial;font-size: 1em\">B<\/em><span style=\"text-align: initial;font-size: 1em\"> can verify the signature;<\/span><\/li>\n<li><em>e<\/em>B(<em>d<\/em>A(<em>m<\/em>))Sending a message <em style=\"text-align: initial;font-size: 1em\">m<\/em><span style=\"text-align: initial;font-size: 1em\"> and a signed message digest of <\/span><em style=\"text-align: initial;font-size: 1em\">m<\/em><span style=\"text-align: initial;font-size: 1em\"> obtained by using a hash function standard <\/span><em style=\"text-align: initial;font-size: 1em\">h<\/em><span style=\"text-align: initial;font-size: 1em\">:<\/span><\/li>\n<li>(<em>m<\/em>, <em>d<\/em>A(<em>h<\/em>(<em>m<\/em>)))Cryptosystem: Let each user <em style=\"text-align: initial;font-size: 1em\">A<\/em><span style=\"text-align: initial;font-size: 1em\">uses a cryptosystem with encryption and decryption\u00a0<\/span>algorithms: <em style=\"text-align: initial;font-size: 1em\">e<\/em><em style=\"text-align: initial;font-size: 1em\">A<\/em><span style=\"text-align: initial;font-size: 1em\">, <\/span><em style=\"text-align: initial;font-size: 1em\">d<\/em><em style=\"text-align: initial;font-size: 1em\">A<\/em><\/li>\n<li>Message: <em>m<\/em><\/li>\n<li>PUBLIC-KEY CRYPTOGRAPHY<\/li>\n<\/ul>\n<p>Encryption:\u00a0<em>e<\/em><em>A<\/em> (<em>m<\/em>) Decryption:\u00a0 \u00a0 \u00a0\u00a0<em>d<\/em><em>A<\/em> (<em>e<\/em><em>A<\/em> (<em>m<\/em>))<\/p>\n<ul>\n<li style=\"text-align: justify\">PUBLIC-KEY SIGNATURES\u00a0 Signing:<em style=\"text-align: initial;font-size: 1em\">d<\/em><em style=\"text-align: initial;font-size: 1em\">A<\/em><span style=\"text-align: initial;font-size: 1em\"> (<\/span><em style=\"text-align: initial;font-size: 1em\">m<\/em><span style=\"text-align: initial;font-size: 1em\">) Verification of signatures:\u00a0<\/span><em style=\"text-align: initial;font-size: 1em\">e<\/em><em style=\"text-align: initial;font-size: 1em\">A<\/em><span style=\"text-align: initial;font-size: 1em\"> (<\/span><em style=\"text-align: initial;font-size: 1em\">d<\/em><em style=\"text-align: initial;font-size: 1em\">A<\/em><span style=\"text-align: initial;font-size: 1em\"> (<\/span><em style=\"text-align: initial;font-size: 1em\">m<\/em><span style=\"text-align: initial;font-size: 1em\">)) A digital signature system (DSS) consists:<\/span><\/li>\n<li style=\"text-align: justify\"><em>P <\/em>&#8211; the space of possible plaintexts (messages).<\/li>\n<li style=\"text-align: justify\"><em>S <\/em>&#8211; the space of possible signatures.<\/li>\n<li style=\"text-align: justify\"><em>K <\/em>&#8211; the space of possible keys.<\/li>\n<li style=\"text-align: justify\">For each <em>k<\/em> <em>\u03b5<\/em> <em>K<\/em> there is a signing algorithm <em>sig<\/em>k \u03b5 <em>S<\/em>a and a corresponding verification algorithm <em>ver<\/em>k \u03b5 <em>V<\/em> such that- <em>sig<\/em>k :<em> P <\/em>\u2192<em> S<\/em>. &#8211; <em>ver<\/em>k :<em> P <\/em>\u00c4<em> S <\/em>\u2192 {<em>true, false<\/em>} and\u00a0<em style=\"text-align: initial;font-size: 1em\">ver<\/em><span style=\"text-align: initial;font-size: 1em\">k (<\/span><em style=\"text-align: initial;font-size: 1em\">w<\/em><span style=\"text-align: initial;font-size: 1em\">,<\/span><em style=\"text-align: initial;font-size: 1em\">s<\/em><span style=\"text-align: initial;font-size: 1em\">) =\u00a0 true, if<\/span><em style=\"text-align: initial;font-size: 1em\"> s <\/em><span style=\"text-align: initial;font-size: 1em\">=<\/span><em style=\"text-align: initial;font-size: 1em\"> sig <\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">w<\/em><span style=\"text-align: initial;font-size: 1em\">);\u00a0<\/span>false, otherwise.<\/li>\n<li style=\"text-align: justify\">Algorithms <em>sig<\/em>k and <em>ver<\/em>k should be computable in polynomial time. Verification algorithm can be publically known; key of the signing algorithm must be kept secret.Signing a message <em>w<\/em> by A for <em>B is\u00a0<\/em><em>e<\/em>B (<em>d<\/em>A (<em>m<\/em>)) but a symmetric solution with encoding as\u00a0<em>c <\/em>= <em>d<\/em>A (<em>e<\/em>B (<em>m<\/em>)) is not proper. Indeed, an active enemy, the tamperer, can intercept the message, then compute\u00a0\u00a0<em>d<\/em>T (<em>e<\/em>A (<em>c<\/em>)) =<em> d<\/em>T (<em>e<\/em>B (<em>m<\/em>)) and send it to Bob, pretending it is from him (without being able to decrypt the message). NIST Digital Signature Algorithm<\/li>\n<li style=\"text-align: justify\">The National Institute of Standards and Technology(NIST) has published Digital signature Algorithm(DSA) which was published as Federal Information Processing Standard FIPS 186.<\/li>\n<li style=\"text-align: justify\">DSA uses Secure Hash Algorithm.<\/li>\n<\/ul>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-195 aligncenter\" src=\"http:\/\/itp4.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-112.png\" alt=\"\" width=\"480\" height=\"360\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-112.png 480w, https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-112-300x225.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-112-65x49.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-112-225x169.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-112-350x263.png 350w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p><strong>The DSA approach \u2013 Sender perspective<\/strong><\/p>\n<ul>\n<li>DSA approach makes use of a hash functions.<\/li>\n<li>Signature function takes two inputs \u2013 hash code and random number k<\/li>\n<li>The signature function takes sender\u2019s private key(PRa) and global public key(PUG)<\/li>\n<li>Set of parameters known as group of communicating principals constitute PUG<\/li>\n<\/ul>\n<p><strong>The DSA approach \u2013 At Receiver<\/strong><\/p>\n<ul>\n<li>The hash code of the incoming message is generated.<\/li>\n<li>This plus the signature is input to a verification function.<\/li>\n<li>The verification function takes global public key and PUa (paired with sender\u2019s private key).<\/li>\n<li>The output of the verification function is the value that is equal to the signature component r if the signature is valid.<\/li>\n<\/ul>\n<p><strong>The Digital Signature Algorithm<\/strong><\/p>\n<ul>\n<li>DSA is based on the difficulty of computing discrete logarithms.<\/li>\n<li style=\"text-align: justify\">p &#8211; a prime modulus, where 2L\u20131 &lt; p &lt; 2L, and L is the bit length of p. for 512\u2264L\u22641024 and L a multiple of 64. bit length between 512 and 1024 bits in increment of 64 bits.<\/li>\n<li>q &#8211; a prime divisor of (p \u2013 1), where 2N\u20131 &lt; q &lt; 2 N, and N is the bit length of q.<\/li>\n<li style=\"text-align: justify\">g = h(p-1)\/q mod p a generator of a subgroup of order q in the multiplicative group of GF(p), such that 1 &lt; g &lt; p. h is any integer with 1&lt;h&lt;(p-1) such that h(p-1)\/q mod p&gt;1<\/li>\n<li style=\"text-align: justify\">x the private key that must remain secret; x is a randomly or pseudorandomly generated integer, such that 0 &lt; x &lt; q, i.e., x is in the range [1, q\u20131]. [User\u2019s private key]<\/li>\n<li>y the public key, where y = gx mod p. [User\u2019s public key]<\/li>\n<li style=\"text-align: justify\">k a secret number that is unique to each message; k is a randomly or pseudorandomly generated integer, such that 0 &lt; k &lt; q, i.e., k is in the range [1, q\u20131]. [User\u2019s per message secret number]\u00a0 Selection of Parameter Sizes and Hash Functions for DSA This Standard specifies the following choices for the pair L and N (the bit lengths of p and q, respectively):<\/li>\n<\/ul>\n<p>L = 1024, N = 160<\/p>\n<p>L = 2048, N = 224<\/p>\n<p>L = 2048, N = 256<\/p>\n<p>L = 3072, N = 256<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Signing<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>r= (gk mod p) mod q<\/p>\n<p>s=[K-1 (H(M)+xr)] mod q<\/p>\n<p>Signature (r,s)<\/p>\n<p>Verifying<\/p>\n<p>w=(s\u2019)-1 mod q<\/p>\n<p>u1=[H(M\u2019)w]mod q<\/p>\n<p>u2=(r\u2019)w mod q<\/p>\n<p>V=[(gu1yu2)mod p]mod q<\/p>\n<p>Test: v=r\u2019<\/p>\n<p>M = message to be signed<\/p>\n<p>H(M) = hash of M using SHA-1<\/p>\n<p>M\u2019,r\u2019,s\u2019 = received versions of M,r,s<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-196 aligncenter\" src=\"http:\/\/itp4.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-113.png\" alt=\"\" width=\"480\" height=\"360\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-113.png 480w, https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-113-300x225.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-113-65x49.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-113-225x169.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-113-350x263.png 350w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>DSA Signature Verification and Validation:<\/p>\n<ul>\n<li style=\"text-align: justify\">Signature verification may be performed by any party (i.e., the signatory, the intended recipient or any other party) using the signatory\u2019s public key.<\/li>\n<li style=\"text-align: justify\">A signatory may wish to verify that the computed signature is correct, perhaps before sending the signed message to the intended recipient.<\/li>\n<li style=\"text-align: justify\">The intended recipient (or any other party) verifies the signature to determine its authenticity.<\/li>\n<\/ul>\n<p>The signature verification process is as follows:<\/p>\n<ol>\n<li>The verifier shall check that 0 &lt; r\u2032 &lt; q and 0 &lt; s\u2032 &lt; q; if either condition is violated, the signature shall be rejected as invalid.<\/li>\n<li>If the two conditions in step 1 are satisfied, the verifier computes the following:<\/li>\n<\/ol>\n<p>w = (s\u2032)\u20131mod q.<\/p>\n<p>u1 = (H(M\u2019)w) mod q.<\/p>\n<p>u2 = ((r\u2032)w) mod q.<\/p>\n<ul>\n<li>v = (((g)u1(y)u2) mod p) mod q.<\/li>\n<\/ul>\n<ol start=\"3\">\n<li>If v = r\u2032, then the signature is verified.<\/li>\n<li>If v does not equal r\u2032, then the signature is invalid. The message or the signature may have been modified, there may have been an error in the signatory\u2019s generation process, or an imposter may have attempted to forge the signature.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-197 aligncenter\" src=\"http:\/\/itp4.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-114.png\" alt=\"\" width=\"480\" height=\"360\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-114.png 480w, https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-114-300x225.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-114-65x49.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-114-225x169.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-content\/uploads\/sites\/25\/2018\/07\/Untitled-114-350x263.png 350w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Strength of DSA<\/p>\n<ul>\n<li>It is infeasible to recover k from r or to recover x from s because of difficulty in taking discrete logarithm.<\/li>\n<li>gk mod p is computationally heavy but this value does not depend on the message so can be computed in advance.<\/li>\n<li>Calculating k-1 is demanding task.<\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td><strong>you can view video on Digital Signature Algorithm<\/strong><\/td>\n<td><a href=\"https:\/\/youtu.be\/yhVFk_uQFxo\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Suggested Reading:<\/strong><\/p>\n<ol>\n<li>Cryptography and Network Security Principles and Practice by William Stallings, sixth Edition, PEARSON.<\/li>\n<li>Security in Computing by Charles Pfleeger &amp; Shari Lawrence Pfleeger, fourth Edition, PEARSON.<\/li>\n<li>Network Security by Charlie Kaufman, Radia Perlman, Mike Speciner, second Edition, PHI.<\/li>\n<li>The Complete Reference \u2013 Network Security by Roberta Bragg, Mark Rhodes-Ousley &amp; Keith Strassberg, Tata McGraw Hill<\/li>\n<li>Network Security Bible by Eric Cole, Ronald Krutz, James Conley, Wiley<\/li>\n<li>Hacking 6 Exposed by Stuart McClure, Joel Scambray &amp; George Kurtz , Tata McGraw Hill .<\/li>\n<li><a href=\"http:\/\/www.snort.org\/\">www.snort.org<\/a><\/li>\n<li><a href=\"https:\/\/nmap.org\/\">https:\/\/nmap.org<\/a><\/li>\n<\/ol>\n","protected":false},"author":4,"menu_order":22,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["miss-hiteishi-diwanji"],"pb_section_license":""},"chapter-type":[],"contributor":[58],"license":[],"class_list":["post-194","chapter","type-chapter","status-publish","hentry","contributor-miss-hiteishi-diwanji"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-json\/pressbooks\/v2\/chapters\/194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-json\/wp\/v2\/users\/4"}],"version-history":[{"count":5,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-json\/pressbooks\/v2\/chapters\/194\/revisions"}],"predecessor-version":[{"id":460,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-json\/pressbooks\/v2\/chapters\/194\/revisions\/460"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-json\/pressbooks\/v2\/chapters\/194\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-json\/wp\/v2\/media?parent=194"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-json\/pressbooks\/v2\/chapter-type?post=194"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-json\/wp\/v2\/contributor?post=194"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp4\/wp-json\/wp\/v2\/license?post=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}