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

Set encryption back to AES-128 #8657

Closed
laurent22 opened this issue Aug 12, 2023 · 5 comments
Closed

Set encryption back to AES-128 #8657

laurent22 opened this issue Aug 12, 2023 · 5 comments
Labels
bug It's a bug desktop All desktop platforms high High priority issues mobile All mobile platforms

Comments

@laurent22
Copy link
Owner

For now we set it back to AES-128 due to severe performance issues on certain devices with certain resources.

#8619

@laurent22 laurent22 added bug It's a bug mobile All mobile platforms desktop All desktop platforms high High priority issues v2.12 labels Aug 12, 2023
@personalizedrefrigerator
Copy link
Collaborator

personalizedrefrigerator commented Aug 13, 2023

Another option could be to use AES 256 for items under a certain size (e.g. < 1 MiB) and AES 128 for larger items.

@laurent22
Copy link
Owner Author

Another option could be to use AES 256 for items under a certain size (e.g. < 1 MiB) and AES 128 for larger items.

Hmm, not sure about this. I don't think it makes sense to have more secure method for some notes, and a less secure one for other notes. I'm also not convinced it's a good short term solution because maybe the slow decryption issue will still happen on some devices since we are not able to replicate it.

I'm more keen to either replicate and fix the issue for all data, or to switch to native encryption if we can.

@personalizedrefrigerator
Copy link
Collaborator

personalizedrefrigerator commented Aug 14, 2023

switch to native encryption if we can.

I'm currently looking at libsodium, which has community-developed bindings for React Native and NodeJS. With libsodium, we would probably use ChaCha20-Poly1305 encryption, as the libsodium documentation recommends it over AES-256 GCM.

@wh201906
Copy link
Contributor

we would probably use ChaCha20-Poly1305 encryption

I think the recommended algorithm is XChaCha20-Poly1305 rather than ChaCha20-Poly1305

@laurent22
Copy link
Owner Author

Yes that's fine to switch to a different algorithm, especially if it's more secure and performant. Notes encrypted with old algorithms will still be decryptable because we'll leave the decryption methods in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug desktop All desktop platforms high High priority issues mobile All mobile platforms
Projects
None yet
Development

No branches or pull requests

3 participants