コード例 #1
0
 static CustomNamedCurves()
 {
     CustomNamedCurves.nameToCurve = Platform.CreateHashtable();
     CustomNamedCurves.nameToOid   = Platform.CreateHashtable();
     CustomNamedCurves.oidToCurve  = Platform.CreateHashtable();
     CustomNamedCurves.oidToName   = Platform.CreateHashtable();
     CustomNamedCurves.names       = Platform.CreateArrayList();
     CustomNamedCurves.DefineCurve("curve25519", CustomNamedCurves.Curve25519Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("secp128r1", SecObjectIdentifiers.SecP128r1, CustomNamedCurves.SecP128R1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("secp160k1", SecObjectIdentifiers.SecP160k1, CustomNamedCurves.SecP160K1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("secp160r1", SecObjectIdentifiers.SecP160r1, CustomNamedCurves.SecP160R1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("secp160r2", SecObjectIdentifiers.SecP160r2, CustomNamedCurves.SecP160R2Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("secp192k1", SecObjectIdentifiers.SecP192k1, CustomNamedCurves.SecP192K1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("secp192r1", SecObjectIdentifiers.SecP192r1, CustomNamedCurves.SecP192R1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("secp224k1", SecObjectIdentifiers.SecP224k1, CustomNamedCurves.SecP224K1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("secp224r1", SecObjectIdentifiers.SecP224r1, CustomNamedCurves.SecP224R1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("secp256k1", SecObjectIdentifiers.SecP256k1, CustomNamedCurves.SecP256K1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("secp256r1", SecObjectIdentifiers.SecP256r1, CustomNamedCurves.SecP256R1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("secp384r1", SecObjectIdentifiers.SecP384r1, CustomNamedCurves.SecP384R1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("secp521r1", SecObjectIdentifiers.SecP521r1, CustomNamedCurves.SecP521R1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect113r1", SecObjectIdentifiers.SecT113r1, CustomNamedCurves.SecT113R1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect113r2", SecObjectIdentifiers.SecT113r2, CustomNamedCurves.SecT113R2Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect131r1", SecObjectIdentifiers.SecT131r1, CustomNamedCurves.SecT131R1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect131r2", SecObjectIdentifiers.SecT131r2, CustomNamedCurves.SecT131R2Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect163k1", SecObjectIdentifiers.SecT163k1, CustomNamedCurves.SecT163K1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect163r1", SecObjectIdentifiers.SecT163r1, CustomNamedCurves.SecT163R1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect163r2", SecObjectIdentifiers.SecT163r2, CustomNamedCurves.SecT163R2Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect233k1", SecObjectIdentifiers.SecT233k1, CustomNamedCurves.SecT233K1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect233r1", SecObjectIdentifiers.SecT233r1, CustomNamedCurves.SecT233R1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect239k1", SecObjectIdentifiers.SecT239k1, CustomNamedCurves.SecT239K1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect283k1", SecObjectIdentifiers.SecT283k1, CustomNamedCurves.SecT283K1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect283r1", SecObjectIdentifiers.SecT283r1, CustomNamedCurves.SecT283R1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect409k1", SecObjectIdentifiers.SecT409k1, CustomNamedCurves.SecT409K1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect409r1", SecObjectIdentifiers.SecT409r1, CustomNamedCurves.SecT409R1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect571k1", SecObjectIdentifiers.SecT571k1, CustomNamedCurves.SecT571K1Holder.Instance);
     CustomNamedCurves.DefineCurveWithOid("sect571r1", SecObjectIdentifiers.SecT571r1, CustomNamedCurves.SecT571R1Holder.Instance);
     CustomNamedCurves.DefineCurveAlias("B-163", SecObjectIdentifiers.SecT163r2);
     CustomNamedCurves.DefineCurveAlias("B-233", SecObjectIdentifiers.SecT233r1);
     CustomNamedCurves.DefineCurveAlias("B-283", SecObjectIdentifiers.SecT283r1);
     CustomNamedCurves.DefineCurveAlias("B-409", SecObjectIdentifiers.SecT409r1);
     CustomNamedCurves.DefineCurveAlias("B-571", SecObjectIdentifiers.SecT571r1);
     CustomNamedCurves.DefineCurveAlias("K-163", SecObjectIdentifiers.SecT163k1);
     CustomNamedCurves.DefineCurveAlias("K-233", SecObjectIdentifiers.SecT233k1);
     CustomNamedCurves.DefineCurveAlias("K-283", SecObjectIdentifiers.SecT283k1);
     CustomNamedCurves.DefineCurveAlias("K-409", SecObjectIdentifiers.SecT409k1);
     CustomNamedCurves.DefineCurveAlias("K-571", SecObjectIdentifiers.SecT571k1);
     CustomNamedCurves.DefineCurveAlias("P-192", SecObjectIdentifiers.SecP192r1);
     CustomNamedCurves.DefineCurveAlias("P-224", SecObjectIdentifiers.SecP224r1);
     CustomNamedCurves.DefineCurveAlias("P-256", SecObjectIdentifiers.SecP256r1);
     CustomNamedCurves.DefineCurveAlias("P-384", SecObjectIdentifiers.SecP384r1);
     CustomNamedCurves.DefineCurveAlias("P-521", SecObjectIdentifiers.SecP521r1);
 }