Skip to main content

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

Metadata

Release files for age-plugin-trezor-slip11 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for age-plugin-trezor-slip11 0.3.2
File Size Uploaded Provenance Actions
age_plugin_trezor_slip11-0.3.2.tar.gz 13.2 kB Without provenance Details for age_plugin_trezor_slip11-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for age-plugin-trezor-slip11 0.3.2
File Interpreter ABI Platform Actions
age_plugin_trezor_slip11-0.3.2-py3-none-any.whl Python 3 none any Details for age_plugin_trezor_slip11-0.3.2-py3-none-any.whl

Total release size: 25.0 kB

Release files / age_plugin_trezor_slip11-0.3.2.tar.gz

Download URL age_plugin_trezor_slip11-0.3.2.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1a9b668fb4ac5d9a9f694e9d78d1b2358e4a2be924fc69d3c31d6717940bece8
BLAKE2b-256 checksum
How to use checksums
a89f5feb6dfe0ad0c7d83910a6b9d4fd3c8fcbc751d298d70a8a46a74e6832e5
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.2-py3-none-any.whl

Download URL age_plugin_trezor_slip11-0.3.2-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b468b73f042739af4cccbde84c3c2b99cf40430f040e7949448b3c484f790e86
BLAKE2b-256 checksum
How to use checksums
14d7a962f7f948e32f6a504d190b216a0cca5cbc40a77671a16927cd8136073b
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.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page