Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.security > #6371

Re: dpkg MD5

From Jeffrey Walton <noloader@gmail.com>
Newsgroups linux.debian.security
Subject Re: dpkg MD5
Date 2024-11-08 20:40 +0100
Message-ID <JGCZQ-7yop-3@gated-at.bofh.it> (permalink)
References <JGiRr-7kXL-1@gated-at.bofh.it> <JGl2V-7mo3-1@gated-at.bofh.it> <JGn4J-7nwD-1@gated-at.bofh.it> <JGnHs-7o4G-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Nov 7, 2024 at 10:12 PM Jeremy Stanley <fungi@yuggoth.org> wrote:
> [...]
>
> Probably the most convincing reason to replace such uses of MD5 is
> that we collectively get to stop wasting time answering this same
> question over and over and over...

One more datapoint that might be useful.... AMD/Intel, ARMv8 and
PowerPC offer SHA-256 acceleration, so SHA-256 outperforms MD5
calculations.

An Ice Lake machine:

   CRC-32C: 0.73 cpb
   MD5 - 5.5 cpb
   SHA256 - 2.6 cpb

A Raptor Lake machine:

   CRC-32C - 0.12 cpb
   MD5 - 1.6 cpb
   SHA256 - 0.6 cpb

An armv8+crypto machine (gcc117 from the Compile Farm)

   CRC-32C - 0.76 cpb
   MD5 - 6.3 cpb
   SHA256 - 2.7 cpb

A POWER8 machine (gcc112 from the Compile Farm)

   CRC-32C - 8.2 cpb
   MD5 - 11.3 cpb
   SHA256 - 3.7 cpb

In the mini table cpb is cycles-per-byte. The smaller the cpb the
better. cpb takes processor speed out of the equation so you can
compare algorithms across architectures.

So if Debian is building lots of *.md5sum files, it might be useful to
consider SHA-256. The calculations will be faster and use less energy.
And if cryptographic properties are not needed, then switch to
CRC-32C, which also has hardware acceleration and is even faster!

Jeff

Back to linux.debian.security | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

dpkg MD5 David Campbell <dcampbell24@gmail.com> - 2024-11-07 23:10 +0100
  Re: dpkg MD5 Jonathan Hutchins <hutchins@tarcanfel.org> - 2024-11-07 23:20 +0100
    Re: dpkg MD5 David Campbell <dcampbell24@gmail.com> - 2024-11-07 23:40 +0100
  Re: dpkg MD5 Jeremy Stanley <fungi@yuggoth.org> - 2024-11-08 01:30 +0100
    Re: dpkg MD5 Jeffrey Walton <noloader@gmail.com> - 2024-11-08 03:40 +0100
      Re: dpkg MD5 Jeremy Stanley <fungi@yuggoth.org> - 2024-11-08 04:20 +0100
        Re: dpkg MD5 debianmailinglists.hz5zm@simplelogin.com - 2024-11-08 05:20 +0100
          Re: dpkg MD5 Jeremy Stanley <fungi@yuggoth.org> - 2024-11-08 16:50 +0100
            Re: dpkg MD5 SZÉPE Viktor <viktor@szepe.net> - 2024-11-08 17:00 +0100
              Re: dpkg MD5 Jeremy Stanley <fungi@yuggoth.org> - 2024-11-08 18:30 +0100
        Re: dpkg MD5 Jeffrey Walton <noloader@gmail.com> - 2024-11-08 06:20 +0100
        Re: dpkg MD5 Jeffrey Walton <noloader@gmail.com> - 2024-11-08 20:40 +0100
  Re: dpkg MD5 Jeffrey Walton <noloader@gmail.com> - 2024-11-08 06:30 +0100
  Re: dpkg MD5 Simon Josefsson <simon@josefsson.org> - 2024-11-08 10:10 +0100

csiph-web