Restrict cryptographic algorithms and protocols - Windows Server (2024)

  • Article

This article describes how to restrict the use of certain cryptographic algorithms and protocols in the Schannel.dll file. This information also applies to independent software vendor (ISV) applications that are written for the Microsoft Cryptographic API (CAPI).

Applies to: Windows Server 2003
Original KB number: 245030

Note

This article applies to Windows Server 2003 and earlier versions of Windows. For registry keys that apply to Windows Server 2008 and later versions of Windows, see the TLS Registry Settings.

Summary

The following cryptographic service providers (CSPs) that are included with Windows NT 4.0 Service Pack 6 were awarded the certificates for FIPS-140-1 crypto validation.

  • Microsoft Base Cryptographic Provider (Rsabase.dll)
  • Microsoft Enhanced Cryptographic Provider (Rsaenh.dll) (non-export version)

Microsoft TLS/SSL Security Provider, the Schannel.dll file, uses the CSPs that are listed here to conduct secure communications over SSL or TLS in its support for Internet Explorer and Internet Information Services (IIS).

You can change the Schannel.dll file to support Cipher Suite 1 and 2. However, the program must also support Cipher Suite 1 and 2. Cipher Suites 1 and 2 are not supported in IIS 4.0 and 5.0.

This article contains the necessary information to configure the TLS/SSL Security Provider for Windows NT 4.0 Service Pack 6 and later versions. You can use the Windows registry to control the use of specific SSL 3.0 or TLS 1.0 cipher suites with respect to the cryptographic algorithms that are supported by the Base Cryptographic Provider or the Enhanced Cryptographic Provider.

Note

In Windows NT 4.0 Service Pack 6, the Schannel.dll file does not use the Microsoft Base DSS Cryptographic Provider (Dssbase.dll) or the Microsoft DS/Diffie-Hellman Enhanced Cryptographic Provider (Dssenh.dll).

Cipher suites

Both SSL 3.0 and TLS 1.0 (RFC2246) with INTERNET-DRAFT 56-bit Export Cipher Suites For TLS draft-ietf-tls-56-bit-ciphersuites-00.txt provide options to use different cipher suites. Each cipher suite determines the key exchange, authentication, encryption, and MAC algorithms that are used in an SSL/TLS session. When you use RSA as both key exchange and authentication algorithms, the term RSA appears only one time in the corresponding cipher suite definitions.

The Windows NT 4.0 Service Pack 6 Microsoft TLS/SSL Security Provider supports the following SSL 3.0-defined CipherSuite when you use the Base Cryptographic Provider or the Enhanced Cryptographic Provider:

SSL 3.0Cipher suite
SSL_RSA_EXPORT_WITH_RC4_40_MD5{ 0x00,0x03 }
SSL_RSA_WITH_RC4_128_MD5{ 0x00,0x04 }
SSL_RSA_WITH_RC4_128_SHA{ 0x00,0x05 }
SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5{ 0x00,0x06 }
SSL_RSA_WITH_DES_CBC_SHA{ 0x00,0x09 }
SSL_RSA_WITH_3DES_EDE_CBC_SHA{ 0x00,0x0A }
SSL_RSA_EXPORT1024_WITH_DES_CBC_SHA{ 0x00,0x62 }
SSL_RSA_EXPORT1024_WITH_RC4_56_SHA{ 0x00,0x64 }

Note

Neither SSL_RSA_EXPORT1024_WITH_DES_CBC_SHA nor SSL_RSA_EXPORT1024_WITH_RC4_56_SHA is defined in SSL 3.0 text. However, several SSL 3.0 vendors support them. This includes Microsoft.

Windows NT 4.0 Service Pack 6 Microsoft TLS/SSL Security Provider also supports the following TLS 1.0-defined CipherSuite when you use the Base Cryptographic Provider or Enhanced Cryptographic Provider:

TLS 1.0Cipher suite
TLS_RSA_EXPORT_WITH_RC4_40_MD5{ 0x00,0x03 }
TLS_RSA_WITH_RC4_128_MD5{ 0x00,0x04 }
TLS_RSA_WITH_RC4_128_SHA{ 0x00,0x05 }
TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5{ 0x00,0x06 }
TLS_RSA_WITH_DES_CBC_SHA{ 0x00,0x09 }
TLS_RSA_WITH_3DES_EDE_CBC_SHA{ 0x00,0x0A }
TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA{ 0x00,0x62 }
TLS_RSA_EXPORT1024_WITH_RC4_56_SHA{ 0x00,0x64 }

Note

A cipher suite that is defined by using the first byte 0x00 is non-private and is used for open interoperable communications. Therefore, the Windows NT 4.0 Service Pack 6 Microsoft TLS/SSL Security Provider follows the procedures for using these cipher suites as specified in SSL 3.0 and TLS 1.0 to make sure of interoperability.

Schannel-specific registry keys

Important

This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, see How to back up and restore the registry in Windows.

Note

Any changes to the contents of the CIPHERS key or the HASHES key take effect immediately, without a system restart.

SCHANNEL key

Start Registry Editor (Regedt32.exe), and then locate the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL

SCHANNEL\Protocols subkey

To enable the system to use the protocols that will not be negotiated by default (such as TLS 1.1 and TLS 1.2), change the DWORD value data of the DisabledByDefault value to 0x0 in the following registry keys under the Protocols key:

  • SCHANNEL\Protocols\TLS 1.1\Client
  • SCHANNEL\Protocols\TLS 1.1\Server
  • SCHANNEL\Protocols\TLS 1.2\Client
  • SCHANNEL\Protocols\TLS 1.2\Server

Warning

The DisabledByDefault value in the registry keys under the Protocols key does not take precedence over the grbitEnabledProtocols value that is defined in the SCHANNEL_CRED structure that contains the data for an Schannel credential.

SCHANNEL\Ciphers subkey

The Ciphers registry key under the SCHANNEL key is used to control the use of symmetric algorithms such as DES and RC4. The following are valid registry keys under the Ciphers key.

Create the SCHANNEL Ciphers subkey in the format: SCHANNEL\(VALUE)\(VALUE/VALUE)

RC4 128/128

Ciphers subkey: SCHANNEL\Ciphers\RC4 128/128

This subkey refers to 128-bit RC4.

To allow this cipher algorithm, change the DWORD value data of the Enabled value to 0xffffffff. Or, change the DWORD value data to 0x0. If you do not configure the Enabled value, the default is enabled. This registry key does not apply to an exportable server that does not have an SGC certificate.

Disabling this algorithm effectively disallows the following values:

  • SSL_RSA_WITH_RC4_128_MD5
  • SSL_RSA_WITH_RC4_128_SHA
  • TLS_RSA_WITH_RC4_128_MD5
  • TLS_RSA_WITH_RC4_128_SHA

Triple DES 168

Ciphers subkey: SCHANNEL\Ciphers\Triple DES 168

This registry key refers to 168-bit Triple DES as specified in ANSI X9.52 and Draft FIPS 46-3. This registry key does not apply to the export version.

To allow this cipher algorithm, change the DWORD value data of the Enabled value to 0xffffffff. Or, change the DWORD data to 0x0. If you do not configure the Enabled value, the default is enabled.

Disabling this algorithm effectively disallows the following values:

  • SSL_RSA_WITH_3DES_EDE_CBC_SHA

  • SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA

  • TLS_RSA_WITH_3DES_EDE_CBC_SHA

  • TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA

    Note

    For the versions of Windows that releases before Windows Vista, the key should be Triple DES 168/168.

RC2 128/128

Ciphers subkey: SCHANNEL\Ciphers\RC2 128/128

This registry key refers to 128-bit RC2. It does not apply to the export version.

To allow this cipher algorithm, change the DWORD value data of the Enabled value to 0xffffffff. Otherwise, change the DWORD value data to 0x0. If you do not configure the Enabled value, the default is enabled.

