[Cryptography] Computing the speed of a cipher or hash
Bill Stewart
billstewart at pobox.com
Thu Aug 28 01:29:34 EDT 2025
On 8/26/25 20:24, Pierre Abbat wrote:
> On Monday, August 25, 2025 5:40:28 PM EDT Jerry Leichter wrote:
>> As far as I can tell, any cycles/byte rating of code for a modern
>> CPU is either (a) actually for some fictional CPU where we count
>> one cycle per "simple" instruction, like XOR or addition, and
>> avoid "complex" instructions, which you'd expect any modern cipher
>> or hash function to do anyway; (b) based on some kind of
>> measurement that relies on, e.g., /proc/info - which really
>> doesn't mean anything except in the _exact_ scenario under which
>> it was obtained.
Performance models, like threat models, depend a lot on what you want do
with your measurements. For me,
time mycryptothing <biginputfile >/dev/null
is generally a good enough, if I want something for specific hardware,
or how many divisions, multiplications, add/lookup/etc if I'm comparing
two similar algorithms or implementations.
More information about the cryptography
mailing list