Find the message on Hill Cipher
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
We assume that the message $$!IWGVIEX!ZRADRYD$$ has been encrypted
using Hill Cipher and with the correspondence $A=0,...,Z=25, _=26, ? =27,!=28$. We know that the last five letters of plaintext are sender's signature $MARIA$.
We want to find the deciphering matrix and read the message.
My attempt: At first we suppose that $m=2, P=C=BbbZ_29$ and $K=mathrmGL_2(BbbZ_29)$. By the hypothesis, we know that $MARIA leftrightarrow ADRYD iff (12,0,17,8,0)leftrightarrow (0,3,17,24,17)$.
This implies that, if we assume that the key matrix is $Ain mathrmGL_2(BbbZ_29)$, the diciphering function is
$$ E_A: (BbbZ_29)^2 longrightarrow (BbbZ_29)^2,\
(12,0)mapsto (12,0)cdot A =(0,3), \
(17,8) mapsto (17,8)cdot A=(17,24) $$
so,
$
beginpmatrix
12 & 0 \
17 & 8
endpmatrix cdot A = beginpmatrix
0 & 3 \
17 & 24
endpmatrix $.
We define $B:=beginpmatrix
12 & 0 \
17 & 8
endpmatrix$. Then, $det B=9 in U_29 iff B in mathrmGL(BbbZ_29)$. Also, $mathrmadj B= beginpmatrix
8 & 0 \
12 & 12
endpmatrix $ and $9^-1=13 in U_29$. So,
$$B^-1=13 beginpmatrix
8 & 0 \
12 & 12
endpmatrix = beginpmatrix
9 & 0 \
11 & 11
endpmatrix.$$ And from this,
$$A = beginpmatrix
9 & 0 \
11 & 11
endpmatrix cdot beginpmatrix
0 & 3 \
17 & 24
endpmatrix = beginpmatrix
0 & 27 \
13 & 7
endpmatrix in mathrmGL(BbbZ_29).
$$
But if we use this matrix as a key and encipher the word $MARIA$, we will not take the word $ADRYD$ that we expect, so something is wrong.
Is this method correct? Do I miss something?
Thank you.
cryptography
 |Â
show 1 more comment
up vote
0
down vote
favorite
We assume that the message $$!IWGVIEX!ZRADRYD$$ has been encrypted
using Hill Cipher and with the correspondence $A=0,...,Z=25, _=26, ? =27,!=28$. We know that the last five letters of plaintext are sender's signature $MARIA$.
We want to find the deciphering matrix and read the message.
My attempt: At first we suppose that $m=2, P=C=BbbZ_29$ and $K=mathrmGL_2(BbbZ_29)$. By the hypothesis, we know that $MARIA leftrightarrow ADRYD iff (12,0,17,8,0)leftrightarrow (0,3,17,24,17)$.
This implies that, if we assume that the key matrix is $Ain mathrmGL_2(BbbZ_29)$, the diciphering function is
$$ E_A: (BbbZ_29)^2 longrightarrow (BbbZ_29)^2,\
(12,0)mapsto (12,0)cdot A =(0,3), \
(17,8) mapsto (17,8)cdot A=(17,24) $$
so,
$
beginpmatrix
12 & 0 \
17 & 8
endpmatrix cdot A = beginpmatrix
0 & 3 \
17 & 24
endpmatrix $.
We define $B:=beginpmatrix
12 & 0 \
17 & 8
endpmatrix$. Then, $det B=9 in U_29 iff B in mathrmGL(BbbZ_29)$. Also, $mathrmadj B= beginpmatrix
8 & 0 \
12 & 12
endpmatrix $ and $9^-1=13 in U_29$. So,
$$B^-1=13 beginpmatrix
8 & 0 \
12 & 12
endpmatrix = beginpmatrix
9 & 0 \
11 & 11
endpmatrix.$$ And from this,
$$A = beginpmatrix
9 & 0 \
11 & 11
endpmatrix cdot beginpmatrix
0 & 3 \
17 & 24
endpmatrix = beginpmatrix
0 & 27 \
13 & 7
endpmatrix in mathrmGL(BbbZ_29).
$$
But if we use this matrix as a key and encipher the word $MARIA$, we will not take the word $ADRYD$ that we expect, so something is wrong.
Is this method correct? Do I miss something?
Thank you.
cryptography
Any help please?
â Chris
Jun 11 at 17:09
$13times 8notequiv 9pmod29$
â Peter Koà ¡inár
Jun 11 at 17:10
1
Also, you might need to be careful about position of your known plaintext within the message. Remember, you are encrypting/decrypting pairs of characters, so you are looking at ciphertext split as "!I WG VI EX !Z RA DR YD" and the plaintext pairs corresponding to last two pairs would be "AR" and "IA".
â Peter Koà ¡inár
Jun 11 at 17:18
@PeterKoà ¡inár Thank you for your comment. Oh God. Did I take a non-existing pair?
â Chris
Jun 11 at 17:21
1
There are two separate issues: First is a mistake in calculation of $B^-1$ which caused MARIA not to be encrypted as ADRYD, even if considered on its own. But even with the corrected matrix, you would still get nonsensical text if you tried to decrypt the full message - since the pairs would not be aligned with those you used to find the matrix in the first place.
â Peter Koà ¡inár
Jun 11 at 17:40
 |Â
