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

Custom AES encryption key #522

Closed
subzero911 opened this issue Feb 14, 2023 · 6 comments
Closed

Custom AES encryption key #522

subzero911 opened this issue Feb 14, 2023 · 6 comments

Comments

@subzero911
Copy link

subzero911 commented Feb 14, 2023

Is it possible to encrypt values with the custom AES key?
I was wondering why it is encrypted "by itself" and does not require the user to enter some secret key. So I examined the source https://github.com/mogol/flutter_secure_storage/blob/develop/flutter_secure_storage/android/src/main/java/com/it_nomads/fluttersecurestorage/ciphers/StorageCipher18Implementation.java

...and found this 😱
image
Then it's used to encrypt values:
image

Looks like it is always encrypted with the same hardcoded key, moreover, which is publicly accessible! Seems not secure at all.

@subzero911 subzero911 changed the title Custom encryption AES key Custom AES encryption key Feb 14, 2023
@marcotrumpet
Copy link

@subzero911 do you receive an answer to this? @mogol can you give some clarification?

@subzero911
Copy link
Author

No, I didn't but it looks like a legacy code.
I hadn't found that it is used anywhere.

@tianli91
Copy link

tianli91 commented Mar 15, 2023

The PerferenceKey is not the AES key. Instead it is used to fetch the encrypted key.

Btw I want to raise request to change the key size to 32 for AES-256.

@BraveEvidence
Copy link

This will help https://www.youtube.com/watch?v=JogvnnaJ8TI

@Den-creator
Copy link

Was preferencesKeyPrefix implemented for solving above described issue ???

@juliansteenbakker
Copy link
Owner

The fix for this issue will be discussed in #769

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

No branches or pull requests

6 participants