Google System APK Transparency

As part of Google's continuous investment in transparency of its products, we are adding transparency to two new Google system APKs: Android System SafetyCore (com.google.android.safetycore) and Android System Key Verifier (com.google.android.contactkeys). These APKs power the Sensitive Content Warnings and cryptographic key verification feature in Google Messages respectively. The transparency log we published to verify the claims that we make with regards to these APKs.

Covered Packages

This section describes packages that are covered in the transparency log and also their respective code transparency signing keys.

Android System SafetyCore

Android System SafetyCore (com.google.android.safetycore) is an Android system component that provides privacy-preserving on-device user protection infrastructure for apps.

Code from this APK is currently signed with the following key described by this certificate:

-----BEGIN CERTIFICATE-----
MIIFyDCCA7CgAwIBAgIUf3otg1DSj4EfxlP2OjAapoQ/moEwDQYJKoZIhvcNAQELBQAwdDELMAkG
A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDAS
BgNVBAoTC0dvb2dsZSBJbmMuMRAwDgYDVQQLEwdBbmRyb2lkMRAwDgYDVQQDEwdBbmRyb2lkMCAX
DTI0MDcxNzIwNDQzMFoYDzIwNTQwNzE3MjA0NDMwWjB0MQswCQYDVQQGEwJVUzETMBEGA1UECBMK
Q2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4x
EDAOBgNVBAsTB0FuZHJvaWQxEDAOBgNVBAMTB0FuZHJvaWQwggIiMA0GCSqGSIb3DQEBAQUAA4IC
DwAwggIKAoICAQCw93tMu9bD3tAfP1XDj2Y/vvBqDTvi86HesUK8gq0M7kxttep0BP2AkZS5AdVa
DNW6kuMhUN1XOao/Ib/mpgdi3pK6w0WDIlpHsg3coRuCxeniROw3+XUSLNox1mqfLSgHNg9gNoxK
dUyGf8nEIYVgLBUH8OX2oKeirRT7DyR64uVJmts0B0RvNt5VfP5vf6KFpa0prqCNGqQLHLyev3g/
35RH1oAVVsjZnylDYAm9qdAVugL0sgExY01vRNluZZKJuItNpdt+AMOTgStZAEwkhAg7pMbNF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Jmt6JMOujapCa
JmKz7K+wZWSClJnrc0HhJnZFt6S3TakZx7ALVi0SqxBaxHYFieSn9rmXHOWrSxEz5cmASnsfqnc0
w//Yhjm+gGOmLs/5TzrCyYvYt8Ynsd1G1GHipwc8JXGxLqbOPrNcUpjM65m+sshERIua30du0GOm
4ZM=
-----END CERTIFICATE-----

Android System Key Verifier

The Android System Key Verifier APK (com.google.android.contactkeys) is a service for contact verification on Android. It allows a user to verify a contact's public keys to confirm they are communicating with the person they intend to message. The service is a unified system for public key verification across different apps, which uses verification through QR Code scanning or number comparison.

Code from this APK is currently signed with the following key described by this certificate:

-----BEGIN CERTIFICATE-----
MIIFyDCCA7CgAwIBAgIUQwApn2X0vcGMw/VyRoUQkFXuekYwDQYJKoZIhvcNAQELBQAwdDELMAkG
A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDAS
BgNVBAoTC0dvb2dsZSBJbmMuMRAwDgYDVQQLEwdBbmRyb2lkMRAwDgYDVQQDEwdBbmRyb2lkMCAX
DTI0MDczMTE5MzY0MVoYDzIwNTQwNzMxMTkzNjQxWjB0MQswCQYDVQQGEwJVUzETMBEGA1UECBMK
Q2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4x
EDAOBgNVBAsTB0FuZHJvaWQxEDAOBgNVBAMTB0FuZHJvaWQwggIiMA0GCSqGSIb3DQEBAQUAA4IC
DwAwggIKAoICAQDKZqLKu5eeBir6muCiQ5vGQxIDzZcQhLZLpbAkVBNKcrpjgMB6ef0JvrKBnmzN
tHzgExjv4jzyZ1UnU8kaTinVWZF5F9unwuH/957zpc9Ja/JDioGn0V0Q4fgCfIaCLxj4GxK9ywby
TMBWg4ZN0nzcNTCX7ygSzZa24qSq/zOJd2wcO6RxO6MOS2TJPBABA1Wi6l7R/ldXDvzy/3doy5VU
4SElcwWosLFr4jORKGK4R0en96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0nJXuVQJYyon70thXTrBc43gmi646rU4YFFhIei9N4dUQNgO
fxCGd8y8L8fTFAWQm9YQ7x7uxwjkalCh/ahRDtCdyk/ab8mHl/V1M5gkylUW6lt0Ba8Yw6j8PWqc
+io39beMlVWMfwj5mO2MTIKmUChUxULvQPcR46hve5mhSVZeBohPWnrc6B5XTf/4siWWRu0rYBD8
PLM=
-----END CERTIFICATE-----

Threat Model

Transparency systems can be used to detect - and thus deter supply chain attacks. We illustrate with some examples.

Suppose an attacker maliciously modifies a Google System APK and even manages to sign it with the signing key that is used by Google Play. Anyone who receives the malicious APK can query the binary transparency log to verify the APK's authenticity. They will find that Google has not added the corresponding APK metadata to the log and will know not to trust the compromised APK.

Since publishing to the log is a separate process from the release process with signing (as illustrated in the Ecosystem Diagram), this raises the bar for the attacker beyond just compromising the key.

While we plan to also integrate this log into a public network of witnesses using a standard witness protocol, we encourage external, independent parties to monitor the integrity of this publicly available log. These parties can attest to the append-only property of the log, and report any tampering.

The existence of such a transparency system and the additional discoverability of attacks discourages malicious activity. If an APK is compromised but users only trust those that are in the log, the compromised APK would need to be publicly exposed. This increases the likelihood of discovering that the compromised APK exists, and action can be taken to remove its distribution.

Claimant Model

The Claimant Model is a framework used to define roles and artifacts in a verifiable system. In the case of Google System APK Transparency, the claim we make is that the hash of signed binaries recorded in this log represents official code for respective Google System APKs.

  • ClaimGoogleSystemApk: (I, Google, claim that $codeSignature is for $googleSystemApk), where:
    • $codeSignature is a signed JSON Web Token (JWT) that contains a list of DEX files and native libraries and their corresponding hashes included in a specific version of $googleSystemApk.
    • $googleSystemApk is an Android package (APK) from the following set of packages: {Android System SafetyCore (com.google.android.safetycore), Android System Key Verifier (com.google.android.contactkeys)}

Anyone who has a copy of $googleSystemApk can verify the claim above, and we describe this process in full detail in the verification page.

Log Content

When Google releases a new version of the APKs listed above, it adds a corresponding entry to the Google System APK Transparency Log.

Each entry in this log contains four pieces of APK metadata:

  1. The hash of the code signature of a Google developed APK. This is a hex string of the SHA256 digest of a code transparency token (also known as Code Transparency JWT).
  2. The description of the type of hash above. This is a string.
  3. The package name of the APK. This is a string.
  4. The version number (versionCode) of the APK. This is an integer.

The format of a log entry is the concatenation of the four pieces of information with a newline (\n) character, as illustrated by the following:

hash\nSHA256(Signed Code Transparency JWT)\npackage_name\npackage_version\n

Note that in this release, we are experimenting with utilizing code transparency. This means that instead of the hash of the APK, we are recording the digest of the code transparency token. Thus the hash description is currently fixed as SHA256(Signed Code Transparency JWT).

Additionally, this demonstrates a way code transparency can be utilized by app developers when their app signing keys are held by Google Play.

Ecosystem Diagram

Verifiable Log Ecosystem Diagram