[{"data":1,"prerenderedAt":913},["ShallowReactive",2],{"navigation_docs":3,"-ciphers-zipcrypto":356,"-ciphers-zipcrypto-surround":910},[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":355},"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,219,223,227,231,235,239,243,247,251,255,259,263,267,271,275,279,283,287,291,295,299,303,307,311,315,319,323,327,331,335,339,343,347,351],{"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},"Substitution","\u002Fciphers\u002Fsubstitution","2.ciphers\u002F07.substitution",{"title":72,"path":73,"stem":74},"Vigenère","\u002Fciphers\u002Fvigenere","2.ciphers\u002F08.vigenere",{"title":76,"path":77,"stem":78},"Gronsfeld","\u002Fciphers\u002Fgronsfeld","2.ciphers\u002F09.gronsfeld",{"title":80,"path":81,"stem":82},"Beaufort","\u002Fciphers\u002Fbeaufort","2.ciphers\u002F10.beaufort",{"title":84,"path":85,"stem":86},"Porta","\u002Fciphers\u002Fporta","2.ciphers\u002F11.porta",{"title":88,"path":89,"stem":90},"Autokey","\u002Fciphers\u002Fautokey","2.ciphers\u002F12.autokey",{"title":92,"path":93,"stem":94},"Running key","\u002Fciphers\u002Frunning-key","2.ciphers\u002F13.running-key",{"title":96,"path":97,"stem":98},"Trithemius","\u002Fciphers\u002Ftrithemius","2.ciphers\u002F14.trithemius",{"title":100,"path":101,"stem":102},"Alberti","\u002Fciphers\u002Falberti","2.ciphers\u002F15.alberti",{"title":104,"path":105,"stem":106},"Quagmire I","\u002Fciphers\u002Fquagmire-1","2.ciphers\u002F16.quagmire-1",{"title":108,"path":109,"stem":110},"Quagmire II","\u002Fciphers\u002Fquagmire-2","2.ciphers\u002F17.quagmire-2",{"title":112,"path":113,"stem":114},"Quagmire III","\u002Fciphers\u002Fquagmire-3","2.ciphers\u002F18.quagmire-3",{"title":116,"path":117,"stem":118},"Quagmire IV","\u002Fciphers\u002Fquagmire-4","2.ciphers\u002F19.quagmire-4",{"title":120,"path":121,"stem":122},"Chaocipher","\u002Fciphers\u002Fchaocipher","2.ciphers\u002F20.chaocipher",{"title":124,"path":125,"stem":126},"Playfair","\u002Fciphers\u002Fplayfair","2.ciphers\u002F21.playfair",{"title":128,"path":129,"stem":130},"Four-square","\u002Fciphers\u002Ffour-square","2.ciphers\u002F22.four-square",{"title":132,"path":133,"stem":134},"Two-square","\u002Fciphers\u002Ftwo-square","2.ciphers\u002F23.two-square",{"title":136,"path":137,"stem":138},"Hill","\u002Fciphers\u002Fhill","2.ciphers\u002F24.hill",{"title":140,"path":141,"stem":142},"Polybius square","\u002Fciphers\u002Fpolybius","2.ciphers\u002F25.polybius",{"title":144,"path":145,"stem":146},"Nihilist","\u002Fciphers\u002Fnihilist","2.ciphers\u002F26.nihilist",{"title":148,"path":149,"stem":150},"Morse code","\u002Fciphers\u002Fmorse","2.ciphers\u002F27.morse",{"title":152,"path":153,"stem":154},"Fractionated Morse","\u002Fciphers\u002Ffractionated-morse","2.ciphers\u002F28.fractionated-morse",{"title":156,"path":157,"stem":158},"Bacon's cipher","\u002Fciphers\u002Fbacon","2.ciphers\u002F29.bacon",{"title":160,"path":161,"stem":162},"Tap code","\u002Fciphers\u002Ftap-code","2.ciphers\u002F30.tap-code",{"title":164,"path":165,"stem":166},"A1Z26","\u002Fciphers\u002Fa1z26","2.ciphers\u002F31.a1z26",{"title":168,"path":169,"stem":170},"Book cipher","\u002Fciphers\u002Fbook","2.ciphers\u002F32.book",{"title":172,"path":173,"stem":174},"ADFGVX","\u002Fciphers\u002Fadfgvx","2.ciphers\u002F33.adfgvx",{"title":176,"path":177,"stem":178},"Bifid","\u002Fciphers\u002Fbifid","2.ciphers\u002F34.bifid",{"title":180,"path":181,"stem":182},"Trifid","\u002Fciphers\u002Ftrifid","2.ciphers\u002F35.trifid",{"title":184,"path":185,"stem":186},"Straddling checkerboard","\u002Fciphers\u002Fstraddling-checkerboard","2.ciphers\u002F36.straddling-checkerboard",{"title":188,"path":189,"stem":190},"Tridigital","\u002Fciphers\u002Ftridigital","2.ciphers\u002F37.tridigital",{"title":192,"path":193,"stem":194},"Rail fence","\u002Fciphers\u002Frail-fence","2.ciphers\u002F38.rail-fence",{"title":196,"path":197,"stem":198},"Columnar transposition","\u002Fciphers\u002Fcolumnar","2.ciphers\u002F39.columnar",{"title":200,"path":201,"stem":202},"Route transposition","\u002Fciphers\u002Froute","2.ciphers\u002F40.route",{"title":204,"path":205,"stem":206},"Enigma M3","\u002Fciphers\u002Fenigma","2.ciphers\u002F41.enigma",{"title":208,"path":209,"stem":210},"Block","\u002Fciphers\u002Fblock","2.ciphers\u002F42.block",{"title":212,"path":213,"stem":214},"AES (ECB)","\u002Fciphers\u002Faes","2.ciphers\u002F43.aes",{"title":216,"path":217,"stem":218},"AES (CBC)","\u002Fciphers\u002Faes-cbc","2.ciphers\u002F44.aes-cbc",{"title":220,"path":221,"stem":222},"AES (CFB)","\u002Fciphers\u002Faes-cfb","2.ciphers\u002F45.aes-cfb",{"title":224,"path":225,"stem":226},"AES (OFB)","\u002Fciphers\u002Faes-ofb","2.ciphers\u002F46.aes-ofb",{"title":228,"path":229,"stem":230},"AES (CTR)","\u002Fciphers\u002Faes-ctr","2.ciphers\u002F47.aes-ctr",{"title":232,"path":233,"stem":234},"AES (CCM)","\u002Fciphers\u002Faes-ccm","2.ciphers\u002F48.aes-ccm",{"title":236,"path":237,"stem":238},"AES (OCB)","\u002Fciphers\u002Faes-ocb","2.ciphers\u002F49.aes-ocb",{"title":240,"path":241,"stem":242},"AES (LRW)","\u002Fciphers\u002Faes-lrw","2.ciphers\u002F50.aes-lrw",{"title":244,"path":245,"stem":246},"AES (XTS)","\u002Fciphers\u002Faes-xts","2.ciphers\u002F51.aes-xts",{"title":248,"path":249,"stem":250},"AES (CBC-MAC)","\u002Fciphers\u002Faes-cbc-mac","2.ciphers\u002F52.aes-cbc-mac",{"title":252,"path":253,"stem":254},"AES (passphrase)","\u002Fciphers\u002Faes-passphrase","2.ciphers\u002F53.aes-passphrase",{"title":256,"path":257,"stem":258},"Rijndael (ECB)","\u002Fciphers\u002Frijndael","2.ciphers\u002F54.rijndael",{"title":260,"path":261,"stem":262},"DES (ECB)","\u002Fciphers\u002Fdes","2.ciphers\u002F55.des",{"title":264,"path":265,"stem":266},"DESX (ECB)","\u002Fciphers\u002Fdesx","2.ciphers\u002F56.desx",{"title":268,"path":269,"stem":270},"Triple DES (ECB)","\u002Fciphers\u002Ftriple-des","2.ciphers\u002F57.triple-des",{"title":272,"path":273,"stem":274},"Triple DES (CBC)","\u002Fciphers\u002Ftriple-des-cbc","2.ciphers\u002F58.triple-des-cbc",{"title":276,"path":277,"stem":278},"Blowfish (ECB)","\u002Fciphers\u002Fblowfish","2.ciphers\u002F59.blowfish",{"title":280,"path":281,"stem":282},"IDEA (ECB)","\u002Fciphers\u002Fidea","2.ciphers\u002F60.idea",{"title":284,"path":285,"stem":286},"Lucifer (ECB)","\u002Fciphers\u002Flucifer","2.ciphers\u002F61.lucifer",{"title":288,"path":289,"stem":290},"MARS (ECB)","\u002Fciphers\u002Fmars","2.ciphers\u002F62.mars",{"title":292,"path":293,"stem":294},"Serpent (ECB)","\u002Fciphers\u002Fserpent","2.ciphers\u002F63.serpent",{"title":296,"path":297,"stem":298},"CAST5 (ECB)","\u002Fciphers\u002Fcast5","2.ciphers\u002F64.cast5",{"title":300,"path":301,"stem":302},"Camellia (ECB)","\u002Fciphers\u002Fcamellia","2.ciphers\u002F65.camellia",{"title":304,"path":305,"stem":306},"ARIA (ECB)","\u002Fciphers\u002Faria","2.ciphers\u002F66.aria",{"title":308,"path":309,"stem":310},"SM4 (ECB)","\u002Fciphers\u002Fsm4","2.ciphers\u002F67.sm4",{"title":312,"path":313,"stem":314},"OpenPGP (passphrase)","\u002Fciphers\u002Fopenpgp","2.ciphers\u002F68.openpgp",{"title":316,"path":317,"stem":318},"Stream","\u002Fciphers\u002Fstream","2.ciphers\u002F69.stream",{"title":320,"path":321,"stem":322},"Rabbit","\u002Fciphers\u002Frabbit","2.ciphers\u002F70.rabbit",{"title":324,"path":325,"stem":326},"RC4","\u002Fciphers\u002Frc4","2.ciphers\u002F71.rc4",{"title":328,"path":329,"stem":330},"XOR","\u002Fciphers\u002Fxor","2.ciphers\u002F72.xor",{"title":332,"path":333,"stem":334},"Salsa20","\u002Fciphers\u002Fsalsa20","2.ciphers\u002F73.salsa20",{"title":336,"path":337,"stem":338},"ChaCha20","\u002Fciphers\u002Fchacha20","2.ciphers\u002F74.chacha20",{"title":340,"path":341,"stem":342},"XSalsa20","\u002Fciphers\u002Fxsalsa20","2.ciphers\u002F74.xsalsa20",{"title":344,"path":345,"stem":346},"XChaCha20","\u002Fciphers\u002Fxchacha20","2.ciphers\u002F75.xchacha20",{"title":348,"path":349,"stem":350},"ChaCha20-Poly1305","\u002Fciphers\u002Fchacha20-poly1305","2.ciphers\u002F76.chacha20-poly1305",{"title":352,"path":353,"stem":354},"ZipCrypto","\u002Fciphers\u002Fzipcrypto","2.ciphers\u002F77.zipcrypto","i-lucide-library",{"id":357,"title":352,"body":358,"description":904,"extension":905,"links":906,"meta":907,"navigation":414,"path":353,"seo":908,"stem":354,"__hash__":909},"docs\u002F2.ciphers\u002F77.zipcrypto.md",{"type":359,"value":360,"toc":894},"minimark",[361,365,369,531,536,551,559,563,566,574,577,580,583,587,590,593,596,600,611,621,627,636,640,647,650,653,696,703,706,745,748,752,767,773,818,821,825,832,835,846,850,875,882,890],[362,363],"cipher-facts",{"name":364},"zipcrypto",[366,367,368],"p",{},"ZipCrypto opens encrypted entries in a ZIP archive. Give it the password or the three internal keys. It checks the result before handing anything back.",[370,371,376],"pre",{"className":372,"code":373,"language":374,"meta":375,"style":375},"language-ts shiki shiki-themes ciphers ciphers ciphers","const zip = create(\"zipcrypto\");\n\nconst archive = zip.encode(\"ATTACK AT DAWN\", {\n  key: \"causality\",\n  entry: \"note.txt\",\n}).text;\n\u002F\u002F \"504b0304...\", a ZIP archive in hex that unzip opens\n\nzip.decode(archive, { key: \"causality\" }).options.keys;\n\u002F\u002F \"7067b779 926e6526 2b5a64b9\"\n\nzip.decode(archive, { keys: \"7067b779 926e6526 2b5a64b9\" }).text;\n\u002F\u002F \"ATTACK AT DAWN\"\n","ts","",[377,378,379,409,416,440,452,463,469,476,481,498,504,509,525],"code",{"__ignoreMap":375},[380,381,384,388,392,395,399,402,406],"span",{"class":382,"line":383},"line",1,[380,385,387],{"class":386},"skH_V","const",[380,389,391],{"class":390},"s38Sx"," zip ",[380,393,394],{"class":386},"=",[380,396,398],{"class":397},"sK71F"," create",[380,400,401],{"class":390},"(",[380,403,405],{"class":404},"shU9J","\"zipcrypto\"",[380,407,408],{"class":390},");\n",[380,410,412],{"class":382,"line":411},2,[380,413,415],{"emptyLinePlaceholder":414},true,"\n",[380,417,419,421,424,426,429,432,434,437],{"class":382,"line":418},3,[380,420,387],{"class":386},[380,422,423],{"class":390}," archive ",[380,425,394],{"class":386},[380,427,428],{"class":390}," zip.",[380,430,431],{"class":397},"encode",[380,433,401],{"class":390},[380,435,436],{"class":404},"\"ATTACK AT DAWN\"",[380,438,439],{"class":390},", {\n",[380,441,443,446,449],{"class":382,"line":442},4,[380,444,445],{"class":390},"  key: ",[380,447,448],{"class":404},"\"causality\"",[380,450,451],{"class":390},",\n",[380,453,455,458,461],{"class":382,"line":454},5,[380,456,457],{"class":390},"  entry: ",[380,459,460],{"class":404},"\"note.txt\"",[380,462,451],{"class":390},[380,464,466],{"class":382,"line":465},6,[380,467,468],{"class":390},"}).text;\n",[380,470,472],{"class":382,"line":471},7,[380,473,475],{"class":474},"scIB-","\u002F\u002F \"504b0304...\", a ZIP archive in hex that unzip opens\n",[380,477,479],{"class":382,"line":478},8,[380,480,415],{"emptyLinePlaceholder":414},[380,482,484,487,490,493,495],{"class":382,"line":483},9,[380,485,486],{"class":390},"zip.",[380,488,489],{"class":397},"decode",[380,491,492],{"class":390},"(archive, { key: ",[380,494,448],{"class":404},[380,496,497],{"class":390}," }).options.keys;\n",[380,499,501],{"class":382,"line":500},10,[380,502,503],{"class":474},"\u002F\u002F \"7067b779 926e6526 2b5a64b9\"\n",[380,505,507],{"class":382,"line":506},11,[380,508,415],{"emptyLinePlaceholder":414},[380,510,512,514,516,519,522],{"class":382,"line":511},12,[380,513,486],{"class":390},[380,515,489],{"class":397},[380,517,518],{"class":390},"(archive, { keys: ",[380,520,521],{"class":404},"\"7067b779 926e6526 2b5a64b9\"",[380,523,524],{"class":390}," }).text;\n",[380,526,528],{"class":382,"line":527},13,[380,529,530],{"class":474},"\u002F\u002F \"ATTACK AT DAWN\"\n",[532,533,535],"h2",{"id":534},"what-is-zipcrypto","What is ZipCrypto?",[366,537,538,539,542,543,546,547,550],{},"ZipCrypto is traditional PKWARE encryption from section 6.1 of the ZIP APPNOTE. Info-ZIP writes it with ",[377,540,541],{},"zip -e"," or ",[377,544,545],{},"zip -P",". 7-Zip uses it by default for ZIP. You can also choose it with ",[377,548,549],{},"-mem=ZipCrypto",".",[366,552,553,554,558],{},"Biham and Kocher published a known plaintext attack in 1994. Their paper is ",[555,556,557],"em",{},"A Known Plaintext Attack on the PKZIP Stream Cipher",". ZipCrypto belongs in puzzles, not around secrets.",[532,560,562],{"id":561},"what-do-the-three-keys-do","What do the three keys do?",[366,564,565],{},"The cipher starts with three 32-bit keys:",[370,567,572],{"className":568,"code":570,"language":571,"meta":375},[569],"language-text","12345678 23456789 34567890\n","text",[377,573,570],{"__ignoreMap":375},[366,575,576],{},"Each password byte moves all three. Key 0 takes a CRC-32 step with the byte. Key 1 adds key 0's low byte, multiplies by 134775813, then adds 1. Key 2 takes a CRC-32 step with key 1's top byte.",[366,578,579],{},"One keystream byte comes from key 2. After the password, each plaintext byte moves the keys the same way.",[366,581,582],{},"The password picks a starting point. From there, the three keys are the whole 96-bit state. Have those keys? The password can sit this one out.",[532,584,586],{"id":585},"why-isnt-the-header-enough","Why isn't the header enough?",[366,588,589],{},"Each encrypted entry starts with a 12-byte header. It contains 11 random bytes and one check byte.",[366,591,592],{},"The check byte usually comes from the top byte of the CRC-32. If flag bit 3 is set, it comes from the file's DOS modification time instead. Info-ZIP 3.0 sets that flag. 7-Zip doesn't.",[366,594,595],{},"A wrong password passes a one-byte check once in 256 tries. That's a pretty generous bouncer. Decode goes further: it decrypts, unpacks, and compares both CRC-32 and size with the central directory. Only then does it return plaintext.",[532,597,599],{"id":598},"password-or-keys","Password or keys?",[366,601,602,603,606,607,610],{},"Pass ",[377,604,605],{},"key"," as a UTF-8 password. Or pass ",[377,608,609],{},"keys"," as 24 hex digits. Spaces between the three words are fine.",[366,612,613,620],{},[614,615,619],"a",{"href":616,"rel":617},"https:\u002F\u002Fgithub.com\u002Fkimci86\u002Fbkcrack",[618],"nofollow","bkcrack"," can recover those keys from known plaintext. It prints three hex words like these:",[370,622,625],{"className":623,"code":624,"language":571,"meta":375},[569],"c4038591 d5ff449d d3b0c696\n",[377,626,624],{"__ignoreMap":375},[366,628,629,630,632,633,635],{},"This library accepts the keys. It doesn't run the attack. If you pass both ",[377,631,605],{}," and ",[377,634,609],{},", they must agree.",[532,637,639],{"id":638},"what-does-decode-return","What does decode return?",[366,641,642,643,646],{},"Give decode the whole ZIP archive as hex or base64 text. Set ",[377,644,645],{},"entry"," to pick a file inside. Without it, decode picks the first encrypted entry.",[366,648,649],{},"Stored, deflate and bzip2 entries can be opened. Decode unpacks at most 4 MiB.",[366,651,652],{},"The result contains the plaintext and these options:",[654,655,656,665,673,679],"ul",{},[657,658,659,661,662,664],"li",{},[377,660,605],{},", when supplied, and ",[377,663,609],{},", always.",[657,666,667,632,669,672],{},[377,668,645],{},[377,670,671],{},"method"," for the opened file.",[657,674,675,678],{},[377,676,677],{},"iv",", the 11 random header bytes.",[657,680,681,632,684,687,688,690,691,542,693,550],{},[377,682,683],{},"crc",[377,685,686],{},"check",", where ",[377,689,686],{}," is ",[377,692,683],{},[377,694,695],{},"time",[366,697,698,699,702],{},"The returned keys make a password useful in another form. For an entry that isn't UTF-8 text, set ",[377,700,701],{},"bytes: \"hex\""," to get its plaintext as hex.",[366,704,705],{},"The CLI can read an archive encoded as base64:",[370,707,711],{"className":708,"code":709,"language":710,"meta":375,"style":375},"language-sh shiki shiki-themes ciphers ciphers ciphers","ciphers decode zipcrypto \"$(base64 -w0 secret.zip)\" --key causality --entry fox.txt\n","sh",[377,712,713],{"__ignoreMap":375},[380,714,715,718,721,724,727,730,733,736,739,742],{"class":382,"line":383},[380,716,717],{"class":397},"ciphers",[380,719,720],{"class":404}," decode",[380,722,723],{"class":404}," zipcrypto",[380,725,726],{"class":404}," \"$(",[380,728,729],{"class":397},"base64",[380,731,732],{"class":404}," -w0 secret.zip)\"",[380,734,735],{"class":404}," --key",[380,737,738],{"class":404}," causality",[380,740,741],{"class":404}," --entry",[380,743,744],{"class":404}," fox.txt\n",[366,746,747],{},"Over MCP, the text argument holds up to 10,000 characters. Base64 fits a bigger archive than hex.",[532,749,751],{"id":750},"writing-an-archive","Writing an archive",[366,753,754,755,758,759,762,763,766],{},"Encode writes one ZIP entry and returns the archive as hex. The default entry is ",[377,756,757],{},"message.txt",". The default method is ",[377,760,761],{},"deflate",", and ",[377,764,765],{},"stored"," is also available.",[366,768,769,770,772],{},"Set ",[377,771,677],{}," to 22 hex digits to fix the 11 random header bytes. Otherwise they're random. The date is 1 January 1980. There's no data descriptor, so the check byte comes from the CRC.",[370,774,776],{"className":708,"code":775,"language":710,"meta":375,"style":375},"ciphers encode zipcrypto \"ATTACK AT DAWN\" --key causality --method stored | xxd -r -p > note.zip\n",[377,777,778],{"__ignoreMap":375},[380,779,780,782,785,787,790,792,794,797,800,803,806,809,812,815],{"class":382,"line":383},[380,781,717],{"class":397},[380,783,784],{"class":404}," encode",[380,786,723],{"class":404},[380,788,789],{"class":404}," \"ATTACK AT DAWN\"",[380,791,735],{"class":404},[380,793,738],{"class":404},[380,795,796],{"class":404}," --method",[380,798,799],{"class":404}," stored",[380,801,802],{"class":386}," |",[380,804,805],{"class":397}," xxd",[380,807,808],{"class":404}," -r",[380,810,811],{"class":404}," -p",[380,813,814],{"class":386}," >",[380,816,817],{"class":404}," note.zip\n",[366,819,820],{},"Decode an archive that encode wrote, feed the options back, and the same bytes come out. A bzip2 entry can't make that trip, since encode only writes stored and deflate.",[532,822,824],{"id":823},"checked-against","Checked against",[366,826,827,828,831],{},"For ",[377,829,830],{},"causality",", the keys in the opening example match Python 3.14's zipfile state.",[366,833,834],{},"The tests pin the bytes of two encoded archives. In a local run, both opened in unzip 6.00, 7-Zip 26.05 and Python's zipfile.",[366,836,837,838,841,842,845],{},"The tests also try two wrong passwords that pass the header check. ",[377,839,840],{},"wrong84"," fails the CRC check on a stored entry. ",[377,843,844],{},"wrong109"," fails to inflate a deflated entry. In a local run, Python's zipfile failed them the same way.",[532,847,849],{"id":848},"errors-and-analysis","Errors and analysis",[366,851,852,853,632,855,857,858,861,862,865,866,865,869,632,872,550],{},"Pass both ",[377,854,605],{},[377,856,609],{}," with different values and you get ",[377,859,860],{},"InvalidOptionError",". A missing or wrong password lists encrypted entries with their methods and sizes. Error messages distinguish ",[377,863,864],{},"Wrong password:",", ",[377,867,868],{},"Wrong keys:",[377,870,871],{},"Not supported:",[377,873,874],{},"Broken archive:",[366,876,877,878,881],{},"WinZip AES, including 7-Zip's ",[377,879,880],{},"-mem=AES256",", isn't supported. Neither are PKWARE strong encryption, LZMA entries or split archives. ZIP64 past 65535 entries or 4 GiB isn't supported. Small archives with ZIP64 records from Info-ZIP's pipe output still open.",[366,883,884,889],{},[614,885,886],{"href":17},[377,887,888],{},"guessFamily"," recognizes ZIP local headers in hex or base64 and names zipcrypto with high confidence. A ZIP header is a clue, not proof that an entry uses this encryption.",[891,892,893],"style",{},"html pre.shiki code .skH_V, html code.shiki .skH_V{--shiki-light:var(--shiki-token-keyword);--shiki-default:var(--shiki-token-keyword);--shiki-dark:var(--shiki-token-keyword)}html pre.shiki code .s38Sx, html code.shiki .s38Sx{--shiki-light:var(--ui-text-highlighted);--shiki-default:var(--ui-text-highlighted);--shiki-dark:var(--ui-text-highlighted)}html pre.shiki code .sK71F, html code.shiki .sK71F{--shiki-light:var(--shiki-token-function);--shiki-default:var(--shiki-token-function);--shiki-dark:var(--shiki-token-function)}html pre.shiki code .shU9J, html code.shiki .shU9J{--shiki-light:var(--shiki-token-string);--shiki-default:var(--shiki-token-string);--shiki-dark:var(--shiki-token-string)}html pre.shiki code .scIB-, html code.shiki .scIB-{--shiki-light:var(--shiki-token-comment);--shiki-default:var(--shiki-token-comment);--shiki-dark:var(--shiki-token-comment)}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":375,"searchDepth":411,"depth":411,"links":895},[896,897,898,899,900,901,902,903],{"id":534,"depth":411,"text":535},{"id":561,"depth":411,"text":562},{"id":585,"depth":411,"text":586},{"id":598,"depth":411,"text":599},{"id":638,"depth":411,"text":639},{"id":750,"depth":411,"text":751},{"id":823,"depth":411,"text":824},{"id":848,"depth":411,"text":849},"ZipCrypto opens traditional PKWARE encrypted ZIP entries with a password or three internal keys.","md",null,{},{"title":352,"description":904},"Y-byY58q2EedseIhndgufx7_pF8JuIds_1B7qYESR9E",[911,906],{"title":348,"path":349,"stem":350,"description":912,"children":-1},"The RFC 8439 AEAD of TLS 1.3 and WireGuard. ChaCha20 encrypts, Poly1305 tags, and decoding refuses a changed byte. Hex out with a 16-byte tag.",1794339076768]