<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Jeroen's Blog - Security and Cryptography</title>
    <link>http://www.jeroenlandheer.com/Blog/</link>
    <description>A Dutch software developer living in Chile</description>
    <language>en-us</language>
    <copyright>Jeroen Landheer</copyright>
    <lastBuildDate>Sat, 06 Jun 2009 20:00:49 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>jeroen@landheer.com</managingEditor>
    <webMaster>jeroen@landheer.com</webMaster>
    <item>
      <trackback:ping>http://www.jeroenlandheer.com/Blog/Trackback.aspx?guid=478cffb7-096a-4fe3-8faa-e9c215568130</trackback:ping>
      <pingback:server>http://www.jeroenlandheer.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.jeroenlandheer.com/Blog/PermaLink,guid,478cffb7-096a-4fe3-8faa-e9c215568130.aspx</pingback:target>
      <dc:creator>Jeroen Landheer</dc:creator>
      <wfw:comment>http://www.jeroenlandheer.com/Blog/CommentView,guid,478cffb7-096a-4fe3-8faa-e9c215568130.aspx</wfw:comment>
      <wfw:commentRss>http://www.jeroenlandheer.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=478cffb7-096a-4fe3-8faa-e9c215568130</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’ll be doing a series of articles about PKI, it’s uses and how to set things up in
a secure and correct manner. Information in these articles is gathered from various
online resources, books and study material. Disclaimer: Though I am confident this
information can be used to securely deploy a PKI even in big enterprises, you can
use this information at your own risk. 
</p>
        <p>
This is the first part of the series, which will talk about setting up a root CA and
it’s subordinate CAs. In the next articles we will talk about using this infrastructure
to secure mail, encrypt files, secure your web servers, using smart cards for Windows
logon and electronically sign your documents. Also, signing macro’s, software, add-ins,
and more will be part of all of this. This article is full with abbreviations, though
each of them should have at least once mentioned their full meaning.
</p>
        <p>
          <strong>Setting up a Private Key Infrastructure (PKI)</strong>
        </p>
        <p>
A PKI needs the following ingredients:
</p>
        <ul>
          <li>
One root certificate authority 
</li>
          <li>
One or more subordinate certificate authorities 
</li>
          <li>
Active Directory to facilitate in distributing and installing certificates 
</li>
          <li>
A web server</li>
        </ul>
        <p>
          <strong>The root CA</strong>
        </p>
        <p>
The root CA must be installed on a stand-alone machine. <em>This machine must not
be connected to the network at any time.</em> Start by installing Windows (Standard
Edition recommended), activate Windows <u>by phone</u>, install the latest service
pack from a CD or DVD. After that, we’ll need to make some preparations for installing
the certificate authority. Make sure the computer name of the machine is unique within
your network, even though it’s an offline machine. 
</p>
        <p>
Create a text file that is called: “CAPolicy.inf”, and put in the following lines: 
</p>
        <pre>[Version]
Signature= "$Windows NT$"
[Certsrv_Server]
RenewalKeyLength=4096
RenewalValidityPeriod=Years
RenewalValidityPeriodUnits=20
[CRLDistributionPoint]
[AuthorityInformationAccess]

</pre>
        <p>
This will ensure that in the root certificate, the AIA and CRL fields are suppressed.
(More about these in a minute.) Place CAPolicy.inf in your Windows directory and install
the CA. Enable the web enrollment option, since we’ll be using the website for creating
certificates later. 
</p>
        <p>
During the installation of a CA, you’ll need to choose a Cryptographic Service Provider
(CSP). Since the root CA (or any CA for that matter) only does signing, no encryption,
the MS Strong CSP is sufficient for keys up to 16K, the enhanced CSP has essentially
the same parameters. When you want to support CNG (Cryptography Next Generation) certificates,
the selection of the CSP is an important one. But note that you might be breaking
backwards compatibility if you’re using older clients (i.e. Windows XP SP2 or lower,
or Windows Server 2003 and lower.) There is a hotfix though: <a title="http://support.microsoft.com/kb/938397" href="http://support.microsoft.com/kb/938397">http://support.microsoft.com/kb/938397</a></p>
        <p>
Once the CA is installed, you should have a root certificate that is valid for 20
years. 
</p>
        <p>
          <strong>Configuring the Root CA</strong>
        </p>
        <p>
The Authority Information Access field in a certificate tells the end user where it
can download a certificate which signed the certificate that you are using. For example,
John sends you a certificate signed by an unknown certificate authority. You see a
signature, but you have no idea who it is… Using a AIA extension you can see where
you can obtain that certificate which placed the signature on John’s certificate.
You download it and you see that it’s issued by a trusted root certificate authority.
Since you trust the root CA, you can trust the signer of John’s certificate and therefore
John’s certificate is valid. (There are more things to consider, but are outside of
the scope of the AIA.) Without an AIA field you could never have verified John’s certificate. 
</p>
        <p>
The problem with an offline computer is that it has no network access. The default
AIA field in certificates the root CA will issue will be the computer name of the
root CA, which is… unreachable. The same story goes for the CRL Distribution point.
The CRL (Certificate Revocation List) is used when certificates are revoked. An OCSP
(Online Certificate Status Protocol) responder on the Root CA itself will also not
work, because of the same reason: no network access. These fields are therefore important
and need to be changed before any certificates are issued. 
</p>
        <p>
CA addresses (AIA and CRL) can contain multiple protocols, but I usually stick to
http. The reason I do this, is because it’s easy to implement, manage, distribute
and why should we make our lives more difficult? This is where the web server comes
in. The CRL and the CA Certificate need to be hosted on a web server which anyone
(internal in the network and outside of the network) has access to. An example:
</p>
        <p>
          <a href="http://www.jeroenlandheer.com/Blog/content/binary/WindowsLiveWriter/DoingEFStherightway_E161/image_2.png">
            <img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://www.jeroenlandheer.com/Blog/content/binary/WindowsLiveWriter/DoingEFStherightway_E161/image_thumb.png" width="423" height="523" />
          </a>
        </p>
        <p>
On the left you see a picture of one of our intermediate CA’s. The CRL distribution
point points to <a title="http://cert.thewheel.nl/rootca/The%20Wheel%20Enterprise%20Services%20Root%20CA.crl" href="http://cert.thewheel.nl/rootca/The%20Wheel%20Enterprise%20Services%20Root%20CA.crl">http://cert.thewheel.nl/rootca/The%20Wheel%20Enterprise%20Services%20Root%20CA.crl</a> and
if you click that link, you’ll get a CRL file. This is a CRL of our root CA, which
is manually copied every month to a web server using an old-style method of either
a floppy or a USB disk. 
</p>
        <p>
To change these extensions you can use the “Certificate Authority” console, right-click
on the server, select properties and select the “Extensions” tab. Next, select the
CRL extension and you’ll see a whole lot of items in the list box below, which can
look quite intimidating, but don’t worry, it isn’t that geeky. 
</p>
        <ol>
          <li>
The extension starting with: “C:\Windows\system32\…” must have “Publish CRLs to this
location” and “Publish Delta CRLs to this location” selected 
</li>
          <li>
Make sure that for the LDAP Extension all checkboxes are unchecked. This is an offline
CA, so there’s no LDAP that we can use. 
</li>
          <li>
The default HTTP extension: “http://&lt;ServerDNSName&gt;/…” can be disabled. Uncheck
all the checkboxes. 
</li>
          <li>
The default FILE extension: “file://&lt;ServerDNSName&gt;/…” can be disabled. Uncheck
all the checkboxes. 
</li>
          <li>
Add a new extension, and type in the following: <strong>“http://myserver.mydomain.com/mysubdirectory/&lt;CaName&gt;&lt;CRLNameSuffix&gt;&lt;DeltaCRLAllowed&gt;.crl”</strong> (Without
quotes, replace “myserver.mydomain.com/mysubdirectory with the address of your own
web server which is everywhere accessible) 
</li>
          <li>
Apply your changes by clicking on the “Apply” button.</li>
        </ol>
        <p>
Now, we’re doing the same thing for the AIA. Select the AIA extension. 
</p>
        <ol>
          <li>
The extension starting with: “C:\Windows\system32\…” does not have any options you
can set 
</li>
          <li>
Make sure that for the LDAP Extension all checkboxes are unchecked. This is an offline
CA, so there’s no LDAP that we can use. 
</li>
          <li>
The default HTTP extension: “http://&lt;ServerDNSName&gt;/…” can be disabled. Uncheck
all the checkboxes. 
</li>
          <li>
The default FILE extension: “file://&lt;ServerDNSName&gt;/…” can be disabled. Uncheck
all the checkboxes. 
</li>
          <li>
Add a new extension, and type in the following: <strong>“http://myserver.mydomain.com/mysubdirectory/&lt;CaName&gt;&lt;CertificateName&gt;.crt”</strong> (Without
quotes, replace “myserver.mydomain.com/mysubdirectory with the address of your own
web server which is everywhere accessible)</li>
        </ol>
        <p>
Next, create an empty directory somewhere on the disk and backup your certificate
authority to this location. Copy this to some removable media (Floppy, USB flashdrive,
etc)  and <u><em>store it in a <strong>very secure</strong> location</em></u>.
If this data gets compromised, your PKI will be worthless and needs to be rebuilt
from scratch. Lastly, we’re going to install the root certificate on all the machines
in the network. (That’s the public certificate, not the private key of course!) 
</p>
        <p>
          <strong>Copying the CA Certificate and the Root CA CRL to another computer</strong>
        </p>
        <p>
First, we need the root certificate, this you can obtain in multiple ways. The easiest
way is to go to %windir%\system32\certsrv\certenroll and copy the files to removable
media. Next, you can put these files (one CRL, one CRT and a ASP file for Netscape(!)
compatibility) This CRT file is the public certificate of you root CA, not a private
key so you don’t have to worry that this contains anything that is worth protecting.
In fact, it’s quite the opposite, the more people/computers who trust that certificate,
the better. 
</p>
        <p>
          <strong>Installing the root certificate on all computers in the Active Directory domain</strong>
        </p>
        <p>
Now it’s time to get to either your domain controller or your own workstation if you
have the group policy management console (GPMC) installed. Open the GPMC, and edit
the default domain policy. Select the following path:
</p>
        <ul>
          <li>
Computer Configuration 
</li>
          <li>
Policies 
</li>
          <li>
Windows Settings 
</li>
          <li>
Security Settings 
</li>
          <li>
Public Key Policies 
</li>
          <li>
Trusted Root Certification Authorities 
</li>
          <li>
Add the root certificate by right-clicking the folder and click “Import” 
</li>
          <li>
Next, open a command prompt and type: “GPUpdate /force” and wait for group policy
to be applied. 
</li>
        </ul>
        <p>
Verify the root certificate is installed by doing the following steps:
</p>
        <ul>
          <li>
Open MMC 
</li>
          <li>
Press Ctrl-M to open the “Add or remove snap-ins” dialog 
</li>
          <li>
Add the “Certificates” snapin 
</li>
          <li>
Choose “Computer account” –&gt; “Local computer” 
</li>
          <li>
Add another instance of the “Certificates” snapin 
</li>
          <li>
Choose “My user account” 
</li>
          <li>
Click on OK 
</li>
          <li>
Expand each certificates node 
</li>
          <li>
Check in the “Trusted root certification authorities” folder if your root certificate
is there. (Both for the user account and for the computer account)</li>
        </ul>
        <p>
If they are both there, congratulations. You’ve done the most difficult step in setting
up a PKI. The rest is easy :)
</p>
        <p>
          <strong>Installing a enterprise subordinate certificate authority</strong>
        </p>
        <p>
Subordinate CAs are CAs that issue certificates to end users. The Root CA doesn’t
do this for several reasons, among which are:
</p>
        <ul>
          <li>
The CA Certificate of the Root CA can never be revoked 
</li>
          <li>
The Root CA is offline, to issue end user certificates from a offline machine is impractical
and a administrator’s nightmare.</li>
        </ul>
        <p>
Therefore, we create a subordinate CA to take away that burden. Subordinate CA’s are
installed on domain controllers. Since we use AD, we can use a enterprise subordinate
CA and use Certificate Templates to fine-tune our PKI. You’ll need Windows Enterprise
Edition on the DC to do this. If you don’t want to use certificate templates (which
is a huge benefit sometimes) you can use standard edition. Note that creating certificates
for auto enrollment (which means kind-of zero administration) will require Windows
Enterprise Edition. My recommendation? Stick with Enterprise Edition, it will save
you a lot of time and effort. If you have a DC installed with Standard Edition, you
can upgrade this DC to Enterprise Edition. (Both for Windows Server 2003 and 2008).
Cross-platform upgrades (i.e. x86 to x64 or vice-versa) are not supported. Only Wipe
&amp; Load migrations or side-by-side migrations are possible. If you can, then this
might be a good time to get to Windows Server 2008 x64, the 2008 R2 edition (and any
future versions of Windows Server) coming in a few months will <em><u>only</u></em> support
x64. (until 128 bit computing is invented and we’re reaching the 2 Exabyte of memory
limitation on a machine ;-)) 
</p>
        <p>
