tpm.xml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <PAGE>
  2. <INCLUDE file="inc/header.tmpl" />
  3. <VAR match="VAR_SEL_FEATURES" replace="selected" />
  4. <VAR match="VAR_SEL_FEATURE_TPM" replace="selected" />
  5. <PARSE file="menu1.xml" />
  6. <PARSE file="menu2-features.xml" />
  7. <INCLUDE file="inc/content.tmpl" />
  8. <h1>Trusted Platform Module (TPM) support</h1>
  9. <p>OpenConnect supports the use of private keys secured or "wrapped"
  10. by a TPM. Instead of being stored inside the trusted hardware as with
  11. typical PKCS#11 keys, the key is encrypted by the TPM and handed back
  12. to the user to be saved in a PEM file. Only the same TPM can decrypt
  13. the file, and use the private key.</p>
  14. <p>Use of TPM-wrapped keys is intended to be entirely
  15. transparent. OpenConnect will automatically use the TPM when presented
  16. with an appropriate PEM file with a TPM-wrapped key.</p>
  17. <p>When OpenConnect is built with OpenSSL, the appropriate TPM ENGINE
  18. must be installed correctly on the system, and OpenConnect will load
  19. and use it automatically when appropriate.
  20. </p>
  21. <p>For GnuTLS builds of OpenConnect, it needs to have been built with
  22. the appropriate TPM (v1 or v2) support built-in.</p>
  23. <h2>TPM v1</h2>
  24. <p>TPM v1 wrapped keys appear in the form of a PEM file marked with the tag:
  25. <pre>-----BEGIN TSS KEY BLOB-----</pre>
  26. These files can be created by the <tt>create_tpm_key</tt> tool which is
  27. part of the
  28. <a href="https://github.com/mgerstner/openssl_tpm_engine">OpenSSL
  29. TPM ENGINE</a> or the <a href="https://www.gnutls.org/manual/html_node/tpmtool-Invocation.html">tpmtool</a> which is part of the GnuTLS distribution.</p>
  30. <h2>TPM v2</h2>
  31. <p>As from the 8.0 release, OpenConnect supports TPM v2 wrapped keys.
  32. These have the PEM tag:
  33. <pre>-----BEGIN TSS2 PRIVATE KEY-----</pre>
  34. There are two ENGINE implementations for TPM v2 with OpenSSL,
  35. based on different TSS libraries.</p>
  36. <p><a href="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/openssl_tpm2_engine.git/"><tt>openssl_tpm2_engine</tt></a> is based on <a href="https://sourceforge.net/projects/ibmtpm20tss/">IBM's TPM 2.0 TSS</a>, while
  37. <a href="https://github.com/tpm2-software/tpm2-tss-engine"><tt>tpm2-tss-engine</tt></a> uses the
  38. <a href="https://github.com/tpm2-software/tpm2-tss">Intel/TCG stack</a>. OpenConnect can use
  39. either ENGINE.</p>
  40. <p>
  41. The GnuTLS build of OpenConnect can use either TSS library, with TPMv2 support
  42. implemented natively in OpenConnect. GnuTLS does not have its own TPMv2 support yet
  43. (<a href="https://gitlab.com/gnutls/gnutls/-/issues/594">GnuTLS issue #594</a>).
  44. </p>
  45. <h3>Creating / importing keys</h3>
  46. <p>
  47. Each of the above-referenced OpenSSL ENGINE implementations comes with a tool to
  48. create keys in the appropriate format.
  49. </p>
  50. <p>
  51. The <tt>create_tpm2_key</tt> tool from the IBM version can be used to 'wrap' existing
  52. keys, using its <tt>-w</tt> option. To take an existing key file and encrypt it for
  53. use by the TPM, for example:
  54. <ul><li><tt>create_tpm_key -w key_file.pem tpm_key.pem</tt></li></ul>
  55. Presumably you would then delete the original key file, since having the private key
  56. protected by the TPM is a bit pointless if you just leave it lying around on disk
  57. anyway.
  58. </p>
  59. <p>
  60. The Intel version does not support importing existing keys; this is
  61. <a href="https://github.com/tpm2-software/tpm2-tss-engine/issues/39">tpm2-tss-engine issue #39</a>.
  62. </p>
  63. <h3>Legacy TPMv2 key format</h3>
  64. <p>Older keys from <tt>openssl_tpm2_engine</tt> may have the tag:
  65. <pre>-----BEGIN TSS2 KEY BLOB-----</pre></p>
  66. This format is also supported by the GnuTLS builds of OpenConnect.
  67. <INCLUDE file="inc/footer.tmpl" />
  68. </PAGE>