<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Hi Wes,</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Thu, Mar 22, 2018 at 4:40 PM, Wes Turner <span dir="ltr"><<a href="mailto:wes.turner@gmail.com" target="_blank">wes.turner@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br><div>The hashes serve as file integrity check but provide no assurance that they are what the author intended to distribute because there is no cryptographic signature.<br></div></span><div><br></div><div>File hashes help detect bit flips -- due to solar flares -- in storage or transit, but do not mitigate against malicious package modification to packages in storage or transit.</div><div><br></div><div>AFAIU, TUF (The Update Framework) has a mechanism for limiting which signing keys are valid for which package? Are pre-shared keys then still  necessary, or do we then rely on a PKI where one compromised CA cert can then forge any other cert?</div></blockquote><div><br></div><div>Yes, you are right, the hashes need to be signed: otherwise you have integrity, but no authenticity.</div><div><br></div><div>We wrote PEPs <a href="https://www.python.org/dev/peps/pep-0458/" target="_blank">458</a> and <a href="https://www.python.org/dev/peps/pep-0480/" target="_blank">480</a> to discuss how TUF might be deployed on PyPI / Warehouse. The PEPs go into details about public key distribution. The TLDR is that is that clients (i.e., pip) need to be shipped with one self-signed root metadata file, and the rest of the PKI is bootstrapped from there. PyPI would act as an authority that distributes, revokes, and replaces public keys for packages.</div><div><br></div><div>More details on security vs usability also available in our <a href="https://www.usenix.org/conference/nsdi16/technical-sessions/presentation/kuppusamy">Diplomat</a> paper.</div><div><br></div><div>If the community is interested, we'd love to discuss how we could help make this happen.</div><div><br></div><div>Thanks,</div><div>Trishank</div><div> </div></div></div></div>