示例#1
0
        public RsaSecretBcpgKey(BigInteger d, BigInteger p, BigInteger q)
        {
            int num = p.CompareTo(q);

            if (num >= 0)
            {
                if (num == 0)
                {
                    throw new ArgumentException("p and q cannot be equal");
                }
                BigInteger bigInteger = p;
                p = q;
                q = bigInteger;
            }
            this.d    = new MPInteger(d);
            this.p    = new MPInteger(p);
            this.q    = new MPInteger(q);
            this.u    = new MPInteger(p.ModInverse(q));
            this.expP = d.Remainder(p.Subtract(BigInteger.One));
            this.expQ = d.Remainder(q.Subtract(BigInteger.One));
            this.crt  = q.ModInverse(p);
        }
        public RsaSecretBcpgKey(BigInteger d, BigInteger p, BigInteger q)
        {
            //IL_001a: Unknown result type (might be due to invalid IL or missing references)
            int num = p.CompareTo(q);

            if (num >= 0)
            {
                if (num == 0)
                {
                    throw new ArgumentException("p and q cannot be equal");
                }
                BigInteger bigInteger = p;
                p = q;
                q = bigInteger;
            }
            this.d = new MPInteger(d);
            this.p = new MPInteger(p);
            this.q = new MPInteger(q);
            u      = new MPInteger(p.ModInverse(q));
            expP   = d.Remainder(p.Subtract(BigInteger.One));
            expQ   = d.Remainder(q.Subtract(BigInteger.One));
            crt    = q.ModInverse(p);
        }