Attribute

EncryptionMethod (EM)

Purpose

The method the driver uses to encrypt data sent between the driver and the database server.

Valid Values

0 | 1 | 6 | 7 | 8

Behavior

If set to 0 (None), data is not encrypted.

If set to 1 (SSL), data is encrypted using the TLS/SSL protocols specified in the Crypto Protocol Version (CryptoProtocolVersion) connection option.

If set to 6 (RequestSSL), the login request and data are encrypted using TLS/SSL if the server is configured for TLS/SSL. If the server is not configured for TLS/SSL, an unencrypted connection is established. The TLS/SSL protocol used is determined by the setting of the Crypto Protocol Version (CryptoProtocolVersion) connection option.

If set to 7 (LoginSSL), the login request is encrypted using TLS/SSL regardless of whether the server is configured for TLS/SSL. The data is encrypted using TLS/SSL if the server is configured for TLS/SSL, and the data is unencrypted if the server is not configured for TLS/SSL. The TLS/SSL protocol used is determined by the setting of the Crypto Protocol Version (CryptoProtocolVersion) connection option.

If set to 8 (Strict), the driver uses the TDS (Tabular Data Stream) 8.0 protocol to support TLSv1.3 encryption for SQL Server connections. You must specify this value when your server is configured with Force Strict Encryption=yes.
Important: When using strict connection encryption:
  • The driver validates the certificates sent by the server (ValidateServerCertificate=1) for the connection, regardless of the setting of the Validate Server Certificate option.
  • You must specify a truststore containing the server certificate against which the server will be validated at connection.

Notes

  • When establishing a connection to Microsoft Azure Synapse Analytics, Microsoft Analytics Platform System, or Microsoft Windows Azure SQL Database, the driver will enable TLS/SSL data encryption by default (EncryptionMethod=1).
  • For values 1 through 8, the TLS/SSL protocol used is determined by the setting of the Crypto Protocol Version (CrytpoProtocolVersion) connection option.
  • The driver must use the server-specified packet size when using TLS/SSL encryption. If TLS/SSL is used, any value set for the Packet Size connection option is ignored.
  • This connection option can affect performance.
  • When using FIPS and default providers, the certificates must be generated using the OpenSSL 3.5-compliant cryptographic algorithms.

Default

0 (None)

GUI Tab

Security tab

See Also

Crypto Protocol Version

Performance considerations