Repository navigation
3.3.1
Shrunk apps keep working: a desktop app minified with R8 or ProGuard keeps its keys in the OS secret store, and an Android release build no longer stops on a missing Compose annotation. Plus a store restored without its keys is cleaned up again, and Android 6.0 is supported. Drop-in upgrade: no API change, and every value you can read today stays readable.
implementation("eu.anifantakis:ksafe:3.3.1")
implementation("eu.anifantakis:ksafe-compose:3.3.1") // optional
implementation("eu.anifantakis:ksafe-biometrics:3.3.1") // optionalChanged
- Android: the minimum API level is now 23 (Android 6.0), down from 24 — #41, thanks @DevSrSouza. API 23 behaves like 24–27: no StrongBox and no
setUnlockedDeviceRequired.
Compose Desktop release builds: one extra step
R8 reads KSafe's new keep rules from the jar by itself. ProGuard does not, and a Compose Desktop release build runs ProGuard, so upgrading alone does not fix such an app. Copy ksafe.pro (and ksafe-biometrics.pro if you use it) into your project and list it:
compose.desktop {
application {
buildTypes.release.proguard {
configurationFiles.from(project.file("ksafe.pro"))
}
}
}Worth knowing:
- Was your app affected? In a release build,
ksafe.protectionInforeportsSOFTWAREwith the notejvm_os_vault_unavailable. Once the rules are in place, keys written in that state move to the OS store on first use. - A plain enum needs
@Serializablein a shrunk desktop app, or the serialization plugin in the module that stores it. R8 and ProGuard remove thevalues()that kotlinx.serialization looks up by reflection.
Fixes
- JVM: a shrunk desktop app keeps its keys in the OS secret store. R8 and ProGuard broke the JNA bridges to the macOS Keychain, Windows DPAPI and the Linux Secret Service, so KSafe kept its AES keys in the data file instead.
- JVM: an obfuscating ProGuard build reads and writes the store again; every write failed with
Field value_ ... not found. - Desktop biometrics: a shrunk app keeps the native bridges behind Touch ID and Windows Hello. A permissive
verifyBiometricreturnedtruewithout showing a prompt. - Android: R8 no longer stops a release build on
Missing class androidx.compose.runtime.Stable. The AAR now ships the consumer rule. - All platforms: a store restored without its keys has its encrypted entries removed again — #40, thanks @FranciscoSalesCarvalho. Startup created a new master key before the orphan sweep ran, so after an Android backup restore, an iOS restore onto another iPhone or a lost JVM key file, unreadable
DEFAULTentries stayed for good. The docs now say what a restore brings back on each platform. 📖 docs/SECURITY_MODEL.md
Details: CHANGELOG.md
Full Changelog: 3.3.0...3.3.1