From: Nikos Mavrogianopoulos Subject: Re: Proposal for the ASN.1 form of TPM1.2 and TPM2 keys Date: Mon, 26 Dec 2016 21:13:03 +0100 Message-ID: <671CBF50-E114-4FD1-995A-523C7B63F8D5@gmail.com> References: <1482516363.2501.34.camel@HansenPartnership.com> <1482596030.2316.4.camel@HansenPartnership.com> <1482691491.3394.8.camel@HansenPartnership.com> <1482709652.3394.15.camel@HansenPartnership.com> <1482776020.2430.19.camel@HansenPartnership.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1180162925698381974==" Return-path: In-Reply-To: <1482776020.2430.19.camel@HansenPartnership.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gnutls-devel-bounces@lists.gnutls.org Sender: "Gnutls-devel" To: James Bottomley , Nikos Mavrogiannopoulos Cc: trousers-tech@lists.sourceforge.net, tpmdd-devel@lists.sourceforge.net, David Woodhouse , openssl-dev@openssl.org, GnuTLS development list List-Id: tpmdd-devel@lists.sourceforge.net --===============1180162925698381974== Content-Type: multipart/alternative; boundary="----VOE3CSR9S2016T79HU9700BJIEBCRN" Content-Transfer-Encoding: 8bit ------VOE3CSR9S2016T79HU9700BJIEBCRN Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 My comment was on the claim of extendability of the format which as I explained it is simply not true. As for example I already gave the key usage extension. I am fine however with a non extendable format as you proposed. On December 26, 2016 7:13:40 PM GMT+01:00, James Bottomley wrote: >On Mon, 2016-12-26 at 08:18 +0100, Nikos Mavrogianopoulos wrote: >> I'd like both backwards and forward compatibility actually, exactly >> like x509. If an informational field is added like the key usage that >> I mentioned, I doubt you'd like all the previous consumers >> incompatible. > >OK, so there's a fundamental difference between a v3 X509 certificate >and a TPM key: An X509 certificate is a signature over a set of v1 TBS >data, a public key and a bundle of attributes. To verify the >certificate or extract the key, you don't need to know what the >attributes are, so you can still "use" the certificate in that form. > However, you can't get the v1 tool to obey the v3 constraints on the >certificate because it doesn't understand them. > >The ASN.1 description of a TPM key contains the actual binary >representation of the key plus a set of information which explains to >the consuming code how to use the key. Since I can't think of a way of >making use of the key without understanding all of the information >about how to use it, I think it is beneficial that v1 consumers don't >try to use v2 key information because the resulting failure will excite >the TPM's dictionary attack protection. > >I gave an example of one such extension: policy authorisations, but >they're definitely of the "if you don't understand these, you can't use >the key" variety. Perhaps if you can give an example of a potentially >compatible extensions it would help me to see your point and give us a >means of moving forwards. > >Thanks, > >James > >> For other extensions which make the structure totally incompatible >> you can use the critical flag. Anyway even the original struct is OK, >> it is exactly like any other key structs we have. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ------VOE3CSR9S2016T79HU9700BJIEBCRN Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit My comment was on the claim of extendability of the format which as I explained it is simply not true. As for example I already gave the key usage extension. I am fine however with a non extendable format as you proposed.

On December 26, 2016 7:13:40 PM GMT+01:00, James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
On Mon, 2016-12-26 at 08:18 +0100, Nikos Mavrogianopoulos wrote:
I'd like both backwards and forward compatibility actually, exactly
like x509. If an informational field is added like the key usage that
I mentioned, I doubt you'd like all the previous consumers
incompatible.

OK, so there's a fundamental difference between a v3 X509 certificate
and a TPM key: An X509 certificate is a signature over a set of v1 TBS
data, a public key and a bundle of attributes. To verify the
certificate or extract the key, you don't need to know what the
attributes are, so you can still "use" the certific ate in that form.
However, you can't get the v1 tool to obey the v3 constraints on the
certificate because it doesn't understand them.

The ASN.1 description of a TPM key contains the actual binary
representation of the key plus a set of information which explains to
the consuming code how to use the key. Since I can't think of a way of
making use of the key without understanding all of the information
about how to use it, I think it is beneficial that v1 consumers don't
try to use v2 key information because the resulting failure will excite
the TPM's dictionary attack protection.

I gave an example of one such extension: policy authorisations, but
they're definitely of the "if you don't understand these, you can't use
the key" variety. Perhaps if you can give an example of a potentially
compatible extensions it would help me to see your point and give us a
means of moving forwards.

Th anks,

James

For other extensions which make the structure totally incompatible
you can use the critical flag. Anyway even the original struct is OK,
it is exactly like any other key structs we have.


--
Sent from my Android device with K-9 Mail. Please excuse my brevity. ------VOE3CSR9S2016T79HU9700BJIEBCRN-- --===============1180162925698381974== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Gnutls-devel mailing list Gnutls-devel@lists.gnutls.org http://lists.gnupg.org/mailman/listinfo/gnutls-devel --===============1180162925698381974==--