[Suit] Integrated Dependency example
Ken Takayama <11kenterada@gmail.com> Thu, 24 March 2022 16:24 UTC
Return-Path: <11kenterada@gmail.com>
X-Original-To: suit@ietfa.amsl.com
Delivered-To: suit@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 55A6F3A0959 for <suit@ietfa.amsl.com>; Thu, 24 Mar 2022 09:24:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.109
X-Spam-Level:
X-Spam-Status: No, score=-7.109 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tnD4UdMXyxKA for <suit@ietfa.amsl.com>; Thu, 24 Mar 2022 09:24:29 -0700 (PDT)
Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B3F483A094A for <suit@ietf.org>; Thu, 24 Mar 2022 09:24:29 -0700 (PDT)
Received: by mail-pl1-x636.google.com with SMTP id n18so5242875plg.5 for <suit@ietf.org>; Thu, 24 Mar 2022 09:24:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=tC96QsIgua2lq1K+CyRSvE+uKJg88J2q4HF4q+KO8aA=; b=E8JjCfqQ2gVhBxcdKIlypETXb6sFbFK2PG/K2YGu8qkICJFxPgzmsQyJvAwtcCgut5 W9+ey5BY5YiHuEQwNpspleTDISX5Vm1NlkhGeBhIBUep1g7DBK3ANmP/zsIPAVqH+b2b zC1D/1vQukeHxwazGDxXBZwHgQyGsM4jPRhO0XxMAxjiQT6Casxc07TG+WCENY6dv4iK O1rhkHgMR7U753w6RVew2fxcwiQK/Q5gcUI0BYw4bnHL1iguk5qleyZe7iEEiODsaKrR cJvUVXSrJh07ZrBJ/VnWghw/f6wfpJWPLRYIgq1SkDP0ivNpyyq1XwHhrCENslt+octi wElA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=tC96QsIgua2lq1K+CyRSvE+uKJg88J2q4HF4q+KO8aA=; b=G+ad14ckxu5kkhoSlTPojekpYX+CwMqUA7P+osVli2iPah5c9o/k5G/r3IDdnsiDF7 XmeJB0Y0+RbiOkzTdTFr66HQtP5AzVz9V/AfW2yfsVv3/Mul+gvpdQvPKxdoKXTLFwSj fxHuLQb2BIeI3QT3uuUX/VhRC8+oAWxjfpBeNrdtsCLPJiLGALiDwnQ/e+YPa+fforjw v5dtDBcRZCV0tk4h6MtCm4XavIwi4MP+UQ0JT0gQzyZ8vnCWpgxbRs6vIbE07QxF2o6U DE3IiIMEjRUv/aR1xLHL5CcYQ9rZRmJakfBNff222R7eZJT/gVcsq35Ojvx3U7UgdG9V iSmg==
X-Gm-Message-State: AOAM533pGS06uvNHDRu8mlUeiMc1xU16TIdFiSYI59/qIV28Qs7aq0X7 fG1pqaMG/fjRCl/4eHecfgQlufBLG843zgBAjqT7/6fItswVfQ==
X-Google-Smtp-Source: ABdhPJzSCLFOS32zRZPhNtghs6mysIYurOcpNVP/QtUUElQ9bDfXchrxfdd2da/XbMV53Nts3re5LkX/ct2dQIzgt18=
X-Received: by 2002:a17:90a:1db:b0:1bf:711d:267a with SMTP id 27-20020a17090a01db00b001bf711d267amr7222536pjd.155.1648139068377; Thu, 24 Mar 2022 09:24:28 -0700 (PDT)
MIME-Version: 1.0
From: Ken Takayama <11kenterada@gmail.com>
Date: Fri, 25 Mar 2022 01:24:17 +0900
Message-ID: <CAMGQZH42zVX3uxpkopw5L-TtaoEkkc3G+=VZBed64EUxOyLF0w@mail.gmail.com>
To: suit@ietf.org, Brendan.Moran@arm.com
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/suit/UxW_AVcTh_IeotdqbZqcLa-LQ-A>
Subject: [Suit] Integrated Dependency example
X-BeenThere: suit@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Software Updates for Internet of Things <suit.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/suit>, <mailto:suit-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/suit/>
List-Post: <mailto:suit@ietf.org>
List-Help: <mailto:suit-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/suit>, <mailto:suit-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 24 Mar 2022 16:24:32 -0000
Hi Brendan and SUIT team, I created a manifest example which uses integrated-dependency, and the libcsuit can process it. Please check the binary example <https://github.com/yuichitk/libcsuit/blob/master/testfiles/suit_manifest_expID.md> and the libcsuit behavior below. Thank you in advance! # Additional SUIT Manifest explanation There are Personalization Data manifest and Trusted Component manifest. The former one depends the latter one, and they are put together with integrated-dependency function. (NOTE: The Trusted Component in TEEP documents is equivalent to the Firmware in the SUIT documents, and Personalization Data includes configuration data.) # libcsuit behavior While libcsuit processes the SUIT Manifest binary, it triggers some callback functions specified by the `suit_manifest_process` application part. The execution stdout is like below, and I added some explanations in /* */. ``` $ ./suit_manifest_process ./testfiles/suit_manifest_expID.cbor /* When the parser arrived at integrated-dependency part ["#depending"](https://github.com/yuichitk/libcsuit/blob/master/testfiles/suit_manifest_expID.md?plain=1#L24) it triggers the store callback to ask the application program to store the Trusted Component manifest. */ store callback : { dst-dependnecy-digest : algorithm-id : -16 digest-bytes : 0x14 0xa9 0x8b 0xe9 0x57 .. dst-dependency-prefix : [] ptr : 0x7ffe2e9a8617 (303) suit_rep_policy_t : RecPass0 RecFail1 SysPass0 SysFail0 } /* Now the parser is at integrated-dependency part ["#tc"](https://github.com/yuichitk/libcsuit/blob/master/testfiles/suit_manifest_expID.md?plain=1#L39) and triggers the store callback again. */ store callback : { dst-component-identifier : [0x54 0x45 0x45 0x50 0x2d .., 0x53 0x65 0x63 0x75 0x72 .., 0x8d 0x82 0x57 0x3a 0x92 .., 0x74 0x61 , ] ptr : 0x7ffe2e9a8695 (20) suit_rep_policy_t : RecPass1 RecFail1 SysPass1 SysFail1 } /* Finally it reaches the directive to fetch the personalization data. [directive-fetch config.json](https://github.com/yuichitk/libcsuit/blob/master/testfiles/suit_manifest_expID.md?plain=1#L124) */ fetch callback : { uri : "https://example.org/config.json" (31) dst-component-identifier : [0x54 0x45 0x45 0x50 0x2d .., 0x53 0x65 0x63 0x75 0x72 .., 0x63 0x6f 0x6e 0x66 0x69 .., ] ptr : 0x7ffe2e9a8848 (64) suit_rep_policy_t : RecPass0 RecFail1 SysPass0 SysFail0 } ``` # Testing Code is here <https://github.com/yuichitk/libcsuit> and you can build and test the it with `$ make -f Makefile.process test` but it requires some installation steps. <https://github.com/yuichitk/libcsuit#using-makefiles> Sincerely, Ken
- [Suit] Integrated Dependency example Ken Takayama