Skip to content

Commit 7ae0336

Browse files
committed
perf(crypto): Shrink BC footprint and keep only ChaCha20-Poly1305
1 parent 3d82c4f commit 7ae0336

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ androidxTestExt = "1.2.1"
1111
androidxTestRunner = "1.6.2"
1212
androidxTracing = "1.3.0"
1313
androidxWindowManager = "1.3.0"
14-
bouncyCastle = "1.78.1"
14+
bouncyCastle = "1.70"
1515
dokka = "2.0.0"
1616
junit4 = "4.13.2"
1717
kotlin = "2.1.0"
@@ -41,7 +41,7 @@ androidx-test-ext = { group = "androidx.test.ext", name = "junit-ktx", version.r
4141
androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "androidxTestRunner" }
4242
androidx-tracing-ktx = { group = "androidx.tracing", name = "tracing-ktx", version.ref = "androidxTracing" }
4343
androidx-window-core = { group = "androidx.window", name = "window-core", version.ref = "androidxWindowManager" }
44-
bouncy-castle-provider = { group = "org.bouncycastle", name = "bcprov-jdk15to18", version.ref = "bouncyCastle" }
44+
bouncy-castle-provider = { group = "org.bouncycastle", name = "bcprov-jdk15on", version.ref = "bouncyCastle" }
4545
kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version.ref = "kotlin" }
4646
kotlin-test = { group = "org.jetbrains.kotlin", name = "kotlin-test", version.ref = "kotlin" }
4747
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" }
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
-keep class org.bouncycastle.** { *; }
1+
# Keep BC provider (we reference it and it registers algorithms)
2+
-keep class org.bouncycastle.jce.provider.BouncyCastleProvider { *; }
3+
4+
# Keep ChaCha20-Poly1305 JCA wiring (registered via reflection)
5+
-keep class org.bouncycastle.jcajce.provider.symmetric.ChaCha** { *; }

0 commit comments

Comments
 (0)