
In the discussion following William Roberts' presentation the other day, Ken Goldman gave a brief overview...
In the discussion following William Roberts' presentation the other day, Ken Goldman gave a brief overview of the differences between the attestation identity key (AIK) that is a part of the TPM 1.2 specification, and the attestation key (AK) that is a part of the TPM 2.0 specification. There are many differences between the two keys, but many similarities as well. A question that has been posed by Ian Oliver and Dimitar Tomov, as I am interpreting it, is what the value in the TPM 2.0 AK is now.
The TPM 1.2 AIK was a key with a very limited use. Although it has been a while since I reviewed the 1.2 specification, my recollection is that the AIK was a signing key that could really only sign three structures: it's own "binding" (generated during the same process that generated the key), quotes, and object certifications. Even under the 1.2 specification, other signing keys could be used to sign quotes and (some) object certifications. The highly limited key usage led to quite a bit of frustration. One of the problems I encountered was difficulty in working with people who manage existing PKI infrastructures. Specifically, the problem is that the AIK cannot be wrapped in a normal PKCS#10 request due to its usage restrictions preventing the "proof of possession" signature. I created my own Privacy CA to side-step that issue, but it was far from a professional product and as such encountered resistance to adoption.
What the AIK does provide is a well-designed process to establish the key's relationship to the EK. This can either be done with a privacy-preserving method (as implied by the name "Privacy CA"). or with a multi-step method that an enterprise might want to use to explicitly demonstrate the link to the EK. Why would anyone want to do this? The TPM specifications are public, and establish all of the structures, processes, and expectations of the API. Creating a "fake" TPM is a fairly straightforward processes--in fact there are great templates to do this in the form of software TPMs. Someone trying to subvert a process protected by a TPM quote could pretend to be a TPM from the very beginning of the provisioning process and continue this through generation of fake quotes, with falsified PCR values, signed by a fake AIK. The makeIdentity/activateIdentity process links an AIK to an EK, with the assumption that the TPM enforcing the rules is actually following the rules.
How do you know an TPM is following the rules, i.e. the TPM specification? The TPM is a black box, and most of your communication with one is done through a blind process: you get to send and receive messages, and you can draw conclusions based on those messages and not much else. However, most hardware TPMs come with an EK certificate, signed by the TPM vendor. (This wasn't true early on, but especially now that Microsoft requires an EK certificate for a device to gain Windows 10 "logo" compliance, it has essentially been universal for a while.) This EK certificate does a couple of things. For one, it is a statement that the entity which can utilize the private key associated with the public key in the certificate is a genuine TPM. It is also a "contract," of sorts, from the TPM vendor that the referenced TPM does follow the TPM specification. This is how you know that it follows the rules.
The TPM specification is not only important in establishing that a given AIK represents the TPM with a given EK, but it also governs the usage of the restricted AIK. When the Privacy CA issues an AIK certificate, it is issuing its own statement that the key is an AIK, on a TPM that it has established (by linking to the EK and examining the authenticity of the EK certificate) is genuine, and will follow all of the proper restrictions that the TCG laid out for the AIK in the TPM specification. When a quote is signed with an AIK, and that signature is verified using the AIK certificate, the verifier can be assured that the quote is not a fake. When the TPM uses a signing key other than an AIK to sign a quote, the same cannot be said.
So what about TPM 2.0? The AK (no 'I') is the thematic successor to the AIK, but without the same set of restrictions. The AK can sign all sorts of things. Other signing keys can sign almost anything that the AK can sign. The AK is a "restricted" signing key, however. "Restricted" has a different meaning in 1.2 and 2.0. In 1.2 it meant that there was only a small set of TPM functions which were allowed to use the key for signing. In 2.0, the approach is different. Sensitive structures generated by the TPM--structures that you really don't want to have falsified--are defined to always begin with a well-known "magic" value, which is just a very specific value defined in the TPM specification. Only these TPM-generated values begin with this magic value. It is unlikely that you would ever encounter a blob of data in the wild that would also begin with that magic value. TPM 2.0 restricted keys cannot be used to sign any data beginning with the magic value unless the TPM knows that it is the entity that generated that data. The functions used for quote and certify (and all others that generate sensitive data) take care of obtaining the signature themselves to comply with this purpose. The general "sign" function, however, will absolutely not sign any data with a restricted signing key if it begins with a magic value. But because the sign function can take a hash of the data as a parameter, it is unable to see whether or not the magic value is present. Therefore, the TPM 2.0 also provides a hash function which will hash any data that doesn't begin with the magic value. That hash function will return not only the hash, but also a "ticket." The sign function will sign any hash with a restricted key as long as that hash is accompanied by a valid, matching ticket. This complexity is what allows the TPM 2.0 to have restricted keys, but also allow those keys to sign arbitrary data (i.e. data that has no meaning to the TPM itself).
The TPM 2.0 no longer has the 1.2's makeIdentity/activateIdentity process, but it does have a thematic successor in the makeCredential/activateCredential process. This effectively links an AK back to an EK--any EK, as TPM 2.0's algorithm agility allows for several, and most TPMs come with at least two that have vendor-signed EK certificates. The same meaning can be derived from 2.0 EK certificates, in that you know that the entity in question is not only a genuine TPM 2.0, but also comes with the word of the TPM vendor that it meets the specification and follows the rules. Yes, you can sign almost anything on the TPM using a non-AK signing key. However, the AK's status as a restricted signing key allows it to be tied back to an EK and hold more meaning when signing sensitive TPM-generated data. This is not only critical for quotes, but also for the certify process.
I've been working with 802.1ar DevID recently. An IDevID (initial) key is a non-restricted signing key, generated by a device manufacturer, and should be accompanied by an IDevID certificate signed by that manufacturer. An enterprise may want to generate an LDevID (local) with a different key. If both of these keys (IDevID and LDevID) are protected by the same TPM (specifically, can show that it has the "fixedTPM" attribute), then an enterprise CA can confidently issue an LDevID certificate that contains similar info as the IDevID certificate, which includes the device serial number. An AK can sign object certify structures that can testify to attributes such as fixedTPM and secureDataOrigin, and this structure is TPM-generated and starts with the magic value.
Why LDevID? Often, large enterprises will issue their own ID number to devices that are in their inventory. An LDevID can contain that ID number, and help distinguish between their devices and just any other legitimate device that isn't theirs. This could be helpful in a BYOD environment, or even in an environment that wants to avoid BYOD. A DevID can be used with 802.1x, which can be used with WPA2-enterprise authentication, and even EAPoL for wired connections. Performing 802.1x with a TPM key can make use of PKCS#11 and OpenSSL engines, which is what drew me to the talk the other day.
I hope this helps explain my take on AIK/AK and restricted keys. I am always learning about TPMs and love finding out when I'm wrong. Please hit me up with questions and corrections!
#Tutorials👍
1❤️
👍
💡
👏
😂
Explore More Posts

Infineon lifts the veto on 9678 and I added back the information to our PQC Readiness page in our TPMdev tutorials - https://github.com/tpm2dev/tpm.dev.tutorials/blob/master/PQC/pqc-ready-tpm.md
#TPMDEV2026 Registration is now open. Online seats are limited (not a joke, streaming capacity). Secure your spot by registering today - https://events.zoom.us/ev/At5hYcw-lZoyOdB5W0MEy8olBvqgyR47DA3r7yptfWG5xHDZ2Y3V~AtG0Iepwg5qMqLJOT7QHCwcl7aai2M3qEMQYdmAof_9bJbjErQlhygjd5A
The latest tpm2-tools 5.8 release addresses three GitHub security advisories. One is a heap overflow in tpm2_getekcertificate, and the other is an out-of-bounds write that happens when too many sessions are in use. I don’t have information on the third advisory. Beyond the fixes, 5.8 extends EK certificate handling. It adds the option to read EK certificates from NV RAM, introduces new EK templates and supports a marshaled quote format. https://github.com/tpm2-software/tpm2-tools/releases/tag/5.8


Comments
Start the Conversation
THanks Chris Hawkins ! Much appreciated answer.
Thank you Chris Hawkins ! This explains very well the legacy between AIK and AK. I am still confused about can we use a restricted signing key(AK) for TPM2_RSA_Decrypt. …more
I guess I didn't make it clear that the difference between using a restricted key and a non-restricted key to sign the Certify structure is all about the fact that the Certify structure starts with the magic …more