コード例 #1
0
ファイル: rsa.cpp プロジェクト: DanilovArt/RSA
void RSA::decrypt(BigInt& cryptmes,BigInt& message){
	message= fast_power(cryptmes, dog.d, dog.n);
}
コード例 #2
0
ファイル: rsa.cpp プロジェクト: DanilovArt/RSA
void RSA::encrypt(BigInt& cryptmes,BigInt& message, BigInt& e, BigInt& n){
    cryptmes= fast_power(message, e, n);
}
コード例 #3
0
ファイル: rsa.cpp プロジェクト: DanilovArt/RSA
void RSA::encrypt(BigInt& cryptmes, BigInt& message){
    cryptmes= fast_power(message, dog.e, dog.n);

}
コード例 #4
0
ファイル: modular_inverse.cpp プロジェクト: seirion/code
long long modular_inverse(int a) { // modular multiplicative inverse
    return fast_power(a, MOD-2);
}