Hi Jay,
Big thanks for the tests.
Botan uses ARM hardware acceleration by default: 
https://botan.randombit.net/handbook/hardware_acceleration.html.
But ARMv7 has it only for SHA-256, not for SHA-384 or SHA-512 (ARMv8 is 
needed). It is probably the reason for the big difference between SHA-256 and 
others. (3x is what many claimed for the acceleration).
OK. The problem does not exist.
Eduard
-----Original Message-----
From: Jay Acuna via NANOG <[email protected]> 
Sent: Wednesday, September 10, 2025 18:04
To: North American Network Operators Group <[email protected]>
Cc: Jay Acuna <[email protected]>
Subject: Re: MD5 is slow

On Wed, Sep 10, 2025 at 8:20 AM nanog--- via NANOG <[email protected]> 
wrote:
> A hash is also way faster than 5ms to compute. I suggest doing your own 
> benchmark. Run it on an old raspberry pi or one of Amazon's cheapest ARM 
> servers to be sure it's comparable to typical router CPU hardware.

Perfect.  The CPU of a Pi as in an ARMv7 is far too low to efficiently bear the 
load involved in IGP calculations for a large network.  Let alone a full BGP 
table.
Network vendors have
chosen and will choose procs and application-specific circuits adequate to the 
task for MD5 or SHA2.
This is not a problem.  If the ARM cannot hash quickly;  the gear will likely 
contain logic circuits and software modules optimized for efficient hashing to 
achieve acceptable latency.

Even that underpowered Pi Zero seems capable hashing within a 1 millisecond 
interval just fine using standard libraries.

SHA-3 is not operationally relevant, but the slowest of those algorithms still 
speed measures as hashing 4 Kilobytes within a millisecond interval.


$ ssh [email protected] 'sudo apt -y install botan >/dev/null 2>&1;  tail 
-15 /proc/cpuinfo; botan speed --buf-size=1500 --msec=1 SHA-256
SHA-384 SHA-3'
Enter passphrase for key '/home/shadowfax/.ssh/yubikey5ec01':
Confirm user presence for key *
User presence confirmed
processor : 3
model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb 
fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 
CPU revision : 4

Hardware : BCM2835
Revision : 902120
Serial : 000000002d61f097
Model : Raspberry Pi Zero 2 W Rev 1.0

SHA-256 hash buffer size 1500 bytes: 24.384 MiB/sec (0.026 MiB in 1.056 ms)
SHA-384 hash buffer size 1500 bytes: 7.719 MiB/sec (0.009 MiB in 1.112 ms)
SHA-3(512) hash buffer size 1500 bytes: 4.254 MiB/sec (0.004 MiB in 1.009 ms) $

--
-JA
_______________________________________________
NANOG mailing list
https://lists.nanog.org/archives/list/[email protected]/message/26VERQILEBYPG4QJ6KGMN2B445WPB72X/
_______________________________________________
NANOG mailing list 
https://lists.nanog.org/archives/list/[email protected]/message/YQ5FG3PF5T53TBS2MXRKKOPQKFAKRSII/

Reply via email to