Wallet Logo

Bitkey - Bitcoin Wallet

Google Play
Latest Release: 2024.71.0 (3) 11th October 2024

Our wallet review process

We examine wallets starting at the code level and continue all the way up to the finished app that lives on your device. Provided below is an outline of each of these steps along with security tips for you and general test results.

Developer

Block, Inc.

Custody

Self-custodial: The user holds the keys

As part of our Methodology, we ask: Is the product self-custodial?

The answer is "yes". The user has control of their own keys.
Read more

Source code

Public on github

Released

28th February 2024

Application build

The binary provided was reproducible from the code provided.

See test result
Tested 30th August 2024

Distribution

Google Play
4.1/5 stars

Platform notes

On the Google Play Store, there are many apps that have Bitcoin in their name or description but don’t allow the user to use Bitcoin or they don’t look like Bitcoin wallets but turn out to be. We run our tests and document our findings.

Passed all 10 tests

We answered the following questions in this order:

Do many people use this product?

The answer is "yes".
If the answer was "no", we would mark it as "Few users" and the following would apply:

The answer is "no". We marked it as "Few users".

We did not ask this question because we failed at a previous question.
If the answer was "no", we would mark it as "Few users" and the following would apply:

We focus on products that have the biggest impact if things go wrong and this one probably doesn’t have many users according to data publicly available.

Is this product the original?

The answer is "yes".
If the answer was "no", we would mark it as "Fake" and the following would apply:

The answer is "no". We marked it as "Fake".

We did not ask this question because we failed at a previous question.
If the answer was "no", we would mark it as "Fake" and the following would apply:

The bigger wallets often get imitated by scammers that abuse the reputation of the product by imitating its name, logo or both.

Imitating a competitor is a huge red flag and we urge you to not put any money into this product!

The product cannot be independently verified. If the provider puts your funds at risk on purpose or by accident, you will probably not know about the issue before people start losing money. If the provider is more criminally inclined he might have collected all the backups of all the wallets, ready to be emptied at the press of a button. The product might have a formidable track record but out of distress or change in management turns out to be evil from some point on, with nobody outside ever knowing before it is too late.
Is it a wallet?

The answer is "yes".
If the answer was "no", we would mark it as "Not a wallet" and the following would apply:

The answer is "no". We marked it as "Not a wallet".

We did not ask this question because we failed at a previous question.
If the answer was "no", we would mark it as "Not a wallet" and the following would apply:

If it’s called “wallet” but is actually only a portfolio tracker, we don’t look any deeper, assuming it is not meant to control funds. What has no funds, can’t lose your coins. It might still leak your financial history!

If you can buy Bitcoins with this app but only into another wallet, it’s not a wallet itself.

Is it for bitcoins?

The answer is "yes".
If the answer was "no", we would mark it as "A wallet but not for Bitcoin" and the following would apply:

The answer is "no". We marked it as "A wallet but not for Bitcoin".

We did not ask this question because we failed at a previous question.
If the answer was "no", we would mark it as "A wallet but not for Bitcoin" and the following would apply:

At this point we only look into wallets that at least also support BTC.

Can it send and receive bitcoins?

The answer is "yes".
If the answer was "no", we would mark it as "Can't send or receive bitcoins" and the following would apply:

The answer is "no". We marked it as "Can't send or receive bitcoins".

We did not ask this question because we failed at a previous question.
If the answer was "no", we would mark it as "Can't send or receive bitcoins" and the following would apply:

If it is for holding BTC but you can’t actually send or receive them with this product then it doesn’t function like a wallet for BTC but you might still be using it to hold your bitcoins with the intention to convert back to fiat when you “cash out”.

All products in this category are custodial and thus funds are at the mercy of the provider.

The product cannot be independently verified. If the provider puts your funds at risk on purpose or by accident, you will probably not know about the issue before people start losing money. If the provider is more criminally inclined he might have collected all the backups of all the wallets, ready to be emptied at the press of a button. The product might have a formidable track record but out of distress or change in management turns out to be evil from some point on, with nobody outside ever knowing before it is too late.
Is the product self-custodial?

