Skip to content

Instantly share code, notes, and snippets.


Chris Coulson chrisccoulson

View GitHub Profile

Keybase proof

I hereby claim:

  • I am chrisccoulson on github.
  • I am chrisccoulson ( on keybase.
  • I have a public key whose fingerprint is 44DF FFE4 C1A0 08E8 3229 E205 611F BDEC D594 6E0F

To claim this, I am signing this object:

View test_tpmauth.go
// This tests behaviour of authorization value handling. Some things to note
// from the reference TPM implementation:
// - Authorization values for objects are stored padded with trailing zeroes to
// the size of the object's name algorithm.
// - Authorization values for hierarchies and NV indices are stored with trailing
// zeroes removed.
// - EntityGetAuthValue removes trailing zeroes from an entity's authorization
// value, prior to its use in the front end code when comparing comparing it
// against a password session or using it to compute a HMAC key for a HMAC
// session, or in the TPM2_StartAuthSession when computing the session key.