COMPUTER SECURITY

  • View
    140

  • Download
    2

Embed Size (px)

DESCRIPTION

COMPUTER SECURITY

Text of COMPUTER SECURITY

Computer Networks and Security

Crypto "" Graph ""Cryptography

Plain Text Cipher Text Algorithm

Encryption Decryption

Key Cryptography Encryption Decryption

Cryptanalysis Cryptography Sensitive Data

Cryptography 2 1. ( Classic) 2. (Modern)

Cryptography 2 1. Data Encryption : 2. Data Decryption : Cryptography

Cryptography

Encryption + Decryption

1.1 Caesar cipher Caesar cipher 50-70 Julius Caesar Caesar cipher A D B E Caesar cipher (Shiftment, n = 3)

Caesar cipher

Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ Cipher: DEFGHIJKLMNOPQRSTUVWXYZABC Caesar cipher Fox Code

Plaintext: the quick brown fox jumps over the lazy dog Ciphertext: WKH TXLFN EURZQ IRA MXPSV RYHU WKH ODCB GRJ

Fox Code the quick brown fox jumps over the lazy dog 26 Augustus ( Caesar 12 Caesars) Julius Caesar A C B D (Shiftment, n = 2)

(Break) ( ) Caesar cipher Shiftment n=1, n=2, n=3, ... n=26 26 ( 26 )

Monoalphabetic Cipher ( Monoalphabetic substitution ciphers) 1 1 () Monoalphabetic ciphers Atbash A Z B Y C X

Plain: abcdefghijklmnopqrstuvwxyz Cipher: ZYXWVUTSRQPONMLKJIHGFEDCBA

Monoalphabetic ciphers

Monoalphabetic ciphers Caesar cipher 26 26 26! (26! = 26 x 25 x 24 x 23 x x 1)

Monoalphabetic ciphers (frequency analysis) e t e 13% t 9%

e, t, a, i, o, n, s, h, y, d l Monoalphabetic ciphers Monoalphabetic ciphers e

( )

Polyalphabetic Encryption Blaise De Vignere 500 Multiple Monoalpha Cipher Monoalphabetic ciphers n = 7 C1 n = 15 C2 (Pattern) C1, C2, C2, C1, C2

1 Polyalphabetic Encryption Friedrich Kasiski 1863 Cipher Text Pattern Cipher text Frequency Analysis

-

One-Time Pad Gilbert Vernam 1 Polyalphabetic Encryption 1 Key Plain Text Cipher Text Plain Text L N () L V Opration + - XOR

One-Time Pad Cipher Text Random Random Key One-Time Pad ( L N L V

One-Time Pad Key Plain Text Key Key ( Key ) Key Key

Playfair cipher Block Cipher .. 1854 Sir Charles Wheatstone Baron Playfair Albert Load Palmerston Playfair cipher 1

(1) Key 5 x 5 = 25 Q Key 5x5

P I B J T

L R C K U

A E D N V

Y X G O W

F M H S Z

(2) Plain Text X Z "Hide the gold in the tree stump" HI DE TH EG OL DI NT HE TR EX ES TU MP ^ X E

(3) Column HI (H I H Column I) BM (H I B M)(4) 2 Column ( ) DE ND D N E D

(5) 2 ( ) TU UV T U U V Plain Text: HI DE TH EG OL DI NT HE TR EX ES TU MP Cipher Text: BM ND ZB XD KY BE JV DM UI XM MN UV IF

Playfair cipher 1. Computer Network and Security 2. Informatics 3. Mahasarakham University 4. ()

P I B J T

L R C K U

A E D N V

Y X G O W

F M H S Z

1.2. 3. 4. 5.

(Cryptography) 5 20 .. 2552

2.1 DES (Data Encryption Standard) DES Block cipher Lucifer IBM Lucifer DES US NIST (US National Institute of Standards and Technology)

DES 64 64 ( ) 2 ( 32 ) ( f) Key 16 ( 16) 64

DES

f Key 48 56 (32 ) 48 48 ( ) XOR 48 8 32

f 4 XOR

f DES

DES RSA 10,000 US$ Distribution.net 41 DES EFF 56 Distribution.net EFF 100,000 DES 22 15 Key DES 64 Bit 128 Bit

DES DES 64 Bit DES 128 Bit 128 bit DES Tripple-DES (3DES)

Triple-DES DES Triple-DES DES Triple-DES 3 ( 56 ) Triple-DES

Tripple-DES

AES (Advance Encryption Standard) DES DES AES 1997 NIST ( 1998) NIST 128 Bit 256 Bit

15 5 Rijndeal RFC 3826 2004 AES Key 128 Bit, 192 Bit 256 Bit

AES 3 Initial Round, Rounds Final Round (1) Initial Round - AddRoundKey (2) Rounds - SubBytes: non-linear substitution lookup table ( 7) - ShiftRows: 2, 3 4

- MixColumns: 4 - AddRoundKey Cipher Text Key ( key schedule) Cipher Text (3) Final Round (no MixColumns) - SubBytes - ShiftRows - AddRoundKey

SubBytes, ShiftRows, MixColumns AddRoundKey

AES

" " (Symatric Key Cryptography) Key DES AES Blowfish IDEA AES Key 128 bit

- Key Key Key Cipher Text - N N x (N-1) / 2 " " Asymatric Key Cryptography

(Asymatric Key Cryptography) Asymatric Key Encryption Public Key Encryption Public Key Infrastructure (PKI) Public-Key Cryptography

Whit Diffie Marty Hellman 1976 ( ) Key Key Key Key Key

- Key1 Key2 - Key2 Key1 - Key1 Key1 - Key2 Key2

Key Private Key Key Key Public Key Private Key Public Key Private Key Private Key Public Key ()

RSA 1978 Ron Rivest, Adi Shamir Leonard Adleman RSA e-commerce

(1) p q (2) n = pq (3) m = (p-1)(q-1) (4) e 1 < e < m m e 1 ( e m e 1) (5) d ed mod m = 1 (6) Public key (e,n) (7) Private key (d,n) (8) M () M < n (9) => C = M^e mod n (10) => M = C^d mod n

RSA Public Key (e,n) Message (M) Cipher (C) Private Key (d)

(1) p q p=7 q = 17(2) n = pq n = 7*17 = 119

(3) m = (p-1)(q-1) m = 6*16 = 96

(4) e 1 < e < m m e 1 ( e m e 1) e = 5 96 5 1 (5) d ed mod m = 1 d = 77 5*77 mod 96 1

(6) Public key (e,n) Public key (5,119) (7) Private key (d,n) Private key (77,119)

(8) M () M < n M = 19 (9) => C = M^e mod n C = 19^5 mod 119 = 66 (10) => M = C^d mod n M = 66^77 mod 119 = 19

ECC Elliptic Curves Cryptography Neal Koblitz Victor S. Miller 1985 ECC

y^2= x^3 + ax + b

Elliptic Curves

ECC RSA RSA RSA Brute Force RSA ECC Key RSA ECC Pocket PC PDA

ECC RSA

Hash (Cryptographic hash) (Message Digest) Hash MD4, MD5, SHA-1 SHA-2

thawatchai abc123 Database ( SQL Injection) Hash MD5 abc123 e99a18c428cb38d5f260853678922e03 Databse Database abc123 (e99a18c428cb38d5f260853678922e03)

Hash MD5 Databse Linux (/etc/shadow) MD5 Web Application Moodle Mambo

MD5 Ron Rivest 1 3 RSA

MD5 Digital Signature ecommerce MD5 (Professor Dr. Xiaoyun Wang) 2004 IBM P690 1 Notebook 1.6 GHz MD5 8

md5 Linux $ md5 exim-4.43.tar.bz2 MD5 (exim-4.43.tar.bz2) = f8f646d4920660cb5579becd9265a3bf $

SHA0 SHA1 MD5 MD5 Output Random Collision SHA1

SHA0 SHA1 (Professor Dr. Xiaoyun Wang) MD5 SHA2 SHA2

(Non-repudiation) (Authentication) Asymatric Key Cryptography Private Key A Private Key B C B C Public Key A A Private Key A

" " Private Key ( ) CPU CPU Hash

SenderMessageHash Function

RecipientMessage Signature MessageHash Function

+ SignaturePrivate key

+ SignaturePublic key

Digest

? Digest =

Digest

Message digest Oneway hash function message digest (Digital Signature) Public key

- message digest - message digest -

- message digest - - ( ) message digest - message digest

1. () Hash ( MD5 SHA1) Message Digest 2 . Message Digest Private Key "Digital Signatures" 3 . () Plain Text Digital Signatures ( 2 (a) (b) Digital Signatures)

4 . Digital Signatures Public Key Message Digest 5 . Hash ( MD5 SHA1) Message Digest 6 . Message Digest

- Digital Signatures Public Key Private Key Key - Hash Plain Text Digital Signatures

Data, Digital Signature, Public Key Public Key Certificate (Public Key CA ) Digital Signatures 6 Apply 3 5

3 ( ) ( ) Plain Text Public Key Cipher Text Cipher Text Digital Signatures ( 2 (a) Cipher Text (b) Digital Signatures)

5 ( ) Cipher Text Pivate Key Plain Text Hash ( MD5 SHA1) Message Digest ( 3 5 1,2,4,6 )

- -

(Asymatric Key Cryptography) Public Key MITM: Man In The Middle Key Publi