The answer is "yes".
If the answer was "no", we would mark it as "Custodial: The provider holds the keys" and the following would apply:

The answer is "no". We marked it as "Custodial: The provider holds the keys".

We did not ask this question because we failed at a previous question.
If the answer was "no", we would mark it as "Custodial: The provider holds the keys" and the following would apply:

A custodial service is a service where the funds are held by a third party like the provider. The custodial service can at any point steal all the funds of all the users at their discretion. Our investigations stop there.

Some services might claim their setup is super secure, that they don’t actually have access to the funds, or that the access is shared between multiple parties. For our evaluation of it being a wallet, these details are irrelevant. They might be a trustworthy Bitcoin bank and they might be a better fit for certain users than being your own bank but our investigation still stops there as we are only interested in wallets.

Products that claim to be non-custodial but feature custodial accounts without very clearly marking those as custodial are also considered “custodial” as a whole to avoid misguiding users that follow our assessment.

This verdict means that the provider might or might not publish source code and maybe it is even possible to reproduce the build from the source code but as it is custodial, the provider already has control over the funds, so it is not a wallet where you would be in exclusive control of your funds.

We have to acknowledge that a huge majority of Bitcoiners are currently using custodial Bitcoin banks. If you do, please:

  • Do your own research if the provider is trust-worthy!
  • Check if you know at least enough about them so you can sue them when you have to!
  • Check if the provider is under a jurisdiction that will allow them to release your funds when you need them?
  • Check if the provider is taking security measures proportional to the amount of funds secured? If they have a million users and don’t use cold storage, that hot wallet is a million times more valuable for hackers to attack. A million times more effort will be taken by hackers to infiltrate their security systems.
The product cannot be independently verified. If the provider puts your funds at risk on purpose or by accident, you will probably not know about the issue before people start losing money. If the provider is more criminally inclined he might have collected all the backups of all the wallets, ready to be emptied at the press of a button. The product might have a formidable track record but out of distress or change in management turns out to be evil from some point on, with nobody outside ever knowing before it is too late.
Is the source code publicly available?

The answer is "yes".
If the answer was "no", we would mark it as "No source for current release found" and the following would apply:

The answer is "no". We marked it as "No source for current release found".

We did not ask this question because we failed at a previous question.
If the answer was "no", we would mark it as "No source for current release found" and the following would apply:

A wallet that claims to not give the provider the means to steal the users’ funds might actually be lying. In the spirit of “Don’t trust - verify!” you don’t want to take the provider at his word, but trust that people hunting for fame and bug bounties could actually find flaws and back-doors in the wallet so the provider doesn’t dare to put these in.

Back-doors and flaws are frequently found in closed source products but some remain hidden for years. And even in open source security software there might be catastrophic flaws undiscovered for years.

An evil wallet provider would certainly prefer not to publish the code, as hiding it makes audits orders of magnitude harder.

For your security, you thus want the code to be available for review.

If the wallet provider doesn’t share up to date code, our analysis stops there as the wallet could steal your funds at any time, and there is no protection except the provider’s word.

“Up to date” strictly means that any instance of the product being updated without the source code being updated counts as closed source. This puts the burden on the provider to always first release the source code before releasing the product’s update. This paragraph is a clarification to our rules following a little poll.

We are not concerned about the license as long as it allows us to perform our analysis. For a security audit, it is not necessary that the provider allows others to use their code for a competing wallet. You should still prefer actual open source licenses as a competing wallet won’t use the code without giving it careful scrutiny.

The product cannot be independently verified. If the provider puts your funds at risk on purpose or by accident, you will probably not know about the issue before people start losing money. If the provider is more criminally inclined he might have collected all the backups of all the wallets, ready to be emptied at the press of a button. The product might have a formidable track record but out of distress or change in management turns out to be evil from some point on, with nobody outside ever knowing before it is too late.
Is the decompiled binary legible?

The answer is "yes".
If the answer was "no", we would mark it as "Obfuscated" and the following would apply:

The answer is "no". We marked it as "Obfuscated".

We did not ask this question because we failed at a previous question.
If the answer was "no", we would mark it as "Obfuscated" and the following would apply:

When compiling source code to binary, usually a lot of meta information is retained. A variable storing a masterseed would usually still be called masterseed, so an auditor could inspect what happens to the masterseed. Does it get sent to some server? But obfuscation would rename it for example to _t12, making it harder to find what the product is doing with the masterseed.

In benign cases, code symbols are replaced by short strings to make the binary smaller but for the sake of transparency this should not be done for non-reproducible Bitcoin wallets. (Reproducible wallets could obfuscate the binary for size improvements as the reproducibility would assure the link between code and binary.)

Especially in the public source cases, obfuscation is a red flag. If the code is public, why obfuscate it?

As obfuscation is such a red flag when looking for transparency, we do also sometimes inspect the binaries of closed source apps.

As looking for code obfuscation is a more involved task, we do not inspect many apps but if we see other red flags, we might test this to then put the product into this red-flag category.

The product cannot be independently verified. If the provider puts your funds at risk on purpose or by accident, you will probably not know about the issue before people start losing money. If the provider is more criminally inclined he might have collected all the backups of all the wallets, ready to be emptied at the press of a button. The product might have a formidable track record but out of distress or change in management turns out to be evil from some point on, with nobody outside ever knowing before it is too late.
Can the product be built from the source provided?

The answer is "yes".
If the answer was "no", we would mark it as "Failed to build from source provided!" and the following would apply:

The answer is "no". We marked it as "Failed to build from source provided!".

We did not ask this question because we failed at a previous question.
If the answer was "no", we would mark it as "Failed to build from source provided!" and the following would apply:

Published code doesn’t help much if the app fails to compile.

We try to compile the published source code using the published build instructions into a binary. If that fails, we might try to work around issues but if we consistently fail to build the app, we give it this verdict and open an issue in the issue tracker of the provider to hopefully verify their app later.

The product cannot be independently verified. If the provider puts your funds at risk on purpose or by accident, you will probably not know about the issue before people start losing money. If the provider is more criminally inclined he might have collected all the backups of all the wallets, ready to be emptied at the press of a button. The product might have a formidable track record but out of distress or change in management turns out to be evil from some point on, with nobody outside ever knowing before it is too late.
Does the published binary match the published source code?

The answer is "yes".
If the answer was "no", we would mark it as "Not reproducible from source provided" and the following would apply:

The answer is "no". We marked it as "Not reproducible from source provided".

We did not ask this question because we failed at a previous question.
If the answer was "no", we would mark it as "Not reproducible from source provided" and the following would apply:

Published code doesn’t help much if it is not what the published binary was built from. That is why we try to reproduce the binary. We

  1. obtain the binary from the provider
  2. compile the published source code using the published build instructions into a binary
  3. compare the two binaries
  4. we might spend some time working around issues that are easy to work around

If this fails, we might search if other revisions match or if we can deduct the source of the mismatch but generally consider it on the provider to provide the correct source code and build instructions to reproduce the build, so we usually open a ticket in their code repository.

In any case, the result is a discrepancy between the binary we can create and the binary we can find for download and any discrepancy might leak your backup to the server on purpose or by accident.

As we cannot verify that the source provided is the source the binary was compiled from, this category is only slightly better than closed source but for now we have hope projects come around and fix verifiability issues.

The product cannot be independently verified. If the provider puts your funds at risk on purpose or by accident, you will probably not know about the issue before people start losing money. If the provider is more criminally inclined he might have collected all the backups of all the wallets, ready to be emptied at the press of a button. The product might have a formidable track record but out of distress or change in management turns out to be evil from some point on, with nobody outside ever knowing before it is too late.

Application build test result

Disclaimer: The WalletScrutiny project is sponsored by Spiral, a subsidiary of Block.

Analysis

This is the companion app to the Bitkey    . It requires an NFC-capable phone, otherwise the app would not be installed.

The setup process involves:

  • Opening the app and choosing “Set up new wallet”. Without the hardware device, it would not be possible to set up a new wallet. The alternate option is “More Options”.
    • More Options:
      • If the user selects More Options, the user can:
        • Accept an Invite to be a trusted contact (An invite code generated by a bitkey holder is required)
        • Recover your wallet. If the user is on Android, this requires signing in to Google Drive.
        • Import your wallet. Use the user’s Emergency Access Kit to import the wallet. There is a mobile key code that is stored in the Emergency Access Kit which can be inputted in a field.
        • The Emergency Access Kit is a PDF document located in the device’s cloud backup. It can be scanned with a QR code, or the details can be entered manually.
  • Pair the hardware device with the app using NFC (no initial charging required).

  • Once paired with a bitkey HWW this product can function as a wallet.

Recovery Options

Here are the available recovery options offered by Bitkey.


Release Notes

Verified Builds

This is the documentation for the build process for the Bitkey Android app, and these are the preparation instructions.

Update for version 2024.68.0

  • We are still encountering cloning errors if the https protocol is used when performed on our local machine. When running $ git submodule update --init --recursive multiple network errors are encountered primarily involving gecko-sdk

Verification can be quite troublesome if the Internet connection of the user is not fast enough.

Note: As of version 2024.68.0, the modifications I made to Bitkey’s script and methodology still apply. I have submitted a PR to them.

The modifications are for the following scripts:

This workflow will allow the user who have slow Internet connections to download the apks using Bitkey’s script just by cloning the repository.

On the user’s local machine

  • Once the Bitkey repository is cloned, we can access the download-apk-from-phone script in the directory bitkey/app/verifiable-build/android/verification/steps. When executed, it will download 4 split apks. These 4 apks can then be copied or uploaded to a faster machine with a faster Internet connection.

On the “build server” or the faster machine

  • Proceed with the preparatory steps as detailed in the README.md:
git clone https://github.com/proto-at-block/bitkey.git
cd bitkey
git submodule update --init --recursive
  • Modify verify-android-apk and convert-aab-to-apks as described above.

  • Generate the corresponding device-spec.json using bundletool. (See Android Developer Documentation)

  • We then execute ./bitkey/app/verifiable-build/android/verification/verify-android-apk -d /path/to/apk/directory -s /path/to/device-spec.json /path/to/bitkey/repo /path/to/build/directory

Successful Build

---------------------------

Comparing builds:

+ '[' 2 -ne 2 ']'
+ which diff
+ which /usr/local/android-sdk/build-tools/34.0.0/aapt2
+ lhs_comparable=/tmp/build/world.bitkey.app/2024.68.0/from-device/comparable
+ lhs_apks=/tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names
+ rhs_comparable=/tmp/build/world.bitkey.app/2024.68.0/locally-built/comparable
+ rhs_apks=/tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names
++ find /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names -maxdepth 1 -mindepth 1 -type f -exec basename '{}' ';'
+ lhs_apk_files='base.apk
arm64_v8a.apk
en.apk
xxhdpi.apk'
++ find /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names -maxdepth 1 -mindepth 1 -type f -exec basename '{}' ';'
+ rhs_apk_files='base.apk
arm64_v8a.apk
en.apk
xxhdpi.apk'
+++ echo 'base.apk
arm64_v8a.apk
en.apk
xxhdpi.apk'
++ sort -u /dev/fd/63 /dev/fd/62
+++ echo 'base.apk
arm64_v8a.apk
en.apk
xxhdpi.apk'
+ all_apk_files='arm64_v8a.apk
base.apk
en.apk
xxhdpi.apk'
++ diff -x resources.arsc -r /tmp/build/world.bitkey.app/2024.68.0/from-device/comparable /tmp/build/world.bitkey.app/2024.68.0/locally-built/comparable
+ differences=
+ diff_exit_status=0
+ diff_result=0
+ declare -a aapt_differences
+ for apk_file in $all_apk_files
+ '[' '!' -f /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names/arm64_v8a.apk ']'
+ '[' '!' -f /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names/arm64_v8a.apk ']'
+ unzip -l /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names/arm64_v8a.apk resources.arsc
Archive:  /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names/arm64_v8a.apk
  Length      Date    Time    Name
---------  ---------- -----   ----
---------                     -------
        0                     0 files
+ lhs_contains_resources_exit_code=11
+ unzip -l /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names/arm64_v8a.apk resources.arsc
Archive:  /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names/arm64_v8a.apk
  Length      Date    Time    Name
---------  ---------- -----   ----
---------                     -------
        0                     0 files
+ rhs_contains_resources_exit_code=11
+ '[' 11 -ne 0 ']'
+ '[' 11 -eq 0 ']'
+ '[' 11 -eq 0 ']'
+ echo 'Skipping aapt2 diff of arm64_v8a.apk as it doesn'\''t contain resources.arsc file'
Skipping aapt2 diff of arm64_v8a.apk as it doesn't contain resources.arsc file
+ for apk_file in $all_apk_files
+ '[' '!' -f /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names/base.apk ']'
+ '[' '!' -f /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names/base.apk ']'
+ unzip -l /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names/base.apk resources.arsc
Archive:  /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names/base.apk
  Length      Date    Time    Name
---------  ---------- -----   ----
   124960  1981-01-01 01:01   resources.arsc
---------                     -------
   124960                     1 file
+ lhs_contains_resources_exit_code=0
+ unzip -l /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names/base.apk resources.arsc
Archive:  /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names/base.apk
  Length      Date    Time    Name
---------  ---------- -----   ----
   124960  1981-01-01 01:01   resources.arsc
---------                     -------
   124960                     1 file
+ rhs_contains_resources_exit_code=0
+ '[' 0 -ne 0 ']'
+ '[' 0 -ne 0 ']'
++ /usr/local/android-sdk/build-tools/34.0.0/aapt2 diff /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names/base.apk /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names/base.apk
+ aapt_difference=
+ aapt_diff_exit_status=0
+ '[' '' '!=' '' ']'
+ diff_result=0
+ for apk_file in $all_apk_files
+ '[' '!' -f /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names/en.apk ']'
+ '[' '!' -f /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names/en.apk ']'
+ unzip -l /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names/en.apk resources.arsc
Archive:  /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names/en.apk
  Length      Date    Time    Name
---------  ---------- -----   ----
    48684  1981-01-01 01:01   resources.arsc
---------                     -------
    48684                     1 file
+ lhs_contains_resources_exit_code=0
+ unzip -l /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names/en.apk resources.arsc
Archive:  /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names/en.apk
  Length      Date    Time    Name
---------  ---------- -----   ----
    48684  1981-01-01 01:01   resources.arsc
---------                     -------
    48684                     1 file
+ rhs_contains_resources_exit_code=0
+ '[' 0 -ne 0 ']'
+ '[' 0 -ne 0 ']'
++ /usr/local/android-sdk/build-tools/34.0.0/aapt2 diff /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names/en.apk /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names/en.apk
+ aapt_difference=
+ aapt_diff_exit_status=0
+ '[' '' '!=' '' ']'
+ diff_result=0
+ for apk_file in $all_apk_files
+ '[' '!' -f /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names/xxhdpi.apk ']'
+ '[' '!' -f /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names/xxhdpi.apk ']'
+ unzip -l /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names/xxhdpi.apk resources.arsc
Archive:  /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names/xxhdpi.apk
  Length      Date    Time    Name
---------  ---------- -----   ----
     9844  1981-01-01 01:01   resources.arsc
---------                     -------
     9844                     1 file
+ lhs_contains_resources_exit_code=0
+ unzip -l /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names/xxhdpi.apk resources.arsc
Archive:  /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names/xxhdpi.apk
  Length      Date    Time    Name
---------  ---------- -----   ----
     9844  1981-01-01 01:01   resources.arsc
---------                     -------
     9844                     1 file
