Encryption using matrix transformations












1














I have been thinking lately about a block cipher which takes a block of bits and arranges them in a square matrix. Then defining transforms on submatrices of the square matrix to scramble the bits. The key would be a sequence of bits, which identify specific transformations to apply to the submatrices. To unscramble the block simply reverse the order in which you execute the inverse of the transformations. Has anyone else done any research along these lines?



For example:
Given a matrix of 100 x 100 bits. Divide the matrix into overlapping submatrices.



Define the following operation codes:




  • 00 - rotate each sub-matrix clockwise by 90 degrees.

  • 01 - flip each sub-matrix about it's left to right downward sloping diagonal.

  • 10 - flip each sub-matrix about it's let to right upward sloping diagonal.

  • 11 - rotate each sub-matrix counterclockwise by 90 degrees.


Thus a 1024 bit random number would be a mini program for executing these transformations. Each transformation is invertible and the sequence could be processed in reverse order.



In many ways, it is like scrambling a Rubic's cube. And I know that there are algorithmic solutions for solving Rubic's cubes. But if you don't know the colors of each square I wonder if such algorithms would be much help.



I know that such an algorithm might be more memory intensive and possibly much slower than existing encryption algorithms, but if high throughput were not a primary consideration could such a cipher be deemed secure?










share|improve this question









New contributor




Megaladon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    And the Rubic cube distance is 19. That is scramble as many times as possible, there is always a path with 19 movements to go back the beginning.
    – kelalaka
    Dec 28 at 20:21












  • Sounds similar to this question/design
    – Ella Rose
    Dec 28 at 22:40
















1














I have been thinking lately about a block cipher which takes a block of bits and arranges them in a square matrix. Then defining transforms on submatrices of the square matrix to scramble the bits. The key would be a sequence of bits, which identify specific transformations to apply to the submatrices. To unscramble the block simply reverse the order in which you execute the inverse of the transformations. Has anyone else done any research along these lines?



For example:
Given a matrix of 100 x 100 bits. Divide the matrix into overlapping submatrices.



Define the following operation codes:




  • 00 - rotate each sub-matrix clockwise by 90 degrees.

  • 01 - flip each sub-matrix about it's left to right downward sloping diagonal.

  • 10 - flip each sub-matrix about it's let to right upward sloping diagonal.

  • 11 - rotate each sub-matrix counterclockwise by 90 degrees.


Thus a 1024 bit random number would be a mini program for executing these transformations. Each transformation is invertible and the sequence could be processed in reverse order.



In many ways, it is like scrambling a Rubic's cube. And I know that there are algorithmic solutions for solving Rubic's cubes. But if you don't know the colors of each square I wonder if such algorithms would be much help.



I know that such an algorithm might be more memory intensive and possibly much slower than existing encryption algorithms, but if high throughput were not a primary consideration could such a cipher be deemed secure?










share|improve this question









New contributor




Megaladon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    And the Rubic cube distance is 19. That is scramble as many times as possible, there is always a path with 19 movements to go back the beginning.
    – kelalaka
    Dec 28 at 20:21












  • Sounds similar to this question/design
    – Ella Rose
    Dec 28 at 22:40














1












1








1







I have been thinking lately about a block cipher which takes a block of bits and arranges them in a square matrix. Then defining transforms on submatrices of the square matrix to scramble the bits. The key would be a sequence of bits, which identify specific transformations to apply to the submatrices. To unscramble the block simply reverse the order in which you execute the inverse of the transformations. Has anyone else done any research along these lines?



For example:
Given a matrix of 100 x 100 bits. Divide the matrix into overlapping submatrices.



Define the following operation codes:




  • 00 - rotate each sub-matrix clockwise by 90 degrees.

  • 01 - flip each sub-matrix about it's left to right downward sloping diagonal.

  • 10 - flip each sub-matrix about it's let to right upward sloping diagonal.

  • 11 - rotate each sub-matrix counterclockwise by 90 degrees.


Thus a 1024 bit random number would be a mini program for executing these transformations. Each transformation is invertible and the sequence could be processed in reverse order.



In many ways, it is like scrambling a Rubic's cube. And I know that there are algorithmic solutions for solving Rubic's cubes. But if you don't know the colors of each square I wonder if such algorithms would be much help.



I know that such an algorithm might be more memory intensive and possibly much slower than existing encryption algorithms, but if high throughput were not a primary consideration could such a cipher be deemed secure?










share|improve this question









New contributor




Megaladon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have been thinking lately about a block cipher which takes a block of bits and arranges them in a square matrix. Then defining transforms on submatrices of the square matrix to scramble the bits. The key would be a sequence of bits, which identify specific transformations to apply to the submatrices. To unscramble the block simply reverse the order in which you execute the inverse of the transformations. Has anyone else done any research along these lines?



For example:
Given a matrix of 100 x 100 bits. Divide the matrix into overlapping submatrices.



Define the following operation codes:




  • 00 - rotate each sub-matrix clockwise by 90 degrees.

  • 01 - flip each sub-matrix about it's left to right downward sloping diagonal.

  • 10 - flip each sub-matrix about it's let to right upward sloping diagonal.

  • 11 - rotate each sub-matrix counterclockwise by 90 degrees.


Thus a 1024 bit random number would be a mini program for executing these transformations. Each transformation is invertible and the sequence could be processed in reverse order.



In many ways, it is like scrambling a Rubic's cube. And I know that there are algorithmic solutions for solving Rubic's cubes. But if you don't know the colors of each square I wonder if such algorithms would be much help.



I know that such an algorithm might be more memory intensive and possibly much slower than existing encryption algorithms, but if high throughput were not a primary consideration could such a cipher be deemed secure?







block-cipher






share|improve this question









New contributor




Megaladon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Megaladon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Dec 28 at 20:23









kelalaka

5,48622040




5,48622040






New contributor




Megaladon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Dec 28 at 20:07









Megaladon

62




62




New contributor




Megaladon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Megaladon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Megaladon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1




    And the Rubic cube distance is 19. That is scramble as many times as possible, there is always a path with 19 movements to go back the beginning.
    – kelalaka
    Dec 28 at 20:21












  • Sounds similar to this question/design
    – Ella Rose
    Dec 28 at 22:40














  • 1




    And the Rubic cube distance is 19. That is scramble as many times as possible, there is always a path with 19 movements to go back the beginning.
    – kelalaka
    Dec 28 at 20:21












  • Sounds similar to this question/design
    – Ella Rose
    Dec 28 at 22:40








1




1




And the Rubic cube distance is 19. That is scramble as many times as possible, there is always a path with 19 movements to go back the beginning.
– kelalaka
Dec 28 at 20:21






And the Rubic cube distance is 19. That is scramble as many times as possible, there is always a path with 19 movements to go back the beginning.
– kelalaka
Dec 28 at 20:21














Sounds similar to this question/design
– Ella Rose
Dec 28 at 22:40




Sounds similar to this question/design
– Ella Rose
Dec 28 at 22:40










1 Answer
1






active

oldest

votes


















4














Unknowingly, you've actually answered your own question in the title.




transformations




Imagine if you put and hold your finger on one of the bits in a test message. Then encrypt. After a long time and possibly some cramp, your finger will have passed through the transformation matrix and out into the cipher text. One bit in and the same bit out, albeit possibly in a different position. You're only transforming the position of the individual bits. This is entirely linear and is called a transposition cipher. Security to cryptanalysis is very low indeed, and breaking one by frequency analysis is demonstrated in https://crypto.stackexchange.com/a/1578/23115.



Contemporary encryptions require other properties such as the following introductory list:-




  • Unbiased output - As only a single bit is transformed, there will be no uniformity of output frequencies. Your message pops out the other side, only bit shifted, with exactly the same biases it had originally.


  • Confusion and diffusion - Each bit should affect the other bits to a degree. Your finger should morph into many, or even non.


  • Constant execution time - Cryptographers make huge effort to ensure that an algorithm flows/executes in constant time. Having major parts of it under control of the key/attacker gives too much away.

  • Some would argue that a 1024 bit key into a 10,000 bit block state may be unnecessarily high. There's some wonderful discussion of the futility of brute forcing large keys at How much would it cost in U.S. dollars to brute force a 256 bit key in a year?


There's quite a lot more to cipher design than my examples, but they give some context to the degree of weakness of design. Sorry. There's a much more comprehensive list that answers What are the qualities of a good block cipher? Begginner, Intermediate, Advanced, Expert?






