Introduction to Cryptography

Slides:



Advertisements
Similar presentations
Mod arithmetic.
Advertisements

1 Lect. 12: Number Theory. Contents Prime and Relative Prime Numbers Modular Arithmetic Fermat’s and Euler’s Theorem Extended Euclid’s Algorithm.
Cryptography and Network Security
The Integers and Division. Outline Division: Factors, multiples Exercise 2.3 Primes: The Fundamental Theorem of Arithmetic. The Division Algorithm Greatest.
Thinking Mathematically
5.1 Number Theory. The study of numbers and their properties. The numbers we use to count are called the Natural Numbers or Counting Numbers.
Thinking Mathematically
1 Section 2.4 The Integers and Division. 2 Number Theory Branch of mathematics that includes (among other things): –divisibility –greatest common divisor.
CSE 311 Foundations of Computing I Lecture 13 Number Theory Autumn 2012 CSE
February 19, 2015Applied Discrete Mathematics Week 4: Number Theory 1 The Growth of Functions Question: If f(x) is O(x 2 ), is it also O(x 3 )? Yes. x.
Quotient-Remainder Theory, Div and Mod
Chapter II. THE INTEGERS
6/20/2015 5:05 AMNumerical Algorithms1 x x1x
Chapter 4 – Finite Fields Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic Curve, IDEA, Public.
CSE 321 Discrete Structures Winter 2008 Lecture 8 Number Theory: Modular Arithmetic.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
CSE 311 Foundations of Computing I Lecture 12 Primes, GCD, Modular Inverse Spring
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
BY MISS FARAH ADIBAH ADNAN IMK
The Integers and Division
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Chapter 2 The Fundamentals: Algorithms, the Integers, and Matrices
1 Properties of Integers Objectives At the end of this unit, students should be able to: State the division algorithm Apply the division algorithm Find.
Introduction to Modular Arithmetic and Public Key Cryptography.
Mathematics of Cryptography Part I: Modular Arithmetic
Module :MA3036NI Cryptography and Number Theory Lecture Week 7
FINITE FIELDS 7/30 陳柏誠.
Numbers, Operations, and Quantitative Reasoning.
Implementing RSA Encryption in Java
Cyclic Groups (9/25) Definition. A group G is called cyclic if there exists an element a in G such that G =  a . That is, every element of G can be written.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFunctions.
RSA Prepared by: SITI ZAINAH ADNAN
Polynomial Division and the Remainder Theorem Section 9.4.
Data Security and Encryption (CSE348) 1. Lecture # 12 2.
Copyright © Zeph Grunschlag, Basic Number Theory Zeph Grunschlag.
Rational Numbers and Fields
Section 2.2: Affine Ciphers; More Modular Arithmetic Shift ciphers use an additive key. To increase security, we can add a multiplicative parameter. –For.
Information Security Lab. Dept. of Computer Engineering 87/121 PART I Symmetric Ciphers CHAPTER 4 Finite Fields 4.1 Groups, Rings, and Fields 4.2 Modular.
Elements of Coding and Encryption 1. Encryption In the modern word, it is crucial that the information is transmitted safely. For example, Internet purchases,
Lecture 6.1: Misc. Topics: Number Theory CS 250, Discrete Structures, Fall 2011 Nitesh Saxena.
1 Section Congruences In short, a congruence relation is an equivalence relation on the carrier of an algebra such that the operations of the algebra.
CS Modular Division and RSA1 RSA Public Key Encryption To do RSA we need fast Modular Exponentiation and Primality generation which we have shown.
Module #9 – Number Theory 1/5/ Algorithms, The Integers and Matrices.
Introduction to Cryptography Lecture 9. Public – Key Cryptosystems Each participant has a public key and a private key. It should be infeasible to determine.
Factor A factor of an integer is any integer that divides the given integer with no remainder.
The Euclidean Algorithm That’s right, it’s real..
Ref: Pfleeger96, Ch.31 Properties of Arithmetic Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, 1996.
Lecture 3.1: Public Key Cryptography I CS 436/636/736 Spring 2012 Nitesh Saxena.
Lecture 3.1: Public Key Cryptography I CS 436/636/736 Spring 2015 Nitesh Saxena.
Discrete Mathematics
Slide Copyright © 2009 Pearson Education, Inc. 5.1 Number Theory.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 2 The Fundamentals: Algorithms,
Chapter 4 With Question/Answer Animations 1. Chapter Summary Divisibility and Modular Arithmetic - Sec 4.1 – Lecture 16 Integer Representations and Algorithms.
Ch04-Number Theory and Cryptography 1. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic.
CS480 Cryptography and Information Security
Chapter 4 With Question/Answer Animations 1. Chapter Motivation Number theory is the part of mathematics devoted to the study of the integers and their.
Number Theory Lecture 1 Text book: Discrete Mathematics and its Applications, 7 th Edition.
Chapter 3 The Fundamentals: Algorithms, the integers, and matrices Section 3.4: The integers and division Number theory: the part of mathematics involving.
Agenda Review:  Relation Properties Lecture Content:  Divisor and Prime Number  Binary, Octal, Hexadecimal Review & Exercise.
Number Theory. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic principles of divisibility,
Introduction to Cryptography
Integers and Division Section 3.4.
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Applied Discrete Mathematics Week 3: Algorithms
Applied Discrete Mathematics Week 4: Number Theory
Introduction to Cryptography
Lecture 3.1: Public Key Cryptography I
Copyright © Zeph Grunschlag,
Applied Discrete Mathematics Week 10: Introduction to Counting
Number Theory.
Presentation transcript:

Introduction to Cryptography Lecture 2

Functions f(x1) x3 x2 x1 f(x3) f(x2) f Domain Range

Functions Definition: A function is a relation, such that each element of a set (the domain) is associated with a unique element of another (possibly the same) set (the range) f(x1) x3 x2 x1 f(x2) f Domain Range f(x1) x2 x1 f(x2) f Domain Range Function Not a function

Functions Definition: A function is called one to one if each element of domain is associated with precisely one element of the range. Definition: A function is called onto if each element of range is associated with at least one element of the domain.

Functions f f f(x1) x3 x2 x1 f(x2) Domain Range x1 f(x1) x2 f(x1) y Domain Range One to one Not one to one Onto Not onto

Functions A one to one and onto function always has an inverse function Definition: Given a function an inverse function is computed by rule: if . Example: If , then .

Functions and Cryptography Cipher can be represented as a function Example 1: f(Secret message)= YpbzobqjbZqqyec Example 2: f(son) = girl (girl) = son f(girl) = son (son) = girl

Functions and Cryptography For each key, an encryption method defines a one-to-one and onto function; and the corresponding decryption method is the inverse of this function.

Permutations Definition: A permutation of n ordered objects is a way of reordering them. It is a mathematical function It is one-to-one and onto An inverse of permutation is a permutation

Permutations Example: x 1 2 3 4 5 p(x) x 1 2 3 4 5 q(x)

Prime Numbers Definition: A prime number is an integer number that has only two divisors: one and itself. Example: 1, 2,17, 31. Prime numbers distributed irregularly among the integers There are infinitely many prime numbers

Factoring The Fundamental Theorem of Arithmetic tells us that every positive integer can be written as a product of powers of primes in essentially one way. Example:

Factoring Problem of factoring a number is very hard The decision if n is a prime or composite number is much easier Fermat’s factoring method sometimes can be used to find any large factors of a number fair quickly (pg.251)

Greatest Common Divisors - GCD Definition: Let x and y be two integers. The greatest common divisor of x and y is number d such that d divides x and d divides y. Definition: x and y are relatively prime if gcd(x,y)=1.

Greatest Common Divisors - GCD Example: gcd(3,16) = 1 gcd(-28,8) = 4 One way to find gcd is by finding factorization of both numbers Euclidean Algorithm is usually used in order to find gcd

Division Principle Let m be a positive integer and let b be any integer. Then there is exactly one pair of integers q (quotient) and r (remainder) such that b = qm +r.

Euclidean Algorithm Input x and y Output gcd(x,y) = xi x0 = x, y0 = y For I >= 0 do xi+1 = yi, yi+1 = xi mod yi If yi =0, stop Output gcd(x,y) = xi

Euclidean Algorithm Example: Let x = 4200 and y = 1485 i xi yi qi ri 4200 1485 2 1230 1 255 4 210 3 45 30 5 15 6 7  

Extended Euclidean Algorithm For every x and y there are integers s and t such that sx + ty = gcd(x,y) We can find s and t using Euclidean Algorithm

Extended Euclidean Algorithm Input x and y x0 = x, y0 = y, s0 = t-1 = 0, t0 = s-1 = 1 For I >= 0 do xi+1 = yi, yi+1 = xi mod yi, si+1 = si-1 – qisi, ti+1 = ti-1 - qiti If yi =0, stop Output gcd(x,y) = xi, si-1,ti-1

Extended Euclidean Algorithm Example: Let x = 4200 and y = 1485 i xi yi qi ri si ti 4200 1485 2 1230 1 255 -2 4 210 -1 3 45 5 -14 30 -6 17 15 29 -82 6 -35 99 7  

Homework Read Section 1.2. Exercises: 4, 5 on pg.46-47. Exercises: 6(a,c), 11(b,d), on pg.260-262 Those questions will be a part of your collected homework.