Add support for the crypto refresh in v2 (#265)

This commit adds support for the OpenPGP crypto-refresh.
- Updates go-crypto dependency to v1.1.0-alpha.1
- Adapts the session key logic to handle PKESK/SKESK v6 packets without an algorithm attached
- Updates the min go version to 1.17 as requires by  go-crypto v1.1.0-alpha.1
- Update the cricl dependency to 1.3.7 matching go-crypto
Not supported:
- crypto-refresh intended recipients
- v6 key generation
This commit is contained in:
Lukas Burkhalter 2024-02-28 13:51:52 +01:00 committed by GitHub
parent c6a3058e2e
commit 453e81905b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 92 additions and 29 deletions

View file

@ -57,6 +57,7 @@ func DecryptSessionKeyWithPassword(keyPacket, password []byte) (*SessionKey, err
key, cipherFunc, err := s.Decrypt(password)
if err == nil {
sk := &SessionKey{
V6: s.Version == 6,
Key: key,
Algo: getAlgo(cipherFunc),
}