Check your download
Compare a downloaded file with its published checksum, and an APK with its signing certificate.
You don’t have to do any of this to use Ledgerbook. It is here for people who want to be sure a file is the one this site published, and that an update comes from the same publisher as the version before it.
Compare a checksum
A checksum is a fingerprint of a file. If one byte differs, the checksum differs.
On Linux, in the folder with the download:
sha256sum ledgerbook-v1.22.zip
Compare the long number with the SHA-256 on the downloads page. To check several files at once, download SHA256SUMS from that page into the same folder and run:
sha256sum -c SHA256SUMS --ignore-missing
Each file should answer OK.
What a checksum does and doesn’t prove
A matching checksum proves the file arrived intact and is the file this site lists. It doesn’t prove who made it. That is what the signing certificate is for.
Check an APK’s signing certificate
Every Android app is signed, and Android will only install an update if it is signed with the same certificate as the app already on the phone. That check happens on the phone every time, without you doing anything.
To look at the certificate yourself on a computer, you need apksigner from the Android SDK build-tools:
apksigner verify --print-certs Ledgerbook-v1.22.apk
The line Signer #1 certificate SHA-256 digest should match the Signed with value on the downloads page. Ledgerbook and Ledgerbook Driver each have their own certificate.
What F-Droid checks for you
When you add the repo, F-Droid stores the fingerprint of the repo’s signing key. From then on it refuses any app list that isn’t signed with that key, and it checks each APK it downloads against the checksum in that signed list. Compare the fingerprint once, when you add the repo.