Skip to content

Instantly share code, notes, and snippets.

@lvh
Created August 4, 2014 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lvh/e2e4dfd0ce0d90776616 to your computer and use it in GitHub Desktop.
Save lvh/e2e4dfd0ce0d90776616 to your computer and use it in GitHub Desktop.
CPython 2.7.8
('Darwin', 'thoreau.fritz.box', '13.3.0', 'Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64', 'x86_64', 'i386')
base setup:
ENC_KEY_SIZE = 32
INDEX_SIZE = 24
MASTER_KEY = "a" * 16
INSTANCE_KEY = "b" * 16
SALT = "c" * 16
iterations per test: 50000
blake2b_multipass.py
results: [0.2517099380493164, 0.2634298801422119, 0.2600209712982178]
best result: 0.2517099380493164
blake2b_onepass.py
results: [0.234788179397583, 0.2499229907989502, 0.2395768165588379]
best result: 0.234788179397583
hkdf_multipass.py
with hash alg: SHA256
results: [22.258602142333984, 20.818941116333008, 28.706398963928223]
best result: 20.818941116333008
hkdf_onepass.py
with hash alg: SHA256
results: [25.23731803894043, 26.237952947616577, 24.831429958343506]
best result: 24.831429958343506
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment