On Wed, Mar 27, 2013 at 11:43:53AM -0400, Kenneth Goldman wrote: > A few comments FWIW > > When I first did TPM 1.2, I stored different parts of the TPM NV data > (permanent data, owner evict keys, defined space) in different files. It got > ugly and I eventually changed to one big blob, This was far more portable, > worked better for real flash memory, etc. It also handles integrity and/or > encryption with less overhead. > > As for encoding, I didn't bother with DER, XML, etc, as the TPM was big enough > without importing complex parsers. The TPM already requires marshalling and > unmarshalling code in its native binary format for command and response > handling, so I just reused that code. I added version numbers and count > values > to handle changes to the format, and a hash to detect corruption. > > -- > Ken Goldman kgold...@us.ibm.com > 914-945-2415 (862-2415)
Yea it's not hard to invent a random format each time we write something on disk. But I think ASN.1 BER will be useful to have in qemu anyway. E.g. it's a better format for migration than what we have now. Once we have it in tree re-using it seems cleaner than maintaining some per-TPM thing. -- MST