ProtonMail / go-crypto

Fork of go/x/crypto, providing an up-to-date OpenPGP implementation
https://pkg.go.dev/github.com/ProtonMail/go-crypto
BSD 3-Clause "New" or "Revised" License
330 stars 100 forks source link

Add support to only perform an s2k key derivation once while encrypting/decrypting multiple private keys #156

Closed lubux closed 1 year ago

lubux commented 1 year ago

In previous versions, it is not possible to encrypt multiple private keys with the same encryption key derived from a passphrase. A fresh encryption key is derived for each encryption and similar s2k key derivations are repeated for decryption. This commit adds support for encrypting/decrypting multiple private keys with a single encryption key derived with a single s2k key-derivation:

lubux commented 1 year ago

Thanks, I applied the suggestions.