Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for WebCrypto in 2.x #164

Merged
merged 4 commits into from
Mar 29, 2023
Merged

Support for WebCrypto in 2.x #164

merged 4 commits into from
Mar 29, 2023

Conversation

robinmoisson
Copy link
Owner

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.

@robinmoisson robinmoisson self-assigned this Mar 26, 2023
@robinmoisson robinmoisson merged commit 2697766 into main Mar 29, 2023
@robinmoisson robinmoisson deleted the webcrypto branch March 29, 2023 15:20
This was referenced Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant