e87e88a181d7aa249b9b3858a2b64262.ppt
- Количество слайдов: 70
ICT+ Introduction to Networks ดร. สรศกด URL: มงสงห E-mail: surasak. mu@spu. ac. th mungsing@gmail. com http: //www. spu. ac. th/~surasak. mu 1
ICT+ Agenda SUN 06/07/51 (0900 -1200): Overview (1300 -1600): Network Topology and Basic Protocols SAT 12/07/51 (0900 -1200): Principle of Data Communication SUN 13/07/51 (0900 -1200): Guided and Wireless Networks (1300 -1600): Networking Devices and Software and the Internet SAT 19/07/51 (0900 -1200): Switching and Routing SUN 20/07/51 (0900 -1200): Network Security (1300 -1600): Examination
การรกษาความปลอดภยบนเ ครอขาย 3
Types of Security Information Security - ความปลอดภยของขอมล n Computer Security ความปลอดภยของคอมพวเตอร n Network Security - ความปลอดภยของเครอขาย n 4
Need for Security Some people who cause security problems and why. 5
n Security Threatsภยคกคามความปลอดภย Passive attacks) eavesdropping( ¨ Release of message contents - ลกลอบนำขอมลออกไป ¨ Traffic analysis – แอบวเคราะหสภาวะการจราจร และสงเกตกระบวนการรบสงขอมล ¨ Difficult to detect because there is no data alteration ¨ Emphasis on prevention through encryption n Active attacks เกยวของกบการแกไขเปลยนแปลงสายขอมล ¨ Masquerade – ปลอมเปนผใชทไดรบอนญาต ¨ Replay – ดกจบขอมลโดยไมใหรตว แลวนำมาสงใหมโดยมวตถประสงคราย ¨ Modification of messages- เปลยนแปลงแกไขบางสวนของขอความโดยมวตถประส งคราย ¨ Denial of Service – 6
Security Requirements Confidentiality – ความลบของขอมล เฉพาะผทไดรบอนญาตเทานนจงจะ สามารถเขาถงขอมลไดเทานน n Integrity – ความมนคงของขอมล เฉพาะผทไดรบอนญาตเทานนจงจะ สามารถเปลยนแปลงแกไขขอมลได n Availability ความพรอมใหบรการขอมลเพาะกบผท ไดรบอนญาต n Authenticity n 7
Cryptography The encryption model (for a symmetric-key cipher). 8
Substitution Ciphers n เปนวธการแทนตวอกษรหนงตวหรอหน งกลมดวยตวอกษรอกตวหนงเพอป ดบงคาทแทจรง วธการแบบนทเกาแกทสดเรยกวา Caesar cipher Plaintext: a b c d e fg h i j k l mn o pqr s t u v wxy z Ciphertext: QWERTY UI OPASD FG HJKLZXCVBNM ตวอยางเชน “attack” จะถกแปลงเปน “QZZQEA” 9
Transposition Ciphers เปนแบบทตวอกษรยงรกษาลำดบเดมข องตวอกษรในขอความตนฉบบเอาไวแตจ ดการสบเปลยนตวอกษรเหลานนเปนต วอนทงหมด A transposition cipher. 10
One-Time Pads เปนการสราง ciphertext ทไมสามารถถอดรหส (โดยผทไมไดรบอนญาต ) ได ขนตอนแรกใหเลอกสายอกขระ (bit string) แบบสมเลอก จากนนเปลยน plaintext ใหเปนสายอกขระแลวทำการ exclusive OR สายอกขระทงสองเขาดวยกนทละบต 11
Quantum Cryptography เปนการเขารหสทใชกบการสอสารสญญาณผานใยแกวนำแสงโดยใ ชหลกการของ quantum mechanics ซงจะมการใช polarizing filter เพอปรบความเขมของแสงทลอดออกมา 2 ชดสำหรบทงฝายผรบและฝายผสงคอ rectilinear basis และ diagonal basis 12
Symmetric Encryption n n The only form of encryption prior to late 1970 s Five components to the algorithm เอกสารหรอขอมลตนฉบบ ¨ Plaintext- ¨ Encryption algorithm - ¨ Ciphertext- ¨ Decryption algorithm- ขนตอนวธการเขารหสขอมล ¨ Secret key- กญแจทใชในการเขารหส n ขอความใหมทผานการเขารหสแลว ขนตอนวธในการถอดรหสโดยใชกญแจตวเ ดม Two requirements 13
Conventional Encryption Operation 14
Symmetric Encryption Attacks n Cryptanalysis • เปนความพยายามทจะวเคราะหขนตอนวธการเ ขารหส หากมตวอยางของขอความกอนเขารหสและหลงเ ขารหสดวยแลวกยงมโอกาสทจะนำไปส กญแจทใชในการเขารหสได • ถาประสบความสำเรจ ขอความทสงไปแลวและทจะสงใหมในอนาคต ซงใชกญแจดงกลาวเขารหสจะถกถอดรหสได n Brute Force • เปนการพยายามใชกญแจทคดวาเปนไปไดท กตวในการถอดรหส จนกวาจะไดขอความทอานไดอยางมเหตผล 15
Average time Required for Exhaustive Key Search 16
Symmetric Key Encryption Algorithm n Most commonly used symmetric encryption algorithm are block ciphers. A block cipher processes the plaintext input in fixed-size blocks and produce a block of ciphertext of equal size for each plaintext block. n Two most important symmetric algorithms ¨ DES – Data Encryption Standard ¨ AES – Advanced Encryption Standard 17
Data Encryption Standard (DES) เปน encryption algorithm ทมความโดดเดนหลงจากทเรมใชงานใน ป 1977 n กญแจขนาด 56 -bit ทำให algorithm นงายเกนไปทจะถก crack ไดภายในไมเกนป 1998 n ไดมการยดอายการใช DES โดยใชเทคนค n triple DES (3 DES) ¨ Repeats basic DES algorithm three times, using either two or three unique keys ¨ Key size of 112 or 168 bits ¨ Drawbacks: Algorithm is sluggish in software, 64 -bit block size is inefficient 18
Data Encryption Standard The data encryption standard. (a) General outline. (b) Detail of one iteration. The circled + means exclusive OR. 19
Advanced Encryption Standard n n n 3 DES is not a reasonable candidate for long-term use National Institute of Standard and Technology (NIST) proposes AES with equal or better strength than 3 DES AES be symmetric cipher with a block length of 128 bits and support for key lengths of 128, 192, and 256 bits 20
Advanced Encryption Standard 21
Cryptanalysis 22
Encryption across a Packet –Switching Network 23
Location of Encryption Devices n Link encryption Each vulnerable communications link is equipped on both ends with an encryption device. ¨ All traffic over all communications links is secured. ¨ Vulnerable at each switch ¨ n End-to-end encryption Encryption process carried out at two end systems ¨ Encrypted data transmitted unaltered across network; destination shares key with source to decrypt data ¨ Packet headers cannot be secured ¨ 24
Symmetric Encryption Key Distribution n n Both parties must have the secret key Key is changed frequently Requires either manual delivery of keys, or a thirdparty encrypted channel Most effective method is a Key Distribution Center (e. g. Kerberos) 25
End-to-End Encryption n Two types of keys ¨ Session keys – data are encrypted with one-time session key ¨ Permanent session keys – used between entities for the purpose of distributing Required components ¨ Key distribution center – determines which systems are allowed to communicate with each other and provides one-time session key for that connection ¨ Security service module (SSM) – performs end-to-end encryption and obtain session keys on behalf of users. 26
Automated Key Distribution 27
Traffic Padding เพอปองกนการโจมตแบบ n n n Cryptanalysis A function that produces ciphertext output continuously, even in the absence of plaintext Continuous random data stream is generated. When plaintext is available, it is encrypted and transmitted. When input plaintext is not present, the random data are encrypted and transmitted Makes it impossible for an attacker to distinguish between true data flow and noise and therefore impossible to deduce the amount of traffic 28
Message Authentication Must verify that contents have not been altered and that source is authentic n Approaches n ¨ Authentication using symmetric encryption ¨ Authentication without message encryption ¨ Message authentication code ¨ One-way hash function 29
Message authentication code (MAC) 30
Message Authentication using One-Way Hash Function Only sender and receiver share the encryption key. 31
Message Authentication using One-Way Hash Function (cont. ) 32
Message Authentication using One-Way Hash Function (cont. ) Technique that uses a hash function but no encryption. 33
Hash Function (H) Requirements n n n Can be applied to a block of data of any size. Produces a fixed-length output. H(x) is relatively easy to compute for any given x For any given code h, it is computationally infeasible to find x such that H(x) = h. For any given block x, it is computationally infeasible to find y ≠x with H(y) = H(x). It is computationally infeasible to find any pair (x, y) such that H(x) = H(y). 34
Public-Key Encryption n n ใชวธการเขารหสทใชคยในการเขาร หสและถอดรหสแตกตางกน และคยทใชถอดรหสนนไมสามารถสรา งขนมาจากคยทใชเขารหสได การเขารหส (E) และการถอดรหส (D) จะตองอยในเงอนไข 3 ประการ 1. D(E(P))=P 2. เปนการยากทจะสราง ขนมาจาก 3. E จะตองทนทานตอวธการถอดรหสแบบ D E chosen plaintext attack n Asymmetric, involving the use of two separate keys n ความเขาใจผดเกยวกบการเขารหสดวย 35
Public-Key Encryption Components Plaintext n Encryption algorithm n Public and private key n Ciphertext n Decryption algorithm n 36
Public-Key Encryption Operation Encryption 37
Public-Key Signature Operation Authentication 38
Characteristics of Public-Key Computationally infeasible to determine the decryption key given knowledge of the cryptographic algorithm and the encryption key n Either of the two related keys can be used for encryption, with the other used for decryption n 39
Steps in Public Key Encryption n n Each user generates a pair of keys to be used for the encryption and decryption of messages. Each user places one of the two keys in a public register or other accessible file. This is the public key. The companion key is kept private. If Bob wishes to send a private message to Alice, Bob encrypts the message using Alice's public key. When Alice receives the message, she decrypts it using her private key. No other recipient can decrypt the message because only Alice knows Alice's private key. 40
Digital Signature Process 41
RSA Encryption Algorithm n n Developed in 1977, by Ron Rivest, Adi Schamir and Len Adleman at MIT, first published in 1978 Widely accepted and implemented approach to public-key encryption – ในชวง 25 ปทผานมายงไมมผใดสามารถถอดรหสวธ การนไดเลย (โดยไมทราบคย ( n For plaintext block M and ciphertext block C C = Me mod n ¨ M = Cd mod n = (Me)d mod n = Med mod n ¨ n n n Both sender and receiver must know values of n and e; only receiver knows value of d Public key of KU = {e, n} Private key of KR = {d, n}. 42
RSA Encryption Algorithm) cont(. n วธการแบบ RSA นนนำพนฐานของทฤษฎตวเลขมาใช มขนตอนการทำงานดงน 1. เลอกตวเลขทเปน prime number ขนาดใหญ p และ q) โดยทวไปขนาด 1024 bit) 2. คำนวณ n=p x q และ z=(p-1) x (q-1) 3. เลอกตวเลขทเปน prime number เรยกวา d 4. หาคา e ซง e x d =1 mod z 43
RSA An example of the RSA algorithm. 44
RSA Requirements It is possible to find values of e, d, n such that Med = M mod n for all M < n. n It is relatively easy to calculate Me and Cd for all values of M < n. n It is infeasible to determine d given e and n. n ¨ This requirement can be met with large values of e and n 45
Approaches to Defeating RSA n Brute force approach: try all possible private keys. ¨ The larger the number of bits in e and d, the more secure the algorithm. ¨ However, the larger the size of the key, the slower the system will run. n Cryptanalysis: factoring n into its two prime factors ¨A hard problem, but not as hard as it used to be ¨ Currently, a 1024 -bit key size is considered strong enough for virtually all applications 46
Key Management Symmetric encryption requires both parties to share a secret key n Secure distribution of keys is the most difficult problem for symmetric encryption n Public key encryption solves this problem, but adds the issue of authenticity n Public key certificates address this issue n 47
Public Key Certificate Process Public-key Certificate consists of a public key plus a User ID of the key owner, with the whole block signed by the third trusted party. 48
Public Key Certificate Process 1. A public key is generated by the user and submitted to Agency X for certification. 2. X determines by some procedure, such as a face-toface meeting, that this is authentically the user’s public key. 3. X appends a timestamp to the public key, generates the hash code of the result, and encrypts that result with X’s private key forming the signature. 4. The signature is attached to the public key. 49
Virtual Private Networks (VPNs) n n Internet connectivity provides easier access for telecommuters and off-site employees Use of a public network exposes corporate traffic to eavesdropping and provides an entry point for unauthorized users A variety of encryption and authentication packages and products are available to secure and authenticate remote access Need for a standard that allows a variety of platforms to interconnect securely 50
Virtual Private Networks (a) A leased-line private network. (b) A virtual private network. 51
Applications of IPSec n n n Secures communications across a LAN, WANs, and/or the Internet Can encrypt and/or authenticate all traffic at the IP level Examples of use: ¨ Secure branch office connectivity over the Internet ¨ Secure remote access over the Internet ¨ Establishing extranet and intranet connectivity with partners ¨ Enhancing electronic commerce security 52
Benefits of IPSec n n n When implemented in a firewall or router, provides strong security for all traffic crossing the perimeter IPSec in a firewall is resistant to bypass Runs below the transport layer (TCP, UDP) and so is transparent to applications Can be transparent to end users Can provide security for individual users if needed 53
An IP Security Scenario 54
IPSec Functions n IPSec provides three main facilities ¨ authentication-only function referred to as Authentication Header (AH) ¨ combined authentication/encryption function called Encapsulating Security Payload (ESP) ¨ a key exchange function n For VPNs, both authentication and encryption are generally desired 55
IPsec The IPsec authentication header in transport mode for IPv 4. 56
IPsec (2) (a) ESP in transport mode. (b) ESP in tunnel mode. 57
ESP Transport and Tunneling n Transport Mode provides protection primarily for upper-layer protocols. ¨ Typically used for end-to-end communication between two hosts ¨ encrypts and optionally authenticates the IP payload but not the IP header ¨ useful for relatively small networks; for a full-blown VPN, tunnel mode is far more efficient ¨ n Tunnel Mode Provides protection to the entire packet ¨ Original packet is encapsulated in ESP fields, protecting contents from examination ¨ Used when one or both ends is a security gateway ¨ Multiple hosts on networks behind firewalls may engage in secure communications without implementing IPSec ¨ 58
Scope of ESP Encryption and Authentication 59
IPSec Key Management n Manual ¨ System administrator manually configures each system with its own keys and with the keys of other communicating systems ¨ Practical for small, relatively static environments n Automated ¨ Enables the on-demand creation of keys for SAs and facilitates the use of keys in a large distributed system ¨ Most flexible but requires more effort to configure and requires more software 60
IPSec and VPNs n n n Organizations need to isolate their networks and at the same time send and receive traffic over the Internet Authentication and privacy mechanisms of secure IP allow for security strategy IPSec can be implemented in routers or firewalls owned and operated by the organization, allowing the network manager complete control over security aspects of the VPN 61
Firewalls A firewall consisting of two packet filters and an application gateway. 62
E-Mail Security - Pretty Good Privacy(PGP) ทำการเขารหสขอมลโดยการใช block cipher เรยกวา IDEA (International Data Encryption Algorithm) ใชคยขนาด 128 bits การบรหารคย ใชวธ RSA และการตรวจสอบความถกตองของขอมลเปนแบบ MD 5 PGP in operation for sending a message. 63
Web Security Threats - ภยคกคาม n Secure Naming- การตงชออยางปลอดภย n SSL – The Secure Sockets Layer n Mobile Code Securityการใชโคดทปลอดภยสำหรบโมบาย n 64
ภยคกคาม n n n Hackersทมความสามารถสงกวาโปรแกรมเมอรทวไป Cracker – เวบไซตยอดนยม เชน Yahoo, CIA, NASA เคยถกโจมตมาแลว Denial of Service attack ซง Cracker จะโดมตดวยการ สงขาวสารจำนวนมหาศาล มายงเวบไซ ตนน ทำใหไมสามารถบรการไดตามปกต ป 1999 Cracker ชาวสวเดนบกเขาเวบไซตของ Microsoft Hotmail แลวสราง mirror site ทอนญาตใหผใดกไดสมารถพมพชอผใช hotmail แลว อานขอความใน email ได Cracker ชาวรสเซย อาย 19 ปบกเขาเวบไซต ecommerce แหงหนงและ ขโมยหมายเลขบตรเครดต ไปกวา 30, 000 ใบแลวเรยกรองเงนจากเจาของเวบไซต $100, 000 65 เจาของรานปฏเสธ
Secure Naming (a) Normal situation. (b) An attack based on breaking into DNS and modifying Bob's record. 66
Secure DNS An example RRSet for bob. com. The KEY record is Bob's public key. The SIG record is the top-level com server's signed has of the A and KEY records to verify their authenticity. 67
SSL—The Secure Sockets Layers (and protocols) for a home user browsing with SSL. 68
Java Applet Security Applets inserted into a Java Virtual Machine interpreter inside the browser. 69
70
e87e88a181d7aa249b9b3858a2b64262.ppt