commented out partial memoable code.
@@ -196,9 +196,9 @@ public Sha2Engine(boolean robust, int n, int w, int d, int a, int k, int h)
msgDigest.update(pkSeed, 0, pkSeed.length);
msgDigest.update(padding, 0, 64 - pkSeed.length); // toByte(0, 64 - n)
msgMemo = ((Memoable)msgDigest).copy();
- msgStateSaved = true;
+// msgStateSaved = true;
}
- ((Memoable)msgDigest).reset(sha256Memo);
+// ((Memoable)msgDigest).reset(sha256Memo);
msgDigest.update(compressedADRS, 0, compressedADRS.length);
@@ -265,9 +265,9 @@ IndexedDigest H_msg(byte[] prf, byte[] pkSeed, byte[] pkRoot, byte[] message)
msgDigest.update(pkSeed, 0, pkSeed.length);
msgDigest.update(padding, 0, 64 - pkSeed.length); // toByte(0, 64 - n)
msgMemo = ((Memoable)msgDigest).copy();
- msgStateSaved = true;
+// msgStateSaved = true;
}
- ((Memoable)msgDigest).reset(sha256Memo);
+// ((Memoable)msgDigest).reset(sha256Memo);
msgDigest.update(compressedADRS, 0, compressedADRS.length);
msgDigest.update(m, 0, m.length);
@@ -371,13 +371,6 @@ IndexedDigest H_msg(byte[] prf, byte[] pkSeed, byte[] pkRoot, byte[] message)
return mask;
}
-
- public SPHINCSPlusEngine get()
- {
- msgStateSaved = false;
- sha256StateSaved = false;
- return this;
- }
}
static class Shake256Engine
