Cryptography services Lecturer: Dr. Peter Soreanu Students: Raed Awad 200367043 Ahmad Abdalhalim 300289105 1.

Slides:



Advertisements
Similar presentations
Network Security7-1 Chapter 7 Network Security Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley,
Advertisements

Cryptography. 8: Network Security8-2 The language of cryptography symmetric key crypto: sender, receiver keys identical public-key crypto: encryption.
1 CS 854 – Hot Topics in Computer and Communications Security Fall 2006 Introduction to Cryptography and Security.
Network Security Hwajung Lee. What is Computer Networks? A collection of autonomous computers interconnected by a single technology –Interconnected via:
1 Counter-measures Threat Monitoring Cryptography as a security tool Encryption Digital Signature Key distribution.
YSLInformation Security -- Public-Key Cryptography1 Elliptic Curve Cryptography (ECC) For the same length of keys, faster than RSA For the same degree.
1 Counter-measures Threat Monitoring Cryptography as a security tool Encryption Authentication Digital Signature Key distribution.
8: Network Security Security. 8: Network Security8-2 Chapter 8 Network Security A note on the use of these ppt slides: We’re making these slides.
8-1 What is network security? Confidentiality: only sender, intended receiver should “understand” message contents m sender encrypts message m receiver.
CSE401n:Computer Networks
Network Security understand principles of network security:
Public Key Cryptography
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
8: Network Security8-1 Chapter 8 Network Security A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students,
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
Public Key Algorithms 4/17/2017 M. Chatterjee.
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.
Lecture 24 Cryptography CPE 401 / 601 Computer Network Systems slides are modified from Jim Kurose and Keith Ross and Dave Hollinger.
8-1 Chapter 8 Security Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
Public Key Model 8. Cryptography part 2.
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.
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
1-1 1DT066 Distributed Information System Chapter 8 Network Security.
Lecture 17 Network Security CPE 401/601 Computer Network Systems slides are modified from Jim Kurose & Keith Ross All material copyright J.F.
 This Class  Chapter 8. 2 What is network security?  Confidentiality  only sender, intended receiver should “understand” message contents.
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
22-1 Last time □ SMTP ( ) □ DNS This time □ P2P □ Security.
Network Security7-1 Chapter 8: Network Security Chapter goals: r understand principles of network security: m cryptography and its many uses beyond “confidentiality”
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Chapter 8, slide: 1 ECE/CS 372 – introduction to computer networks Lecture 18 Announcements: r Final exam will take place August 13 th,2012 r HW4 and Lab5.
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!!
8-1 Chapter 8 Security Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
1 Cryptography r Overview r Symmetric Key Cryptography r Public Key Cryptography r Message integrity and digital signatures References: Stallings Kurose.
8-1 Chapter 8 Security Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 part 1: Principles of cryptography.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
Chapter 8 Network Security Thanks and enjoy! JFK/KWR All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking:
30.1 Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Security and Cryptography: basic aspects Ortal Arazi College of Engineering Dept. of Electrical & Computer Engineering The University of Tennessee.
Introduction1-1 Data Communications and Computer Networks Chapter 6 CS 3830 Lecture 28 Omar Meqdadi Department of Computer Science and Software Engineering.
1 Network Security Basics. 2 Network Security Foundations: r what is security? r cryptography r authentication r message integrity r key distribution.
Lecture 2: Introduction to Cryptography
24-Nov-15Security Cryptography Cryptography is the science and art of transforming messages to make them secure and immune to attacks. It involves plaintext,
1 Symmetric key cryptography: DES DES: Data Encryption Standard US encryption standard [NIST 1993] 56-bit symmetric key, 64 bit plaintext input How secure.
Network Security7-1 Today r Reminders m Ch6 Homework due Wed Nov 12 m 2 nd exams have been corrected; contact me to see them r Start Chapter 7 (Security)
+ Security. + What is network security? confidentiality: only sender, intended receiver should “understand” message contents sender encrypts message receiver.
1 Cryptography Troy Latchman Byungchil Kim. 2 Fundamentals We know that the medium we use to transmit data is insecure, e.g. can be sniffed. We know that.
 Last Class  Chapter 7 on Data Presentation Formatting and Compression  This Class  Chapter 8.1. and 8.2.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
