3

I'm using openssl on linux to generate a certificate signing request (CSR) that will be submitted to a Windows Certificate Services Certification Authority that has been configured to archive private keys.

Unfortunately, I can't figure out how to use openssl to generate a CSR that includes the private key so that the CA can both issue my cert and archive the private key.

Edit: Based on this Microsoft Documentation, it looks like what I'm trying to do is generate a CSR using the CMC format, which is what allows the private key to "go along" with the request for archival.

From that link:

One of the formats the certificate request uses is the CMC format for certificate requests, which supports an optional encrypted data payload. This is the format required for certificate requests with private key archival. Technically, any client that supports the CMC protocol may enroll with an Enterprise CA and request that the private key be archived by the CA.

Yet More Findings:

The combination of these two links (one, two) is how you would do it using Microsoft's certreq utility. I've tested it and it works. I'd like to do this with openssl, if possible.

7
  • Just out of curiosity, What are you doing on Linux that would make you need to recover the keys?
    – Zoredache
    Aug 26, 2013 at 23:24
  • Installing a service that encrypts data that MUST be retrievable, even if the private key is lost because the hard disk catches on fire. The service is not under my control. I can tell the service provider to make sure they backup their private key somewhere safe, but if they don't, and something happens, I must be able to retrieve the encrypted files. The only solution I know of for this is key archival.
    – John Ruiz
    Aug 26, 2013 at 23:56
  • 1
    I just put private keys in a safe deposit box. Aug 27, 2013 at 0:04
  • Unless it's this safe deposit box, Uncle Sam isn't having that.
    – John Ruiz
    Aug 27, 2013 at 0:13
  • 1
    But before you put the private keys in a safe deposit box, you must retrieve them. That's easy enough, but I think that John is really looking for a way to automate that retrieval so his team doesn't need to go in and grab each key every single time or doesn't need to rely on the user to deliver the private key. Aug 27, 2013 at 0:43

1 Answer 1

6

Stop. You're doing it wrong.

A private key is called private for a reason. It is private. It is not to be shared with any third party, not even a certificate authority. It does not need it to sign the CSR and has no business whatsoever knowing it.

7
  • 1
    That's a cute notion, but in a real PKI environment, users are going to lose their private keys. If there's no mechanism for key recovery, any encrypted data will be permanently lost. That's why Microsoft includes the feature in AD CS.social.technet.microsoft.com/wiki/contents/articles/…
    – John Ruiz
    Aug 26, 2013 at 21:31
  • 1
    Oh wow, that's incredibly broken. In a real,secure, PKI environment, it's easy to generate and enroll a new key. Not to completely undo the benefits of asymmetric cryptography by storing private keys centrally... And valuable data is backed up. By sysadmins who don't lose their private keys. Aug 26, 2013 at 21:37
  • 1
    Remember that PKI is as much (or more) about policy than technology. Just because I generate and enroll a new key doesn't mean that my users will be able to use that to get at data encrypted with their old key. Moreover, I work in a non-commercial environment in which designated key recovery agents must be able to recover keys and information in the event that - say - an end-user is... no longer available? A SRS business PKI environment, where it's security for the overall environment, not security for the end-user.
    – John Ruiz
    Aug 26, 2013 at 21:43
  • 1
    That's why good sysadmins do not rely on users. Users will lose their data, encrypted or not. So you make backups. Aug 26, 2013 at 21:50
  • 4
    Now how does that improve "security for the overall environment, not security for the end-user"? Fix your backups and you won't need to do asymmetric encryption wrong. Aug 26, 2013 at 21:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .