`age-plugin-yubikey` implementation, encrypt things with a Yubikey/any PIV card

Related tags

Cryptography yubage
Overview

yubage -- a age-plugin-yubikey implementation in Go

go install eagain.net/go/yubage/cmd/age-plugin-yubikey

This is an age plugin for PIV cards/Yubikey. Your secret is kept safe on the tamperproof hardware, while letting you use the age command-line.

WARNING: UNSTABLE Age plugins are still in flux. Consider the format unstable, you might need to re-encrypt all your data, and this software might accidentally delete your data, or eat your cat.

Generating keys

At this time, this software doesn't help you generate the crypto keys. However, this should work:

yubico-piv-tool --slot=82 --algorithm=ECCP256 --touch-policy=always --pin-policy=once -a generate -o MY_YUBIKEY_FILENAME.pub
yubico-piv-tool --slot=82 -a verify-pin -a selfsign-certificate --subject='/CN=MY YUBIKEY NAME HERE/O=age-plugin-yubikey/' --valid-days=3650 -i MY_YUBIKEY_FILENAME.pub -o MY_YUBIKEY_FILENAME.cert
# enter pin, touch when lights blink
yubico-piv-tool --slot=82 -a import-certificate -i MY_YUBIKEY_FILENAME.cert

Replace MY_YUBIKEY_FILENAME and MY YUBIKEY NAME HERE as you wish.

If you use a "management key" with your Yubikey, add the -k flag to first and last command (actions generate and import-certificate).

Keys are stored in the "retired slots", available starting with Yubikey series 5. Funny name, but it's 20 slots that can be used without stepping on anyone's toes.

TODO we don't at this point have code to make age recipient and identity strings from the above. You can use https://github.com/str4d/age-plugin-yubikey branch twitch, for now.

Using

filippo.io/age, the Go reference implementation, does not support plugins as of 2021-02-01.

rage, a Rust implementation, supports plugins in a post-v0.5.0 commit 9f824625195583c5cff0f48e5bba9b216e1fa3f6 or so.

Background on age plugins & Yubikey

AGE-PLUGIN-PROTOCOL: My notes and links on the age plugin protocol.

PIV-P256-PROTOCOL: My notes on the PIV-P256 ECHDE encryption format used for Yubikeys with age.

You might also like...
Dekripsi dari 2_Simple-Encrypt-Prima pakai golang

Dekripsi dari 2_Simple-Encrypt-Prima pakai golang

Go language implementation of a blockchain based on the BDLS BFT protocol. The implementation was adapted from Ethereum and Sperax implementation

BDLS protocol based PoS Blockchain Most functionalities of this client is similar to the Ethereum golang implementation. If you do not find your quest

Get any cryptocurrencies ticker and trade data in real time from multiple exchanges and then save it in multiple storage systems.
Get any cryptocurrencies ticker and trade data in real time from multiple exchanges and then save it in multiple storage systems.

Cryptogalaxy is an app which will get any cryptocurrencies ticker and trade data in real time from multiple exchanges and then saves it in multiple storage systems.

Automatic HTTPS for any Go program: fully-managed TLS certificate issuance and renewal
Automatic HTTPS for any Go program: fully-managed TLS certificate issuance and renewal

Easy and Powerful TLS Automation The same library used by the Caddy Web Server Caddy's automagic TLS features—now for your own Go programs—in one powe

Convert any EIP-2335 keystores to scrypt or pbkdf2

eth2-keystore-converter Converts Eth2 EIP-2335 scrypt keystores to pbkdf2 keysto

A drop-in replacement to any Writer type, which also calculates a hash using the provided hash type.

writehasher A drop-in replacement to any Writer type, which also calculates a hash using the provided hash type. Example package main import ( "fmt"

A plugin that turn hashicorp vault into blockchain wallet.
A plugin that turn hashicorp vault into blockchain wallet.

dq-vault - Hashicorp vault BTC/ETH plugin This vault plugin stores a user's mnemonic inside vault in an encrypted manner. The plugin uses this stored

This plugin enhances Hashicorp Vault Service with cryptographic operations to create, import and sign using different type of keypairs and Ethereum wallets, including signing operation for public ethereum transaction, EEA and Quorum
docker plugin use vault as secret provider.

docker plugin vault docker secret plugin for vault provider how to build docker plugin rm -fr plugin/rootfs/.dockerenv plugin/rootfs/* docker build -

Owner
Tv
i <=2 ints
Tv
Card-encrypt - The encryption code necessary to enroll debit cards in the Palla API

?? Card RSA Encryption Thank you for choosing Palla! ?? In this repository you'l

palla 0 Jul 15, 2022
The bare metal Go smart card

Authors Andrea Barisani [email protected] | [email protected] Introduction The GoKey application implements a USB smartcard in pure Go

F-Secure Foundry 146 Dec 8, 2022
sops is an editor of encrypted files that supports YAML, JSON, ENV, INI and BINARY formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault, age, and PGP

sops is an editor of encrypted files that supports YAML, JSON, ENV, INI and BINARY formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault, age, and PGP. (demo)

Mozilla 11.7k Jan 9, 2023
🌰 encrypt/decrypt using ssh keys

ssh-vault ?? encrypt/decrypt using ssh private keys Documentation https://ssh-vault.com Usage $ ssh-vault -h Example: $ echo "secret" | ssh-vault -u

ssh-vault 364 Dec 30, 2022
Secret - Encrypt anything with a password

Secret - Encrypt anything with a password Ever wanted to hide a file? Now you can do it really easily! Usage secret {-e/--encrypt | -d/--decrypt} <sou

Ishan Goel 32 Aug 10, 2022
Easily encrypt data for the Adyen payment platform

adyen Encrypt secrets for the Adyen payment platform. This library uses crypto/rand to generate cryptographically secure AES keys and nonces, and re-u

CrimsonAIO 36 Jan 2, 2023
Sign, verify, encrypt and decrypt data with GPG in your browser.

keygaen Sign, verify, encrypt and decrypt data with GPG in your browser. ⚠️ keygaen has not yet been audited! While we try to make keygaen as secure a

Felix Pojtinger 78 Nov 22, 2022
A golang library to use aes encrypt easier.

Aes a golang library to use aes encrypt easier. Install go get github.com/hanson/aes Document import import github.com/hanson/aes CBC orig := "hello

null 12 Dec 8, 2022
Xk6-crypto-x509 - A k6 extension to encrypt data with a PEM Public Key

xk6-crypto-x509 A k6 extension to encrypt data with a PEM Public Key This is a k

Rogério Kino 2 Jan 5, 2022
Go Encrypt! Is a simple command-line encryption and decryption application using AES-256 GCM.

Go Encrypt! Go Encrypt! is a command-line application used to easily encrypt and decrypt files with the AES-256 GCM encryption algorithm. Usage Usage

Peter Georgas 0 Jan 5, 2022