show 1 more comment
up vote
0
down vote
favorite
up vote
0
down vote
favorite
We assume that the message $$!IWGVIEX!ZRADRYD$$ has been encrypted
using Hill Cipher and with the correspondence $A=0,...,Z=25, _=26, ? =27,!=28$. We know that the last five letters of plaintext are sender's signature $MARIA$.
We want to find the deciphering matrix and read the message.
My attempt: At first we suppose that $m=2, P=C=BbbZ_29$ and $K=mathrmGL_2(BbbZ_29)$. By the hypothesis, we know that $MARIA leftrightarrow ADRYD iff (12,0,17,8,0)leftrightarrow (0,3,17,24,17)$.
This implies that, if we assume that the key matrix is $Ain mathrmGL_2(BbbZ_29)$, the diciphering function is
$$ E_A: (BbbZ_29)^2 longrightarrow (BbbZ_29)^2,\
(12,0)mapsto (12,0)cdot A =(0,3), \
(17,8) mapsto (17,8)cdot A=(17,24) $$
so,
$
beginpmatrix
12 & 0 \
17 & 8
endpmatrix cdot A = beginpmatrix
0 & 3 \
17 & 24
endpmatrix $.
We define $B:=beginpmatrix
12 & 0 \
17 & 8
endpmatrix$. Then, $det B=9 in U_29 iff B in mathrmGL(BbbZ_29)$. Also, $mathrmadj B= beginpmatrix
8 & 0 \
12 & 12
endpmatrix $ and $9^-1=13 in U_29$. So,
$$B^-1=13 beginpmatrix
8 & 0 \
12 & 12
endpmatrix = beginpmatrix
9 & 0 \
11 & 11
endpmatrix.$$ And from this,
$$A = beginpmatrix
9 & 0 \
11 & 11
endpmatrix cdot beginpmatrix
0 & 3 \
17 & 24
endpmatrix = beginpmatrix
0 & 27 \
13 & 7
endpmatrix in mathrmGL(BbbZ_29).
$$
But if we use this matrix as a key and encipher the word $MARIA$, we will not take the word $ADRYD$ that we expect, so something is wrong.
Is this method correct? Do I miss something?
Thank you.
cryptography
We assume that the message $$!IWGVIEX!ZRADRYD$$ has been encrypted
using Hill Cipher and with the correspondence $A=0,...,Z=25, _=26, ? =27,!=28$. We know that the last five letters of plaintext are sender's signature $MARIA$.
We want to find the deciphering matrix and read the message.
My attempt: At first we suppose that $m=2, P=C=BbbZ_29$ and $K=mathrmGL_2(BbbZ_29)$. By the hypothesis, we know that $MARIA leftrightarrow ADRYD iff (12,0,17,8,0)leftrightarrow (0,3,17,24,17)$.
This implies that, if we assume that the key matrix is $Ain mathrmGL_2(BbbZ_29)$, the diciphering function is
$$ E_A: (BbbZ_29)^2 longrightarrow (BbbZ_29)^2,\
(12,0)mapsto (12,0)cdot A =(0,3), \
(17,8) mapsto (17,8)cdot A=(17,24) $$
so,
$
beginpmatrix
12 & 0 \
17 & 8
endpmatrix cdot A = beginpmatrix
0 & 3 \
17 & 24
endpmatrix $.
We define $B:=beginpmatrix
12 & 0 \
17 & 8
endpmatrix$. Then, $det B=9 in U_29 iff B in mathrmGL(BbbZ_29)$. Also, $mathrmadj B= beginpmatrix
8 & 0 \
12 & 12
endpmatrix $ and $9^-1=13 in U_29$. So,
$$B^-1=13 beginpmatrix
8 & 0 \
12 & 12
endpmatrix = beginpmatrix
9 & 0 \
11 & 11
endpmatrix.$$ And from this,
$$A = beginpmatrix
9 & 0 \
11 & 11
endpmatrix cdot beginpmatrix
0 & 3 \
17 & 24
endpmatrix = beginpmatrix
0 & 27 \
13 & 7
endpmatrix in mathrmGL(BbbZ_29).
$$
But if we use this matrix as a key and encipher the word $MARIA$, we will not take the word $ADRYD$ that we expect, so something is wrong.
Is this method correct? Do I miss something?
Thank you.
cryptography
edited Jun 11 at 21:52
Henno Brandsma
92.5k342100
92.5k342100
asked Jun 11 at 16:29
Chris
748311
748311
Any help please?
â Chris
Jun 11 at 17:09
$13times 8notequiv 9pmod29$
â Peter Koà ¡inár
Jun 11 at 17:10
1
Also, you might need to be careful about position of your known plaintext within the message. Remember, you are encrypting/decrypting pairs of characters, so you are looking at ciphertext split as "!I WG VI EX !Z RA DR YD" and the plaintext pairs corresponding to last two pairs would be "AR" and "IA".
â Peter Koà ¡inár
Jun 11 at 17:18
@PeterKoà ¡inár Thank you for your comment. Oh God. Did I take a non-existing pair?
â Chris
Jun 11 at 17:21
1
There are two separate issues: First is a mistake in calculation of $B^-1$ which caused MARIA not to be encrypted as ADRYD, even if considered on its own. But even with the corrected matrix, you would still get nonsensical text if you tried to decrypt the full message - since the pairs would not be aligned with those you used to find the matrix in the first place.
â Peter Koà ¡inár
Jun 11 at 17:40
 |Â