RC4 64/128

Ciphers subkey: SCHANNEL\Ciphers\RC4 64/128

This registry key refers to 64-bit RC4. It does not apply to the export version (but is used in Microsoft Money).

To allow this cipher algorithm, change the DWORD value data of the Enabled value to 0xffffffff. Otherwise, change the DWORD value data to 0x0. If you do not configure the Enabled value, the default is enabled.

RC4 56/128

Ciphers subkey: SCHANNEL\Ciphers\RC4 56/128

This registry key refers to 56-bit RC4.

To allow this cipher algorithm, change the DWORD value data of the Enabled value to 0xffffffff. Otherwise, change the DWORD value data to 0x0. If you do not configure the Enabled value, the default is enabled.

Disabling this algorithm effectively disallows the following value:

  • TLS_RSA_EXPORT1024_WITH_RC4_56_SHA

RC2 56/128

Ciphers subkey: SCHANNEL\Ciphers\RC2 56/128

This registry key refers to 56-bit RC2.

To allow this cipher algorithm, change the DWORD value data of the Enabled value to 0xffffffff. Otherwise, change the DWORD value data to 0x0. If you do not configure the Enabled value, the default is enabled.

DES 56

Ciphers subkey: SCHANNEL\Ciphers\DES 56/56

This registry key refers to 56-bit DES as specified in FIPS 46-2. Its implementation in the Rsabase.dll and Rsaenh.dll files is validated under the FIPS 140-1 Cryptographic Module Validation Program.

To allow this cipher algorithm, change the DWORD value data of the Enabled value to 0xffffffff. Otherwise, change the DWORD value data to 0x0. If you do not configure the Enabled value, the default is enabled.

Disabling this algorithm effectively disallows the following values:

  • SSL_RSA_WITH_DES_CBC_SHA
  • TLS_RSA_WITH_DES_CBC_SHA

RC4 40/128

Ciphers subkey: SCHANNEL\Ciphers\RC4 40/128

This registry key refers to 40-bit RC4.

To allow this cipher algorithm, change the DWORD value data of the Enabled value to 0xffffffff. Otherwise, change the DWORD value data to 0x0. If you do not configure the Enabled value, the default is enabled.

Disabling this algorithm effectively disallows the following values:

  • SSL_RSA_EXPORT_WITH_RC4_40_MD5
  • TLS_RSA_EXPORT_WITH_RC4_40_MD5

RC2 40/128

Ciphers subkey: SCHANNEL\Ciphers\RC2 40/128

This registry key refers to 40-bit RC2.

To allow this cipher algorithm, change the DWORD value data of the Enabled value to 0xffffffff. Otherwise, change the DWORD value data to 0x0. If you do not configure the Enabled value, the default is enabled.

Disabling this algorithm effectively disallows the following values:

  • SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5
  • TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5

NULL

Ciphers subkey: SCHANNEL\Ciphers\NULL

This registry key means no encryption. By default, it is turned off.

To turn off encryption (disallow all cipher algorithms), change the DWORD value data of the Enabled value to 0xffffffff. Otherwise, change the DWORD value data to 0x0.

Hashes

Ciphers subkey: SCHANNEL/Hashes

The Hashes registry key under the SCHANNEL key is used to control the use of hashing algorithms such as SHA-1 and MD5. The following are valid registry keys under the Hashes key.

MD5

Ciphers subkey: SCHANNEL\Hashes\MD5

To allow this hashing algorithm, change the DWORD value data of the Enabled value to the default value 0xffffffff. Otherwise, change the DWORD value data to 0x0.

Disabling this algorithm effectively disallows the following values:

  • SSL_RSA_EXPORT_WITH_RC4_40_MD5
  • SSL_RSA_WITH_RC4_128_MD5
  • SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5
  • TLS_RSA_EXPORT_WITH_RC4_40_MD5
  • TLS_RSA_WITH_RC4_128_MD5
  • TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5

SHA

Ciphers subkey: SCHANNEL\Hashes\SHA

This registry key refers to Secure Hash Algorithm (SHA-1), as specified in FIPS 180-1. Its implementation in the Rsabase.dll and Rsaenh.dll files is validated under the FIPS 140-1 Cryptographic Module Validation Program.

To allow this hashing algorithm, change the DWORD value data of the Enabled value to the default value 0xffffffff. Otherwise, change the DWORD value data to 0x0.

Disabling this algorithm effectively disallows the following values:

  • SSL_RSA_WITH_RC4_128_SHA
  • SSL_RSA_WITH_DES_CBC_SHA
  • SSL_RSA_WITH_3DES_EDE_CBC_SHA
  • SSL_RSA_EXPORT1024_WITH_DES_CBC_SHA
  • SSL_RSA_EXPORT1024_WITH_RC4_56_SHA
  • TLS_RSA_WITH_RC4_128_SHA
  • TLS_RSA_WITH_DES_CBC_SHA
  • TLS_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA
  • TLS_RSA_EXPORT1024_WITH_RC4_56_SHA

KeyExchangeAlgorithms

Ciphers subkey: SCHANNEL/KeyExchangeAlgorithms

The KeyExchangeAlgorithms registry key under the SCHANNEL key is used to control the use of key exchange algorithms such as RSA. The following are valid registry keys under the KeyExchangeAlgorithms key.

PKCS

Ciphers subkey: SCHANNEL\KeyExchangeAlgorithms\PKCS

This registry key refers to the RSA as the key exchange and authentication algorithms.

To allow RSA, change the DWORD value data of the Enabled value to the default value 0xffffffff. Otherwise, change the DWORD data to 0x0.

Disabling RSA effectively disallows all RSA-based SSL and TLS cipher suites supported by the Windows NT4 SP6 Microsoft TLS/SSL Security Provider.

FIPS 140-1 cipher suites

You may want to use only those SSL 3.0 or TLS 1.0 cipher suites that correspond to FIPS 46-3 or FIPS 46-2 and FIPS 180-1 algorithms provided by the Microsoft Base or Enhanced Cryptographic Provider.

In this article, we refer to them as FIPS 140-1 cipher suites. Specifically, they are as follows:

  • SSL_RSA_WITH_DES_CBC_SHA
  • SSL_RSA_WITH_3DES_EDE_CBC_SHA
  • SSL_RSA_EXPORT1024_WITH_DES_CBC_SHA
  • TLS_RSA_WITH_DES_CBC_SHA
  • TLS_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA

To use only FIPS 140-1 cipher suites as defined here and supported by Windows NT 4.0 Service Pack 6 Microsoft TLS/SSL Security Provider with the Base Cryptographic Provider or the Enhanced Cryptographic Provider, configure the DWORD value data of the Enabled value in the following registry keys to 0x0:

  • SCHANNEL\Ciphers\RC4 128/128
  • SCHANNEL\Ciphers\RC2 128/128
  • SCHANNEL\Ciphers\RC4 64/128
  • SCHANNEL\Ciphers\RC4 56/128
  • SCHANNEL\Ciphers\RC2 56/128
  • SCHANNEL\Ciphers\RC4 40/128
  • SCHANNEL\Ciphers\RC2 40/128
  • SCHANNEL\Ciphers\NULL
  • SCHANNEL\Hashes\MD5

And configure the DWORD value data of the Enabled value in the following registry keys to 0xffffffff:

  • SCHANNEL\Ciphers\DES 56/56
  • SCHANNEL\Ciphers\Triple DES 168/168 (not applicable in export version)
  • SCHANNEL\Hashes\SHA
  • SCHANNEL\KeyExchangeAlgorithms\PKCS

Master secret computation by using FIPS 140-1 cipher suites

The procedures for using the FIPS 140-1 cipher suites in SSL 3.0 differ from the procedures for using the FIPS 140-1 cipher suites in TLS 1.0.

In SSL 3.0, the following is the definition master_secret computation:

