Closed SailReal closed 3 months ago
The recent changes significantly enhance the application's database management and cryptographic capabilities. This includes an upgrade from version 12 to 13 of the database schema, introducing robust testing to ensure data integrity during transitions. New features for managing vault passwords with varying encryption modes (CBC and GCM) improve security practices and streamline user authentication, ultimately enriching the user experience and maintaining the application's integrity.
Files | Change Summary |
---|---|
data/build.gradle |
Updated schemaVersion from 12 to 13 to signify database changes. |
data/src/androidTest/java/... |
Added upgrade12To13 test method to validate the database upgrade, incorporating new encryption logic for sensitive data. |
data/src/main/java/... |
Enhanced DatabaseUpgrades to include new upgrade functionality. Implemented Upgrade12To13 for migrating to the new schema. |
data/src/main/java/... |
Introduced new class Upgrade12To13.kt for the database upgrade process, including methods for altering table structures and handling encryption modes. |
data/src/main/java/... |
Modified CloudEntityMapper to reflect changes in how cloud storage URIs are represented, enhancing data conversion methods. |
domain/src/main/java/... |
Introduced ListCBCEncryptedPasswordVaults use case for managing CBC vaults. Refactored RemoveStoredVaultPasswords to streamline password management. |
presentation/src/main/... |
Enhanced presenters to include new use cases for vault management and updated methods to handle password encryption modes. |
presentation/src/main/res/... |
Added new dialog and string resources for user interactions regarding vault migrations and biometric authentication. |
util/src/main/java/... |
Introduced CryptoMode enum and utility methods for cryptographic byte array handling. Refactored cryptographic classes for improved flexibility and security. |
util/src/androidTest/java/... |
Updated tests for CredentialCryptor and KeyStoreBuilder to utilize parameterized testing for various cryptographic modes. |
🐇 Hopping through the code with glee,
New features abound, oh what a spree!
Vaults secure, with modes we can choose,
CBC or GCM, no data to lose!
Biometric bliss, passwords take flight,
In this land of encryption, all feels right! 🥕✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This pull request introduces a security enhancement by changing how vault passwords and cloud credentials are encrypted. Starting with this PR, new vault passwords and cloud credentials will be encrypted using AES with 256 bit key length GCM with biometric authentication.
Key Changes
Security Considerations
Conclusion
This PR enhances our application's security posture by transitioning to a more robust encryption method. The switch to AES with 256 bit key length GCM aligns with industry best practices for data encryption and integrity, providing our users with stronger protection for their sensitive information. The previous implementation, while secure within the Android ecosystem, has been improved upon to meet evolving security standards.