Repository navigation
v1.1.0
Now works with portable installation
Added
- Tidy code
- Support for portable installations
- Save all parameters required to re-create a derived key in the
ok-agent.tomlfile - Allow to set the Authentication flag upon creation of a derived key
Install
Download the appropriate package for your OS from "Assets" below (64bit Linux, 64bit Windows or MacOS), extract it, then follow theses steps:
First, get the path of the gpg.conf file:
$ gpgconf -L homedirThen, in this file, add the line
agent-program path/to/ok-gpg-agent
If gpg-agent is already running either restart the computer, kill the process or use the command
$ gpg-connect-agent KILLAGENT /byeQuick configure
Create the file ok-agent.toml in the homedir of gpg. This file will contain the configuration of
the agent.
For ok-gpg-agent to know which private key is in which slot, you must add the keygrip of the key
in a [[keyinfo]] section as follow :
Stored keys
[[keyinfo]]
slot = "ECC1"
keygrip = "BBD680E5AD45D0FEDD2E90A34F1CEC9A6744D096"The slot field can be any of RSA1 .. RSA4, ECC1 .. ECC16.
For RSA slots, a field size containing the size of the key in bits must be present:
[[keyinfo]]
slot = "RSA1"
keygrip = "5B3E86D2F867BA1135F3754CAE4F82409F8D0AE6"
size = 4096To obtain the keygrip of a key, run:
$ gpg --with-keygrip -kDerived keys
[[keyinfo]]
identity = "My identity (comment) <my.dentity@example.com>"
ecc_type = "Ed25519"
keygrip = "7787EDEE866D4A3534BF5B5B9E20A3F7D616AF50"The ok-gen-key command-line tool automatically build the right [[keyinfo]] config.
Quick derived key creation
To create a new public key, export it into the default GPG keyring and put the relevant [[keyinfo]] sections in the default ok-agent.toml:
$ ok-gen-key --identity "My Identity (Comment) <my.identity@example.com>" --autoTo get help:
$ ok-gen-key --helpQuick private key copy
To copy a private key to an OnlyKey :
$ ok-move-key private_key.ascYou can then choose which key to copy on the OnlyKey.
To list the empty slots:
$ ok-move-key --list-slotsTo get help:
$ ok-move-key --helpEach private key must have its own [[keyinfo]] section (one for signing key and one for decryption key in a typical PGP configuration).
Look at the README for a complete documentation.