On Fri, Apr 12, 2013 at 10:43 AM, Niels Möller <[email protected]> wrote:

> Nikos Mavrogiannopoulos <[email protected]> writes:
>
> > It is a bit unfair to compare umac with plain hashes.
> For large messages I think it is fair; the O(n) work is the same for
> hash and hmac-hash; hmac only adds O(1) work of hashing some short
> constant-size strings. And the benchmark program only tries to measure
> the O(n) term.
>

That's correct if you are thinking about long messages. In practice,
however, MACs are used with short messages. In TLS a MAC is used with a
message that has a maximum of a 15kb, and in DTLS most messages are around
the ethernet packet size (1500 bytes). At these sizes any overhead O(1) may
be critical to performance.


> > In the last patch
> > there was an addition to the benchmarks to have HMAC performance as well.
> Sorry I missed that. Was there really any measureable difference between
> hash and hmac-hash? The "update" processing is the same (except perhaps
> an additional function call).
>

I don't remember. It was a different test. I only have a copy of the mail I
sent you and the numbers were the following:
        umac-aes-4        full  737.86
        umac-aes-8        full  801.11
       umac-aes-12        full  771.41
       umac-aes-16        full  724.91
          hmac-md5        full  481.41
         hmac-sha1        full  437.43
       hmac-sha256        full  171.49
     hmac-sha3_256        full  200.44

On the same system now I get:
               md5      update  506.93
              sha1      update  446.76
            sha256      update  197.33
          sha3_256      update  231.99

and for UMAC:
            umac32      update 3596.71
            umac64      update 1967.24
            umac96      update 1564.06
           umac128      update 1304.87


regards,
Nikos
_______________________________________________
nettle-bugs mailing list
[email protected]
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to