top of page
Inaugurated by IN-SPACe
ISRO Registered Space Tutor

S7-SA2-0150

What is the Application of Matrices in Cryptography?

Grade Level:

Class 12

AI/ML, Physics, Biotechnology, FinTech, EVs, Space Technology, Climate Science, Blockchain, Medicine, Engineering, Law, Economics

Definition
What is it?

Matrices are used in cryptography to encrypt (hide) and decrypt (unhide) secret messages. They help turn readable text into a scrambled code and then back again, making sure only authorized people can understand the message.

Simple Example
Quick Example

Imagine you want to send a secret message to your friend, 'HI'. Instead of just scrambling the letters, you can assign numbers to each letter (like A=1, B=2, I=9, H=8). Then, you multiply these numbers by a special 'secret key' matrix. This changes the numbers into a completely different set, making the message look like random numbers.

Worked Example
Step-by-Step

Let's encrypt the message 'HI' using a matrix.

Step 1: Convert letters to numbers. Let A=1, B=2, ..., Z=26. So, H=8, I=9.
---Step 2: Arrange these numbers into a column matrix: Message Matrix = [[8], [9]].
---Step 3: Choose a secret key matrix. Let's use Key Matrix = [[2, 1], [3, 2]]. (This matrix must have an inverse).
---Step 4: Multiply the Message Matrix by the Key Matrix to get the Encrypted Matrix.
Encrypted Matrix = Key Matrix x Message Matrix
Encrypted Matrix = [[2, 1], [3, 2]] x [[8], [9]]
---Step 5: Perform matrix multiplication:
Top element = (2 * 8) + (1 * 9) = 16 + 9 = 25
Bottom element = (3 * 8) + (2 * 9) = 24 + 18 = 42
---Step 6: The Encrypted Matrix is [[25], [42]].
---Step 7: The encrypted message is '25 42'. This looks like random numbers, hiding the original 'HI'.
---Answer: The encrypted message is 25 42.

Why It Matters

Understanding matrices in cryptography is crucial for securing online transactions and personal data, protecting your privacy on apps like WhatsApp or UPI. This knowledge opens doors to careers in cybersecurity, software development, and even national defense, safeguarding digital information for everyone.

Common Mistakes

MISTAKE: Multiplying matrices in the wrong order (e.g., Message Matrix x Key Matrix instead of Key Matrix x Message Matrix). | CORRECTION: Matrix multiplication order matters! Always ensure the key matrix is multiplied correctly with the message matrix, usually Key x Message for encryption.

MISTAKE: Forgetting that the key matrix must be invertible for decryption. | CORRECTION: The determinant of the key matrix must not be zero. If the determinant is zero, you cannot find its inverse, and thus cannot decrypt the message.

MISTAKE: Not converting the letters to numbers consistently (e.g., using A=0 sometimes and A=1 other times). | CORRECTION: Always stick to a consistent numerical assignment for letters (e.g., A=1, B=2,... or A=0, B=1,... for the entire process).

Practice Questions
Try It Yourself

QUESTION: Convert the word 'CAT' into a column matrix using A=1, B=2, ..., Z=26. | ANSWER: [[3], [1], [20]]

QUESTION: If the encrypted message is [[10], [15]] and the Key Matrix is [[1, 2], [3, 4]], what is the determinant of the Key Matrix? | ANSWER: (1*4) - (2*3) = 4 - 6 = -2

QUESTION: Encrypt the message 'GO' using A=1, B=2,... and the Key Matrix [[1, 2], [3, 5]]. Show the encrypted numbers. | ANSWER: G=7, O=15. Message Matrix = [[7], [15]]. Encrypted Matrix = [[1, 2], [3, 5]] x [[7], [15]] = [[(1*7)+(2*15)], [(3*7)+(5*15)]] = [[7+30], [21+75]] = [[37], [96]]. Encrypted message: 37 96.

MCQ
Quick Quiz

Which property is essential for a key matrix to be used for decryption in cryptography?

Its elements must all be positive.

It must be a square matrix and have a non-zero determinant.

It must have a determinant of exactly one.

Its diagonal elements must be zero.

The Correct Answer Is:

B

For decryption, you need the inverse of the key matrix. An inverse exists only if the matrix is square and its determinant is not zero. Options A, C, and D are not necessary conditions.

Real World Connection
In the Real World

When you send a message on WhatsApp or make a payment using UPI, matrices are silently working behind the scenes! Your messages and transaction details are encrypted using complex mathematical operations involving matrices, ensuring that only the intended recipient can read them, keeping your data secure from hackers.

Key Vocabulary
Key Terms

MATRIX: A rectangular arrangement of numbers or symbols in rows and columns. | CRYPTOGRAPHY: The art of writing or solving codes. | ENCRYPTION: The process of converting information into a code to prevent unauthorized access. | DECRYPTION: The process of converting coded information back into its original readable form. | INVERSE MATRIX: A special matrix that, when multiplied by the original matrix, gives an identity matrix, essential for decryption.

What's Next
What to Learn Next

Now that you understand how matrices help encrypt messages, you can explore 'Inverse of a Matrix' and 'Determinants'. These concepts are crucial for understanding how encrypted messages are actually decoded and are widely used in advanced fields like AI and FinTech.

bottom of page