Configure hash algorithms for certificate logon
Configurer des algorithmes de hachage pour l’ouverture de session de certificat
Explanation
This policy setting controls hash or checksum algorithms used by the Kerberos client when performing certificate authentication.
If you enable this policy, you will be able to configure one of four states for each algorithm:
- “Default” sets the algorithm to the recommended state.
- “Supported” enables usage of the algorithm. Enabling algorithms that have been disabled by default may reduce your security.
- “Audited” enables usage of the algorithm and reports an event (ID 309) every time it is used. This state is intended to verify that the algorithm is not being used and can be safely disabled.
- “Not Supported” disables usage of the algorithm. This state is intended for algorithms that are deemed to be insecure.
If you disable or do not configure this policy, each algorithm will assume the “Default” state.
More information about the hash and checksum algorithms supported by the Windows Kerberos client and their default states can be found at https://go.microsoft.com/fwlink/?linkid=2169037.
Events generated by this configuration: 309, 310.
Ce paramètre de stratégie contrôle les algorithmes de hachage ou de somme de contrôle utilisés par le client Kerberos lors de l’authentification de certificat.
Si vous activez cette stratégie, vous pouvez configurer l’un des quatre états pour chaque algorithme :
– « Par défaut » définit l’algorithme sur l’état recommandé.
– « Pris en charge » active l’utilisation de l’algorithme. L’activation des algorithmes qui ont été désactivés par défaut peut réduire votre sécurité.
– « Audité » active l’utilisation de l’algorithme et signale un événement (ID 309) chaque fois qu’il est utilisé. Cet état permet de vérifier que l’algorithme n’est pas utilisé et qu’il peut être désactivé en toute sécurité.
– « Non pris en charge » désactive l’utilisation de l’algorithme. Cet état est destiné aux algorithmes considérés comme non sécurisés.
Si vous désactivez ou ne configurez pas cette stratégie, chaque algorithme suppose l’état « Par défaut ».
Pour plus d’informations sur les algorithmes de hachage et de somme de contrôle pris en charge par le client Windows Kerberos et leurs états par défaut, consultez https://go.microsoft.com/fwlink/?linkid=2169037.
Événements générés par cette configuration : 309, 310.
Registry
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\KDC\Parameters- Value name
PKINITHashAlgorithmConfigurationEnabled
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: kdc/PKINITHashAlgorithmConfiguration
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\KDC\Parameters'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'PKINITHashAlgorithmConfigurationEnabled' -Value 1 -Type DWord
# SHA-1
# Possible options:
# Default = 1
# Supported = 3
# Audited = 2
# Not Supported = 0
Set-ItemProperty -Path $k -Name 'PKINITSHA1' -Value 1 -Type DWord
# SHA-256
# Possible options:
# Default = 1
# Supported = 3
# Audited = 2
# Not Supported = 0
Set-ItemProperty -Path $k -Name 'PKINITSHA256' -Value 1 -Type DWord
# SHA-384
# Possible options:
# Default = 1
# Supported = 3
# Audited = 2
# Not Supported = 0
Set-ItemProperty -Path $k -Name 'PKINITSHA384' -Value 1 -Type DWord
# SHA-512
# Possible options:
# Default = 1
# Supported = 3
# Audited = 2
# Not Supported = 0
Set-ItemProperty -Path $k -Name 'PKINITSHA512' -Value 1 -Type DWordDisable
# Disable: kdc/PKINITHashAlgorithmConfiguration
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\KDC\Parameters'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'PKINITHashAlgorithmConfigurationEnabled' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": kdc/PKINITHashAlgorithmConfiguration
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\KDC\Parameters'
Remove-ItemProperty -Path $k -Name 'PKINITHashAlgorithmConfigurationEnabled' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'PKINITSHA1' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'PKINITSHA256' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'PKINITSHA384' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'PKINITSHA512' -ErrorAction SilentlyContinueOptions (4)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SHA-1PKINITHashAlgorithmSHA1 | Drop-down listenum | PKINITSHA1 | REG_DWORD | Default choice (UI): #0
| ||||||||||
| SHA-256PKINITHashAlgorithmSHA256 | Drop-down listenum | PKINITSHA256 | REG_DWORD | Default choice (UI): #0
| ||||||||||
| SHA-384PKINITHashAlgorithmSHA384 | Drop-down listenum | PKINITSHA384 | REG_DWORD | Default choice (UI): #0
| ||||||||||
| SHA-512PKINITHashAlgorithmSHA512 | Drop-down listenum | PKINITSHA512 | REG_DWORD | Default choice (UI): #0
|