Some Cryptographic Primitives
Some Cryptographic Primitives
Cryptographic
Primitives
Murat Osmanoglu
Digital Signature Scheme
signing by hand
Digital Signature Scheme
signing by hand
Digital Signature Scheme
signing by hand
Digital Signature Scheme
signing by hand
electronic
signature
Digital Signature Scheme
signing electronically
PK, SK
Digital Signature Scheme
PK, SK
SK
Signature
SIGNING
ALGORITHM
Digital Signature Scheme
PK, SK
Digital Signature Scheme
PK, SK
1 or 0 PK
VERIFICATION
ALGORITHM
Digital Signature Scheme
A digital signature scheme consists of three algorithms
Gen : outputs a key pair (pk, sk)
Sign :takes a message m in M and the signing key sk as inputs
and outputs a signature σ on m
Verify : takes a signature σ, the public key pk, and a message
m as inputs and outputs 1 or 0
Correctness
KeyGen
SK=(N, d)
KeyGen
SK=(N, d)
RSA Signature
PK=(N,e)
SK=(N, d)
Signing
m, σ
SK=(N, d)
RSA Signature
PK=(N,e)
SK=(N, d)
Verification
Charlie Adversary
(Challenger)
(N,e)
(pk,sk) ç Gen(.)
where
pk = (N, e) and sk = (N, d)
Attack on RSA Signature
no-message attack
Charlie Adversary
(Challenger)
(N,e)
(pk,sk) ç Gen(.) choose σ’ in ZN*
where
pk = (N, e) and sk = (N, d) compute m’ = (σ’)e mod N
Attack on RSA Signature
no-message attack
Charlie Adversary
(Challenger)
(N,e)
(pk,sk) ç Gen(.) choose σ’ in ZN*
where
pk = (N, e) and sk = (N, d) compute m’ = (σ’)e mod N
(m’, σ’)
Attack on RSA Signature
no-message attack
Charlie Adversary
(Challenger)
(N,e)
(pk,sk) ç Gen(.) choose σ’ in ZN*
where
pk = (N, e) and sk = (N, d) compute m’ = (σ’)e mod N
(m’, σ’)
Charlie Adversary
(Challenger)
(N,e)
(pk,sk) ç Gen(.) choose σ’ in ZN*
where
pk = (N, e) and sk = (N, d) compute m’ = (σ’)e mod N
(m’, σ’)
sincethe
m’ =adversary
(σ’)e mod has no control wins
N, adversary over the game
the message
Attack on RSA Signature
forging a signature on an arbitrary message
(N,e)
Charlie Adversary
(Challenger)
(pk,sk) ç Gen(.)
where
pk = (N, e) and sk = (N, d)
Attack on RSA Signature
forging a signature on an arbitrary message
(N,e)
m1, m2
Charlie Adversary
(Challenger)
(N,e)
m1, m2
Charlie Adversary
(Challenger)
(m1, σ1) and (m2, σ2)
(pk,sk) ç Gen(.) for a message m
where
pk = (N, e) and sk = (N, d) choose m1, m2 in ZN*
s.t. m = m1.m2 mod N
Attack on RSA Signature
forging a signature on an arbitrary message
(N,e)
m1, m2
Charlie Adversary
(Challenger)
(m1, σ1) and (m2, σ2)
(pk,sk) ç Gen(.) for a message m
where
pk = (N, e) and sk = (N, d) choose m1, m2 in ZN*
(m, σ) s.t. m = m1.m2 mod N
compute σ = σ1. σ2 mod N
Attack on RSA Signature
forging a signature on an arbitrary message
(N,e)
m1, m2
Charlie Adversary
(Challenger)
(m1, σ1) and (m2, σ2)
(pk,sk) ç Gen(.) for a message m
where
pk = (N, e) and sk = (N, d) choose m1, m2 in ZN*
(m, σ) s.t. m = m1.m2 mod N
compute σ = σ1. σ2 mod N
since σe = (σ1. σ2)e = (m1d. m2d)e
= m1.m2 mod N = m
adversary wins the game
RSA-FDH
PK=(N, H, e)
SK=(N, H, d)
Signing
SK=(N, H, d)
RSA-FDH
PK=(N, H, e)
SK=(N, H, d)
Verification
SK=(N, H, d)
Verification
Verification
m hash
h(m)
function
h : {0,1}* → {0,1}n
Hash Functions
• maps inputs of some length to short, fixed-length output
m hash
h(m) sometimes called digest
function
h : {0,1}* → {0,1}n
Hash Functions
• maps inputs of some length to short, fixed-length output
m hash
h(m) sometimes called digest
function
h : {0,1}* → {0,1}n
m hash
h(m) sometimes called digest
function
h : {0,1}* → {0,1}n
h(K ll a), b
h(K ll b)
Applications
Merkle Tree
Client Server
Applications
Merkle Tree
Client Server
write file
H(F) = d
keep d
Applications
Merkle Tree
Client Server
write file
H(F) = d
read file (F ’)
keep d
Applications
Merkle Tree
Client Server
write file
H(F) = d
read file (F ’)
keep d
check d = h(F ’)
Applications
Merkle Tree
Client Server
. . .
Applications
Merkle Tree
Client Server
H(F2) = d2
. . .
. . .
H(Fn) = dn
keep d1,d2,…,dn
Applications
Merkle Tree
Client Server
H(F2) = d2
read file (Fi ’)
. . .
. . .
H(Fn) = dn
keep d1,d2,…,dn
Applications
Merkle Tree
Client Server
H(F2) = d2
read file (Fi ’)
. . .
. . .
H(Fn) = dn
keep d1,d2,…,dn
Client Server
H(F2) = d2
read file (Fi ’)
. . .
. . .
Client Server
Applications
Merkle Tree
Client Server
keep D
write files
F1
h(F1llF2ll…llFn) = D
F2
. . .
. . .
Fn
Applications
Merkle Tree
Client Server
keep D
write files
F1
h(F1llF2ll…llFn) = D
read files (F1 ’,..., Fn ’)
F2
. . .
. . .
Fn
Applications
Merkle Tree
Client Server
keep D
write files
F1
h(F1llF2ll…llFn) = D
read files (F1 ’,..., Fn ’)
F2
. . .
. . .
check h(F1 'llF2 'll…llFn ') = D
Fn
Applications
Merkle Tree
Client Server
keep D
write files
F1
h(F1llF2ll…llFn) = D
read files (F1 ’,..., Fn ’)
F2
. . .
. . .
• linear time to check integrity and update file
check• h(F1 'llF2
small 'll…llFn ') = D
storage Fn
Applications
Merkle Tree
Client Server
F1 F2 F3 F4
Applications
Merkle Tree
Client Server
F1 F2 F3 F4
Applications
Merkle Tree
F2
A = h(h(F1) ll h(F2)) h(h(F3) ll h(F4)) = B
F3
h(F1) h(F2) h(F3) h(F4)
F4
F1 F2 F3 F4
Applications
Merkle Tree
F2
A = h(h(F1) ll h(F2)) h(h(F3) ll h(F4)) = B for the file F3,
read F3, C = h(F4), A
F3
h(F1) h(F2) h(F3) h(F4)
F4
F1 F2 F3 F4
Applications
Merkle Tree
F2
A = h(h(F1) ll h(F2)) h(h(F3) ll h(F4)) = B for the file F3,
read F3, C = h(F4), A
F3
h(F1) h(F2) h(F3) h(F4)
F4
check whether
F1 F2 F3 F4 h(A ll h(h(F3) ll C)) = root
Applications
Merkle Tree
F2
A = h(h(F1) ll h(F2)) h(h(F3) ll h(F4)) = B for the file F3,
read F3, C = h(F4), A
F3
h(F1) h(F2) h(F3) h(F4)
• logarithmic time to check integrity and
update file F4