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:
Adds two high-level methods on Entity called EncryptAllKeys and DecryptAllKeys
Adds two functions in packet called PrivateKeysEncrypt and PrivateKeysDecrypt
that allow encrypting/decrypting multiple PrivateKeys with the same passphrase.
Refactoring in PrivateKey encryption and decryption
Adds Cache in the s2k package to avoid recomputing similar
key derivations in packet.PrivateKeysDecrypt
Changes the type of the s2k.Params salt field to byte array
and introduces a getter for retrieving the salt.
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:
Adds two high-level methods on
Entity
calledEncryptAllKeys
andDecryptAllKeys
Adds two functions in
packet
calledPrivateKeysEncrypt
andPrivateKeysDecrypt
that allow encrypting/decrypting multiplePrivateKeys
with the same passphrase.Refactoring in
PrivateKey
encryption and decryptionAdds
Cache
in thes2k
package to avoid recomputing similar key derivations inpacket.PrivateKeysDecrypt
Changes the type of the
s2k.Params
salt field to byte array and introduces a getter for retrieving the salt.