Unit 2 Modular Arithmetic and Cryptography IT Disicipline ITD1111 Discrete Mathematics & Statistics STDTLP 1 Unit 2 Modular Arithmetic and Cryptography.

Slides:



Advertisements
Similar presentations
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesThe Mighty Mod.
Advertisements

Mod arithmetic.
Using Cryptography to Secure Information. Overview Introduction to Cryptography Using Symmetric Encryption Using Hash Functions Using Public Key Encryption.
Data Security 1 El_Gamal Cryptography. Data Security2 Introduction El_Gamal is a public-key cryptosystem technique El_Gamal is a public-key cryptosystem.
The Integers and Division. Outline Division: Factors, multiples Exercise 2.3 Primes: The Fundamental Theorem of Arithmetic. The Division Algorithm Greatest.
CSE115/ENGR160 Discrete Mathematics 03/15/12
22C:19 Discrete Structures Integers and Modular Arithmetic
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
CompSci 102 Discrete Math for Computer Science
1.  The set N = {1,2,3,4,……..} is known as natural numbers or the set of positive integers  The natural numbers are used mainly for :  counting  ordering.
CSE115/ENGR160 Discrete Mathematics 03/15/11
ITIS 3200: Introduction to Information Security and Privacy Dr. Weichao Wang.
CSE 321 Discrete Structures Winter 2008 Lecture 8 Number Theory: Modular Arithmetic.
CPSC CPSC 3730 Cryptography Chapter 2 Classical Encryption Techniques.
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.
Number Theory and Cryptography
Codes, Ciphers, and Cryptography-RSA Encryption
1 Introduction to Codes, Ciphers, and Cryptography Michael A. Karls Ball State University.
Elgamal Public Key Encryption CSCI 5857: Encoding and Encryption.
The Fundamentals: Algorithms, Integers, and Matrices CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Number Theory and Cryptography
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 3 (Part 2): The Fundamentals: Algorithms, the.
CSE 504 Discrete Mathematics & Foundations of Computer Science
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
Section 2.2: Affine Ciphers; More Modular Arithmetic Practice HW (not to hand in) From Barr Textbook p. 80 # 2a, 3e, 3f, 4, 5a, 7, 8 9, 10 (Use affinecipherbreaker.
MATH 224 – Discrete Mathematics
MAT 1000 Mathematics in Today's World Winter 2015.
Discrete Mathematics CS 2610 March 17, Number Theory Elementary number theory, concerned with numbers, usually integers and their properties or.
Section 2.1: Shift Ciphers and Modular Arithmetic The purpose of this section is to learn about modular arithmetic, which is one of the fundamental mathematical.
Systems of Equations as Matrices and Hill Cipher.
Section 2.1: Shift Ciphers and Modular Arithmetic Practice HW from Barr Textbook (not to hand in) p.66 # 1, 2, 3-6, 9-12, 13, 15.
Midterm Review Cryptography & Network Security
1 Chapter 2-1 Conventional Encryption Message Confidentiality.
Chapter The Integers and Division Division
Cryptography Lecture 2: Classic Ciphers Piotr Faliszewski.
CRYPTOGRAPHY AND THE MATH MAJOR Dr. Mihai Caragiu Mathematics Department Ohio Northern University.
Introduction to Ciphers Breno de Medeiros. Cipher types From “Cipher”, Wikipedia article.
Some Number Theory Modulo Operation: Question: What is 12 mod 9?
CSCI 391: Practical Cryptology Substitution Monoalphabetic Ciphers.
Section 2.2: Affine Ciphers; More Modular Arithmetic Shift ciphers use an additive key. To increase security, we can add a multiplicative parameter. –For.
Number Theory 이재원 School of Information Technology Sungshin W. University.
Chapter 2 (Part 1): The Fundamentals: Algorithms, the Integers & Matrices The Integers and Division (Section 2.4)
22C:19 Discrete Structures Integers and Modular Arithmetic Fall 2014 Sukumar Ghosh.
MAT 1000 Mathematics in Today's World Winter 2015.
Module #9 – Number Theory 1/5/ Algorithms, The Integers and Matrices.
Foundations of Computing I CSE 311 Fall Review: Division Theorem Let a be an integer and d a positive integer. Then there are unique integers q.
The man who knew 28% of mathematics. John Von Neumann ( ) Hans Bethe: Academic seminars (10.
Introduction to Cryptology Fall Definitions Digital encryption techniques are used to protect data in two ways: to maintain privacy and to prove.
Introduction to Elliptic Curves CSCI 5857: Encoding and Encryption.
Chapter 13 Mathematic Structures 13.1 Modular Arithmetic Definition 1 (modulo). Let a be an integer and m be a positive integer. We denoted by a mod m.
Discrete Mathematics
CSE 311: Foundations of Computing Fall 2013 Lecture 11: Modular arithmetic and applications.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
Elgamal Public Key Encryption CSCI 5857: Encoding and Encryption.
Introduction to Cryptography Lecture 4. Caesar Cipher Gaius Julius Caesar (100 B.C.- 44 B.C.) General Politician Dictator of Rome Creator of Caesar Cipher.
Substitution Ciphers Reference –Matt Bishop, Computer Security, Addison Wesley, 2003.
The Fundamentals: Algorithms, Integers, and Matrices CSC-2259 Discrete Structures Konstantin Busch - LSU1.
CSE 311 Foundations of Computing I Lecture 12 Modular Arithmetic and Applications Autumn 2012 CSE
CSE 311 Foundations of Computing I Lecture 11 Modular Exponentiation and Primes Autumn 2011 CSE 3111.
Chapter 3 The Fundamentals: Algorithms, the integers, and matrices Section 3.4: The integers and division Number theory: the part of mathematics involving.
Modular Arithmetic with Applications to Cryptography
CS 210 Discrete Mathematics The Integers and Division (Section 3.4)
CSE15 Discrete Mathematics 03/20/17
CS 2210:0001Discrete Structures Modular Arithmetic and Cryptography
Chapter 3:Cryptography (16M)
Fun with Cryptography The Science of Secrecy.
CSE 321 Discrete Structures
Presentation transcript:

Unit 2 Modular Arithmetic and Cryptography IT Disicipline ITD1111 Discrete Mathematics & Statistics STDTLP 1 Unit 2 Modular Arithmetic and Cryptography

Unit 02 Modular Arithmetic and Cryptography IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP2 2. Modular Arithmetic and Cryptography 2.1 Introduction In some situations we care only about the remainder of an integer when it is divided by some specified integer.

Unit 02 Modular Arithmetic and Cryptography IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP3 2.2Definition Let a be an integer and m be a positive integer. We use a mod m to denote the remainder when a is divided by m. It follows from the definition of remainder that a mod m is the integer r such that a = q m + rand0  r < m Note that r is non-negative.

Unit 02 Modular Arithmetic and Cryptography IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP4 Example mod 5 = 2 because 32 = 6  mod 150 = 47 because 1997= 13  mod 8 = 5( 5 = 0  8 + 5)  64 mod 6 = 2(  64 = (  11 )  6 + 2) However, it won’t work by writing  64 = (  10)  6 + (  4) because r (=  4) is not a non-negative number.

Unit 02 Modular Arithmetic and Cryptography IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP5 2.3 Applications of modular integer arithmetic in computer science Using a hashing function to assign memory locations to computer files. One of the most common hashing functions is h(k) = k mod m where k is the key (reference) of a file and m is the number of available memory locations.

Unit 02 Modular Arithmetic and Cryptography IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP6 Example Assign a memory location to each of the following student numbers when m=1024. Solve the following problem, allowing for collision. Name Student number Memory Location Peter Michael John h( ) = mod 1024 = 647 h( ) = mod 1024 = 787 h( ) = mod 1024 = 787

Unit 02 Modular Arithmetic and Cryptography IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP Pseudorandom number generator -generates random numbers for needs such as computer simulations or random sampling in statistics -the most commonly used procedure for generating pseudorandom numbers is the linear congruential method. i.e.

Unit 02 Modular Arithmetic and Cryptography IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP8 Example The sequence of pseudorandom numbers generated by choosing m=9, a=7, c=4 and x 0 =3 can be found as follows: 7x 0 +4=(7)(3)+4=25  x 1 = 25mod 9=7 7x 1 +4=(7)(7)+4=53  x 2 = 53mod 9=8 7x 2 +4=(7)(8)+4=60  x 3 = 60mod 9=6  : 7x 8 +4=(7)(5)+4= 39  x 9 = 39 mod 9=3 7x 9 +4=(7)(3)+4= 25  x 10 =25 mod 9=7

Unit 02 Modular Arithmetic and Cryptography IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP9 2.4Cryptology -the study of secret messages

Unit 02 Modular Arithmetic and Cryptography IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP10 Generalised Caesar’s cipher process: 1.Choose a value of k where k is the number of letters to be shifted forward in the alphabet. 2.Replace each letter of the message by an integer p where 0  p  25 based on its position in the alphabet. 3.Replace each number p by the following shift cipher function f (p) = (p + k) mod 26 4.Translate the new number f (p) back to letter based on its position in the alphabet.

Unit 02 Modular Arithmetic and Cryptography IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP11 Example Find the secret message to represent the message “MEET YOU IN THE PARK” using Caesar cipher with k = 3. Step 1:k=3 Step 2: Step 3: Step 4:PHHW - BRX - LQ - WKH - SDUN

Unit 02 Modular Arithmetic and Cryptography IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP12 To recover the original message from a secret message encrypted by the Caesar cipher, the inverse function is used. The process of determining the original message from the encrypted message is called decryption.

Unit 02 Modular Arithmetic and Cryptography IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP13 Example Find the original message of “FXAT QJAM” using Caesar cipher with k = 9. Step 1:k = 9 Step 2: Step 3:22, 14, 17, 107, 0, 17, 3 Step 4:WORKHARD