A simple tool for signing/verifying arbitrary data with ED25519 keys, written in Go. Takes data from STDIN
. Generates new private/public keys private_key.pem
and public_key.pem
if they don't already exist in the working directory.
- Clone this repository
- Compile the binary
$ go build gallifrey.go
$ ./gallifrey <mode> [arguments]
Modes:
sign
verify <publicKey> <signature>
$ echo "foo bar" | ./gallifrey sign
Signature: w/eZA0DlOUn6mUgYvY7To6aNNGg+v7C9PnfWtlCiooT1yeKaCrK5jiDG3Au6y7q/s2rowRlJ8mU+Ad3ALr/2Bw==
Public Key: wAooJAYrCTI01ZL0LnOmL2ZZE9xHEuvgmL5GT5Kmjuc=
You can set the key and signature as environment variables...
$ echo "foo bar" > foo.txt
$ ./gallifrey verify $key $sig < foo.txt
### SIGNATURE OK ###