A Rubik's cube visualization for GoogleCTF 2017
Last week, Google CTF featured a crypto challenge based on the Rubik’s cube. Part of the challenge was to be able to visualize the cube associated to a list of colors, and identify which color was where on the cube. It took me some time to figure out the exact mapping between the list and the 3D structure, and now that the challenge is over I want to share a simple visualization that I made with three.js. Your browser must support WebGL to display it properly!
I also wrote a more complete write-up here.
Below is an interactive form where you can enter cube configurations, with the same serialization as in the challenge. A configuration consists of 54 colors (for the 54 squares of a Rubik’s cube), each of which must be in the set {W, R, G, B, O, Y} (for white, red, green, blue, orange and yellow).
Input must be 54 letters in the set {W, R, G, B, O, Y}
Rotation
Here are some examples of configurations obtained during the challenge.
- The default solved cube
WWWWWWWWWGGGRRRBBBOOOGGGRRRBBBOOOGGGRRRBBBOOOYYYYYYYYY
- The default cube after permutation
OOOOOOGGGGGRWWWOBBYYYGGRWWWOBBYYYGGRWWWOBBYYYBBBRRRRRR
- The default cube after permutation
WWWWWWOOOOOYGGGWRRBBBOOYGGGWRRBBBOOYGGGWRRBBBRRRYYYYYY
- An example of challenger public key
ORBYOYYGGGGBROWOOYOBYRBGRYWGGYBWYBBRWWGROWROOBRYWRBWWG
- An example of admin public key
GWYROYBBRYGWROGYGBRROGBYBYYRGBWWWOOWRYOWRYBGWGOGWRBBOO
Comments
To react to this blog post please check the Twitter thread.
You may also like