trunks: Extract RSA endorsement key from NVRAM

The certificate for endorsement key for TPM2.0 is stored in NVRAM.
The GetPublicRSAEndorsementKey method implemented here allows to
extract the public RSA endorsement key from the certificate. It is
expected to  be used to generate the unique identifier (EID) for
zero-touch enrollment.


Change-Id: I81400a4e628c13cbca863b8d9a1cbe33f503858e
Commit-Ready: Igor <>
Tested-by: Igor <>
Reviewed-by: Andrey Pronin <>
7 files changed