diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-05-02 20:55:51 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-05-02 20:55:51 +0700 |
commit | 4332f34f7a60dc07bdbf5ef894b3d529568a859a (patch) | |
tree | da626963aa3b99b42621706d7f9676d78de12b0a /crypto/test | |
parent | Update XMSS OIDs (diff) | |
download | BouncyCastle.NET-ed25519-4332f34f7a60dc07bdbf5ef894b3d529568a859a.tar.xz |
Update SphincsPlus from bc-java
- refactoring in Pqc
Diffstat (limited to 'crypto/test')
-rw-r--r-- | crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs b/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs index 4e60c3351..2f46a6028 100644 --- a/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs +++ b/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs @@ -453,6 +453,15 @@ namespace Org.BouncyCastle.Pqc.Crypto.Tests SphincsPlusPublicKeyParameters pubParams = (SphincsPlusPublicKeyParameters)kp.Public; SphincsPlusPrivateKeyParameters privParams = (SphincsPlusPrivateKeyParameters)kp.Private; + // FIXME No OIDs for simple variants of SPHINCS+ + if (!name.Contains("-simple")) + { + pubParams = (SphincsPlusPublicKeyParameters)PqcPublicKeyFactory.CreateKey( + PqcSubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(pubParams)); + privParams = (SphincsPlusPrivateKeyParameters)PqcPrivateKeyFactory.CreateKey( + PqcPrivateKeyInfoFactory.CreatePrivateKeyInfo(privParams)); + } + Assert.True(Arrays.AreEqual(Arrays.Concatenate(pubParams.Parameters.GetEncoded(), pk), pubParams.GetEncoded()), name + " " + count + ": public key"); Assert.True(Arrays.AreEqual(Arrays.Concatenate(privParams.Parameters.GetEncoded(), sk), privParams.GetEncoded()), name + " " + count + ": secret key"); |