[lamps] Re: WGLC for draft-ietf-lamps-csr-attestation-18

Michael StJohns <msj@nthpermutation.com> Fri, 09 May 2025 13:35 UTC

Return-Path: <msj@nthpermutation.com>
X-Original-To: spasm@mail2.ietf.org
Delivered-To: spasm@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id A26F426D794C for <spasm@mail2.ietf.org>; Fri, 9 May 2025 06:35:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=nthpermutation-com.20230601.gappssmtp.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QywL-Qi4FG5u for <spasm@mail2.ietf.org>; Fri, 9 May 2025 06:35:39 -0700 (PDT)
Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id 7783826D7945 for <spasm@ietf.org>; Fri, 9 May 2025 06:35:39 -0700 (PDT)
Received: by mail-qt1-x82c.google.com with SMTP id d75a77b69052e-476a304a8edso23363431cf.3 for <spasm@ietf.org>; Fri, 09 May 2025 06:35:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nthpermutation-com.20230601.gappssmtp.com; s=20230601; t=1746797739; x=1747402539; darn=ietf.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=PH9u5bXngBhjpysLBKiSZiB9pmmpG8P677JTxU/r21A=; b=OQcsh3PW5Wf+F+bdxek0rhydpwU8W5jE6dx7LEfCnRR5ad6Ehymc4AoJWLxVzDRCLd 6zcXRctXssXOCNLKFu6GviIVXxtuKyW64OxS2OQvVvWooAQGXjplYzrCFvFT441ATkf0 my6UXp0VoaJpjtkt9e5/o35bXsevV+yjgWlV3MABGA96W+WyW6jvQdtB/uCpG/dgxOmo 5AngnDJWISh9+om5JHgIEGxWBAFMH+xZtFs7cKyn5a304xsHK/yU5v1i9jnaAzIdzHit sN3KTi43LfrBqhsYSkNQD+mfFXFEJN8LyY/0wj9ooCZI9YyvuLx0nT9kQPhHfJH0A0H3 Jzmg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746797739; x=1747402539; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=PH9u5bXngBhjpysLBKiSZiB9pmmpG8P677JTxU/r21A=; b=Prsd1KatJR6btwPyLLmT8fkmYeGT6HNuwSE33VevnMpJ+YJcv6rQFlhtu3YqHGEjSh 0jgHfiunfyfRpmlbfzJUrZ3ERBcoLgRnpQFD557vYRcfqTbBX76jzLFueiBgJ9Opp6AB wjT6Tb1UuplsNbRMXWwN6Eeg1PCP4Ht4EHHe0KPVHDv4ggucB9fBDTfAU+17C8WI0WXJ /UJMHZwR8me+FA1mQBRjSmDNeKEebWPFP00IWVdWD0+a236CR0q0ZbjLXTMz2cLOyMVo IE44O9/xzV5Dq8OR+1c/edqsWMISEi1udhVNu1nTgZ7XIuOwgxisRcVjEQKD/Z58u+Y3 n1Mg==
X-Gm-Message-State: AOJu0YyXC0rrOURJ7pHF+bMdd+jc78GJi5Xii/+UbH/dUEvP238TvSDn DjUGut7CvOzqhbb32N/U4zygXFZWO1yYX6/Qq+4j+3+krWdSOOpjzLFaHiYBHKU=
X-Gm-Gg: ASbGnctux8WyBn+at/dzmCQ98WNppCz837AfGRSf5pNTEQX3U/GJq1RWBcFXXW80pvC Ltzm6VpMg1whZ59QIlOC567nvMJmc5JnC24VVi3BA9qz+3NAjg/rvoLoXJL3PK0TPT2O1Yc/fIo d0CLCjJQWgphKG5MI+URK0QE1MpzPNa3yH0hQf5TwHa3/UkoaF0MgQM8LkNCMg3MyL2Ep3113sg TsFxEEeMVpRhlqgQcEwGqBlwstriHMqeEdnI2otVc2jMqX7yrewA+breXh0PXgODuVRQuaZsBGe mLN1mrzM4aDX+5nr2UhL84EfJ2nuPVakQEYSDC+bXyG6Wh71R3kGFnpmqW318MkarFo+U/J1HnO wIqtTvyAniJUqXiP8
X-Google-Smtp-Source: AGHT+IHuBF07tRalcqx7hS88ncteqysrT6/pb8ckzqh3haYyv7GrMX0H9b70pi8x3Ol8HE9hobjlIQ==
X-Received: by 2002:a05:622a:d2:b0:48e:24a6:e05e with SMTP id d75a77b69052e-494527d805fmr44679281cf.38.1746797738840; Fri, 09 May 2025 06:35:38 -0700 (PDT)
Received: from [192.168.1.10] (pool-108-48-44-44.washdc.fios.verizon.net. [108.48.44.44]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4945248a8e1sm12716511cf.25.2025.05.09.06.35.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 May 2025 06:35:38 -0700 (PDT)
Content-Type: multipart/alternative; boundary="------------5PmzFd2K8dMMwIlg09C8yHI7"
Message-ID: <e90cb216-7dfe-45ba-9acf-f48f1fe9ab9f@nthpermutation.com>
Date: Fri, 09 May 2025 09:35:36 -0400
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Carl Wallace <carl@redhoundsoftware.com>, Russ Housley <housley@vigilsec.com>
References: <07795EC6-BE7E-40D9-A860-B53A268D69CB@vigilsec.com> <9c438de1-bec9-4bb4-b1d0-589163cec00c@nthpermutation.com> <73616952-97F4-47A5-8C2F-55B966CE181F@vigilsec.com> <CANeU+ZCd9Gn6BTn+qFQD=-9LnLN=sdzVOrjhm3hZ-a2nV372Vg@mail.gmail.com> <be09bb1c-ea20-46ac-87e5-f1ddff20ccbf@nthpermutation.com> <61A2DB74-C4D5-43B4-A36D-F7FF60938ECA@vigilsec.com> <0f3a638c-9027-4e07-a05c-0fe694d5da8b@nthpermutation.com> <990CA506-7234-43C9-A17B-D58F172438E8@vigilsec.com> <b4070217-b202-4316-9cc6-da65a71b9b06@nthpermutation.com> <C739F158-05E2-4628-BBAC-61F2757DF268@redhoundsoftware.com> <44e208db-fbff-4b0e-b3ef-375666224a18@nthpermutation.com> <6fc0d991-eb81-469d-af2d-f9b4f8a578fe@nthpermutation.com> <4B372042-E865-418A-A0A2-EEC68A712BF5@redhoundsoftware.com>
Content-Language: en-US
From: Michael StJohns <msj@nthpermutation.com>
In-Reply-To: <4B372042-E865-418A-A0A2-EEC68A712BF5@redhoundsoftware.com>
X-Antivirus: Norton (VPS 250505-6, 5/5/2025), Outbound message
X-Antivirus-Status: Clean
Message-ID-Hash: 5RTTLJZKLIVYFKZSIBIINLZZN6U2MQAT
X-Message-ID-Hash: 5RTTLJZKLIVYFKZSIBIINLZZN6U2MQAT
X-MailFrom: msj@nthpermutation.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-spasm.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: spasm@ietf.org
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [lamps] Re: WGLC for draft-ietf-lamps-csr-attestation-18
List-Id: This is the mail list for the LAMPS Working Group <spasm.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/ZefamB9alLzu038MnkkJFrs1XTY>
List-Archive: <https://mailarchive.ietf.org/arch/browse/spasm>
List-Help: <mailto:spasm-request@ietf.org?subject=help>
List-Owner: <mailto:spasm-owner@ietf.org>
List-Post: <mailto:spasm@ietf.org>
List-Subscribe: <mailto:spasm-join@ietf.org>
List-Unsubscribe: <mailto:spasm-leave@ietf.org>

Hi -

I think you're confused about ASN1 syntax as it applies to classes.  I 
was for a long time.   Let me try this again, stealing the stuff the 
edits Russ did and editing a few field names to make things a bit more 
clear.

EVIDENCE-STATEMENT ::= CLASS {
   &esTypeId          OBJECT IDENTIFIER UNIQUE,
   &ESStmtType,
   &auxPresent ParamOptions DEFAULT absent,
   &AuxType    OPTIONAL
} WITH SYNTAX {
   &ESStmtType IDENTIFIED BY &esTypeId
   [AUX TYPE &AuxType IS &auxPresent]
}

EvidenceStatement ::= SEQUENCE {
    oid EVIDENCE-STATEMENT.&esTypeId({EvidenceStatementSet}),
    stmt EVIDENCE-STATEMENT.&ESStmtType({EvidenceStatementSet}{@oid}), 
-- type is chosen from the &ESStmtType in
-- the EVIDENCE-STATMENT containing the object identifier in the oid field
    aux EVIDENCE-STATEMENT.&AuxType({EvidenceStatementSet}{@oid}) 
OPTIONAL } -- ditto for &AuxType - from the same EVIDENCE-STATEMENT used 
for stmt

The above compiles.  I edited the various names so there was no 
confusion between things like &Type and type.

The &AuxType *does* appear in the encoding... optionally.   
EVIDENCE-STATEMENT.&AuxType.  The specific type chosen is from the 
EvidenceStatementSet indexed by the value of the oid field.

Later, Mike



On 5/9/2025 8:22 AM, Carl Wallace wrote:
>
> I think you have amended your example to make my point. The StmtType 
> value appears in the encoding and the AuxType does not. I am 
> suggesting it should if we need flexibility for the hint type.
>
> *From: *Michael StJohns <msj@nthpermutation.com>
> *Date: *Friday, May 9, 2025 at 7:53 AM
> *To: *Carl Wallace <carl@redhoundsoftware.com>, Russ Housley 
> <housley@vigilsec.com>
> *Cc: *<spasm@ietf.org>
> *Subject: *Re: [lamps] Re: WGLC for draft-ietf-lamps-csr-attestation-18
>
> Oops s/&Aux/&AuxType/ and 
> s/EvidenceStatmentSet.aux/EvidenceStatementSet.auxType/ or something 
> like that.   Note that &Type could be changed to &StmtType for clarity 
> and to be clear that its not the same item as @type or type.
>
> On 5/9/2025 7:46 AM, Michael StJohns wrote:
>
>     Hi Carl -
>
>     It's actually
>
>     EvidenceStatement ::= SEQUENCE {
>
>       type EVIDENCE-STATEMENT.&id({EvidenceStatementSet}),
>
>       stmt EVIDENCE-STATEMENT.&Type ({EvidenceStatementSet){@type}),
>
>       aux EVIDENCE-STATEMENT.&Aux ({EvidenceStatementSet){@type}) OPTIONAL
>
>     }
>
>     or in old-speak
>
>     EvidenceStatement ::= SEQUENCE {
>
>       type OBJECT IDENTIFIER,
>
>       stmt ANY IDENTIFIED BY type,
>
>       aux  ANY IDENTIFIED BY type OPTIONAL
>
>     }
>
>     In other words, the object identifier provides the lookup index -
>     type -  into two different tables - the  EvidenceStatementSet.stmt
>     table and the EvidenceStatementSet.aux table to choose the types
>     for two different fields.  The variable type of the aux field is
>     indicated by the type, just like the variable type of the stmt field.
>
>     So
>
>     MikesStatement EVIDENCE-STATMENT ::= {
>
>         MikesEvidence IDENTIFIED BY MikesId AUX TYPE MikesAux IS present }
>
>     is a concise way of defining an evidence statement as
>
>     MikesStatement ::= SEQUENCE {
>
>        type OBJECT IDENTIFIER (MikesId),
>
>        stmt MikesEvidence,
>
>        aux MikesAux
>
>     }
>
>     For the folks that want to use hint - just specify "IA5String" (or
>     one of the more specific versions I provided for the hint
>     definition) where I specified "MikesAux" as there's no default
>     type currently defined in the CLASS definition.
>
>     Seems pretty clear to me.
>
>     So lets just avoid the fear mongering phrases like "interop
>     nightmare" please?
>
>     Later, Mike
>
>     On 5/9/2025 6:06 AM, Carl Wallace wrote:
>
>         I may have missed a turn or two in this thread, but I think
>         it’s the case that we went from this
>
>         EvidenceStatement ::= SEQUENCE {
>
>         type EVIDENCE-STATEMENT.&id({EvidenceStatementSet}),
>
>         stmt EVIDENCE-STATEMENT.&Type({EvidenceStatementSet}{@type}),
>
>         hint   IA5String OPTIONAL
>
>         }
>
>         To
>
>         EvidenceStatement ::= SEQUENCE {
>
>         type EVIDENCE-STATEMENT.&id({EvidenceStatementSet}),
>
>         stmt EVIDENCE-STATEMENT.&Type({EvidenceStatementSet}{@type}),
>
>         hint   <type as defined in the class definition> OPTIONAL
>
>         }
>
>         Are there any structures current in the (large) LAMPS toolbox
>         that allow the type of a field to vary in this way? It seems
>         like an interop nightmare. If that kind of flexibility is
>         required, why not use something more common like Attribute(s)
>         where the variable type is indicated in the encoding?
>
>         *From: *Michael StJohns <msj@nthpermutation.com>
>         <mailto:msj@nthpermutation.com>
>         *Date: *Monday, May 5, 2025 at 4:02 PM
>         *To: *Russ Housley <housley@vigilsec.com>
>         <mailto:housley@vigilsec.com>
>         *Cc: *<spasm@ietf.org> <mailto:spasm@ietf.org>
>         *Subject: *[lamps] Re: WGLC for
>         draft-ietf-lamps-csr-attestation-18
>
>         The silly mistakes are partially avoided by the default
>         setting of &auxPresence to "absent".
>
>         Looking at RFC5912, I'm slightly confused as it's possible to
>         do (for MESSAGE-DIGEST) a "PARAMS ARE required" (vice "PARAMS
>         TYPE OCTET STRING ARE required") without specifying a type for
>         &Params.  Which doesn't break anything exactly in the
>         compile...  but .. it's weird not to have a default for the
>         &Params type in that case.
>
>         That said, I think I'm fine with the change.  E.g. &AuxType
>         OPTIONAL in the CLASS section  and no internal option brackets
>         around [TYPE &AuxType] in the SYNTAX section.   I have no
>         problem with requiring a complete specification without
>         defaults for all of the various EVIDENCE-STATEMENT definitions.
>
>         Thanks - Mike
>
>         ps - I keep confusing "present" for "required" too....
>
>         On 5/5/2025 3:31 PM, Russ Housley wrote:
>
>             I think it would be better to have the party that is
>             defining an evidence statement to ALWAYS specify the aux
>             information if it exists.  The DEFAULT OCTET STRING can
>             lead to a silly mistake.  It seems trivial to say:
>
>             AUX TYPE OCTET STRING IS present
>
>             to avoid the silly mistakes.
>
>             Russ
>
>
>
>
>                 On May 5, 2025, at 3:00 PM, Michael StJohns
>                 <msj@nthpermutation.com>
>                 <mailto:msj@nthpermutation.com> wrote:
>
>                 Aux(illary) works.
>
>                 I'd based the EVIDENCE-STATEMENT class on how some of
>                 the definitions were written in RFC5912, (see
>                 DIGEST-ALGORITHM for one) especially with respect to
>                 the &AuxType/aux field. E.g. would changes
>
>                     s/&AuxType OPTIONAL/&AuxType OCTET STRING OPTIONAL/
>
>                 and
>
>                     s/[AUX TYPE &AuxType IS &auxPresent]/[AUX [TYPE
>                     &AuxType] IS &auxPresent]/
>
>                 to restore the original intent be useful?
>
>                 AFAICT, ParamOptions  for &auxPresent is just a way to
>                 carry implementation information, but can't actually
>                 be applied to the EvidenceStatement SEQUENCE
>                 definition.  But it makes me twitchy that &AuxType
>                 might not be set when instantiating the
>                 EvidenceStatement....  I'm actually surprised it
>                 compiled as is.
>
>                 Thanks - Mike
>
>                 On 5/5/2025 1:55 PM, Russ Housley wrote:
>
>                     This compiles:
>
>                     FooBarModule
>
>                     DEFINITIONS IMPLICIT TAGS ::= BEGIN
>
>                     EVIDENCE-STATEMENT ::= CLASS {
>
>                       &id  OBJECT IDENTIFIER UNIQUE,
>
>                       &Type,
>
>                       &auxPresent ParamOptions DEFAULT absent,
>
>                       &AuxType  OPTIONAL
>
>                     } WITH SYNTAX {
>
>                       &Type IDENTIFIED BY &id
>
>                       [AUX TYPE &AuxType IS &auxPresent]
>
>                     }
>
>                     EvidenceStatementSet EVIDENCE-STATEMENT ::= {
>
>                      mikesEvidenceStatement | otherEvidenceStatement |
>                     tcgDiceAttestTPMCertify,
>
>                        ... }
>
>                     EvidenceStatements ::= SEQUENCE SIZE (1..MAX) OF
>                     EvidenceStatement
>
>                     EvidenceStatement ::= SEQUENCE {
>
>                        type
>                     EVIDENCE-STATEMENT.&id({EvidenceStatementSet}),
>
>                        stmt
>                     EVIDENCE-STATEMENT.&Type({EvidenceStatementSet}{@type}),
>
>                        aux
>                     EVIDENCE-STATEMENT.&AuxType({EvidenceStatementSet}{@type})
>                     OPTIONAL }
>
>                     ParamOptions ::= ENUMERATED {
>
>                        required, -- Parameters MUST be encoded in
>                     structure
>
>                        preferredPresent, -- Parameters SHOULD be
>                     encoded in structure
>
>                        preferredAbsent,  -- Parameters SHOULD NOT be
>                     encoded in structure
>
>                        absent, -- Parameters MUST NOT be encoded in
>                     structure
>
>                        inheritable,  -- Parameters are inherited if
>                     not present
>
>                        optional, -- Parameters MAY be encoded in the
>                     structure
>
>                        ... }
>
>                     mikesEvidenceStatement EVIDENCE-STATEMENT ::= {
>
>                        MikesASN1Structure IDENTIFIED BY id-mikes-statement
>
>                        AUX TYPE MikesHint IS required }
>
>                     id-mikes-statement OBJECT IDENTIFIER ::= { 1 1 1 1
>                     1 1 }
>
>                     MikesASN1Structure ::= OCTET STRING
>
>                     MikesHint ::= IA5String
>
>                     otherEvidenceStatement EVIDENCE-STATEMENT ::= {
>
>                        PrintableString IDENTIFIED BY id-other-statement }
>
>                     id-other-statement OBJECT IDENTIFIER ::= { 2 2 2 2
>                     2 2 }
>
>                     tcgDiceAttestTPMCertify EVIDENCE-STATEMENT ::= {
>
>                      Tcg-attest-tpm-certify IDENTIFIED BY
>                     tcg-attest-tpm-certify
>
>                        AUX TYPE Hint IS preferredPresent }
>
>                     tcg OBJECT IDENTIFIER ::= { 2 23 133 }
>
>                     tcg-kp-AIKCertificate OBJECT IDENTIFIER ::= { tcg
>                     8 3 }
>
>                     tcg-attest OBJECT IDENTIFIER ::= { tcg 20 }
>
>                     tcg-attest-tpm-certify OBJECT IDENTIFIER ::= {
>                     tcg-attest 1 }
>
>                     Tcg-attest-tpm-certify ::= SEQUENCE {
>
>                        tpmSAttest   OCTET STRING,
>
>                        signature    OCTET STRING,
>
>                        tpmTPublic   OCTET STRING OPTIONAL }
>
>                     Hint ::= IA5String (FROM ("a".."z" | "A".."Z" |
>                     "0".."9" | ".:"))
>
>                     END
>
>                     Note: there are several problems in the TCG
>                     example that are correctesd in the above,
>                     including these typos:
>
>                     s/id-tcg/tcg/
>
>                     s/Tcg-csr-tpm-certify/Tcg-attest-tpm-certify/
>
>                     Russ
>
>
>
>
>         _______________________________________________ Spasm mailing
>         list -- spasm@ietf.org To unsubscribe send an email to
>         spasm-leave@ietf.org
>