Wallet Logo

Samourai Wallet

Latest release: VARY ( 27th December 2022 ) 🔍 Last analysed 2nd November 2022 . Not reproducible from source provided
100 thousand

We could not verify that the provided code matches the binary!

As part of our Methodology, we ask:

Is the published binary matching the published source code?

If the answer is "no", we mark it as "Not reproducible from source provided".

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.

Help spread awareness for build reproducibility

Please help us spread the word, asking Samourai Wallet to support reproducible builds  via their Twitter!

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.

If you find something we should include, you can create an issue or edit this analysis yourself and create a merge request for your changes.

The Analysis 

Update 2022-11-02: As of now, Samourai Wallet is the Unreproducible! product with the most users so we gave it yet another spin for their version 0.99.98f with hash 0a5711195d96f13f41a71107f1b1035505b33afd3a299828e43e9d1b5101e9c0 even though the related issue is closed without resolution. Compilation was easy:

$ git clone https://code.samourai.io/wallet/samourai-wallet-android.git
$ cd samourai-wallet-android/
$ git checkout 0.99.98f
$ podman run -it --rm -v$PWD:/mnt --workdir=/mnt walletscrutiny/android
root@374550c30c4e:/mnt# apt update; apt install openjdk-11-jdk; ./gradlew assembleRelease

As always, the binaries from Play Store and compilation do not match:

$ unzip -d fromDownload path/to/Samourai\ 0.99.98f\ \(com.samourai.wallet\).apk
$ unzip -d fromBuild app/build/outputs/apk/production/release/app-production-release-unsigned.apk
$ diff -r from*
Binary files fromBuild/assets/dexopt/baseline.prof and fromDownload/assets/dexopt/baseline.prof differ
Binary files fromBuild/classes2.dex and fromDownload/classes2.dex differ
Only in fromDownload/META-INF: CERT.RSA
Only in fromDownload/META-INF: CERT.SF
Only in fromDownload/META-INF: MANIFEST.MF

While the bottom three lines are expected due to the signature, the other two are not ok. This product is not verifiable.

Update 2021-10-07: Erik Nylund reached out to let us know of his failed attempt to reproduce this app. He wrote he also took a look at the Samourai Wallet v0.99.97a. It seems “the number of files is way smaller now but still quite a diff in classes2.dex”. He also sent a link to a log of his attempt.

Update 2021-08-02: Samourai is currently certainly not reproducible as it’s even not possible to build it - due to an issue reported two months ago. We tried to build it again, as the Samourai devs don’t get tired to lie about the project’s reproducibility and we tried it again.

Update 2021-03-02: Samourai claims to be on F-Droid, implying … what exactly? FDroid.org has very strict rules about code being open source but FDroid itself is also open source and allows to add secondary repositories that might apply different rules and standards and that’s exactly what’s happening here. FDroid.org does not list Samourai but the Copperhead FDroid repository apparently does. As long as the binary on Google Play is not the same as the one on Copperhead, the presence on Copperhead has no relevance to the security of the 100k users that downloaded the app from Google Play. Smoke and mirrors from Samourai as always.

Update 2020-08-02: Samourai claims

which is a direct claim of falsehood of our findings. No other neutral party supported this claim so far and neither did the provider explain how such a verification should work or where our findings are wrong. This is so far the clearest lie and thus red flag about this wallet.

Update 2019-12-27: The provider closed the issue we had opened on their repository.

Update 2019-12-16: Samourai tweeted in response to us:

@SamouraiWallet Replying to @BashCo_ deterministic builds have not been a priority or goal at this stage of dev using the resources we have. The goals we have focused on (privacy, dojo, whirlpool, etc) we have continued to deliver on. There is limited value in this investment without expert audits for each release

The original review:

Samourai is still “early access” which means that there are no Google ratings or comments.

Their website claims the wallet is non-custodial:

Be your own Swiss Bank Fully non custodial software ensures you are always in control of your private keys. No email address, no ID checks, and no hassle. Just install and go.

Given claims like:

We are privacy activists who have dedicated our lives to creating the software that Silicon Valley will never build, the regulators will never allow, and the VC’s will never invest in. We build the software that Bitcoin deserves.

we are not surprised to not find who is behind this wallet.

But the build instructions on their GitHub are fairly simple:

Import as Android Studio project. Should build “as is”.

so lets see what we get when we do this:

/tmp/$ git clone git@github.com:Samourai-Wallet/samourai-wallet-android.git
/tmp/$ cd samourai-wallet-android
/tmp/samourai-wallet-android$ git tag
/tmp/samourai-wallet-android$ git checkout 0.99.88

We open the folder in Android Studio, set the Build Variants as follows:

Samourai Build Variants

and build the APK.

The following is the full output of diffoscope. Red lines are what the playstore version misses compared to the self compiled version and green lines are additions. Right in the beginning we see the expected lines: META-INF/MANIFEST.MF is different, META-INF/CERT.RSA and META-INF/CERT.SF are exclusive to the playstore version as should be.

The rest of the diff is what makes the build not verifiable.

We left all the diff here (The diff was part of the review itself but that caused issues on some browsers.) for the more curious to investigate but it’s obviously too much to consider acceptable like we might conclude if it was only the .png files that were different.