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

Migrate data after changing encryption AES-CBC → AES-GCM #687

Open
Aure77 opened this issue Nov 19, 2024 · 1 comment
Open

Migrate data after changing encryption AES-CBC → AES-GCM #687

Aure77 opened this issue Nov 19, 2024 · 1 comment

Comments

@Aure77
Copy link

Aure77 commented Nov 19, 2024

Did you recommend something to migrate user data previously encrypted using AES-CBC in keychain/keystore (now deprecated and considered as a vulnerability by my security team) to AES-GCM ?
That would be nice if this library explained how to manage the algorithm transition without data loss.

@DorianMazur
Copy link
Collaborator

Hey @Aure77
The storage type is only needed for setGenericPassword, while getGenericPassword uses the cipher that was originally used to store the credentials, ensuring backward compatibility. You can implement your own migration logic: use getGenericPassword and if the cipher storage is AES_CBC, resave it with AES_GCM_NO_AUTH.

Would you prefer having an automatic upgrade logic built into the library?

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

2 participants