Copyright © - 2004-2014 – Curt Hill Cryptography Number Theory’s Practical Application.

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.
RSA cryptosystem 1 q The most important public-key cryptosystem is the RSA cryptosystem on which one can also illustrate a variety of important ideas of.
Cryptology  Terminology  plaintext - text that is not encrypted.  ciphertext - the output of the encryption process.  key - the information required.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (4) Information Security.
CSE331: Introduction to Networks and Security Lecture 19 Fall 2002.
Section 3.8: More Modular Arithmetic and Public-Key Cryptography
1 Counter-measures Threat Monitoring Cryptography as a security tool Encryption Digital Signature Key distribution.
Modern Cryptography.
 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.
Creating Secret Messages. 2 Why do we need to keep things secret? Historically, secret messages were used in wars and battles For example, the Enigma.
Cryptography 101 How is data actually secured. RSA Public Key Encryption RSA – names after the inventors –Rivest, Shamir, and Adleman Basic Idea: Your.
Public-key Cryptography Montclair State University CMPT 109 J.W. Benham Spring, 1998.
CC3.12 Erdal KOSE Privacy & Digital Security Encryption.
Chapter 5 Cryptography Protecting principals communication in systems.
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
Cryptography (continued). Enabling Alice and Bob to Communicate Securely m m m Alice Eve Bob m.
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
RSA Encryption William Lu. RSA Background  Basic technique first discovered in 1973 by Clifford Cocks of CESG (part of British GCHQ)  Invented in 1977.
Public Key Algorithms 4/17/2017 M. Chatterjee.
What is Cryptography? Definition: The science or study of the techniques of secret writing, esp. code and cipher systems, methods, and the like Google.
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.
Encryption. Introduction Computer security is the prevention of or protection against –access to information by unauthorized recipients –intentional but.
Introduction to Public Key Cryptography
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
1 Introduction to Codes, Ciphers, and Cryptography Michael A. Karls Ball State University.
1 Fluency with Information Technology Lawrence Snyder Chapter 17 Privacy & Digital Security Encryption.
Chapter 12 Cryptography (slides edited by Erin Chambers)
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Network Security (A Very Brief Introduction)
MATH 224 – Discrete Mathematics
RSA and its Mathematics Behind
CS110: Computers and the Internet Encryption and Certificates.
T TT The Cryptography Istituto Tecnico Industriale “E.Divini” San Severino Marche.
Cryptography: RSA & DES Marcia Noel Ken Roe Jaime Buccheri.
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
Encryption Coursepak little bit in chap 10 of reed.
Network Security Lecture 14 Presented by: Dr. Munam Ali Shah.
Cryptography Dec 29. This Lecture In this last lecture for number theory, we will see probably the most important application of number theory in computer.
Cryptography, Authentication and Digital Signatures
Based on Applied Cryptography by Schneier Chapter 1: Foundations Dulal C. Kar.
Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:
Midterm Review Cryptography & Network Security
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
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.
Day 37 8: Network Security8-1. 8: Network Security8-2 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key:
Introduction to cryptography by konrad. Introduction to cryptography Cryptography is the process of encrypting/decrypting data streams using some E(M)/D(M)
Section 4.4: The RSA Cryptosystem Practice HW Handwritten and Maple Exercises p at end of class notes.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
1 Public-Key Cryptography and Message Authentication.
Encryption.
RSA and its Mathematics Behind July Topics  Modular Arithmetic  Greatest Common Divisor  Euler’s Identity  RSA algorithm  Security in RSA.
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,
Lecture 23 Symmetric Encryption
COMP 424 Lecture 04 Advanced Encryption Techniques (DES, AES, RSA)
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
Encryption CS110: Computer Science and the Internet.
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.
RSA Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Encryption Encryption: Transforms Message so that Interceptor Cannot Read it –Plaintext (original message) Not necessarily text; Can be graphics, etc.
Encryption. Encryption Basics • Plaintext - the original message ABCDEFG • Ciphertext - the coded message DFDFSDFSD • Cipher - algorithm for.
Foundation of Security
Modern Cryptography.
Presentation transcript:

Copyright © – Curt Hill Cryptography Number Theory’s Practical Application

Introduction Encryption is mechanism for obscuring a message from someone else in a reversible way –Decryption is reversing it Cryptography is the study Historically used to send messages during wars –Non-standard hieroglyphics date back to at least 1900 BC Most of the historic ciphers are relatively easy to break Copyright © – Curt Hill

Terminology Plain text –A message that is readable –AKA Clear text Cipher text –A message that has been disguised Key –A string that allows the encryption and decryption Copyright © – Curt Hill

What we want Encryption technique E(M,K) which takes a message M and a key K Decryption technique D(M,K) which also takes message M and key K Both E and D return a string M = D(E(M,K),K) Neither E nor D needs to be concealed Only secret thing is K the key E and D are efficiently computable Copyright © – Curt Hill

Historical Ciphers Any technique that gives one side of a war an advantage over the other is of interest However most of these are not of interest to us in discrete math: Transposition and Substitution Cipher Enigma and Colosus One time pad Stream Cipher Block Cipher Feistel Cipher DES, AES Copyright © – Curt Hill

Transposition Cipher AKA Caesar cipher Number the letters Add a value, divide by 26 and keep remainder Key is the value Decryption subtracts the value There are very few keys so easy to crack rot13 is a variant Copyright © – Curt Hill

Transposition Example Plain ASCII BAT ASCII Numeric Transpose555 Cipher numeric Cipher as ASCII GFY Copyright © – Curt Hill

Substitution Cipher Generalization of transposition cipher Each letter is substituted by another letter or character For 26 characters there are 26! keys Usually succumbs to letter frequency attacks Copyright © – Curt Hill

Substitution Example Plain ASCIIBAT See table Cipher as ASCII UGM Copyright © – Curt Hill AG BU CA … TM …

Enigma Code machine used by Germans in World War II Several rotors A letter is typed in the rotors provide a single substitution cipher for that letter The rotors are now advanced The next letter gets a different transposition The key becomes the rotor settings The Colossus was used to break Copyright © – Curt Hill

Enigma Again Would have been secure if used properly Instead they often used same key for too long Predictable openings were often used: –Common greetings: Mein Fueherer! –This gives away the key to analysis Users thought it was magic so did not worry enough Copyright © – Curt Hill

One time pad The one time pad is a string of offsets to add to each letter of message Two copies of the pad: the sender and receiver Pad is never reused Algorithmically unbreakable if there is no pattern in the pad Transfer of the pad may be a problem Copyright © – Curt Hill

OTP Example Plain ASCII BAT ASCII Numeric One time pad Cipher numeric Cipher as ASCII NJk Copyright © – Curt Hill

Stream cipher An almost One Time Pad Start with a key Generate a pseudorandom sequence derived from the key To decrypt they have to know the key and the function that generates the pseudorandom sequence Copyright © – Curt Hill

Block Ciphers The plain text is subdivided into to N bit blocks Each block is then transformed The mode of operation determines how the Nth block encryption is different than the previous Example: –128 bit key and block –Operation is XOR (easily reversible) –Result of N is key of N+1 Copyright © – Curt Hill

Feistel Cipher Named after Horst Feistel at IBM It is a block cipher with a symmetric structure The encryption and decryption are very similar or identical The block is split in half and multiple rounds of transformation occur Copyright © – Curt Hill

Feistel Transformations The typical transformations are quite simple and reversible XORs Bit shuffling –Bit 1 becomes bit 3, bit 2 becomes bit 5 etc. Simple non-linear functions Copyright © – Curt Hill

Process Partition the key into N+1 pieces F is a round function takes one of the keys The text is split into two equal pieces –L 0, R 0 For i=0 to N –L i+1 = R i –R i+1 = L i  F(R i, K i ) Decryption is the reverse For i=n downto 0 –R i = L i+1 –L i = R i+1  F(L i+1, K i ) Copyright © – Curt Hill

Data Encryption Standard A form of Feistel Cipher Key size is 56 bits Use 16 rounds This is breakable but difficult to do so In the 1990s Field Programmable gate arrays could be constructed for about $50, bit DES takes about 1 second 56 bit about 20 hour Copyright © – Curt Hill

AES Advanced Encryption System 128 bit block Key sizes 128, 192 or 256 bits 10, 12 or 14 rounds Not a Feistel anymore Copyright © – Curt Hill

Other related schemes Blowfish – 448 bit key CAST-128 –PGP 5 with 128 bit key IDEA –Patented and became PGP Copyright © – Curt Hill

Distribution The problem with most ciphers is called the key distribution problem How is the key given to the receiver by the sender? Since everything else is known this becomes a weak link Public Key Encryption does not suffer from this problem Copyright © – Curt Hill

Public key encryption AKA Trapdoor algorithms Each user has a public and private key These are usually very large numbers, based on primes The key is that multiplying/dividing very large numbers is easy Factoring a very large number into its primes is very difficult –Conceivably taking years Copyright © – Curt Hill

Authors This algorithm was devised by Ron Rivest, Adi Shamir and Leonard Adleman RSA became the name of the algorithm MIT patented Published in 1977 Proofs of its effectiveness abound They received Turing award Copyright © – Curt Hill

Key Generation Find two large primes, P and Q –Approximately equal in size Compute the product N = PQ –N should be 1024 bits or larger –Known as the modulus Compute  = (P-1)(Q-1) –  is spelled phi and pronounced fee Copyright © – Curt Hill

Two more Choose E such that 1 < E <  –E and  must be relatively prime –Neither needs to be prime but relatively prime to each other –This is the public exponent or encryption exponent Find D –1 < D <  –ED mod  = 1 –This is the secret exponent or decryption exponent Copyright © – Curt Hill

How it works The public key is a pair (E,N) and the private key is also a pair (D,N) Everyone participating in concealed messages publishes their public key where anyone can access The private key as well as P, Q and N are also kept secret Copyright © – Curt Hill

Sending a message Albert wants to send Bob a secret message Obtains Bobs public key (E,N) Convert the clear text into numeric chunks of the suitable length, call one of these M Compute cipher text: C = M E mod N Repeat for subsequent chunks and send Copyright © – Curt Hill

Reading sent message Bob now wants to read Albert’s message Use his own private key to restore the plain text –M = C D mod N Copyright © – Curt Hill

Another Thought Anyone may send a message to anyone else How do we determine if someone has falsified a message? The digital signing process is not that much different than the encryption and decryption Copyright © – Curt Hill

Digital Signing Albert extracts pieces of the message to make a digest Albert uses his private key to compute S = M D mod N Bob uses Albert’s public key to compute V = S E mod N Bob uses the same extraction method and compares this with the sent signature Copyright © – Curt Hill

Some practicalities Common choices for E are 3, 17 and which are Fermat primes –This makes the modular exponentiation quick Computing D often uses the Extended Euclidean Algorithm Copyright © – Curt Hill

Is it breakable? The usual thought is that factoring very large numbers is extremely difficult The current unclassified belief is that factoring these size numbers would take centuries or longer –Of course, rumors abound The open question is if there is a technique that can crack this that does not require factorization Copyright © – Curt Hill

Steganography Concealing something in something else Common practice is to conceal a message in something else The advantage over cryptography is that the item passed is not otherwise suspicious Not very helpful for database security Mainly used by spies and terrorists Copyright © – Curt Hill

Techniques Invisible ink Message under the postage stamp Text where every Nth letter makes up the message Modification of a few pixels in a large image Using the least significant bits of sound recordings Hidden frames in video Copyright © – Curt Hill

Summary Encryption maintains the data but make it unusable to those without the key Use decryption to return to plain text Used for transmitting sensitive data and for stored data on disk With this background we may now consider database security Copyright © – Curt Hill