[{"data":1,"prerenderedAt":382},["ShallowReactive",2],{"navigation_docs":3,"-ciphers-vigenere":116,"-ciphers-vigenere-surround":377},[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":64,"body":118,"description":370,"extension":371,"links":372,"meta":373,"navigation":374,"path":65,"seo":375,"stem":66,"__hash__":376},"docs\u002F2.ciphers\u002F06.vigenere.md",{"type":119,"value":120,"toc":368},"minimark",[121,125,138,349,359,364],[122,123],"cipher-facts",{"name":124},"vigenere",[126,127,128,129,133,134,137],"p",{},"The keyword repeats under the plaintext and each letter is shifted by the key letter above it, A meaning 0. Only letters advance the key. Spaces and punctuation pass through without eating a key position, which is why ",[130,131,132],"code",{},"\"ATTACK AT DAWN\""," and ",[130,135,136],{},"\"ATTACKATDAWN\""," agree letter for letter. Key is letters only, case doesn't matter.",[139,140,145],"pre",{"className":141,"code":142,"language":143,"meta":144,"style":144},"language-ts shiki shiki-themes github-light github-light poimandres","const vigenere = create(\"vigenere\");\nvigenere.encode(\"ATTACK AT DAWN\", { key: \"LEMON\" }).text; \u002F\u002F \"LXFOPV EF RNHR\"\nvigenere.encode(\"ATTACK AT DAWN\", { key: \"LEMON\", stripNonAlpha: true }).text; \u002F\u002F \"LXFOPVEFRNHR\"\nvigenere.decode(\"LXFOPV EF RNHR\", { key: \"LEMON\" }).text; \u002F\u002F \"ATTACK AT DAWN\"\nvigenere.encode(\"HELLO\"); \u002F\u002F throws MissingOptionError: key\n","ts","",[130,146,147,183,235,285,325],{"__ignoreMap":144},[148,149,152,156,160,163,167,171,175,178,180],"span",{"class":150,"line":151},"line",1,[148,153,155],{"class":154},"s1TYA","const",[148,157,159],{"class":158},"saoiD"," vigenere",[148,161,162],{"class":154}," =",[148,164,166],{"class":165},"sULi6"," create",[148,168,170],{"class":169},"sKlNE","(",[148,172,174],{"class":173},"scVjq","\"",[148,176,124],{"class":177},"sQ7BG",[148,179,174],{"class":173},[148,181,182],{"class":169},");\n",[148,184,186,189,192,195,197,199,202,204,207,211,214,217,220,222,225,228,231],{"class":150,"line":185},2,[148,187,124],{"class":188},"spVlQ",[148,190,191],{"class":169},".",[148,193,194],{"class":165},"encode",[148,196,170],{"class":169},[148,198,174],{"class":173},[148,200,201],{"class":177},"ATTACK AT DAWN",[148,203,174],{"class":173},[148,205,206],{"class":169},", {",[148,208,210],{"class":209},"snHMy"," key",[148,212,213],{"class":169},":",[148,215,216],{"class":173}," \"",[148,218,219],{"class":177},"LEMON",[148,221,174],{"class":173},[148,223,224],{"class":169}," }).",[148,226,227],{"class":188},"text",[148,229,230],{"class":169},"; ",[148,232,234],{"class":233},"sjhu3","\u002F\u002F \"LXFOPV EF RNHR\"\n",[148,236,238,240,242,244,246,248,250,252,254,256,258,260,262,264,267,270,272,276,278,280,282],{"class":150,"line":237},3,[148,239,124],{"class":188},[148,241,191],{"class":169},[148,243,194],{"class":165},[148,245,170],{"class":169},[148,247,174],{"class":173},[148,249,201],{"class":177},[148,251,174],{"class":173},[148,253,206],{"class":169},[148,255,210],{"class":209},[148,257,213],{"class":169},[148,259,216],{"class":173},[148,261,219],{"class":177},[148,263,174],{"class":173},[148,265,266],{"class":169},",",[148,268,269],{"class":209}," stripNonAlpha",[148,271,213],{"class":169},[148,273,275],{"class":274},"siHFe"," true",[148,277,224],{"class":169},[148,279,227],{"class":188},[148,281,230],{"class":169},[148,283,284],{"class":233},"\u002F\u002F \"LXFOPVEFRNHR\"\n",[148,286,288,290,292,295,297,299,302,304,306,308,310,312,314,316,318,320,322],{"class":150,"line":287},4,[148,289,124],{"class":188},[148,291,191],{"class":169},[148,293,294],{"class":165},"decode",[148,296,170],{"class":169},[148,298,174],{"class":173},[148,300,301],{"class":177},"LXFOPV EF RNHR",[148,303,174],{"class":173},[148,305,206],{"class":169},[148,307,210],{"class":209},[148,309,213],{"class":169},[148,311,216],{"class":173},[148,313,219],{"class":177},[148,315,174],{"class":173},[148,317,224],{"class":169},[148,319,227],{"class":188},[148,321,230],{"class":169},[148,323,324],{"class":233},"\u002F\u002F \"ATTACK AT DAWN\"\n",[148,326,328,330,332,334,336,338,341,343,346],{"class":150,"line":327},5,[148,329,124],{"class":188},[148,331,191],{"class":169},[148,333,194],{"class":165},[148,335,170],{"class":169},[148,337,174],{"class":173},[148,339,340],{"class":177},"HELLO",[148,342,174],{"class":173},[148,344,345],{"class":169},"); ",[148,347,348],{"class":233},"\u002F\u002F throws MissingOptionError: key\n",[126,350,351,352,358],{},"Keyspace is 26 to the key length, which sounds like a lot until you notice that every n-th letter is a plain Caesar. So the attack is finding the period. ",[353,354,355],"a",{"href":17},[130,356,357],{},"analyzeFrequency"," on the whole text gives an IC near 0.038; on every fifth letter of the LEMON example it climbs back toward English.",[126,360,361,363],{},[353,362,68],{"href":69}," is a Vigenère whose key is the alphabet itself.",[365,366,367],"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 pre.shiki code .siHFe, html code.shiki .siHFe{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#5DE4C7}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":144,"searchDepth":185,"depth":185,"links":369},[],"A keyword picks a different Caesar shift for each letter. Keyspace 26 to the key length, weakness is the period.","md",null,{},true,{"title":64,"description":370},"QGgJjXS_pEhFMR592-tZckdZFkYM5MH3Yh2VuTAZUIY",[378,380],{"title":60,"path":61,"stem":62,"description":379,"children":-1},"E(x) = (a·x + b) mod 26. The multiplier must be coprime with 26, which leaves twelve of them and 312 keys.",{"title":68,"path":69,"stem":70,"description":381,"children":-1},"A progressive shift. 0 for the first letter, 1 for the second, 2 for the third. No key, one fixed mapping.",1788614951661]