#private-key #secret-key #openpgp

sequoia-keystore-softkeys

A soft key (in-memory key) backend for Sequoia's private key store

7 releases (breaking)

0.6.0 Aug 27, 2024
0.5.0 Jun 4, 2024
0.4.1 May 20, 2024
0.3.0 Mar 24, 2024
0.1.0 Jan 21, 2024

#2175 in Cryptography

Download history 285/week @ 2024-08-16 438/week @ 2024-08-23 300/week @ 2024-08-30 182/week @ 2024-09-06 323/week @ 2024-09-13 274/week @ 2024-09-20 303/week @ 2024-09-27 401/week @ 2024-10-04 438/week @ 2024-10-11 466/week @ 2024-10-18 365/week @ 2024-10-25 288/week @ 2024-11-01 427/week @ 2024-11-08 928/week @ 2024-11-15 383/week @ 2024-11-22 584/week @ 2024-11-29

2,417 downloads per month
Used in sequoia-keystore

LGPL-2.0-or-later

52KB
1K SLoC

A soft key (in-memory key) backend for Sequoia's private key store.

The sequoia-keystore crate implements a server that manages secret key material. Secret key material can be stored in files, on hardware devices like smartcards, or accessed via the network. sequoia-keystore doesn't implement these access methods. This is taken care of by various backends.

This crate includes a backend that provides access to secret key material stored in files. These are called soft keys in contrast to keys managed by a separate piece of hardware.

If the keystore is configured to use ~/.local/share/sequoia as its data directory, then the soft key backend uses ~/.local/share/sequoia/keystore/softkeys. Specifically, it iterates over the files in that directory, and looks for binary encoded or ASCII-armor encoded OpenPGP Transferable Secret Keys in files ending with .pgp or .asc; other files are silently ignored.

$ ls .local/share/sequoia/keystore/softkeys/
1234.pgp  1234.pgp.rev  alice.pgp  alice.pgp.rev  F44B66C85C9B7B02AF2D52FDEFF613897AD9CE21.pgp

Dependencies

~16–29MB
~412K SLoC