diff options
Diffstat (limited to 'crypto/src/asn1/cryptopro/ECGOST3410NamedCurves.cs')
-rw-r--r-- | crypto/src/asn1/cryptopro/ECGOST3410NamedCurves.cs | 59 |
1 files changed, 27 insertions, 32 deletions
diff --git a/crypto/src/asn1/cryptopro/ECGOST3410NamedCurves.cs b/crypto/src/asn1/cryptopro/ECGOST3410NamedCurves.cs index 998e0e06f..b3f55236c 100644 --- a/crypto/src/asn1/cryptopro/ECGOST3410NamedCurves.cs +++ b/crypto/src/asn1/cryptopro/ECGOST3410NamedCurves.cs @@ -15,9 +15,9 @@ namespace Org.BouncyCastle.Asn1.CryptoPro */ public sealed class ECGost3410NamedCurves { - private ECGost3410NamedCurves() - { - } + private ECGost3410NamedCurves() + { + } internal static readonly IDictionary objIds = Platform.CreateHashtable(); internal static readonly IDictionary parameters = Platform.CreateHashtable(); @@ -35,13 +35,12 @@ namespace Org.BouncyCastle.Asn1.CryptoPro ECDomainParameters ecParams = new ECDomainParameters( curve, - curve.CreatePoint( - BigInteger.One, // x - new BigInteger("64033881142927202683649881450433473985931760268884941288852745803908878638612"), // y - false), + curve.CreatePoint( + BigInteger.One, // x + new BigInteger("64033881142927202683649881450433473985931760268884941288852745803908878638612")), // y mod_q); - parameters[CryptoProObjectIdentifiers.GostR3410x2001CryptoProA] = ecParams; + parameters[CryptoProObjectIdentifiers.GostR3410x2001CryptoProA] = ecParams; mod_p = new BigInteger("115792089237316195423570985008687907853269984665640564039457584007913129639319"); mod_q = new BigInteger("115792089237316195423570985008687907853073762908499243225378155805079068850323"); @@ -53,10 +52,9 @@ namespace Org.BouncyCastle.Asn1.CryptoPro ecParams = new ECDomainParameters( curve, - curve.CreatePoint( - BigInteger.One, // x - new BigInteger("64033881142927202683649881450433473985931760268884941288852745803908878638612"), // y - false), + curve.CreatePoint( + BigInteger.One, // x + new BigInteger("64033881142927202683649881450433473985931760268884941288852745803908878638612")), // y mod_q); parameters[CryptoProObjectIdentifiers.GostR3410x2001CryptoProXchA] = ecParams; @@ -72,9 +70,8 @@ namespace Org.BouncyCastle.Asn1.CryptoPro ecParams = new ECDomainParameters( curve, curve.CreatePoint( - BigInteger.One, // x - new BigInteger("28792665814854611296992347458380284135028636778229113005756334730996303888124"), // y - false), + BigInteger.One, // x + new BigInteger("28792665814854611296992347458380284135028636778229113005756334730996303888124")), // y mod_q); // q parameters[CryptoProObjectIdentifiers.GostR3410x2001CryptoProB] = ecParams; @@ -90,9 +87,8 @@ namespace Org.BouncyCastle.Asn1.CryptoPro ecParams = new ECDomainParameters( curve, curve.CreatePoint( - BigInteger.Zero, // x - new BigInteger("29818893917731240733471273240314769927240550812383695689146495261604565990247"), // y - false), + BigInteger.Zero, // x + new BigInteger("29818893917731240733471273240314769927240550812383695689146495261604565990247")), // y mod_q); parameters[CryptoProObjectIdentifiers.GostR3410x2001CryptoProXchB] = ecParams; @@ -107,12 +103,11 @@ namespace Org.BouncyCastle.Asn1.CryptoPro ecParams = new ECDomainParameters( curve, curve.CreatePoint( - BigInteger.Zero, // x - new BigInteger("29818893917731240733471273240314769927240550812383695689146495261604565990247"), // y - false), + BigInteger.Zero, // x + new BigInteger("29818893917731240733471273240314769927240550812383695689146495261604565990247")), // y mod_q); // q - parameters[CryptoProObjectIdentifiers.GostR3410x2001CryptoProC] = ecParams; + parameters[CryptoProObjectIdentifiers.GostR3410x2001CryptoProC] = ecParams; objIds["GostR3410-2001-CryptoPro-A"] = CryptoProObjectIdentifiers.GostR3410x2001CryptoProA; objIds["GostR3410-2001-CryptoPro-B"] = CryptoProObjectIdentifiers.GostR3410x2001CryptoProB; @@ -139,14 +134,14 @@ namespace Org.BouncyCastle.Asn1.CryptoPro return (ECDomainParameters) parameters[oid]; } - /** - * returns an enumeration containing the name strings for curves - * contained in this structure. - */ - public static IEnumerable Names - { - get { return new EnumerableProxy(objIds.Keys); } - } + /** + * returns an enumeration containing the name strings for curves + * contained in this structure. + */ + public static IEnumerable Names + { + get { return new EnumerableProxy(objIds.Keys); } + } public static ECDomainParameters GetByName( string name) @@ -170,8 +165,8 @@ namespace Org.BouncyCastle.Asn1.CryptoPro return (string) names[oid]; } - public static DerObjectIdentifier GetOid( - string name) + public static DerObjectIdentifier GetOid( + string name) { return (DerObjectIdentifier) objIds[name]; } |