Digital Signature Algorithm (DSA) is a variant of Schnorr and ElGamal signature algorithms, and is used by the US NIST as DSS (Digital Signature Standard). The following parameters are used in the algorithm: p: a prime number of L bits in length. L is a multiple of 64, ranging from 512 to 1024; q: a prime factor of 160 bits of p - 1; g: g = h^((p-1)/q) mod p, h satisfies h < p - 1, h^((p-1)/q) mod p > 1; x: x < q, x is the private key; y: y = g^x mod p, (p, q, g, y) is the public key; H(x): One-Way Hash function. SHA (Secure Hash Algorithm) is used in DSS. p, q, g can be shared by a group of users, but in actual applications, the use of a public modulus may bring certain threats. The signature and verification protocol is as follows: 1. P generates a random number k, k < q; 2. P calculates r = ( g^k mod p ) mod qs = ( k^(-1) (H(m) + xr)) mod q The signature result is ( m, r, s ). 3. When verifying, calculate w = s^(-1)mod q u1 = ( H( m ) * w ) mod q u2 = ( r * w ) mod qv = (( g^u1 * y^u2 ) mod p ) mod q If v = r, the signature is considered valid. DSA is based on the discrete logarithm problem of integer finite fields, and its security is similar to that of RSA. An important feature of DSA is that the two prime numbers are public, so that when using someone else\'s p and q, even if you don\'t know the private key, you can confirm whether they are randomly generated or tampered with. The RSA algorithm cannot do this.
You Might Like
Recommended ContentMore
Open source project More
Popular Components
Searched by Users
Just Take a LookMore
Trending Downloads
Trending ArticlesMore