From 1c843c7ca2c44e8daf8b5cce42f8710b8c815bc8 Mon Sep 17 00:00:00 2001 From: Alexander Gil Casas Date: Tue, 1 Dec 2026 21:07:16 +0000 Subject: [PATCH 1/3] fix(pgp): coordinate provider transactions and validate decrypted output --- .../data/crypto/OpenPgpApiBackend.kt | 25 ++- .../ui/crypto/DecryptActivity.kt | 22 ++- .../data/crypto/OpenPgpApiBackendTest.kt | 171 ++++++++++++++++++ 3 files changed, 210 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/app/passwordstore/data/crypto/OpenPgpApiBackend.kt b/app/src/main/java/app/passwordstore/data/crypto/OpenPgpApiBackend.kt index 4d518998ae..978c6704ee 100644 --- a/app/src/main/java/app/passwordstore/data/crypto/OpenPgpApiBackend.kt +++ b/app/src/main/java/app/passwordstore/data/crypto/OpenPgpApiBackend.kt @@ -17,10 +17,13 @@ import java.util.concurrent.CancellationException import javax.inject.Inject import kotlinx.coroutines.CompletableDeferred import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock import kotlinx.coroutines.withContext import kotlinx.coroutines.withTimeoutOrNull import org.openintents.openpgp.IOpenPgpService2 import org.openintents.openpgp.OpenPgpError +import org.openintents.openpgp.OpenPgpMetadata import org.openintents.openpgp.util.OpenPgpApi import org.openintents.openpgp.util.OpenPgpServiceConnection @@ -87,6 +90,7 @@ class OpenPgpApiBackend internal constructor(private val executor: OpenPgpApiExe maxOutputBytes = maxOutputBytes, interactionHandler = interactionHandler, ) { call -> + validateDecryptedOutput(call) call.output } @@ -141,7 +145,11 @@ class OpenPgpApiBackend internal constructor(private val executor: OpenPgpApiExe repeat(MAX_INTERACTION_ROUNDS) { val call = try { - executor.execute(providerPackage, request, input, maxOutputBytes) + // Coordinate every IPC round across backend instances, not the user interaction + // that may follow it. The API client and its output stream are transaction-scoped. + transactionMutex.withLock { + executor.execute(providerPackage, request, input, maxOutputBytes) + } } catch (error: CancellationException) { throw error } catch (error: Throwable) { @@ -209,7 +217,22 @@ class OpenPgpApiBackend internal constructor(private val executor: OpenPgpApiExe ) } + private fun validateDecryptedOutput(call: OpenPgpApiCall) { + @Suppress("DEPRECATION") + val metadata = call.result.getParcelableExtra(OpenPgpApi.RESULT_METADATA) + val expectedSize = metadata?.originalSize + if (expectedSize != null && expectedSize >= 0 && expectedSize != call.output.size.toLong()) { + throw OpenPgpProviderException("OpenPGP provider returned incomplete or inconsistent plaintext") + } + // This backend decrypts password entries and passkey records, neither of which can use an + // empty plaintext. Providers that omit size metadata must still return a non-empty payload. + if (call.output.isEmpty()) { + throw OpenPgpProviderException("OpenPGP provider returned no decrypted content") + } + } + companion object { + private val transactionMutex = Mutex() const val DEFAULT_MAX_DECRYPT_OUTPUT_BYTES = 16 * 1024 * 1024L private const val MAX_PUBLIC_KEY_OUTPUT_BYTES = 1024 * 1024L private const val MAX_METADATA_OUTPUT_BYTES = 64 * 1024L diff --git a/app/src/main/java/app/passwordstore/ui/crypto/DecryptActivity.kt b/app/src/main/java/app/passwordstore/ui/crypto/DecryptActivity.kt index d1fbbaabfa..8dcbb0cb55 100644 --- a/app/src/main/java/app/passwordstore/ui/crypto/DecryptActivity.kt +++ b/app/src/main/java/app/passwordstore/ui/crypto/DecryptActivity.kt @@ -107,14 +107,13 @@ class DecryptActivity : BasePGPActivity() { } OpenPgpApiBackend.OperationResult.Cancelled -> finish() is OpenPgpApiBackend.OperationResult.UserInteractionRequired -> - snackbar(message = getString(R.string.openpgp_provider_interaction_failed)) + showProviderDecryptionError(getString(R.string.openpgp_provider_interaction_failed)) is OpenPgpApiBackend.OperationResult.Failure -> - snackbar( - message = - getString( - R.string.openpgp_provider_operation_failed, - result.error.message ?: getString(R.string.error), - ) + showProviderDecryptionError( + getString( + R.string.openpgp_provider_operation_failed, + result.error.message ?: getString(R.string.error), + ) ) } } finally { @@ -122,6 +121,15 @@ class DecryptActivity : BasePGPActivity() { } } + private fun showProviderDecryptionError(message: String) { + if (isFinishing || isDestroyed) return + MaterialAlertDialogBuilder(this) + .setMessage(message) + .setPositiveButton(android.R.string.ok) { _, _ -> finish() } + .setOnDismissListener { finish() } + .show() + } + override suspend fun decryptWithPassphrase( passphrases: Map, identifiers: List, diff --git a/app/src/test/java/app/passwordstore/data/crypto/OpenPgpApiBackendTest.kt b/app/src/test/java/app/passwordstore/data/crypto/OpenPgpApiBackendTest.kt index 3845d6b4ad..c896c84f34 100644 --- a/app/src/test/java/app/passwordstore/data/crypto/OpenPgpApiBackendTest.kt +++ b/app/src/test/java/app/passwordstore/data/crypto/OpenPgpApiBackendTest.kt @@ -11,9 +11,14 @@ import kotlin.test.Test import kotlin.test.assertContentEquals import kotlin.test.assertEquals import kotlin.test.assertFailsWith +import kotlin.test.assertFalse import kotlin.test.assertIs +import kotlinx.coroutines.CompletableDeferred +import kotlinx.coroutines.CoroutineStart +import kotlinx.coroutines.async import kotlinx.coroutines.runBlocking import org.junit.runner.RunWith +import org.openintents.openpgp.OpenPgpMetadata import org.openintents.openpgp.util.OpenPgpApi import org.robolectric.RobolectricTestRunner import org.robolectric.RuntimeEnvironment @@ -36,6 +41,167 @@ class OpenPgpApiBackendTest { ) } + @Test + fun `decrypt accepts matching size metadata`(): Unit = runBlocking { + val plaintext = byteArrayOf(1, 2, 3) + val executor = FakeExecutor { _, _, _, _ -> + OpenPgpApiCall(successWithSize(3), plaintext) + } + + val operation = OpenPgpApiBackend(executor).decrypt("provider", byteArrayOf(9)) + + assertContentEquals( + plaintext, + assertIs>(operation).value, + ) + } + + @Test + fun `decrypt rejects inconsistent size metadata and wipes output`(): Unit = runBlocking { + for (reportedSize in listOf(0L, 2L, 4L)) { + val plaintext = byteArrayOf(1, 2, 3) + val executor = FakeExecutor { _, _, _, _ -> + OpenPgpApiCall(successWithSize(reportedSize), plaintext) + } + + val operation = OpenPgpApiBackend(executor).decrypt("provider", byteArrayOf(9)) + + assertIs( + assertIs(operation).error + ) + assertContentEquals(ByteArray(3), plaintext) + } + } + + @Test + fun `decrypt accepts unknown size metadata`(): Unit = runBlocking { + val executor = FakeExecutor { _, _, _, _ -> + OpenPgpApiCall(successWithSize(-1), byteArrayOf(1)) + } + + val operation = OpenPgpApiBackend(executor).decrypt("provider", byteArrayOf(9)) + + assertContentEquals( + byteArrayOf(1), + assertIs>(operation).value, + ) + } + + @Test + fun `decrypt rejects empty plaintext even without size metadata`(): Unit = runBlocking { + for (response in listOf(result(OpenPgpApi.RESULT_CODE_SUCCESS), successWithSize(0), successWithSize(101))) { + val executor = FakeExecutor { _, _, _, _ -> OpenPgpApiCall(response, byteArrayOf()) } + + val operation = OpenPgpApiBackend(executor).decrypt("provider", byteArrayOf(9)) + + assertIs( + assertIs(operation).error + ) + } + } + + @Test + fun `transactions are coordinated across backend instances`(): Unit = runBlocking { + val firstEntered = CompletableDeferred() + val releaseFirst = CompletableDeferred() + val secondEntered = CompletableDeferred() + val firstBackend = OpenPgpApiBackend( + FakeExecutor { _, _, _, _ -> + firstEntered.complete(Unit) + releaseFirst.await() + OpenPgpApiCall(result(OpenPgpApi.RESULT_CODE_SUCCESS), byteArrayOf(1)) + } + ) + val secondBackend = OpenPgpApiBackend( + FakeExecutor { _, _, _, _ -> + secondEntered.complete(Unit) + OpenPgpApiCall(result(OpenPgpApi.RESULT_CODE_SUCCESS), byteArrayOf(2)) + } + ) + val first = async(start = CoroutineStart.UNDISPATCHED) { + firstBackend.decrypt("provider", byteArrayOf(9)) + } + firstEntered.await() + val second = async(start = CoroutineStart.UNDISPATCHED) { + secondBackend.getPublicKey("provider", 123L) + } + + try { + assertFalse(secondEntered.isCompleted) + } finally { + releaseFirst.complete(Unit) + } + assertContentEquals( + byteArrayOf(1), + assertIs>(first.await()).value, + ) + assertContentEquals( + byteArrayOf(2), + assertIs>(second.await()).value, + ) + } + + @Test + fun `authentication does not hold the transaction lock`(): Unit = runBlocking { + val pendingIntent = + PendingIntent.getActivity( + RuntimeEnvironment.getApplication(), + 9, + Intent("interaction"), + PendingIntent.FLAG_IMMUTABLE, + ) + val authenticating = CompletableDeferred() + val resumeAuthentication = CompletableDeferred() + val otherEntered = CompletableDeferred() + var attempts = 0 + val backend = OpenPgpApiBackend( + FakeExecutor { _, _, _, _ -> + if (attempts++ == 0) { + OpenPgpApiCall( + result(OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED).apply { + putExtra(OpenPgpApi.RESULT_INTENT, pendingIntent) + }, + byteArrayOf(), + ) + } else { + OpenPgpApiCall(successWithSize(1), byteArrayOf(7)) + } + } + ) + val otherBackend = OpenPgpApiBackend( + FakeExecutor { _, _, _, _ -> + otherEntered.complete(Unit) + OpenPgpApiCall(result(OpenPgpApi.RESULT_CODE_SUCCESS), byteArrayOf()) + } + ) + val first = async(start = CoroutineStart.UNDISPATCHED) { + backend.decrypt( + "provider", + byteArrayOf(9), + OpenPgpApiBackend.InteractionHandler { + authenticating.complete(Unit) + resumeAuthentication.await() + OpenPgpApiBackend.InteractionResult.Completed(Intent(OpenPgpApi.ACTION_DECRYPT_VERIFY)) + }, + ) + } + authenticating.await() + val second = async(start = CoroutineStart.UNDISPATCHED) { + otherBackend.checkPermission("provider") + } + + try { + kotlin.test.assertTrue(otherEntered.isCompleted) + } finally { + resumeAuthentication.complete(Unit) + } + assertIs>(second.await()) + assertContentEquals( + byteArrayOf(7), + assertIs>(first.await()).value, + ) + } + @Test fun `decrypt forwards the caller output limit`(): Unit = runBlocking { var seenLimit = 0L @@ -124,6 +290,11 @@ class OpenPgpApiBackendTest { assertIs(operation) } + private fun successWithSize(size: Long): Intent = + result(OpenPgpApi.RESULT_CODE_SUCCESS).apply { + putExtra(OpenPgpApi.RESULT_METADATA, OpenPgpMetadata("", "text/plain", 0L, size)) + } + private fun result(code: Int): Intent = Intent().apply { putExtra(OpenPgpApi.RESULT_CODE, code) } private class FakeExecutor( From 4c8db99902a57238575f46479dd298bcf8780862 Mon Sep 17 00:00:00 2001 From: Alexander Gil Casas Date: Tue, 1 Dec 2026 21:07:53 +0000 Subject: [PATCH 2/3] test(pgp): tidy provider regression cases --- .../data/crypto/OpenPgpApiBackendTest.kt | 130 +++++++++--------- 1 file changed, 68 insertions(+), 62 deletions(-) diff --git a/app/src/test/java/app/passwordstore/data/crypto/OpenPgpApiBackendTest.kt b/app/src/test/java/app/passwordstore/data/crypto/OpenPgpApiBackendTest.kt index c896c84f34..4061a513c6 100644 --- a/app/src/test/java/app/passwordstore/data/crypto/OpenPgpApiBackendTest.kt +++ b/app/src/test/java/app/passwordstore/data/crypto/OpenPgpApiBackendTest.kt @@ -13,6 +13,7 @@ import kotlin.test.assertEquals import kotlin.test.assertFailsWith import kotlin.test.assertFalse import kotlin.test.assertIs +import kotlin.test.assertTrue import kotlinx.coroutines.CompletableDeferred import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.async @@ -44,14 +45,12 @@ class OpenPgpApiBackendTest { @Test fun `decrypt accepts matching size metadata`(): Unit = runBlocking { val plaintext = byteArrayOf(1, 2, 3) - val executor = FakeExecutor { _, _, _, _ -> - OpenPgpApiCall(successWithSize(3), plaintext) - } + val executor = FakeExecutor { _, _, _, _ -> OpenPgpApiCall(successWithSize(3), plaintext) } val operation = OpenPgpApiBackend(executor).decrypt("provider", byteArrayOf(9)) assertContentEquals( - plaintext, + byteArrayOf(1, 2, 3), assertIs>(operation).value, ) } @@ -60,9 +59,8 @@ class OpenPgpApiBackendTest { fun `decrypt rejects inconsistent size metadata and wipes output`(): Unit = runBlocking { for (reportedSize in listOf(0L, 2L, 4L)) { val plaintext = byteArrayOf(1, 2, 3) - val executor = FakeExecutor { _, _, _, _ -> - OpenPgpApiCall(successWithSize(reportedSize), plaintext) - } + val executor = + FakeExecutor { _, _, _, _ -> OpenPgpApiCall(successWithSize(reportedSize), plaintext) } val operation = OpenPgpApiBackend(executor).decrypt("provider", byteArrayOf(9)) @@ -75,9 +73,7 @@ class OpenPgpApiBackendTest { @Test fun `decrypt accepts unknown size metadata`(): Unit = runBlocking { - val executor = FakeExecutor { _, _, _, _ -> - OpenPgpApiCall(successWithSize(-1), byteArrayOf(1)) - } + val executor = FakeExecutor { _, _, _, _ -> OpenPgpApiCall(successWithSize(-1), byteArrayOf(1)) } val operation = OpenPgpApiBackend(executor).decrypt("provider", byteArrayOf(9)) @@ -89,7 +85,9 @@ class OpenPgpApiBackendTest { @Test fun `decrypt rejects empty plaintext even without size metadata`(): Unit = runBlocking { - for (response in listOf(result(OpenPgpApi.RESULT_CODE_SUCCESS), successWithSize(0), successWithSize(101))) { + val responses = + listOf(result(OpenPgpApi.RESULT_CODE_SUCCESS), successWithSize(0), successWithSize(101)) + for (response in responses) { val executor = FakeExecutor { _, _, _, _ -> OpenPgpApiCall(response, byteArrayOf()) } val operation = OpenPgpApiBackend(executor).decrypt("provider", byteArrayOf(9)) @@ -105,26 +103,30 @@ class OpenPgpApiBackendTest { val firstEntered = CompletableDeferred() val releaseFirst = CompletableDeferred() val secondEntered = CompletableDeferred() - val firstBackend = OpenPgpApiBackend( - FakeExecutor { _, _, _, _ -> - firstEntered.complete(Unit) - releaseFirst.await() - OpenPgpApiCall(result(OpenPgpApi.RESULT_CODE_SUCCESS), byteArrayOf(1)) - } - ) - val secondBackend = OpenPgpApiBackend( - FakeExecutor { _, _, _, _ -> - secondEntered.complete(Unit) - OpenPgpApiCall(result(OpenPgpApi.RESULT_CODE_SUCCESS), byteArrayOf(2)) + val firstBackend = + OpenPgpApiBackend( + FakeExecutor { _, _, _, _ -> + firstEntered.complete(Unit) + releaseFirst.await() + OpenPgpApiCall(result(OpenPgpApi.RESULT_CODE_SUCCESS), byteArrayOf(1)) + } + ) + val secondBackend = + OpenPgpApiBackend( + FakeExecutor { _, _, _, _ -> + secondEntered.complete(Unit) + OpenPgpApiCall(result(OpenPgpApi.RESULT_CODE_SUCCESS), byteArrayOf(2)) + } + ) + val first = + async(start = CoroutineStart.UNDISPATCHED) { + firstBackend.decrypt("provider", byteArrayOf(9)) } - ) - val first = async(start = CoroutineStart.UNDISPATCHED) { - firstBackend.decrypt("provider", byteArrayOf(9)) - } firstEntered.await() - val second = async(start = CoroutineStart.UNDISPATCHED) { - secondBackend.getPublicKey("provider", 123L) - } + val second = + async(start = CoroutineStart.UNDISPATCHED) { + secondBackend.getPublicKey("provider", 123L) + } try { assertFalse(secondEntered.isCompleted) @@ -154,44 +156,48 @@ class OpenPgpApiBackendTest { val resumeAuthentication = CompletableDeferred() val otherEntered = CompletableDeferred() var attempts = 0 - val backend = OpenPgpApiBackend( - FakeExecutor { _, _, _, _ -> - if (attempts++ == 0) { - OpenPgpApiCall( - result(OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED).apply { - putExtra(OpenPgpApi.RESULT_INTENT, pendingIntent) - }, - byteArrayOf(), - ) - } else { - OpenPgpApiCall(successWithSize(1), byteArrayOf(7)) + val backend = + OpenPgpApiBackend( + FakeExecutor { _, _, _, _ -> + if (attempts++ == 0) { + OpenPgpApiCall( + result(OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED).apply { + putExtra(OpenPgpApi.RESULT_INTENT, pendingIntent) + }, + byteArrayOf(), + ) + } else { + OpenPgpApiCall(successWithSize(1), byteArrayOf(7)) + } } - } - ) - val otherBackend = OpenPgpApiBackend( - FakeExecutor { _, _, _, _ -> - otherEntered.complete(Unit) - OpenPgpApiCall(result(OpenPgpApi.RESULT_CODE_SUCCESS), byteArrayOf()) - } - ) - val first = async(start = CoroutineStart.UNDISPATCHED) { - backend.decrypt( - "provider", - byteArrayOf(9), - OpenPgpApiBackend.InteractionHandler { - authenticating.complete(Unit) - resumeAuthentication.await() - OpenPgpApiBackend.InteractionResult.Completed(Intent(OpenPgpApi.ACTION_DECRYPT_VERIFY)) - }, ) - } + val otherBackend = + OpenPgpApiBackend( + FakeExecutor { _, _, _, _ -> + otherEntered.complete(Unit) + OpenPgpApiCall(result(OpenPgpApi.RESULT_CODE_SUCCESS), byteArrayOf()) + } + ) + val first = + async(start = CoroutineStart.UNDISPATCHED) { + backend.decrypt( + "provider", + byteArrayOf(9), + OpenPgpApiBackend.InteractionHandler { + authenticating.complete(Unit) + resumeAuthentication.await() + OpenPgpApiBackend.InteractionResult.Completed(Intent(OpenPgpApi.ACTION_DECRYPT_VERIFY)) + }, + ) + } authenticating.await() - val second = async(start = CoroutineStart.UNDISPATCHED) { - otherBackend.checkPermission("provider") - } + val second = + async(start = CoroutineStart.UNDISPATCHED) { + otherBackend.checkPermission("provider") + } try { - kotlin.test.assertTrue(otherEntered.isCompleted) + assertTrue(otherEntered.isCompleted) } finally { resumeAuthentication.complete(Unit) } From 208e5b2b941900f517b0ab4ba6f7aaff12a743be Mon Sep 17 00:00:00 2001 From: "forkline-dev[bot]" Date: Tue, 1 Dec 2026 21:18:44 +0000 Subject: [PATCH 3/3] Fix code formatting violations Apply spotless formatting to resolve check-codestyle CI failure: - Wrap long throw statement in OpenPgpApiBackend.kt - Remove unused import in DecryptActivity.kt - Adjust lambda formatting in OpenPgpApiBackendTest.kt --- .../app/passwordstore/data/crypto/OpenPgpApiBackend.kt | 4 +++- .../java/app/passwordstore/ui/crypto/DecryptActivity.kt | 1 - .../passwordstore/data/crypto/OpenPgpApiBackendTest.kt | 9 ++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/app/passwordstore/data/crypto/OpenPgpApiBackend.kt b/app/src/main/java/app/passwordstore/data/crypto/OpenPgpApiBackend.kt index 978c6704ee..466c4b17d3 100644 --- a/app/src/main/java/app/passwordstore/data/crypto/OpenPgpApiBackend.kt +++ b/app/src/main/java/app/passwordstore/data/crypto/OpenPgpApiBackend.kt @@ -222,7 +222,9 @@ class OpenPgpApiBackend internal constructor(private val executor: OpenPgpApiExe val metadata = call.result.getParcelableExtra(OpenPgpApi.RESULT_METADATA) val expectedSize = metadata?.originalSize if (expectedSize != null && expectedSize >= 0 && expectedSize != call.output.size.toLong()) { - throw OpenPgpProviderException("OpenPGP provider returned incomplete or inconsistent plaintext") + throw OpenPgpProviderException( + "OpenPGP provider returned incomplete or inconsistent plaintext" + ) } // This backend decrypts password entries and passkey records, neither of which can use an // empty plaintext. Providers that omit size metadata must still return a non-empty payload. diff --git a/app/src/main/java/app/passwordstore/ui/crypto/DecryptActivity.kt b/app/src/main/java/app/passwordstore/ui/crypto/DecryptActivity.kt index 8dcbb0cb55..d2387d1ecb 100644 --- a/app/src/main/java/app/passwordstore/ui/crypto/DecryptActivity.kt +++ b/app/src/main/java/app/passwordstore/ui/crypto/DecryptActivity.kt @@ -25,7 +25,6 @@ import app.passwordstore.ui.adapters.FieldItemAdapter import app.passwordstore.util.crypto.AESEncryption import app.passwordstore.util.extensions.enableEdgeToEdgeView import app.passwordstore.util.extensions.getString -import app.passwordstore.util.extensions.snackbar import app.passwordstore.util.extensions.toCharArray import app.passwordstore.util.extensions.unsafeLazy import app.passwordstore.util.extensions.viewBinding diff --git a/app/src/test/java/app/passwordstore/data/crypto/OpenPgpApiBackendTest.kt b/app/src/test/java/app/passwordstore/data/crypto/OpenPgpApiBackendTest.kt index 4061a513c6..18ac55fa9d 100644 --- a/app/src/test/java/app/passwordstore/data/crypto/OpenPgpApiBackendTest.kt +++ b/app/src/test/java/app/passwordstore/data/crypto/OpenPgpApiBackendTest.kt @@ -59,8 +59,9 @@ class OpenPgpApiBackendTest { fun `decrypt rejects inconsistent size metadata and wipes output`(): Unit = runBlocking { for (reportedSize in listOf(0L, 2L, 4L)) { val plaintext = byteArrayOf(1, 2, 3) - val executor = - FakeExecutor { _, _, _, _ -> OpenPgpApiCall(successWithSize(reportedSize), plaintext) } + val executor = FakeExecutor { _, _, _, _ -> + OpenPgpApiCall(successWithSize(reportedSize), plaintext) + } val operation = OpenPgpApiBackend(executor).decrypt("provider", byteArrayOf(9)) @@ -73,7 +74,9 @@ class OpenPgpApiBackendTest { @Test fun `decrypt accepts unknown size metadata`(): Unit = runBlocking { - val executor = FakeExecutor { _, _, _, _ -> OpenPgpApiCall(successWithSize(-1), byteArrayOf(1)) } + val executor = FakeExecutor { _, _, _, _ -> + OpenPgpApiCall(successWithSize(-1), byteArrayOf(1)) + } val operation = OpenPgpApiBackend(executor).decrypt("provider", byteArrayOf(9))