Metadata-Version: 2.5
Name: age-plugin-trezor-slip11
Version: 0.1.0
Summary: Plugin for symmetric encryption with age using a Trezor device.
Project-URL: Homepage, https://github.com/azert9/age-plugin-trezor-slip11
Project-URL: Issues, https://github.com/azert9/age-plugin-trezor-slip11/issues
Author-email: Julien Loctaux <contact@jloc.fr>
License-Expression: MIT
License-File: LICENSE.txt
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: trezor~=0.20
Description-Content-Type: text/markdown

# age-plugin-trezor-slip11

This [age](https://age-encryption.org/) plugin allows you to encrypt data using a Trezor hardware wallet.

Compared to other projects, this one is based on [SLIP-0011](https://slips.readthedocs.io/en/latest/slip-0011/) and does
symmetric encryption.

## Usage

The first step is to generate an identity, which will represent our secret key. Identities generated
by this plugin don't contain any secret information, they only contain parameters for tweaking encryption.

The `KEY` parameter in the example bellow is what will be displayed on the device's screen when encrypting
or decrypting messages.

```shell
age-plugin-trezor-slip11 generate-identity --key=KEY > identity.txt
```

You can then encrypt or decrypt messages by passing the generated identity to age:

```shell
age -i ./identity.txt -e -a <<<'super secret' > encrypted.age
age -i ./identity.txt -d < ./encrypted.age
```

## Running tests

```shell
# from the root of the project
pip install pytest
pytest  # run tests, excluding those depending on a connection with a device...
pytest --use-device  # ... or including all tests
```

## Development

For debugging, set the environment variable `AGE_PLUGIN_TREZOR_SLIP11_DEBUG_FILE=/path/to/log/file`.

For using a fake backend instead of connecting to a device, set `AGE_PLUGIN_TREZOR_SLIP11_UNSAFE_TEST_MODE=true`.

## References

* [Plugin interface for age](https://c2sp.org/age-plugin)
* [SLIP-0011](https://slips.readthedocs.io/en/latest/slip-0011/) : key/value encryption using a hardware wallet
