From 653fde2517c5db12ca8e36a6b1ab399630a31f57 Mon Sep 17 00:00:00 2001 From: salrashid123 Date: Tue, 10 Dec 2024 07:26:33 -0500 Subject: [PATCH] Update README.md --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 62f2bf1..8daf27f 100644 --- a/README.md +++ b/README.md @@ -441,13 +441,16 @@ tpm2_flushcontext -t tpm2_load -C primary.ctx -u key.pub -r key.prv -c key.ctx tpm2_flushcontext -t +## either persist the key to a handle tpm2_evictcontrol -C o -c key.ctx 0x81010002 -# if you have tpm2-tss-engine installed, you can save as encrypted PEM -## or use https://github.com/salrashid123/tpm2genkey -# tpm2tss-genkey -u key.pub -r key.prv private.pem +### or as PEM format file +## to create a TPM PEM formatted file, +## either use https://github.com/salrashid123/tpm2genkey +## or just +tpm2_encodeobject -C primary.ctx -u key.pub -r key.prv -o private.pem -## which formats it as TPM-encrypted PEM: +## this formats it as TPM-encrypted PEM: cat private.pem -----BEGIN TSS2 PRIVATE KEY----- MIICNQYGZ4EFCgEDoAMBAf8CBEAAAAEEggEaARgAAQALAAQAQAAAABAAFAALCAAA