# Samourai Wallet

latest release: Varies with device ( 23rd September 2021 ) last analysed  7th October 2021 Not reproducible from source provided
100 thousand

# Help spread awareness for build reproducibility

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 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 0.81 0.99.27-gb 0.99.87 0.99.88 /tmp/samourai-wallet-android$ git checkout 0.99.88

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

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.

(lw)

# Verdict Explained

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 not, we tag it Unreproducible!

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.