C++ Digital Signatures CLI

This is a command-line tool that can generate Digital Signature keys, and create and verify digital signatures.

It demonstrates the basic steps of using Tink, namely loading key material, obtaining a primitive, and using the primitive to do crypto.

Moreover, since this app shares the same Bazel WORKSPACE with Tink, its BUILD file can directly depend on Tink.

Build and Run

Bazel

git clone https://github.com/google/tink
cd tink
bazel build ...
echo "a message" > message.txt
./bazel-bin/examples/digital_signatures/cc/digital_signatures_cli gen-private-key private_keyset.bin
./bazel-bin/examples/digital_signatures/cc/digital_signatures_cli get-public-key private_keyset.bin \
    public_keyset.bin
./bazel-bin/examples/digital_signatures/cc/digital_signatures_cli sign private_keyset.bin \
    message.txt signature.bin
./bazel-bin/examples/digital_signatures/cc/digital_signatures_cli verify public_keyset.bin \
    message.txt signature.bin result.txt
cat result.txt