Skip to content

Speed up the checksum computation in the verification extension

  • Back in 2015, DAVE used to rely on a native call (`nsICryptoHash`) which is not
    available anymore to WebExtensions. It was so fast that we never felt
    the need to measure how many seconds it took; probably less than 5.
    • The WebExtension relies on the Forge library and takes 45
      seconds on a Core i5 M520, around 10 times more.

Asking upstream a new API for checksum calculation sounds hard as it
would require lobbying both Mozilla and Chrome. An alternative could be
to rewrite the checksum calculation in
[WebAssembly](https://developer.mozilla.org/en-US/docs/WebAssembly).

This could be a good starter task for someone who knows JavaScript and WebAssembly as the README of the verification extension has detailed instructions for how to test it locally:

https://git.tails.boum.org/verification-extension/tree/README

Related issues

Original created by @sajolida on 16905 (Redmine)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information