Add bindings PGP public key and documentation on how to verify signatures

This commit is contained in:
thunderbiscuit 2022-09-26 09:01:05 -04:00
parent 6598df9ed9
commit 3a0fe79dd8
No known key found for this signature in database
GPG Key ID: 88253696EB836462

View File

@ -116,34 +116,41 @@ and use the `publishToMavenLocal` task without excluding the signing task:
``` ```
## Verifying Signatures ## Verifying Signatures
Both libraries and all their corresponding artifacts are signed with a PGP key you can find in the root of this repository. To verify the hashes and signatures, go through the following steps: Both libraries and all their corresponding artifacts are signed with a PGP key you can find in the
root of this repository. To verify the signatures follow the below steps:
1. Import the PGP key in your keyring
2. Download the artifact and its corresponding hash and signature files ([bdk-jvm] and [bdk-android])
3. Verify the hashes
4. Verify the signature
1. Import the PGP key in your keyring.
```shell ```shell
# 1. Navigate to the root of the repository and import the ./PGP-BDK-BINDINGS.asc public key # Navigate to the root of the repository and import the ./PGP-BDK-BINDINGS.asc public key
gpg --import ./PGP-BDK-BINDINGS.asc gpg --import ./PGP-BDK-BINDINGS.asc
# Alternatively, you can import it directly from a public key server
# Alternatively, you can import the key directly from a public key server
gpg --keyserver keyserver.ubuntu.com --receive-key 2768C43E8803C6A3 gpg --keyserver keyserver.ubuntu.com --receive-key 2768C43E8803C6A3
# Verify that the correct key was imported # Verify that the correct key was imported
gpg --list-keys gpg --list-keys
# ------------------------------ # You should see the below output
# pub ed25519 2022-08-31 [SC] pub ed25519 2022-08-31 [SC]
# 88AD93AC4589FD090FF3B8D12768C43E8803C6A3 88AD93AC4589FD090FF3B8D12768C43E8803C6A3
# uid [ unknown] bitcoindevkit-bindings <bindings@bitcoindevkit.org> uid [ unknown] bitcoindevkit-bindings <bindings@bitcoindevkit.org>
# sub cv25519 2022-08-31 [E] sub cv25519 2022-08-31 [E]
```
# 2. Add files and their corresponding signature and hash files in the same directory 2. Download the binary artifacts and corresponding signature files.
# e.g. bdk-jvm-0.9.0.jar, bdk-jvm-0.9.0.jar.asc, bdk-jvm-0.9.0.jar.sha256 - from [bdk-jvm]
- `bdk-jvm-<version>.jar`
- `bdk-jvm-<version>.jar.asc`
- from [bdk-android]
- `bdk-android-<version>.aar`
- `bdk-android-<version>.aar.asc`
# 3. Verify that the hashes are the same 3. Verify the signatures.
shasum --algorithm 256 bdk-android-0.9.0.aar && cat bdk-android-0.9.0.aar.sha256 ```shell
gpg --verify bdk-jvm-<version>.jar.asc
gpg --verify bdk-android-<version>.aar.asc
# 4. Verify the signature # you should see a "Good signature" result
gpg --verify bdk-android-0.9.0.module.asc gpg: Good signature from "bitcoindevkit-bindings <bindings@bitcoindevkit.org>" [unknown]
``` ```
### PGP Metadata ### PGP Metadata