CR CR
Signature Schemes
Chester Rebeiro IIT Madras
STINSON : chapter 7
Signature Schemes Chester Rebeiro IIT Madras CR CR STINSON : - - PowerPoint PPT Presentation
Signature Schemes Chester Rebeiro IIT Madras CR CR STINSON : chapter 7 Recall : MACs y = h K (x) Alice Bob h K = K A=ack at Dawn!! Message Digest h K K unsecure channel Message A=ack at Dawn!! MACs allow Bob to be certain
STINSON : chapter 7
Alice Bob Message “A=ack at Dawn!!”
2
“A=ack at Dawn!!” Message Digest MACs allow Bob to be certain that
unsecure channel
K K MAC cannot
Digital Signatures solve both these problems
3
To communicate with Bob, Alice gets his public key from a trusted authority (TA) A trusted authority could be a Government agency, Verisign, etc. A signature from the TA, ensures that the public key is authenHc.
4
TA Bob’s CerHficate{ Bob’s public key in plaintext Signature of the cerHfying authority
} Important applicaHon of digital signatures
Alice Message x = “A=ack at Dawn!!”
5
(x, y) Signing Func@on y = siga(x) Input : Message (x) and Alice’s private key Output: Digital Signature of Message sigK unsecure channel
Alice’s Private Key
y = digital signature Everyone Else verK Alice’s Public Key Verifying Func@on verb(x, y) Input : digital signature, message Output : true or false
true if signature valid false otherwise
TRUE / FALSE
6
Forgery Algorithm
Mallory Everyone Else
7
(x, y) If Mallory can create a valid digital signature such that verK(x, y) = TRUE for a message not previously signed by Alice, then the pair (x, y) forms a forgery unsecure channel verK Alice’s Public Key digital signature TRUE
Mallory can determine Alice’s private key (therefore can generate any number of signed messages)
Given a message x, Mallory can determine y, such that (x, y) is a valid signature from Alice
Mallory is able to create y for some x, such that (x, y) is a valid signature from Alice
8
Difficulty Level Goals of AQacker AssumpHons
Mallory only has Alice’s public key (i.e. only has access to the verificaHon funcHon, ver)
Mallory only has a list of messages signed by Alice (x1, y1), (x2, y2), (x3, y3), (x4, y4), …..
Mallory chooses messages x1, x2, x3, …….. and tricks Alice into providing the corresponding signatures y1, y2, y3 (resp.)
9
Strong Weak (needs a strong a=acker) Goals of A=acker Assump@ons
10
} ) , ( mod ){ ( y x return n x y x sig
a
≡ } ) mod ( ){ , ( FALSE return else TRUE return n y x if y x ver
b
≡ ) , ( y x x is the message here and (x, y) the signature b,n public a, p,q private n = pq; a ≡ b-1 modφ(n)
11
} ) , ( mod ){ ( y x return n x y x sig
a
≡ } ) mod ( ){ , ( FALSE return else TRUE return n y x if y x ver
b K
≡ ) , ( y x } ) , ( mod random a select (){ y x return n y x compute y forgery
b
≡
Key only, existenHal forgery
(n) b- a pq n q p a n b ϕ mod 1 ; private , , public , ≡ =
Suppose Alice creates signatures of two messages x1 and x2
12
) , ( mod ) ( ) , ( mod ) (
2 2 2 2 2 2 1 1 1 1 1 1
y x n x y x sig y y x n x y x sig y
a a
≡ → = ≡ → = n x x y y forgery a is n y y n x x
a a
mod ) mod , mod (
2 1
2 1 2 1 2 1
≡
Mallory can use the mul@plica@ve property of RSA to create a forgery
Known message, existenHal forgery
13
} ) , ( mod ) ( ){ ( y x return n z y x h z x sig
a
≡ = private , , public , q p a n b } ) mod ( ) ( ){ , ( FALSE return else TRUE return n y z if x h z y x ver
b K
≡ = ) , ( y x x is the message here, (x, y) the signature and h is a hash funcHon Incorporate a hash funcHon in the scheme to prevent forgery
14
PrevenHng the First Forgery
} ) , ( ) ( ' . : mod ' random a select (){ y x return x h z st x preimage I compute n y z compute y forgery
st b
= ≡
15
PrevenHng the Second Forgery
n x x n x h x h y y difficult is n y y n x x
a a a a
mod mod ) ( ) ( ) mod , mod (
2 1 2 1 2 1 2 1 2 1
≡ ≡
Given a valid signature (x,y) find (x’,y) creaHng such a forgery is equivalent to solving the 2nd preimage problem of the hash funcHonw
16
Another Forgery prevented
} ) , ' ( ' ) ' ( ) ( . . ' : ) ( ){ , ( y x return x x and x h x h t s x find preimage II compute x h compute y x forgery
nd
≠ =
17
18
a p p p a a Z p
a p
: key Private , , : Parameters Public mod Compute ) 1 ( Choose element primitive a be Let prime large a Choose
*
β α α β α ≡ − ≤ < ∈
IniHalizaHon
} ) , ( ) , ( 1 mod ) ( mod 1 ) 1 , gcd( . . random secret a select ){ (
1
y x return y p k a x p p k t s k x sig
k
δ γ γ δ α γ = − − ≡ ≡ = −
−
Signing Message x
The use of a random secret k for every signature makes ElGamal non-determinisHc
19
a p p p a a Z p
a p
: key Private , , : Parameters Public mod Compute ) 1 ( Choose element primitive a be Let prime large a Choose
*
β α α β α ≡ − ≤ < ∈ } ) ( mod mod )){ , ( , (
2 1 2 1
FALSE return else TRUE return t t if p t compute p t compute x ver
x
= ≡ ≡
δ γγ
β α δ γ
Verifying Signature (x,y) IniHalizaHon
20
a p p p a a Z p
a p
: key Private , , : Parameters Public mod Compute ) 1 ( Choose element primitive a be Let prime large a Choose
*
β α α β α ≡ − ≤ < ∈
IniHalizaHon
} ) , ( ) , ( 1 mod ) ( mod random secret a select ){ (
1
y x return y p k a x p k x sig
k
δ γ γ δ α γ = − − ≡ ≡
−
Signing Message x
} ) ( mod mod )){ , ( , (
2 1 2 1
FALSE return else TRUE return t t if p t compute p t compute x ver
x
= ≡ ≡
δ γγ
β α δ γ
Verifying Signature (x,y)
First note that aγ + kδ ≡ xmod(p−1) t2 ≡ βγγ δ mod p t1≡α x mod p ≡(α a)γ ⋅(α k)δ mod p ≡α aγ+kδ mod p ≡α x mod p
if the signature is valid, t1 = t2 correctness
21
132 467 mod 2 mod 127 a 467
127
= = ≡ = 2 = = p p
a
α β α
51 466 mod 431 ) 29 2 100 ( 1 mod ) 29 467 mod 2 mod 431 1 mod ) ( 213
1 213 1
= ⋅ − = − − ( = = = = = − =
− −
p k a x p p k randomly chosen k
k
γ δ α γ
Signature of message x = 100
TRUE p p p
x
189 mod 2 mod 189 467 mod 29 132 mod
100 51 29
= = = = α γ β
δ γ
Verifying
22
TRUE x ver x = )) , ( , ( that such ) , ( find to needs Mallory , an Given δ γ δ γ
γ γ δ γ
β α δ α γ β δ γ
−
= ≡
x x
p t s log mod . . compute to try then , for value a Choose
This is the intractable discrete log problem A=empt 1
p t s
x mod
. . compute to try then , for value a Choose α γ β γ δ
δ γ
≡
This is not related to the discrete log problem. There is no known soluHon for this. A=empt 2
p t s
x mod
. . , usly simultaneo and for value Choose α γ β δ γ
δ γ
≡
No way known. A=empt 3
23
TRUE x ver x, = )) , ( , ( that such )) , ( ( an find to needs Mallory δ γ δ γ choose some i (0 ≤ i ≤ p− 2). form γ ≡α iβ mod p δ ≡ −γ mod(p−1) x ≡ iδ mod(p−1). then, ver(x,(γ,δ)) = TRUE α x ≡ βγγ δ mod p RHS ≡ βγ (α iβ)δ mod p ≡ βγ+δα iδ mod p ≡α aγ+aδα iδ mod p ≡α aγ−aγ+iδ mod p ≡α iδ mod p ≡α x mod p = LHS
The one-parameter forgery proof forgery
24
TRUE x ver x, = )) , ( , ( that such )) , ( ( an find to needs Mallory δ γ δ γ TRUE x ver then p ij x p j p form p j p j i j i some choose
j i
= − ≡ − − ≡ ≡ = − − ≤ ≤
− −
)) , ( , ( , ). 1 mod( ) 1 mod( mod ). 1 ) 1 , gcd( ; 2 , ( ,
1 1
δ γ γ γ δ β α γ
The two-parameter forgery forgery Prevent ExistenHal Forgeries by hashing the message
25
} ) , ( ) , ( 1 mod ) ( mod random secret a select ){ (
1
y x return y p k a x p k x sig
k
δ γ γ δ α γ = − − ≡ ≡
−
). 1 mod( ) ( follows as computed be can secret 1 ) 1 , gcd(
1
− − = = −
−
p k x a a then p if γ δ γ
26
} ) , ( ) , ( 1 mod ) ( mod random secret a select ){ (
1
y x return y p k a x p k x sig
k
δ γ γ δ α γ = − − ≡ ≡
−
, ) ( ) (
2 1
then and are signatures The k same the with signed x and x messages different two have we say Lets
2 1
, , δ γ δ γ
dividing RepresenHng in terms of α =>
Improper use of ElGamal’s Signature Scheme
27
28
) ,δ γ (
29
* thecorresponding multiplicative group
q ≡1mod p
calculus
For a 1024 bit prime, the complexity of index calculus is approx 280
paradox complexity.
Thus a subgroup of size 2^160 will provide the same level of security
30
31
a q p p q a a q q p q t s bit q bit p
a
: key Private , , , : Parameters Public mod Compute ) 1 ( Choose )
subgroup a creates (
Find 1 | . . ) 160 ( prime another Choose ) 1024 ( prime large a Choose β α α β α α ≡ − ≤ < −
IniHalizaHon α(p-1)/q mod p
32
a q p p q a a q q p q t s bit q bit p
a
: key Private , , , : Parameters Public mod Compute ) 1 ( Choose )
subgroup a creates (
Find 1 | . . ) 160 ( prime another Choose ) 1024 ( prime large a Choose β α α β α α ≡ − ≤ < −
IniHalizaHon
} ) , ( ) , ( mod ) ) ( ( mod ) mod ( 1 ) , gcd( . . random secret a select ){ (
1
y x return y q k a x SHA q p q k t s k x sig
k
δ γ γ δ α γ = + ≡ ≡ =
−
Signing Message x
The use of a random secret k for every signature makes ElGamal non-determinisHc
33
a q p p q a a q q p q t s bit q bit p
a
: key Private , , , : Parameters Public mod Compute ) 1 ( Choose )
subgroup a creates (
Find 1 | . . ) 160 ( prime another Choose ) 1024 ( prime large a Choose β α α β α α ≡ − ≤ < −
IniHalizaHon
} ) , ( ) , ( mod ) ) ( ( mod ) mod ( 1 ) , gcd( . . random secret a select ){ (
1
y x return y q k a x SHA q p q k t s k x sig
k
δ γ γ δ α γ = + ≡ ≡ =
−
Signing Message x
} ) mod ( mod ) mod ( mod mod ) ( mod )){ , ( , (
2 1
2 1 1
FALSE return else TRUE return q v if q p v compute q w t compute q x SHA w t compute q w compute x ver
t t
γ β α γ δ δ γ ≡ ⋅ ≡ ⋅ ≡ ⋅ ≡ ≡
−
Verifying Signature
34
a p q p
a
: key Private ) mod ( , , , : Parameters Public α β β α ≡
IniHalizaHon
} ) , ( ) , ( mod ) ) ( ( mod ) mod ( 1 ) , gcd( . . random secret a select ){ (
1
y x return y q k a x SHA q p q k t s k x sig
k
δ γ γ δ α γ = + ≡ ≡ =
−
Signing Message x
} ) mod ( mod ) mod ( mod mod ) ( mod )){ , ( , (
2 1
2 1 1
FALSE return else TRUE return q v if q p v compute q w t compute q x SHA w t compute q w compute x ver
t t
γ β α γ δ δ γ ≡ ⋅ ≡ ⋅ ≡ ⋅ ≡ ≡
−
Verifying Signature
q at t k q wa x wSHA q a x SHA k q k a x SHA mod ) ( mod ) ) ( mod ) ) ( mod ) ) (
2 1 1 1
+ ≡ + ( = + ( ≡ + ( ≡
− −
γ δ γ γ δ q p sides both
q Take p p
t t t t k q at t k
mod ) mod ( mod mod mod
2 1 2 1 2 1
mod ) (
β α γ β α α α α ≡ ≡ ≡
+
35
Could you techniques such as Index Calculus. For a 1024 bit p, this method offers security of 80 bits Cannot apply Index Calculus relies on Pollard rho for solving the discrete log, For 160 bit q, this offers security of 80 bits
36
Could you techniques such as Index Calculus. For a 1024 bit p, this method offers security of 80 bits Cannot apply Index Calculus relies on Pollard rho for solving the discrete log, For 160 bit q, this offers security of 80 bits Thus the size of p dictates the size of q.
37
q p a q q a a p p Z p q and bits size
q bits size
p
a q p p
, , : Private : Private mod Compute ) ( from randomly Choose mod 1
root q the is mod then element primitive a be Let ) 1 ( | ) 160 ( prime smaller a Choose ) 1024 ( prime large a Choose
th / ) 1 ( *
β α α β α α α , = < ≤ = ∈ −
−
IniHalizaHon
} ) , ( ) , ( mod ) mod || ( . 1 1 . . random secret a select ){ ( y x return y p a k p x h q k t s k x sig
k
δ γ γ δ α γ = + = = − ≤ ≤
Signing Message x
} ) ( ) mod || ( )){ , ( , (
1 1
FALSE return else TRUE return t if p x h t compute x ver γ β α δ γ
γ δ
= ≡
−
Verifying Signature (x,y)