By: Nasoor Bagheri (na_bagheri@yahoo.com) In the name of god Network Security By: Nasoor Bagheri (na_bagheri@yahoo.com)

Slides:



Advertisements
Similar presentations
Chapter 3 Public Key Cryptography and Message authentication.
Advertisements

Network Security Md. Kamrul Hasan Assistant Professor and Chairman
Sri Lanka Institute of Information Technology
CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography.
Digital Signatures and Hash Functions. Digital Signatures.
Lesson Title: Introduction to Cryptography Dale R. Thompson Computer Science and Computer Engineering Dept. University of Arkansas
First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown and edited by Archana Chidanandan Cryptographic Tools.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
Cryptographic Technologies
Security Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to: –Describe the reasons for having system.
Security Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to: –Describe the reasons for having system.
Cryptography April 20, 2010 MIS 4600 – MBA © Abdou Illia.
Cryptography and Network Security Chapter 11 Fourth Edition by William Stallings Lecture slides by Lawrie Brown/Mod. & S. Kondakci.
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
Chapter 20: Network Security Business Data Communications, 4e.
Network Security. Contents Security Requirements and Attacks Confidentiality with Conventional Encryption Message Authentication and Hash Functions Public-Key.
Encryption Methods By: Michael A. Scott
Network Security Sorina Persa Group 3250 Group 3250.
1 Message Authentication and Hash Functions Authentication Requirements Authentication Functions Message Authentication Codes Hash Functions Security of.
CRYPTOGRAPHIC DATA INTEGRITY ALGORITHMS
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Lecture 2: Message Authentication Anish Arora CSE5473 Introduction to Network Security.
Encryption is a way to transform a message so that only the sender and recipient can read, see or understand it. The mechanism is based on the use of.
Lecture 3: Cryptographic Tools modified from slides of Lawrie Brown.
1 Fluency with Information Technology Lawrence Snyder Chapter 17 Privacy & Digital Security Encryption.
CS5204 – Fall Cryptographic Security Presenter: Hamid Al-Hamadi October 13, 2009.
DNSSEC Cryptography Review Track 2 Workshop July 3, 2010 American Samoa Hervey Allen.
© Neeraj Suri EU-NSF ICT March 2006 DEWSNet Dependable Embedded Wired/Wireless Networks MUET Jamshoro Computer Security: Principles and Practice Slides.
Acknowledgements: William Stallings.William Stallings All rights Reserved Session 4 Public Key Cryptography (Part 2) Network Security Essentials Application.
Message Authentication  message authentication is concerned with: protecting the integrity of a message protecting the integrity of a message validating.
Information Security Principles Assistant Professor Dr. Sana’a Wafa Al-Sayegh 1 st Semester ITGD 2202 University of Palestine.
1 Chapter 11: Message Authentication and Hash Functions Fourth Edition by William Stallings Lecture slides by Lawrie Brown (modified by Prof. M. Singhal,
Symmetric and Asymmetric Ciphers. Symmetric Encryption  or conventional / private-key / single-key  sender and recipient share a common key  all classical.
Computer Networks with Internet Technology William Stallings Network Security.
Network Security. Security Threats 8Intercept 8Interrupt 8Modification 8Fabrication.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Dr. L. Christofi1 Local & Metropolitan Area Networks ACOE322 Lecture 8 Network Security.
Cryptography, Authentication and Digital Signatures
Based on Applied Cryptography by Schneier Chapter 1: Foundations Dulal C. Kar.
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Fall 2002CS 395: Computer Security1 Chapter 11: Message Authentication and Hash Functions.
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
Message Authentication and Hash Functions Chapter 11.
Information Security By:-H.M.Patel. Information security There are three aspects of information security Security service Security mechanism Security.
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 2 – Cryptographic.
Network Security David Lazăr.
11.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Message Integrity and Message Authentication.
11-Basic Cryptography Dr. John P. Abraham Professor UTPA.
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
Encryption No. 1  Seattle Pacific University Encryption: Protecting Your Data While in Transit Kevin Bolding Electrical Engineering Seattle Pacific University.
William Stallings Data and Computer Communications Chapter 18 Network Security.
Chapter 11 Message Authentication and Hash Functions.
Cryptography and Network Security Chapter 12 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Lecture 23 Symmetric Encryption
Cryptography and Network Security (CS435) Part Nine (Message Authentication)
UNIT-VIII Syllabus Application Layer – Network Security, Domain name system, SNMP, Electronic Mail; the World WEB, Multi Media.
Network Security Introduction
Network Security Celia Li Computer Science and Engineering York University.
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 21 – Network Security.
Network Security.
Cryptographic Hash Function
Security through Encryption
Chapter -7 CRYPTOGRAPHIC HASH FUNCTIONS
Presentation transcript:

By: Nasoor Bagheri (na_bagheri@yahoo.com) In the name of god Network Security By: Nasoor Bagheri (na_bagheri@yahoo.com)

Introduction In most systems security is an important concern Communications should be secure against eavesdropping and tampering Servers/clients should be able to verify the identity of their clients/servers The originator of a message should be verifiable after the message has been delivered

Security Requirements Confidentiality Integrity Availability Authenticity

Security Levels unconditional security computational security no matter how much computer power is available, the cipher cannot be broken since the ciphertext provides insufficient information to uniquely determine the corresponding plaintext computational security given limited computing resources (eg time needed for calculations is greater than age of universe), the cipher cannot be broken Unconditional security would be nice, but the only known such cipher is the one-time pad (later). For all reasonable encryption algorithms, have to assume computational security where it either takes too long, or is too expensive, to bother breaking the cipher.

Evolution of System Security 1965-75 1975-89 1990-99 Current Platforms Multi-user timesharing computers Distributed systems based on local networks The Internet, wide- area services The Internet + mobile devices Shared resources Memory, files Local services (e.g. NFS), local networks Email, web sites, Internet commerce Distributed objects, mobile code Security requirements User identification and authentication Protection of services Strong security for commercial transactions Access control for individual objects, secure mobile code management environment Single authority, single authorization database (e.g. /etc/ passwd) delegation, repli- cated authorization databases (e.g. NIS) Many authorities, no network-wide authorities Per-activity authorities, groups with shared responsibilities

Techniques Security mechanisms are based on three techniques Cryptography Used to conceal information Used in support of authentication Used to implement digital signatures Authentication Validate the identity of the sender Access Control Allow resources to be accessed only by authorized individuals

Goals Authentication: Are you who you claim to be? Authorization: Are you authorized to do this? Integrity: Is the message what the user has sent? Confidentiality: Can one read this? Availability (Denial-of-service attacks) Accountability (Non-repudiation): How can we prove that the message was indeed sent by the sender?

Tools Cryptography: Symmetric and asymmetric Symmetric: A single secret key for encryption and decryption Asymmetric: A key pair: Public key and private key; sender encrypts using key owner’s public key; key owner decrypts using corresponding private key

Tools (contd.) Encryption/Decryption algorithms Digital signatures: Sender uses private key to generate a special tag and appends to the message. Receiver cross checks the integrity by rechecking with the sender’s public key. (Third party can resolve a dispute) Message authentication code (MAC): Secret key, when applied on a message, gives MAC. The receiver can regenerate the MAC and ensure the integrity of the message Cryptographic hash functions

Security Persons managing the security of a valued resource consider Prevention: taking measures that prevent damage. E.g., one-time passwords (s/key) Detection: measures that allow detection of when an asset has been damaged, altered, or copied. E.g., intrusion detection, network forensics Risk assessment: the value of a resource should determine how much effort (or money) is spent protecting it. E.g., If you have nothing in your house of value do you need to lock your doors other than to protect the house itself? If you have an $16,000,000 artwork, you might consider a security guard.

Threats and Form of Attacks Security threats common to computer systems fall into four broad classes Leakage Acquisition of information by unauthorized parties Tampering The unauthorized alteration of information Resource Stealing use of facilities without authorization Vandalism interference with proper operation 2 main categories of attack: passive and active.

Passive Attacks Eavesdropping on transmissions to obtain information Release of message contents Outsider learns content of transmission Traffic analysis By monitoring frequency and length of messages, even encrypted, nature of communication may be guessed Difficult to detect Can be prevented

Active Attacks Masquerade Replay Modification of messages Pretending to be a different entity Replay Modification of messages Denial of service Easy to detect Detection may lead to deterrent Hard to prevent

Methods of attack Eavesdropping Replaying DoOperation . (continue) GetRequest . execute SendReply replay eaves- drop

Methods of attack cont. Masquerading GetRequest . execute SendReply client imposter DoOperation . (continue) server imposter

Cryptography The most widely used tool for securing information and services is cryptography. Cryptography relies on ciphers: mathematical function used for encryption and decryption of a message. Encryption: the process of disguising a message in such a way as to hide its substance. Ciphertext: an encrypted message Decryption: the process of returning an encrypted message back into plaintext. Encryption Decryption Plaintext Ciphertext Original

Example Ciphers Caesar cipher: each plaintext characters is replaced by a character k to the right. “Watch out for Brutus!” => “Jngpu bhg sbe Oehghf!” Only 25 choices! Not hard to break by brute force. Substitution Cipher: each character in plaintext is replaced by a corresponding character of ciphertext. E.g., cryptograms in newspapers. plaintext code: a b c d e f g h i j k l m n o p q r s t u v w x y z ciphertext code: m n b v c x z a s d f g h j k l p o i u y t r e w q 26! Possible pairs.

Ciphers For some message M, let’s denote the encryption of that message into cipher text as Ek(M) = C Similarly, the decryption into plain text as Dk(C) = M Notice, Dk(Ek(M)) = M symmetric key algorithms. Some algorithms use different keys for each operation: Dk1(Ek2(M))= M public-key algorithms.

Figure 16.1 Simplified Model of Symmetric Encryption

Ingredients Plain text Encryption algorithm Secret key Cipher text Decryption algorithm

Requirements for Security Strong encryption algorithm Even if known, should not be able to decrypt or work out key Even if a number of cipher texts are available together with plain texts of them Sender and receiver must obtain secret key securely Once key is known, all communication using this key is readable

Attacking Encryption Cryptanalysis Brute force Relay on nature of algorithm plus some knowledge of general characteristics of plain text Attempt to deduce plain text or key Brute force Try every possible key until plain text is achieved

Timing Attacks developed in mid-1990’s exploit timing variations in operations eg. multiplying by small vs large number or IF's varying which instructions executed infer operand size based on time taken RSA exploits time taken in exponentiation countermeasures use constant exponentiation time add random delays blind values used in calculations

Cryptanalysis Ke Kd C = EKe(plaintext) Encrypt Decrypt plaintext Invader Side information plaintext Cryptanalysis

Cryptanalysis Cryptanalysis is the science of recovering the plaintext of a message without access to the key. Doesn’t have to discover the key necessarily. The loss of a key without cryptanalysis is called a compromise. Ciphertext-only attack The attacker has to recover the plaintext from only the ciphertext. Known-plaintext attack Portions of the cipher are known as plaintext. The rest may be easier to recover Chosen-plaintext attack The attacker can choose what plaintext to encrypt, again making it easier to recover other ciphertext.

Encryption Algorithms Block cipher Process plain text in fixed block sizes producing block of cipher text of equal size Data encryption standard (DES) Triple DES (TDES) Advanced Encryption Standard

Simple Block Cipher Plaintext message B3 B2 B1 B0 encrypt B0 B1 B2 B3

Problem If the same block is encrypted twice with the same key, the resulting ciphertext blocks are the same It is desirable to make identical plaintext blocks encrypt to different ciphertext blocks. Two methods are commonly used for this: CBC mode: a ciphertext block is obtained by first xoring the plaintext block with the previous ciphertext block, and encrypting the resulting value. CFB mode: a ciphertext block is obtained by encrypting the previous ciphertext block, and xoring the resulting value with the plaintext.

CBC XOR Bn+4 Bn+3 Bn+2 Bn+1 encrypt Bn-3 Bn-2 Bn-1 Bn

Stream Ciphers For some applications encryption in blocks will not work Telephone conversation Radio Broadcast … White noise…

Stream Cipher encrypt K3 K2 K1 K0 buffer keystream XOR number generator encrypt K3 K2 K1 K0 buffer keystream XOR Plaintext stream Encrypted stream

Data Encryption Standard US standard 64 bit plain text blocks 56 bit key Broken in 1998 by Electronic Frontier Foundation Special purpose machine Less than three days DES now worthless

Triple DEA ANSI X9.17 (1985) Incorporated in DEA standard 1999 Uses 3 keys and 3 executions of DEA algorithm Effective key length 112 or 168 bit Slow Block size (64 bit) too small

Advanced Encryption Standard National Institute of Standards and Technology (NIST) in 1997 issued call for Advanced Encryption Standard (AES) Security strength equal to or better than 3DES Improved efficiency Symmetric block cipher Block length 128 bits Key lengths 128, 192, and 256 bits Evaluation include security, computational efficiency, memory requirements, hardware and software suitability, and flexibility 2001, AES issued as federal information processing standard (FIPS 197)

AES Description Assume key length 128 bits Input is single 128-bit block Depicted as square matrix of bytes Block copied into State array Modified at each stage After final stage, State copied to output matrix 128-bit key depicted as square matrix of bytes Expanded into array of key schedule words Each four bytes Total key schedule 44 words for 128-bit key Byte ordering by column First four bytes of 128-bit plaintext input occupy first column of in matrix First four bytes of expanded key occupy first column of w matrix

Location of Encryption Devices Figure: Encryption Across a Packet Switching Network

Link Encryption Each communication link equipped at both ends All traffic secure High level of security Requires lots of encryption devices Message must be decrypted at each switch to read address (virtual circuit number) Security vulnerable at switches Particularly on public switched network

End to End Encryption Encryption done at ends of system Data in encrypted form crosses network unaltered Destination shares key with source to decrypt Host can only encrypt user data Otherwise switching nodes could not read header or route packet Traffic pattern not secure Use both link and end to end

Key Distribution Question: How to deliver a shared key to 2 parties that wish to exchange data without others to see the key? Key selected by A and delivered to B Third party selects key and delivers to A and B Use old key to encrypt and transmit new key from A to B Use old key to transmit new key from third party to A and B

Message Authentication Protection against active attacks Falsification of data Eavesdropping Message is authentic if it is genuine and comes from the alleged source Authentication allows receiver to verify that message is authentic Message has not altered Message is from authentic source Message timeline

Authentication Using Encryption Assumes sender and receiver are only entities that know key Message includes: error detection code sequence number time stamp

Authentication Without Encryption Authentication tag generated and appended to each message Message not encrypted Useful for: Messages broadcast to multiple destinations Have one destination responsible for authentication One side heavily loaded Encryption adds to workload Can authenticate random messages Programs authenticated without encryption can be executed without decoding

Message Authentication Code Generate authentication code based on shared key and message Common key shared between A and B If only sender and receiver know key and code matches: Receiver assured message has not altered Receiver assured message is from alleged sender If message has sequence number, receiver assured of proper sequence

Figure : Message Authentication Using a Message Authentication Code

One Way Hash Function Accepts variable size message and produces fixed size tag (message digest) Advantages of authentication without encryption Encryption is slow Encryption hardware expensive Encryption hardware optimized to large data Algorithms covered by patents Algorithms subject to export controls (from USA)

Secure Hash Functions Hash function must have following properties: Can be applied to any size data block Produce fixed length output Easy to compute Not feasible to reverse Not feasible to find two message that give the same hash

SHA-1 Secure Hash Algorithm 1 Input message less than 264 bits Processed in 512 bit blocks Output 160 bit digest

Public Key Encryption Based on mathematical algorithms Asymmetric Use two separate keys Ingredients Plain text Encryption algorithm Public and private key Cipher text Decryption algorithm

Figure 16.9 Public-Key Cryptography

Public Key Encryption - Operation One key made public Used for encryption Other kept private Used for decryption Infeasible to determine decryption key given encryption key and algorithm Either key can be used for encryption, the other for decryption

Digital Signature Sender encrypts message with their private key Receiver can decrypt using senders public key This authenticates sender, who is only person who has the matching key Does not give privacy of data Decrypt key is public

Signatures Handwritten signatures can verify that a document is Authentic The signature is mine and has not been altered Unforgettable Proves that I signed the document Non-repudiation I cannot deny that I signed the document

Digital Signatures Public key systems can also be used to provide message authentication: The sender’s secret key can be used to encrypt a message, thereby signing it This creates a digital signature of a message, which the recipient (or anyone else) can check by using the sender's public key to decrypt it. This proves that the sender was the true originator of the message, and that the message has not been subsequently altered by anyone else

Digital Properties The properties of digital documents are different from paper documents We need to be able to bind a signature to the entire sequence of bits that make up the document How do I prevent someone from revealing their private key and then claiming they never signed something?

Last Slide ? Thank you