DSA Digital Signature Algorithms

 <  Day Day Up  >  

DSA Signature is required by the XML Signature specification: DSA is only for signatures; it is not defined for encryption the way RSA is. Even though DSA is required, RSA is still officially the recommended approach [1] .

[1] The W3C's policy for its specifications is not to require technologies that have patent protection still applied to them. The RSA algorithm still had an active patent on it at the time these drafts were originally being developed. That patent has now expired , so RSA can be fully embraced by the W3C for XML Signature.

The DSA algorithm is composed of three phases: parameter generation, key generation, signing and verifying. Like RSA, the private key is used for signing and the public key for verifying a signature.

Private and public keys, x and y respectively, are generated from parameters called p, q , and g. p is the prime, q is the subprime, and g is the base. Parameter generation uses primality testing and modular exponentiation. After the parameters have been generated, computation of the keys is relatively fast. Key generation chooses a random private key x that is related to q , and then the public key y is generated from x .

DSA Key Generation

In the following sections, we will show how the DSA algorithm works. Used in the algorithm are a series of terms we define here:

  • p = a prime number L bits long, where L ranges from 512 to 1,024 and is a multiple of 64.

  • q = a 160-bit prime factor of p “ 1.

  • g = h ( p “ 1)/ q mod p , where h is any number less than p “ 1 such that h ( p “ 1)/ q mod p is greater than 1.

  • x = a number less than q .

  • y = g * x mod p .

DSA message signing and verification make use of the one-way hash function SHA1, which we will refer to as H ( m ) for an input message m . Given public parameters p, q , and g and the private key x , a message is signed. Signature verification uses the same public parameters and the public key y .

DSA Algorithm Operation

The DSA algorithm operates by first having the sender generate a random number k , less than q .

Next, the sender generates

  1. r = ( g k mod p ) mod q

  2. s = ( k “1 ( H ( m ) + x * r )) mod q

The parameters r and s are the sender's signature; they are sent to the recipient along with the original message m .

The recipient verifies the signature by computing

  1. w = s “1 mod q

  2. u 1 = ( H ( m ) * w ) mod q

  3. u 2 = ( r * w ) mod q

  4. v = (( g u 1 * y u 2 ) mod p ) mod q

If v = r , then the DSA signature is verified .

 <  Day Day Up  >  


Securing Web Services with WS-Security. Demystifying WS-Security, WS-Policy, SAML, XML Signature, and XML Encryption
Securing Web Services with WS-Security: Demystifying WS-Security, WS-Policy, SAML, XML Signature, and XML Encryption
ISBN: 0672326515
EAN: 2147483647
Year: 2004
Pages: 119

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net