【正文】
sposition Ciphers 這富額代能都一獸貴上表買能個又,打名賣夠人強奴印字。迫隸記的這出這所或。為十 大們獸記凡這六小的的的是數(shù)。算。數(shù)裡獸數(shù) 有自這字需的字 的由印々要數(shù)是 人人記沒有字六 ,就有智,百 無在是這慧因六 論他那印。 ,右右,聰字 貧手字就明代 窮和或不人表 13 Vigenere 加密法 Jwlmliplopwkjmiplopwkjmzieufvhshhnabhofodqfauiipjaoxabtwlmleffrsnruhloggbnn Fesnedxabieltmbeevuiqzizjlogoomoziipfvhsslochiewpufiegnykfauuinoozuhhseltnw brDedotrpdhfpdnoxotdjnvphlhhlucdotnfeslehqmhbwdzazbyisopiivmoyf 14 DES(Data Encryption Standard) ? Plaintext M(64 bits) ? Ciphertext C(64 bits) ? Key K(56 bits or 64 bits) ? Round Function F(X, Y) : X(32 bits) and Y(48 bits) ? Rounds: 16 15 DES(Cont.) ? IP: initial permutation IP(M) = (L, R) ? FP: final permutation : = ? (Ln, Rn) = (Rn1, Ln1 ? F(Rn1, K)) ? F(X, Y) = Perm(S_box( Ext(X) ? Y)) ? C = FP(R, L) 16 P l a i n t e x tP l a i n t e x tL0L 1 6 = R 1 5R 1 5 = L 1 4 x o r f ( R 1 4 , K 1 5 )R 2 = L 0 x o r f ( R 0 , K 1 )R 1 = L 0 x o r f ( R 0 , K 1 )R0R 1 6 = L 1 5 x o r f ( R 1 5 , K 1 6 )L 1 5 = R 1 4L 1 = R 0L 2 = R 1IPffIP1fK 1K 2K 16DES(Fig.) 17 DES(One round) L i 1 R i 1R iL iEb o x Pe rm u t a t i o nPb o x Pe rm u t a t i o nSb o x e s Su b s t i t u t i o nK e yL e f t Sh i f t L e f t Sh i f tC o m p re s s i o n Pe rm u t a t i o n3 2 位元3 2 位元4 8 位元su b k e y : 4 8 位元2 8 位元2 8 位元3 2 位元f f u n c t i o n玻ネ18 Triple DES P l a i n t e x t C i p h e r t e x tDE SDE S DE SDE S1DE S1DE S1K1K3K2E n c i p h e rDe c i p he r19 RSA密碼系統(tǒng) (非對稱加密 ) 產(chǎn)生兩把鑰匙的步驟〆 ? 隨機取兩個很大的質數(shù) p, q。 (意即 gcd (e, ?(n))=1) ? 利用歐幾里得演算法得出 : d such that d 滿足 e * d ≡1 mod ?(n)。 20 RSA (原理 ) (Cd mod n) = ((Me mod n)d mod n) = Me*d mod n = M(k * (p1) * (q1)) + 1 mod n = M1 mod n=M (因為 e * d ≡1 (mod ((p1) * (q1)))。 27 單向函數(shù) Oneway Function ? 定義 〆 一函數(shù)滿足下列條件則稱 f 為 Oneway Function ? 1. 對於所有屬於 F域之 x, 很容易計算出 f(x)=y. ? 2. 對於幾乎所有屬於 f 之範圍的任一 y, 在計算上不可 能求出 x 使得 y=f(x) ? Example: ? y = f(x) =xn+an1 xn1+…+a 1x+a0 mod p X Y 易 f 難 28 Message Authentication Co