Nerdy creations with numbers, words, sounds, and pixels

Science

Speedcube

Speedcube - encryption method by Anton Hoyer based on the Rubik's Cube

Plaintext

“In secret, I gaze at you, behold something holy. But this time a song won’t do to ground my soul.”

IN SECRET I GAZE AT YOU BEHOLD SOMETHING HOLY BUT THIS TIME A SONG WONT DO TO GROUND MY SOUL

Solved cube

This substitution cipher was inspired by the Rubik’s Cube, a popular 3D combination puzzle. I noticed that it contains a total of 3 × 3 × 3 = 27 subcubes, so I filled them sequentially with all 26 letters of the alphabet and left the centermost subcube for the space character. Every letter or subcube can then be uniquely represented by three of its neighboring subcubes, ignoring their order. For example, JBD, DBJ, and BJD all stand for the letter A. This redundancy makes Speedcube a homophonic cipher. Because the space character has a total of six different neighbors despite only three being needed, it can be represented by many different permutations, such as  VKM, KEV, or ENP.

HQF FWL VKE RVK BFD LBF JUS DHF LWS EVK QFH NEP DHO BDJ WQY BHF NPV BDJ LSW VEP ZVX MPG XRV EMN EKA HFD IPE XMP NCT GEM KPM RKT XMP ODU DFH SWL PGI HQF WLQ HDO PVE PIG GXP TCK XPV PEK AEC VXM WLS KNM LWS PIG FQH RTK PKE WSL HFQ DOJ HDF NMP JDB PMN KRV MPX FQW OHD MKE TZN GMP FWQ LWS VME AEG GXM PKN LWS XPM NKP HOD JUS GPM VRM QWF AGM MPV UJO VXZ PEK KTR XMG RVX CNK

Transformed cube

The encryption becomes even stronger if a key is provided, corresponding to the configuration of an arbitrarily transformed cube. In the below-depicted case of +100+300-020+010+003-001, the cube was transformed six times. For example, +010 represents a counterclockwise rotation of the front-layer around the y-axis.

YDL LYQ MEP KER SHF HJS UQS SHF DWO MKP YDL KME QYB HFO JBW HUS NMV OFH DOW PMK NGV MTA EXR VNK ZKV SFU EMC TAM NXP TVI ENV ERC PAT HWO HFU DWO AEM LYD UYQ QYB MPE EMA TPA PIN GIV KVP VKZ ERN WDO NPE WDO EMA LYD KRC VNM WDO DLY JOH FUS VME HOF PEN KRE PMT LQY BYQ MEV VTZ PTA YLU OWD PMN PTI TAM PMK OWD PTA KEP YBQ SUQ APM ERX YLU TVP KMN OHW NIG PEN EKR PMA XRN PNI

Inherited spaces

I decided not to allow the space character as a valid neighbor. Hence, all spaces can be removed from the ciphertext without any loss of information because one plaintext letter always corresponds to a group of three letters in the ciphertext.

To further distract anyone from deciphering the message, spaces can be randomly inserted to create the appearance of actual words. Or even better, the exact word lengths of an existing text can be utilized to make the ciphertext resemble a legitimate text with realistically distributed spaces. In this case, I used the lyrics of the song “Violence” by pop artist Grimes.

Y DL LYQM EPKERSH FHJ SUQ SSHF
DWOMK PYD LKMEQ YBHFO
JBWHU SNMVO FH
DOWP MKN GVMTAEXR VNKZKVSF
UEMC TAM NXPTVIEN
VER CPAT HWO HFUD W OAE
MLY DUYQ QYB MPEE M ATP
APING IVK VP VK
ZER NWDO NPE WDOEMAL YD KRCVNMW DO DL
Y JO HFUS VMEHOFP ENK REP MTLQ
YBYQM EVV TZPTA YLUOW DPMNP TITA MP
MKOW DPT AKEPYBQS UQAPMERX
YLUT VPK MNOHWNIG
PEN EKRP MAX RNPN I

Faulty decryption

To demonstrate the strength of this encryption method, the key was slightly altered to +100+300-020-010+003-001, now including a clockwise rotation of the front-layer around the y-axis instead of a counterclockwise one. As can be see, even such a small key error results in only gibberish after decryption.

I  I A A Y QHFL BHIN HY S HIJ I A B F L F ONL Y F

If the key is completely unknown (+000), the likelihood of accidental deciphering is very low, given that there are roughly 43 quintillion permutations (or 4.3 · 1019) for the cube.

      BQ BB B     B     

Discussion

By today’s encryption standards, the SpeedCube cipher is rather weak. For example, it could be solved using a decent computer and brute force, i.e., trying all possible transformations of the cube until the output becomes intellegible. Alternatively, a hill climbing attack could be used by systematically testing for transformations that make the deciphered text longer. This is due to many letter triplets having no common neighbor in any given transformation.

Another significant drawback of this encryption method is the length of the ciphertext, which is approximately three times as long as the plaintext. Nevertheless, it retains space characters, is homophonic, and easily visualized due to its geometric nature. However, I strongly advise against using it for unlawful purposes.

← Return to “Cryptology”

← Return to “Science”

Leave a Reply