diff options
author | David Hook <david.hook@keyfactor.com> | 2023-08-23 16:30:08 +1000 |
---|---|---|
committer | David Hook <david.hook@keyfactor.com> | 2023-08-23 16:30:08 +1000 |
commit | a8546ec9cbe311b95e44f2164bef9cb323285875 (patch) | |
tree | 82f7471c2747532b2e55ea4a9019ebebda06fdd4 /crypto | |
parent | updated SPHINCS+ keys and OIDs (diff) | |
download | BouncyCastle.NET-ed25519-a8546ec9cbe311b95e44f2164bef9cb323285875.tar.xz |
fixed typos
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/src/pqc/crypto/utils/PqcPublicKeyFactory.cs | 2 | ||||
-rw-r--r-- | crypto/src/pqc/crypto/utils/PqcUtilities.cs | 16 | ||||
-rw-r--r-- | crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/crypto/src/pqc/crypto/utils/PqcPublicKeyFactory.cs b/crypto/src/pqc/crypto/utils/PqcPublicKeyFactory.cs index 73a553d0e..5aef69818 100644 --- a/crypto/src/pqc/crypto/utils/PqcPublicKeyFactory.cs +++ b/crypto/src/pqc/crypto/utils/PqcPublicKeyFactory.cs @@ -243,7 +243,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Utilities SphincsPlusParameters spParams = PqcUtilities.SphincsPlusParamsLookup(keyInfo.Algorithm.Algorithm); - return new SPHINCSPlusPublicKeyParameters(spParams, keyEnc); + return new SphincsPlusPublicKeyParameters(spParams, keyEnc); } } } diff --git a/crypto/src/pqc/crypto/utils/PqcUtilities.cs b/crypto/src/pqc/crypto/utils/PqcUtilities.cs index c0093c33c..21254331c 100644 --- a/crypto/src/pqc/crypto/utils/PqcUtilities.cs +++ b/crypto/src/pqc/crypto/utils/PqcUtilities.cs @@ -262,14 +262,14 @@ namespace Org.BouncyCastle.Pqc.Crypto.Utilities sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_shake_256f_r3] = SphincsPlusParameters.shake_256f; sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_haraka_256s_r3] = SphincsPlusParameters.haraka_256s; sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_haraka_256f_r3] = SphincsPlusParameters.haraka_256f; - sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_sha2_128s_simple = SphincsPlusParameters.sha2_128s_simple; - sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_sha2_128f_simple = SphincsPlusParameters.sha2_128f_simple; - sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_shake_128f_simple = SphincsPlusParameters.shake_128f_simple; - sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_sha2_192s_simple = SphincsPlusParameters.sha2_192s_simple; - sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_sha2_192f_simple = SphincsPlusParameters.sha2_192f_simple; - sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_shake_192f_simple = SphincsPlusParameters.shake_192f_simple; - sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_sha2_256s_simple = SphincsPlusParameters.sha2_256s_simple; - sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_sha2_256f_simple = SphincsPlusParameters.sha2_256f_simple; + sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_sha2_128s_simple] = SphincsPlusParameters.sha2_128s_simple; + sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_sha2_128f_simple] = SphincsPlusParameters.sha2_128f_simple; + sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_shake_128f_simple] = SphincsPlusParameters.shake_128f_simple; + sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_sha2_192s_simple] = SphincsPlusParameters.sha2_192s_simple; + sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_sha2_192f_simple] = SphincsPlusParameters.sha2_192f_simple; + sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_shake_192f_simple] = SphincsPlusParameters.shake_192f_simple; + sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_sha2_256s_simple] = SphincsPlusParameters.sha2_256s_simple; + sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_sha2_256f_simple] = SphincsPlusParameters.sha2_256f_simple; sphincsPlusParams[BCObjectIdentifiers.sphincsPlus_shake_256f_simple] = SphincsPlusParameters.shake_256f_simple; } diff --git a/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs b/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs index ce09f7181..5a8e0810d 100644 --- a/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs +++ b/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs @@ -249,7 +249,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Tests SphincsPlusPublicKeyParameters pubParams = (SphincsPlusPublicKeyParameters)kp.Public; SphincsPlusPrivateKeyParameters privParams = (SphincsPlusPrivateKeyParameters)kp.Private; - Assert.True(Arrays.AreEqual(Arrays.Concatenate(pubParams.Parameters.GetEncoded(), Hex.Decode("b505d7cfad1b497499323c8686325e47afbc007ba1e2b4a138f03aa9a6195ac8")), pubParams.GetEncoded())); + Assert.True(Arrays.AreEqual(Hex.Decode("b505d7cfad1b497499323c8686325e47afbc007ba1e2b4a138f03aa9a6195ac8"), pubParams.GetEncoded())); Assert.True(Arrays.AreEqual(Arrays.Concatenate(privParams.Parameters.GetEncoded(), Hex.Decode("7c9935a0b07694aa0c6d10e4db6b1add2fd81a25ccb148032dcd739936737f2db505d7cfad1b497499323c8686325e47afbc007ba1e2b4a138f03aa9a6195ac8")), privParams.GetEncoded())); } @@ -307,7 +307,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Tests SphincsPlusPublicKeyParameters pubParams = (SphincsPlusPublicKeyParameters)kp.Public; SphincsPlusPrivateKeyParameters privParams = (SphincsPlusPrivateKeyParameters)kp.Private; - Assert.True(Arrays.AreEqual(Arrays.Concatenate(pubParams.Parameters.GetEncoded(), Hex.Decode("b505d7cfad1b497499323c8686325e4714be46e5b92237d09a0ea8a0404033a6")), pubParams.GetEncoded())); + Assert.True(Arrays.AreEqual(Hex.Decode("b505d7cfad1b497499323c8686325e4714be46e5b92237d09a0ea8a0404033a6"), pubParams.GetEncoded())); Assert.True(Arrays.AreEqual(Arrays.Concatenate(privParams.Parameters.GetEncoded(), Hex.Decode("7c9935a0b07694aa0c6d10e4db6b1add2fd81a25ccb148032dcd739936737f2db505d7cfad1b497499323c8686325e4714be46e5b92237d09a0ea8a0404033a6")), privParams.GetEncoded())); } |