diff --git a/crypto/src/main/kotlin/org/openrs2/crypto/Rsa.kt b/crypto/src/main/kotlin/org/openrs2/crypto/Rsa.kt index f2d66e61..5d9760f9 100644 --- a/crypto/src/main/kotlin/org/openrs2/crypto/Rsa.kt +++ b/crypto/src/main/kotlin/org/openrs2/crypto/Rsa.kt @@ -88,7 +88,6 @@ public object Rsa { } public fun encrypt(plaintext: BigInteger, key: RSAKeyParameters): BigInteger { - require(!key.isPrivate) return plaintext.modPow(key.exponent, key.modulus) } @@ -107,8 +106,6 @@ public object Rsa { } public fun decrypt(ciphertext: BigInteger, key: RSAKeyParameters): BigInteger { - require(key.isPrivate) - if (key is RSAPrivateCrtKeyParameters) { // blind the input val e = key.publicExponent