The subordinate CA will be a lot easier to install. Add the CA role and enable web
enrollment option. I recommend using keys of 2048 bits in length for the intermediate
CA. Also here, choose the CSP that best suites your purpose. During the installation
you will be asked for the generation of a certificate request. Save the request to
disk, we’ll be using the request file later for obtaining the certificate at the root
CA. 
</p>
        <p>
Once installed, copy the request file to your USB flash drive or floppy, and bring
it to the root CA. There you can start the web browser and browse to http://localhost/certsrv
and you'll see the website which you can use to request a new certificate. Do the
following steps to obtain a certificate for your new intermediate CA:
</p>
        <ul>
          <li>
Open the certificate authority management console 
</li>
          <li>
Right-click on the CA 
</li>
          <li>
Select All-Tasks –&gt; Submit new request 
</li>
          <li>
Open the request file 
</li>
          <li>
Go to pending requests 
</li>
          <li>
Issue the request 
</li>
          <li>
Go to issued certificates 
</li>
          <li>
Open the issued certificate 
</li>
          <li>
Select the “Details” tab 
</li>
          <li>
Export to a file 
</li>
          <li>
Select the P7B format 
</li>
          <li>
Check “Include all certificates in the certification path if possible” 
</li>
          <li>
Save the file on your removable media</li>
        </ul>
        <p>
Now you have your certificate for your intermediate CA. Next, you need to install
this on your intermediate CA. So you go back to your DC, open the certification authority
snap-in and right-click on the CA. Select “Install CA Certificate” and select the
certificate on your removable media. If everything went OK your new CA is up-and-running. 
</p>
        <p>
Now it’s time to change the extensions, and add some HTTP extensions so that the certificate
and CRL can be downloaded via the web. Finally, make sure that the CA publishes the
CRL at regular intervals to your web server. 
</p>
        <p>
          <strong>Concluding</strong>
        </p>
        <p>
I recommend to have at least 2 intermediate certification authorities running, and
in larger environments, to load-balance the web server for fault tolerance. (Note
that the amount of web traffic is negligible, the goal is fault tolerance, not throughput.)
Make sure that the root CA’s private key is well-guarded and treat this like the most
important business secret. 
</p>
        <p>
If you would be able to factor this number: 
</p>
        <pre>30 82 01 0a 02 82 01 01 00 a9 02 bd c1 70 e6 3b f2 4e 1b 28 
9f 97 78 5e 30 ea a2 a9 8d 25 5f f8 fe 95 4c a3 b7 fe 9d a2 
20 3e 7c 51 a2 9b a2 8f 60 32 6b d1 42 64 79 ee ac 76 c9 54 
da f2 eb 9c 86 1c 8f 9f 84 66 b3 c5 6b 7a 62 23 d6 1d 3c de 
0f 01 92 e8 96 c4 bf 2d 66 9a 9a 68 26 99 d0 3a 2c bf 0c b5 
58 26 c1 46 e7 0a 3e 38 96 2c a9 28 39 a8 ec 49 83 42 e3 84 
0f bb 9a 6c 55 61 ac 82 7c a1 60 2d 77 4c e9 99 b4 64 3b 9a 
50 1c 31 08 24 14 9f a9 e7 91 2b 18 e6 3d 98 63 14 60 58 05 
65 9f 1d 37 52 87 f7 a7 ef 94 02 c6 1b d3 bf 55 45 b3 89 80 
bf 3a ec 54 94 4e ae fd a7 7a 6d 74 4e af 18 cc 96 09 28 21 
00 57 90 60 69 37 bb 4b 12 07 3c 56 ff 5b fb a4 66 0a 08 a6 
d2 81 56 57 ef b6 3b 5e 16 81 77 04 da f6 be ae 80 95 fe b0 
cd 7f d6 a7 1a 72 5c 3c ca bc f0 08 a3 22 30 b3 06 85 c9 b3 
20 77 13 85 df 02 03 01 00 01
</pre>
        <p>
... then Microsoft would have a serious problem. But since they keep their private
key secure, it will be long after the time that this key is valid that the secret
will be revealed, if ever. 
</p>
        <img width="0" height="0" src="http://www.jeroenlandheer.com/Blog/aggbug.ashx?id=478cffb7-096a-4fe3-8faa-e9c215568130" />
        <br />
        <hr />
