summary refs log tree commit diff
path: root/crypto
diff options
context:
space:
mode:
authorDavid Hook <dgh@bouncycastle.org>2015-12-19 11:08:12 +1100
committerDavid Hook <dgh@bouncycastle.org>2015-12-19 11:08:12 +1100
commit9edba71a655a0df5f39e1cef3632bb9561bae6ae (patch)
tree6d29c99a9fbd67b20f8d8b9cf610e2afa4b084da /crypto
parentAdded test against fixed salt. (diff)
downloadBouncyCastle.NET-ed25519-9edba71a655a0df5f39e1cef3632bb9561bae6ae.tar.xz
Added use of standard salt if provided.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/src/crypto/signers/Iso9796d2PssSigner.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/crypto/src/crypto/signers/Iso9796d2PssSigner.cs b/crypto/src/crypto/signers/Iso9796d2PssSigner.cs
index fb117c19d..3aa2e3719 100644
--- a/crypto/src/crypto/signers/Iso9796d2PssSigner.cs
+++ b/crypto/src/crypto/signers/Iso9796d2PssSigner.cs
@@ -486,7 +486,14 @@ namespace Org.BouncyCastle.Crypto.Signers
             digest.BlockUpdate(m2Hash, 0, m2Hash.Length);
 
             // Update for the salt
-            digest.BlockUpdate(block, mStart + recoveredMessage.Length, saltLength);
+            if (standardSalt != null)
+            {
+                digest.BlockUpdate(standardSalt, 0, standardSalt.Length);
+            }
+            else
+            {
+                digest.BlockUpdate(block, mStart + recoveredMessage.Length, saltLength);
+            }
 
             byte[] hash = new byte[digest.GetDigestSize()];
             digest.DoFinal(hash, 0);