Mathematics of Cryptography Modular Arithmetic, Congruence,

Slides:



Advertisements
Similar presentations
Mathematics of Cryptography Part II: Algebraic Structures
Advertisements

Cryptography and Network Security
Chapter 4 – Finite Fields. Introduction will now introduce finite fields of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key.
Section 4.1: Primes, Factorization, and the Euclidean Algorithm Practice HW (not to hand in) From Barr Text p. 160 # 6, 7, 8, 11, 12, 13.
Chapter 4 – Finite Fields Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic Curve, IDEA, Public.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Matrix Mathematics in MATLAB and Excel
Section 1.2 Homework questions? Slide 1 Copyright (c) The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Chapter 2 Matrices Matrices provide an orderly way of arranging values or functions to enhance the analysis of systems in a systematic manner. Their.
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Copyright © 2013, 2009, 2006 Pearson Education, Inc. 1 1 Section 2.2 The Multiplication Property of Equality Copyright © 2013, 2009, 2006 Pearson Education,
CS555Spring 2012/Topic 61 Cryptography CS 555 Topic 6: Number Theory Basics.
BY MISS FARAH ADIBAH ADNAN IMK
© 2007 by S - Squared, Inc. All Rights Reserved.
259 Lecture 14 Elementary Matrix Theory. 2 Matrix Definition  A matrix is a rectangular array of elements (usually numbers) written in rows and columns.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Copyright © The McGraw-Hill Companies, Inc. Permission required.
Solving Equations Medina1 With Decimal & Fractions.
Systems and Matrices (Chapter5)
Mathematics of Cryptography Part I: Modular Arithmetic
Module :MA3036NI Cryptography and Number Theory Lecture Week 7
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Review for Chapter 4 Important Terms, Symbols, Concepts 4.1. Systems of Linear Equations in Two Variables.
THU, JAN 8, 2015 Create a “Big Book of Matrices” flip book using 4 pages. Do not make your tabs big! BIG BOOK OF MATRICES What is a Matrix? Adding & Subtracting.
Copyright © 2011 Pearson, Inc. 7.3 Multivariate Linear Systems and Row Operations.
4.4 & 4.5 Notes Remember: Identity Matrices: If the product of two matrices equal the identity matrix then they are inverses.
Copyright © 2007 Pearson Education, Inc. Slide 7-1.
Chapter 4 Numeration and Mathematical Systems © 2008 Pearson Addison-Wesley. All rights reserved.
Copyright © 2013, 2009, 2005 Pearson Education, Inc. 1 5 Systems and Matrices Copyright © 2013, 2009, 2005 Pearson Education, Inc.
Unit 6 : Matrices.
1. Inverse of A 2. Inverse of a 2x2 Matrix 3. Matrix With No Inverse 4. Solving a Matrix Equation 1.
Unit 3: Matrices.
Matrix Multiplication The inner dimensions must be the same (or the number of columns in the first matrix is equal to the number of rows in the second.
Algebra 3: Section 5.5 Objectives of this Section Find the Sum and Difference of Two Matrices Find Scalar Multiples of a Matrix Find the Product of Two.
Mark Dugopolski Elementary Algebra Edition 3 Chapter 9 Quadratic Equations and Quadratic Functions Copyright © 2000 by the McGraw-Hill Companies, Inc.
Class Opener:. Identifying Matrices Student Check:
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.
Chapter 6 Systems of Linear Equations and Matrices Sections 6.3 – 6.5.
Slide Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley A set of equations is called a system of equations. The solution.
Matrices Digital Lesson. Copyright © by Houghton Mifflin Company, Inc. All rights reserved. 2 A matrix is a rectangular array of real numbers. Each entry.
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 8.2.
TH EDITION LIAL HORNSBY SCHNEIDER COLLEGE ALGEBRA.
Copyright ©2015 Pearson Education, Inc. All rights reserved.
9.1 Primes and Related Congruence Equations 23 Sep 2013.
Solving 1-Step Equations 2 An Equation is Like a Balance.
Multiply one equation, then add
Discrete Mathematics
Lecture 2-3 Basic Number Theory and Algebra. In modern cryptographic systems, the messages are represented by numerical values prior to being encrypted.
Copyright © 1999 by the McGraw-Hill Companies, Inc. Barnett/Ziegler/Byleen College Algebra, 6 th Edition Chapter Seven Matrices & Determinants.
Unit 3: Matrices. Matrix: A rectangular arrangement of data into rows and columns, identified by capital letters. Matrix Dimensions: Number of rows, m,
Chapter 5: Matrices and Determinants Section 5.5: Augmented Matrix Solutions.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 2 The Fundamentals: Algorithms,
CS480 Cryptography and Information Security
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 3. Mathematics of Cryptography.
Matrices. Matrix - a rectangular array of variables or constants in horizontal rows and vertical columns enclosed in brackets. Element - each value in.
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.
College Algebra Chapter 6 Matrices and Determinants and Applications
Elementary Matrix Theory
Solve Linear Systems By Multiplying First
Mathematics of Cryptography
Chapter 7 Matrix Mathematics
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Analytic Number Theory MTH 435
Chapter 7: Matrices and Systems of Equations and Inequalities
Using matrices to solve Systems of Equations
Lial/Hungerford/Holcomb/Mullins: Mathematics with Applications 11e Finite Mathematics with Applications 11e Copyright ©2015 Pearson Education, Inc. All.
Unit 3: Matrices
Matrices.
Lecture 2-3 Basic Number Theory and Algebra
Presentation transcript:

Mathematics of Cryptography Modular Arithmetic, Congruence, Chapter 2 Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 2 Objectives To review integer arithmetic, concentrating on divisibility and finding the greatest common divisor using the Euclidean algorithm To understand how the extended Euclidean algorithm can be used to solve linear Diophantine equations, to solve linear congruent equations, and to find the multiplicative inverses To emphasize the importance of modular arithmetic and the modulo operator, because they are extensively used in cryptography To emphasize and review matrices and operations on residue matrices that are extensively used in cryptography To solve a set of congruent equations using residue matrices

2.1.1 Set of Integers The set of integers, denoted by Z, contains all integral numbers (with no fraction) from negative infinity to positive infinity (Figure 2.1). Figure 2.1 The set of integers

2.2.2 Set of Residues The modulo operation creates a set, which in modular arithmetic is referred to as the set of least residues modulo n, or Zn. Figure 2.10 Some Zn sets

2.2.2 Set of Residues Note: Zn = { 0, 1, …, n – 1} We also define: Zn* = {x | 0 < x ≤ n and gcd(x, n) = 1} E.g. Z9* = {1, 2, 4, 5, 7, 8 }

2.2.6 Addition and Multiplication Tables Figure 2.16 Addition and multiplication table for Z10

2.2.7 Different Sets Figure 2.17 Some Zn and Zn* sets Note We need to use Zn when additive inverses are needed; we need to use Zn* when multiplicative inverses are needed.

2.2.8 Two More Sets Cryptography often uses two more sets: Zp and Zp*. The modulus in these two sets is a prime number.

Topics discussed in this section: 2-3 MATRICES In cryptography we need to handle matrices. Although this topic belongs to a special branch of algebra called linear algebra, the following brief review of matrices is necessary preparation for the study of cryptography. Topics discussed in this section: 2.3.1 Definitions 2.3.2 Operations and Relations 2.3.3 Determinants 2.3.4 Residue Matrices

2.3.1 Definition Figure 2.18 A matrix of size l ´ m

2.3.1 Continued Figure 2.19 Examples of matrices

2.3.2 Operations and Relations Example 2.28 Figure 2.20 shows an example of addition and subtraction. Figure 2.20 Addition and subtraction of matrices

2.3.2 Continued Example 2. 29 Figure 2.21 shows the product of a row matrix (1 × 3) by a column matrix (3 × 1). The result is a matrix of size 1 × 1. Figure 2.21 Multiplication of a row matrix by a column matrix

2.3.2 Continued Example 2. 30 Figure 2.22 shows the product of a 2 × 3 matrix by a 3 × 4 matrix. The result is a 2 × 4 matrix. Figure 2.22 Multiplication of a 2 × 3 matrix by a 3 × 4 matrix

2.3.2 Continued Figure 2.23 shows an example of scalar multiplication. Figure 2.23 Scalar multiplication

The determinant is defined only for a square matrix. The determinant of a square matrix A of size m × m denoted as det (A) is a scalar calculated recursively as shown below: Note The determinant is defined only for a square matrix.

2.3.3 Continued Example 2. 32 Figure 2.24 shows how we can calculate the determinant of a 2 × 2 matrix based on the determinant of a 1 × 1 matrix. Figure 2.24 Calculating the determinant of a 2 ´ 2 matrix

2.3.3 Continued Example 2. 33 Figure 2.25 shows the calculation of the determinant of a 3 × 3 matrix. Figure 2.25 Calculating the determinant of a 3 ´ 3 matrix

Multiplicative inverses are only defined for square matrices. Note Multiplicative inverses are only defined for square matrices.

2.3.5 Residue Matrices Cryptography uses residue matrices: matrices where all elements are in Zn. A residue matrix has a multiplicative inverse if gcd (det(A), n) = 1. Example 2. 34 Figure 2.26 A residue matrix and its multiplicative inverse

Topics discussed in this section: 2-4 LINEAR CONGRUENCE Cryptography often involves solving an equation or a set of equations of one or more variables with coefficient in Zn. This section shows how to solve equations when the power of each variable is 1 (linear equation). Topics discussed in this section: 2.4.1 Single-Variable Linear Equations 2.4.2 Set of Linear Equations

2.4.1 Single-Variable Linear Equations Equations of the form ax ≡ b (mod n ) might have no solution or a limited number of solutions.

2.4.1 Continued Example 2.35 Solve the equation 10 x ≡ 2(mod 15). Solution First we find the gcd (10 and 15) = 5. Since 5 does not divide 2, we have no solution. Example 2.36 Solve the equation 14 x ≡ 12 (mod 18). Solution

2.4.1 Continued Example 2.37 Solve the equation 3x + 4 ≡ 6 (mod 13). Solution First we change the equation to the form ax ≡ b (mod n). We add −4 (the additive inverse of 4) to both sides, which give 3x ≡ 2 (mod 13). Because gcd (3, 13) = 1, the equation has only one solution, which is x0 = (2 × 3−1) mod 13 = 18 mod 13 = 5. We can see that the answer satisfies the original equation: 3 × 5 + 4 ≡ 6 (mod 13).

2.4.2 Single-Variable Linear Equations We can also solve a set of linear equations with the same modulus if the matrix formed from the coefficients of the variables is invertible. Figure 2.27 Set of linear equations

2.4.2 Continued Example 2.38 Solve the set of following three equations: Solution The result is x ≡ 15 (mod 16), y ≡ 4 (mod 16), and z ≡ 14 (mod 16). We can check the answer by inserting these values into the equations.