{"id":8377,"date":"2022-04-01T01:00:05","date_gmt":"2022-04-01T05:00:05","guid":{"rendered":"https:\/\/blogs.mathworks.com\/cleve\/?p=8377"},"modified":"2022-04-01T03:13:50","modified_gmt":"2022-04-01T07:13:50","slug":"the-enigma-qube-merging-an-enigma-machine-and-a-rubiks-cube","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/cleve\/2022\/04\/01\/the-enigma-qube-merging-an-enigma-machine-and-a-rubiks-cube\/","title":{"rendered":"The Enigma Qube, Merging an Enigma Machine and a Rubik&#8217;s Cube"},"content":{"rendered":"<div class=\"content\"><!--introduction--><p>An Enigma Machine combined with a Rubik's Cube makes an encryption device with unprecedented power.<\/p><!--\/introduction--><h3>Contents<\/h3><div><ul><li><a href=\"#030a62ec-8dbd-4fd3-9fd6-ac509be85dea\">Rubik's Cube<\/a><\/li><li><a href=\"#8e257cae-04ee-43fd-96f1-4f55c731900b\">Enigma Machine<\/a><\/li><li><a href=\"#a57ed676-dea1-4283-bf5b-f350d9e0ff22\">Enigma Qube<\/a><\/li><li><a href=\"#6a2da69e-a44b-4791-94da-12fcb5e90d48\">Keyboard<\/a><\/li><li><a href=\"#65fd6f4e-0f03-40e3-a2c9-ced1dcc16b14\">Rotors<\/a><\/li><li><a href=\"#5b9f44d6-16c3-4cdc-9117-4bc49fedd090\">Plugboard<\/a><\/li><li><a href=\"#777a5b2b-84d6-44e6-b4bc-677d165ea49e\">Power<\/a><\/li><\/ul><\/div><h4>Rubik's Cube<a name=\"030a62ec-8dbd-4fd3-9fd6-ac509be85dea\"><\/a><\/h4><p>I have made several posts recently about various cubes, including the <a href=\"https:\/\/blogs.mathworks.com\/cleve\/2022\/02\/13\/rubiks-cube\/\">Rubik's Cube<\/a>.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/Q6.jpg\" alt=\"\"> <\/p><h4>Enigma Machine<a name=\"8e257cae-04ee-43fd-96f1-4f55c731900b\"><\/a><\/h4><p>In 2015, MathWorks' Matt Brauer and several of his colleagues created a  MATLAB simulator of the Enigma Machine -- the World War II German encryption device. See <a href=\"https:\/\/www.mathworks.com\/videos\/the-enigma-machine-and-matlab-107967.html\">this video<\/a> of a talk by Seth Popinchalk at a MathWorks company meeting.<\/p><p>Code for the simulator is available at the <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/51009-enigma\">MATLAB Central File Exchange<\/a>. Here is the simulator keyboard.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/keyboard.jpg\" alt=\"\"> <\/p><p>Here is a complete Enigma machine in a museum.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/Enigma.jpg\" alt=\"\"> <\/p><p>Image credit: Alessandro Nassiri - Museo della Scienza e della Tecnologia.<\/p><h4>Enigma Qube<a name=\"a57ed676-dea1-4283-bf5b-f350d9e0ff22\"><\/a><\/h4><p>I am in the process of combining the Enigma and Rubiks simulators into a single interconnected device -- the Enigma Qube. The Enigma Cube will be an encryption machine that is more powerful than any other device I am aware of.<\/p><h4>Keyboard<a name=\"6a2da69e-a44b-4791-94da-12fcb5e90d48\"><\/a><\/h4><p>The Enigma keyboard generates Rubiks rotations from a modification of Singmaster's alphabet -- F, M, R, T, E, D, F, A, B.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/EQube_fig1.png\" alt=\"\"> <\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/EQube_fig2.png\" alt=\"\"> <\/p><h4>Rotors<a name=\"65fd6f4e-0f03-40e3-a2c9-ced1dcc16b14\"><\/a><\/h4><p>The Enigma rotors are synchronized with Rubiks rotations about the x-axis.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/rotors.jpg\" alt=\"\"> <\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/x_rot.jpg\" alt=\"\"> <\/p><h4>Plugboard<a name=\"5b9f44d6-16c3-4cdc-9117-4bc49fedd090\"><\/a><\/h4><p>And, the Enigma plugboard will be replaced by connections through the interior of the Rubiks cube.  This inner network changes with each Rubiks movement.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/PB.png\" alt=\"\"> <\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/PQ.png\" alt=\"\"> <\/p><h4>Power<a name=\"777a5b2b-84d6-44e6-b4bc-677d165ea49e\"><\/a><\/h4><p>The dimension of the state spaces of the Enigma machine and the Rubiks cube are each about 10^20, so a single Enigma Cube will have roughly 10^40 degrees of freedom.  This is comparable with today's number-theoretic encryption algorithms.  However, the Enigma Cube technology is not threatened by the quantum algorithms that cloud the future of the other modern schemes.<\/p><script language=\"JavaScript\"> <!-- \r\n    function grabCode_573f3208be394fb1976de451af011af2() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='573f3208be394fb1976de451af011af2 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 573f3208be394fb1976de451af011af2';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        copyright = 'Copyright 2022 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n\r\n        d.title = title + ' (MATLAB code)';\r\n        d.close();\r\n    }   \r\n     --> <\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_573f3208be394fb1976de451af011af2()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n      the MATLAB code <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; R2022a<br><\/p><\/div><!--\r\n573f3208be394fb1976de451af011af2 ##### SOURCE BEGIN #####\r\n%% The Enigma Qube, Merging an Enigma Machine and a Rubik's Cube\r\n% An Enigma Machine combined with a Rubik's Cube  \r\n% makes an encryption device with unprecedented power.\r\n\r\n%% Rubik's Cube\r\n% I have made several posts recently about various cubes,\r\n% including the\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2022\/02\/13\/rubiks-cube\/\r\n% Rubik's Cube>.\r\n%\r\n% <<Q6.jpg>>\r\n\r\n%% Enigma Machine\r\n% In 2015, MathWorks' Matt Brauer and several of\r\n% his colleagues created a  MATLAB simulator of the Enigma Machine REPLACE_WITH_DASH_DASH\r\n% the World War II German encryption device. See\r\n% <https:\/\/www.mathworks.com\/videos\/the-enigma-machine-and-matlab-107967.html\r\n% this video> of a talk by Seth Popinchalk at a MathWorks company meeting.\r\n\r\n%%\r\n% Code for the simulator is available at the\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/51009-enigma\r\n% MATLAB Central File Exchange>.\r\n% Here is the simulator keyboard.\r\n%\r\n% <<keyboard.jpg>>\r\n\r\n%%\r\n% Here is a complete Enigma machine in a museum.\r\n%\r\n% <<Enigma.jpg>>\r\n%\r\n% Image credit: Alessandro Nassiri - Museo della Scienza e della Tecnologia.\r\n% \r\n\r\n%% Enigma Qube\r\n% I am in the process of combining the Enigma and Rubiks simulators into\r\n% a single interconnected device REPLACE_WITH_DASH_DASH the Enigma Qube.\r\n% The Enigma Cube will be an encryption machine that is more powerful \r\n% than any other device I am aware of.\r\n\r\n%% Keyboard\r\n% The Enigma keyboard generates Rubiks rotations from a modification of \r\n% Singmaster's alphabet REPLACE_WITH_DASH_DASH F, M, R, T, E, D, F, A, B.\r\n%\r\n% <<EQube_fig1.png>>\r\n%\r\n% <<EQube_fig2.png>>\r\n\r\n%% Rotors \r\n% The Enigma rotors are synchronized with Rubiks rotations about the \r\n% x-axis.\r\n%\r\n% <<rotors.jpg>>\r\n%\r\n% <<x_rot.jpg>>\r\n\r\n%% Plugboard\r\n% And, the Enigma plugboard will be replaced by connections\r\n% through the interior of the Rubiks cube.  This inner network changes\r\n% with each Rubiks movement.\r\n%\r\n% <<PB.png>>\r\n%\r\n% <<PQ.png>>\r\n\r\n%% Power\r\n% The dimension of the state spaces of the Enigma machine and\r\n% the Rubiks cube are each about 10^20, so a single Enigma Cube will have\r\n% roughly 10^40 degrees of freedom.  This is comparable with today's\r\n% number-theoretic encryption algorithms.  However, \r\n% the Enigma Cube technology is not threatened by the quantum algorithms\r\n% that cloud the future of the other modern schemes.\r\n##### SOURCE END ##### 573f3208be394fb1976de451af011af2\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/PQ.png\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div><!--introduction--><p>An Enigma Machine combined with a Rubik's Cube makes an encryption device with unprecedented power.... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/cleve\/2022\/04\/01\/the-enigma-qube-merging-an-enigma-machine-and-a-rubiks-cube\/\">read more >><\/a><\/p>","protected":false},"author":78,"featured_media":8407,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[43,5,39],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/8377"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/users\/78"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/comments?post=8377"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/8377\/revisions"}],"predecessor-version":[{"id":8425,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/8377\/revisions\/8425"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media\/8407"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media?parent=8377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/categories?post=8377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/tags?post=8377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}