share|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: "281"
    };
    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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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
    });


    }
    });






    Megaladon is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f66137%2fencryption-using-matrix-transformations%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









    4














    Unknowingly, you've actually answered your own question in the title.




    transformations




    Imagine if you put and hold your finger on one of the bits in a test message. Then encrypt. After a long time and possibly some cramp, your finger will have passed through the transformation matrix and out into the cipher text. One bit in and the same bit out, albeit possibly in a different position. You're only transforming the position of the individual bits. This is entirely linear and is called a transposition cipher. Security to cryptanalysis is very low indeed, and breaking one by frequency analysis is demonstrated in https://crypto.stackexchange.com/a/1578/23115.



    Contemporary encryptions require other properties such as the following introductory list:-




    • Unbiased output - As only a single bit is transformed, there will be no uniformity of output frequencies. Your message pops out the other side, only bit shifted, with exactly the same biases it had originally.


    • Confusion and diffusion - Each bit should affect the other bits to a degree. Your finger should morph into many, or even non.


    • Constant execution time - Cryptographers make huge effort to ensure that an algorithm flows/executes in constant time. Having major parts of it under control of the key/attacker gives too much away.

    • Some would argue that a 1024 bit key into a 10,000 bit block state may be unnecessarily high. There's some wonderful discussion of the futility of brute forcing large keys at How much would it cost in U.S. dollars to brute force a 256 bit key in a year?


    There's quite a lot more to cipher design than my examples, but they give some context to the degree of weakness of design. Sorry. There's a much more comprehensive list that answers What are the qualities of a good block cipher? Begginner, Intermediate, Advanced, Expert?






    share|improve this answer




























      4














      Unknowingly, you've actually answered your own question in the title.




      transformations




      Imagine if you put and hold your finger on one of the bits in a test message. Then encrypt. After a long time and possibly some cramp, your finger will have passed through the transformation matrix and out into the cipher text. One bit in and the same bit out, albeit possibly in a different position. You're only transforming the position of the individual bits. This is entirely linear and is called a transposition cipher. Security to cryptanalysis is very low indeed, and breaking one by frequency analysis is demonstrated in https://crypto.stackexchange.com/a/1578/23115.



      Contemporary encryptions require other properties such as the following introductory list:-




      • Unbiased output - As only a single bit is transformed, there will be no uniformity of output frequencies. Your message pops out the other side, only bit shifted, with exactly the same biases it had originally.


      • Confusion and diffusion - Each bit should affect the other bits to a degree. Your finger should morph into many, or even non.


      • Constant execution time - Cryptographers make huge effort to ensure that an algorithm flows/executes in constant time. Having major parts of it under control of the key/attacker gives too much away.

      • Some would argue that a 1024 bit key into a 10,000 bit block state may be unnecessarily high. There's some wonderful discussion of the futility of brute forcing large keys at How much would it cost in U.S. dollars to brute force a 256 bit key in a year?


      There's quite a lot more to cipher design than my examples, but they give some context to the degree of weakness of design. Sorry. There's a much more comprehensive list that answers What are the qualities of a good block cipher? Begginner, Intermediate, Advanced, Expert?






      share|improve this answer


























        4












        4








        4






        Unknowingly, you've actually answered your own question in the title.




        transformations




        Imagine if you put and hold your finger on one of the bits in a test message. Then encrypt. After a long time and possibly some cramp, your finger will have passed through the transformation matrix and out into the cipher text. One bit in and the same bit out, albeit possibly in a different position. You're only transforming the position of the individual bits. This is entirely linear and is called a transposition cipher. Security to cryptanalysis is very low indeed, and breaking one by frequency analysis is demonstrated in https://crypto.stackexchange.com/a/1578/23115.



        Contemporary encryptions require other properties such as the following introductory list:-




        • Unbiased output - As only a single bit is transformed, there will be no uniformity of output frequencies. Your message pops out the other side, only bit shifted, with exactly the same biases it had originally.


        • Confusion and diffusion - Each bit should affect the other bits to a degree. Your finger should morph into many, or even non.


        • Constant execution time - Cryptographers make huge effort to ensure that an algorithm flows/executes in constant time. Having major parts of it under control of the key/attacker gives too much away.

        • Some would argue that a 1024 bit key into a 10,000 bit block state may be unnecessarily high. There's some wonderful discussion of the futility of brute forcing large keys at How much would it cost in U.S. dollars to brute force a 256 bit key in a year?


        There's quite a lot more to cipher design than my examples, but they give some context to the degree of weakness of design. Sorry. There's a much more comprehensive list that answers What are the qualities of a good block cipher? Begginner, Intermediate, Advanced, Expert?






        share|improve this answer














        Unknowingly, you've actually answered your own question in the title.




        transformations




        Imagine if you put and hold your finger on one of the bits in a test message. Then encrypt. After a long time and possibly some cramp, your finger will have passed through the transformation matrix and out into the cipher text. One bit in and the same bit out, albeit possibly in a different position. You're only transforming the position of the individual bits. This is entirely linear and is called a transposition cipher. Security to cryptanalysis is very low indeed, and breaking one by frequency analysis is demonstrated in https://crypto.stackexchange.com/a/1578/23115.



        Contemporary encryptions require other properties such as the following introductory list:-




        • Unbiased output - As only a single bit is transformed, there will be no uniformity of output frequencies. Your message pops out the other side, only bit shifted, with exactly the same biases it had originally.


        • Confusion and diffusion - Each bit should affect the other bits to a degree. Your finger should morph into many, or even non.


        • Constant execution time - Cryptographers make huge effort to ensure that an algorithm flows/executes in constant time. Having major parts of it under control of the key/attacker gives too much away.

        • Some would argue that a 1024 bit key into a 10,000 bit block state may be unnecessarily high. There's some wonderful discussion of the futility of brute forcing large keys at How much would it cost in U.S. dollars to brute force a 256 bit key in a year?


        There's quite a lot more to cipher design than my examples, but they give some context to the degree of weakness of design. Sorry. There's a much more comprehensive list that answers What are the qualities of a good block cipher? Begginner, Intermediate, Advanced, Expert?







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 28 at 23:05

























        answered Dec 28 at 22:41









        Paul Uszak

        7,04311534




        7,04311534






















            Megaladon is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Megaladon is a new contributor. Be nice, and check out our Code of Conduct.













            Megaladon is a new contributor. Be nice, and check out our Code of Conduct.












            Megaladon is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Cryptography 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%2fcrypto.stackexchange.com%2fquestions%2f66137%2fencryption-using-matrix-transformations%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

            "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

            Alcedinidae

            Origin of the phrase “under your belt”?