[{"data":1,"prerenderedAt":307},["ShallowReactive",2],{"navigation_docs":3,"-ciphers-stream":220,"-ciphers-stream-surround":302},[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":219},"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,211,215],{"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",{"title":212,"path":213,"stem":214},"Stream","\u002Fciphers\u002Fstream","2.ciphers\u002F43.stream",{"title":216,"path":217,"stem":218},"Rabbit","\u002Fciphers\u002Frabbit","2.ciphers\u002F44.rabbit","i-lucide-library",{"id":221,"title":222,"body":223,"description":294,"extension":295,"links":296,"meta":297,"navigation":299,"path":213,"seo":300,"stem":214,"__hash__":301},"docs\u002F2.ciphers\u002F43.stream.md","Stream ciphers",{"type":224,"value":225,"toc":288},"minimark",[226,230,237,241,246,277,281],[227,228,229],"p",{},"No blocks, no padding, no modes. A stream cipher turns the key and the IV into a long run of bytes that look random, the keystream, and XORs it into the text byte by byte. Decrypting is the same XOR again. So the ciphertext is exactly as long as the text, and the whole cipher is really one question: how do you grow good keystream out of a short key?",[227,231,232,236],{},[233,234,235],"a",{"href":149},"AES-CTR",", OFB and CFB answer it with a block cipher inside. The ciphers here answer it on their own, without a block cipher anywhere in sight.",[238,239],"cipher-roster",{"category":240},"stream",[242,243,245],"h2",{"id":244},"conventions-they-share","Conventions they share",[247,248,249,253,261,264,267],"ul",{},[250,251,252],"li",{},"The key is hex, and so is the IV. Lengths are checked before the first byte.",[250,254,255,256,260],{},"Text goes in as UTF-8 and comes out as lowercase hex. ",[257,258,259],"code",{},"decode"," wants hex back, any whole number of bytes.",[250,262,263],{},"Nothing checks integrity. A flipped ciphertext bit flips the same plaintext bit and nobody notices.",[250,265,266],{},"One key and one IV give one keystream. Encrypt two texts with both the same and the XOR of the ciphertexts is the XOR of the texts, no key needed.",[250,268,269,272,273,276],{},[257,270,271],{},"preserveCase"," and ",[257,274,275],{},"stripNonAlpha"," don't apply. Bytes, not letters.",[242,278,280],{"id":279},"families","Families",[227,282,283,287],{},[284,285,286],"strong",{},"ARX"," mixes 32-bit words with addition, rotation and XOR, and nothing else that needs a table. Rabbit adds one more thing to the mix, a squaring, and gets by without a single S-box.",{"title":289,"searchDepth":290,"depth":290,"links":291},"",2,[292,293],{"id":244,"depth":290,"text":245},{"id":279,"depth":290,"text":280},"Rabbit for now. A key and an IV grow a keystream and the keystream is XORed into the text. UTF-8 bytes in and hex out.","md",null,{"icon":298},"i-lucide-waves",{"title":212},{"title":222,"description":294},"bRDNsiX5_oSCB89hZ47uJvAgXBzoRBhg5v0VcMdxAvY",[303,305],{"title":208,"path":209,"stem":210,"description":304,"children":-1},"Anderson, Biham and Knudsen's AES finalist from 1998. Thirty-two rounds of 4-bit S-boxes on 16-byte blocks, keys of 128, 192 or 256 bits. UTF-8 text in, hex out.",{"title":216,"path":217,"stem":218,"description":306,"children":-1},"The eSTREAM stream cipher from RFC 4503. A 128-bit key and an optional 64-bit IV give 16 bytes of keystream per step. UTF-8 text in and hex out with no padding.",1790616467265]