Skip to content

Instantly share code, notes, and snippets.

@matejcik
Created April 14, 2022 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matejcik/02d593277c2a428b8202ac786e8a5c4b to your computer and use it in GitHub Desktop.
Save matejcik/02d593277c2a428b8202ac786e8a5c4b to your computer and use it in GitHub Desktop.
Restic backup password generated by Trezor
from trezorlib.client import get_default_client
from trezorlib.misc import encrypt_keyvalue
from trezorlib.tools import parse_path
client = get_default_client()
PATH = parse_path("m/10016'/0'")
KEY = "Generate Restic backup password?"
VALUE = b"\x00" * 16
result = encrypt_keyvalue(client, PATH, KEY, VALUE)
print(result.hex())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment