Closed jeprojects closed 6 years ago
That's a correct observation. Will need to identity the long running APIs (such as password hashing) and move them to a background task
Shouldn't all crypto related tasks be moved to a background task rather than the one the UI is using ?
I can see a case where decrypting and encrypting a large amount of messages using ChaChaPoly cause cause UI issues.
Not sure if all crypto tasks needs to run in a background task. Creating and executing background tasks are not free. Most crypto task are lightweight, having them execute in the background only costs valuable CPU cycles. Maybe providing an option to run a crypto task in the foreground/background is the answer. Will need to measure on both Android and iOS.
That sounds perfect.
FYI: just pushed a commit to the develop branch adding support for running crypto operations on a background in Android. By default all crypto APIs execute on the UI thread, except for crypto_pwhash. Works beautifully.
iOS is work in progress.
Is it executing the libsodium-jni calls in android on the main thread?
This happens when doing crypto calls like Argon2.