Hill Cipher and Exponential Cipher Questions











up vote
0
down vote

favorite













  1. 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.




  1. 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.




  1. 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.




  1. 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.










share|cite|improve this question


























    up vote
    0
    down vote

    favorite













    1. 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.




    1. 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.




    1. 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.




    1. 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.










    share|cite|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite












      1. 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.




      1. 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.




      1. 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.




      1. 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.










      share|cite|improve this question














      1. 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.




      1. 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.




      1. 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.




      1. 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






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Nov 22 at 20:04









      jsiss

      1




      1






















          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.




          1. is for Hill, I suppose? What is $p$ and the encoding? It's just linear algebra after that.


          2. 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!


          3. 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 habits end{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.






          share|cite|improve this answer























            Your Answer





            StackExchange.ifUsing("editor", function () {
            return StackExchange.using("mathjaxEditing", function () {
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            });
            });
            }, "mathjax-editing");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "69"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            noCode: true, onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            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

























            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.




            1. is for Hill, I suppose? What is $p$ and the encoding? It's just linear algebra after that.


            2. 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!


            3. 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 habits end{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.






            share|cite|improve this answer



























              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.




              1. is for Hill, I suppose? What is $p$ and the encoding? It's just linear algebra after that.


              2. 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!


              3. 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 habits end{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.






              share|cite|improve this answer

























                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.




                1. is for Hill, I suppose? What is $p$ and the encoding? It's just linear algebra after that.


                2. 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!


                3. 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 habits end{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.






                share|cite|improve this answer














                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.




                1. is for Hill, I suppose? What is $p$ and the encoding? It's just linear algebra after that.


                2. 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!


                3. 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 habits end{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.







                share|cite|improve this answer














                share|cite|improve this answer



                share|cite|improve this answer








                edited Nov 25 at 14:18

























                answered Nov 22 at 23:03









                Henno Brandsma

                102k345109




                102k345109






























                    draft saved

                    draft discarded




















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    Wiesbaden

                    Marschland

                    Dieringhausen