K Dsa PDF
K Dsa PDF
William Stallings
Copyright 2010
Supplement to
Cryptography and Network Security, Fifth Edition
William Stallings
Prentice Hall 2010
ISBN-10: 0136097049
http://williamstallings.com/Crypto/Crypto5e.html
The purpose of this appendix is to provide a proof that in the DSA signature verification we have
v = r if the signature is valid. The following proof is based on that which appears in the FIPS
standard, but it includes additional details to make the derivation clearer.
nq
= h( ) mod p mod p
p −1 q
gnq mod p
= h((p–1)/q)nq mod p by the rules of modular arithmetic
= h(p–1)n mod p
p −1 n
= h( ) mod p mod p by the rules of modular arithmetic
= 1n mod p = 1
= (( gnq
)( ))
mod p g z mod p mod p
= gz mod p
LEMMA 2. For nonnegative integers a and b: g(a mod q + b mod q) mod p = g(a+b) mod q mod p
K-2
Proof: By Lemma 1, we have
( )
Proof: By definition (Figure 13.2), s = k −1 (H( M) + xr) mod q . Also, because q is prime, any
nonnegative integer less than q has a multiplicative inverse (Chapter 8). So (k k–1) mod q = 1.
Then:
(ks) mod q = k (( k −1
(H(M ) + xr)) mod q) mod q
(( ))
= k k −1 (H(M ) + xr) mod q
K-3
By definition, w = s–1 mod q and therefore (ws) mod q = 1. Therefore,
v = (( gu1 u2
y ) mod p) mod q by definition
(H ( M )w ) mod q ( rw ) mod q
= g y mod p mod q
(H ( M )w ) mod q ( xrw ) mod q
= g g mod p mod q by Lemma 3
(H ( M )w ) mod q +( xrw ) mod q
g mod p mod q
=
(H ( M )w+xrw) mod q
g mod p mod q
= by Lemma 2
(( H( M ) +xr )w ) mod q
= g mod p mod q
= ( gk mod p) mod q by Lemma 4
= r by definition
QED.
K-4