Example #1
0
        public static byte[] Decrypt(byte[] cipher, RSAPrivate pri)
        {
            BigInteger cipherInt = new BigInteger(cipher);
            BigInteger plainInt  = BigInteger.ModPow(cipherInt, pri.D, pri.N);

            return(plainInt.ToByteArray());
        }
Example #2
0
 public RSAKeyPair(RSAPublic pub, RSAPrivate pri)
 {
     Public  = pub;
     Private = pri;
 }