Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Overall - Added the concept of an app wallet and the corresponding code and UI to create the second wallet and switch between them - Split persistence into app-wide and wallet-wide - [Modernized the data encryption strategy](https://concordium.atlassian.net/wiki/x/BwBJWw) - Disabled the ability to create new accounts and identities in file-based wallets - Added storage migrations for full backward compatibility ### In details - Introduced the app-wide database, `AppDatabase`, while the current one, wallet-wide, is called `WalletDatabase` - Introduced the concept of app wallet, which is stored in `AppDatabase` and accessible through `AppWalletRepository` - Introduced the concept of the active wallet, which is defined by `Session` - `AppCore.session` now can be reinitialized with the `startNewSession()` method - All the wallet-wide persistence classes (DB, preferences) now have `Wallet` prefix (`WalletNotificationsPreferences`, `WalletSendFundsPreferences`, etc.) - Instances of wallet-wide persistence classes are now managed by `WalletStorage`, which is accessible through `Session` and is aware of the current active wallet. Instances are no longer created in ViewModels - All the wallet-wide persistence files now have name suffixes. The suffix corresponds to the related app wallet. This way, files and databases for different wallets can be stored independently within the same directory - Encryption IV reuse is ended – now, all the encrypted data is stored in a container (`EncryptedData`) which holds not only the ciphertext, but also the cipher transformation and IV - Use of AES CBC for identity and account secrets is ended – from now on, GCM mode is used - From now on, all the data is encrypted with a randomly generated master key, which is stored encrypted with a password-derived key. Therefore, when the password is being changed, only the master key gets re-encrypred - Cleaned up, refactored, documented `AuthenticationManager` and turned it into `AppAuth`, which handles app-wide password auth and encryption - Cleaned up and refactored `EncryptionHelper` - Passcode setup screens are now also used to change the passcode. Old passcode/password change screens have been removed - `AuthPreferences` split into `AppSetupPreferences` and `WalletSetupPreferences` - Implemented `TwoWalletsMigration` which migrates existing DB and preferences for full backward compatibility
- Loading branch information