On Sun, 2018-07-08 at 19:45 +0100, Jonathan Dieter wrote: > On Fri, 2018-07-06 at 11:48 +0000, Michael Schroeder wrote: > > Ah, no, I think you misunderstood. Do *not* add md5 support. In fact, > > I'd ask you to remove sha1 support as well to make your code smaller. > > > > My point is that you shouldn't use 20 bytes just for chunk identification > > purposes. As you said, it doesn't need to be cryptographically sound, we > > don't have to make sure it withstands an attacker. > > Just use the first 8 bytes of the sha256 sum instead (or sha512, as > > it's a bit faster than sha256 IIRC). > > Ok, that makes sense. I'll add it as a new hash type (SHA512_64?) and > make it the default for the chunk checksum.
Ok, I've added two new hash types, ZCK_HASH_SHA512 and ZCK_HASH_SHA512_64. The latter is the new default for chunk hashes. https://github.com/zchunk/zchunk/commit/abdfa43ea05b1b3d6dbd3b330572abe eb0d8444f I think I'll leave the SHA1 support in, at least for a while, since it's been the default chunk hash up until now, and I'd hate to break any zchunk files that people might have created. Jonathan _______________________________________________ Rpm-ecosystem mailing list Rpm-ecosystem@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-ecosystem