diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-11-08 11:40:35 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-11-08 11:40:35 +0700 |
commit | d25cabfeb6ba5e73396961724e457bb627086cbd (patch) | |
tree | 15143a6ab964f8d8df821dabf2b79ad72322873c /crypto/src/pkcs/PrivateKeyInfoFactory.cs | |
parent | Make factory classes static (diff) | |
download | BouncyCastle.NET-ed25519-d25cabfeb6ba5e73396961724e457bb627086cbd.tar.xz |
Pqc cleanup
Diffstat (limited to 'crypto/src/pkcs/PrivateKeyInfoFactory.cs')
-rw-r--r-- | crypto/src/pkcs/PrivateKeyInfoFactory.cs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/crypto/src/pkcs/PrivateKeyInfoFactory.cs b/crypto/src/pkcs/PrivateKeyInfoFactory.cs index d6e8ec77c..d56831f35 100644 --- a/crypto/src/pkcs/PrivateKeyInfoFactory.cs +++ b/crypto/src/pkcs/PrivateKeyInfoFactory.cs @@ -13,9 +13,6 @@ using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Generators; using Org.BouncyCastle.Crypto.Parameters; using Org.BouncyCastle.Math; -using Org.BouncyCastle.Pqc.Asn1; -using Org.BouncyCastle.Pqc.Crypto.Cmce; -using Org.BouncyCastle.Pqc.Crypto.Utilities; using Org.BouncyCastle.Security; using Org.BouncyCastle.Utilities; @@ -242,21 +239,6 @@ namespace Org.BouncyCastle.Pkcs return new PrivateKeyInfo(new AlgorithmIdentifier(EdECObjectIdentifiers.id_Ed25519), new DerOctetString(key.GetEncoded()), attributes, key.GeneratePublicKey().GetEncoded()); } - - if (privateKey is CmcePrivateKeyParameters) - { - CmcePrivateKeyParameters parameters = (CmcePrivateKeyParameters)privateKey; - - byte[] encoding = parameters.GetEncoded(); - - AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(PqcUtilities.McElieceOidLookup(parameters.Parameters)); - - CmcePublicKey cmcePub = new CmcePublicKey(parameters.ReconstructPublicKey()); - CmcePrivateKey cmcePriv = new CmcePrivateKey(0, parameters.Delta, parameters.C, parameters.G, parameters.Alpha, parameters.S, cmcePub); - return new PrivateKeyInfo(algorithmIdentifier, cmcePriv, attributes); - } - - throw new ArgumentException("Class provided is not convertible: " + Platform.GetTypeName(privateKey)); } |