Summary of call #11
Big thanks to David Garske for helping with making this summary.
Two parts: A. Insights about TPM's future B. Links and resources
A. Insights about TPM's future
Some insights from our call with Ken Goldman about TPM's future
- Seeing a lot of interest in remote attestation.
- Many people want and try to use the NV storage of the TPM
- Make sure a blob is not tampered
- Store a hash
- List of public keys.
-
PKCS 11 API with the TPM for application
- Wifi EAP-TLS PKCS 11 with TPM took 4 months of dev work, very interesting story from Nico Oliver
- Imran Desai welcomed the feedback about the tss2-software PKCS#11 module and asked if there are more things to improve
- EK/EH will be possible to use with password authorization instead of policy, in the next TPM/TCG standard version
- TPM Policies do not hold a secret and do not need to be protected
- The IBM Stack has a set of tools for generating TPM Policies, it only looks more complicated than it is.
B. Links & Resources
1. SLIM Bootloader from Intel
https://slimbootloader.github.io/security/index.html
Daniel Smith - How soon do you lock SMI?
Yah-Wen Ho - After memory init.
- Slim boot has no SMI handlers. By design. Because SMI impacts performance.
-
List of supported platforms
- Generally Intel chipsets for IoT
- Maybe Datacenter Edge in future?
- LakeField support? Not confirmed.
- LakeField is Intel's equivalent to ARM Big/Little
2. RA Server/Client from IBM
https://sourceforge.net/projects/ibmtpm20acs/
Ken Goldman gave us some insights about his RA Server/Client implementation
- 5 years old project, working example
- Server side is the challenge, but when you do it once, then it gets easier
- Client side has one responsibility - perform TPM quote
- Ian Oliver provisioning is also part of this
- Nico Oliver establishing the golden values is also tricky (Author's note: Actually, there was a consensus on this, taking the firmware inside and generating your own golden values seems to be the best solution)
- Ken Goldman has discovered that most attestation services choose a simpler path and take the first attestation as the golden values.
3. Solving PCR fragility on Clevis
https://github.com/latchset/clevis/issues/121
Nico Oliver shared with us his effort to use sealing of the PCRs to solve PCR fragility on Clevis. Very interesting and useful information he has put on GitHub
4. Solving PCR fragility using Seal
https://github.com/osresearch/safeboot/issues/10
Quote: "Another option to reduce PCR fragility is to sign the approved PCRs with the PK and bind the sealed data to that public key. This allows an initrd to apply some logic to select the allowed PCR values." - More in the link above.
5. Unsealing based on a digital signature, by Ken Goldman
Here is an example script that does unsealing based on a digital signature over the approved PCR values, search for "(PCR brittleness solution)"
https://sourceforge.net/p/ibmtpm20tss/tss/ci/master/tree/utils/regtests/testunseal.sh
Thanks, Ken!
Next call - 10am PDT / 8pm EET
We are going back to our usual call time, which is 10am West Coast / 1 pm East Cost. This also allows our German friends like Paul Kissinger to join at 7pm CET and is also more comfortable for Europeans with EET timezone like me and Ian.
RSVP - https://developers.tpm.dev/events/online-call-12
Use the Teams meeting link to join our calls and get all the chat/meetings history.
See you next week! Until then, let's continue the conversation here :)
#MeetupsAnnouncements❤️
👍
💡
👏
😂
Explore More Posts
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
Random Number Generator (TPM2)
1. IntroductionAmong other features, Trusted Platform Modules (TPM) comes with a True Random Number Generator (TRNG) that can be used for various applications including cryptographic purposes. This RNG module serves as the source for randomness for the TPM 2.0 Chip. A RNG module in TPM2 will typically contain the following -
An entropy source and collector
State Register
A mixing func.
There can be two types of calls to the TPM’s Random Number Generator, Internal call and External Call. RNG is capable to provide enough randomness for all the internal calls made. As well as, RNG is capable of providing 32 octets of randomness as per the specification to an external call. Another thing to note here is, each call made to the RNG produces a new value irrespective of the type of call. 1.1 The source of RandomnessThe source of entropy in the TPM is the entropy collector. As the name suggests, entropy collector collects entropy from entropy sources and also removes bias. A TPM2.0 has at least one internal source of entropy. These sources can include noise, clock variations, air movement amongst other events. As depicted in Fig 1.1 the entropy collector provides input to the State Register. 1.2 Stages involved Various algorithms and process supported by TPM calls RNG for unpredictable numbers, which is actually obtained from “RNG Protected Capability”. The “Deterministic Random Bit Generator (DRBG) Protected Capability“ obtains entropy from “Entropy Protected Capability”. Along with Entropy Protected Capability, TPM2_StirRandom() can also gather entropy from other entropy sources within the same TPM. 2. Random Numbers via TPM2 ToolsIf one needs to use TPM’s RNG for other external applications, then TPM2 Tools Command Line tools can be a great option. TPM2 Tools Command : tpm2_getrandom - - hex 16 - - hex : Converts output to hexadecimal 16 : Size in bytes Now, if one wants to have additional randomness, TPM2 Tools provides a convenient utility for this purpose called tpm2_stirrandom. To inject entropy via TPM2_StirRandom() to “Entropy Protected Capability” , we can use some file or use stdin. TPM2 Tools Command : echo -n “some_random_data” | tpm2_stirrandom Note : 128 bytes can only be injected using stdin at once through stirrandom() 3. ConclusionThe TPM2 provides in a sense True Random Numbers for use. These unpredictable numbers are coming from a dedicated hardware, hence can be trusted to be given as input to Crypto Algorithms amongst other applications. TPM2 also uses this for its internal use, and TCG claims it to be as secure as the strongest algorithm that TPM supports. Also, using the RNG is pretty straight forward via TPM2 Tools. #Tutorials



Comments
Start the Conversation