tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Adding SHA-512 to the list of digests


For distfile checksums, I'd like to add SHA-512 to our current mix of
SHA-1 and RMD160. The motivation for this is the new cryptanalysis
showing SHA-1 may well be forced a bit earlier, and/or a bit more
cheaply, than had been previously thought:

Even if the new analysis is overstating things (and I'm not sure it
is), it shows which way the trend is going, and it would be prudent to
add a more modern digest into the mix.

I realise all 3 digests are from the same family, but using SHA512
does add some further checking, and, yes, I'm aware of the research
that talks about issues aggregating digests, and the possibilities for
combining digests, see othersrc/external/bsd/multigest for an
implementation of that. The last time we changed a digest would have
been about 15 years ago. I'd like to get this in place in time for the
2015Q4 branch.

Technically, all that needs to be done is to add SHA512 to the list of
digests for distfiles:


cvs diff: Diffing mk/checksum
Index: mk/checksum/
RCS file: /cvsroot/pkgsrc/mk/checksum/,v
retrieving revision 1.20
diff -u -r1.20
--- mk/checksum/     16 Nov 2013 15:29:39 -0000      1.20
+++ mk/checksum/     8 Oct 2015 18:12:10 -0000
@@ -3,7 +3,7 @@
 # See for helpful comments.


 # These variables are set by pkgsrc/mk/fetch/


And then when the distinfo file is generated, it will include an
SHA512 digest as well as the others. Similarly, if a package's
distinfo does not have a SHA512 digest, it will just use the existing
SHA1 and RMD160 ones.

In this way, pkgsrc distinfo files will be updated over time to have 3
digests, with a mopping up operation for some of the packages which
aren't so volatile.

Does anyone have any problems with this?


Home | Main Index | Thread Index | Old Index