mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-11-06 19:01:14 +00:00
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.