Hill Cipher and Exponential Cipher Questions
up vote
0
down vote
favorite
- If p = 29, you intercept the message 16 10 10 09 16 02 22 21 21. Try to break the code and read the message, given that ciphertext 16 is plaintext G. (Note: there is more than one possible exponent that turns ciphertext 16 to plaintext G. You will have to find one that makes the rest of
the message make sense.)
So, I know that 16^x can not be congruent to 7 modulo 29, and if we assume A=D, we have to test various exponents such that the intercepted message reads Good Guess.
- If you know that plaintext AT is ciphertext JK, and plaintext SM goes to ciphertext CU, find the deciphering matrix.
So, I already found that b=21 and d=6 by doing matrices. But,I'm not sure how to proceed.
- The following is a message encoded with a monographic cipher. What is the decoded message? CBAEB CCADD CCCAC AEBEE CCAEE BCACB DCBBC CDEAC CCCBC BECCD DCDBE ECBDC CCDBC ABEAC CCCBA EEBCB ECDCB EAEEB DACCC CDBDC BEEEA EBCDB CEDCA CDDEB CBBCD CDBCB DCAEE BDACC EBACC CEBCA DCDBE BBBCD CCEDA EEBDB EDCCE BCBEB CABEE DEDCC CACAC EBECD EDACE CDECB EBDBE BCDEC CABCC AAAAA
For this one, I actually have no idea, because I'm not entirely sure what the deciphering key is.
- Assume that in an RSA system to two primes are 607 and 439, whose product is 266473. Let the enciphering key be e = 205. Encipher the message HELLO. Then find the deciphering key. Note that since you can use three-character groups, you will have to pad: HEL LO? Use S as the padding character.
So, I found that the cipher text is 068660 196630, but now I'm not sure how to find the deciphering key.
number-theory elementary-number-theory cryptography
add a comment |
up vote
0
down vote
favorite
- If p = 29, you intercept the message 16 10 10 09 16 02 22 21 21. Try to break the code and read the message, given that ciphertext 16 is plaintext G. (Note: there is more than one possible exponent that turns ciphertext 16 to plaintext G. You will have to find one that makes the rest of
the message make sense.)
So, I know that 16^x can not be congruent to 7 modulo 29, and if we assume A=D, we have to test various exponents such that the intercepted message reads Good Guess.
- If you know that plaintext AT is ciphertext JK, and plaintext SM goes to ciphertext CU, find the deciphering matrix.
So, I already found that b=21 and d=6 by doing matrices. But,I'm not sure how to proceed.
- The following is a message encoded with a monographic cipher. What is the decoded message? CBAEB CCADD CCCAC AEBEE CCAEE BCACB DCBBC CDEAC CCCBC BECCD DCDBE ECBDC CCDBC ABEAC CCCBA EEBCB ECDCB EAEEB DACCC CDBDC BEEEA EBCDB CEDCA CDDEB CBBCD CDBCB DCAEE BDACC EBACC CEBCA DCDBE BBBCD CCEDA EEBDB EDCCE BCBEB CABEE DEDCC CACAC EBECD EDACE CDECB EBDBE BCDEC CABCC AAAAA
For this one, I actually have no idea, because I'm not entirely sure what the deciphering key is.
- Assume that in an RSA system to two primes are 607 and 439, whose product is 266473. Let the enciphering key be e = 205. Encipher the message HELLO. Then find the deciphering key. Note that since you can use three-character groups, you will have to pad: HEL LO? Use S as the padding character.
So, I found that the cipher text is 068660 196630, but now I'm not sure how to find the deciphering key.
number-theory elementary-number-theory cryptography
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
- If p = 29, you intercept the message 16 10 10 09 16 02 22 21 21. Try to break the code and read the message, given that ciphertext 16 is plaintext G. (Note: there is more than one possible exponent that turns ciphertext 16 to plaintext G. You will have to find one that makes the rest of
the message make sense.)
So, I know that 16^x can not be congruent to 7 modulo 29, and if we assume A=D, we have to test various exponents such that the intercepted message reads Good Guess.
- If you know that plaintext AT is ciphertext JK, and plaintext SM goes to ciphertext CU, find the deciphering matrix.
So, I already found that b=21 and d=6 by doing matrices. But,I'm not sure how to proceed.
- The following is a message encoded with a monographic cipher. What is the decoded message? CBAEB CCADD CCCAC AEBEE CCAEE BCACB DCBBC CDEAC CCCBC BECCD DCDBE ECBDC CCDBC ABEAC CCCBA EEBCB ECDCB EAEEB DACCC CDBDC BEEEA EBCDB CEDCA CDDEB CBBCD CDBCB DCAEE BDACC EBACC CEBCA DCDBE BBBCD CCEDA EEBDB EDCCE BCBEB CABEE DEDCC CACAC EBECD EDACE CDECB EBDBE BCDEC CABCC AAAAA
For this one, I actually have no idea, because I'm not entirely sure what the deciphering key is.
- Assume that in an RSA system to two primes are 607 and 439, whose product is 266473. Let the enciphering key be e = 205. Encipher the message HELLO. Then find the deciphering key. Note that since you can use three-character groups, you will have to pad: HEL LO? Use S as the padding character.
So, I found that the cipher text is 068660 196630, but now I'm not sure how to find the deciphering key.
number-theory elementary-number-theory cryptography
- If p = 29, you intercept the message 16 10 10 09 16 02 22 21 21. Try to break the code and read the message, given that ciphertext 16 is plaintext G. (Note: there is more than one possible exponent that turns ciphertext 16 to plaintext G. You will have to find one that makes the rest of
the message make sense.)
So, I know that 16^x can not be congruent to 7 modulo 29, and if we assume A=D, we have to test various exponents such that the intercepted message reads Good Guess.
- If you know that plaintext AT is ciphertext JK, and plaintext SM goes to ciphertext CU, find the deciphering matrix.
So, I already found that b=21 and d=6 by doing matrices. But,I'm not sure how to proceed.
- The following is a message encoded with a monographic cipher. What is the decoded message? CBAEB CCADD CCCAC AEBEE CCAEE BCACB DCBBC CDEAC CCCBC BECCD DCDBE ECBDC CCDBC ABEAC CCCBA EEBCB ECDCB EAEEB DACCC CDBDC BEEEA EBCDB CEDCA CDDEB CBBCD CDBCB DCAEE BDACC EBACC CEBCA DCDBE BBBCD CCEDA EEBDB EDCCE BCBEB CABEE DEDCC CACAC EBECD EDACE CDECB EBDBE BCDEC CABCC AAAAA
For this one, I actually have no idea, because I'm not entirely sure what the deciphering key is.
- Assume that in an RSA system to two primes are 607 and 439, whose product is 266473. Let the enciphering key be e = 205. Encipher the message HELLO. Then find the deciphering key. Note that since you can use three-character groups, you will have to pad: HEL LO? Use S as the padding character.
So, I found that the cipher text is 068660 196630, but now I'm not sure how to find the deciphering key.
number-theory elementary-number-theory cryptography
number-theory elementary-number-theory cryptography
asked Nov 22 at 20:04
jsiss
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
I wrote a small Python program trying all $16^x pmod {29}$ and found that $x=3,10,17,24$ all give rise to result $7$ which corresponds to 'g' (as 'a' = 1 etc, we must work in the units modulo $29$, i.e. all nonzero elements.
The first one $x=3$ already gives $10^3 equiv 14 pmod{29}$, so 'n' which is wrong.
Trying the other options gave me $d=17$ as the decryption exponent, and we get 'goodguess' as the solution.
is for Hill, I suppose? What is $p$ and the encoding? It's just linear algebra after that.
Maybe is a digraphic system? So two letters ciphertext from A-E corresponds to 1 plain letter? A square with A-E on the sides, or encoding letters (minus q maybe) as pairs $(0,0)$ to $(4,4)$ and and applying a Hill mod 5? Guess an encoding of letters and try it out!
Oh no a bad RSA again...(
begin{rant}
why don't they teach proper padding in schools nowadays and why do they use weird encodings and non-random encryption and all sorts of bad habitsend{rant}
).
HEL is encoded as 080512 which is $< n$ at least?
It seems so as then I do get 68660 as the ciphertext, as you do...
LOS becomes 121519 which does become 196630 in the ciphertext (which cannot be encoded as letters).
To find $d$ compute $phi(n)=(p-1)(q-1)$ and find the inverse of $e$ modulo $phi(n)$ using the extended Euclidean algorithm.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I wrote a small Python program trying all $16^x pmod {29}$ and found that $x=3,10,17,24$ all give rise to result $7$ which corresponds to 'g' (as 'a' = 1 etc, we must work in the units modulo $29$, i.e. all nonzero elements.
The first one $x=3$ already gives $10^3 equiv 14 pmod{29}$, so 'n' which is wrong.
Trying the other options gave me $d=17$ as the decryption exponent, and we get 'goodguess' as the solution.
is for Hill, I suppose? What is $p$ and the encoding? It's just linear algebra after that.
Maybe is a digraphic system? So two letters ciphertext from A-E corresponds to 1 plain letter? A square with A-E on the sides, or encoding letters (minus q maybe) as pairs $(0,0)$ to $(4,4)$ and and applying a Hill mod 5? Guess an encoding of letters and try it out!
Oh no a bad RSA again...(
begin{rant}
why don't they teach proper padding in schools nowadays and why do they use weird encodings and non-random encryption and all sorts of bad habitsend{rant}
).
HEL is encoded as 080512 which is $< n$ at least?
It seems so as then I do get 68660 as the ciphertext, as you do...
LOS becomes 121519 which does become 196630 in the ciphertext (which cannot be encoded as letters).
To find $d$ compute $phi(n)=(p-1)(q-1)$ and find the inverse of $e$ modulo $phi(n)$ using the extended Euclidean algorithm.
add a comment |
up vote
0
down vote
I wrote a small Python program trying all $16^x pmod {29}$ and found that $x=3,10,17,24$ all give rise to result $7$ which corresponds to 'g' (as 'a' = 1 etc, we must work in the units modulo $29$, i.e. all nonzero elements.
The first one $x=3$ already gives $10^3 equiv 14 pmod{29}$, so 'n' which is wrong.
Trying the other options gave me $d=17$ as the decryption exponent, and we get 'goodguess' as the solution.
is for Hill, I suppose? What is $p$ and the encoding? It's just linear algebra after that.
Maybe is a digraphic system? So two letters ciphertext from A-E corresponds to 1 plain letter? A square with A-E on the sides, or encoding letters (minus q maybe) as pairs $(0,0)$ to $(4,4)$ and and applying a Hill mod 5? Guess an encoding of letters and try it out!
Oh no a bad RSA again...(
begin{rant}
why don't they teach proper padding in schools nowadays and why do they use weird encodings and non-random encryption and all sorts of bad habitsend{rant}
).
HEL is encoded as 080512 which is $< n$ at least?
It seems so as then I do get 68660 as the ciphertext, as you do...
LOS becomes 121519 which does become 196630 in the ciphertext (which cannot be encoded as letters).
To find $d$ compute $phi(n)=(p-1)(q-1)$ and find the inverse of $e$ modulo $phi(n)$ using the extended Euclidean algorithm.
add a comment |
up vote
0
down vote
up vote
0
down vote
I wrote a small Python program trying all $16^x pmod {29}$ and found that $x=3,10,17,24$ all give rise to result $7$ which corresponds to 'g' (as 'a' = 1 etc, we must work in the units modulo $29$, i.e. all nonzero elements.
The first one $x=3$ already gives $10^3 equiv 14 pmod{29}$, so 'n' which is wrong.
Trying the other options gave me $d=17$ as the decryption exponent, and we get 'goodguess' as the solution.
is for Hill, I suppose? What is $p$ and the encoding? It's just linear algebra after that.
Maybe is a digraphic system? So two letters ciphertext from A-E corresponds to 1 plain letter? A square with A-E on the sides, or encoding letters (minus q maybe) as pairs $(0,0)$ to $(4,4)$ and and applying a Hill mod 5? Guess an encoding of letters and try it out!
Oh no a bad RSA again...(
begin{rant}
why don't they teach proper padding in schools nowadays and why do they use weird encodings and non-random encryption and all sorts of bad habitsend{rant}
).
HEL is encoded as 080512 which is $< n$ at least?
It seems so as then I do get 68660 as the ciphertext, as you do...
LOS becomes 121519 which does become 196630 in the ciphertext (which cannot be encoded as letters).
To find $d$ compute $phi(n)=(p-1)(q-1)$ and find the inverse of $e$ modulo $phi(n)$ using the extended Euclidean algorithm.
I wrote a small Python program trying all $16^x pmod {29}$ and found that $x=3,10,17,24$ all give rise to result $7$ which corresponds to 'g' (as 'a' = 1 etc, we must work in the units modulo $29$, i.e. all nonzero elements.
The first one $x=3$ already gives $10^3 equiv 14 pmod{29}$, so 'n' which is wrong.
Trying the other options gave me $d=17$ as the decryption exponent, and we get 'goodguess' as the solution.
is for Hill, I suppose? What is $p$ and the encoding? It's just linear algebra after that.
Maybe is a digraphic system? So two letters ciphertext from A-E corresponds to 1 plain letter? A square with A-E on the sides, or encoding letters (minus q maybe) as pairs $(0,0)$ to $(4,4)$ and and applying a Hill mod 5? Guess an encoding of letters and try it out!
Oh no a bad RSA again...(
begin{rant}
why don't they teach proper padding in schools nowadays and why do they use weird encodings and non-random encryption and all sorts of bad habitsend{rant}
).
HEL is encoded as 080512 which is $< n$ at least?
It seems so as then I do get 68660 as the ciphertext, as you do...
LOS becomes 121519 which does become 196630 in the ciphertext (which cannot be encoded as letters).
To find $d$ compute $phi(n)=(p-1)(q-1)$ and find the inverse of $e$ modulo $phi(n)$ using the extended Euclidean algorithm.
edited Nov 25 at 14:18
answered Nov 22 at 23:03
Henno Brandsma
102k345109
102k345109
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3009586%2fhill-cipher-and-exponential-cipher-questions%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown