Progress
- Applied some review suggestions to this PR. Waiting for review and merge.
- Made a draft for the encryption/decryption core and a string wrapper which has a similar format like
sjcl.json.encrypt()
.- The code works on both
react-native-quick-crypto
andnode:crypto
.
- The code works on both
Plans
- Find out if the
escape()
,unescape()
,encodeURIComponent()
,decodeURIComponent()
used in Joplin andsjcl
are necessary and remove them if possible.- Related issue: Desktop sync -- sync not working -- Error: URI malformed - only index.txt gets updated · Issue #2591 · laurent22/joplin · GitHub
- Related commit: All: Fixes #2591: Handle invalid UTF-8 data when encrypting · laurent22/joplin@c6c4e95 · GitHub
- Removing these functions will reduce the size overhead for encrypted files from approximately 77.7% to 33.3%.
- If escaping is necessary for the notes, we can still implement an escape-less version for the files as they are base64 encoded.
- Continue integrating
react-native-quick-crypto
andnode:crypto
into Joplin.- Get the framework PR merged.
- Make a new PR for the encryption/decryption core and the string wrapper once the framework PR is merged.
- Integrate the string wrapper into
EncryptionService.ts
and test. - Add unit tests for the implemented methods.
- Check the compatibility of encryption parameters in
Web Crypto API
.- The priority of this task is not high.
Problems
None