<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 69: Encryption enabled streaming</title><link>https://sourceforge.net/p/infozip/bugs/69/</link><description>Recent changes to 69: Encryption enabled streaming</description><atom:link href="https://sourceforge.net/p/infozip/bugs/69/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 02 Aug 2022 17:14:51 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/infozip/bugs/69/feed.rss" rel="self" type="application/rss+xml"/><item><title>#69 Encryption enabled streaming</title><link>https://sourceforge.net/p/infozip/bugs/69/?limit=25#354c</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I'll have to look, but basic zip encryption is a funny thing.  The original authors made some assumptions on how to do it, which were accepted by others.  I'll try to look at this in the next week and refresh myself on what's going on.  I believe the answer is driven by what information is available when during the encryption process.&lt;br/&gt;
Given how weak basic zip encryption is, it probably shouldn't be used much now, except in cases where cracking is not much of a concern.  Zip 3.1e, whenever that is finalized, now bundles AES encryption in the base package.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ed Gordon</dc:creator><pubDate>Tue, 02 Aug 2022 17:14:51 -0000</pubDate><guid>https://sourceforge.net06e6cd58dc91969831b08ef5d9c13acabcb2ceb7</guid></item><item><title>Encryption enabled streaming</title><link>https://sourceforge.net/p/infozip/bugs/69/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Not sure if this is a bug or a feature, but when I create an encrypted zip file, the resulting file has been written in streaming mode .&lt;/p&gt;
&lt;p&gt;First create an encrypted zip file&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$ zip -e -P password /tmp/pwd.zip lorem.txt
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now dump the metadata &amp;amp; note the present of the streaming artefacts&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$ zipdetails /tmp/pwd.zip 

