Represents the encryption algorithm used by the SslStream class.

Note: This class is typically not instantiated directly. It is used by the SslStream class to specify the encryption algorithm during an SSL/TLS connection.

Syntax

public enum EncryptionAlgorithm

Remarks

The EncryptionAlgorithm enumeration defines the set of symmetric encryption algorithms that can be used to secure data transmitted over an SslStream. When establishing an SSL/TLS connection, the client and server negotiate the encryption algorithm to use based on their supported algorithms. The negotiated algorithm is then used for encrypting and decrypting the data exchanged between the client and server.

Common encryption algorithms include:

  • Aes128
  • Aes192
  • Aes256
  • Rc4 (often deprecated)
  • Des (deprecated)
  • 3Des

The specific algorithms supported and their availability may depend on the operating system and the version of the .NET Framework or .NET Core being used.

Members

  • Aes128 Aes128 = 32770

    Specifies the AES 128-bit encryption algorithm.

  • Aes192 Aes192 = 32771

    Specifies the AES 192-bit encryption algorithm.

  • Aes256 Aes256 = 32772

    Specifies the AES 256-bit encryption algorithm.

  • Des Des = 131075

    Specifies the DES encryption algorithm. (Deprecated in favor of stronger algorithms).

  • Rc4 Rc4 = 262145

    Specifies the RC4 encryption algorithm. (Often considered insecure and deprecated).

  • Rc48 Rc48 = 262146

    Specifies the RC4 algorithm with an 8-bit key. (Generally not recommended).

  • Tls12_DheAes128 Tls12_DheAes128 = 32778

    Specifies the DHE AES 128-bit cipher suite for TLS 1.2.

  • Tls12_DheAes256 Tls12_DheAes256 = 32779

    Specifies the DHE AES 256-bit cipher suite for TLS 1.2.

  • Tls12_DheRsaAes128 Tls12_DheRsaAes128 = 32780

    Specifies the DHE RSA AES 128-bit cipher suite for TLS 1.2.

  • Tls12_DheRsaAes256 Tls12_DheRsaAes256 = 32781

    Specifies the DHE RSA AES 256-bit cipher suite for TLS 1.2.

  • Tls12_FfDheAes128 Tls12_FfDheAes128 = 32782

    Specifies the Ephemeral Diffie-Hellman AES 128-bit cipher suite for TLS 1.2.

  • Tls12_FfDheAes256 Tls12_FfDheAes256 = 32783

    Specifies the Ephemeral Diffie-Hellman AES 256-bit cipher suite for TLS 1.2.

  • Tls12_FfDheRsaAes128 Tls12_FfDheRsaAes128 = 32784

    Specifies the Ephemeral Diffie-Hellman RSA AES 128-bit cipher suite for TLS 1.2.

  • Tls12_FfDheRsaAes256 Tls12_FfDheRsaAes256 = 32785

    Specifies the Ephemeral Diffie-Hellman RSA AES 256-bit cipher suite for TLS 1.2.

  • Tls12_RsaAes128 Tls12_RsaAes128 = 32774

    Specifies the RSA AES 128-bit cipher suite for TLS 1.2.

  • Tls12_RsaAes256 Tls12_RsaAes256 = 32775

    Specifies the RSA AES 256-bit cipher suite for TLS 1.2.

  • Tls12_RsaNull Tls12_RsaNull = 65536

    Specifies the RSA Null cipher suite for TLS 1.2. (Not recommended for production use).

  • Tls13_Aes128Gcm Tls13_Aes128Gcm = 65537

    Specifies the AES 128-bit GCM cipher suite for TLS 1.3.

  • Tls13_Aes256Gcm Tls13_Aes256Gcm = 65538

    Specifies the AES 256-bit GCM cipher suite for TLS 1.3.

  • Tls13_Chacha20Poly1305 Tls13_Chacha20Poly1305 = 65539

    Specifies the ChaCha20-Poly1305 cipher suite for TLS 1.3.

  • Unknown Unknown = 0

    Indicates that the encryption algorithm is unknown or has not been negotiated.

See Also