[{"data":1,"prerenderedAt":310},["ShallowReactive",2],{"navigation_docs":3,"-ciphers-columnar":116,"-ciphers-columnar-surround":305},[4,36],{"title":5,"path":6,"stem":7,"children":8,"icon":35},"Guide","\u002Fguide","1.guide\u002F01.index",[9,11,15,19,23,27,31],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"Encode and decode","\u002Fguide\u002Ftransform","1.guide\u002F02.transform",{"title":16,"path":17,"stem":18},"Analysis","\u002Fguide\u002Fanalysis","1.guide\u002F03.analysis",{"title":20,"path":21,"stem":22},"CLI","\u002Fguide\u002Fcli","1.guide\u002F04.cli",{"title":24,"path":25,"stem":26},"Agents","\u002Fguide\u002Fagents","1.guide\u002F05.agents",{"title":28,"path":29,"stem":30},"Custom ciphers","\u002Fguide\u002Fcustom","1.guide\u002F06.custom",{"title":32,"path":33,"stem":34},"Playground","\u002Fguide\u002Fplayground","1.guide\u002F07.playground","i-solar-book-2-linear",{"title":37,"path":38,"stem":39,"children":40,"icon":115},"Ciphers","\u002Fciphers","2.ciphers\u002F00.index",[41,43,47,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107,111],{"title":42,"path":38,"stem":39},"Overview",{"title":44,"path":45,"stem":46},"Caesar","\u002Fciphers\u002Fcaesar","2.ciphers\u002F01.caesar",{"title":48,"path":49,"stem":50},"ROT-13","\u002Fciphers\u002Frot13","2.ciphers\u002F02.rot13",{"title":52,"path":53,"stem":54},"ROT-47","\u002Fciphers\u002Frot47","2.ciphers\u002F03.rot47",{"title":56,"path":57,"stem":58},"Atbash","\u002Fciphers\u002Fatbash","2.ciphers\u002F04.atbash",{"title":60,"path":61,"stem":62},"Affine","\u002Fciphers\u002Faffine","2.ciphers\u002F05.affine",{"title":64,"path":65,"stem":66},"Vigenère","\u002Fciphers\u002Fvigenere","2.ciphers\u002F06.vigenere",{"title":68,"path":69,"stem":70},"Trithemius","\u002Fciphers\u002Ftrithemius","2.ciphers\u002F07.trithemius",{"title":72,"path":73,"stem":74},"Alberti","\u002Fciphers\u002Falberti","2.ciphers\u002F08.alberti",{"title":76,"path":77,"stem":78},"Playfair","\u002Fciphers\u002Fplayfair","2.ciphers\u002F09.playfair",{"title":80,"path":81,"stem":82},"Polybius square","\u002Fciphers\u002Fpolybius","2.ciphers\u002F10.polybius",{"title":84,"path":85,"stem":86},"Morse code","\u002Fciphers\u002Fmorse","2.ciphers\u002F11.morse",{"title":88,"path":89,"stem":90},"Bacon's cipher","\u002Fciphers\u002Fbacon","2.ciphers\u002F12.bacon",{"title":92,"path":93,"stem":94},"Tap code","\u002Fciphers\u002Ftap-code","2.ciphers\u002F13.tap-code",{"title":96,"path":97,"stem":98},"ADFGVX","\u002Fciphers\u002Fadfgvx","2.ciphers\u002F14.adfgvx",{"title":100,"path":101,"stem":102},"Bifid","\u002Fciphers\u002Fbifid","2.ciphers\u002F15.bifid",{"title":104,"path":105,"stem":106},"Rail fence","\u002Fciphers\u002Frail-fence","2.ciphers\u002F16.rail-fence",{"title":108,"path":109,"stem":110},"Columnar transposition","\u002Fciphers\u002Fcolumnar","2.ciphers\u002F17.columnar",{"title":112,"path":113,"stem":114},"Enigma M3","\u002Fciphers\u002Fenigma","2.ciphers\u002F18.enigma","i-solar-library-linear",{"id":117,"title":108,"body":118,"description":298,"extension":299,"links":300,"meta":301,"navigation":302,"path":109,"seo":303,"stem":110,"__hash__":304},"docs\u002F2.ciphers\u002F17.columnar.md",{"type":119,"value":120,"toc":296},"minimark",[121,125,142,279,285,292],[122,123],"cipher-facts",{"name":124},"columnar",[126,127,128,129,133,134,137,138,141],"p",{},"The keyword's letters number the columns by alphabetical order, the text fills the grid row by row, and the ciphertext is the columns read in that order. Every character is a cell, spaces too, so ",[130,131,132],"code",{},"decode(encode(x))"," is ",[130,135,136],{},"x"," for any input. ",[130,139,140],{},"key"," is required.",[143,144,149],"pre",{"className":145,"code":146,"language":147,"meta":148,"style":148},"language-ts shiki shiki-themes github-light github-light poimandres","const columnar = create(\"columnar\");\ncolumnar.encode(\"ATTACK AT DAWN\", { key: \"ZEBRA\" }).text; \u002F\u002F \"C TAWT AATNAKD\"\ncolumnar.decode(\"C TAWT AATNAKD\", { key: \"ZEBRA\" }).text; \u002F\u002F \"ATTACK AT DAWN\"\n","ts","",[130,150,151,187,239],{"__ignoreMap":148},[152,153,156,160,164,167,171,175,179,182,184],"span",{"class":154,"line":155},"line",1,[152,157,159],{"class":158},"s1TYA","const",[152,161,163],{"class":162},"saoiD"," columnar",[152,165,166],{"class":158}," =",[152,168,170],{"class":169},"sULi6"," create",[152,172,174],{"class":173},"sKlNE","(",[152,176,178],{"class":177},"scVjq","\"",[152,180,124],{"class":181},"sQ7BG",[152,183,178],{"class":177},[152,185,186],{"class":173},");\n",[152,188,190,193,196,199,201,203,206,208,211,215,218,221,224,226,229,232,235],{"class":154,"line":189},2,[152,191,124],{"class":192},"spVlQ",[152,194,195],{"class":173},".",[152,197,198],{"class":169},"encode",[152,200,174],{"class":173},[152,202,178],{"class":177},[152,204,205],{"class":181},"ATTACK AT DAWN",[152,207,178],{"class":177},[152,209,210],{"class":173},", {",[152,212,214],{"class":213},"snHMy"," key",[152,216,217],{"class":173},":",[152,219,220],{"class":177}," \"",[152,222,223],{"class":181},"ZEBRA",[152,225,178],{"class":177},[152,227,228],{"class":173}," }).",[152,230,231],{"class":192},"text",[152,233,234],{"class":173},"; ",[152,236,238],{"class":237},"sjhu3","\u002F\u002F \"C TAWT AATNAKD\"\n",[152,240,242,244,246,249,251,253,256,258,260,262,264,266,268,270,272,274,276],{"class":154,"line":241},3,[152,243,124],{"class":192},[152,245,195],{"class":173},[152,247,248],{"class":169},"decode",[152,250,174],{"class":173},[152,252,178],{"class":177},[152,254,255],{"class":181},"C TAWT AATNAKD",[152,257,178],{"class":177},[152,259,210],{"class":173},[152,261,214],{"class":213},[152,263,217],{"class":173},[152,265,220],{"class":177},[152,267,223],{"class":181},[152,269,178],{"class":177},[152,271,228],{"class":173},[152,273,231],{"class":192},[152,275,234],{"class":173},[152,277,278],{"class":237},"\u002F\u002F \"ATTACK AT DAWN\"\n",[126,280,281,282,195],{},"Repeated letters in the key are ordered left to right. This is also the second step of the historical ",[283,284,96],"a",{"href":97},[126,286,287,288,291],{},"Columnar is the one cipher with state. The instance keeps an LRU cache of its last 128 answers and a token bucket of 100 calls a second. Call 101 inside one second throws a ",[130,289,290],{},"CipherError"," naming the cipher. A cached answer is free and doesn't count.",[293,294,295],"style",{},"html pre.shiki code .s1TYA, html code.shiki .s1TYA{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#91B4D5}html pre.shiki code .saoiD, html code.shiki .saoiD{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#E4F0FB}html pre.shiki code .sULi6, html code.shiki .sULi6{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#E4F0FBD0}html pre.shiki code .sKlNE, html code.shiki .sKlNE{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#A6ACCD}html pre.shiki code .scVjq, html code.shiki .scVjq{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#A6ACCD}html pre.shiki code .sQ7BG, html code.shiki .sQ7BG{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#5DE4C7}html pre.shiki code .spVlQ, html code.shiki .spVlQ{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E4F0FB}html pre.shiki code .snHMy, html code.shiki .snHMy{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#ADD7FF}html pre.shiki code .sjhu3, html code.shiki .sjhu3{--shiki-light:#6A737D;--shiki-light-font-style:inherit;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#767C9DB0;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":148,"searchDepth":189,"depth":189,"links":297},[],"The text fills rows under a keyword, columns are read out in the keyword's alphabetical order. Whitespace survives the round trip.","md",null,{},true,{"title":108,"description":298},"7eZvDS6LE7VI8JTVT2reZ_xDw5ZHA_pi6Vi0IgoL0ZU",[306,308],{"title":104,"path":105,"stem":106,"description":307,"children":-1},"Write the text in a zigzag over N rails, read the rails one after another. A transposition, so the letters never change.",{"title":112,"path":113,"stem":114,"description":309,"children":-1},"The Wehrmacht machine with rotors I, II, III and reflector B. Rotor positions, ring settings, a plugboard. Reciprocal, so one setting works both ways.",1788614951661]