# Virtual Cubes

Activate JavaScript to see the Virtual Cubes!

### Enigma Rubik's Cube

This is a simplified version of Cryptography Cube with the following new features:
• it uses 26 English letters only
• two letters are paired if there is a continuous path between them, and this path might go across multiple faces
• every letter has a chance to be paired with every other letter (except with itself)
• centers are rotationally symmetric, so there is no need to solve a supercube for initialization

The layout of the Enigma Rubik's Cube was created in 2021 by Stefan Berinde.

See also the Enigma Pocket Cube version.

#### Encryption and decryption

Encryption and decryption is similar to Cryptography Cube. Each letter has an orientation given by the surrounding pentagon. From the initial state we apply a 'key' by displacing each character in the key one quarter turn in the direction indicated by its orientation. The correspondence between a 'plaintext' and a 'ciphertext' character is given by paired letters onto the cube. Furthermore, after each encoding/decoding of a plaintext character, that character must be rotated up one quarter turn (for example) to change the permutation.

Here is a sample text to decode using the above description:
Key: CUBE
Ciphertext: NNQXZ ZMJTY BWFOL DV

This cube can be used as an introductory example to the more complex Cryptography Cube. For short text messages the security offered by this cube will probably suffice.

It can also be used as a test case for cryptanalysis attack algorithms. In this regard we list below some design constraints that can be exploited by such attacks.

#### The parts of the cube

The cube has 8 corners (3 tiles each), 12 edges (2 tiles each) and 6 centers. Centers are used for connection paths only, similar to Cryptography Cube. In addition, connection paths exist on corners and edges. We have 2 types of corners (with 3 letters, and with one letter and a path segment) and 2 types of edges (with 2 letters, and with no letter but a path segment only). Of all 26 letters, 12 are fitted on edges and the rest on corners. This gives half of edges with letters and half with paths. For letters on corners we get a unique solution.

3 (corners) × 3 (letters) + 5 (corners) × 1 (letter) = 14 (letters)

We say two letters are on the same orbit if they can exchange places by using standard cube moves. We have two different orbits, corresponding to letters on edges and letters on corners. Pairing these letters is done via center paths. There are 4 types of centers, opposing ones being mirrored. This choice will make the pairing chances as even as possible among letters. Letters from different orbits are paired by a single center path, but letters on the same orbit will need an additional corner/edge path segment.

Ideally, the probability that any two given letters are paired should be 1/26. Here it varies a bit, depending on the letters, if they are on the same orbit and/or on the same corner/edge. The range of probabilities is between 1/20 and 1/40, excluding pairing a letter with itself, which is not possible.

#### Comparison with the Enigma

The number of distinct states of this cube is about 1015. Enigma machine had 1023 distinct configurations.

Happy encoding!

(The decoded plaintext: THEGR EATER NORUB IK)