In TLS 1.0, the following is the definition master_secret computation:

where:

Selecting the option to use only FIPS 140-1 cipher suites in TLS 1.0:

Because of this difference, customers may want to prohibit the use of SSL 3.0 even though the allowed set of cipher suites is limited to only the subset of FIPS 140-1 cipher suites. In that case, change the DWORD value data of the Enabled value to 0x0 in the following registry keys under the Protocols key:

  • SCHANNEL\Protocols\SSL 3.0\Client
  • SCHANNEL\Protocols\SSL 3.0\Server

Warning

The Enabled value data in these registry keys under the Protocols key takes precedence over the grbitEnabledProtocols value that is defined in the SCHANNEL_CRED structure that contains the data for a Schannel credential. The default Enabled value data is 0xffffffff.

Examples of registry files

Two examples of registry file content for configuration are provided in this section of the article. They are Export.reg and Non-export.reg.

In a computer that is running Windows NT 4.0 Service Pack 6 with the exportable Rasbase.dll and Schannel.dll files, run Export.reg to make sure that only TLS 1.0 FIPS cipher suites are used by the computer.

In a computer that is running Windows NT 4.0 Service Pack 6 that includes the non-exportable Rasenh.dll and Schannel.dll files, run Non-export.reg to make sure that only TLS 1.0 FIPS cipher suites are used by the computer.

For the Schannel.dll file to recognize any changes under the SCHANNEL registry key, you must restart the computer.

To return the registry settings to default, delete the SCHANNEL registry key and everything under it. If these registry keys are not present, the Schannel.dll rebuilds the keys when you restart the computer.

Restrict cryptographic algorithms and protocols - Windows Server (2024)

FAQs

How to restrict the use of certain cryptographic algorithms and protocols by Microsoft? ›

To turn off encryption (disallow all cipher algorithms), change the DWORD value data of the Enabled value to 0xffffffff. Otherwise, change the DWORD value data to 0x0. The Hashes registry key under the SCHANNEL key is used to control the use of hashing algorithms such as SHA-1 and MD5.

How to disable weak ciphers on Windows server? ›

Normally to disable weak ciphers on a Windows server you just run IISCrypto and disable the protocols that you don't want. Reboot the machine and they are no longer available.

How to disable RC4 and 3DES on Windows Server? ›

We can disable 3DES and RC4 ciphers by removing them from registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Cryptography\Configuration\Local\SSL\00010002 and then restart the server.

How to disable des 3DES idea or rc2 ciphers in Windows? ›

Disable RC4/DES/3DES cipher suites in Windows using registry, Group Policy Object (GPO), or local security settings. You can do this using GPO or Local security policy under Computer configuration > Administrative Templates > Network > SSL Configuration Settings > SSL Cipher Suite Order.

How do I disable TLS on Windows server? ›

Step 1: Navigate to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols". Create a key named "TLS 1.1" with two DWORDs for both TLS 1.0 & 1.1: "DisabledByDefault=1" & "Enabled=0".

How to change SSL ciphers in Windows? ›

Using Windows utilities
  1. Connect to the server via RDP.
  2. Go to Start > Edit group policy.
  3. Go to Local Computer Policy > Computer Configuration > Administrative Template > Network > SSL Configuration Settings > SSL Cipher Suite Order.
  4. Set option Enabled.
  5. Edit SSL Cipher Suites in the line.
  6. Press OK to apply changes.

How do I disable weak ciphers and algorithms? ›

  1. SSH to the instance and switch to root by running the command sudo su -.
  2. List the currently enabled ciphers by running the command ssh -Q cipher.
  3. Copy the list and remove the unwanted ciphers. ...
  4. Make a backup of the file /etc/ssh/ssh_config by running the command: ...
  5. Edit the modified list of ciphers in /etc/ssh/ssh_config.

How to disable TLS weak ciphers in Windows Server 2016? ›

The Disable-TlsCipherSuite cmdlet disables a cipher suite. This cmdlet removes the cipher suite from the list of Transport Layer Security (TLS) protocol cipher suites for the computer.

