mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-11-04 18:01:14 +00:00
* Encrypt stored secrets with a keystore AES-GCM key and migrate old values on read Secrets and the PIN were AES-CBC without authentication, under a random key kept in shared preferences and wrapped by a keystore RSA key with PKCS#1 v1.5 padding. They are now AES-256-GCM under a key that never leaves the Android keystore, stored as "v2:" + Base64. Old values stay readable through a read-only decrypter of the previous scheme; nothing is written in it any more and no new RSA key is created. A legacy value is re-encrypted when it is read, and replaced only once the new copy decrypts to the same text. A value that cannot be decrypted now reads as absent and is left untouched, where decrypt() used to return "" and let a caller treat it as a value. * Bind biometric unlock to a keystore key A biometric success was taken from the prompt callback alone. With strong biometrics the prompt now carries a cipher of a keystore key that requires user authentication and is invalidated when biometrics are enrolled: the first prompt seals a random token, later ones must open it, and only an opened token unlocks. If biometrics changed, biometry is turned off and the PIN is asked for. Weak biometrics (most face unlock) cannot use a keystore key and keep the plain prompt. androidx.biometric goes to 1.1.0 for the authenticator classes. * Log the light client under a fixed tag; LOG_TAG in a coroutine named the coroutine