This brings support for webcrypto and switching from cryptojs to webcrypto implementation. Switching to WebCrypto should be :
backward compatible with all previous auto-decrypt links/remember-me so people won't be logged out
NOT backward compatible with old password_template versions (because we need to add async capabilities, so the template needs to change)
This is heavily inspired by #139 (thank you very much for that PR @hurrymaplelad , it has been very useful!), and edited for backward compatibility. The PR also detects which password_template version the user is running, and tries to nudge them towards using WebCrypto.
Trying to make everything as backward compatible as possible makes the code sort of a mess and hard to reason about, but I wanted to put out something that could use WebCrypto in version 2.x so people can be nudged towards it. This will be the last update in 2.x appart from bugfixes, next will be a lot of clean up working towards 3.x, where I have a few nice ideas for improvement.
Anyone can feel free to review this and comment, especially the webcryptoEngine.js part. I'll do some more tests and merge in a short while.
This brings support for webcrypto and switching from cryptojs to webcrypto implementation. Switching to WebCrypto should be :
This is heavily inspired by #139 (thank you very much for that PR @hurrymaplelad , it has been very useful!), and edited for backward compatibility. The PR also detects which password_template version the user is running, and tries to nudge them towards using WebCrypto.
Trying to make everything as backward compatible as possible makes the code sort of a mess and hard to reason about, but I wanted to put out something that could use WebCrypto in version 2.x so people can be nudged towards it. This will be the last update in 2.x appart from bugfixes, next will be a lot of clean up working towards 3.x, where I have a few nice ideas for improvement.
Anyone can feel free to review this and comment, especially the
webcryptoEngine.js
part. I'll do some more tests and merge in a short while.