http://qs1969.pair.com?node_id=34937


in reply to Rubix

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.