Bitcoin Paper Wallet

3 minute read

Published:

Wallet Logo

This app currently has more than 10000 downloads, a 4.2 stars rating from 128 users and the latest APK is version Varies with device.

Our last analysis was done on 31st May 2020 based on data found in their Google Play description and their website and their source repository. We discuss verification with the provider in this issue.

We found these ways of contacting the developers:

Disclaimer

The following 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 bad coding practice. We cannot find and tell you all the dark secrets the wallet providers might have.

Do your own research!

Try out searching for "lost bitcoins", "stole my money" or "scammers" together with the wallet's name, even if you think the wallet is generally trustworthy. For all the bigger wallets you will find accusations. Make sure you understand why they were made and if you are comfortable with the provider's reaction.

The Analysis

This app is an open source paper wallet generator but can we reproduce the build 3.2.0 from Google Play?

$ git clone https://github.com/ValleZ/Paper-Wallet
$ cd Paper-Wallet/
$ git tag | grep 3....
3.0.0

not good but

$ git log -n 1
commit 06b3e50e798bb2219b327dc4bba636343ca9f678 (HEAD -> master, origin/master, origin/HEAD)
Author: Valentin Konovalov <valle.ketsujin@gmail.com>
Date:   Wed Mar 25 20:46:53 2020 -0400

    3.2.0

So the last commit had the label 3.2.0 which looks like the author just did not tag it. Let’s see …

As there are no build instructions, we took the freedom and looked around a bit. Normally we do not provide code reviews and our findings are so blatant that they might actually be irrelevant upon deeper inspection but just in case this app turns out to be reproducible/reproducible, the following two items require a deeper look:

  1. This binary blob is not accounted for. Where does it come from? Can it be reproduced?
  2. Disabling globally any warnings about poor randomness is exactly what one would never do for a Bitcoin wallet. When used completely offline, keys are still at risk if they were generated from a poor random source.

Anyway … back to reproducibility:

$ docker run -it --volume $PWD:/mnt --workdir /mnt --rm beevelop/cordova bash
root@971258b281bb:/mnt# yes | /opt/android/tools/bin/sdkmanager "build-tools;29.0.3"
root@971258b281bb:/mnt# ./gradlew :app:assemble
BUILD SUCCESSFUL in 6m 18s
50 actionable tasks: 50 executed
root@971258b281bb:/mnt# exit
$ apktool d -o fromBuild app/build/outputs/apk/release/app-release-unsigned.apk
$ apktool d -o fromGoogle "/path/to/Paper Wallet 3.2.0 (ru.valle.btc).apk"
$ diff --recursive --brief from*
Files fromBuild/AndroidManifest.xml and fromGoogle/AndroidManifest.xml differ
Files fromBuild/apktool.yml and fromGoogle/apktool.yml differ
Only in fromBuild: lib
Files fromBuild/original/AndroidManifest.xml and fromGoogle/original/AndroidManifest.xml differ
Only in fromGoogle/original/META-INF: CERT.RSA
Only in fromGoogle/original/META-INF: CERT.SF
Files fromBuild/original/META-INF/MANIFEST.MF and fromGoogle/original/META-INF/MANIFEST.MF differ
Only in fromBuild/res: drawable-hdpi
Only in fromBuild/res: drawable-ldpi
Only in fromBuild/res: drawable-mdpi
Only in fromBuild/res: drawable-night-hdpi
Only in fromBuild/res: drawable-night-ldpi
Only in fromBuild/res: drawable-night-mdpi
Only in fromBuild/res: drawable-night-xhdpi
Only in fromBuild/res: drawable-night-xxhdpi
Only in fromBuild/res: drawable-night-xxxhdpi
Only in fromBuild/res: drawable-xhdpi
Only in fromBuild/res: drawable-xxhdpi
Only in fromBuild/res: drawable-xxxhdpi
Files fromBuild/res/layout/main.xml and fromGoogle/res/layout/main.xml differ
Files fromBuild/res/layout-v22/main.xml and fromGoogle/res/layout-v22/main.xml differ
Files fromBuild/res/menu/main.xml and fromGoogle/res/menu/main.xml differ
Files fromBuild/res/menu-v11/main.xml and fromGoogle/res/menu-v11/main.xml differ
Files fromBuild/res/values/public.xml and fromGoogle/res/values/public.xml differ
Only in fromGoogle/res: values-anydpi-v21
Only in fromBuild/res: values-ja
Only in fromBuild/res: values-pt
Only in fromBuild/res: values-ru
Only in fromGoogle/res/xml: splits0.xml

That is a big diff. This app is not verifiable.

Verdict Explained

Not verifiable: The provided Source Code could not be verified to match the app released on Google Play.

This verdict means that the provider did share some source code but that we could not verify that this source code matches the released app. This might be due to the source being released later than the app or due to the provided instructions on how to compile the app not being sufficient or due to the provider excluding parts from the public source code. In any case, the result is a discrepancy between the app we can create and the app we can find on GooglePlay 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 app 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 app 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 app 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.