How do I enable ciphers in Windows Server? ›

You can use the SSL Cipher Suite Order Group Policy settings to configure the default TLS cipher suite order.
  1. From the Group Policy Management Console, go to Computer Configuration > Administrative Templates > Network > SSL Configuration Settings.
  2. Double-click SSL Cipher Suite Order, and then click the Enabled option.
Jun 15, 2023

How do I completely disable RC4? ›

Deactivating RC4 on IIS
  1. Open registry editor: ...
  2. Navigate to: ...
  3. Right-click on Ciphers >> New >> Key. ...
  4. Right-click on RC4 40/128 >> New >> DWORD (32-bit) Value. ...
  5. Double-click the created Enabled value and make sure that there is zero (0) in Value Data: field >> click OK.

How do I disable all RC4 ciphers? ›

Navigate to System > Configuration > Security > Inbound SSL Options. Under Allow Encryption Strength, select Custom SSL Cipher Suites. From the right pane (under Selected Cipher Suites), remove all cipher suites with RC4. Click Save Changes.

Should we disable RC4? ›

Mozilla and Microsoft recommend disabling RC4 where possible. RFC 7465 prohibits the use of RC4 in TLS.

Which ciphers should be disabled? ›

So, DHE ciphers should be completely disabled in Intermediate compatibility configuration to improve overall server stablity and security. If DHE ciphers are disabled on server side - in this case server will be protected from DoS attacks via very expensive SSL handshakes with DHE ciphers.

How do I disable DES ciphers in Windows? ›

Disabling 3DES/DES TLS Cipher by using Group Policy

From the Group Policy Management Console, go to Computer Configuration > Administrative Templates > Network > SSL Configuration Settings. 2. If you have not enabled it previously then double-click SSL Cipher Suite Order, and then click the Enabled option.

How to disable CBC mode cipher encryption in Windows server 2012? ›

How to Remove CBC Ciphers
  1. Group Policy. Create new or edit existing GPO. ...
  2. PowerShell. The command Disable-TlsCipherSuite can be used to remove specific CBC ciphers. ...
  3. IISCRYPTO. Manually uncheck the CBC ciphers which you want to remove and click Apply.
  4. Modify registry keys (not advised)

How to disable Windows platform FIPS validated cryptographic algorithms? ›

In Security Settings, expand Local Policies, and then click Security Options. Under Policy in the right pane, double-click System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing, and then click Disabled.

How to disable specific algorithms and ciphers for SSH service only? ›

Solution
  1. Log in to the instance using the ssh command.
  2. Switch to a root user using the sudo su - command.
  3. List the currently enabled ciphers by running the command sshd -T | grep -i 'cipher'.
  4. Copy the list and remove the unwanted ciphers. ...
  5. Make a backup of the file /etc/ssh/sshd_config by running the command:

What should be in a policy on the use of cryptographic controls? ›

Cryptographic keys must be transmitted by reliable and secure methods to maintain confidentiality and integrity. Separate communication channels should be used for key and data transfer.

What are cryptographic controls for protection of information? ›

Confidentiality - Cryptographic controls ensure that only authorized individuals can access confidential information, protecting it from unauthorized disclosure. Data integrity - By using cryptographic controls, organizations can verify the integrity of data and detect any unauthorized modifications or tampering.

Top Articles
Latest Posts
Article information

Author: Mr. See Jast

Last Updated:

Views: 6017

Rating: 4.4 / 5 (75 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Mr. See Jast

Birthday: 1999-07-30

Address: 8409 Megan Mountain, New Mathew, MT 44997-8193

Phone: +5023589614038

Job: Chief Executive

Hobby: Leather crafting, Flag Football, Candle making, Flying, Poi, Gunsmithing, Swimming

Introduction: My name is Mr. See Jast, I am a open, jolly, gorgeous, courageous, inexpensive, friendly, homely person who loves writing and wants to share my knowledge and understanding with you.