Comments (2)
The current logic:
- We load MIME message to store locally
- We encrypt the given input stream using KeyStoreCryptoManager(it uses Android Keystore). The last one uses
AES/CBC/PKCS7Padding
to encrypt the given input stream via CipherOutputStream. I didn't investigate performance at this point yet. - Later we open a locally saved MIME message(that was encrypted). For that, we use KeyStoreCryptoManager and CipherInputStream. And at this stage we have a performance issue. For example, on my device(not cheap) decryption of 19Mb(a large message with attachments. For example sent by
FES
) takes around 40 seconds. Slower devices have a worse situation. CipherInputStream is a reason. It has a very bad performance, ref 2.
So after some research, I decided to use PGPailnless in combination with KeyStoreCryptoManager
A new logic will look:
- When a user adds a new account we create a random passphrase(
PGP_PASS
) viaUUID.randomUUID()
(it uses SecureRandom) and EC(curve25519
) PGP private key(PGP_KEY
) ecnrypted by this passphrase. - We encrypt the passphrase and private key by
KeyStoreCryptoManager(Android Keystore)
and save them in the local database in the account settings. - After that we use
PGP_PASS
andPGP_KEY
to store a MIME message locally and read it. - These changes does great performance improvements. On my device decryption of 19Mb(a large message with attachments. For example sent by
FES
) takes around 3-4 seconds.
in short: instead of using Android Keystore
to encrypt/decrypt a MIME message to work with them locally we will use Android Keystore
to decrypt/encrypt PGP_PASS
and PGP_KEY
, and use them to encrypt/decrypt a MIME message to work with them locally.
@tomholub What do you think?
from flowcrypt-android.
- test migration from 1.4.8 to 1.4.9
from flowcrypt-android.
Related Issues (20)
- Update semaphore CI settings to export full logcat
- Implement semaphore's Test reports feature HOT 1
- Fix tests warnings
- version 1.5.2 release enterprise Feb 7 HOT 1
- Test with Gradle Managed Devices HOT 1
- [Feature Request] Single Sign-On login option HOT 2
- Use SVG instead of PNG
- The setup process for SMTP/IMAP login options cannot be completed after attempting to load the private key file. HOT 7
- Remove unused images HOT 1
- Use SVG as bg_lock_seamless.png
- version 1.5.4(1.5.3 was skipped due to the wrong branch) HOT 2
- Use file schema as source for outgoing messages
- Many com.flowcrypt.email.util.exception.ManualHandledException error reports HOT 1
- App crashes when try to preview an encrypted attachment
- try new Semaphore machines starting from March 1, 2024
- Update compileSdkVersion and targetSdkVersion to 34
- Improve notifications about outgoing messages
- use Document Provider for embedded attachments HOT 1
- Starting FGS without a type' when executing the code on Android 14
- Use Android 14 for CI emulator
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flowcrypt-android.