mirror of
https://github.com/romanz/amodem.git
synced 2026-04-05 12:16:24 +08:00
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
15 lines
514 B
Bash
Executable File
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
|