onionwire/android/gradle/libs.versions.toml

40 lines
2.2 KiB
TOML
Raw Permalink Normal View History

[versions]
agp = "8.13.2"
kotlin = "2.2.21"
coreKtx = "1.17.0"
activityCompose = "1.12.4"
lifecycle = "2.9.4"
navigationCompose = "2.9.8"
composeBom = "2025.12.01"
jna = "5.19.1"
coroutines = "1.11.0"
junit = "4.13.2"
feat(android): wrap the store passphrase in the Android Keystore Typing the passphrase on every launch was the v1 posture. It stays the fallback, but it is no longer required: on first unlock the passphrase can be remembered (checkbox, on by default) and is stored as an AES-256-GCM blob wrapped by a key that never leaves the Android Keystore. - crypto/StoreSecret.kt: the OWSEAL1 envelope (magic + IV + ciphertext + GCM tag) and the wipe helpers. No android.* imports, so the code that runs on a device is the code the unit tests exercise, with a JVM AES key standing in for the Keystore key. - crypto/KeystorePassphraseCipher.kt: AES-256-GCM key under alias `onionwire.store`, StrongBox requested first (API 28+) with a graceful fallback on ProviderException (StrongBoxUnavailableException is one), and an honest KeyInfo-backed report of where the key actually lives. setUserAuthenticationRequired(false) stays the default on purpose. - crypto/StoredPassphraseStore.kt: ciphertext only, at filesDir/secrets/store-passphrase.bin, written tmp+rename. A failed decrypt reports Unavailable and does NOT delete the blob. - WireViewModel: unlock(passphrase, remember), unlockStored(), forgetStoredPassphrase(); the secret CharArray is zeroed in `finally`; the Keystore probe runs off the main thread at ViewModel construction. - UnlockScreen: one-tap when a stored blob exists, the typed passphrase is dropped from Compose state as soon as it is handed over and is never put in saved instance state; "Forget stored passphrase" deletes blob and key. - androidTest: the device-only half (AndroidKeyStore, StrongBox, KeyInfo), which cannot run in the unit-test JVM. Verified: ./gradlew :app:assembleDebug and :app:testDebugUnitTest green, 25 tests / 0 failures (11 new StoreSecretTest, 9 new StoredPassphraseStoreTest).
2026-09-12 13:01:25 -04:00
androidxTestJunit = "1.3.0"
androidxTestRunner = "1.7.0"
zxing = "3.5.3"
[libraries]
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
jna = { module = "net.java.dev.jna:jna", version.ref = "jna" }
junit = { module = "junit:junit", version.ref = "junit" }
feat(android): wrap the store passphrase in the Android Keystore Typing the passphrase on every launch was the v1 posture. It stays the fallback, but it is no longer required: on first unlock the passphrase can be remembered (checkbox, on by default) and is stored as an AES-256-GCM blob wrapped by a key that never leaves the Android Keystore. - crypto/StoreSecret.kt: the OWSEAL1 envelope (magic + IV + ciphertext + GCM tag) and the wipe helpers. No android.* imports, so the code that runs on a device is the code the unit tests exercise, with a JVM AES key standing in for the Keystore key. - crypto/KeystorePassphraseCipher.kt: AES-256-GCM key under alias `onionwire.store`, StrongBox requested first (API 28+) with a graceful fallback on ProviderException (StrongBoxUnavailableException is one), and an honest KeyInfo-backed report of where the key actually lives. setUserAuthenticationRequired(false) stays the default on purpose. - crypto/StoredPassphraseStore.kt: ciphertext only, at filesDir/secrets/store-passphrase.bin, written tmp+rename. A failed decrypt reports Unavailable and does NOT delete the blob. - WireViewModel: unlock(passphrase, remember), unlockStored(), forgetStoredPassphrase(); the secret CharArray is zeroed in `finally`; the Keystore probe runs off the main thread at ViewModel construction. - UnlockScreen: one-tap when a stored blob exists, the typed passphrase is dropped from Compose state as soon as it is handed over and is never put in saved instance state; "Forget stored passphrase" deletes blob and key. - androidTest: the device-only half (AndroidKeyStore, StrongBox, KeyInfo), which cannot run in the unit-test JVM. Verified: ./gradlew :app:assembleDebug and :app:testDebugUnitTest green, 25 tests / 0 failures (11 new StoreSecretTest, 9 new StoredPassphraseStoreTest).
2026-09-12 13:01:25 -04:00
androidx-test-ext-junit = { module = "androidx.test.ext:junit", version.ref = "androidxTestJunit" }
androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidxTestRunner" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "lifecycle" }
androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycle" }
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationCompose" }
compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBom" }
compose-ui = { module = "androidx.compose.ui:ui" }
compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
compose-material3 = { module = "androidx.compose.material3:material3" }
zxing = { module = "com.google.zxing:core", version.ref = "zxing" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
android-library = { id = "com.android.library", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }