<div dir="ltr">A Hash is surely useful in the context of locking versions of software packages in Pipfile.lock because we tell us that the code we are downloading has not changed since the first we saw this particular version of the package, but only a signature scheme tell us with a reasonable degree of certainty (though, not absolute) that this particular version of the code came from who it claims to have came from. <br><br>If an attacker is able to hijack the github repository from a project and it's website, specially on low activity projects, nothing would prevent them from releasing a rogue version, and people downloading it and using it for some time until the rightful maintainers of said project are able to take back control of it. Signing of course is as secure as the ability of said project maintainers to keep their private keys safe. But while we know that nothing can be made 100% secure, a culture that relies on signatures is inherently more secure than relying only on hashes, no matter how cryptographically strong they may be.<br><br>Hashes tell us that the code we've download we have is the same as other blob of code stored somewhere that for whatever reasons we trust. PGP tells us that there is a high probability, assuming the private keys haven't been compromised, and that a lot of people agrees that the public key we have came from the right person or organization, that this blob of code came from who it says it came from. </div><br><div class="gmail_quote"><div dir="ltr">Em seg, 10 de dez de 2018 às 13:05, Marcos Eliziario <<a href="mailto:marcos.eliziario@gmail.com">marcos.eliziario@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">My two cents. <br>Automation tools should check the PGP signature. The public keys should be obtained once via https from an odd number of different trustworthy sources from a set of well know domains that use DNSSEC. Users should be advised to check the certificate chain from those domains at the first time those keys are downloaded and explicitly agree. This is a more secure schema than simply relying on a checksum that you've got from the same site you've used to download the code. <br>Moving from MD5 from SHA obscures this, by making people believe that this hash should be used for anything more than checking for file corruption. </div><br><div class="gmail_quote"><div dir="ltr">Em seg, 10 de dez de 2018 às 12:45, Bernardo Sulzbach <<a href="mailto:bernardo@bernardosulzbach.com" target="_blank">bernardo@bernardosulzbach.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">If the discussion gets to which SHA-2 should be used, I would like to point out that SHA-512 is not only twice the width of SHA-256 but also faster to compute (anecdotally) on most 64-bit platforms.</div>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_8134649260211627652gmail_signature"><div dir="ltr"><div>Marcos Eliziário Santos<br>mobile/whatsapp/telegram: +55(21) 9-8027-0156</div><div>skype: <a href="mailto:marcos.eliziario@gmail.com" target="_blank">marcos.eliziario@gmail.com</a></div><div>linked-in : <a href="https://www.linkedin.com/in/eliziario/" target="_blank">https://www.linkedin.com/in/eliziario/</a></div><div><br></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Marcos Eliziário Santos<br>mobile/whatsapp/telegram: +55(21) 9-8027-0156</div><div>skype: <a href="mailto:marcos.eliziario@gmail.com" target="_blank">marcos.eliziario@gmail.com</a></div><div>linked-in : <a href="https://www.linkedin.com/in/eliziario/" target="_blank">https://www.linkedin.com/in/eliziario/</a></div><div><br></div></div></div>