Utility for hashing, signing, and validating LSM database replica entries.
- Generate private and public RSA keys, for example, by running
openssl genrsa -out ~/mykey.pem 2048
openssl rsa -in ~/mykey.pem -pubout > ~/mykey.pub
- Build the project:
go build
- Set environment variables:
export dbServerAddress="<address>:<port>"
export dbReplicaID="<replicaID>"
export rsaPublicKey=$(cat ~/mykey.pub)
export rsaPrivateKey=$(cat ~/mykey.pem)
-
Hash and sign your database replica entries:
- Set
run_mode: "Sign"
inconfig/config.yml
- Run
./lsm-verification
- Set
-
Distribute your public key
-
Others can verify data from your replica by
- Setting their
run_mode: "Validation"
inconfig/config.yml
- Setting their
dbReplicaID
to your replica ID - Setting their
rsaPublicKey
to your public key - Running
./lsm-verification
- Setting their