#530 derived the Nostr private key as SHA-256(sub || index). The Google sub claim is not a secret — any app the user signs into with Google gets the same sub value for that account/OAuth-client pair, and even across clients it leaks via id_token introspection. That meant any third party with the sub could regenerate the user's nsec offline. A non-starter. Reverts to the #528 design: - GoogleSignInManager re-acquires the drive.appdata OAuth scope via AuthorizationClient - DriveBackupService reads/writes wisp_nsec_<npub>.bin blobs in the per-app appDataFolder (other apps cannot see this folder) - BackupCrypto already provided HMAC-SHA256(sub)-derived key + NIP-44 encryption; that file was not touched by #530 and is reused as-is - GoogleAuthViewModel lists backups, surfaces a chooser with avatar + display name fetched from kind-0 events, and decrypts only on explicit Restore - "Create new account" generates a fresh keypair, encrypts, and uploads a new blob The encryption key is still derived from sub, but the attack surface is fundamentally different: an attacker now needs both the sub AND read access to Wisp's appDataFolder in the user's Drive. The folder is sandboxed per-app, so the only paths in are the user's own Google account or a Wisp app compromise. That's the same trust boundary as "can sign in to the user's Google account." Splash button styling kept as-is (dark variant from #530 retained — a cosmetic choice independent of the security model). Reverts:3d3c6e1,de88bdd
73 lines
1.9 KiB
Prolog
73 lines
1.9 KiB
Prolog
# kotlinx.serialization
|
|
-keepattributes *Annotation*, InnerClasses
|
|
-dontnote kotlinx.serialization.AnnotationsKt
|
|
|
|
-keepclassmembers @kotlinx.serialization.Serializable class ** {
|
|
*** Companion;
|
|
}
|
|
-if @kotlinx.serialization.Serializable class **
|
|
-keepclassmembers class <1>$Companion {
|
|
kotlinx.serialization.KSerializer serializer(...);
|
|
}
|
|
-if @kotlinx.serialization.Serializable class ** {
|
|
static **$* *;
|
|
}
|
|
-keepclassmembers class <2>$<3> {
|
|
kotlinx.serialization.KSerializer serializer(...);
|
|
}
|
|
|
|
# secp256k1-kmp JNI
|
|
-keep class fr.acinq.secp256k1.** { *; }
|
|
|
|
# Bouncy Castle
|
|
-keep class org.bouncycastle.** { *; }
|
|
-dontwarn org.bouncycastle.**
|
|
|
|
# OkHttp — keep class names so crash stack traces are readable
|
|
-keep class okhttp3.** { *; }
|
|
-keep class okio.** { *; }
|
|
-dontwarn okhttp3.internal.platform.**
|
|
-dontwarn org.conscrypt.**
|
|
-dontwarn org.bouncycastle.**
|
|
-dontwarn org.openjsse.**
|
|
|
|
# Coil
|
|
-dontwarn coil3.**
|
|
|
|
# AndroidX Security (EncryptedSharedPreferences)
|
|
-keep class androidx.security.crypto.** { *; }
|
|
|
|
# ExoPlayer / Media3
|
|
-dontwarn androidx.media3.**
|
|
|
|
# ZXing
|
|
-keep class com.google.zxing.** { *; }
|
|
|
|
# CameraX
|
|
-keep class androidx.camera.** { *; }
|
|
-dontwarn androidx.camera.**
|
|
|
|
# ML Kit
|
|
-keep class com.google.mlkit.** { *; }
|
|
-dontwarn com.google.mlkit.**
|
|
|
|
# ObjectBox
|
|
-keep class io.objectbox.** { *; }
|
|
-dontwarn io.objectbox.**
|
|
-keep class com.wisp.app.db.** { *; }
|
|
|
|
# Breez SDK Spark (UniFFI bindings)
|
|
-keep class breez_sdk_spark.** { *; }
|
|
-dontwarn breez_sdk_spark.**
|
|
# JNA (used by Breez SDK UniFFI)
|
|
-keep class com.sun.jna.** { *; }
|
|
-dontwarn com.sun.jna.**
|
|
|
|
# Credential Manager + Google Identity
|
|
-keep class androidx.credentials.** { *; }
|
|
-dontwarn androidx.credentials.**
|
|
-keep class com.google.android.libraries.identity.googleid.** { *; }
|
|
-dontwarn com.google.android.libraries.identity.googleid.**
|
|
-keep class com.google.android.gms.auth.** { *; }
|
|
-dontwarn com.google.android.gms.auth.**
|