keyPairGenerator

abstract fun keyPairGenerator(keySize: BinarySize = 4096.bits, digest: CryptographyAlgorithmId<Digest> = SHA512, publicExponent: BigInt = 65537.toBigInt()): KeyGenerator<KP>(source)

Returns a KeyGenerator that generates RSA key pairs with the given parameters.

Common keySize values: 2048 bits (minimum acceptable), 3072 bits (recommended), 4096 bits (default, maximum security margin).