Section 2.9 The Hill Cipher; Matrices

Slides:



Advertisements
Similar presentations
Learning Objectives To apply the summation and product notation To define a matrix To solve problems on matrix summation, subtraction and multiplication.
Advertisements

Precalculus Lesson 7.2 Matrix Algebra 4/6/2017 8:43 PM
MF-852 Financial Econometrics
Maths for Computer Graphics
CALCULUS – II Matrix Multiplication by Dr. Eman Saad & Dr. Shorouk Ossama.
“No one can be told what the matrix is…
Matrices MSU CSE 260.
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
MATRICES. Matrices A matrix is a rectangular array of objects (usually numbers) arranged in m horizontal rows and n vertical columns. A matrix with m.
CE 311 K - Introduction to Computer Methods Daene C. McKinney
3.8 Matrices.
1 Operations with Matrice 2 Properties of Matrix Operations
8.4 Matrix Operations Day 1 Thurs May 7 Do Now Solve X – 2y = -6 3x + 4y = 7.
Row 1 Row 2 Row 3 Row m Column 1Column 2Column 3 Column 4.
CSE 504 Discrete Mathematics & Foundations of Computer Science
ECON 1150 Matrix Operations Special Matrices
Basic Operations MultiplicationDeterminants Cramer’s RuleIdentityInverses Solving Systems of equations APPENDIX.
 Row and Reduced Row Echelon  Elementary Matrices.
Matrix Algebra. Quick Review Quick Review Solutions.
Chap. 2 Matrices 2.1 Operations with Matrices
Chapter 5.7 Properties of Matrices. Basic Definitions It is necessary to use capital letters to name matrices. Also, subscript notation is often used.
TH EDITION LIAL HORNSBY SCHNEIDER COLLEGE ALGEBRA.
Copyright © 2013, 2009, 2005 Pearson Education, Inc. 1 5 Systems and Matrices Copyright © 2013, 2009, 2005 Pearson Education, Inc.
A rectangular array of numbers (we will concentrate on real numbers). A nxm matrix has ‘n’ rows and ‘m’ columns What is a matrix? First column First row.
Chapter 8 Matrices and Determinants Copyright © 2014, 2010, 2007 Pearson Education, Inc Matrix Operations and Their Applications.
Overview Definitions Basic matrix operations (+, -, x) Determinants and inverses.
Matrices. A matrix, A, is a rectangular collection of numbers. A matrix with “m” rows and “n” columns is said to have order m x n. Each entry, or element,
8.1 Matrices & Systems of Equations
Copyright © 2011 Pearson, Inc. 7.2 Matrix Algebra.
1 C ollege A lgebra Systems and Matrices (Chapter5) 1.
Unit 6 : Matrices.
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.
Operations with Matrices
Slide Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Chapter 6 Systems of Linear Equations and Matrices Sections 6.3 – 6.5.
Copyright © Cengage Learning. All rights reserved. 7 Linear Systems and Matrices.
ES 240: Scientific and Engineering Computation. Chapter 8 Chapter 8: Linear Algebraic Equations and Matrices Uchechukwu Ofoegbu Temple University.
Chapter 6 Matrices and Determinants Copyright © 2014, 2010, 2007 Pearson Education, Inc Matrix Operations and Their Applications.
Meeting 18 Matrix Operations. Matrix If A is an m x n matrix - that is, a matrix with m rows and n columns – then the scalar entry in the i th row and.
CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.
Matrices: Basic Operations and Their Properties
Chapter 2 … part1 Matrices Linear Algebra S 1. Ch2_2 2.1 Addition, Scalar Multiplication, and Multiplication of Matrices Definition A matrix is a rectangular.
Sec 4.1 Matrices.
Algebra Matrix Operations. Definition Matrix-A rectangular arrangement of numbers in rows and columns Dimensions- number of rows then columns Entries-
Matrices and Determinants
MATRIX A set of numbers arranged in rows and columns enclosed in round or square brackets is called a matrix. The order of a matrix gives the number of.
STROUD Worked examples and exercises are in the text Programme 5: Matrices MATRICES PROGRAMME 5.
Unit 3: Matrices. Matrix: A rectangular arrangement of data into rows and columns, identified by capital letters. Matrix Dimensions: Number of rows, m,
STROUD Worked examples and exercises are in the text PROGRAMME 5 MATRICES.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 3. Mathematics of Cryptography.
If A and B are both m × n matrices then the sum of A and B, denoted A + B, is a matrix obtained by adding corresponding elements of A and B. add these.
Ch. 12 Vocabulary 1.) matrix 2.) element 3.) scalar 4.) scalar multiplication.
Matrices. Matrix A matrix is an ordered rectangular array of numbers. The entry in the i th row and j th column is denoted by a ij. Ex. 4 Columns 3 Rows.
Linear Algebra by Dr. Shorouk Ossama.
Matrices.
MTH108 Business Math I Lecture 20.
3.8 Matrices L Al-zaid Math1101.
MATRICES.
College Algebra Chapter 6 Matrices and Determinants and Applications
MATHEMATICS Matrix Multiplication
What we’re learning today:
Section 7.4 Matrix Algebra.
7.3 Matrices.
Section 2.4 Matrices.
3.5 Perform Basic Matrix Operations
Chapter 4 Matrices & Determinants
MATRICES MATRIX OPERATIONS.
3.5 Perform Basic Matrix Operations Algebra II.
3.8 Matrices L Al-zaid Math1101.
Presentation transcript:

