Note: This is a (very very long) compendium of various recommendations and actions thatfrom Microsoft, NIST, and other well respected PKI and cryptography experts have said. If you see something that requires even the slightest revision, do let me know.
Before I get into configuring the CA and its subs, it's good to know that even though MSFT's CryptoAPI requires a self-signed root, some non-MSFT software may follow RFC 3280 and allow any CA to be the trusted root for validation purposes. OneOne reason may be that the non-MSFT software prefers a lower key length.
Best: Store the key on a HSM that supports key counting. EveryEvery time the CA's private key is used, the counter will be increased. ThisThis improves your audit profile. LookLook for FIPS140 Level 3 or 4
Good: Store the Private key on a smart card. Though I'm unaware of any Smart Card that offers key counting, enabling key counting may give you unexpected results in the event log
Acceptable: Store the private key in Windows DPAPI. EnsureEnsure that these keys and the Key Enrollment agent don't end up in Roaming Credentials. SeeSee also: How to enumerate DPAPI and Roaming Credentials
Don't use 1024 as a key length... NIST phased it out in 2011, MSFT won't ever add it into your Trusted Root CA store since it won't meet the minimum accepted technical criteria.
Root CAs that supports legacy apps should never be larger than 2048 bits. Reason: MSFT Support sees many cases where Java apps or network devices only support key sizes of 2048 bytes. Save the higher bit lengths to CAs that are constrained for a specific purpose (Windows vs Network devices) etc.
The NIST recommends 2048 or 3072 bits. ECCECC is supported, though it may cause issues with device interoperability.
Plan for the strongest possible encryption (key length) throughout the PKI, otherwise expect mixed security benefits.
Mobile clients have issues (High CPU) or incompatibility with large keys
The algorithm & Keykey length can have a bearing on how long you want certificates to be valid, because they effectively determine how long it might take an attacker crack, ie the stronger the cryptography, the longer you might be prepared to have certificates valid for
You may want to imitate the Federal PKI Management Authority and set up two PKI roots. OneOne modern SHA-256 for all devices that support it, and one legacy SHA-1. ThenThen use cross certificates to map between the two deployments.
Review this SHA-2 compatibility list for Microsoft software
As of 2012, this is required if you use MD5 as a hash. It'sIt's still a good idea if SHA1 or greater is used. AlsoAlso see this Windows 2008R2 "how to" for more information.
Best Practice: Although it is possible to put freeform text into this field (see notice
below), the ideal solution is to use a URL. ThisThis allows the policy to be updated without reissuing the certificates, it also prevents unneeded bloating of the certificate store.
Application Policies is an optional Microsoft convention. IfIf you are issuing certificates that include both application policy and EKU extensions, ensure that the two extensions contain identical object identifiers.
This is optional in a Root CA, and if done incorrectly it may expose your private key.
All CRL publication is done manually from an offline RootCA to all other sub-CA's. An alternative is to use an audio cable to facilitate one-way communication from the Root to Sub CA's
It is perfectly acceptable to have the Root CA issue different CRL locations for each issued certificate to subordinate CAs.
Having a CRL at the root is a best practice if two PKIs trust each other and policy mapping is done. ThisThis permits the certificate to be revoked.
Getting the CRL "right" is pretty important since it's up to each application to do the CRL check. ForFor example, smart card logon on domain controllers always enforce the revocation check and will reject a logon event if the revocation check cannot be performed or fails.
A self-signed root CA should not list any CDPs. MostMost windows applications don't enable the CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT flag and therefore ignore the CDP (this is the default validation mode). IfIf the flag is enabled, and the CDP is blank for the self signed root cert, no error is returned.
Don't use HTTPS and LDAPS. TheseThese URLs are no longer supported as distribution point references. Reason is that HTTPS and LDAPS URLs use certificates that may or may not be revoked. The revocation checking process can result in revocation loops when HTTPS or LDAPS URLs are used. To determine if the certificate is revoked, the CRL must be retrieved. However, the CRL cannot be retrieved unless the revocation status of the certificates used by HTTPS or LDAPS is determined.
Consider using HTTP instead of LDAP- Although AD DS enables publication of CRLs to all domain controllers in the forest, implement HTTP instead of LDAP for revocation information publication. Only HTTP enables the use of the
ETag
andCache-Control: Max-age
headers providing better support for proxies and more timely revocation information. In addition, HTTP provides better heterogeneous support as HTTP is supported by most Linux, UNIX, and network device clients.Another reason to not use LDAP is because the revocation window to be smaller. When using AD LDAP to replicate CA information, the revocation window couldn't be less than the time for all sites in AD to get the CA update. OftentimesOften this replication could take up to 8 hours... that is 8 hours until a smartcard user's access is revoked. 'Todo: the new recommended CRL refresh time is: ?????`’
Make all the URLs highly available (aka don't include LDAP for external hosts). WindowsWindows will slow down the validation process for up to 20 seconds and retry the failed connection repeatedly at least as frequently as every 30 min. II suspect that Pre-fetching will cause this to occur even if the user isn't actively using the site.
Monitor the size of your CRL. IfIf the CRL object is so large that CryptoAPI is not able to download the object within the allotted maximum timeout threshold, a “revocation offline” error is returned and the object download is terminated.
Since renewing a CA cert causes a new/blank CRLCRL to be generated, Issuing CAs may consider renewing the CA with a new key every 100-125K certificates to maintain a reasonable CRL size. This issuance number is based on the assumption that approximately 10 percent of the issued certificates will be revoked prior to their natural expiration date. If the actual or planned revocation rate is higher or lower for your organization, adjust the key renewal strategy accordingly. More info
If using a CRL, don't sign the CRL with MD5. It'sIt's also a good idea to add randomization to the CRL signing key.
A typical stand-alone CA certificate will contain permissions to create Digital Signatures, Certificate Signing, and CRL signing as key values. ThisThis is part of the issue with the FLAME security issue.
Here is a sample user dialog for S/MIME. ExpectExpect similar UIs for BrowerBrowser based certificates. Notice how the Issuer name isn't user friendly.
XP clients and many non-windows systems do not support this new signature format. ThisThis should be disabled if older clients need to be supported. More Info
I would only recommend using it once you move to ECC algorithms for asymmetric encryption. (source)
If you enroll Certificate Template v3, the private key goes into the CNG private key storage on the client computer. If you enroll Certificate Template v2 or v1, the private key goes into CSP storage. TheThe certificates will be visible to all applications in both cases, but not their private keys - so most applications will show the certificate as available, but will not be able to sign or decrypt data with the associated private key unless they support CNG storage.
You cannot distinguish between CNG and CSP storages by using the Certificate MMC. If you want to see what storage a particular certificate is using, you must use CERTUTIL -repairstore my *
(or CERTUTIL -user -repairstore my *
) and take a look at the Provider field. If it is sayingends "... Key Storage Provider", than it is CNG while all other providers are CSP.
If you create the initial certificate request manually (Create Custom Request in MMC), you can select between "CNG Storage" and "Legacy Key" where legacy means CSP. The following is my experience-based list of what does not support CNG - you cannot find an authoritative list anywhere, so this arises from my investigations over time:
- EFS - User Encryption Certificates - not supported in Windows Vista/2008, supported in Windows 7/2008R2
- VPN/WiFi ClientADFS (EAPTLS- Token Signing, PEAP Client)Service Communication Certificates - User or computer certificate authentication - not supported in Windows 7/2008R2, supported in Windows 2012/8.1not supported in Windows 8.1/2012R2, supported in Windows 10/2016
- VPN/WiFi Client (EAPTLS, PEAP) user/computer - not supported in Windows 7/2008R2, supported in Windows 2012/8.1
- Network Device Enrollment Service Registration Authority Certificates (NDES) - A legacy CSP (Cryptographic Service Provider) must be installed
- TMG 2010 - Server certificates on web listeners
- Outlook - User email certificates for signatures or encryption - not supported in Outlook 2003, supported in Outlook 2007 on Windows Vista
- Kerberos - Domain controller certificates - supported in Windows Vista/2008
- System Center Operations Manager 2007 R2
- System Center Configuration Manager 2007 R2
- SQL Server (all versions currently require a certificate that uses a legacy Cryptographic Storage Provider)
- Forefront Identity Manager 2010 Certificate Management
More information on CNG compatibility areis listed here and here
If you deploy two PKI trees, with the intent to decommission the legacy tree at some point (where all old devices have become obsolete or upgraded) it may be a good idea to set the CRL Next Update field to Null. ThisThis will (should?) prevent the continual polling for new CRLS to the clients. TheThe reasoning is that once the PKI is decommissioned, there will be no more administration, and no more revoked certs. All remaining certs are simply left to expire.