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

PKCS5 and PKCS7 are known to be vulnerable to oracle padding attacks #584

Closed
eikebartels opened this issue Jul 14, 2023 · 3 comments
Closed

Comments

@eikebartels
Copy link

This package seems to use AES-CBC-PKCS7 encryption for secure storage.

PKCS5 and PKCS7 are known to be vulnerable to oracle padding attacks in combination with CBC mode of operation. The issue occurs if an app reports failed encryption. By that, the plaintext can be restored piece by piece, as only byte-sized blocks are brute-forced.

Flutter seems to expose the EncrypredSharedPreferences of Android. They are the go-to solution. See https://pub.dev/packages/flutter_secure_storage and https://developer.android.com/reference/androidx/security/crypto/EncryptedSharedPreferences

@mkhtradm01
Copy link

This package seems to use AES-CBC-PKCS7 encryption for secure storage.

PKCS5 and PKCS7 are known to be vulnerable to oracle padding attacks in combination with CBC mode of operation. The issue occurs if an app reports failed encryption. By that, the plaintext can be restored piece by piece, as only byte-sized blocks are brute-forced.

Flutter seems to expose the EncrypredSharedPreferences of Android. They are the go-to solution. See https://pub.dev/packages/flutter_secure_storage and https://developer.android.com/reference/androidx/security/crypto/EncryptedSharedPreferences

So this happens on Android as android is using EncrypredSharedPreferences

@ernestomar
Copy link

Possible duplicate of #526?

@juliansteenbakker
Copy link
Owner

Please read #769 for an upcoming fix for this issue.

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

4 participants