Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "By: Nasoor Bagheri (na_bagheri@yahoo.com) In the name of god Network Security By: Nasoor Bagheri (na_bagheri@yahoo.com)"— Presentation transcript:

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

2 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

3 Security Requirements
Confidentiality Integrity Availability Authenticity

4 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.

5 Evolution of System Security
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 , 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

6 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

7 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?

8 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

9 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

10 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.

11 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.

12 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

13 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

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

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

16 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

17 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.

18 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.

19 Figure 16.1 Simplified Model of Symmetric Encryption

20 Ingredients Plain text Encryption algorithm Secret key Cipher text
Decryption algorithm

21 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

22 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

23 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

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

25 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.

26 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

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

28 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.

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

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

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

32 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

33 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

34 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)

35 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

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

37 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

38 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

39 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

40 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

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

42 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

43 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

44 Figure : Message Authentication Using a Message Authentication Code

45 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)

46 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

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

48 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

49 Figure 16.9 Public-Key Cryptography

50 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

51 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

52 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

53 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

54 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?

55 Last Slide ? Thank you


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

Similar presentations


Ads by Google