decentralized-hse / lsm-verification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lsm-verification

Utility for hashing, signing, and validating LSM database replica entries.

Usage:

  1. Generate private and public RSA keys, for example, by running
openssl genrsa -out ~/mykey.pem 2048
openssl rsa -in ~/mykey.pem -pubout > ~/mykey.pub
  1. Build the project:
go build
  1. Set environment variables:
export dbServerAddress="<address>:<port>"
export dbReplicaID="<replicaID>"
export rsaPublicKey=$(cat ~/mykey.pub)
export rsaPrivateKey=$(cat ~/mykey.pem)
  1. Hash and sign your database replica entries:

    • Set run_mode: "Sign" in config/config.yml
    • Run ./lsm-verification
  2. Distribute your public key

  3. Others can verify data from your replica by

    • Setting their run_mode: "Validation" in config/config.yml
    • Setting their dbReplicaID to your replica ID
    • Setting their rsaPublicKey to your public key
    • Running ./lsm-verification

About

License:GNU General Public License v3.0


Languages

Language:Go 100.0%