Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I convert libsodium private keys to OpenPGP compatible private key packets?

libsodium is an awesome encryption library, and GnuPG is an awesome key management and signing software.

GnuPG recently released support for Ed25519 signing keys, and submitted a draft to the IETF.

I want to use Sodium-generated keys by my web application offline with GnuPG. This will make it so I don't have to trust the server with my private key each time I sign, and I don't have to use special software on my client (even if I have to write it) since I already have and trust GnuPG.

How can I do so? How do I convert libsodium private keys to OpenPGP compatible private key packets?

like image 221
Fredrick Brennan Avatar asked Nov 06 '15 11:11

Fredrick Brennan


People also ask

How is private key generated?

Private and Public Keys The private key (k) is a number, usually picked at random. From the private key, we use elliptic curve multiplication, a one-way cryptographic function, to generate a public key (K). From the public key (K), we use a one-way cryptographic hash function to generate a bitcoin address (A).


1 Answers

libsodium uses the xsalsa20 algorithm for encryption. This algorithm is not currently supported with PGP, and in turn, is not supported by GnuPG.

like image 162
rettys Avatar answered Oct 24 '22 20:10

rettys