On Fri, 2021-05-21 at 17:12 +0100, David Woodhouse wrote: > On Fri, 2021-05-21 at 08:55 -0700, James Bottomley wrote: > > On Fri, 2021-05-21 at 16:22 +0100, David Woodhouse wrote: [...] > > > We should probably define not just the ASN.1 format but also a > > > URI scheme for referencing objects in NVRAM. A TPMv2 version of > > > https://datatracker.ietf.org/doc/html/draft-mavrogiannopoulos-tpmuri-01 > > > might be a good idea. > > > > I'm not so sure ... the keys are files not tokens and the pkcs11 > > URI doesn't have a file pointer. I suspect the correct way to > > represent them would be to fully represent the key in the URI, > > which sounds like a length explosion. > > Not files, and definitely nothing to do with PKCS#11. > > I meant a URI for referring to keys which are in NVRAM. The kind you > currently use the '//nvkey:' prefix for. > > We should standardise that form, as a URI, so that users can take > that same URI to *any* application and expect it to work. That's > what https://tools.ietf.org/html/draft-mavrogiannopoulos-tpmuri-01 > was doing, for TPMv1.2. I'm not so sure we want to encourage that. The persistent handle space is really limited in TPM 2.0. We just ran into a real world situation where the TPM ran out after a handful. It was an application that loaded files into persistent handles ("because it's easier") and then made use of them ... we're currently fixing it not to use persistent handles because it doesn't need to. James