This website is sposored by <a href="http://www.thewheel.nl">The Wheel Automatisering</a>.</body>
      <title>Doing PKI the right way</title>
      <guid isPermaLink="false">http://www.jeroenlandheer.com/Blog/PermaLink,guid,478cffb7-096a-4fe3-8faa-e9c215568130.aspx</guid>
      <link>http://www.jeroenlandheer.com/Blog/2009/06/06/DoingPKITheRightWay.aspx</link>
      <pubDate>Sat, 06 Jun 2009 20:00:49 GMT</pubDate>
      <description>&lt;p&gt;
I’ll be doing a series of articles about PKI, it’s uses and how to set things up in
a secure and correct manner. Information in these articles is gathered from various
online resources, books and study material. Disclaimer: Though I am confident this
information can be used to securely deploy a PKI even in big enterprises, you can
use this information at your own risk. 
&lt;/p&gt;
&lt;p&gt;
This is the first part of the series, which will talk about setting up a root CA and
it’s subordinate CAs. In the next articles we will talk about using this infrastructure
to secure mail, encrypt files, secure your web servers, using smart cards for Windows
logon and electronically sign your documents. Also, signing macro’s, software, add-ins,
and more will be part of all of this. This article is full with abbreviations, though
each of them should have at least once mentioned their full meaning.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Setting up a Private Key Infrastructure (PKI)&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
A PKI needs the following ingredients:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
One root certificate authority 
&lt;li&gt;
One or more subordinate certificate authorities 
&lt;li&gt;
Active Directory to facilitate in distributing and installing certificates 
&lt;li&gt;
A web server&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;The root CA&lt;/strong&gt; 
&lt;/p&gt;
&lt;p&gt;
The root CA must be installed on a stand-alone machine. &lt;em&gt;This machine must not
be connected to the network at any time.&lt;/em&gt; Start by installing Windows (Standard
Edition recommended), activate Windows &lt;u&gt;by phone&lt;/u&gt;, install the latest service
pack from a CD or DVD. After that, we’ll need to make some preparations for installing
the certificate authority. Make sure the computer name of the machine is unique within
your network, even though it’s an offline machine. 
&lt;/p&gt;
&lt;p&gt;
Create a text file that is called: “CAPolicy.inf”, and put in the following lines: 
&lt;/p&gt;
&lt;pre&gt;[Version]
Signature= "$Windows NT$"
[Certsrv_Server]
RenewalKeyLength=4096
RenewalValidityPeriod=Years
RenewalValidityPeriodUnits=20
[CRLDistributionPoint]
[AuthorityInformationAccess]

