Network Security. Three tools Hash Function Block Cipher Public Key / Private Key.

Slides:



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

Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesThe Mighty Mod.
ONE WAY FUNCTIONS SECURITY PROTOCOLS CLASS PRESENTATION.
Lecture 5: Cryptographic Hashes
“Advanced Encryption Standard” & “Modes of Operation”
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Public Key Encryption Algorithm
Web Security for Network and System Administrators1 Chapter 4 Encryption.
 Stream ciphers o Encrypt chars/bits one at a time o Assume XOR w the key, need long key to be secure  Keystream generators (pseudo-random key) o Synchronous.
Security Chapters 14,15. The Security Environment Threats Security goals and threats.
CC3.12 Erdal KOSE Privacy & Digital Security Encryption.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
Chapter 5 Cryptography Protecting principals communication in systems.
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
Chapter 4  Hash Functions 1 Overview  Cryptographic hash functions are functions that: o Map an arbitrary-length (but finite) input to a fixed-size output.
Information Security and Management 11
Kemal AkkayaWireless & Network Security 1 Department of Computer Science Southern Illinois University Carbondale CS 591 – Wireless & Network Security Lecture.
ITIS 3200: Introduction to Information Security and Privacy Dr. Weichao Wang.
Modelling and Analysing of Security Protocol: Lecture 2 Cryptology for Protocols Analysis Tom Chothia CWI.
Csci5233 Computer Security & Integrity 1 Cryptography: Basics (2)
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Computer Networking Lecture 21: Security and Cryptography Thanks to various folks from , semester’s past and others.
Lecture 23 Symmetric Encryption
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
8: Network Security8-1 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key: K r e.g., key is knowing substitution.
Feb 19, 2002Mårten Trolin1 Previous lecture Practical things about the course. Example of cryptosystem — substitution cipher. Symmetric vs. asymmetric.
Chapter 13: Electronic Commerce and Information Security Invitation to Computer Science, C++ Version, Fourth Edition SP09: Contains security section (13.4)
Encryption Methods By: Michael A. Scott
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Chapter 12 Cryptography (slides edited by Erin Chambers)
Lecture 23 Cryptography CPE 401 / 601 Computer Network Systems Slides are modified from Jim Kurose & Keith Ross.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
A Cryptography Education Tool Anna Yu Department of Computer Science College of Engineering North Carolina A&T State University June 18, 2009.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Network Security (A Very Brief Introduction)
Message Authentication  message authentication is concerned with: protecting the integrity of a message protecting the integrity of a message validating.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:
Chapter 20 Symmetric Encryption and Message Confidentiality.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
Day 37 8: Network Security8-1. 8: Network Security8-2 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key:
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
Cryptography Chapter 7 Part 2 Pages 781 to 812. Symmetric Cryptography Secret Key Figure 7-10 on page 782 Key distribution problem – Secure courier Many.
Wireless LAN Security. Security Basics Three basic tools – Hash function. SHA-1, SHA-2, MD5… – Block Cipher. AES, RC4,… – Public key / Private key. RSA.
11.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Message Integrity and Message Authentication.
Modes of Usage Dan Fleck CS 469: Security Engineering These slides are modified with permission from Bill Young (Univ of Texas) 11 Coming up: Modes of.
1 Network Security Lecture 5 Hashes and Message Digests Waleed Ejaz
Network Security – Special Topic on Skype Security.
Lecture 2: Introduction to Cryptography
Chapter 11 Message Authentication and Hash Functions.
Lecture 23 Symmetric Encryption
CS426Fall 2010/Lecture 51 Computer Security CS 426 Lecture 5 Cryptography: Cryptographic Hash Function.
Cipher Transmission and Storage Modes Part 2: Stream Cipher Modes CSCI 5857: Encoding and Encryption.
RSA Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Cryptographic Security Aveek Chakraborty CS5204 – Operating Systems1.
Cryptography services Lecturer: Dr. Peter Soreanu Students: Raed Awad Ahmad Abdalhalim
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.
Opracowanie językowe dr inż. J. Jarnicki
Network Security.
PART VII Security.
ADVANCED ENCRYPTION STANDARDADVANCED ENCRYPTION STANDARD
Network Security.
Presentation transcript:

Network Security

Three tools Hash Function Block Cipher Public Key / Private Key

Hash Functions We used SHA-1 in our project. SHA-1 takes no more than 2^64 bits as input and returns a 160-bit output. SHA stands for Secure Hash Function. Other hash functions include MD5 which returns 128 bits, and the SHA-2 functions.

What are needed from these functions? Collision resistance. – Informally, you cannot find two strings with the same hash. One-way. – Informally, given the hash, you cannot reconstruct the original string.

Security Here, “cannot “ means computationally infeasible. There is no absolute security. If you have all the resources in the world, nothing is secure from you.

Birthday Attack If there are x people in the room, what is the probability that there are at least two people having the same birthday?

Birthday Attack The probability that no same birthday is (365/365)(364/365)(363/365)…((365-x+1)/365) From wiki:

Birthday Attack Consider one strategy to break the SHA-1: Try random strings until a collision is found. How many strings you think you need until a collision is found? Roughly, if you try of 2 80 times, the probability of getting a collision is >0.5. In 2005, Xiaoyun Wang found a flaw in SHA-1 such that it is possible to find a collision in 2 69 calculations.

Block Cipher The basic need – given a message in plain text, encrypt it, such that no one can know the content of the message. But the receiver should be able to decrypt it to produce the original message. Like simple substitution.

Block Cipher AES is a Block Cipher, means that it maps a fixed-length (128 bits) input to a fixed-length (128 bits) output. Given the same input bits, the Block Cipher always returns the same output bits. So, it is a mapping from the input to the output. The decryption algorithm is just the reverse mapping.

The Key The AES algorithm is known to the world. So if you can use AES to encrypt your data, anyone will be able to use the AES to decrypt your data and you achieved nothing. So, you must make your encryption unique, even if you are using a well-known algorithm. How? By having a key. The encryption result for one key is unique to other keys.

How AES works AES takes 128-bit input and turn it into 128-bit output with the help of a 128 bit key (or 192, or 256). (Skype uses 256 bit key) 1.The key is expanded into 11 sub-keys ( K0, K1, …, K10. ) 2.s = M xor K0. 3.Then the following is executed 10 rounds. 1.s = SBOX(s). 2.s = shift_row(s). 3.s = mix_col(s) [if not the last round] 4.s = s xor Ki. 4.Return s.

The S BOX simply maps the input to an output according to a predetermined mapping. The shift_row() does the following. Regard the 16-byte s as a 4 by 4 matrix. s0 s4 s8 s12 s1 s5 s9 s13 s2 s6 s10 s14 s3 s7 s11 s15 s0 s1 s2 s3 s5 s9 s13 s1 S10 s14 s2 s6 s15 s3 s7 s11 The mix_col() does the following. ai is 4 bytes a0 a1 a2 a3 = a0 a1 a2 a3 How AES works

AES AES can also be used for other purposes. For example, you can pick a random key, then use AES to generate random numbers.

Cipher Modes ECB –Electronic Code Book Mode. Break the entire file into blocks, and encode every block individually. Problems. The example in the book. You can replace a block if it is good for you. – If you know the message is followed by, you can replace your salary with someone else’s salary if you know that he/she makes more than you do, without knowing exactly the content!

CBC – Cipher Block Chaining Encryption: – C0 = E(P0 xor IV). – C1 = E(P1 xor C0), and so on. – IV is transmitted in plain text. Decryption: – P0 = IV xor D(C0) – P1 = C0 xor D(C1), and so on. So, same message won’t result in the same code.

Stream Cipher Mode T0 = E(IV). T1 = E(T0), and so on. C = P xor T. Don’t use the same stream twice.

Counter mode Ti = E(IV+i). Ci = Pi xor Ti. The advantage is that you can randomly access any block. Used by Skype. Often called ICM (Integer counter mode). ECB also supports random access. Does it have the same problem as ECB? No, because the IVs are different.

Public Key / Private Key Consider Skype, how do you think that two Skype users can share the same AES key?

Public Key / Private Key Everyone has a public key and private key. With B’s public key ( pkB ) A can encode data that only B can decode with his private key ( skB ) because other people does not have B’s private key. D_skB[E_pkB(W)] = W E_pkB[D_skB(W)] = W

Public Key /Private key So, A can choose a 128-bit string W as the session key and send E_pkB(W) to B. B runs the decryption algorithm to get D_skB[E_pkB(W)] = W. Skype actually asks two ends to both contribute 128 bits to make the 256-bit session key.

The RSA algorithm Most common, the RSA algorithm is used to get the public key/private key. 1.Choose two large primes, p and q. 2.Compute n=pq and z=(p-1)(q-1). 3.Choose a large number relatively prime to z and call it d. 4.Find e such that ed = 1 mod z. (such e must exist) (e,n) is the public key for encoding and (d,n) is the private key for decoding.

The RSA algorithm To encrypt a message: C=M e mod n. To decrypt: M = C d mod n. The rules are satisfied – D_skB[E_pkB(M)] = M – E_pkB[D_skB(M)] = M.

An example Let p=3, q=11, – n=33, z=20. – Choose d=7, because 7 and 20 have no common factors – For e, it must satisfy 7e = 1 mod 20, which gives us e=3. – So the public key is (3,33) and the private key is (7,33). If M=19, – C=19 3 mod 33 = 6859 mod 33 = 28 – 28 7 mod 33 = mod 33 = 19

Why is RSA secure? The problem is, given (d,n), can you figure out e ? You can try to find p and q given n. If you indeed can, then you get z. Given z and d, you get e. But it is difficult to factor large numbers.

ssh-keygen Try type `` ssh-keygen –t rsa ’’ The secret key will be saved as ``.ssh\ id_rsa’’ and the public key will be saved as ``.ssh\ id_rsa.pub’’