Chapter 8 Network Security Thanks and enjoy! JFK/KWR All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking:
8: Network Security8-1 Chapter 8 Network Security A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students,
Network security Cryptographic Principles
Chapter 8: Network Security
What is network security?
ECE/CS 372 – introduction to computer networks Lecture 16
Basic Network Encryption
Chapter 8: Network Security
Chapter 8: Network Security
Network Security Basics
PART VII Security.
1DT057 Distributed Information System Chapter 8 Network Security
Intro to Cryptography Some slides have been taken from:
Encryption INST 346, Section 0201 April 3, 2018.
Basic Network Encryption
Security: Principles & Symmetric Key Cryptography
Chapter 8: Network Security
Security: Public Key Cryptography
Chapter 8: Network Security
Presentation transcript:

Cryptography services Lecturer: Dr. Peter Soreanu Students: Raed Awad Ahmad Abdalhalim

Cryptography services Overview Symmetric Key Cryptography Public Key Cryptography 2

Cryptography issues Confidentiality (privacy) is a service ensuring that information is kept secret from all, but authorized parties. only sender, intended receiver should “understand” message contents sender encrypts message. receiver decrypts message. Authentication: sender, receiver want to confirm identity of each other. Message Integrity: sender, receiver want to ensure message not altered (in transit, or afterwards) without detection. Identification (entity authentication) is a service establishing the identity of an entity (e.g., a person, computer, credit card). Access control is a service restricting access to resources reserved for privileged entities. 3

Friends and enemies: Alice, Bob, Trudy Bob, Alice want to communicate “securely” Trudy (intruder) may intercept, delete, add messages 4 secure sender secure receiver channel data, control messages data Alice Bob Trudy

The language of cryptography m plaintext message K A (m) ciphertext, encrypted with key K A m = K B (K A (m)) 5 plaintext Ciphertext K A (m) K A encryption algorithm decryption algorithm Alice’s encryption key Bob’s decryption key K B

Simple encryption scheme substitution cipher: substituting one thing for another monoalphabetic cipher: substitute one letter for another 6 plaintext: abcdefghijklmnopqrstuvwxyz ciphertext: mnbvcxzasdfghjklpoiuytrewq Plaintext: bob. i love you. alice ciphertext: nkn. s gktc wky. mgsbc E.g.: Key: the mapping from the set of 26 letters to the set of 26 letters

Types of Cryptography Crypto often uses keys: Algorithm is known to everyone Only “keys” are secret Public key cryptography Involves the use of two keys Symmetric key cryptography Involves the use one key 7

Cryptography services Overview Symmetric Key Cryptography Public Key Cryptography 8

Symmetric key cryptography the keys used for encryption and decryption are the same for both communicating entities and hence they are called symmetric ciphers. It can be considered as a locked box, with the messages inside, that is sent to the other party. If the other party has the right key to the lock, then that party can open the box and read all the messages. The security of a symmetric cipher depends on the key (the algorithm is assumed to be public). 9

Symmetric key cryptography symmetric key crypto: Bob and Alice share same (symmetric) key: K 10 plaintext ciphertext K S encryption algorithm decryption algorithm K S plaintext message, m K (m) S m = K S (K S (m))

Two types of symmetric ciphers Stream ciphers encrypt one bit at time Block ciphers Break plaintext message in equal-size blocks Encrypt each block as a unit 11

Stream Ciphers Combine each bit of keystream with bit of plaintext to get bit of ciphertext m(i) = ith bit of message ks(i) = ith bit of keystream c(i) = ith bit of ciphertext c(i) = ks(i)  m(i) (  = XOR) - Encrypt m(i) = ks(i)  c(i) - Decrypt 12 keystream generator keystream pseudo random

Block ciphers Message to be encrypted is processed in blocks of k bits (e.g., 64-bit blocks). 1-to-1 mapping is used to map k-bit block of plaintext to k-bit block of ciphertext Example with k=3: 13 input output input output

Symmetric key crypto: DES DES: Data Encryption Standard US encryption standard [NIST 1993] 56-bit symmetric key, 64-bit plaintext input Block cipher with cipher block chaining How secure is DES? DES Challenge: 56-bit-key-encrypted phrase decrypted (brute force) in less than a day No known good analytic attack making DES more secure: 3DES: encrypt 3 times with 3 different keys (actually encrypt, decrypt, encrypt) 14

