void RSA::decrypt(BigInt& cryptmes,BigInt& message){ message= fast_power(cryptmes, dog.d, dog.n); }
void RSA::encrypt(BigInt& cryptmes,BigInt& message, BigInt& e, BigInt& n){ cryptmes= fast_power(message, e, n); }
void RSA::encrypt(BigInt& cryptmes, BigInt& message){ cryptmes= fast_power(message, dog.e, dog.n); }
long long modular_inverse(int a) { // modular multiplicative inverse return fast_power(a, MOD-2); }