First, treat key distribution as a separate problem. If you have to go the route of using a one-time-pad to distribute your keys, you might as well go whole-hog and use a one-time-pad as your cipher. So for designing this cipher, pretend that the good guys have the keys and the bad guys don't. Also assume that the bad guys know how your cipher works.

Along those lines, I'd hazard a guess that Rubix is gonna be a -really- poor cipher, based simply on the mathematics and patterns of the cube. You are going to need -really- long keys to have anything reasonably good.

Second, Note this: You have 6 faces, let's call them "Up", "Down", "Front", "Back", "Left", "Right", for consistancy with weirdos like me who have done a reasonable amount of study of the Cube. Those names can be unambiguously abbreviated U, D, F, B, L, and R. Second, note that an NxNxN cube has N "slices" parallel to each face, which can be labelled 0-9 (for up to 10x10x10 cubes). Then you could use the following convention: For each turn, use a letter indicating the face, and a number indicating the slice. If the letter is uppercase, turn the slice clockwise; lowercase, counterclockwise. Note that every turn can be notated two ways: U1 is equivilant to d2

Using this coding, your example could be coded in one of these four ways: U1R2, U1l1, d2R2, or d2r1.

I would suggest a couple of modifications:

First, instead of using the cube faces, use the cube cells. For a 2x2x2, this would give you 8 cells to use, rather than the 24 you have now, which is cutting down a bunch, but for a 4x4x4, you'd have 64 instead of 56, and it goes up from there. This helps deal with the issue that in your example, the three cells A,R,E are always going to move together, which helps the cryptographer immensely.

Second, add to your basic operations a way of reordering the slices -- say by rotation. Take what was slice U0, and make it slice U9 (or whatever), and renumber accordingly. That way, every cell has an opportunity to go to every other cell -- something which doesn't happen with a normal cube. This could be symbolised by a face letter with no number, like in the sequence U0bu0B, which would perform some scrambling on the upper face (but leave the rest of the cube alone, modulo data augmentation).

I'd also drop the data augmentation, and go with a pure transformation cipher.


In reply to RE: Rubix by BlaisePascal
in thread Rubix by japhy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.