&lt;span class="m"&gt;0000&lt;/span&gt; LOCAL HEADER &lt;span class="c1"&gt;#1       04034B50&lt;/span&gt;
&lt;span class="m"&gt;0004&lt;/span&gt; Extract Zip Spec      &lt;span class="m"&gt;14&lt;/span&gt; &lt;span class="s1"&gt;'2.0'&lt;/span&gt;
&lt;span class="m"&gt;0005&lt;/span&gt; Extract OS            &lt;span class="m"&gt;00&lt;/span&gt; &lt;span class="s1"&gt;'MS-DOS'&lt;/span&gt;
&lt;span class="m"&gt;0006&lt;/span&gt; General Purpose Flag  &lt;span class="m"&gt;0009&lt;/span&gt;
     &lt;span class="o"&gt;[&lt;/span&gt;Bit  &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;              &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="s1"&gt;'Encryption'&lt;/span&gt;
     &lt;span class="o"&gt;[&lt;/span&gt;Bits &lt;span class="m"&gt;1&lt;/span&gt;-2&lt;span class="o"&gt;]&lt;/span&gt;            &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="s1"&gt;'Normal Compression'&lt;/span&gt;
     &lt;span class="o"&gt;[&lt;/span&gt;Bit  &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;              &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="s1"&gt;'Streamed'&lt;/span&gt;
&lt;span class="m"&gt;0008&lt;/span&gt; Compression Method    &lt;span class="m"&gt;0008&lt;/span&gt; &lt;span class="s1"&gt;'Deflated'&lt;/span&gt;
000A Last Mod Time         &lt;span class="m"&gt;52988571&lt;/span&gt; &lt;span class="s1"&gt;'Sat Apr 24 17:43:34 2021'&lt;/span&gt;
000E CRC                   F90EE7FF
&lt;span class="m"&gt;0012&lt;/span&gt; Compressed Length     0000011A
&lt;span class="m"&gt;0016&lt;/span&gt; Uncompressed Length   000001BE
001A Filename Length       &lt;span class="m"&gt;0009&lt;/span&gt;
001C Extra Length          001C
001E Filename              &lt;span class="s1"&gt;'lorem.txt'&lt;/span&gt;
&lt;span class="m"&gt;0027&lt;/span&gt; Extra ID &lt;span class="c1"&gt;#0001        5455 'UT: Extended Timestamp'&lt;/span&gt;
&lt;span class="m"&gt;0029&lt;/span&gt;   Length              &lt;span class="m"&gt;0009&lt;/span&gt;
002B   Flags               &lt;span class="s1"&gt;'03 mod access'&lt;/span&gt;
002C   Mod Time            60843CA6 &lt;span class="s1"&gt;'Sat Apr 24 16:43:34 2021'&lt;/span&gt;
&lt;span class="m"&gt;0030&lt;/span&gt;   Access Time         62E7CDA3 &lt;span class="s1"&gt;'Mon Aug  1 13:57:07 2022'&lt;/span&gt;
&lt;span class="m"&gt;0034&lt;/span&gt; Extra ID &lt;span class="c1"&gt;#0002        7875 'ux: Unix Extra Type 3'&lt;/span&gt;
&lt;span class="m"&gt;0036&lt;/span&gt;   Length              000B
&lt;span class="m"&gt;0038&lt;/span&gt;   Version             &lt;span class="m"&gt;01&lt;/span&gt;
&lt;span class="m"&gt;0039&lt;/span&gt;   UID Size            &lt;span class="m"&gt;04&lt;/span&gt;
003A   UID                 000003E8
003E   GID Size            &lt;span class="m"&gt;04&lt;/span&gt;
003F   GID                 000003E8
&lt;span class="m"&gt;0043&lt;/span&gt; PAYLOAD

015D STREAMING DATA HEADER 08074B50
&lt;span class="m"&gt;0161&lt;/span&gt; CRC                   F90EE7FF
&lt;span class="m"&gt;0165&lt;/span&gt; Compressed Length     0000011A
&lt;span class="m"&gt;0169&lt;/span&gt; Uncompressed Length   000001BE

016D CENTRAL HEADER &lt;span class="c1"&gt;#1     02014B50&lt;/span&gt;
&lt;span class="m"&gt;0171&lt;/span&gt; Created Zip Spec      1E &lt;span class="s1"&gt;'3.0'&lt;/span&gt;
&lt;span class="m"&gt;0172&lt;/span&gt; Created OS            &lt;span class="m"&gt;03&lt;/span&gt; &lt;span class="s1"&gt;'Unix'&lt;/span&gt;
&lt;span class="m"&gt;0173&lt;/span&gt; Extract Zip Spec      &lt;span class="m"&gt;14&lt;/span&gt; &lt;span class="s1"&gt;'2.0'&lt;/span&gt;
&lt;span class="m"&gt;0174&lt;/span&gt; Extract OS            &lt;span class="m"&gt;00&lt;/span&gt; &lt;span class="s1"&gt;'MS-DOS'&lt;/span&gt;
&lt;span class="m"&gt;0175&lt;/span&gt; General Purpose Flag  &lt;span class="m"&gt;0009&lt;/span&gt;
     &lt;span class="o"&gt;[&lt;/span&gt;Bit  &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;              &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="s1"&gt;'Encryption'&lt;/span&gt;
     &lt;span class="o"&gt;[&lt;/span&gt;Bits &lt;span class="m"&gt;1&lt;/span&gt;-2&lt;span class="o"&gt;]&lt;/span&gt;            &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="s1"&gt;'Normal Compression'&lt;/span&gt;
     &lt;span class="o"&gt;[&lt;/span&gt;Bit  &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;              &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="s1"&gt;'Streamed'&lt;/span&gt;
&lt;span class="m"&gt;0177&lt;/span&gt; Compression Method    &lt;span class="m"&gt;0008&lt;/span&gt; &lt;span class="s1"&gt;'Deflated'&lt;/span&gt;
&lt;span class="m"&gt;0179&lt;/span&gt; Last Mod Time         &lt;span class="m"&gt;52988571&lt;/span&gt; &lt;span class="s1"&gt;'Sat Apr 24 17:43:34 2021'&lt;/span&gt;
017D CRC                   F90EE7FF
&lt;span class="m"&gt;0181&lt;/span&gt; Compressed Length     0000011A
&lt;span class="m"&gt;0185&lt;/span&gt; Uncompressed Length   000001BE
&lt;span class="m"&gt;0189&lt;/span&gt; Filename Length       &lt;span class="m"&gt;0009&lt;/span&gt;
018B Extra Length          &lt;span class="m"&gt;0018&lt;/span&gt;
018D Comment Length        &lt;span class="m"&gt;0000&lt;/span&gt;
018F Disk Start            &lt;span class="m"&gt;0000&lt;/span&gt;
&lt;span class="m"&gt;0191&lt;/span&gt; Int File Attributes   &lt;span class="m"&gt;0001&lt;/span&gt;
     &lt;span class="o"&gt;[&lt;/span&gt;Bit &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;               &lt;span class="m"&gt;1&lt;/span&gt; Text Data
&lt;span class="m"&gt;0193&lt;/span&gt; Ext File Attributes   81ED0000
&lt;span class="m"&gt;0197&lt;/span&gt; Local Header Offset   &lt;span class="m"&gt;00000000&lt;/span&gt;
019B Filename              &lt;span class="s1"&gt;'lorem.txt'&lt;/span&gt;
01A4 Extra ID &lt;span class="c1"&gt;#0001        5455 'UT: Extended Timestamp'&lt;/span&gt;
01A6   Length              &lt;span class="m"&gt;0005&lt;/span&gt;
01A8   Flags               &lt;span class="s1"&gt;'03 mod access'&lt;/span&gt;
01A9   Mod Time            60843CA6 &lt;span class="s1"&gt;'Sat Apr 24 16:43:34 2021'&lt;/span&gt;
01AD Extra ID &lt;span class="c1"&gt;#0002        7875 'ux: Unix Extra Type 3'&lt;/span&gt;
01AF   Length              000B
01B1   Version             &lt;span class="m"&gt;01&lt;/span&gt;
01B2   UID Size            &lt;span class="m"&gt;04&lt;/span&gt;
01B3   UID                 000003E8
01B7   GID Size            &lt;span class="m"&gt;04&lt;/span&gt;
01B8   GID                 000003E8

01BC END CENTRAL HEADER    06054B50
01C0 Number of this disk   &lt;span class="m"&gt;0000&lt;/span&gt;
01C2 Central Dir Disk no   &lt;span class="m"&gt;0000&lt;/span&gt;
01C4 Entries &lt;span class="k"&gt;in&lt;/span&gt; this disk  &lt;span class="m"&gt;0001&lt;/span&gt;
01C6 Total Entries         &lt;span class="m"&gt;0001&lt;/span&gt;
01C8 Size of Central Dir   0000004F
01CC Offset to Central Dir 0000016D
01D0 Comment Length        &lt;span class="m"&gt;0000&lt;/span&gt;
Done
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Given that we are writing to a seekable file, I'm not clear why streaming has been triggered.&lt;/p&gt;
&lt;p&gt;See this with zip 3.0 and  the 3.1d beta.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Marquess</dc:creator><pubDate>Tue, 02 Aug 2022 09:48:39 -0000</pubDate><guid>https://sourceforge.net32019d005d21d59f4c3e0045c2596a357fd88c2b</guid></item></channel></rss>