Use of Matrices and
Determinants in
Cryptography
made by Saiman Patel, 12D
What is Cryptography?
Cryptography is the practice of securing
information and communication using
codes and algorithms, ensuring that only
authorized parties can access or
understand the data.
It involves transforming readable
information (plaintext) into an unreadable
format (ciphertext) and back again using
mathematical principles and techniques
A matrix is a rectangular array of
finition of Matrices
numbers arranged in rows and
columns. It serves as a
fundamental tool in various
mathematical computations,
including those used in
cryptographic algorithms.
Understanding matrices is
essential for manipulating data
securely.
Matrix Basics
A matrix is a rectangular array of numbers,
symbols, or expressions, arranged in rows and
columns, and used in various mathematical
and scientific fields.
Types of Matrices
But How is it used??
1. Representing Messages as Matrices:
Messages are first converted into
numerical representations, often
using a standard mapping of letters to
numbers (e.g., A=1, B=2, ..., Z=26).
These numerical representations are
then arranged into matrices, typically
square matrices (same number of rows
2. Encryption:
a) A key matrix, also a square matrix, is chosen.
This matrix acts as the encryption key.
b) The message matrix is multiplied by the key
matrix.
c) The resulting matrix is the ciphertext, which is
then transmitted.
3. Decryption:
a) The recipient of the ciphertext needs the
inverse of the key matrix.
b) The ciphertext matrix is multiplied by the
inverse of the key matrix.
c) This operation results in the original message
Hill Cipher
The Hill cipher is a symmetric key cipher based on linear
algebra. It encrypts plaintext treating it as a vector and
multiplying it by a key matrix.
Invented by Lester S. Hill in 1929. Works
with modular arithmetic (usually mod 26 for
alphabets A-Z). Encrypts blocks of letters
together — unlike simple substitution
ciphers.
How Hill Cipher Works (Step-by-Step)
Step 1: Assign numbers to letters
Step 2: Choose a key matrix
Let’s choose:
This matrix is invertible mod 26 (more on
that later).
Step 3: Prepare the plaintext
Suppose you want to encrypt "HI":
Convert:
Plaintext vector:
Final Matrix
Take mod 26:
319 % 26 = 7 → H
398 % 26 = 8 → I
Final Decrypted Text: "HI"
In summary, matrices and
determinants are essential tools in
Conclusio
cryptography, providing
foundational support for secure
ns
communication and data
protection. Their properties and
operations are leveraged to
develop robust encryption
techniques that safeguard
information in our increasingly
digital world.