From a3608a3d8d7593567d7c4991737584184f7da819 Mon Sep 17 00:00:00 2001 From: Lukas Burkhalter <10532077+lubux@users.noreply.github.com> Date: Tue, 29 Oct 2024 11:39:45 +0100 Subject: [PATCH] Add SHA3 to allowed signature hashes (#304) --- crypto/signature.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crypto/signature.go b/crypto/signature.go index f5c58ab..b74ecc3 100644 --- a/crypto/signature.go +++ b/crypto/signature.go @@ -17,11 +17,15 @@ import ( "github.com/ProtonMail/gopenpgp/v2/internal" ) +// allowedHashes stores the allowed OpenPGP hashes that can be used in a +// message signature hash. var allowedHashes = []crypto.Hash{ crypto.SHA224, crypto.SHA256, crypto.SHA384, crypto.SHA512, + crypto.SHA3_256, + crypto.SHA3_512, } // SignatureVerificationError is returned from Decrypt and VerifyDetached