-
-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scripting examples #279
Comments
This can also mention that we don't support scripting passphrases and offer alternatives, like a passphrase-encrypted identity file. |
Examples for password manager
|
I needed a way to decrypt an age-encrypted identity file. I had quite a hard time doing that in python without user input, i ended up using import pexpect
pexpect.run('/path/to/age -d /path/to/age.key', events={'Enter passphrase:': 'SomePassword\n'}) Otherwise fiddling with |
I want to use age to decrypt a file in an initramfs, where /dev/tty is not available.
I also thought about using expect, but I dont want to pack it in the initramfs. Using a pipe or anything does not work. |
@FiloSottile I just checked |
I'm also interested in using age in the initram, in combination with a yubikey, to decrypt a luks partition. |
I use it in a initramfs with dracat and mkinitcpio, it works just fine: https://gitlab.com/cryptographic_id/cryptographic-id-rs/-/blob/main/usr/lib/cryptographic_id/show_identities?ref_type=heads#L27 |
Thanks, that's useful. Do you foresee any obstructions to use a yubikey (with the age plugin) instead of tpm? |
@dkwo No big ones, but I have no experience with yubikey in initramfs. You need the device drivers in the initramfs, probably some configuration files and maybe some udev rules. |
Including how to use an identity stored somewhere like
pass
, and generating a new key pair and doing something with the recipient line. We already have an example for how to script sending to a GitHub user.This could also encourage
-e
usage for explicit scripts, and maybe show how to use-e -i
.The text was updated successfully, but these errors were encountered: