Word – Microsoft Word and digital signatures using PGP

digital-signaturemicrosoft wordpgp

I have a document for a project that I am working on with my team, and I need to digitally sign the document in a way that can be verified by other members of the team. The catch is, internally, we are using PGP (the commercial version, I think). It appears that, for all intents and purposes, PGP is wholly incompatible with any of Microsoft Office's built-in digital signature functions. Ditto for Adobe Acrobat.

This is baffling, because PGP is a defined RFC, 4880, so I would imagine that it is possible for MS to integrate SOME kind of support for either X.509 or PGP. Signing a document using the external PGP software, however, produces a stand-alone *.sig file that has to tag along with the original document for anyone to be able to verify its authenticity. Since I have multiple people that need to digitally sign this document, I have no idea if this means I would need to manage one *.sig for each signee, or if a single *.sig file can hold multiple signatures by different signees.

Is there a solution of some kind that can allow me to digitally authenticate/verify Word or PDF documents using PGP keys amongst members of a team? It'd be great if there is something that can leave a visual mark within the document itself, too.

I figured that if there was a way to export an X.509/PKCS-12 certificate based off of a public PGP key, and then store that certificate in Windows' internal certificate store (certmgr), then maybe I could get Office to pull from that. But this appears to be impossible. I mean, aren't both technically bog-standard PKI certificates?

Assume that each signee has their own PGP keypair with passphrase and that there is an internal PGP keyserver that everyone can sync to.

Thoughts?

Best Answer

It appears that, for all intents and purposes, PGP is wholly incompatible with any of Microsoft Office's built-in digital signature functions. Ditto for Adobe Acrobat.

That is right. You will have to use X.509 instead – see below.

This is baffling, because PGP is a defined RFC, 4880

The fact that PGP is RFC-defined means nothing here – X.509 has more RFCs (1422 and 5280 being the primary ones), all of them based on several ITU-T standards (which is where the "X.509" name comes from).

It is very widely used in TLS (SSL), S/MIME (email), code signing (Authenticode, Java, Android, iOS), document signing (AdES), and so on. Even many governments use X.509-based PKI and issue "qualified" certificates having the same legal status as a handwritten signature. In Office 2010, XAdES-format digital signatures were added to help with that.

so I would imagine that it is possible for MS to integrate SOME kind of support for either X.509 or PGP.

Both Microsoft Office and Adobe Acrobat do in fact use X.509 certificates – any certificate in your Windows certstore can be immediately used in Office (provided, of course, that it has a private key stored and the proper usage bits enabled). In Office 2007, this is under Office → Prepare → Digital signature.

Word 2007 screenshot

Adobe Reader lists Windows certificates under "Digital IDs → Windows Digital IDs" in the *Edit → Protection → Security Settings" menu.

I figured that if there was a way to export an X.509/PKCS-12 certificate based off of a public PGP key, [...] But this appears to be impossible. I mean, aren't both technically bog-standard PKI certificates?

No, they aren't. The only thing OpenPGP and X.509 have in common is their usage of cryptographic algorithms: RSA, DSA, SHA, et cetera; otherwise they are completely independent. The term "PKI" usually only covers X.509.

It's technically possible (and often quite easy) to re-use the key material – for example, take the RSA parameters of a PGP keypair to create an X.509 certificate. But this will not make them interchangeable:

  • PGP and X.509 use very different trust models – PGP is based on web of trust, while X.509 is hierarchical and requires the certificate to be signed by a single authority, so the key trust you have built up from key signatures simply won't carry over.

  • In addition, they store different user-visible information, starting with the basic "Subject" of Mantas M. <grawity@gmail.com> versus /C=LT/O=Example Company/OU=Users/CN=Mantas M. for example. (This may be related.)

In other words, converting a PGP cert to an X.509 cert achieves nothing more than increase the security risk (due to reusing the cryptographic key instead of generating a fresh one.)

Related Question