+ rhs_contains_resources_exit_code=0
+ '[' 0 -ne 0 ']'
+ '[' 0 -ne 0 ']'
++ /usr/local/android-sdk/build-tools/34.0.0/aapt2 diff /tmp/build/world.bitkey.app/2024.68.0/from-device/normalized-names/xxhdpi.apk /tmp/build/world.bitkey.app/2024.68.0/locally-built/normalized-names/xxhdpi.apk
+ aapt_difference=
+ aapt_diff_exit_status=0
+ '[' '' '!=' '' ']'
+ diff_result=0
+ '[' 0 -eq 0 ']'
+ echo 'The builds are identical!'
The builds are identical!

Diffs

$ diff -r from-device/unpacked locally-built/unpacked

Binary files from-device/unpacked/arm64_v8a/AndroidManifest.xml and locally-built/unpacked/arm64_v8a/AndroidManifest.xml differ
Only in from-device/unpacked/arm64_v8a: META-INF
Only in from-device/unpacked/arm64_v8a: stamp-cert-sha256
Binary files from-device/unpacked/base/AndroidManifest.xml and locally-built/unpacked/base/AndroidManifest.xml differ
Binary files from-device/unpacked/base/res/xml/splits0.xml and locally-built/unpacked/base/res/xml/splits0.xml differ
Binary files from-device/unpacked/base/resources.arsc and locally-built/unpacked/base/resources.arsc differ
Only in from-device/unpacked/base: stamp-cert-sha256
Binary files from-device/unpacked/en/AndroidManifest.xml and locally-built/unpacked/en/AndroidManifest.xml differ
Only in from-device/unpacked/en: META-INF
Binary files from-device/unpacked/en/resources.arsc and locally-built/unpacked/en/resources.arsc differ
Only in from-device/unpacked/en: stamp-cert-sha256
Binary files from-device/unpacked/xxhdpi/AndroidManifest.xml and locally-built/unpacked/xxhdpi/AndroidManifest.xml differ
Only in from-device/unpacked/xxhdpi: META-INF
Binary files from-device/unpacked/xxhdpi/resources.arsc and locally-built/unpacked/xxhdpi/resources.arsc differ
Only in from-device/unpacked/xxhdpi: stamp-cert-sha256

$ diff -r from-device/normalized-names locally-built/normalized-names

Binary files from-device/normalized-names/arm64_v8a.apk and locally-built/normalized-names/arm64_v8a.apk differ
Binary files from-device/normalized-names/base.apk and locally-built/normalized-names/base.apk differ
Binary files from-device/normalized-names/en.apk and locally-built/normalized-names/en.apk differ
Binary files from-device/normalized-names/xxhdpi.apk and locally-built/normalized-names/xxhdpi.apk differ

We ran diffoscope on:

  • unpacked/base/AndroidManifest.xml and this is the pastebin result
  • unpacked/base/resources.arsc the pastebin result
  • normalized-names/arm64_v8a.apk - the pastebin result
    • danny@lw10:~/work/builds/world.bitkey.app/2024.67.0-1/success/3$ diffoscope --text bitkey-2024.67.0.1-arm6_v8a.apk.txt from-device/normalized-names/arm64_v8a.apk locally-built/normalized-names/arm64_v8a.apk
  • normalized-names/base.apk - the pastebin result
    • danny@lw10:~/work/builds/world.bitkey.app/2024.67.0-1/success/3$ diffoscope --text bitkey-2024.67.0.1-base.apk.txt from-device/normalized-names/base.apk locally-built/normalized-names/base.apk
  • normalized-names/en.apk - the pastebin result
    • danny@lw10:~/work/builds/world.bitkey.app/2024.67.0-1/success/3$ diffoscope --text bitkey-2024.67.0.1-en.apk.txt from-device/normalized-names/en.apk locally-built/normalized-names/en.apk
  • normalized-names/xxhdpi.apk - the pastebin result
    • danny@lw10:~/work/builds/world.bitkey.app/2024.67.0-1/success/3$ diffoscope --text bitkey-2024.67.0.1-xxhdpi.apk.txt from-device/normalized-names/xxhdpi.apk locally-built/normalized-names/xxhdpi.apk
  • unpacked/base/res/xml/splits0.xml - the pastebin result
    • danny@lw10:~/work/builds/world.bitkey.app/2024.67.0-1/success/3$ diffoscope --text bitkey-2024.67.0.1-splits0.xml.txt from-device/unpacked/base/res/xml/splits0.xml locally-built/unpacked/base/res/xml/splits0.xml

Analysis of the diffoscope results:

arm64_v8a.apk

Of particular interest is the human-readable portion of the diffoscope results:

      AndroidManifest.xml (decoded)
  │ ├── AndroidManifest.xml
  │ │ @@ -1,6 +1,4 @@
  │ │  <?xml version="1.0" encoding="utf-8"?>
  │ │ -<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="2024680001" android:splitTypes="base__abi" package="world.bitkey.app" split="config.arm64_v8a">
  │ │ -  <application android:hasCode="false" android:extractNativeLibs="false">
  │ │ -    <meta-data android:name="com.android.vending.derived.apk.id" android:value="2"/>
  │ │ -  </application>
  │ │ +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="2024680001" package="world.bitkey.app" split="config.arm64_v8a">
  │ │ +  <application android:hasCode="false" android:extractNativeLibs="false"/>
  │ │  </manifest>

Like before, we find this segment shows that Google added this line: <meta-data android:name="com.android.vending.derived.apk.id" android:value="2"/>

Digging a little bit deeper, we find that:

Apps that are signed by Google will have a ‘derived APK ID’ written into their AndroidManifest.xml file.

Source

This is further elaborated here:

Modifications to your APK

Apps that are signed by Google will have a “derived APK ID” written into their AndroidManifest.xml file. You’ll see a meta-data element added under the application tag that references <meta-data android:name=”com.android.vending.derived.apk.id” android:value=”[ID]” />.

This ID is the identifier of the modified APK and will be reported in the usual bug reporting tools. You can use the derived APK ID to recognize a specific APK that was delivered by Play.

Notes on the Bitkey Build

Bitkey acknowledges the difference between apks extracted from AABs. More about this can be read here:

Although Google Play should be using bundletool, APKs extracted from an AAB differ in more than just a signature.

As mentioned above, we noticed a mismatch between language APKs downloaded by Google Play and those produced by bundletool. We use the –connected-device flag when invoking bundletool build-apks, which should produce the same set of APKs. However, looking at the output of bundletool get-device-spec, the supportedLocales list is often missing some languages that Google Play downloaded to the device.

Another such difference are names of extracted APKs. We use the normalize-apk-names-new script to rename APK files to matching names. resources.arsc mismatch

Until recently, once we normalized the APK names and contents, we could just run diff -r to check for identity. Unfortunately Google Play has changed how they build resources.arsc. From our testing, it seems like they are using a previously reserved byte. When built using bundletool, that byte is always 0, thus making direct comparison using diff impossible.

Since resources are important part of the application, we’re using aapt2 diff to check for differences between APKs from device and from bundletool.

Most of the diffs produced stemmed from signing certificates and signatures. It is apparent that Google Play modifies the apk as seen with the addition of <meta-data android:name="com.android.vending.derived.apk.id" android:value="2"/>. From a “strict reproducibility” standpoint, this app is not-reproducible in the sense that it is bit-by-bit identical in the binary level. But, if we factor in the explanation provided by Bitkey above, and if we take cognizance of the fact that Google Play alters the apks distributed to the users, we can consider these as benign differences and give Bitkey the verdict of reproducible.

Tests performed by Daniel Andrei R. Garcia

Previous application build tests

30th August 2024 2024.67.0 (1)  
26th July 2024 2024.63.0 (4)  
23rd March 2024 2024.63.0 (2)  
Show more

Disclaimer

Our Analysis is not a full code review! We plan to make code reviews available in the future but even then it will never be a stamp of approval but rather a list of incidents and questionable coding practice. Nasa sends probes to space that crash due to software bugs despite a huge budget and stringent scrutiny.

Do your own research

In addition to reading our analysis, it is important to do your own checks. Before transferring any bitcoin to your wallet, look up reviews for the wallet you want to use. They should be easy to find. If they aren't, that itself is a reason to be extra careful.