Symmetric key crypto: DES initial permutation 16 identical “rounds” of function application, each using different 48 bits of key final permutation 15 DES operation

AES: Advanced Encryption Standard new (Nov. 2001) symmetric-key NIST standard, replacing DES processes data in 128 bit blocks 128, 192, or 256 bit keys AES has been optimized for efficient software and hardware implementations. 16

Cryptography Overview Symmetric Key Cryptography Public Key Cryptography 17

Public Key Vs. Symmetric Key Cryptography 18 public key cryptography r radically different approach [Diffie- Hellman76, RSA78] r sender, receiver do not share secret key r public encryption key known to all r private decryption key known only to receiver

Public Key Cryptography 19 plaintext message, m ciphertext encryption algorithm decryption algorithm Bob’s public key plaintext message K (m) B + K B + Bob’s private key K B - m = K ( K (m) ) B + B - r Anyone who wants to send a message to another party, e.g., to Bob, can encrypt that message using Bob’s public key. However, only Bob can decrypt such messages using his private key.

Public key cryptography 20

Public key encryption algorithms need K ( ) and K ( ) such that 21 B B.. given public key K, it should be impossible to compute private key K B B Requirements: K (K (m)) = m B B

Prerequisite: modular arithmetic x mod n = remainder of x when divide by n Facts: [(a mod n) + (b mod n)] mod n = (a+b) mod n [(a mod n) - (b mod n)] mod n = (a-b) mod n [(a mod n) * (b mod n)] mod n = (a*b) mod n Thus (a mod n) d mod n = a d mod n Example: a=14, n=10, d=2: (a mod n) d mod n = 4 2 mod 10 = 6 a d = 14 2 = 196 a d mod 10 = 6 22

RSA: getting ready A message is a bit pattern. A bit pattern can be uniquely represented by an integer number. Thus encrypting a message is equivalent to encrypting a number. Example m= This message is uniquely represented by the decimal number 145. To encrypt m, we encrypt the corresponding number, which gives a new number (the cyphertext). 23

RSA: Creating public/private key pair Choose two large prime numbers p, q. (e.g., 1024 bits each) 2. Compute n = pq, z = (p-1)(q-1) 3. Choose e (with e<n) that has no common factors with z. (e, z are “relatively prime”). 4. Choose d such that ed-1 is exactly divisible by z. (in other words: ed mod z = 1 ). 5. Public key is (n,e). Private key is (n,d). K B + K B -

RSA: Encryption, decryption Given (n,e) and (n,d) as computed above 1. To encrypt message m (<n), compute c = m mod n e 2. To decrypt received bit pattern, c, compute m = c mod n d m = (m mod n) e mod n d Magic happens! c

RSA example: 26 Bob chooses p=5, q=7. Then n=35, z=24. e=5 (so e, z relatively prime). d=29 (so ed-1 exactly divisible by z). bit pattern m m e c = m mod n e 0000l c m = c mod n d c d encrypt: decrypt: Encrypting 8-bit messages.

RSA: another important property 27 The following property will be very useful later: K ( K (m) ) = m B B - + K ( K (m) ) B B + - = use public key first, followed by private key use private key first, followed by public key Result is the same!

Elliptic Curves All Elliptic Curves come in the following form: y2 = x3 + ax + b 28

Agree on the following (public): Curve parameters (a, b) The modulus p Base point G (on the curve) Pick a random integer n as private key Calculate public key P = n*G 29 Key Generation

Alice represents her text or data to send as a point Pm Alice sends Bob a pair of points: SentPair = {k*G, Pm + k*P} k = randomly chosen integer Bob decrypts the message using his private key: Pm + k*P - n(k*G) = Pm + k(n*G) - n(k*G) = Pm 30 Encryption/ decryption

Elliptic Curve Vs RSA Cryptography For the same length of keys, faster than RSA For the same degree of security, shorter keys are required than RSA Confidence level not yet as high as that in RSA Much more difficult to explain than RSA ECC is often the choice for VANET. 31