DEV Community

Cover image for Your Signing Key Will Outlive Its Cryptography: Hybrid APK Signing on Android 17
Android Expert
Android Expert

Posted on Originally published at Medium

Your Signing Key Will Outlive Its Cryptography: Hybrid APK Signing on Android 17

Most Android teams treat the release keystore like a fire extinguisher. It hangs on the wall, everyone knows where it is, and nobody thinks about it until something is burning.

That habit has a hidden cost. The RSA or ECDSA key that signs your app today is not a short-lived credential. It is the identity every installed copy of your app uses to decide whether the next update is really from you. Keys like that routinely stay in service for twenty years or more.

Android 17 (API 37) is the first release that lets you start protecting that identity against a future quantum computer. It ships a new signing scheme, APK Signature Scheme v3.2, which pairs a classical key with a post-quantum ML-DSA key. Almost nobody is writing about it from the app developer’s side, so this post does. We will cover:

  • how Android’s signing schemes got here, and why each one exists
  • what a quantum computer does and does not threaten
  • what is actually inside a v3.2 APK
  • how hybrid key rotation works, with a concrete apksigner flow
  • Kotlin you can use today to inspect, pin, and prepare
  • the production failure modes that will bite first
  • what to do now, and what can safely wait

1. Six schemes, one idea: prove the bytes came from you

Android has never had a single “APK signature.” It has a stack of schemes layered over fifteen-plus years, and v3.2 only makes sense once you see why the earlier ones were bolted on.

signing-scheme-timeline

v1 (JAR signing) signs individual ZIP entries. The weakness is structural: anything that lives outside those entries is not covered. That gap produced the Janus vulnerability (CVE-2017–13156), where an attacker could prepend content to an APK and still pass v1 verification on Android 5.0 through 8.0.

v2 (Android 7.0) hashes the whole file and stores its signature in a dedicated APK Signing Block that sits just ahead of the ZIP central directory. Because the block lives outside ZIP entries, legacy tools keep working while the platform gains a tamper-evident seal over the entire APK.

v3 (Android 9) kept the v2 layout and added the thing that matters for this post: a proof-of-rotation structure. For the first time, an app could change its signing key during an update and carry cryptographic evidence that the old key authorized the new one.

v4 (Android 11) is a different animal. It produces a Merkle tree in a sidecar .idsig file so the system can verify data while it streams in during incremental installs. It is not a replacement for v2 or v3, and an APK that uses v4 must still carry a v2 or v3 signature.

v3.1 (Android 13) fixed an awkward rotation limitation. Rotation can now target a later SDK level, and because it uses its own block ID, older platforms ignore it instead of choking on it.

v3.2 (Android 17) is where post-quantum arrives. It lives in its own signing-block entry and holds a pair of signers: one classical, one ML-DSA. Platforms older than Android 17 skip it entirely.

That last property is the design principle of the whole stack: every new scheme hides behind an ID that old platforms ignore. Remember it. It is the source of both v3.2’s compatibility and its most interesting failure modes.

2. What a quantum computer actually threatens

The honest framing matters here, because this topic attracts both hype and dismissal.

quantum-threat-map

Shor’s algorithm solves integer factoring and discrete logarithms in polynomial time on a sufficiently large, fault-tolerant quantum computer. That single result covers RSA, ECDSA, ECDH, and EdDSA. These are exactly the algorithms in your keystore.

Three clarifications keep the conversation grounded:

  1. That machine does not exist today. Nobody can forge an APK signature with quantum hardware right now. The argument for acting is about timelines and key lifetimes, not about an active attack.
  2. Hash functions are largely fine. Grover’s algorithm gives a quadratic speedup against brute force, which effectively halves the security exponent. SHA-256 digests remain comfortable.
  3. Signatures and encryption fail differently. “Harvest now, decrypt later” is a threat to confidentiality: someone records traffic today and decrypts it later. Signatures do not have that problem. A signature only has to hold at the moment it is checked. So why care now?

Because of key lifetime. When a quantum-capable attacker eventually derives your private key from your public key, they can sign an update that every device still trusting that key will accept. Your public key is embedded in every APK you have ever shipped. A signing identity minted this year may still be the root of trust for installed apps well into the next decade, which is a long time to bet on an assumption.

There is also a sobering asymmetry to carry into the rest of this post. Hybrid signing only protects devices that understand it. On Android 16 and below, verification still ends at a classical key. If that key falls, those devices fall with it. v3.2 raises the floor for new devices; it cannot retroactively harden old ones.

3. Two different things Android 17 shipped

People conflate these constantly, so separate them early.

A. Hybrid APK signing (v3.2). This is about how your release is signed, by your build pipeline or by Google Play. It affects distribution trust and update authorization. Your app code is not involved.

B. ML-DSA in Android Keystore. This is about keys your app creates at runtime on the user’s device. ML-DSA-65 and ML-DSA-87 are exposed through the familiar KeyPairGenerator, KeyFactory, and Signature APIs, with the private key held in the device's secure environment on supported hardware.

They share an algorithm and nothing else. Your release key is never in the Android Keystore of a user’s phone. Mixing the two up is how teams end up asking the wrong question in design review.

What a v3.2 APK looks like inside

apk-signing-block-layout

The v3.2 block uses ID 0x70e1c89f and sits next to the older entries. Three rules from the platform documentation shape everything downstream:

  • Exactly two signers. One classical, one ML-DSA (ML-DSA-65 or ML-DSA-87 for now).
  • A classical fallback is mandatory. Your APK must still carry a standard v3.0 or v3.1 block signed by a single classical key, so older devices can install it.
  • Post-quantum keys are confined to v3.2. In this initial rollout the platform will not verify a lone PQC signer through v2, v3.0, or v3.1.
  • Stripping protection is built in. The signing tool writes two attributes (minimum and maximum SDK, IDs 0xbf940529 and 0x9f06b79c) into the classical v3.0/v3.1 block. On a device inside that range, the platform refuses to accept the classical block alone, so deleting the v3.2 block to force a downgrade fails installation.

On Android 17 and later, verification goes roughly like this: the platform checks that both signers target the same SDK range, verifies each one, and requires that both carry identical, explicit signing histories. If they match, it merges them by treating the classical certificate as the predecessor of the ML-DSA certificate, which becomes the current signer. The platform documentation calls the overall move an implicit rotation, because you never write a lineage entry from the classical key to the ML-DSA key yourself.

The size tax

Post-quantum signatures are not subtle. Plan for the bytes.

key-and-signature-sizes

An ML-DSA-65 signature is roughly fifty times larger than an ECDSA P-256 signature, and the public key is about thirty times larger. Inside an APK this is noise, since a few kilobytes disappear into a multi-megabyte file. Outside an APK, wherever your own protocols carry signatures, it can be a real problem. We will return to that in the failure modes.

4. Rotation: the part that decides whether you can migrate at all

Hybrid signing is, underneath, a key rotation. You are not adding a second signature to the same identity. You are moving the identity to a new set of keys and proving that the old key allowed it.

hybrid-rotation-lineage

A few consequences surprise people:

  • You must create a new classical key. You cannot reuse your existing one as the classical half of the pair.
  • Both new keys must carry the same history. You duplicate your existing signing lineage, whether that is one original key or several past rotations, onto both hybrid signers. The platform uses that shared ancestry to confirm that whoever is moving the app to hybrid signing owns its current identity.
  • The old key still signs the legacy block. That is what keeps Android 16 and below installing and updating your app.
  • Lineage files are load-bearing. Every future rotation and every future signing run needs them. Treat them like keys: version them, back them up, and keep them out of casual reach.

A concrete self-managed flow

If Google Play holds your signing key, you mostly skip the commands below, but not the work. Play Console’s help page currently describes new uploads as enrolled in quantum-ready hybrid signing by default, with Google-generated keys (a classical RSA key and an ML-DSA-65 key). You do not manage those keys, but you still have to register three fingerprints with every API provider that checks them: the new classical key, the new PQC key, and the classical key older devices still use. Check your own Play Console to see which state your app is in, since this has been changing quickly.

If you manage your own key (direct downloads, enterprise distribution, alternative stores, device-vendor builds), the workflow below assembles the public Android documentation with a community walkthrough of the apksigner flags. Verify every flag against apksigner help sign and apksigner help rotate in your own build-tools 37+ installation before you trust it. This tooling is new, and the exact surface may move.

Prerequisites: JDK 24 or later for keytool to generate ML-DSA keys, and Android build-tools 37.0.0 or later for apksigner.

# 1. A fresh classical key for the hybrid pair (you may not reuse the legacy one)
keytool -genkeypair -keyalg EC -groupname secp384r1 \
  -alias acme-next-ec -validity 10000 \
  -dname "CN=Acme Release" -keystore acme-next.p12 -storetype PKCS12

# 2. The post-quantum key (ML-DSA-65 or ML-DSA-87; ML-DSA-44 is not accepted for APKs)
keytool -genkeypair -keyalg ML-DSA -groupname ML-DSA-65 \
  -alias acme-next-mldsa -validity 10000 \
  -dname "CN=Acme Release" -keystore acme-next.p12 -storetype PKCS12

# 3. Authorize each new key from the legacy key (one lineage per new key; both carry the same history).
#    Android's guidance is to grant ROLLBACK to the legacy key for the first hybrid releases (true),
#    then ship a later update whose lineage removes it (false). See the note below.
apksigner rotate --out lineage-classical.bin \
  --old-signer --ks acme-legacy.jks --set-rollback true \
  --new-signer --ks acme-next.p12 --ks-key-alias acme-next-ec

apksigner rotate --out lineage-mldsa.bin \
  --old-signer --ks acme-legacy.jks --set-rollback true \
  --new-signer --ks acme-next.p12 --ks-key-alias acme-next-mldsa

# 4. Align first, then sign. Any byte change after signing breaks the signature.
zipalign -f 4 app-unsigned.apk app-aligned.apk

apksigner sign \
  --ks acme-legacy.jks \
  --next-signer \
    --ks acme-next.p12 --ks-key-alias acme-next-ec \
    --signer-lineage lineage-classical.bin --hybrid-signer-role classical \
  --next-signer \
    --ks acme-next.p12 --ks-key-alias acme-next-mldsa \
    --signer-lineage lineage-mldsa.bin --hybrid-signer-role pqc \
  --out app-release.apk app-aligned.apk

# 5. Verify with the new tooling; recent build-tools print every signer
apksigner verify -v --print-certs app-release.apk
Enter fullscreen mode Exit fullscreen mode

If you have rotated before, feed your latest existing lineage into both rotate commands with --in, and use your most recent non-hybrid key as the old signer.

About --set-rollback. This flag is a real trade-off, not a free choice. While the legacy key holds the rollback capability, you can fall back to a classical-only signature without breaking user updates, which is a valuable safety net during the first rollout. The platform documentation recommends granting it initially. The same capability also means a compromised classical key can still sign an update with no post-quantum authorization, which cancels the benefit you paid for. So treat true as a temporary state: write down when you will review the rollout data, and ship an update with the capability removed once the hybrid deployment looks stable.

One more caution on tooling. I have not verified that any specific Android Gradle Plugin version drives apksigner for v3.2. Until your toolchain documents it, the safe pipeline is explicit: build unsigned, align, then call apksigner yourself as a separate CI step.

5. Kotlin you can ship now

Three pieces of code, in order of how soon they pay off. All three compile and run without needing a hybrid-signed build first, which is the point: they are the “do now” work.

5.1 A signing-block inspector for CI

Before you trust any signing pipeline, assert on its output. apksigner verify tells you whether a signature is valid. It does not tell you whether your pipeline produced the shape of file you intended. This inspector walks the APK Signing Block and reports which scheme IDs are present.

import java.io.File
import java.nio.ByteBuffer
import java.nio.ByteOrder
import java.nio.channels.FileChannel
import java.nio.file.StandardOpenOption

enum class SigningBlockId(val id: Long) {
    V2(0x7109871aL),
    V3(0xf05368c0L),
    V31(0x1b93ad61L),
    V32(0x70e1c89fL);

    companion object {
        fun of(id: Long): SigningBlockId? = entries.firstOrNull { it.id == id }
    }
}

data class SigningBlockReport(
    val schemes: Set<SigningBlockId>,
    val unrecognizedIds: Set<Long>,
) {
    /** Hybrid release shape: v3.2 present AND a classical v3.0/v3.1 fallback still there. */
    val isHybridReady: Boolean
        get() = SigningBlockId.V32 in schemes &&
            (SigningBlockId.V3 in schemes || SigningBlockId.V31 in schemes)

    companion object {
        val EMPTY = SigningBlockReport(emptySet(), emptySet())
    }
}

private const val EOCD_SIGNATURE = 0x06054b50
private const val EOCD_MIN_SIZE = 22
private const val MAX_ZIP_COMMENT = 0xFFFF
private const val FOOTER_SIZE = 24 // 8-byte size + 16-byte magic
private val BLOCK_MAGIC = "APK Sig Block 42".toByteArray(Charsets.US_ASCII)

fun File.inspectSigningBlock(): SigningBlockReport =
    FileChannel.open(toPath(), StandardOpenOption.READ).use { it.parseSigningBlock() }

private fun FileChannel.parseSigningBlock(): SigningBlockReport {
    val centralDirectory = centralDirectoryOffset()
    if (centralDirectory < FOOTER_SIZE + 8) return SigningBlockReport.EMPTY

    val footer = readLittleEndian(centralDirectory - FOOTER_SIZE, FOOTER_SIZE)
    val blockSize = footer.getLong(0)
    val magic = ByteArray(BLOCK_MAGIC.size).also { footer.position(8); footer.get(it) }
    if (!magic.contentEquals(BLOCK_MAGIC) ||
        blockSize < FOOTER_SIZE ||
        blockSize > centralDirectory - 8
    ) return SigningBlockReport.EMPTY // v1-only, or not an APK we understand

    val pairs = readLittleEndian(
        position = centralDirectory - blockSize,
        length = (blockSize - FOOTER_SIZE).toInt(),
    )

    val known = linkedSetOf<SigningBlockId>()
    val unknown = linkedSetOf<Long>()
    while (pairs.remaining() >= 12) {
        val length = pairs.getLong()
        val id = pairs.getInt().toLong() and 0xFFFFFFFFL
        when (val scheme = SigningBlockId.of(id)) {
            null -> unknown += id
            else -> known += scheme
        }
        val skip = length - 4
        if (skip < 0 || skip > pairs.remaining()) break // corrupt entry: stop, don't throw
        pairs.position(pairs.position() + skip.toInt())
    }
    return SigningBlockReport(known, unknown)
}

private fun FileChannel.centralDirectoryOffset(): Long {
    val tail = minOf(size(), (EOCD_MIN_SIZE + MAX_ZIP_COMMENT).toLong()).toInt()
    val buffer = readLittleEndian(size() - tail, tail)
    for (i in tail - EOCD_MIN_SIZE downTo 0) {
        if (buffer.getInt(i) != EOCD_SIGNATURE) continue
        // A real EOCD record's comment must run exactly to end-of-file; this rejects
        // look-alike bytes that happen to sit inside a ZIP comment.
        val commentLength = buffer.getShort(i + 20).toInt() and 0xFFFF
        if (i + EOCD_MIN_SIZE + commentLength == tail) {
            return buffer.getInt(i + 16).toLong() and 0xFFFFFFFFL
        }
    }
    error("Not a ZIP/APK: end-of-central-directory record not found")
}

private fun FileChannel.readLittleEndian(position: Long, length: Int): ByteBuffer {
    val buffer = ByteBuffer.allocate(length).order(ByteOrder.LITTLE_ENDIAN)
    while (buffer.hasRemaining()) {
        check(read(buffer, position + buffer.position()) >= 0) { "Truncated APK" }
    }
    return buffer.apply { flip() }
}
Enter fullscreen mode Exit fullscreen mode

Wire it into a JVM test so a bad release never leaves CI:

class ReleaseSigningShapeTest {
    @Test
    fun releaseApkIsHybridReady() {
        val apk = File(requireNotNull(System.getProperty("release.apk")) { "pass -Drelease.apk=<path>" })
        val report = apk.inspectSigningBlock()
        assertTrue(report.isHybridReady, "Unexpected signing shape: ${report.schemes}")
    }
}
Enter fullscreen mode Exit fullscreen mode

This checks structure, not validity. Keep running apksigner verify from build-tools 37+ alongside it. The inspector's real job is catching the quiet regression: a pipeline update that silently drops the classical fallback, or one that never emits v3.2 at all.

5.2 A signer policy that survives rotation

Here is the code that most apps have and most apps will break. It is a self-check that compares the running app’s signing certificate against a hardcoded digest.

The trap is that a hybrid rotation can change which certificate the platform reports. A public project that adopted v3.2 documents the split plainly: Android 17 and newer verify the hybrid block, where the ML-DSA key is the signer, while earlier versions keep verifying the original key. A single pinned digest is correct on one side of that line and wrong on the other.

Two details make the following implementation safe. First, it hashes the certificate’s raw bytes and never parses it, because older platforms cannot be assumed to parse a post-quantum certificate. Second, it accepts a set of known digests.

import android.content.Context
import android.content.pm.PackageManager
import android.content.pm.Signature
import android.os.Build
import java.security.MessageDigest

@JvmInline
value class CertDigest(val hex: String) {
    init {
        require(hex.length == 64 && hex.all { it in "0123456789abcdef" }) {
            "Expected lowercase SHA-256 hex, got length ${hex.length}"
        }
    }
}

sealed interface SignerCheck {
    data class Trusted(val matched: Set<CertDigest>) : SignerCheck
    data class Untrusted(val observed: Set<CertDigest>) : SignerCheck
    data object Unavailable : SignerCheck
}

class SignerPolicy(private val trusted: Set<CertDigest>) {

    init { require(trusted.isNotEmpty()) { "An empty trust set rejects every build" } }

    fun evaluate(context: Context): SignerCheck {
        val signers = context.currentSigners() ?: return SignerCheck.Unavailable
        val observed = signers.mapTo(linkedSetOf()) { it.toCertDigest() }
        return if (observed.isNotEmpty() && observed.all { it in trusted }) {
            SignerCheck.Trusted(observed)
        } else {
            SignerCheck.Untrusted(observed)
        }
    }
}

private fun Context.currentSigners(): Array<Signature>? {
    val flags = PackageManager.GET_SIGNING_CERTIFICATES
    val info = if (Build.VERSION.SDK_INT >= 33) {
        packageManager.getPackageInfo(packageName, PackageManager.PackageInfoFlags.of(flags.toLong()))
    } else {
        @Suppress("DEPRECATION")
        packageManager.getPackageInfo(packageName, flags)
    }
    return info.signingInfo?.apkContentsSigners
}

// Raw bytes in, digest out. No CertificateFactory: it may not understand every certificate type.
private fun Signature.toCertDigest(): CertDigest {
    val digest = MessageDigest.getInstance("SHA-256").digest(toByteArray())
    return CertDigest(digest.joinToString("") { "%02x".format(it) })
}
Enter fullscreen mode Exit fullscreen mode

Compose the trust set from every identity you will ever ship under: the legacy key, the new classical key, and the ML-DSA key.

val releasePolicy = SignerPolicy(
    trusted = setOf(
        CertDigest(BuildConfig.SIGNER_LEGACY),
        CertDigest(BuildConfig.SIGNER_HYBRID_CLASSICAL),
        CertDigest(BuildConfig.SIGNER_ML_DSA),
    ),
)
Enter fullscreen mode Exit fullscreen mode

One practical note: getPackageInfo is a synchronous Binder call, so run evaluate off the main thread, for example inside withContext(Dispatchers.IO), and cache the result.

Treat this as a speed bump, not a fence. An attacker who repackages your app controls the process that runs the check and can remove it. Anything that must be trustworthy belongs on your server, backed by an attestation verdict. The policy above exists to prevent you from shipping a self-inflicted lockout.

5.3 Using ML-DSA in the Keystore, defensively

If you sign data on-device, for example to authenticate a client to your backend, ML-DSA is now reachable through standard JCA calls. The real work is handling a device that cannot do it.

import android.os.Build
import android.security.keystore.KeyGenParameterSpec
import android.security.keystore.KeyInfo
import android.security.keystore.KeyProperties
import java.security.GeneralSecurityException
import java.security.KeyFactory
import java.security.KeyPair
import java.security.KeyPairGenerator
import java.security.PrivateKey
import java.security.ProviderException
import java.security.Signature

sealed interface PqcKeyResult {
    data class Created(
        val alias: String,
        val parameterSet: String,
        val keyPair: KeyPair,
        val securityLevel: Int,
    ) : PqcKeyResult

    data class Unavailable(val reason: String, val cause: Throwable? = null) : PqcKeyResult
}

fun createPqcSigningKey(alias: String, parameterSet: String = "ML-DSA-65"): PqcKeyResult {
    if (Build.VERSION.SDK_INT < 37) return PqcKeyResult.Unavailable("Requires API 37, running ${Build.VERSION.SDK_INT}")
    return try {
        val generator = KeyPairGenerator.getInstance(parameterSet, "AndroidKeyStore")
        generator.initialize(
            KeyGenParameterSpec.Builder(
                alias,
                KeyProperties.PURPOSE_SIGN or KeyProperties.PURPOSE_VERIFY,
            ).build(),
        )
        val pair = generator.generateKeyPair()
        PqcKeyResult.Created(alias, parameterSet, pair, pair.private.securityLevelOrUnknown())
    } catch (e: GeneralSecurityException) {
        PqcKeyResult.Unavailable("$parameterSet not supported on this device", e)
    } catch (e: ProviderException) {
        // KeyMint implementations can surface hardware gaps as provider failures.
        PqcKeyResult.Unavailable("Keystore refused $parameterSet", e)
    }
}

private fun PrivateKey.securityLevelOrUnknown(): Int = try {
    KeyFactory.getInstance(algorithm, "AndroidKeyStore")
        .getKeySpec(this, KeyInfo::class.java)
        .securityLevel
} catch (e: GeneralSecurityException) {
    KeyProperties.SECURITY_LEVEL_UNKNOWN
}

fun PqcKeyResult.Created.sign(message: ByteArray): ByteArray =
    Signature.getInstance(parameterSet).run {
        initSign(keyPair.private)
        update(message)
        sign()
    }
Enter fullscreen mode Exit fullscreen mode

Key generation and signing both call into the Keystore service or its hardware, so keep them off the main thread, for example under withContext(Dispatchers.IO). The official sample builds the key spec with just an alias and purposes. If you see authorization failures on early Android 17 builds or particular KeyMint implementations, try adding .setDigests(KeyProperties.DIGEST_NONE) to the spec. That is a troubleshooting idea I could not confirm in the documentation, so test it on your target devices before you rely on it.

Two design points beyond the code:

  • Tag every signature with its algorithm. A wire format of { alg, keyId, sig } costs you almost nothing today and saves you a flag-day migration later. "Algorithm agility" is a boring phrase for a very expensive lesson, and this is the cheapest moment to learn it.
  • Inspect the security level. Do not assume a Keystore key is hardware-backed. Log it, alert on it, and decide per key whether software-backed is acceptable.

6. Failure modes from the field

Hybrid signing has barely left the starting gate, so these are not post-mortems. They are the places where the mechanics, as documented, create sharp edges. Each one is cheap to test for now and expensive to discover later.

1. The pinned digest that changes by OS version. Covered above, and the most likely incident. A tamper check or allowlist that hardcodes one certificate digest will pass on one Android version and reject legitimate installs on another. The symptom is a crash or “unverified app” dialog that reproduces only on Android 17 devices.

2. Parsing a certificate you do not understand. Code that runs CertificateFactory or a third-party X.509 parser over your own signing certificate can throw on platforms that cannot interpret a post-quantum certificate. Hash the raw bytes instead.

3. Dropping the classical block. A “cleanup” that removes the v3.0/v3.1 signature because “v3.2 supersedes it” produces an APK that older devices cannot install. The platform requires the classical fallback, and your CI should assert it exists (see the inspector).

4. Reusing the old classical key. The rotation requires a new classical key. A pipeline that shortcuts this will fail at signing time at best, and at worst you will discover it during a release window.

5. Losing the lineage files. Lineage can be recovered from a previously signed APK in a pinch, but relying on that is a recovery plan, not a process. Store lineage files next to the keys and under the same access controls.

6. Granting rollback and never taking it back. Rollback is the right default for the first hybrid releases and the wrong default forever. If it stays on, an attacker who obtains only the legacy classical key can still sign updates that skip the post-quantum check. Put the removal date on a calendar and audit the flag in release review.

7. Old tooling in the pipeline. CI images that pin an earlier build-tools version cannot produce or fully report a hybrid signature. A green “verify” step from old tooling may simply mean it did not see the new block. The signing tool is also what writes the stripping-protection attributes, so a pipeline that re-signs with something else can silently lose them. Pin build-tools 37 or later for any step that signs or verifies.

8. Signatures that outgrow your transport. An ML-DSA-87 signature is about 4.6 KB raw, and Base64 inflates it by roughly a third to just over 6 KB. Put that in an HTTP header and you are close to the 8 KB limits many proxies and load balancers enforce, with cookies and other headers still to come. If your own protocol carries signatures, move them to the body and check limits on every hop.

9. Assuming the Keystore path is always there. ML-DSA key generation depends on the device’s Keystore implementation. Without a fallback path and algorithm tagging, you are one unsupported handset away from a login failure.

10. Confusing a client check with a trust decision. Section 5.2 again, because it is the most common architectural error: client-side signer checks make poor security boundaries. Treat them as diagnostics.

11. Believing hybrid protects everyone. It does not. Android 16 and below still end at classical verification. Your risk reduction scales with the share of your install base on Android 17+, so measure that share before you describe this work as “quantum-safe” to anyone outside engineering.

12. Backends and providers that allowlist signing-certificate digests. This is the one Play’s own help page warns about. Anything that identifies your app by certificate fingerprint needs the new fingerprints registered: Digital Asset Links files (assetlinks.json), OAuth client and Firebase settings, API-key restrictions, third-party SDK dashboards, MDM allowlists. With Play hybrid signing that means three fingerprints, not one. Public repositories are already shipping fixes for the missing second entry in assetlinks.json. I have not found vendor documentation for how every provider treats a hybrid signer, so test each one against a hybrid-signed build on Android 17 rather than assuming.

13. Assuming the scheme can be silently downgraded, or that it cannot. The platform documentation says Android 17 rejects an APK whose v3.2 block was stripped, as long as the stripping-protection attributes are present in the classical block. The protection therefore depends on your signing tool having written them. Verify the attributes exist in your release artifact and rely on the documented behavior, not on a guess in either direction.

7. What to do today versus later

Not every team needs to move this quarter. The right answer depends on one question.

adoption-decision-flow

If Google Play signs your releases

Your near-term work is small and entirely defensive:

  • Inventory every place a certificate digest appears: app code, backend allowlists, Digital Asset Links, API-key restrictions, OAuth and Firebase settings, partner SDK configurations.
  • Replace single pinned digests with sets, using the pattern in section 5.2, so a signer change cannot lock out users.
  • Add algorithm identifiers to any signature you generate yourself.
  • Test on an Android 17 device or emulator so you learn how your app behaves on the new platform before a hybrid upgrade arrives.
  • Register all three fingerprints (new classical, new PQC, and the classical key older devices use) with every API provider, once your Play Console shows hybrid keys.

If you hold your own key

You have more control and more homework:

  • Move signing and verification steps to build-tools 37+ and a JDK that can generate ML-DSA keys.
  • Add the inspector from section 5.1 to CI, failing the build when the signing shape is wrong.
  • Rehearse a full rotation with a throwaway key, lineage files included, and install the result on Android 16 and Android 17 devices. Do this before it matters.
  • Decide your rollback policy in writing: grant it for the first hybrid releases, and schedule its removal.
  • Ship the hybrid release when your rehearsal is boring, and keep the lineage files and legacy key in cold storage.

What can safely wait

  • Dropping classical-only fallbacks. That is gated by how many Android 16-and-below devices remain in your user base, and the answer will not be “none” for years.
  • Moving your own wire protocols to post-quantum signatures, unless you already carry long-lived signed artifacts.
  • Declaring the work “done.” This is a multi-year migration with a long tail, and the specifications and tools are still settling.

The asymmetry worth remembering is this: the cost of preparing is small and mostly engineering hygiene, while the cost of being unprepared lands all at once, during a rotation, under time pressure. Pinned-digest bugs and missing lineage files are annoying in a rehearsal and miserable in production.

🔚 Closing thought

The interesting thing about v3.2 is not the cryptography. ML-DSA is a standardized algorithm and Android’s use of it is, by design, conservative: two signers, a mandatory classical fallback, and a block ID old devices can ignore. The interesting thing is what it exposes about how most teams treat their signing identity: as a static file rather than a long-lived, rotatable, auditable asset.

Hybrid signing makes that neglect visible. If your team can answer “where is our signing key, who can rotate it, which systems pin it, and what breaks if it changes,” you are ready for post-quantum signing and for the next surprise too. If you cannot answer all four, start there. The quantum computer is not the deadline. Your next forced rotation is.

References

Sizes in the size-comparison infographic are raw public-key and signature encodings from the FIPS 204 parameter sets and common classical encodings. Certificate and ASN.1 wrappers add overhead on top.

📱 Go Beyond Using AI — Learn How to Actually Build It Into Your Android Apps

If you’re building Android apps in 2026, “adding AI” can’t just mean bolting on a chatbot API — it means understanding on-device inference, model trade-offs, and production realities well enough to ship a feature users actually trust. I highly recommend “Mastering Android AI: App to Intelligence” It’s a practical, code-first journey through the entire Android AI stack — from ML Kit and LiteRT to Gemma, Gemini, and MediaPipe — covering everything from your first “hello inference” screen to thermal throttling, model drift monitoring, and full applied projects like an AI-powered camera app and a health companion, with hands-on Kotlin builds at every step.

Top comments (0)