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.1

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.1
File Size Uploaded Provenance Actions
age_plugin_trezor_slip11-0.3.1.tar.gz 13.1 kB Without provenance Details for age_plugin_trezor_slip11-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 24.9 kB

Release files / age_plugin_trezor_slip11-0.3.1.tar.gz

Download URL age_plugin_trezor_slip11-0.3.1.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
67082d910413b5c52ee5fe8162c6a4f8a8627bbcda523f552f8a0bd164d1f64b
BLAKE2b-256 checksum
How to use checksums
edc6b2b72f2a85ddac1d5897c022206377a3296a163a5d2d33c0ee4d971900d8
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.1-py3-none-any.whl

Download URL age_plugin_trezor_slip11-0.3.1-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b1ec3d8186026604ffe9385d845665b5e00b65293841963eb51fbcbe8021488d
BLAKE2b-256 checksum
How to use checksums
f4a463b788bfebf64ffb4153bbfaef040a8c7191943fd373809efdd7c2345ad1
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.1

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