Rating: 3.0

This is only ElGamal cryptosystem on Rubik Cube.

The order of Rubik Cube Group is `43_252_003_274_489_856_000n` and this is small enough to use Pohlig-Hellman.

So the algorithm is simple:

1. get `g, h, c1, c2`.

2. calculate `y = log_g(c1)` using Pohlig-Hellman.

3. get message cube `m = c2.multiply(invert(pow(h,y)))`.

4. from all cubes, recover flag.

But these are on Rubik Cube and `cubejs` is available on JavaScript, so the implementation is harder than usual...

Original writeup (https://gist.github.com/n-ari/7b7162abad7f9d2b05ab17598d6f506c).