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

Michael StJohns <msj@nthpermutation.com> Mon, 05 May 2025 19:00 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 AC0502500C00 for <spasm@mail2.ietf.org>; Mon, 5 May 2025 12:00:25 -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 O-yeZ3y2dDZP for <spasm@mail2.ietf.org>; Mon, 5 May 2025 12:00:24 -0700 (PDT)
Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) (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 A0CD62500BF9 for <spasm@ietf.org>; Mon, 5 May 2025 12:00:24 -0700 (PDT)
Received: by mail-qv1-xf31.google.com with SMTP id 6a1803df08f44-6e8efefec89so48982386d6.3 for <spasm@ietf.org>; Mon, 05 May 2025 12:00:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nthpermutation-com.20230601.gappssmtp.com; s=20230601; t=1746471624; x=1747076424; 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=eb5+L58XPninl5kxdLTliohurdCHw7edKcH+0MkVmxs=; b=e3qkSqyqtYS6rO3dSGEdrJLvLVKNZg93TndwdmN5Wh/XuNy3mI0Ovx7SJ12/j8Jv8t BkbSI9obTq+/jHvh2QpSkEG2lpGYQ0vqrlzhDmWdh5XP/fQsYgsZYUvPsbq6anGh91AG X1QxqOYxZppFxsFJKJsLofuVhjF0a+PUVNl/3TSCGpX3GssIgJedfHRZVNatmYlY67pl DpccxEaihaqo3bglvTulcuaECEJq/+QopB+AUn/ZmgZFMU4se9H7gZtL7Pnrrs3QfuXg B+EbC4lL7QLy6JVvOOArdmtYiz8vybJGFABa2vGKo/0S3mlQTsPw8nR/i9Q0vDQbEtk6 JSTQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746471624; x=1747076424; 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=eb5+L58XPninl5kxdLTliohurdCHw7edKcH+0MkVmxs=; b=WzUhHopXi42UnXzdf6oh4QD2Dfw7LD2Dppnb3+3fGq4r9gIzWJgROgZnMNu3HQg3Z+ DbMVqEZYZx1D6R5iD0tLskGgtSwbywuS6jDCsx9xLvA5d0NdwcwckVUg1ZOznL/xz8K4 v7LQRyHdesbtlzT4hQKts70EVeZvgw6Nj98WcDNM4Xzo1LEJVFYXDLF5SyFQfEZ3328V 0GCpy8FOWqgEFfnIuKEDbiWZxXimvUopSUjw3EOZS77zrWmCsO/wRCYGg32nifDEHvBl it7thtwf3n+jkfkJImaHN6CcUYvv621ZZiZT2mrSTu6CdXDnRy2E25xZBhkRCMrNsn+b hcpA==
X-Gm-Message-State: AOJu0YyLUFODVLg8wN5h2HaxtvPTi4y6YmsKBvBB9bxUZTjSDh76ydWr g0UzbRG3FQDJXRaJbgSJy93CpsO+uQq2oTmmy4Lg7B34Cv9baiHK8TGupt7ihmq9duUAojrsut4 RgAM=
X-Gm-Gg: ASbGnctxV5HKuhrRKb+PAfhpS/QIAnE7zAtKPYkZ89fBuCFAiAKSEuD+bYuL2T4c5ML +WX28/IMtXG0JW7ymYXm2TP0tCrhhNviyQ0d+dS9uAoIOnOqZ82JQTWFvfaaRdw45Iw+eg8/Al+ /g046FeH3jNnP5pYCiTDTuBtaUpL60FVbZMNP3VRfaC6xZwZOdW28okkNk5+KhS+bwHSbuv1o3m vOe5+0MVhD2ZWB7yBT5dnFmkynglqxlxgthmROH2nQkTGjWKqaFvSqnkJ00ptTuFT0CN+E8hsyZ DTCyP2lk62gWQDycQusp6cg1QNmdga22o15QpBalWLzdIn9AoP1rA2IBN6fuz70Q2ectutL+vWj IC46Oig==
X-Google-Smtp-Source: AGHT+IH8FfCwscdjyt9yfIk8pe+f+hhCTFrm99qnPZya2oE3S2FwVHlVQtPCr1nm3Q8Kcy3L0XJ9rQ==
X-Received: by 2002:a05:6214:b6e:b0:6f4:d60d:dd29 with SMTP id 6a1803df08f44-6f5157301d3mr235523016d6.5.1746471622995; Mon, 05 May 2025 12:00:22 -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 6a1803df08f44-6f50f482ae0sm59180226d6.115.2025.05.05.12.00.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 May 2025 12:00:22 -0700 (PDT)
Content-Type: multipart/alternative; boundary="------------D4rI3ltM8VCEGW8S3lOT6Zv1"
Message-ID: <0f3a638c-9027-4e07-a05c-0fe694d5da8b@nthpermutation.com>
Date: Mon, 05 May 2025 15:00:19 -0400
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: 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>
Content-Language: en-US
From: Michael StJohns <msj@nthpermutation.com>
In-Reply-To: <61A2DB74-C4D5-43B4-A36D-F7FF60938ECA@vigilsec.com>
X-Antivirus: Norton (VPS 250505-4, 5/5/2025), Outbound message
X-Antivirus-Status: Clean
Message-ID-Hash: YC37555G7WMASWOHACJ7TVKIZOC5ZPCM
X-Message-ID-Hash: YC37555G7WMASWOHACJ7TVKIZOC5ZPCM
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/mP7pdZw62cPLsy30rgFPRjqo6JU>
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>

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
>
>
>> On May 4, 2025, at 10:22 PM, Michael StJohns <msj@nthpermutation.com> 
>> wrote:
>>
>> Hi Russ - to close out the ASN1 specific comments  -
>>
>> Referencing X.680, Appendix A, I get this for Hint: (these both 
>> compile at the asn1.io playground).
>>
>>     -- At least 2 and not more than 10 DNS labels including the TLD.
>>     The last label has at least 2 letters. Optional port specification.
>>     -- Basically a URI with just the DNS name and an optional port
>>     and without everything else.
>>     Hint ::= IA5String (PATTERN
>>     "(([a-z]|[A-Z])\w#(,63)\.)#(1,9)([a-z]|[A-Z])\w#(1,63)(:\d#(1,5))?")
>>
>>     Alternately (just constraining the included characters):
>>
>>     Hint ::= IA5String (FROM ("a".."z" | "A".."Z" | "0".."9" | ".:"))
>>
>> Assuming the change to [A]ncillary from [H]int  and not making Hint 
>> the default- this results in the following changes to the 
>> EVIDENCE-STATEMENT definitions in appendix A:
>>
>> EvidenceStatementSet EVIDENCE-STATEMENT ::= {
>>       --- TPM 2.0
>>       { Tcg-attest-tpm-certify IDENTIFIED BY tcg-attest-tpm-certify
>>                                ANCILLARY TYPE Hint IS preferredPresent },
>>       ...,
>>
>>       --- PSA
>>       { OCTET STRING IDENTIFIED BY { 1 3 6 1 5 5 7 1 99 }
>>                      ANCILLARY TYPE Hint IS preferredPresent }
>>     }
>>
>>
>> and in Appendix B:
>>
>> tcgDiceCmwEvidenceStatement EVIDENCE-STATEMENT ::= {
>> DiceConceptualMessageWrapper IDENTIFIED BY 
>> tcg-dice-conceptual-message-wrapper
>> ANCILLARY TYPE Hint IS preferredPresent
>> }
>>
>>
>> tcgDiceTcbInfoEvidenceStatementES EVIDENCE-STATEMENT ::=  {
>>                    DiceTcbInfo IDENTIFIED BY tcg-dice-TcbInfo
>>                                ANCILLARY TYPE Hint is preferredPresent
>>                   }
>>
>> -- or "required" depending...
>>
>> Another nit - 1.3.6.2.5.5.7.1 certificate extensions registry... 
>> probably not the right place for EVIDENCE-STATEMENT registrations - 
>> even for an example?
>>
>> Later, Mike
>>
>> On 5/4/2025 7:46 PM, StJohns, Michael wrote:
>>> With the exception of the item you note (a default type for the 
>>> secondary- “hint” field and its presence indication), that’s 
>>> correct.  I used “ancillary” where you have “hint” because the 
>>> general case is just additional data specific to the evidence type.
>>>
>>> For reference this uses the object id to identify the type (and 
>>> possibly presence) of both the main field and the ancillary.
>>>
>>> Given the text describing the IA5String hint field, I’d define the 
>>> Hint type using either the FROM or PATTERN constraint - ideally the 
>>> latter.  E.G.
>>>
>>> — where you have MikesHint use this instead
>>> Hint ::= IA5String (FROM 
>>> (“0..9abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.:”))
>>>
>>> Or
>>>
>>> Hint ::= IA5String (PATTERN “<tbd>”)
>>>
>>> Mike
>>>
>>>
>>>
>>> On Sun, May 4, 2025 at 18:10 Russ Housley <housley@vigilsec.com> wrote:
>>>
>>>
>>>     Mike:
>>>
>>>     I could not get your ASN.1 to compile.  Please look at this. 
>>>     Does it do what you are suggesting?
>>>
>>>     I realize that I removed the DEFAULT type of the Hint being an
>>>     OCTET STRING, but I think the rest is captured.
>>>
>>>     If this captures your idea, then the authors can respond about
>>>     whether they like it.
>>>
>>>     Russ
>>>
>>>     = = = = = = =
>>>
>>>     FooBarModule
>>>     DEFINITIONS IMPLICIT TAGS ::= BEGIN
>>>
>>>     EVIDENCE-STATEMENT ::= CLASS {
>>>       &id          OBJECT IDENTIFIER UNIQUE,
>>>       &Type,
>>>       &hintPresent ParamOptions DEFAULT absent,
>>>       &HintType    OPTIONAL
>>>     } WITH SYNTAX {
>>>       &Type IDENTIFIED BY &id
>>>       [HINT TYPE &HintType ARE &hintPresent]
>>>     }
>>>
>>>     EvidenceStatementSet EVIDENCE-STATEMENT ::= {
>>>        mikesEvidenceStatement | otherEvidenceStatement, ... }
>>>
>>>     EvidenceStatements ::= SEQUENCE SIZE (1..MAX) OF EvidenceStatement
>>>
>>>     EvidenceStatement ::= SEQUENCE {
>>>        type EVIDENCE-STATEMENT.&id({EvidenceStatementSet}),
>>>        stmt EVIDENCE-STATEMENT.&Type({EvidenceStatementSet}{@type}),
>>>        hint
>>>     EVIDENCE-STATEMENT.&HintType({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
>>>        HINT TYPE MikesHint ARE required }
>>>
>>>     id-mikes-statement OBJECT IDENTIFIER ::= { 1 1 1 1 1 1 }
>>>
>>>     MikesASN1Structure ::= OCTET STRING
>>>
>>>     MikesHint ::= IA5String
>>>
>>>     otherEvidenceStatement EVIDENCE-STATEMENT ::= {
>>>        OtherStructure IDENTIFIED BY id-other-statement }
>>>
>>>     id-other-statement OBJECT IDENTIFIER ::= { 2 2 2 2 2 2 }
>>>
>>>     OtherStructure ::= PrintableString
>>>
>>>     END
>>>
>>
>