Computer Security 3 CFC Mode Cipher Feedback Cipher
Computer Security 3. CFC Mode : Cipher Feedback Cipher 4. Encryption 64 bit shift register Cipher text Byte ��� 9 C 2 C 3 C 4 C 5 C 6 C 7 C 8 C 9 Key E Cipher text Byte ��� 10 C 10 Select leftmost byte P 10 Plain text Byte ��� 10 C 10
Computer Security 3. Decryption Cipher text Byte ��� 9 64 bit shift register C 2 C 3 C 4 C 5 C 6 C 7 C 8 C 9 Key D Select leftmost byte C 10 Cipher text Byte ��� 10 Cipher text Byte C 10 ��� 10 Plain text Byte ��� P 10 10
Computer Security Implement RSA Program Start 1 ����� Encryption / Decryption 2 ����� Prime �� ������ p, q 5 3 4 ����� File ����� e ��� d ������ p ��� q ������ file Encryption / Decryption 6 7 End
Computer Security Algorithm ����� Prime ������ min ������� check ������� Min mod Prime(I) = 0 Prime ������� No Yes ���� Prime prime(I) > Sqr(min) No Yes ������ Prime ������� Prime(I) �����
Computer Security Algorithm ����� e Start e เปน Prime และมคณสมบตว า m = (p-1)(q-1) gcd (e, (p-1)(q-1)) = 1 gcd(prime(i), m) = 1 NO ����� YES prime ����� e = prime(i) End
Computer Security Start Algorithm ����� d d เปน inverse ของ e modulo กบ (p-1)(q-1) X = (p-1)*(q-1) d * e = 1 mod (p-1)(q-1) d * e = k (p-1)(q-1) + 1 Y = [K*(X +1)] / e No ����� K ���� Y ������ Yes d=Y End
Computer Security Cipher Text = Plain Text e mod n Plain Text = Cipher Text d mod n
Computer Security Algorithm Encryption x = me mod p y = me mod q ��� Fast Mod u. q = K*p + 1 I = (x-y)mod p I=I+p ������ X<Y C = (((u (x-y))mod p )*q) + y
Computer Security Algorithm Decryption x = md mod p y = md mod q ��� Fast Mod u. q = K*p + 1 I = (x-y)mod p I=I+p ������ X<Y M = (((u (x-y))mod p )*q) + y
- Slides: 22