Configuring Crypto Policy
Tighten the crypto policy in steps: find what would stop working, give the services that need a weak algorithm an exception, then raise the threshold. Check the result after each change.
The regman entry for Machine\System\Cryptography owns the complete
configuration reference. evman cryptod describes the records cryptod
writes.
Before you start #
- Check that cryptod is running:
svctl status cryptod. - Obtain write access to
Machine\System\Cryptography. SYSTEM and Administrators have it. - Obtain read access to cryptod's events in eventd.
- Allow time for the machine to run its normal workload under the current policy, so that the records show everything it uses.
Find the weak cryptography in use #
-
List the programs that used an entry below the Warn threshold:
Each record names the entry, its grade, and the process that used it.
-
List the uses of a grade that a new threshold would refuse. For example, before refusing everything below C:
-
List the exceptions in use, and by which programs:
Every program in these results would fail to use its entry under the new
threshold, unless it has an exception. A program that calls a low-level
digest function, such as SHA256 or MD5_Init, for a refused entry
ends.
Let a service keep an algorithm #
Give an exception to a service that must keep using an entry, such as a RADIUS server that needs HMAC-MD5. Grant it to the service's own SID, so that no other program gets it.
-
Find the service's SID. Read its main process ID from
svctl status <service>, then list that process's token groups:The service SID is the group that begins
S-1-5-80-. -
Create the exception, named for its owner and purpose. This one allows HMAC-MD5 for one service:
Name each entry as an algorithm and an operation.
md5.hmacdoesn't allowmd5.digest. The descriptor needs an owner,O:SYhere, as an access check refuses one without, and a DACL granting the Use right,0x1. -
Check that cryptod published it, and didn't drop it:
A
cryptod.policy.failedrecord naming the exception says why it was dropped. A dropped exception allows nothing. -
Restart the service, so that it reads the new policy:
Raise the reject threshold #
-
Set the lowest grade the policy allows. This refuses everything graded U or D:
-
Check that cryptod published the policy, as above. If a
cryptod.policy.failedrecord says a setting is invalid, cryptod kept the previous policy: correct the value and check again. -
Restart the services that should take up the new policy. Processes started from now on use it; running ones keep the policy they started with.
To refuse everything FIPS 140-3 doesn't approve, whatever its grade, set
Reject\FIPS to 1:
Check the result #
Watch for refusals and new warnings after the change:
A program refused an algorithm reports an error from its own calls, such
as a failed TLS handshake with an insufficient_security alert. If a
service stops working, give it an exception or lower the threshold, then
restart it.
To undo a change, set the value back, or delete it to return to Peios's default, then restart the affected services: