age-plugin-trezor-slip11
This age plugin allows you to encrypt data using a Trezor hardware wallet.
Compared to other projects, this one is based on SLIP-0011 and does symmetric encryption.
Usage
Install the plugin:
pip install age-plugin-trezor-slip11
The next 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.
age-plugin-trezor-slip11 encode-identity --key=KEY > identity.txt
You can then encrypt or decrypt messages by passing the generated identity to age:
age -i ./identity.txt -e -a <<<'super secret' > encrypted.age
age -i ./identity.txt -d < ./encrypted.age
Recovering Data Without a Device
This plugin can directly load a SLIP-0039 mnemonic and reproduce the behavior of a real device. This is useful for recovery situation, if you have lost access to your physical device.
The soft option should be enabled at install:
pip install age-plugin-trezor-slip11[soft]
You can then pass the mnemonic through an environment variable:
export AGE_PLUGIN_TREZOR_SLIP11_UNSAFE_MNEMONIC="display email academic ..."
age -i identity -d < ./encrypted.age
Please note that mnemonics should normally stay offline, otherwise you are defeating the whole purpose of a hardware wallet. This feature should be reserved for testing or desperate situations.
Running Tests
# from the root of the project
pip install -r requirements.txt
pytest # run tests, excluding those depending on a connection with a device...
To run tests against a real device or emulator, you first need to initialize it with this mnemonic:
display email academic academic credit violence anatomy package umbrella learn rhyme belong merchant union safari finger curly ugly bike flame
You can then run all the tests:
pytest --use-device
Development
For debugging, set the environment variable AGE_PLUGIN_TREZOR_SLIP11_DEBUG_FILE=/path/to/log/file.
For using a fake backend instead of a real device, set this variable to a SLIP-0039 mnemonic:
export AGE_PLUGIN_TREZOR_SLIP11_UNSAFE_MNEMONIC="display email academic academic credit violence anatomy package umbrella learn rhyme belong merchant union safari finger curly ugly bike flame"
References
- Plugin interface for age
- SLIP-0011 : key/value encryption using a hardware wallet
Metadata
Release files for age-plugin-trezor-slip11 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| age_plugin_trezor_slip11-0.3.0.tar.gz | 13.2 kB | Without provenance | Details for age_plugin_trezor_slip11-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| age_plugin_trezor_slip11-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for age_plugin_trezor_slip11-0.3.0-py3-none-any.whl |
Total release size: 25.0 kB
Release files / age_plugin_trezor_slip11-0.3.0.tar.gz
| Download URL | age_plugin_trezor_slip11-0.3.0.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc44844170311b1d57b1ec58e19518dd7b22a61b91c1ddc9c09b84626f270fff
|
|
BLAKE2b-256 checksum How to use checksums |
167108372514e342ec25736e019ac3df6bba67d35234f0510211587c1972986d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0
|
Release files / age_plugin_trezor_slip11-0.3.0-py3-none-any.whl
| Download URL | age_plugin_trezor_slip11-0.3.0-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13d53cecd27ed56fb89bacb3b12773b9b6079e27fc941aa61fb3dc038623ca9a
|
|
BLAKE2b-256 checksum How to use checksums |
31bbc0c63c681ae0e32317e5d0a1804a157c6bdf3cddeeaa01977aaab7135240
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0
|
Security for age-plugin-trezor-slip11 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.