Пример #1
0
 protected Gost3410KeyParameters(
     bool isPrivate,
     Gost3410Parameters parameters)
     : base(isPrivate)
 {
     this.parameters = parameters;
 }
		protected Gost3410KeyParameters(
			bool				isPrivate,
			Gost3410Parameters	parameters)
			: base(isPrivate)
		{
			this.parameters = parameters;
		}
Пример #3
0
 public Gost3410KeyGenerationParameters(
     SecureRandom random,
     Gost3410Parameters parameters)
     : base(random, parameters.P.BitLength - 1)
 {
     this.parameters = parameters;
 }
		public Gost3410KeyGenerationParameters(
			SecureRandom random,
			Gost3410Parameters parameters)
			: base(random, parameters.P.BitLength - 1)
		{
			this.parameters = parameters;
		}
		protected Gost3410KeyParameters(
			bool				isPrivate,
			DerObjectIdentifier	publicKeyParamSet)
			: base(isPrivate)
		{
			this.parameters = LookupParameters(publicKeyParamSet);
			this.publicKeyParamSet = publicKeyParamSet;
		}
Пример #6
0
 protected Gost3410KeyParameters(
     bool isPrivate,
     DerObjectIdentifier publicKeyParamSet)
     : base(isPrivate)
 {
     this.parameters        = LookupParameters(publicKeyParamSet);
     this.publicKeyParamSet = publicKeyParamSet;
 }
		public Gost3410PrivateKeyParameters(
			BigInteger			x,
			Gost3410Parameters	parameters)
			: base(true, parameters)
		{
			if (x.Sign < 1 || x.BitLength > 256 || x.CompareTo(Parameters.Q) >= 0)
				throw new ArgumentException("Invalid x for GOST3410 private key", "x");

			this.x = x;
		}
		public Gost3410PublicKeyParameters(
			BigInteger y,
			Gost3410Parameters parameters)
			: base(false, parameters)
		{
			if (y.Sign < 1 || y.CompareTo(Parameters.P) >= 0)
				throw new ArgumentException("Invalid y for GOST3410 public key", "y");

			this.y = y;
		}
Пример #9
0
        public Gost3410PrivateKeyParameters(
            BigInteger x,
            Gost3410Parameters parameters)
            : base(true, parameters)
        {
            if (x.Sign < 1 || x.BitLength > 256 || x.CompareTo(Parameters.Q) >= 0)
            {
                throw new ArgumentException("Invalid x for GOST3410 private key", "x");
            }

            this.x = x;
        }
        public Gost3410PublicKeyParameters(
            BigInteger y,
            Gost3410Parameters parameters)
            : base(false, parameters)
        {
            if (y.Sign < 1 || y.CompareTo(Parameters.P) >= 0)
            {
                throw new ArgumentException("Invalid y for GOST3410 public key", "y");
            }

            this.y = y;
        }
Пример #11
0
        public override bool Equals(
            object obj)
        {
            if (obj == this)
            {
                return(true);
            }

            Gost3410Parameters other = obj as Gost3410Parameters;

            if (other == null)
            {
                return(false);
            }

            return(Equals(other));
        }
Пример #12
0
 protected bool Equals(
     Gost3410Parameters other)
 {
     return(p.Equals(other.p) && q.Equals(other.q) && a.Equals(other.a));
 }
Пример #13
0
		protected bool Equals(
			Gost3410Parameters other)
		{
			return p.Equals(other.p) && q.Equals(other.q) && a.Equals(other.a);
		}