public RSA() { _p = PrimeGenerator.GetPrime(); _q = PrimeGenerator.GetPrime(); N = _p * _q; long psi = (_p - 1) * (_q - 1); E = PrimeGenerator.GetPrime(); _d = MultiplicativeInverse.Calculate(E, psi); PublicKey = new RSAPublicKey(N, E); _privateKey = new RSAPrivateKey(_p, _q); }
public long Verify(long signedMessage, RSAPublicKey publicKey) { return(Verify(signedMessage, publicKey.E, publicKey.N)); }