Wednesday, April 29, 2015
Public key & Diffie–Hellman key exchange
Public key Crypto
****************************
random prime a=""; && b="";
prk (a)x(b);=(c)
pk (c)
Decypt with prk (a)(b)
Encypted with pk (c)
Diffie–Hellman key exchange
*****************************
mod p=23=prime
Random base g = 5
("Alice sends Bob A = g.a"){
a= 6
g = 5
A = g.a
nA->nB
A =(g.a/5.6) mod p.23 = 8
s = 19.6 mod p.23 = 2
}
("BOB then sends Alice B = g.b"){
b= 15
g = 5
B = g.b
nA<-nB
B = (g.b/5.15) mod p.23 = 19
s = B.a/8.15 mod p.23=2
}
nA->nB
A =(g.a/5.6) mod p.23 = 8=A
s = A.b/19.6 mod p.23 = 2
nA<-nB
B = (g.b/5.15) mod p.23 = 19=B
s = B.a/8.15 mod p.23=2
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment