Linear Algebra Applications: Cryptography

So, if I have A^-1 = [25 3] (mod 26), we would haveA = [25 23] [24 3]Right?In summary, the conversation discusses the process of obtaining the deciphering and enciphering matrices for a Hill 2-cipher, given that the plaintext and first pairs of ciphertext are known. The deciphering matrix is obtained correctly, but there is confusion regarding the method for obtaining the enciphering matrix. The conversation concludes with a clarification on the correct procedure for finding the inverse of a matrix in the context of cryptography.
  • #1
aero_zeppelin
86
0
If any of you guys are seeing or saw this app. for linear algebra in your classes, I could use a hand...

Homework Statement



A Hill 2-cipher is intercepted that starts with the pairs SL HK
Find the deciphering and enciphering matrices, given that the plaintext is known to start with the word ARMY.

The Attempt at a Solution



I managed to get the deciphering matrix... but how do you get the enciphering one?

Thanks!
 
Physics news on Phys.org
  • #2
aero_zeppelin said:
If any of you guys are seeing or saw this app. for linear algebra in your classes, I could use a hand...

Homework Statement



A Hill 2-cipher is intercepted that starts with the pairs SL HK
Find the deciphering and enciphering matrices, given that the plaintext is known to start with the word ARMY.

The Attempt at a Solution



I managed to get the deciphering matrix... but how do you get the enciphering one?

Thanks!

Aren't these two operations inverses of one another?
 
  • #3
Yes, they are. I tried inverting A^-1 (the deciphering matrix) to get A (the enciphering one), but the book says different.

I got
[7 15 ]
6 5

for the deciphering matrix.

If you invert a matrix by doing
A =
[a b ]
c d

A^-1 =
[d -b ]
-c a

You'd get
[5 -15 ] right?? But the book gives another result.
-6 7
 
  • #4
No, that's not what you get. You are omitting a factor in your inverse. The correct formula is
[tex]A^{-1} = \frac{1}{ad - bc}\begin{bmatrix}d&-b \\ -c&a \end{bmatrix}[/tex]

The fraction is 1/|A|. When you have found the inverse, check your work by multiplying A and A-1. You should get I from this product.
 
  • #5
Ok, so if I invert A^-1 I would get A, right?

So, inverting A^-1 =
[7 15 ]
6 5

We get:
1 / -55
x
[5 -15 ]
-6 7

Which product clearly is a fraction...

The book says the result is:
A =
[7 5]
2 15

I don't know what I'm missing here... Thanks for the help btw!
 
  • #6
Maybe you made a mistake in figuring out your deciphering matrix. If I work backwards from what you show as the book's answer for A, then A-1 would be
[tex]\frac{1}{95}\begin{bmatrix} 15& -5\\ -2& 7\end{bmatrix}[/tex]
 
  • #7
aero_zeppelin said:
Yes, they are. I tried inverting A^-1 (the deciphering matrix) to get A (the enciphering one), but the book says different.

I got
[7 15 ]
6 5

for the deciphering matrix.
How'd you get the deciphering matrix?

I find "SL" corresponds to (18, 11), so with your matrix, you would get
[tex]
\begin{pmatrix} 7 & 15 \\ 6 & 5 \end{pmatrix}
\begin{pmatrix} 18 \\ 11 \end{pmatrix} =
\begin{pmatrix} 291 \\ 163 \end{pmatrix} \equiv
\begin{pmatrix} 5 \\ 7 \end{pmatrix} (\text{mod }26)[/tex]which corresponds to "FH", not "AR".

Am I computing this wrong or is your matrix off?
 
  • #8
The deciphering matrix is right, my procedure looks fine to me and the result is the same one as in the book hehe, so I don't know what's wrong in the procedure for obtaining A, the enciphering one.

To get the deciphering matrix, you use the "intercepted" plaintext , which in this case is ARMY and put it in a matrix. Then you put the ciphertext, which in this case was given as SL HK and adjoin it to that matrix so you get the form [C l P]

Do elementary row operations (including some weird ones, like replacing numbers by their mod 26 residue) to obtain the form [ I l (A^-1)t ]

Transpose that A^-1 and you obtain the deciphering matrix! Now, to obtain the enciphering one, A ... that's where I'm stuck loll
 
  • #9
Mark44 said:
Maybe you made a mistake in figuring out your deciphering matrix. If I work backwards from what you show as the book's answer for A, then A-1 would be
[tex]\frac{1}{95}\begin{bmatrix} 15& -5\\ -2& 7\end{bmatrix}[/tex]


Well, in this case with cryptography, I think the procedure for obtaining inverses is different.

Given a matrix A, first you obtain det(A). Next you obtain its reciprocal mod 26. You use this reciprocal to do scalar multiplication with your matrix A in its "inverted form":
[d -b]
-c a]

Next, you obtain the residues mod 26 of that matrix to finally obtain A^-1
 

1. What is the role of linear algebra in cryptography?

Linear algebra plays a crucial role in cryptography by providing the mathematical framework for creating and analyzing encryption algorithms. It helps to ensure the security and efficiency of these algorithms, as well as the ability to decrypt encrypted messages.

2. How are matrices used in cryptography?

Matrices are used in cryptography to represent and manipulate data in a structured and organized manner. They allow for efficient and secure encryption and decryption processes by utilizing mathematical operations such as matrix multiplication and inversion.

3. Can linear algebra be used to break encryption?

Yes, linear algebra can be used to break encryption if the encryption algorithm is not properly designed and implemented. By using techniques such as matrix decomposition and Gaussian elimination, attackers can potentially decipher encrypted messages if they have access to enough information about the encryption process.

4. What are some real-life applications of linear algebra in cryptography?

Linear algebra has many real-life applications in cryptography, including the creation of secure communication protocols, digital signature schemes, and digital certificates. It is also used in the development of secure storage systems and in the design of cryptographic algorithms for electronic banking and online transactions.

5. How important is linear algebra in modern cryptography?

Linear algebra is essential in modern cryptography. It provides the foundation for the design and analysis of secure encryption algorithms, and its principles are utilized in many aspects of digital security. Without linear algebra, the development and implementation of secure encryption methods would not be possible.

Similar threads

  • STEM Academic Advising
Replies
16
Views
515
  • STEM Academic Advising
Replies
9
Views
2K
  • STEM Academic Advising
Replies
6
Views
4K
  • STEM Academic Advising
Replies
3
Views
1K
  • Sticky
  • Science and Math Textbooks
Replies
10
Views
5K
  • Linear and Abstract Algebra
Replies
3
Views
1K
  • STEM Academic Advising
Replies
2
Views
1K
  • STEM Academic Advising
Replies
1
Views
1K
  • Science and Math Textbooks
Replies
2
Views
3K
  • Precalculus Mathematics Homework Help
Replies
3
Views
4K
Back
Top