&lt;/pre&gt;
&lt;p&gt;
This will ensure that in the root certificate, the AIA and CRL fields are suppressed.
(More about these in a minute.) Place CAPolicy.inf in your Windows directory and install
the CA. Enable the web enrollment option, since we’ll be using the website for creating
certificates later. 
&lt;/p&gt;
&lt;p&gt;
During the installation of a CA, you’ll need to choose a Cryptographic Service Provider
(CSP). Since the root CA (or any CA for that matter) only does signing, no encryption,
the MS Strong CSP is sufficient for keys up to 16K, the enhanced CSP has essentially
the same parameters. When you want to support CNG (Cryptography Next Generation) certificates,
the selection of the CSP is an important one. But note that you might be breaking
backwards compatibility if you’re using older clients (i.e. Windows XP SP2 or lower,
or Windows Server 2003 and lower.) There is a hotfix though: &lt;a title="http://support.microsoft.com/kb/938397" href="http://support.microsoft.com/kb/938397"&gt;http://support.microsoft.com/kb/938397&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Once the CA is installed, you should have a root certificate that is valid for 20
years. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Configuring the Root CA&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The Authority Information Access field in a certificate tells the end user where it
can download a certificate which signed the certificate that you are using. For example,
John sends you a certificate signed by an unknown certificate authority. You see a
signature, but you have no idea who it is… Using a AIA extension you can see where
you can obtain that certificate which placed the signature on John’s certificate.
You download it and you see that it’s issued by a trusted root certificate authority.
Since you trust the root CA, you can trust the signer of John’s certificate and therefore
John’s certificate is valid. (There are more things to consider, but are outside of
the scope of the AIA.) Without an AIA field you could never have verified John’s certificate. 
&lt;/p&gt;
&lt;p&gt;
The problem with an offline computer is that it has no network access. The default
AIA field in certificates the root CA will issue will be the computer name of the
root CA, which is… unreachable. The same story goes for the CRL Distribution point.
The CRL (Certificate Revocation List) is used when certificates are revoked. An OCSP
(Online Certificate Status Protocol) responder on the Root CA itself will also not
work, because of the same reason: no network access. These fields are therefore important
and need to be changed before any certificates are issued. 
&lt;/p&gt;
&lt;p&gt;
CA addresses (AIA and CRL) can contain multiple protocols, but I usually stick to
http. The reason I do this, is because it’s easy to implement, manage, distribute
and why should we make our lives more difficult? This is where the web server comes
in. The CRL and the CA Certificate need to be hosted on a web server which anyone
(internal in the network and outside of the network) has access to. An example:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.jeroenlandheer.com/Blog/content/binary/WindowsLiveWriter/DoingEFStherightway_E161/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://www.jeroenlandheer.com/Blog/content/binary/WindowsLiveWriter/DoingEFStherightway_E161/image_thumb.png" width="423" height="523"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
On the left you see a picture of one of our intermediate CA’s. The CRL distribution
point points to &lt;a title="http://cert.thewheel.nl/rootca/The%20Wheel%20Enterprise%20Services%20Root%20CA.crl" href="http://cert.thewheel.nl/rootca/The%20Wheel%20Enterprise%20Services%20Root%20CA.crl"&gt;http://cert.thewheel.nl/rootca/The%20Wheel%20Enterprise%20Services%20Root%20CA.crl&lt;/a&gt; and
if you click that link, you’ll get a CRL file. This is a CRL of our root CA, which
is manually copied every month to a web server using an old-style method of either
a floppy or a USB disk. 
&lt;/p&gt;
&lt;p&gt;
To change these extensions you can use the “Certificate Authority” console, right-click
on the server, select properties and select the “Extensions” tab. Next, select the
CRL extension and you’ll see a whole lot of items in the list box below, which can
look quite intimidating, but don’t worry, it isn’t that geeky. 
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
The extension starting with: “C:\Windows\system32\…” must have “Publish CRLs to this
location” and “Publish Delta CRLs to this location” selected 
&lt;li&gt;
Make sure that for the LDAP Extension all checkboxes are unchecked. This is an offline
CA, so there’s no LDAP that we can use. 
&lt;li&gt;
The default HTTP extension: “http://&amp;lt;ServerDNSName&amp;gt;/…” can be disabled. Uncheck
all the checkboxes. 
&lt;li&gt;
The default FILE extension: “file://&amp;lt;ServerDNSName&amp;gt;/…” can be disabled. Uncheck
all the checkboxes. 
&lt;li&gt;
Add a new extension, and type in the following: &lt;strong&gt;“http://myserver.mydomain.com/mysubdirectory/&amp;lt;CaName&amp;gt;&amp;lt;CRLNameSuffix&amp;gt;&amp;lt;DeltaCRLAllowed&amp;gt;.crl”&lt;/strong&gt; (Without
quotes, replace “myserver.mydomain.com/mysubdirectory with the address of your own
web server which is everywhere accessible) 
&lt;li&gt;
Apply your changes by clicking on the “Apply” button.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Now, we’re doing the same thing for the AIA. Select the AIA extension. 
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
The extension starting with: “C:\Windows\system32\…” does not have any options you
can set 
&lt;li&gt;
Make sure that for the LDAP Extension all checkboxes are unchecked. This is an offline
CA, so there’s no LDAP that we can use. 
&lt;li&gt;
The default HTTP extension: “http://&amp;lt;ServerDNSName&amp;gt;/…” can be disabled. Uncheck
all the checkboxes. 
&lt;li&gt;
The default FILE extension: “file://&amp;lt;ServerDNSName&amp;gt;/…” can be disabled. Uncheck
all the checkboxes. 
&lt;li&gt;
Add a new extension, and type in the following: &lt;strong&gt;“http://myserver.mydomain.com/mysubdirectory/&amp;lt;CaName&amp;gt;&amp;lt;CertificateName&amp;gt;.crt”&lt;/strong&gt; (Without
quotes, replace “myserver.mydomain.com/mysubdirectory with the address of your own
web server which is everywhere accessible)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Next, create an empty directory somewhere on the disk and backup your certificate
authority to this location. Copy this to some removable media (Floppy, USB flashdrive,
etc)&amp;nbsp; and &lt;u&gt;&lt;em&gt;store it in a &lt;strong&gt;very secure&lt;/strong&gt; location&lt;/em&gt;&lt;/u&gt;.
If this data gets compromised, your PKI will be worthless and needs to be rebuilt
from scratch. Lastly, we’re going to install the root certificate on all the machines
in the network. (That’s the public certificate, not the private key of course!) 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Copying the CA Certificate and the Root CA CRL to another computer&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
First, we need the root certificate, this you can obtain in multiple ways. The easiest
way is to go to %windir%\system32\certsrv\certenroll and copy the files to removable
media. Next, you can put these files (one CRL, one CRT and a ASP file for Netscape(!)
compatibility) This CRT file is the public certificate of you root CA, not a private
key so you don’t have to worry that this contains anything that is worth protecting.
In fact, it’s quite the opposite, the more people/computers who trust that certificate,
the better. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Installing the root certificate on all computers in the Active Directory domain&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Now it’s time to get to either your domain controller or your own workstation if you
have the group policy management console (GPMC) installed. Open the GPMC, and edit
the default domain policy. Select the following path:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Computer Configuration 
&lt;li&gt;
Policies 
&lt;li&gt;
Windows Settings 
&lt;li&gt;
Security Settings 
&lt;li&gt;
Public Key Policies 
&lt;li&gt;
Trusted Root Certification Authorities 
&lt;li&gt;
Add the root certificate by right-clicking the folder and click “Import” 
&lt;li&gt;
Next, open a command prompt and type: “GPUpdate /force” and wait for group policy
to be applied. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Verify the root certificate is installed by doing the following steps:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Open MMC 
&lt;li&gt;
Press Ctrl-M to open the “Add or remove snap-ins” dialog 
&lt;li&gt;
Add the “Certificates” snapin 
&lt;li&gt;
Choose “Computer account” –&amp;gt; “Local computer” 
&lt;li&gt;
Add another instance of the “Certificates” snapin 
&lt;li&gt;
Choose “My user account” 
&lt;li&gt;
Click on OK 
&lt;li&gt;
Expand each certificates node 
&lt;li&gt;
Check in the “Trusted root certification authorities” folder if your root certificate
is there. (Both for the user account and for the computer account)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
If they are both there, congratulations. You’ve done the most difficult step in setting
up a PKI. The rest is easy :)
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Installing a enterprise subordinate certificate authority&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Subordinate CAs are CAs that issue certificates to end users. The Root CA doesn’t
do this for several reasons, among which are:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
The CA Certificate of the Root CA can never be revoked 
&lt;li&gt;
The Root CA is offline, to issue end user certificates from a offline machine is impractical
and a administrator’s nightmare.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Therefore, we create a subordinate CA to take away that burden. Subordinate CA’s are
installed on domain controllers. Since we use AD, we can use a enterprise subordinate
CA and use Certificate Templates to fine-tune our PKI. You’ll need Windows Enterprise
Edition on the DC to do this. If you don’t want to use certificate templates (which
is a huge benefit sometimes) you can use standard edition. Note that creating certificates
for auto enrollment (which means kind-of zero administration) will require Windows
Enterprise Edition. My recommendation? Stick with Enterprise Edition, it will save
you a lot of time and effort. If you have a DC installed with Standard Edition, you
can upgrade this DC to Enterprise Edition. (Both for Windows Server 2003 and 2008).
Cross-platform upgrades (i.e. x86 to x64 or vice-versa) are not supported. Only Wipe
&amp;amp; Load migrations or side-by-side migrations are possible. If you can, then this
might be a good time to get to Windows Server 2008 x64, the 2008 R2 edition (and any
future versions of Windows Server) coming in a few months will &lt;em&gt;&lt;u&gt;only&lt;/u&gt;&lt;/em&gt; support
x64. (until 128 bit computing is invented and we’re reaching the 2 Exabyte of memory
limitation on a machine ;-)) 
&lt;/p&gt;
&lt;p&gt;
The subordinate CA will be a lot easier to install. Add the CA role and enable web
enrollment option. I recommend using keys of 2048 bits in length for the intermediate
CA. Also here, choose the CSP that best suites your purpose. During the installation
you will be asked for the generation of a certificate request. Save the request to
disk, we’ll be using the request file later for obtaining the certificate at the root
CA. 
&lt;/p&gt;
&lt;p&gt;
Once installed, copy the request file to your USB flash drive or floppy, and bring
it to the root CA. There you can start the web browser and browse to http://localhost/certsrv
and you'll see the website which you can use to request a new certificate. Do the
following steps to obtain a certificate for your new intermediate CA:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Open the certificate authority management console 
&lt;li&gt;
Right-click on the CA 
&lt;li&gt;
Select All-Tasks –&amp;gt; Submit new request 
&lt;li&gt;
Open the request file 
&lt;li&gt;
Go to pending requests 
&lt;li&gt;
Issue the request 
&lt;li&gt;
Go to issued certificates 
&lt;li&gt;
Open the issued certificate 
&lt;li&gt;
Select the “Details” tab 
&lt;li&gt;
Export to a file 
&lt;li&gt;
Select the P7B format 
&lt;li&gt;
Check “Include all certificates in the certification path if possible” 
&lt;li&gt;
Save the file on your removable media&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Now you have your certificate for your intermediate CA. Next, you need to install
this on your intermediate CA. So you go back to your DC, open the certification authority
snap-in and right-click on the CA. Select “Install CA Certificate” and select the
certificate on your removable media. If everything went OK your new CA is up-and-running. 
&lt;/p&gt;
&lt;p&gt;
Now it’s time to change the extensions, and add some HTTP extensions so that the certificate
and CRL can be downloaded via the web. Finally, make sure that the CA publishes the
CRL at regular intervals to your web server. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Concluding&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
I recommend to have at least 2 intermediate certification authorities running, and
in larger environments, to load-balance the web server for fault tolerance. (Note
that the amount of web traffic is negligible, the goal is fault tolerance, not throughput.)
Make sure that the root CA’s private key is well-guarded and treat this like the most
important business secret. 
&lt;/p&gt;
&lt;p&gt;
If you would be able to factor this number: 
&lt;/p&gt;
&lt;pre&gt;30 82 01 0a 02 82 01 01 00 a9 02 bd c1 70 e6 3b f2 4e 1b 28 
9f 97 78 5e 30 ea a2 a9 8d 25 5f f8 fe 95 4c a3 b7 fe 9d a2 
20 3e 7c 51 a2 9b a2 8f 60 32 6b d1 42 64 79 ee ac 76 c9 54 
da f2 eb 9c 86 1c 8f 9f 84 66 b3 c5 6b 7a 62 23 d6 1d 3c de 
0f 01 92 e8 96 c4 bf 2d 66 9a 9a 68 26 99 d0 3a 2c bf 0c b5 
58 26 c1 46 e7 0a 3e 38 96 2c a9 28 39 a8 ec 49 83 42 e3 84 
0f bb 9a 6c 55 61 ac 82 7c a1 60 2d 77 4c e9 99 b4 64 3b 9a 
50 1c 31 08 24 14 9f a9 e7 91 2b 18 e6 3d 98 63 14 60 58 05 
65 9f 1d 37 52 87 f7 a7 ef 94 02 c6 1b d3 bf 55 45 b3 89 80 
bf 3a ec 54 94 4e ae fd a7 7a 6d 74 4e af 18 cc 96 09 28 21 
00 57 90 60 69 37 bb 4b 12 07 3c 56 ff 5b fb a4 66 0a 08 a6 
d2 81 56 57 ef b6 3b 5e 16 81 77 04 da f6 be ae 80 95 fe b0 
cd 7f d6 a7 1a 72 5c 3c ca bc f0 08 a3 22 30 b3 06 85 c9 b3 
20 77 13 85 df 02 03 01 00 01
&lt;/pre&gt;
&lt;p&gt;
... then Microsoft would have a serious problem. But since they keep their private
key secure, it will be long after the time that this key is valid that the secret
will be revealed, if ever. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.jeroenlandheer.com/Blog/aggbug.ashx?id=478cffb7-096a-4fe3-8faa-e9c215568130" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This website is sposored by &lt;a href="http://www.thewheel.nl"&gt;The Wheel Automatisering&lt;/a&gt;.</description>
      <comments>http://www.jeroenlandheer.com/Blog/CommentView,guid,478cffb7-096a-4fe3-8faa-e9c215568130.aspx</comments>
      <category>Security and Cryptography</category>
    </item>
  </channel>
</rss>