Hi

I just published a module used in some PBKDF2-HMAC-SHA512 testing I've
been doing under a contract with NORDUnet A/S.

  https://github.com/fredrikt/python-ndnkdf

I invoke the new PBKDF2 functions in libnettle using Python ctypes,
which achieves a ~ 25x speedup compared to the standard python-pbkdf2
that uses SHA512 from hashlib (presumably a C function), but does the
xoring in native Python.

PBKDF2-HMAC-SHA512 benchmark result :

  N=    16 -> Python ==     0 ms, Nettle ==     0 ms
  N=    32 -> Python ==     1 ms, Nettle ==     0 ms
  N=    64 -> Python ==     2 ms, Nettle ==     0 ms
  N=   128 -> Python ==     4 ms, Nettle ==     0 ms
  N=   256 -> Python ==     8 ms, Nettle ==     0 ms
  N=   512 -> Python ==    18 ms, Nettle ==     0 ms
  N=  1024 -> Python ==    35 ms, Nettle ==     1 ms
  N=  2048 -> Python ==    68 ms, Nettle ==     2 ms
  N=  4096 -> Python ==   133 ms, Nettle ==     5 ms
  N=  8192 -> Python ==   262 ms, Nettle ==    11 ms
  N= 16384 -> Python ==   521 ms, Nettle ==    22 ms

If someone has access to a modern AMD CPU, I would be very interested in
getting the benchmark output of examples/pbkdf2-plot on that machine.
Thanks.

/Fredrik


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

Reply via email to