<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">[Yes, I have researched ZIP, yes, it is easier to chuck away the legacy and start from scratch, no, it is not useful to discuss these design parameters.]</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">So, one application for the Mesh is to enable people to exchange 'encrypted ZIP files'. The encryption here being threshold encryption.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">So Alice (@alice) is working on a project, she creates a callsign for the project @groupw and encrypts a bunch of files.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">meshman dare archive /out=secrets.dar</div><div class="gmail_default" style="font-size:small">meshman dare append secrets.dar file1.txt </div><div class="gmail_default" style="font-size:small">meshman dare append secrets.dar file2.txt <br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">At this point, nobody can read them, not even Alice, she wants to share the data with Bob so she adds them both to group W:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">meshman group add @groupw <a class="gmail_plusreply" id="gmail-plusReplyChip-2">@alice</a><br></div><div class="gmail_default" style="font-size:small">meshman group add @groupw <a class="gmail_plusreply" id="gmail-plusReplyChip-2">@bob</a><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Bob now has access to the files and can decode them. But only so long as he is a member of the group. If Carol replaces Bob on the team, Alice can remove Bob from groupW and replace him with Carol.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The trick here is that Bob and Carol can access the files they have been authorized to access at any time. Alice doesn't need to be online. They can read any file that has been encrypted to group W without any changes to that file. The cloud service running the key server cannot decrypt any file ever. That is only possible if an authorized user also defects.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">So assume this is integrated into Word, Powerpoint, Excel, etc. Alice, Bob etc. can all do their work using encrypted documents and share them with exactly the same ease of use as for unencrypted. The only constraint being that Alice has to agree.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">[NB, this is only confidential document control, not full CRM. If Bob can decrypt a document, he can also create a copy for Mallet. but that is a separate problem]</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The key service is a minimal trust service but not zero trust. The reason it is not zero trust is that 1) the service is trusted to grant access to Bob when authorized, 2) the service is trusted to deny access to Bob after he has left the group and 3) we will almost certainly want to add accounting and velocity controls to the key service to implement additional controls beyond basic access.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">OK so that is why I need a new format, it is simply not worth the effort to back-haul the necessary changes into an existing scheme and the systems won't be compatible anyway. Another difference is that the new format is not a compression format for good reasons I won't go into here. the TL;DR; is that compression is better applied at the application file level these days. There is no value to compression in an archive format when people are archiving bundles of JPGs. It might make sense to automatically encode HTML in <span style="color:rgb(32,33,34);font-family:sans-serif;font-size:14px">Brotli</span><span style="color:rgb(32,33,34);font-family:sans-serif;font-size:14px"> but for most purposes the value is likely small.</span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(32,33,34);font-family:sans-serif;font-size:14px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(32,33,34);font-family:sans-serif;font-size:14px">Now the (hard) question: </span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(32,33,34);font-family:sans-serif;font-size:14px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(32,33,34);font-family:sans-serif;font-size:14px">What precautions do I need to take in recording file paths in the archive?</span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(32,33,34);font-family:sans-serif;font-size:14px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(32,33,34);font-family:sans-serif;font-size:14px">The risk here is that someone crafts a malicious file path and sticks it into an archive so that the files end up overwriting the system files.</span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(32,33,34);font-family:sans-serif;font-size:14px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(32,33,34);font-family:sans-serif;font-size:14px">So I have been compiling a list of dangerous file paths.</span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(32,33,34);font-family:sans-serif;font-size:14px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(32,33,34);font-family:sans-serif;font-size:14px">~<anything></span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(32,33,34);font-family:sans-serif;font-size:14px">/</span><anything></div><div class="gmail_default" style="font-size:small">\<anything></div><div class="gmail_default" style="font-size:small">a:<anything></div><div class="gmail_default" style="font-size:small"><anything>/../<anything><br></div><div class="gmail_default" style="font-size:small">../<anything></div><div class="gmail_default" style="font-size:small"><anything>/..<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Any I am missing? The plan here is to ban these for the format itself so these are prohibited on Windows and Linux and OSX.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Of course, this means there will be files that can't be encoded but that is a secondary issue.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The type of attack I am concerned about are malicious paths like:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">~alice/.ssh/authorized_keys</div><div class="gmail_default" style="font-size:small">c:/Windows</div><div class="gmail_default" style="font-size:small">//./com1</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">And so on.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>