Chapter 8 Network Security
Need For Security • Motivation: Why do we need security? • Increased reliance on Information technology with or with out the use of networks • The use of IT has changed our lives drastically. • We depend on E-mail, Internet banking, and several other governmental activities that use IT • Increased use of E-Commerce and the World wide web on the Internet as a vast repository of various kinds of information (immigration databases, flight tickets, stock markets etc.)
Need For Security • Damage to any IT-based system or activity can result in severe disruption of services and losses • Systems connected by networks are more prone to attacks and also suffer more as a result of the attacks than stand-alone systems (Reasons?) • Concerns such as the following are common • How do I know the party I am talking on the network is really the one I want to talk? • How can I be assured that no one else is listening and learning the data that I send over a network • Can I ever stay relaxed that no hacker can enter my network and play havoc?
More Security Concerns • Is the web site I am downloading information from a legitimate one, or a fake? • How do I ensure that the person I just did a financial transaction denies having done it tomorrow or at a later time? • I want to buy some thing online, but I don’t want to let them charge my credit card before they deliver the product to me.
That is why… • ..we need security • To safeguard the confidentiality, integrity, authenticity and availability of data transmitted over insecure networks • Internet is not the only insecure network in this world • Many internal networks in organizations are prone to insider attacks • In fact, insider attacks are greater both in terms of likelihood of happening and damage caused.
Network Security • Unless security measures are taken, a network conversation or a distributed application may be compromised by an adversary (or “black hat”). • For example eavesdropping: how is this done? • On an Ethernet, any node can be configured to receive all the traffic. • Wireless communication can be monitored without a physical connection. • More elaborate approaches include wiretapping or planting spy ware on on nodes.
Threats and Solutions • Confidentiality and Integrity • Authentication • Access control • Denial of Service (DoS) and Availability • Non-repudiation
Security Attacks • Interruption: This is an attack on availability • Disrupting traffic • Physically breaking communication line • Interception: This is an attack on confidentiality • Overhearing, eavesdropping over a communication line
Security Attacks • Modification: This is an attack on integrity • Corrupting transmitted data or tampering with it before it reaches its destination • Fabrication: This is an attack on authenticity • Faking data as if it were created by a legitimate and authentic party
Types of Threats • Information access threats • Intercept or modify data on behalf of users who should not have access to that data. • E.g. corruption of data by injecting malicious code • Service threats • Exploit service flaws in computers to inhibit use by legitimate uses. • E.g. disabling authentication, denial of service (DoS)
Security Goals Confidentiality Integrity Availability
Confidentiality and Integrity • Encrypting messages provides confidentiality, because the contents of a message cannot be easily understood. • Concealing the quantity or destination of communications is called traffic confidentiality. • A protocol that detects message tampering provided data integrity. The adversary could transmit an extra copy of your message in a replay attack. • A protocol that detects replays provides originality. • A protocol that detects delaying tactics provides timeliness. • Data integrity, originality, and timeliness are all aspects of integrity.
Authentication • Another threat to a customer is unknowingly being directed to a false web site often used in “phishing”- attempting to gather your personal information. • This results from a DNS attack in which false information is entered into a domain name server or into the name service cache of the customer’s computer, causing a correct URL to be is translated into an incorrect IP address. • A protocol that ensures that you are communicating with the host/person you think you are sending to is authentication.
Access Control and Availability • The owner of the web site can be attacked. The contents or format can be remotely accessed, modified, destroyed without authorization. • This is an issue of access control: enforcing the rules of who is allowed to do what. • Web site have been subject to denial of service attacks (DoS), during which users cannot access it because of numerous bogus requests. Ensuring a degree of access is called availability.
Non-repudiation • Both the customer and the web site face threats form each other. • Each can deny that a transaction occurred, or invent a nonexistent transaction. • Non-repudiation means that a bogus denial repudiation of a transaction can be disproved and nonforgeability means that claims of a bogus (forged) transaction can be disproved.
Cryptographic Tools • Cryptographic algorithms – ciphers andcryptographic hashes are building blocks of a solution. • Then the keys, or secret parameters input into the algorithms, need to be distributed securely. • These need to be incorporated into the protocols that provide secure communications between those who possess the correct keys.
Principles of Ciphers • Encryption transforms a message in such a way that it becomes unintelligible to anyone who cannot reverse the transformation. • Sender applies an encryption function to a plaintext message, resulting in a cipher text message that is sent over the network. • Receiver applies a secret decryption function-the inverse of the encryption function- to recover the original message.
Symmetric Key Encryption and Decryption Example: Caesar cipher
Principles of Ciphers • The cipher text, transmitted across the network (in binary) is unintelligible to anyone eavesdropping on the network, who does not know the decipher function. • The transformation represented by the encryption and its corresponding decryption function is called a cipher.
Principles of Ciphers • Since 1883 cryptographers have used the basic principle that the encryption and decryption functions should be parameterized by a key and that the functions should be public knowledge- only the key must be secret. • The cipher text produced for a given plaintext message depends on both the encryption function and the key. • Basic requirement is that encrypted messages cannot be read by those who do not know the key. • It is easy to encode, but hard (nearly impossible to decode). • If a key has n bits there are 2n possible values- thus large keys are used.
Key Size (bits) Number of Alternative Keys Time required at 106 Decryption/µs 32 232 = 4.3 x 109 2.15 milliseconds 56 256 = 7.2 x 1016 10 hours 128 2128 = 3.4 x 1038 5.4 x 1018years 168 2168 = 3.7 x 1050 5.9 x 1030years Average time required for exhaustive key search
Ciphers • Block ciphers- defined to take input as a block of (64 to 128) bits. Called electronic codebook (ECB) mode encryption, it has the weakness that the same plaintext will always produce the same cipher text block. Recurring sequences will make it easier to decode. • The are modes of operation that make the cipher text vary. Cipher block chaining XOR’s each plaintext block with the cipher text of the previous one (except the 1st, which is randomly generated.)
Cipher Block Chaining(CBC) Encryption Function Blocks of Cipher text XOR Initialization vector
Secret or Symmetric Key Ciphers • In symmetric-key ciphers, both parties share the same key, which is used both for encryption and decryption. • These are also called private-key or secret-key ciphers, because the key must remain secret. • Data Encryption Standard (DES) was the first of these and used 56 bit keys (now too small with fast processors to decode). • 1999 DES should only be used for legacy systems.
Secret or Symmetric Key Ciphers • DES encrypts a 64 bit block using a 64 bit key, which contains 56 usable bits and 8 parity bits: • DES has 3 phases: • The 64 bits in the block are permuted ( shuffled) • Sixteen rounds of identical operations are applied to the resulting data and the key. • The inverse of the original permutation is applied to the result. • During each round, the block is broken in half and a different 48 bits are selected from the 56 bit key.
L R i ─ 1 i ─ 1 F K i + L R i i Manipulation At Each Round Of DES F and K are functions (See formulas pp. 585-587).
Secret or Symmetric Key Ciphers • Triple DES (3DES) uses the cryptanalysis-resistance of DES and increases the key size to 168 bits (3*56) and uses 3 keys. It is slow because it was originally designed to be implemented in hardware. • Replaced in 2001 by Advanced Encryption Standard (AES), which support bit lengths of 128, 192, or 256 bits and blocks of 128 bits. • AES permits fast implementation in hardware and software. It requires little memory and so can be used in small mobile devices. It has proven mathematically secure properties and has not been successfully attacked.
Public Key Encryption (RSA) • Asymmetric or public-key ciphers are an alternative to symmetric-key ciphers. • A public-key cipher uses a pair of keys, one for encryption and another one for decryption. The pair of keys is “owned” by one participant. • The owner keeps the decryption key secret so that only the owner can decrypt messages. This key is the private key. • The encryption key is public so that anyone can encrypt a message. This key is the public key.
Pubic Key Encryption (RSA) • Public key ciphers are used primarily for Concept of public-key ciphers was first published in 1976 by Diffie and Hellman although the British and the US National Security Agency (NSA) claim to have discovered them as early as the mid 1960’s. • authentication. • RSA is best known, named after it developers: Rivest, Shamir and Adleman. • It relies on the high computational cost of factoring very large prime numbers.It needs large keys (1024 bits or greater) to be secure. Slower than public keys
Security Mechanisms • Cryptographic algorithms are just one part of providing network security. • We need a set of mechanisms and protocols to authenticate participants, techniques for assuring the integrity of messages and some approaches to the problem of distributing public keys.
Authenticators • Encryption alone does not provide data integrity. Nor does encryption alone provide authentication. • An authenticator is a value, to be included with a transmitted message, that can be used to verify simultaneously the authenticity and the data integrity of the message.
Authenticators • To support data integrity an authenticator includes redundant information about the message contents. (It is like a checksum or CRC). • To support authentication, an authenticator includes some proof that whoever created the authenticator knows some “secret” that is only known to the message sender.( For example, the secret could be a key and the proof could be some value encrypted using the key.)
Authentication • There are three common protocols for implementing authentication. • Two use secret key cryptography (DES) and the third uses public-key cryptography (RSA). • During authentication, two participants establish the session key that is used to establish privacy during the communication.
Simple Three Way Handshake • A simple authentication protocol is possible when two participants who want to authenticate each other- think of them as a client and server- already share a secret key. • The use a 3-way handshake, where E(m,k) denotes the encryption of a message m with a key k and D(m,k) denotes the decryption of the message. SHK is the server handshake key. • The client also decrypts a random number (y) sent by the server and returns it to the server. • Situation is similar to user(client) having an account on a server, where both know the password.
Client Server ClientId, E( , CHK) Y E( y + , CHK) E(SK, SHK) Three Way Handshake Protocol for authentication
Trusted Third Party • Two participants may know nothing about each other, but both may trust a third party. • Third part is called an authentication server and uses a protocol to help the two parties authenticate each other. • There are several different protocols. Kerberos, developed at MIT, is a common one.
KERBEROS In Greek mythology, a many headed dog, the guardian of the entrance of Hades
Kerberos • Kerberos is a computer network authentication protocol which allows individuals communicating over an insecure network to prove their identity to one another in a secure manner. • Kerberos prevents eavesdropping or replay attacks, and ensures the integrity of the data.
Kerberos • Uses symmetric key cryptography • Requires a trusted third party, called a Key Distribution Center (KDC) • Authentication Server (AS) • Ticket Granting Server (TGS) • Based on “tickets” to prove the identity of users