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}


Here are some examples of configurations obtained during the challenge.

  • The default solved cube
  • The default cube after permutation UU
  • The default cube after permutation LL
  • An example of challenger public key L1026U121L^{1026} \circ U^{121}
  • An example of admin public key


To react to this blog post please check the Twitter thread.

Twitter | GitHub | RSS

You may also like

GoogleCTF 2017 - Rubik write-up
Back online: lessons learned from recovering my website after a data center fire
Lessons learned from stracing a password manager in Docker
Pitfalls of PDF parsing and guidelines for file formats
And 20 more posts on this blog!