[python-committers] Publish better than md5sums of Python builds?

2021-03-16 Thread Julien Palard via python-committers
Hi,

Someone on Mastodon had me noticed that:

=> https://www.python.org/downloads/release/python-392/

gives the md5 sum of Python builds, and that we should probably do better.

What about sha256? Has it been discussed already?

Bests,
--
[Julien Palard](https://mdk.fr)

___
python-committers mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-committers.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/M5LUTV7MRIJHHSWJJRN5TJJG3KUVBVBU/
Code of Conduct: https://www.python.org/psf/codeofconduct/


[python-committers] Re: Publish better than md5sums of Python builds?

2021-03-16 Thread Karthikeyan
This was raised in python.org github issues

https://github.com/python/pythondotorg/issues/1227
https://github.com/python/pythondotorg/issues/1512


Regards,
Karthikeyan S

On Tue, Mar 16, 2021, 7:30 PM Julien Palard via python-committers <
[email protected]> wrote:

> Hi,
>
> Someone on Mastodon had me noticed that:
>
> => https://www.python.org/downloads/release/python-392/
>
> gives the md5 sum of Python builds, and that we should probably do better.
>
> What about sha256? Has it been discussed already?
>
> Bests,
> --
> [Julien Palard](https://mdk.fr)
>
> ___
> python-committers mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-committers.python.org/
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/M5LUTV7MRIJHHSWJJRN5TJJG3KUVBVBU/
> Code of Conduct: https://www.python.org/psf/codeofconduct/
>
___
python-committers mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-committers.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/3RJ7FFYUHBF32RASQXGOMBRWPILLKUFY/
Code of Conduct: https://www.python.org/psf/codeofconduct/


[python-committers] Re: Publish better than md5sums of Python builds?

2021-03-16 Thread Christian Heimes
On 16/03/2021 14.59, Julien Palard via python-committers wrote:
> Hi,
> 
> Someone on Mastodon had me noticed that:
> 
> => https://www.python.org/downloads/release/python-392/
> 
> gives the md5 sum of Python builds, and that we should probably do better.
> 
> What about sha256? Has it been discussed already?

Hi Julien,

could you please explain your use case? Which problem are you trying to
solve? How would a sha256 checksum help you solve that problem?

Christian
___
python-committers mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-committers.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/C4JQAZ6TXTFS4XQ6BQIOCPAOHTXZARYL/
Code of Conduct: https://www.python.org/psf/codeofconduct/


[python-committers] Re: Publish better than md5sums of Python builds?

2021-03-16 Thread Julien Palard via python-committers
Le 2021-03-16 à 15:52, Christian Heimes a écrit :
> could you please explain your use case? Which problem are you trying to
> solve? How would a sha256 checksum help you solve that problem?

No, I'm just forwarding the surprise of a user seen on a random social
network (I'm monitoring the python hashtag on mastodon those days).

Feel free to follow-up with the original poster:

=> https://mastodon.technology/@musicmatze/105898597559877474

(mastodon does not need you to have an account on mastodon.technology in
particular, any mastodon account will do to interact with him, or ask me
to ask him an email in private if you prefer).

--
[Julien Palard](https://mdk.fr)

___
python-committers mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-committers.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/OW2G45UUYLUQLBN7PKJBQKGHJ63VJBYB/
Code of Conduct: https://www.python.org/psf/codeofconduct/


[python-committers] Re: Publish better than md5sums of Python builds?

2021-03-16 Thread Christian Heimes
On 16/03/2021 16.54, Julien Palard wrote:
> Le 2021-03-16 à 15:52, Christian Heimes a écrit :
>> could you please explain your use case? Which problem are you trying to
>> solve? How would a sha256 checksum help you solve that problem?
> 
> No, I'm just forwarding the surprise of a user seen on a random social
> network (I'm monitoring the python hashtag on mastodon those days).

The MD5 fingerprint is really just a checksum to detect download issues.
Any checksum would do the trick, even CRC-32. We could (and should)
replace the MD5 fingerprint with SHA-256 or SHA-512 [1].

In our case SHA-256 checksums don't provide any real benefit over MD5.
Security and data integrity is provided by TLS / HTTPS and optionally by
GPG signatures. The Python source code and checksums are provided by the
same server. If an attacker is able to modify the tar ball, then it's
likely they can replace the checksum information, too.

tl;dr If you want to check for partial / bad downloads, then MD5 is
still OK. If you want to check for compromised files, then simple
SHA-256 checksums provide no extra security. GPG signatures are
problematic because GPG is awful. Sigstore [2] might become an
alternative in the future.

Christian

[1] On modern hardware SHA-512 is up to 50% faster than SHA-256.
[2] https://sigstore.dev/
___
python-committers mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-committers.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/RCFCPK5LSGKZ4LVZ4UHB2R52MD4CWTFV/
Code of Conduct: https://www.python.org/psf/codeofconduct/


[python-committers] Re: Publish better than md5sums of Python builds?

2021-03-16 Thread Senthil Kumaran
On Tue, Mar 16, 2021 at 9:42 AM Christian Heimes  wrote:
> GPG signatures are
> problematic because GPG is awful.

What is the problem here? Most of the verification for external
downloads, at the moment, seems to be via GPG.

> Sigstore [2] might become an alternative in the future.

TIL. Seems very recent -
https://security.googleblog.com/2021/03/introducing-sigstore-easy-code-signing.html

Thank you,
Senthil
___
python-committers mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-committers.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/POCU6KG5BKAQNIUDBFSRCPXKYNRX5KQN/
Code of Conduct: https://www.python.org/psf/codeofconduct/


[python-committers] Re: Publish better than md5sums of Python builds?

2021-03-16 Thread Gregory P. Smith
On Tue, Mar 16, 2021 at 9:42 AM Christian Heimes 
wrote:

> On 16/03/2021 16.54, Julien Palard wrote:
> > Le 2021-03-16 à 15:52, Christian Heimes a écrit :
> >> could you please explain your use case? Which problem are you trying to
> >> solve? How would a sha256 checksum help you solve that problem?
> >
> > No, I'm just forwarding the surprise of a user seen on a random social
> > network (I'm monitoring the python hashtag on mastodon those days).
>
> The MD5 fingerprint is really just a checksum to detect download issues.
> Any checksum would do the trick, even CRC-32. We could (and should)
> replace the MD5 fingerprint with SHA-256 or SHA-512 [1].
>
> In our case SHA-256 checksums don't provide any real benefit over MD5.
>

The benefit of listing the sha256 for files is that it prevents this
question coming up again and again because md5 is old and rightfully on the
"never use" list for many people. Even if there are situations where it is
fine as an effective improvement over a CRC.


> Security and data integrity is provided by TLS / HTTPS and optionally by
> GPG signatures. The Python source code and checksums are provided by the
> same server. If an attacker is able to modify the tar ball, then it's
> likely they can replace the checksum information, too.
>

People do look at https://python.org/ to get the official checksums of the
downloads at a much different time than the tarball they have lying around
was downloaded.  Hosting them serves as an easy way to check the integrity
of what they already got at some previous time.

Lets not let perfect be the enemy of the good here.

What do other things hosting downloads do?  I see some that list only
sha256.  I see others that list both.  I don't really care which we do so
long as we include something standard not red-flagged as broken due to
collisions.

-gps
___
python-committers mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-committers.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/TINZ4XETYKG3DLZENBZY22X7F4QVUYL7/
Code of Conduct: https://www.python.org/psf/codeofconduct/


[python-committers] Re: Publish better than md5sums of Python builds?

2021-03-16 Thread Ned Deily
On Mar 16, 2021, at 16:16, Gregory P. Smith  wrote:
> The benefit of listing the sha256 for files is that it prevents this question 
> coming up again and again because md5 is old and rightfully on the "never 
> use" list for many people. Even if there are situations where it is fine as 
> an effective improvement over a CRC.

I agree that the primary reason for making the change is to eliminate these 
kinds of discussions :)  In fact, there has been an open issue on the 
python.org tracker for some time to do just that; see 
https://github.com/python/pythondotorg/issues/1227.  It will also require 
co-ordination with release managers as we are the ones who populate the data, 
if anyone feels motivated to dig into the webside code.

--
  Ned Deily
  [email protected] -- []

___
python-committers mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-committers.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/XORTTVQ23N76DK2W6NAXW5M6NW52EPQU/
Code of Conduct: https://www.python.org/psf/codeofconduct/


[python-committers] Re: Publish better than md5sums of Python builds?

2021-03-16 Thread Petr Viktorin

On 16. 03. 21 21:16, Gregory P. Smith wrote:
On Tue, Mar 16, 2021 at 9:42 AM Christian Heimes > wrote:


On 16/03/2021 16.54, Julien Palard wrote:
 > Le 2021-03-16 à 15:52, Christian Heimes a écrit :
 >> could you please explain your use case? Which problem are you
trying to
 >> solve? How would a sha256 checksum help you solve that problem?
 >
 > No, I'm just forwarding the surprise of a user seen on a random
social
 > network (I'm monitoring the python hashtag on mastodon those days).

The MD5 fingerprint is really just a checksum to detect download issues.
Any checksum would do the trick, even CRC-32. We could (and should)
replace the MD5 fingerprint with SHA-256 or SHA-512 [1].

In our case SHA-256 checksums don't provide any real benefit over MD5.


The benefit of listing the sha256 for files is that it prevents this 
question coming up again and again because md5 is old and rightfully on 
the "never use" list for many people. Even if there are situations where 
it is fine as an effective improvement over a CRC.


Security and data integrity is provided by TLS / HTTPS and optionally by
GPG signatures. The Python source code and checksums are provided by the
same server. If an attacker is able to modify the tar ball, then it's
likely they can replace the checksum information, too.


People do look at https://python.org/  to get the 
official checksums of the downloads at a much different time than the 
tarball they have lying around was downloaded.  Hosting them serves as 
an easy way to check the integrity of what they already got at some 
previous time.


Exactly. I've offered a Flash drive with Python at install parties with 
slow wi-fi before. Allowing people to easily check against 
https://python.org would have been nice to have.



Lets not let perfect be the enemy of the good here.

What do other things hosting downloads do?  I see some that list only 
sha256.  I see others that list both.  I don't really care which we do 
so long as we include something standard not red-flagged as broken due 
to collisions.

___
python-committers mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-committers.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/JLR7DFRD7ETMLALJEYK2DRRAJPVUCGW5/
Code of Conduct: https://www.python.org/psf/codeofconduct/