From d501626e0ba98aedc8a2dd003db5eb7a45767883 Mon Sep 17 00:00:00 2001 From: Aron Wussler Date: Thu, 14 Mar 2024 11:59:31 +0100 Subject: [PATCH] Fix HMAC generation --- openpgp/v2/key_generation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpgp/v2/key_generation.go b/openpgp/v2/key_generation.go index a5f41391..3029fae7 100644 --- a/openpgp/v2/key_generation.go +++ b/openpgp/v2/key_generation.go @@ -433,7 +433,7 @@ func newDecrypter(config *packet.Config) (decrypter interface{}, err error) { return x25519.GenerateKey(config.Random()) case packet.PubKeyAlgoEd448, packet.PubKeyAlgoX448: // When passing Ed448, we generate an x448 subkey return x448.GenerateKey(config.Random()) - case packet.ExperimentalPubKeyAlgoAEAD: + case packet.ExperimentalPubKeyAlgoHMAC, packet.ExperimentalPubKeyAlgoAEAD: // When passing HMAC, we generate an AEAD subkey cipher := algorithm.CipherFunction(config.Cipher()) return symmetric.AEADGenerateKey(config.Random(), cipher) default: