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()); }
public RSAKeyPair(RSAPublic pub, RSAPrivate pri) { Public = pub; Private = pri; }