[{"data":1,"prerenderedAt":293},["ShallowReactive",2],{"navigation_docs":3,"-ciphers-block":212,"-ciphers-block-surround":288},[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-lucide-book-open",{"title":37,"path":38,"stem":39,"children":40,"icon":211},"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,115,119,123,127,131,135,139,143,147,151,155,159,163,167,171,175,179,183,187,191,195,199,203,207],{"title":42,"path":38,"stem":39},"Overview",{"title":44,"path":45,"stem":46},"Classical","\u002Fciphers\u002Fclassical","2.ciphers\u002F01.classical",{"title":48,"path":49,"stem":50},"Caesar","\u002Fciphers\u002Fcaesar","2.ciphers\u002F02.caesar",{"title":52,"path":53,"stem":54},"ROT-13","\u002Fciphers\u002Frot13","2.ciphers\u002F03.rot13",{"title":56,"path":57,"stem":58},"ROT-47","\u002Fciphers\u002Frot47","2.ciphers\u002F04.rot47",{"title":60,"path":61,"stem":62},"Atbash","\u002Fciphers\u002Fatbash","2.ciphers\u002F05.atbash",{"title":64,"path":65,"stem":66},"Affine","\u002Fciphers\u002Faffine","2.ciphers\u002F06.affine",{"title":68,"path":69,"stem":70},"Vigenère","\u002Fciphers\u002Fvigenere","2.ciphers\u002F07.vigenere",{"title":72,"path":73,"stem":74},"Beaufort","\u002Fciphers\u002Fbeaufort","2.ciphers\u002F08.beaufort",{"title":76,"path":77,"stem":78},"Autokey","\u002Fciphers\u002Fautokey","2.ciphers\u002F09.autokey",{"title":80,"path":81,"stem":82},"Trithemius","\u002Fciphers\u002Ftrithemius","2.ciphers\u002F10.trithemius",{"title":84,"path":85,"stem":86},"Alberti","\u002Fciphers\u002Falberti","2.ciphers\u002F11.alberti",{"title":88,"path":89,"stem":90},"Playfair","\u002Fciphers\u002Fplayfair","2.ciphers\u002F12.playfair",{"title":92,"path":93,"stem":94},"Polybius square","\u002Fciphers\u002Fpolybius","2.ciphers\u002F13.polybius",{"title":96,"path":97,"stem":98},"Morse code","\u002Fciphers\u002Fmorse","2.ciphers\u002F14.morse",{"title":100,"path":101,"stem":102},"Bacon's cipher","\u002Fciphers\u002Fbacon","2.ciphers\u002F15.bacon",{"title":104,"path":105,"stem":106},"Tap code","\u002Fciphers\u002Ftap-code","2.ciphers\u002F16.tap-code",{"title":108,"path":109,"stem":110},"ADFGVX","\u002Fciphers\u002Fadfgvx","2.ciphers\u002F17.adfgvx",{"title":112,"path":113,"stem":114},"Bifid","\u002Fciphers\u002Fbifid","2.ciphers\u002F18.bifid",{"title":116,"path":117,"stem":118},"Rail fence","\u002Fciphers\u002Frail-fence","2.ciphers\u002F19.rail-fence",{"title":120,"path":121,"stem":122},"Columnar transposition","\u002Fciphers\u002Fcolumnar","2.ciphers\u002F20.columnar",{"title":124,"path":125,"stem":126},"Enigma M3","\u002Fciphers\u002Fenigma","2.ciphers\u002F21.enigma",{"title":128,"path":129,"stem":130},"Block","\u002Fciphers\u002Fblock","2.ciphers\u002F22.block",{"title":132,"path":133,"stem":134},"AES (ECB)","\u002Fciphers\u002Faes","2.ciphers\u002F23.aes",{"title":136,"path":137,"stem":138},"AES (CBC)","\u002Fciphers\u002Faes-cbc","2.ciphers\u002F24.aes-cbc",{"title":140,"path":141,"stem":142},"AES (CFB)","\u002Fciphers\u002Faes-cfb","2.ciphers\u002F25.aes-cfb",{"title":144,"path":145,"stem":146},"AES (OFB)","\u002Fciphers\u002Faes-ofb","2.ciphers\u002F26.aes-ofb",{"title":148,"path":149,"stem":150},"AES (CTR)","\u002Fciphers\u002Faes-ctr","2.ciphers\u002F27.aes-ctr",{"title":152,"path":153,"stem":154},"AES (CCM)","\u002Fciphers\u002Faes-ccm","2.ciphers\u002F28.aes-ccm",{"title":156,"path":157,"stem":158},"AES (OCB)","\u002Fciphers\u002Faes-ocb","2.ciphers\u002F29.aes-ocb",{"title":160,"path":161,"stem":162},"AES (LRW)","\u002Fciphers\u002Faes-lrw","2.ciphers\u002F30.aes-lrw",{"title":164,"path":165,"stem":166},"AES (XTS)","\u002Fciphers\u002Faes-xts","2.ciphers\u002F31.aes-xts",{"title":168,"path":169,"stem":170},"AES (CBC-MAC)","\u002Fciphers\u002Faes-cbc-mac","2.ciphers\u002F32.aes-cbc-mac",{"title":172,"path":173,"stem":174},"Rijndael (ECB)","\u002Fciphers\u002Frijndael","2.ciphers\u002F33.rijndael",{"title":176,"path":177,"stem":178},"DES (ECB)","\u002Fciphers\u002Fdes","2.ciphers\u002F34.des",{"title":180,"path":181,"stem":182},"DESX (ECB)","\u002Fciphers\u002Fdesx","2.ciphers\u002F35.desx",{"title":184,"path":185,"stem":186},"Triple DES (ECB)","\u002Fciphers\u002Ftriple-des","2.ciphers\u002F36.triple-des",{"title":188,"path":189,"stem":190},"Triple DES (CBC)","\u002Fciphers\u002Ftriple-des-cbc","2.ciphers\u002F37.triple-des-cbc",{"title":192,"path":193,"stem":194},"Blowfish (ECB)","\u002Fciphers\u002Fblowfish","2.ciphers\u002F38.blowfish",{"title":196,"path":197,"stem":198},"IDEA (ECB)","\u002Fciphers\u002Fidea","2.ciphers\u002F39.idea",{"title":200,"path":201,"stem":202},"Lucifer (ECB)","\u002Fciphers\u002Flucifer","2.ciphers\u002F40.lucifer",{"title":204,"path":205,"stem":206},"MARS (ECB)","\u002Fciphers\u002Fmars","2.ciphers\u002F41.mars",{"title":208,"path":209,"stem":210},"Serpent (ECB)","\u002Fciphers\u002Fserpent","2.ciphers\u002F42.serpent","i-lucide-library",{"id":213,"title":214,"body":215,"description":280,"extension":281,"links":282,"meta":283,"navigation":285,"path":129,"seo":286,"stem":130,"__hash__":287},"docs\u002F2.ciphers\u002F22.block.md","Block ciphers",{"type":216,"value":217,"toc":274},"minimark",[218,222,226,231,255,259],[219,220,221],"p",{},"The half with rounds, S-boxes and key schedules. These take the UTF-8 bytes of the whole text and hand back hex, so case, spaces and punctuation are just more bytes. Each one is pinned to published test vectors, from a standard, the original paper or another implementation, and its page says which. They're teaching code though, written to be read and checked, not constant time. Don't guard real data with them, use your platform's crypto for that.",[223,224],"cipher-roster",{"category":225},"block",[227,228,230],"h2",{"id":229},"conventions-they-share","Conventions they share",[232,233,234,238,241,244],"ul",{},[235,236,237],"li",{},"The key is hex, and so is every IV, nonce and tweak. Lengths are checked before the first block.",[235,239,240],{},"ECB, CBC and the MAC pad with PKCS#7. CFB, OFB, CTR, CCM, OCB and XTS need no padding, the ciphertext has as many bytes as the text. CBC-MAC pads with zeros for the tag and returns the text bytes as they are.",[235,242,243],{},"CCM, OCB and CBC-MAC append a tag. Decoding with a wrong one throws, and no plaintext comes back at all.",[235,245,246,250,251,254],{},[247,248,249],"code",{},"preserveCase"," and ",[247,252,253],{},"stripNonAlpha"," don't apply. There are no letters here, only bytes.",[227,256,258],{"id":257},"families","Families",[219,260,261,265,266,269,270,273],{},[262,263,264],"strong",{},"Substitution-permutation"," is rounds of byte substitution and mixing under a key: AES in every mode here, Rijndael with its wider blocks, and Serpent, which runs its 4-bit S-boxes bitslice. ",[262,267,268],{},"Feistel"," splits the block in half and runs one half through a keyed function into the other, round after round. DES, DESX and Triple DES build on it, Blowfish grows its S-boxes from the key and pi, Lucifer is the IBM cipher DES was cut down from, and in MARS one of four words drives the other three each round. ",[262,271,272],{},"Lai-Massey"," splits the block too, but feeds the difference of the two halves through a keyed function and XORs the result into both. Its only member is IDEA, which gets by without a single table.",{"title":275,"searchDepth":276,"depth":276,"links":277},"",2,[278,279],{"id":229,"depth":276,"text":230},{"id":257,"depth":276,"text":258},"DES to Serpent. UTF-8 bytes in and hex out. Published vectors pin every cipher and every mode.","md",null,{"icon":284},"i-lucide-blocks",{"title":128},{"title":214,"description":280},"WXhNreNEWMgwLRP0Y-8WVBkYa2qjKR27A9CUape6e_c",[289,291],{"title":124,"path":125,"stem":126,"description":290,"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.",{"title":132,"path":133,"stem":134,"description":292,"children":-1},"The standard block cipher in its simplest mode. UTF-8 text in, hex out, and every 16-byte block encrypted on its own, so repeats show through.",1790526442772]