Identity/AttachedServices/Key Stretching Performance Tests: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 16: Line 16:
|-
|-
! [4] 20kPBKDF + emscripten(scrypt(64k,8,1)) + 20kPBKDF
! [4] 20kPBKDF + emscripten(scrypt(64k,8,1)) + 20kPBKDF
| -- || -- || -- || -- || -- || --
| 0.28 ops/sec ±26.77% (6 runs sampled) || 0.31 ops/sec ±1.46% (6 runs sampled) || 0.05 ops/sec ±25.20% (5 runs sampled) || <span style='font-size:43px'>&#9760;</span> || -- || --
|-
|-
|}
|}
Line 25: Line 25:
* [2] '''20k*PBKDF+scrypt(64k,8,1)+20k*PBKDF''' keyStretch.derive(email, password) - Full Key Stretch with a remote scrypt helper at "http://scrypt.dev.lcip.org/" (EC2 m1.small, est scrypt(64k,8,1) time = 2.2s).  [https://wiki.mozilla.org/Identity/AttachedServices/KeyServerProtocol#stretch-KDF #stretch-KDF + #main-KDF]
* [2] '''20k*PBKDF+scrypt(64k,8,1)+20k*PBKDF''' keyStretch.derive(email, password) - Full Key Stretch with a remote scrypt helper at "http://scrypt.dev.lcip.org/" (EC2 m1.small, est scrypt(64k,8,1) time = 2.2s).  [https://wiki.mozilla.org/Identity/AttachedServices/KeyServerProtocol#stretch-KDF #stretch-KDF + #main-KDF]
* [3]  '''20kPBKDF + local(scrypt(64k,8,1)) + 20kPBKDF'''
* [3]  '''20kPBKDF + local(scrypt(64k,8,1)) + 20kPBKDF'''
* [4]  '''20kPBKDF + emscripten(scrypt(64k,8,1)) + 20kPBKDF'''  Using the [https://github.com/tonyg/js-scrypt Pure-Javascript Emscripten-compiled scrypt routine]
* [4]  '''20kPBKDF + emscripten(scrypt(64k,8,1)) + 20kPBKDF'''  Using the [https://github.com/tonyg/js-scrypt Pure-Javascript Emscripten-compiled scrypt routine]. Modified 'TOTAL_MEMORY' to 'scrypt_module_factory(134217728);'


Note that the m1.small instance runs scrypt in 2.2s, whereas the more cost-effective (given serious load) c1.medium or c1.xlarge instances will run it in 1.0s .
Note that the m1.small instance runs scrypt in 2.2s, whereas the more cost-effective (given serious load) c1.medium or c1.xlarge instances will run it in 1.0s .
Line 35: Line 35:
* "ops/sec" stands for operations per second. That is how many times a test is projected to execute in a second.
* "ops/sec" stands for operations per second. That is how many times a test is projected to execute in a second.
* A test is repeatedly executed until it reaches the minimum time needed to get a percentage uncertainty for the measurement of less than or equal to 1%. The number of iterations will vary depending on the resolution of the environment’s timer and how many times a test can execute in the minimum run time. We collect completed test runs for 5 seconds (configurable), or at least 5 runs (also configurable), and then perform statistical analysis on the sample. So, a test may be repeated 100,000 times in 50 ms (the minimum run time for most environments), and then repeated 100 times more (5 seconds). A larger sample size (in this example, 100), leads to a smaller margin of error.
* A test is repeatedly executed until it reaches the minimum time needed to get a percentage uncertainty for the measurement of less than or equal to 1%. The number of iterations will vary depending on the resolution of the environment’s timer and how many times a test can execute in the minimum run time. We collect completed test runs for 5 seconds (configurable), or at least 5 runs (also configurable), and then perform statistical analysis on the sample. So, a test may be repeated 100,000 times in 50 ms (the minimum run time for most environments), and then repeated 100 times more (5 seconds). A larger sample size (in this example, 100), leads to a smaller margin of error.
'''Hardware Used'''
* Firefox Desktop, Google Chrome - MacBook Pro 2.7 GHz i7, 16 GB 1600MHz DDR3
* Firefox OS - Keon (Snapdragon S1 7225AB 1Ghz, 512 RAM)
* Firefox Android, Android Webview - Nexus 4 (1.512 GHz quad-core, 2GB RAM)


Test Suite Page: [http://v14d.com/picl/benchmark.html http://v14d.com/picl/benchmark.html]
Test Suite Page: [http://v14d.com/picl/benchmark.html http://v14d.com/picl/benchmark.html]
Confirmed users
43

edits