Skip to content

APK signature verification#59

Merged
danielfullmer merged 4 commits intomasterfrom
apk-verification
Dec 3, 2020
Merged

APK signature verification#59
danielfullmer merged 4 commits intomasterfrom
apk-verification

Conversation

@danielfullmer
Copy link
Collaborator

This adds an APK signature verification derivation called verifyApk. verifyApk takes an input APK file and certificate sha256, and outputs a symlink to that file if and only if the APK signature is valid and the certificate SHA256 digest matches the one provided. The goal is to ensure authenticity of build inputs in addition to integrity, which is already ensured via use of Nix.

This is currently just being used for the prebuilt MicroG and Google APKs derived from a Google image. (We build everything else from source.) These are example uses of verifyApk, and don't provide a ton of additional assurance, in contrast to if we fetched APKs from other (less trustworthy) sources. The Google APKs are currently directly from a Google image, whose SHA256 comes from the developers.google.com webpage using HTTPS, so they are unlikely to be compromised. Another alternative for the MicroG package would be to check the detached GPG signature provided on the Github releases page. (See also: NixOS/nixpkgs#43233)

Creates a symlink from the input to the output only if the input apk is
signed by a certificate whose sha256 matches the one provided.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant