Files
amodem/gpg/demo.sh
Roman Zeyde 4335740abe Add experimental support for GPG signing via TREZOR
In order to use this feature, GPG "modern" (v2.1) is required [1].
Also, since TREZOR protocol does not support arbitrary long fields,
TREZOR firmware needs to be adapted  with the following patch [2],
to support signing fixed-size digests of GPG messages of arbitrary size.

[1] https://gist.github.com/vt0r/a2f8c0bcb1400131ff51
[2] https://gist.github.com/romanz/b66f5df1ca8ef15641df8ea5bb09fd47
2016-04-16 21:21:12 +03:00

15 lines
514 B
Bash
Executable File

#!/bin/bash
set -x
CREATED=1460731897 # needed for consistent public key creation
NAME="trezor_key" # will be used as GPG user id and public key name
echo "Hello GPG World!" > EXAMPLE
./signer.py $NAME --time $CREATED --public-key --file EXAMPLE --verbose
./check.py $NAME.pub EXAMPLE.sig # pure Python verification
# Install GPG v2.1 (modern) and verify the signature
gpg2 --import $NAME.pub
gpg2 --list-keys $NAME
# gpg2 --edit-key trezor_key trust # optional: mark it as trusted
gpg2 --verify EXAMPLE.sig