Section 2.9 The Hill Cipher; Matrices The Hill cipher is a block or polygraphic cipher, where groups of plaintext are enciphered as units. The Hill cipher enciphers data using matrix multiplication. We will now introduce the concept of a matrix…

Introduction to Matrices A matrix is a rectangular array of numbers made up of rows and columns. The size of a matrix is given as m x n m is the number of rows to the matrix. n is the number of columns to the matrix. To indicate an individual entry in a matrix A, we use aij where i = row and j = column. The general form of a mxn matrix has the form indicated here. A square m x n matrix is a matrix where m = n. That is the number of rows equals the number of columns…

Introduction to Matrices Equality of Matrices Two matrices A and B are equal if They have the same size and There corresponding entries are equal. Special types of Matrices – Vectors A row vector is a matrix with one row. A column vector is a matrix with one column…

Introduction to Matrices Matrix Addition and Subtraction Two matrices can be added and subtracted only if they have the same size. Example 1: A + B and A – B Example 2: A + B and A – B Scalar Multiplication of Matrices When working with matrices, numbers are referred as scalars. To multiply a matrix by a scalar, we multiply each entry of the matrix by the given scalar. Example 3: 3A Example 4: 5A – 2B Addition and Scalar Multiplication Properties of Matrices…

Introduction To Matrices Matrix Multiplication Multiplying two matrices requires how you multiply a row vector times a column vector. Example 5: Compute AB For the matrix product AB to exist, the number of columns of A must be equal to the number of rows of B. If A has size m x n and B has size n x p, then the product AB has size m x p. The number of row and column vectors that must be multiplied together is mp. The ijth element of AB is the vector product of the ith row of A and the jth column of B. Example 6: Example 7: Example 8: In general, matrix multiplication is not commutative: AB ≠BA…

Introduction to Matrices Multiplicative Properties of Matrices Let A, B, and C be matrices whose sizes are multiplicatively compatible, c a scalar. (AB)C = A(BC) matrix multiplication is associative A(B + C) = AB + AC (A + B)C = AC + BC c(AB) = (cA)B = A(cB)…

Introduction to Matrices Addition Identity Matrices The additive identity has all entries of zero. It is called the zero matrix. If A is mxn then the zero matix is mxn. The zero matrix is called 0. A + 0 = 0 + A = A Multiplicative Identity Matrices If A is mxn then the multiplicative matrix is nxn. The multiplicative identity has 1s on the main diagonal (row number = column number) and 0s everywhere else. Example 9: AI and IA…

Introduction to Matrices Determinants The determinant of a matrix is a real number. The determinant of a 2x2 matrix. Example 10: Find the determinant Example 11: Find the determinant Note: the determinant of a 1x1 matrix is just the value of the entry. A =[3] then |A| = 3. You can calculate the determinant of any nxn matrix…

Introduction to Matrices Matrix Inverses The additive inverse of a matrix is obvious. You want A + B = 0, where B is the inverse. That is B = -A. The more difficult to find, and not always exists, is the multiplicative inverse. The matrix A must be nxn (a square matrix) Notation of the inverse. The inverse for the 2x2 matrix is fairly simple to find. The B is the inverse of A the AB = BA = I. (I call it B here because this stupid program doesn’t allow exponents) Example 12: Find inverse. Note: For the matrix A, the inverse exists if det(A) ≠ 0. Example 13: Find Inverse. Example 14: Find Inverse…

Introduction to Matrices Matrices with Modular Arithmetic For a matrix A with entries aij we way that A MOD m is the matrix where the MOD operation is applied to each entry: aij MOD m. Example 15: Compute matrix MOD 26. Example 16: Find A + B and A – B MOD 5 Example 17: 3A MOD 13 Example 18: Product AB MOD 26…

Introduction to Matrices Finding the inverse of a matrix in modular arithmetic. Example 19: Find the inverse of a matrix Example 20: Determine if inverse exists. Example 21: Solve the system of equations…

The Hill System The Hill Cipher was developed by Lester Hill of Hunter College. It requires the use of a matrix mod 26 that has an inverse. The procedure requires breaking the code up into small segments. If the matrix is nxn, then each segment consists of n letters. If A is the matrix and x is the n letter segment code, then the ciphertext is found by calculating Ax = y. Y is the ciphertext segment. To decipher the text we use the inverse of the matrix A. If we call this inverse B, then By deciphers the code returning x. Note: It is required that the plaintext message have n letters. If it does not have some multiple of n letters, we pad the message with extra characters until it does. Example 22: Encrypt a Message. Example 23: Decrypt a Message…

Cryptanalysis of the Hill System Having just the ciphertext when trying to crypto-analyze a Hill cipher is more difficult then a monoalphabetic cipher. The character frequencies are obscured (because we are encrypting each letter according to a sequence of letters). When using a 2x2 matrix, we are in effect creating a 26^2 = 676 character alphabet. That is, there are 676 different two letter combinations. If you in fact knew that the ciphertext was created using a 2x2 matrix, then a crypto-analyst could break the code with brute force, since there are 26^4 (each entry in the matrix can have 26 different numbers) = 456976 different matrices. The way to make it more difficult is to increase the size of the key matrix…

Cryptanalysis of the Hill System If the adversary has the ciphertext and a small amount of corresponding plaintext, then the Hill Cipher is more vulnerable…!