30

Consider this scenario:

Alice gets a Rubik's Cube and peels off the colors from each piece. She then writes a small message on one of the faces of the cube and fills the remaining pieces with random letters. Then, she scrambles the pieces in a way that was pre-determined between Alice and Bob. And finally, she ships the cube to Bob.

Can this be considered as encryption, and, if so, how secure can this encryption scheme be?

jwodder
  • 105
  • 2
yasar
  • 417
  • 4
  • 4

2 Answers2

38

Can this be considered as Encryption

If the sequence of necessary moves is treated as the key, yes.

how secure can this encryption scheme be?

First some details about the cube:

  • 6 faces, each with 9 pieces visible each. Because the faces share some pieces, and the immovable cube center is not visible, there are only 26 pieces in total: 6 centers (of faces), 8 corners (each with 3 colored sides), and 12 edges (each with 2 colored sides).
  • The center piece of each face is, like the cube center itself, not movable. If it is "moved", in reality everything else moves.
  • The 8 corner pieces always are corner pieces, independent of any moves. Same goes for the. 12 edge pieces.
  • There are 8! possible position combinations of the 8 corner pieces (naturally). In their position, 7 of the 8 can have 3 possible "rotations", just the last one depends on the others. With this, there are corner $8! \cdot 3^7$ possible corner positions
  • Similarly, 12! combinations of edge pieces are restricted to $\frac{12!}{2}$ by the corner pieces (for details to everything, see Wikipedia).

Now, we have 9 pieces that contain "good" data: 1 face center, 4 edges (each has two more sides with nonsense data), and 4 corners (each 1 more side with nonsense data). The other 17 pieces contain only nonsense data.

If an attacker wants to (bruteforce-)find the center piece with the good data on it, there are 6 possibilities (6 face centers, just turning the whole cube around to find the right one).

Then there are 4 corner pieces where position and orientation matters, and 4 others that don't matter to find the one good-data face. Meaning, $\frac{8!}{4!} \cdot 3^4$ possibilities to try here.

Finally, 4 edge pieces where position and orientation matters, and 8 others that don't matter to find the one good-data face. Meaning, $\frac{12!}{2} \div \frac{8!}{2} \cdot 2^4$

Multiplying...

$6 \cdot \frac{8!}{4!} \cdot 3^4 \cdot \frac{12!}{2} \div \frac{8!}{2} \cdot 2^4 = 155196518400$ or about $2^{37}$

Your key has 37 bit. With todays computer, that's nothing =>
completely insecure

Aside from that ...

  • A "padding" of 45 byte for 9 byte payload is impractical
  • A cube that contains the same symbol multiple times is less secure
  • The scheme isn't protected against things like known-plaintext attacks etc.etc.
  • Properties like the avalanche effect etc., etc. are completely missing
  • Depending on the choice of padding data, just making statistics what symbols exist might be enough to figure the plaintext out
  • ... and many more
Luis Casillas
  • 14,703
  • 2
  • 33
  • 53
deviantfan
  • 1,187
  • 8
  • 16
8

i will defer to deviantfan's judgement on whether this constitutes encryption, but I see no reason to counter his argument. By as to security though...

Brute force in not necessary at all. There's classic permutation, but no substitution is involved. So it's just 3D scrabble and looks like:-

small letters

with small letters ( I didn't spend a great deal of time formatting it but you get the gist), or like this with large letters:-

large letters

The former is fairly trivial as you can see whole words and multiple words. Compared to random letters, some common sense reveals the secret message.

The latter is slightly more difficult as the letters would be permuted individually. The presence or absence of spaces is not really relevant to this answer's premise. Frequency analysis will make short work of decryption. If you look at the details of monogram, bigram and trigram letter frequencies, you'll see that most random combinations are not possible in a language (even if it's Klingon). There are even statistics for whole words. Below is an extract for monograms:-

monogram frequencies

Clearly cubes with a "Q" on them are improbable in constituting a word, but even if then did, you know that the next letter is certainly a "U". Et cetera. The statistical calculations are a little beyond me, but you will easily infer that the message can be extracted much much quicker than brute forcing it. Without knowing the exact term for this level of encryption, I would use Scrabble Junior level.


As a sidebar, one of the most difficult aspects of this encryption might be how to actually convey the permutation sequence /key.

Paul Uszak
  • 15,905
  • 2
  • 32
  • 83