0
$\begingroup$

So for a project at University I wrote a symmetric encryption system that was very similar to how a rubix cube would work. I had each byte of my data mapped to a element in a grid, with 6 grids in total (forming a cube), and the grids had a relationship where you could apply a swap function to each row/column and it would swap the same 4 lines in the grids on the same direction. It could encrypt up to 4 mb of data (64 x 64 grid) at a time and used the set of moves used in the process as the key (face 1 line 27 swap left etc.)

The catch with the system was that I haven't solved a rubix cube myleself... ever. So I managed to create a jumbled mess of my initial data and when I tried to decipher it (doing the opposite direction swap, from last swap to the first) It would remain a jumbled mess.

Due to a busted hard drive I can't show you the code I wrote for it anymore (it was in java) but I intended to try and recreate the project in my spare time And I would like to see what I could do to prevent creating a data shredder again.

Help would be greatly appreciated, I will provide additional clarifications if necessary.

EDIT: The question was Is this the correct way to solve a rubix cube (reversing the moves)? and if not what would the correct way be?

The system had more stages to it beyond this transposition stage but they were not made by and therefore worked fine :)

$\endgroup$
2
  • 2
    $\begingroup$ It sounds like this would be nothing more than a transposition cipher - did it do anything other than move bytes around? $\endgroup$
    – Ella Rose
    Feb 14, 2018 at 18:21
  • $\begingroup$ Also you may want to have a look at Keccak / SHA-3. By the sound of some of the ideas are in there as well. $\endgroup$
    – SEJPM
    Feb 14, 2018 at 20:29

1 Answer 1

1
$\begingroup$

Is this the correct way to solve a rubix cube (reversing the moves)?

This isn't really a question about cryptography, and might be better suited for a math or even puzzling stackexchange site.

That being said, while reversing the moves is a way, and is probably the way that you would use to undo the transpositions of your cipher considering you use the ordering of moves as your key, that does not necessarily mean that given an actual Rubik's cube the solution is to invert the moves that shuffled it from the initial position.

If not, what would the correct way be?

There apparently exist optimal algorithms for solving a traditional 3x3x3 cube in 20 steps. These don't appear to assume that you are inverting the steps that shuffled the cube. Your setup may be larger, but that still doesn't bode well for using the shuffling as some kind of cryptographic hardness assumption.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.