github.com/decred/politeia@v1.4.0/politeiawww/cmd/politeiaverify/README.md (about)

     1  # politeiaverify
     2  
     3  `politeiaverify` is a tool that allows anyone to independently verify data
     4  submitted to Politeia. This includes:
     5  
     6  - Censorship records - a user is provided with a censorship record whenever a
     7    record is submitted or updated. A censorship record provides cryptographic
     8    proof that a record was received by Politeia.
     9  
    10  - Plugin receipts - when plugin data is submitted, such as a new comment, a
    11    receipt is returned by the server. The receipt provide cryptographic proof
    12    that the data was received by politeia.
    13  
    14  - User signatures - anytime a user submits any type of data to Politeia they
    15    must sign the data using a key that is specific to the user. The public key
    16    and signature are saved along with the data, providing cryptographic proof
    17    that the data was submitted by the user.
    18  
    19  - Timestamps - all data submitted to Politeia is timestamped onto the Decred
    20    blockchain. A timestamp provides cryptographic proof that the data existed at
    21    a specific block height and has not been altered since then.
    22  
    23  ## Usage
    24  
    25  ```
    26  politeiaverify [flags] <filepaths>...`
    27  
    28  Options:
    29   -k       Politiea's public server key
    30   -t       Record censorship token
    31   -s       Record censorship signature
    32  ```
    33  
    34  ## Verifying politeiagui bundles
    35  
    36  File bundles that are available for download in politeiagui can be passed
    37  directly into `politeiaverify`. These files contain everything needed to verify
    38  their contents. Files accepted by this tool are listed below.
    39  
    40  ```
    41  Record bundle     : [token]-[version].json
    42  Record timestamps : [token]-[version]-timestamps.json
    43  Comments bundle   : [token]-comments.json
    44  Comment timestamps: [token]-comments-timestamps.json
    45  Votes bundle      : [token]-votes.json
    46  Vote timestamps   : [token]-votes-timestamps.json
    47  ```
    48  
    49  ### Example: Verifying a record bundle
    50  ```
    51  $ politeiaverify 98ddf0b2fe580c43-v2.json
    52  
    53  Server public key: bb5b37a6984871bf061cb4a2c9d0f3a3e102dacc810703d49b6d3641a9d08a9b
    54  Censorship record
    55    Token      : 98ddf0b2fe580c43
    56    Merkle root: 1be0528f55ed7a6a299cecf2b625d327959f104672b1d287c9b00cae7ab0f493
    57    Signature  : 5c91db205f65539a14ae3061b86a27830fc16eb4a345390cfcfb0fbc21a4c931be3f72e9556409c302154dcb99b89c64556400f4d8bd5e4ce720500e2b7fd50a
    58  Censorship record verified!
    59  
    60  Author metadata:
    61    ID        : d98122ad-4012-4b62-8539-69fb0d53f417
    62    Public key: 869616157b35bcd7d13b8c3ce9b895f2e50dd8c7f0c42a550c6905c6aad6e17b
    63    Signature : b298d086be8f02e8ad490e907beea17340ba6306604467fa145bdebbd94842df5024077f0a5be6b203493a4079f34807ba03963bc72a53cd8b8b953302495b0d
    64  Author signature verified!
    65  
    66  Status change: public
    67    Public key   : bc510d90ff9d88187c41837ee11c50f40f3c262f2e1564bb2e75ea9451b102a0
    68    Signature    : d02ab197aa24244752dab6aa0445741c77d6f10690775a4ea18c9d07fe84569c8f54777792d9c0e1383a4399ccfa952bd9d556348194ac011970fa67f0c0ac0a
    69  Status change signatures verified!
    70  ```
    71  
    72  ### Example: Verifying record timestamps
    73  ```
    74  $ politeiaverify 98ddf0b2fe580c43-v2-timestamps.json
    75  
    76  Merkle root: 80d9cdb73017571d932bd6aef5336c4a3e88ad284f987d54f929eb16254b4edf
    77  DCR tx     : 149c04fec4c2dd3bc01694a4e8db126211ac8ed726db71e976a82525ac42490a
    78  Record contents
    79    Metadata
    80      usermd 1
    81      usermd 2
    82    Files
    83      index.md
    84      proposalmetadata.json
    85  Timestamps successfully verified!
    86  The merkle root can be found in the OP_RETURN of the DCR tx.
    87  ```
    88  
    89  ## Manual verification
    90  
    91  When verifying manually the user must provide the server public key (`-k`),
    92  the censorship token (`-t`), the censorship record signature (`-s`), and the
    93  file paths for all files that were part of the record.
    94  
    95  ```
    96  $ politeiaverify \
    97  -k e88df79a4b02699e6c051adbae05f21f2a2f24942e0f27cade165548ec3d6387 \
    98  -t 39868e5e91c78255 \
    99  -s b2a69823f85b62941d845c439726a2504026a0d29fd50ecabe5648b0128328c2fade0ddb354594d48a209dff24e73795ec9cb175d028155cbfa1901114f4b608 \
   100  index.md
   101  
   102  Server key : e88df79a4b02699e6c051adbae05f21f2a2f24942e0f27cade165548ec3d6387
   103  Token      : 39868e5e91c78255
   104  Merkle root: 2d00aaa0768701fd011943fbe8ae92f84ee268ca134d6b14f877c3153072bb3c
   105  Signature  : b2a69823f85b62941d845c439726a2504026a0d29fd50ecabe5648b0128328c2fade0ddb354594d48a209dff24e73795ec9cb175d028155cbfa1901114f4b608
   106  
   107  Record successfully verified
   108  ```