docs: def _generate_rsa_key(key_length):
      """Generate a new RSA private key.
  
      :param int key_length: Required key length in bits
      :returns: DER-encoded private key, private key identifier, and DER encoding identifier
      :rtype: tuple(bytes, :class:`EncryptionKeyType`, :class:`KeyEncodingType`)
      """
      private_key = rsa.generate_private_key(public_exponent=65537, key_size=key_length, backend=default_backend())
      key_bytes = private_key.private_bytes(
          encoding=serialization.Encoding.DER,
          format=serialization.PrivateFormat.PKCS8,
          encryption_algorithm=serialization.NoEncryption(),
      )
      return key_bytes, EncryptionKeyType.PRIVATE, KeyEncodingType.DER