diff options
author | David Hook <david.hook@keyfactor.com> | 2022-10-13 09:30:16 +1100 |
---|---|---|
committer | David Hook <david.hook@keyfactor.com> | 2022-10-13 09:30:16 +1100 |
commit | 5142f558d6ff6df6573538fe402b796cab0e98ea (patch) | |
tree | 65eca803afa587a9c05b1976093584940a3e37e8 | |
parent | Refactoring in Pqc.Crypto.Tests (diff) | |
download | BouncyCastle.NET-ed25519-5142f558d6ff6df6573538fe402b796cab0e98ea.tar.xz |
fixed truncation issue in BikeRandom (Harrison patch)
-rw-r--r-- | crypto/src/pqc/crypto/bike/BikeRandomGenerator.cs | 2 | ||||
-rw-r--r-- | crypto/test/src/pqc/crypto/test/BikeVectorTest.cs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/crypto/src/pqc/crypto/bike/BikeRandomGenerator.cs b/crypto/src/pqc/crypto/bike/BikeRandomGenerator.cs index 4eea5774a..4d9a90252 100644 --- a/crypto/src/pqc/crypto/bike/BikeRandomGenerator.cs +++ b/crypto/src/pqc/crypto/bike/BikeRandomGenerator.cs @@ -84,7 +84,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Bike { byte[] output = new byte[4]; digest.Output(output, 0, output.Length); - int tmp = Pack.LE_To_UInt16(output, 0); + int tmp = (int)Pack.LE_To_UInt32(output, 0); return tmp; } } diff --git a/crypto/test/src/pqc/crypto/test/BikeVectorTest.cs b/crypto/test/src/pqc/crypto/test/BikeVectorTest.cs index e4e6e5adc..723f6b554 100644 --- a/crypto/test/src/pqc/crypto/test/BikeVectorTest.cs +++ b/crypto/test/src/pqc/crypto/test/BikeVectorTest.cs @@ -26,8 +26,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Tests { "PQCkemKAT_BIKE_3114.rsp", "PQCkemKAT_BIKE_6198.rsp", - // FIXME - //"PQCkemKAT_BIKE_10276.rsp" + "PQCkemKAT_BIKE_10276.rsp" }; [Test] |