From e62e8ba79235e3fb55281d329ceeb1774bc8aea9 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sun, 17 Jul 2022 18:50:15 +0700 Subject: Remove unused digest --- crypto/src/pqc/crypto/sphincsplus/SPHINCSPlusEngine.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'crypto/src') diff --git a/crypto/src/pqc/crypto/sphincsplus/SPHINCSPlusEngine.cs b/crypto/src/pqc/crypto/sphincsplus/SPHINCSPlusEngine.cs index 56f3cda48..f477608a6 100644 --- a/crypto/src/pqc/crypto/sphincsplus/SPHINCSPlusEngine.cs +++ b/crypto/src/pqc/crypto/sphincsplus/SPHINCSPlusEngine.cs @@ -1,6 +1,5 @@ - using System; -using System.Security.Cryptography; + using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Digests; using Org.BouncyCastle.Crypto.Generators; @@ -118,7 +117,6 @@ namespace Org.BouncyCastle.Pqc.Crypto.SphincsPlus : SPHINCSPlusEngine { private byte[] padding = new byte[128]; - private IDigest treeDigest; private HMac treeHMac; private Mgf1BytesGenerator mgf1; private byte[] hmacBuf; @@ -133,8 +131,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.SphincsPlus { sha256 = new Sha256Digest(); sha256Buf = new byte[sha256.GetDigestSize()]; - - this.treeDigest = new Sha256Digest(); + if (n == 16) { this.msgDigest = new Sha256Digest(); @@ -152,7 +149,6 @@ namespace Org.BouncyCastle.Pqc.Crypto.SphincsPlus this.hmacBuf = new byte[treeHMac.GetMacSize()]; this.msgDigestBuf = new byte[msgDigest.GetDigestSize()]; - } public override byte[] F(byte[] pkSeed, Adrs adrs, byte[] m1) -- cgit 1.5.1