<div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 19, 2012 at 4:34 PM, Tarek Ziadé <span dir="ltr"><<a href="mailto:tarek@ziade.org" target="_blank">tarek@ziade.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">On 11/19/12 7:55 PM, M.-A. Lemburg wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On 19.11.2012 19:37, Tarek Ziadé wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hey<br>
<br>
<br>
I am currently writing a small script to verify that the gpg signature is correct when the --sign<br>
option<br>
is used with the Distutils upload command, and I was wondering why we don't publish the public key<br>
alongside the .asc file.<br>
<br>
Right now, unless I missed something, to verify a signature the user has to manually get the public<br>
key before she<br>
can control the tarball.<br>
<br>
Wouldn't it make sense to modify the upload command and add a .pubkey file alongside the archive file<br>
and the .asc file on PyPI ? (since we don't have a notion of team/users etc.)<br>
</blockquote>
Doesn't that cause problems when revoking a public key ?<br>
<br>
</blockquote></div>
That problem still exists as things are today at PyPI -if you sign a package you get an .asc file uploaded and<br>
you need to tell people where is your public key.<br>
<br>
If you change your key, the asc file is not valid anymore.<br>
<br>
I am not sure what would be the best way to do this: maybe we should allow people to update the asc files ?<br></blockquote><div><br>You should consider reading up on the design of TUF: The Update Framework (<a href="https://www.updateframework.com/">https://www.updateframework.com/</a>). They have designed a security system for Python packages.<br>
<br>One solution to the key revocation problem is to have two signatures, a timestamp from PyPI along with a signature from the publisher. The package is only valid if it has a valid publisher signature along with a timestamp that is within the validity period of the publisher's signing key.<br>
<br>In other words, if I publish a package in October but revoke my public key in November, the package is still valid because PyPI asserts it was signed before the key was revoked.<br><br><br></div></div></div>