summary refs log tree commit diff
path: root/crypto/test
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@gmail.com>2022-10-18 16:02:29 +0700
committerPeter Dettman <peter.dettman@gmail.com>2022-10-18 16:02:29 +0700
commitfe8f738e093eede32b55b329a6a864eb680dc281 (patch)
tree67b5abd12be56c6a6887133c8211d5ea9863d229 /crypto/test
parentReplace LinearAlgebra with BikePolynomial (diff)
downloadBouncyCastle.NET-ed25519-fe8f738e093eede32b55b329a6a864eb680dc281.tar.xz
Refactoring in Pqc.Crypto.Bike (performance)
Diffstat (limited to 'crypto/test')
-rw-r--r--crypto/test/src/pqc/crypto/test/BikeVectorTest.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/crypto/test/src/pqc/crypto/test/BikeVectorTest.cs b/crypto/test/src/pqc/crypto/test/BikeVectorTest.cs
index 723f6b554..a25a27fe1 100644
--- a/crypto/test/src/pqc/crypto/test/BikeVectorTest.cs
+++ b/crypto/test/src/pqc/crypto/test/BikeVectorTest.cs
@@ -64,11 +64,13 @@ namespace Org.BouncyCastle.Pqc.Crypto.Tests
             kpGen.Init(genParam);
             AsymmetricCipherKeyPair kp = kpGen.GenerateKeyPair();
 
-            BikePublicKeyParameters pubParams = (BikePublicKeyParameters)PublicKeyFactory.CreateKey(SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo((BikePublicKeyParameters) kp.Public));
-            BikePrivateKeyParameters privParams = (BikePrivateKeyParameters)PrivateKeyFactory.CreateKey(PrivateKeyInfoFactory.CreatePrivateKeyInfo((BikePrivateKeyParameters) kp.Private));
+            BikePublicKeyParameters pubParams = (BikePublicKeyParameters)PublicKeyFactory.CreateKey(
+                SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo((BikePublicKeyParameters) kp.Public));
+            BikePrivateKeyParameters privParams = (BikePrivateKeyParameters)PrivateKeyFactory.CreateKey(
+                PrivateKeyInfoFactory.CreatePrivateKeyInfo((BikePrivateKeyParameters) kp.Private));
 
-            Assert.True(Arrays.AreEqual(pk, pubParams.PublicKey), name + " " + count + ": public key");
-            Assert.True(Arrays.AreEqual(sk, privParams.PrivateKey), name + " " + count + ": secret key");
+            Assert.True(Arrays.AreEqual(pk, pubParams.GetEncoded()), name + " " + count + ": public key");
+            Assert.True(Arrays.AreEqual(sk, privParams.GetEncoded()), name + " " + count + ": secret key");
 
             // KEM Enc
             BikeKemGenerator BikeEncCipher = new BikeKemGenerator(random);