<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>PIV Agent Documentation on PIV Agent</title><link>/piv-agent/docs/</link><description>Recent content in PIV Agent Documentation on PIV Agent</description><generator>Hugo</generator><language>en</language><atom:link href="/piv-agent/docs/index.xml" rel="self" type="application/rss+xml"/><item><title>Install</title><link>/piv-agent/docs/install/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/piv-agent/docs/install/</guid><description>&lt;h2 id="prerequisites"&gt;Prerequisites&lt;a class="anchor" href="#prerequisites"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="consider-redundancy"&gt;Consider redundancy&lt;a class="anchor" href="#consider-redundancy"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;If you lose access to your hardware security device (for example if it is lost, stolen, or broken) &lt;strong&gt;there is no way to recover the keys stored on it&lt;/strong&gt;.
For that reason it is highly recommended that you use fallback SSH or age keyfiles and/or multiple hardware security devices.&lt;/p&gt;
&lt;h3 id="install-pcsclite"&gt;Install pcsclite&lt;a class="anchor" href="#install-pcsclite"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;piv-agent&lt;/code&gt; has transitive dependencies through &lt;a href="https://github.com/go-piv/piv-go#installation"&gt;&lt;code&gt;piv-go&lt;/code&gt;&lt;/a&gt;, on &lt;a href="https://pcsclite.apdu.fr/"&gt;&lt;code&gt;pcsclite&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# debian / ubuntu
sudo apt install libpcsclite1
# TODO: other platforms
...&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="install-piv-agent"&gt;Install piv-agent&lt;a class="anchor" href="#install-piv-agent"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Download the latest &lt;a href="https://github.com/smlx/piv-agent/releases"&gt;release&lt;/a&gt;, and extract it to a temporary location.
Copy the &lt;code&gt;piv-agent&lt;/code&gt; binary into your &lt;code&gt;$PATH&lt;/code&gt;, and the &lt;code&gt;systemd&lt;/code&gt; unit files to the correct location:&lt;/p&gt;</description></item><item><title>Setup</title><link>/piv-agent/docs/setup/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/piv-agent/docs/setup/</guid><description>&lt;h2 id="hardware"&gt;Hardware&lt;a class="anchor" href="#hardware"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="default-setup"&gt;Default setup&lt;a class="anchor" href="#default-setup"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;blockquote class='book-hint warning'&gt;
&lt;p&gt;This procedure resets the state of the PIV applet to factory defaults and wipes any existing keys from &lt;em&gt;all&lt;/em&gt; PIV slots.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;This procedure is only required once per hardware security device.
Performing it a second time will reset the keys on the PIV applet of the device.
It will not make any changes to applets providing other functionality the device may have, such as WebAuthn.&lt;/p&gt;
&lt;p&gt;By default, &lt;code&gt;piv-agent&lt;/code&gt; uses up to six slots on your hardware security device to set up three signing keys, and up to three decrypting keys.
Each of the signing and decrypting keys have different &lt;a href="https://docs.yubico.com/yesdk/users-manual/application-piv/pin-touch-policies.html"&gt;touch policies&lt;/a&gt;: never required, cached (for 15 seconds), and always.&lt;/p&gt;</description></item><item><title>Use</title><link>/piv-agent/docs/use/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/piv-agent/docs/use/</guid><description>&lt;h2 id="start-piv-agentsocket"&gt;Start &lt;code&gt;piv-agent.socket&lt;/code&gt;&lt;a class="anchor" href="#start-piv-agentsocket"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Start the agent sockets, and test:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;systemctl --user enable --now piv-agent.socket
ssh-add -l&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This should be enough to allow you to use &lt;code&gt;piv-agent&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="common-operations"&gt;Common operations&lt;a class="anchor" href="#common-operations"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="list-keys"&gt;List keys&lt;a class="anchor" href="#list-keys"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;piv-agent status&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If this command returns an empty list, it may be because the running agent is holding a transaction to the hardware security device.
The solution is to stop the agent and run the list command again.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;systemctl --user stop piv-agent
# should work now..
piv-agent status&lt;/code&gt;&lt;/pre&gt;&lt;h3 id="encrypting-and-decrypting-with-age"&gt;Encrypting and Decrypting with age&lt;a class="anchor" href="#encrypting-and-decrypting-with-age"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You can list your age identities and their associated recipients by using the &lt;code&gt;status&lt;/code&gt; command:&lt;/p&gt;</description></item><item><title>FAQ</title><link>/piv-agent/docs/faq/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/piv-agent/docs/faq/</guid><description>&lt;h2 id="how-does-age-plugin-piv-agent-compare-to-age-plugin-yubikey"&gt;How does age-plugin-piv-agent compare to age-plugin-yubikey?&lt;a class="anchor" href="#how-does-age-plugin-piv-agent-compare-to-age-plugin-yubikey"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Firstly, &lt;code&gt;age-plugin-yubikey&lt;/code&gt; is created by professional cryptographic engineers, and has a much larger user base.
&lt;code&gt;piv-agent&lt;/code&gt; has neither attribute, so you should probably just use &lt;code&gt;age-plugin-yubikey&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;That said, here are the technical differences I am aware of in the design of these two pieces of software.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;age-plugin-yubikey&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;supports multiple age key types&lt;/li&gt;
&lt;li&gt;stores the ML-KEM seed in the metadata of the certificate stored in a slot. It is stored on the YubiKey hardware, but is publicly readable when the YubiKey is plugged in.&lt;/li&gt;
&lt;li&gt;is multi-platform.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;piv-agent&lt;/code&gt;:&lt;/p&gt;</description></item></channel></rss>