Computer security: message authenticationSecurity goalsRC4 (or ARC4)Initialization from a seedSign and verify using Hmackey distributionRSA public-key cipherSlide 8Sign and verify using RSAComputer security: message authenticationFrans Kaashoek6.033 Spring 2007Security goals•Confidentiality•Authentication–Message–User•AuthorizationRC4 (or ARC4)byte S[256];procedure RC4_generate() return key-byte {i (i + 1) mod 256;j (j + S[i]) mod 256;swap (S[i], S[j]);t (S[i] + S[j]) mod 256;return S[t];Initialization from a seedprocedure RC4_init (seed)for i from 0 to 255 do {S[i] i;K[i] seed[i];}j 0;for i from 0 to 255 do {j (j + S[i] + K[i]) mod 256;swap( S[i], S[j]);}i 0; j 0;Sign and verify using Hmacprocedure sign (m, k) {t H((k outerpad) +H((k innerpad) + m))return t;}procedure verify (m, t, k) {h H((k outerpad) + H((k innerpad) + m))if (h = t) return accept;else return reject;}key distribution•3 is a certificate for Alice’s public key•Charles is called a certificate authorityCharlesBobAlice2. Alice?1. M, Sign(M, KApriv)3. M = “A’s Kapub =…”, sign(M, KCpriv)RSA public-key cipher•p, q primes•n p q•z (p-1) (q-1)•Pick e relative prime to z•Pick d s.t. ed = 1 (mod z)•K1 = (e, n)•K2 = (d, n)•Message m s.t. 0 ≤ m < nTransformC ← me (mod n)Reverse TransformCd(mod n) = med (mod n) =mp = 47, q = 59n ← 2773z ← 2668e = 17, d = 157m ← 31c ← 3117 (mod 2773) = 587587157 (mod 2773) = m2005: 640-bit key factored in 3 months using 80 2.2Ghz OpteronsSign and verify using RSAprocedure sign (m, Kpriv) {t hash(m)t RSA-transform (h, Kpriv)return t;}procedure verify (m, t, Kpub) {h RSA-reverse (t, Kpub)if (hash(h) = t) return accept;else return reject;}Needs further
View Full Document