Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/test/java/org/bouncycastle/crypto/test/cavp/KDFDoublePipelineIterationNoCounterTests.java')
-rw-r--r--core/src/test/java/org/bouncycastle/crypto/test/cavp/KDFDoublePipelineIterationNoCounterTests.java88
1 files changed, 0 insertions, 88 deletions
diff --git a/core/src/test/java/org/bouncycastle/crypto/test/cavp/KDFDoublePipelineIterationNoCounterTests.java b/core/src/test/java/org/bouncycastle/crypto/test/cavp/KDFDoublePipelineIterationNoCounterTests.java
deleted file mode 100644
index 3923f9a1..00000000
--- a/core/src/test/java/org/bouncycastle/crypto/test/cavp/KDFDoublePipelineIterationNoCounterTests.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.bouncycastle.crypto.test.cavp;
-
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Properties;
-
-import org.bouncycastle.crypto.Mac;
-import org.bouncycastle.crypto.generators.KDFDoublePipelineIterationBytesGenerator;
-import org.bouncycastle.crypto.params.KDFDoublePipelineIterationParameters;
-import org.bouncycastle.util.Arrays;
-import org.bouncycastle.util.encoders.Hex;
-import org.bouncycastle.util.test.SimpleTestResult;
-import org.bouncycastle.util.test.TestFailedException;
-
-public final class KDFDoublePipelineIterationNoCounterTests
- implements CAVPListener
-{
- private PrintWriter out;
-
- public void receiveCAVPVectors(String name, Properties config,
- Properties vectors)
- {
-
-
- // create Mac based PRF from PRF property, create the KDF
- final Mac prf = CAVPReader.createPRF(config);
- final KDFDoublePipelineIterationBytesGenerator gen = new KDFDoublePipelineIterationBytesGenerator(prf);
-
- final int count = Integer.parseInt(vectors.getProperty("COUNT"));
- final int l = Integer.parseInt(vectors.getProperty("L"));
- final byte[] ki = Hex.decode(vectors.getProperty("KI"));
- final byte[] fixedInputData = Hex.decode(vectors.getProperty("FixedInputData"));
- final KDFDoublePipelineIterationParameters params = KDFDoublePipelineIterationParameters.createWithoutCounter(ki, fixedInputData);
- gen.init(params);
-
- final byte[] koGenerated = new byte[l / 8];
- gen.generateBytes(koGenerated, 0, koGenerated.length);
-
- final byte[] koVectors = Hex.decode(vectors.getProperty("KO"));
-
- compareKO(name, config, count, koGenerated, koVectors);
- }
-
- private static void compareKO(
- String name, Properties config, int test, byte[] calculatedOKM, byte[] testOKM)
- {
-
- if (!Arrays.areEqual(calculatedOKM, testOKM))
- {
- throw new TestFailedException(new SimpleTestResult(
- false, name + " using " + config + " test " + test + " failed"));
-
- }
- }
-
- public void receiveCommentLine(String commentLine)
- {
- // out.println("# " + commentLine);
- }
-
- public void receiveStart(String name)
- {
- // do nothing
- }
-
- public void receiveEnd()
- {
- out.println(" *** *** *** ");
- }
-
- public void setup()
- {
- try
- {
- out = new PrintWriter(new FileWriter("KDFDblPipelineNoCounter.gen"));
- }
- catch (IOException e)
- {
- throw new IllegalStateException(e);
- }
- }
-
- public void tearDown()
- {
- out.close();
- }
-} \ No newline at end of file