show 1 more comment
Any help please?
â Chris
Jun 11 at 17:09
$13times 8notequiv 9pmod29$
â Peter Koà ¡inár
Jun 11 at 17:10
1
Also, you might need to be careful about position of your known plaintext within the message. Remember, you are encrypting/decrypting pairs of characters, so you are looking at ciphertext split as "!I WG VI EX !Z RA DR YD" and the plaintext pairs corresponding to last two pairs would be "AR" and "IA".
â Peter Koà ¡inár
Jun 11 at 17:18
@PeterKoà ¡inár Thank you for your comment. Oh God. Did I take a non-existing pair?
â Chris
Jun 11 at 17:21
1
There are two separate issues: First is a mistake in calculation of $B^-1$ which caused MARIA not to be encrypted as ADRYD, even if considered on its own. But even with the corrected matrix, you would still get nonsensical text if you tried to decrypt the full message - since the pairs would not be aligned with those you used to find the matrix in the first place.
â Peter Koà ¡inár
Jun 11 at 17:40
Any help please?
â Chris
Jun 11 at 17:09
Any help please?
â Chris
Jun 11 at 17:09
$13times 8notequiv 9pmod29$
â Peter Koà ¡inár
Jun 11 at 17:10
$13times 8notequiv 9pmod29$
â Peter Koà ¡inár
Jun 11 at 17:10
1
1
Also, you might need to be careful about position of your known plaintext within the message. Remember, you are encrypting/decrypting pairs of characters, so you are looking at ciphertext split as "!I WG VI EX !Z RA DR YD" and the plaintext pairs corresponding to last two pairs would be "AR" and "IA".
â Peter Koà ¡inár
Jun 11 at 17:18
Also, you might need to be careful about position of your known plaintext within the message. Remember, you are encrypting/decrypting pairs of characters, so you are looking at ciphertext split as "!I WG VI EX !Z RA DR YD" and the plaintext pairs corresponding to last two pairs would be "AR" and "IA".
â Peter Koà ¡inár
Jun 11 at 17:18
@PeterKoà ¡inár Thank you for your comment. Oh God. Did I take a non-existing pair?
â Chris
Jun 11 at 17:21
@PeterKoà ¡inár Thank you for your comment. Oh God. Did I take a non-existing pair?
â Chris
Jun 11 at 17:21
1
1
There are two separate issues: First is a mistake in calculation of $B^-1$ which caused MARIA not to be encrypted as ADRYD, even if considered on its own. But even with the corrected matrix, you would still get nonsensical text if you tried to decrypt the full message - since the pairs would not be aligned with those you used to find the matrix in the first place.
â Peter Koà ¡inár
Jun 11 at 17:40
There are two separate issues: First is a mistake in calculation of $B^-1$ which caused MARIA not to be encrypted as ADRYD, even if considered on its own. But even with the corrected matrix, you would still get nonsensical text if you tried to decrypt the full message - since the pairs would not be aligned with those you used to find the matrix in the first place.
â Peter Koà ¡inár
Jun 11 at 17:40
 |Â
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
You have to split the ciphertext in pairs, and your ciphertext corresponds to the following pairs of elements of $mathbbZ_29$:
(28, 8), (22, 6), (21, 8), (4, 23), (28, 25), (17, 0), (3, 17), (24, 3)
And the last 4 letters of your assumed plain text are "ARIA" (two pairs) that equal (0, 17), (8, 0)
We cannot use the M, as then we'd have to guess the letter before M too, as encryption is done by pairs. But 4 unknowns with 4 equations should suffice. So if we denote by $E$ the $2 times 2$ encryption matrix we have that these 2 pairs must become the final two pairs of the cipher text, or written out as a matrix equation $EP = C$ where $P$ is a matrix of plain texts, and $C$ the corresponding ciphertexts:
$$E cdot beginbmatrix 0 & 8 \ 17 & 0 endbmatrix =
beginbmatrix 3 & 24\ 17 & 3 endbmatrix$$
As the $P$ matrix is invertible, we compute $E$ as $CP^-1$ (using mod $29$ arithmetic and the easy formula for inverses of $2 times 2$ matrices).
Then compute $D$ as $E^-1$ and you'll find a nice plaintext indeed ending in ARIA
; I checked and it works out.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
You have to split the ciphertext in pairs, and your ciphertext corresponds to the following pairs of elements of $mathbbZ_29$:
(28, 8), (22, 6), (21, 8), (4, 23), (28, 25), (17, 0), (3, 17), (24, 3)
And the last 4 letters of your assumed plain text are "ARIA" (two pairs) that equal (0, 17), (8, 0)
We cannot use the M, as then we'd have to guess the letter before M too, as encryption is done by pairs. But 4 unknowns with 4 equations should suffice. So if we denote by $E$ the $2 times 2$ encryption matrix we have that these 2 pairs must become the final two pairs of the cipher text, or written out as a matrix equation $EP = C$ where $P$ is a matrix of plain texts, and $C$ the corresponding ciphertexts:
$$E cdot beginbmatrix 0 & 8 \ 17 & 0 endbmatrix =
beginbmatrix 3 & 24\ 17 & 3 endbmatrix$$
As the $P$ matrix is invertible, we compute $E$ as $CP^-1$ (using mod $29$ arithmetic and the easy formula for inverses of $2 times 2$ matrices).
Then compute $D$ as $E^-1$ and you'll find a nice plaintext indeed ending in ARIA
; I checked and it works out.
add a comment |Â
up vote
1
down vote
accepted
You have to split the ciphertext in pairs, and your ciphertext corresponds to the following pairs of elements of $mathbbZ_29$:
(28, 8), (22, 6), (21, 8), (4, 23), (28, 25), (17, 0), (3, 17), (24, 3)
And the last 4 letters of your assumed plain text are "ARIA" (two pairs) that equal (0, 17), (8, 0)
We cannot use the M, as then we'd have to guess the letter before M too, as encryption is done by pairs. But 4 unknowns with 4 equations should suffice. So if we denote by $E$ the $2 times 2$ encryption matrix we have that these 2 pairs must become the final two pairs of the cipher text, or written out as a matrix equation $EP = C$ where $P$ is a matrix of plain texts, and $C$ the corresponding ciphertexts:
$$E cdot beginbmatrix 0 & 8 \ 17 & 0 endbmatrix =
beginbmatrix 3 & 24\ 17 & 3 endbmatrix$$
As the $P$ matrix is invertible, we compute $E$ as $CP^-1$ (using mod $29$ arithmetic and the easy formula for inverses of $2 times 2$ matrices).
Then compute $D$ as $E^-1$ and you'll find a nice plaintext indeed ending in ARIA
; I checked and it works out.
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
You have to split the ciphertext in pairs, and your ciphertext corresponds to the following pairs of elements of $mathbbZ_29$:
(28, 8), (22, 6), (21, 8), (4, 23), (28, 25), (17, 0), (3, 17), (24, 3)
And the last 4 letters of your assumed plain text are "ARIA" (two pairs) that equal (0, 17), (8, 0)
We cannot use the M, as then we'd have to guess the letter before M too, as encryption is done by pairs. But 4 unknowns with 4 equations should suffice. So if we denote by $E$ the $2 times 2$ encryption matrix we have that these 2 pairs must become the final two pairs of the cipher text, or written out as a matrix equation $EP = C$ where $P$ is a matrix of plain texts, and $C$ the corresponding ciphertexts:
$$E cdot beginbmatrix 0 & 8 \ 17 & 0 endbmatrix =
beginbmatrix 3 & 24\ 17 & 3 endbmatrix$$
As the $P$ matrix is invertible, we compute $E$ as $CP^-1$ (using mod $29$ arithmetic and the easy formula for inverses of $2 times 2$ matrices).
Then compute $D$ as $E^-1$ and you'll find a nice plaintext indeed ending in ARIA
; I checked and it works out.
You have to split the ciphertext in pairs, and your ciphertext corresponds to the following pairs of elements of $mathbbZ_29$:
(28, 8), (22, 6), (21, 8), (4, 23), (28, 25), (17, 0), (3, 17), (24, 3)
And the last 4 letters of your assumed plain text are "ARIA" (two pairs) that equal (0, 17), (8, 0)
We cannot use the M, as then we'd have to guess the letter before M too, as encryption is done by pairs. But 4 unknowns with 4 equations should suffice. So if we denote by $E$ the $2 times 2$ encryption matrix we have that these 2 pairs must become the final two pairs of the cipher text, or written out as a matrix equation $EP = C$ where $P$ is a matrix of plain texts, and $C$ the corresponding ciphertexts:
$$E cdot beginbmatrix 0 & 8 \ 17 & 0 endbmatrix =
beginbmatrix 3 & 24\ 17 & 3 endbmatrix$$
As the $P$ matrix is invertible, we compute $E$ as $CP^-1$ (using mod $29$ arithmetic and the easy formula for inverses of $2 times 2$ matrices).
Then compute $D$ as $E^-1$ and you'll find a nice plaintext indeed ending in ARIA
; I checked and it works out.
edited Aug 24 at 4:16
answered Jun 11 at 21:44
Henno Brandsma
92.5k342100
92.5k342100
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2815941%2ffind-the-message-on-hill-cipher%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Any help please?
â Chris
Jun 11 at 17:09
$13times 8notequiv 9pmod29$
â Peter Koà ¡inár
Jun 11 at 17:10
1
Also, you might need to be careful about position of your known plaintext within the message. Remember, you are encrypting/decrypting pairs of characters, so you are looking at ciphertext split as "!I WG VI EX !Z RA DR YD" and the plaintext pairs corresponding to last two pairs would be "AR" and "IA".
â Peter Koà ¡inár
Jun 11 at 17:18
@PeterKoà ¡inár Thank you for your comment. Oh God. Did I take a non-existing pair?
â Chris
Jun 11 at 17:21
1
There are two separate issues: First is a mistake in calculation of $B^-1$ which caused MARIA not to be encrypted as ADRYD, even if considered on its own. But even with the corrected matrix, you would still get nonsensical text if you tried to decrypt the full message - since the pairs would not be aligned with those you used to find the matrix in the first place.
â Peter Koà ¡inár
Jun 11 at 17:40