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 :)