RATS H.Tschofenig, Ed.Tschofenig Internet-Draft S. Frost Intended status:Standards TrackInformational M. Brossard Expires:May 23,7 September 2020 A. Shaw T. Fossati Arm LimitedNovember 20, 20196 March 2020 Arm's Platform Security Architecture (PSA) Attestation Tokendraft-tschofenig-rats-psa-token-04draft-tschofenig-rats-psa-token-05 Abstract Theinsecurity of IoT systems is a widely known and discussed problem. The ArmPlatform Security Architecture (PSA) isbeing developed to address this challenge by making it easiera family of hardware and firmware security specifications, as well as open-source reference implementations, to help device makers and chip manufacturers build best-practice security into products. Devices that are PSA compliant are able to produce attestation tokens as described in this memo, which are the basis for a number of different protocols, including secureIoT systems.provisioning and network access control. This document specifiestoken format and claims used inthe PSA attestationAPI of the Arm Platform Security Architecture (PSA).token structure and semantics. At its core, the CWT (COSE Web Token) format is used and populated with a set ofclaims,claims in a way similar to EAT (Entity Attestation Token). This specification describes what claims are used by PSA compliantsystemssystems. Note to Readers Source for this draft andwhat has been implemented within Arm Trusted Firmware-M.an issue tracker can be found at https://github.com/thomas-fossati/draft-psa-token (https://github.com/thomas-fossati/draft-psa-token). Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire onMay 23,7 September 2020. Copyright Notice Copyright (c)20192020 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents(https://trustee.ietf.org/license-info)(https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Conventions andTerminologyDefinitions . . . . . . . . . . . . . . . . .43 2.1. Glossary . . . . . . . . . . . . . . . . . . . . . . . .43 3.Information ModelPSA Claims . . . . . . . . . . . . . . . . . . . . . .5. . . 4 3.1.PSA Lifecycle StatesCaller Claims . . . . . . . . . . . . . . . . . .7. . . . 4 3.1.1. Auth Challenge . . . . . . . . . . . . . . . . . . . 4 3.1.2. Client ID . . . . . . . . . . . . . . . . . . . . . . 4 3.2.PSATarget Identification Claims . . . . . . . . . . . . . . 5 3.2.1. Instance ID . . . . . . . . . . . . . . . . . . . . . 5 3.2.2. Implementation ID . . . . . . . . . . . . . . . . . . 5 3.2.3. Hardware Version . . . . . . . . . . . . . . . . . . 6 3.3. Target State Claims . . . . . . . . . . . . . . . . . . . 6 3.3.1. Security Lifecycle . . . . . . . . . . . . . . . . . 6 3.3.2. Boot Seed . . . . . . . . . . . . . . . . . . . . . . 8 3.4. SoftwareComponentsInventory Claims . . . . . . . . . . . . . . . . 8 3.4.1. Software Components .7 4. Token Encoding. . . . . . . . . . . . . . . . 8 3.4.2. No Software Measurements . . . . . . .9 5.. . . . . . . 10 3.5. Verification Claims . . . . . . . . . . . . . . . . . . . 10 3.5.1. Verification Service Indicator . . . . . . . . . .9 6. Example. 10 3.5.2. Profile Definition . . . . . . . . . . . . . . . . . 11 4. Token Encoding and Signing . . . . . . . . . . . . . . . . . 117.5. Collated CDDL . . . . . . . . . . . . . . . . . . . . . . . . 11 6. Security and Privacy Considerations . . . . . . . . . . . . . 148.7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 149.8. References . . . . . . . . . . . . . . . . . . . . . . . . . 149.1.8.1. Normative References . . . . . . . . . . . . . . . . . . 149.2.8.2. Informative References . . . . . . . . . . . . . . . . . 15 Appendix A.ContributorsReference Implementation . . . . . . . . . . . . . . 16 Appendix B. Example . . . . . . . .16 Appendix B. Reference Implementation. . . . . . . . . . . . . . 16 Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 19 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . .1619 1. IntroductionModern hardware for Internet of Things devices contain trustedTrusted execution environmentsandare now present incase of the Arm v8-M architecture TrustZone support. On these low end microcontrollers, TrustZone enables the separation between a "normal world" andmany devices, which provide a"secure world" wheresafe environment to place security sensitive coderesides in the "secure world" and applications running in the "normal world" requestsuch as cryptography, secureservices usingboot, secure storage, and other essential security functions. These security functions are typically exposed through a narrow and well-definedAPI.interface, and can be used by operating system libraries and applications. Various APIs have been developed by Arm as part of the Platform Security Architecture [PSA]programme; thisframework. This document focuses on thefunctionalityoutput provided bythe attestationPSA's Initial Attestation API. Since the tokensexposed via the attestation APIare also consumed by services outside the device, there is an actual needfor making them interoperable. In this specification these interoperabilityto ensure interoperability. Interoperability needs are addressed here by describing the exact syntax and semantics of the attestation claims, and defining the way these claims are encoded and cryptographically protected. Further details on concepts expressed below can be found in the PSA Security Model documentation [PSA-SM].Figure 1 provides a view of the architectural components and how they interact. Applications on the IoT device communicate with services residing in the "secure world" by means of a well-defined API. The attestation API produces tokens, as described in this document, and those tokens may be presented to network or application services. .-----------------+------------------. | Normal World | Secure World | | | .-. | | | |A| | | | |T| | | | |T| | | | |E| .-. | | | .-. |S| |S| | | | |C| |T| |T| | .----------. | | |R| |A| |O| | | Network | | .----------. | |Y| |T| |R| | | and App |<-------------+ Apps | .--+--. |P| |I| |A| | | Services | | '----------' |P | | |T| |O| |G| | '----------' | .----------. |S | | |O| |N| |E| | | |Middleware| |A | | '-' '-' '-' | | '----------' | | | .----------. | | .----------. |A | | | | | | | | |P | | | SPM | | | | RTOS and | |I | | '----------' | | | Drivers | '--+--' .----------. | | | | | | Boot | | | '----------' | | Loader | | | | '----------' | +-----------------+------------------+ | H A R D|W A R E | '-----------------+------------------' Internet of Things Device Figure 1: Software Architecture2. Conventions andTerminologyDefinitions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. 2.1. Glossary RoT Root of Trust, the minimal set of software, hardware and data that has to be implicitly trusted in the platform - there is no software or hardware at a deeper level that can verify that the Root of Trust is authentic and unmodified. An example of RoT is an initial bootloader in ROM, which contains cryptographic functions and credentials, running on a specific hardware platform. SPE Secure Processing Environment, a platform's processing environment for software that provides confidentiality and integrity for its runtime state, from software and hardware, outside of the SPE. Containsthe Secure Partition Manager (SPM), the Secure Partitionstrusted code andthetrusted hardware. (Equivalent to Trusted Execution Environment (TEE), or "secure world".) NSPE Non Secure Processing Environment, the security domain outside of the SPE, the Application domain, typically containing the applicationfirmwarefirmware, operating systems, and general hardware. (Equivalent to Rich Execution Environment (REE), or "normal world".) 3.Information Model Table 1PSA Claims This section describes themandatory and optionalclaims to be used inthe report. +----------------+--------------+-----------------------------------+ | Claim | Mandatory | Description | +----------------+--------------+-----------------------------------+ |a PSA attestation token. CDDL [RFC8610] along with text descriptions is used to define each claim independent of encoding. The following CDDL type(s) are reused by different claims: psa-hash-type = bytes .size 32 / bytes .size 48 / bytes .size 64 3.1. Caller Claims 3.1.1. Auth Challenge| Yes | InputThe Auth Challenge claim is an input object from the caller. For| | | |example, this can be a| | | |cryptographic nonce, a hash of| | | |locally attested data. The length| | | |must be 32, 48, or 64 bytes.| | | | | |This claim MUST be present in a PSA attestation token. psa-nonce-claim = ( arm_psa_nonce => psa-hash-type ) 3.1.2. Client ID The Client ID claim represents the Partition ID of the caller. It is a signed integer whereby negative values represent callers from the NSPE and where positive IDs represent callers from the SPE. The value 0 is not permitted. For a definition of the Partition ID, see the PSA Firmware Framework [PSA-FF]. It is essential that this claim is checked in the verification process to ensure that a security domain, i.e., an attestation endpoint, cannot spoof a report from another security domain. This claim MUST be present in a PSA attestation token. psa-client-id-nspe-type = -2147483648...0 psa-client-id-spe-type = 1..2147483647 psa-client-id-type = psa-client-id-nspe-type / psa-client-id-spe-type psa-client-id = ( arm_psa_partition_id => psa-client-id-type ) 3.2. Target Identification Claims 3.2.1. Instance ID| Yes | RepresentsThe Instance ID claim represents the unique identifier| | | |of the device instance. It is a 32 bytes hash of| | | |the public key corresponding to| | | |the Initial AttestationKey. The | | | | full definitionKey (IAK). If the IAK isin [PSA-SM]. | | | | | | Verification | No | A hint used by a relying party to | | Service | | locateavalidation service for | | Indicator | |symmetric key then thetoken. The valueInstance ID is atext | | | | string that can be used to locate | | | |hash of theservice orIAK itself. It is encoded as aURL specifying | | | | the addressUniversal Entity ID ofthe service. A | | | | verifier may choosetype RAND [I-D.ietf-rats-eat], i.e., prepending a 0x01 type byte toignore | | | | thisthe key hash. The full definition is in [PSA-SM]. This claim MUST be present infavor of other | | | | information. | | | | | | Profile | No | Contains the name ofadocument | | Definition | | that describes the 'profile' of | | | | the report. The document name may | | | | include versioning.PSA attestation token. psa-instance-id-type = bytes .size 33 psa-instance-id = ( arm_psa_UEID => psa-instance-id-type ) 3.2.2. Implementation ID Thevalue for | | | | this specification is | | | | PSA_IOT_PROFILE_1. | | | | | |Implementation| Yes | UniquelyID claim uniquely identifies the| | ID | |underlying immutable PSA RoT. A| | | |verification service can use this| | | |claim to locate the details of| | | |the verification process. Such| | | |details include the| | | |implementation's origin and| | | |associated certification state.| | | | | | Client ID | Yes | RepresentsThe full definition is in [PSA-SM]. This claim MUST be present in a PSA attestation token. psa-implementation-id-type = bytes .size 32 psa-implementation-id = ( arm_psa_implementation_id => psa-implementation-id-type ) 3.2.3. Hardware Version The Hardware Version claim provides metadata linking thePartition ID of | | | |token to thecaller.GDSII that went to fabrication for this instance. Itis a signed | | | | integer whereby negative values | | | | represent callers fromcan be used to link theNSPE | | | |class of chip andwhere positive IDs represent | | | | callers fromPSA RoT to theSPE.data on a certification website. It MUST be represented as a thirteen-digit [EAN-13]. psa-hardware-version-type = text .regexp "[0-9]{13}" psa-hardware-version = ( ? arm_psa_hw_version => psa-hardware-version-type ) 3.3. Target State Claims 3.3.1. Security Lifecycle Thefull | | | | definition of the partition ID is | | | | given in [PSA-FF]. | | | | | |Security| Yes | RepresentsLifecycle claim represents the current lifecycle| | Lifecycle | |state of the PSA RoT. The state| | | |is represented by an integer that| | | |is divided to convey a major| | | |state and a minor state. A major| | | |state is mandatory and defined by| | | |[PSA-SM]. A minor state is| | | |optional and 'IMPLEMENTATION| | | |DEFINED'. Theencoding is: | | | |PSA security lifecycle state and implementation state are encoded as follows: * version[15:8] - PSA security| | | |lifecycle state, and * version[7:0]| | | |- IMPLEMENTATION DEFINED state.| | | |The PSA lifecycle states are| | | | listedillustrated inSection 3.1.Figure 1. For PSA, a| | | |remote verifier can only trust| | | |reports from the PSA RoT when it| | | |is in SECURED or| | | |NON_PSA_ROT_DEBUG major states. This claim MUST be present in a PSA attestation token. .----------------------. .--- Enrol ---+ Provisioning Lockdown | | '-----------+----------' | | .------------------. | |Hardware | No | Provides metadata linking the ||version| * v v |token to the GDSII that went to.--------------. .---------. | | Verifier | .---------+ Secured +-----------. |fabrication for this instance. It'--------------' | '-+-------' | | * |can be used to link the class of| ^ | | |chip and PSA RoT to the data on a| v | v | Blacklist |certification website. It must be.------------+------. .----------+----. | | | Non-PSA RoT Debug |represented as a thirteen-digit| Recoverable | | |[EAN-13]'---------+---------' | PSA RoT Debug | .-+-----------+-. | '------+--------' | Terminate +------------+-------------------' '------+--------' | .----------------. '------------>| Decommissioned | '----------------' Figure 1: PSA Lifecycle States psa-lifecycle-unknown-type = 0x0000..0x00ff psa-lifecycle-assembly-and-test-type = 0x1000..0x10ff psa-lifecycle-psa-rot-provisioning-type = 0x2000..0x20ff psa-lifecycle-secured-type = 0x3000..0x30ff psa-lifecycle-non-psa-rot-debug-type = 0x4000..0x40ff psa-lifecycle-recoverable-psa-rot-debug-type = 0x5000..0x50ff psa-lifecycle-decommissioned-type = 0x6000..0x60ff psa-lifecycle-type = psa-lifecycle-unknown-type / psa-lifecycle-assembly-and-test-type / psa-lifecycle-psa-rot-provisioning-type / psa-lifecycle-secured-type / psa-lifecycle-non-psa-rot-debug-type / psa-lifecycle-recoverable-psa-rot-debug-type / psa-lifecycle-decommissioned-type psa-lifecycle = ( arm_psa_security_lifecycle => psa-lifecycle-type ) 3.3.2. Boot Seed| Yes | RepresentsThe Boot Seed claim represents a random value created| | | |at system boot time that will| | | |allow differentiation of reports| | | |from different boot sessions.| | | | | |This claim MUST be present in a PSA attestation token. psa-boot-seed-type = bytes .size 32 psa-boot-seed = ( arm_psa_boot_seed => psa-boot-seed-type ) 3.4. Software| Yes (unless | AInventory Claims 3.4.1. Software Components The Software Components claim is a list of software components| | Components | the No |thatrepresentincludes all the software| | | Software |loaded by the PSARoot of Trust. | | | Measurements |RoT. This claimis needed forSHALL be included in attestation tokens produced by an implementation conformant with [PSA-SM]. If the| | |Software Components claim is| rules outlinedpresent, then the No Software Measurement claim (Section 3.4.2) MUST NOT be present. Each entry in[PSA-SM]. The | | | specified) |the Software Components list describes one softwarecomponents are further | | | | detailedcomponent using the attributes described inSection 3.2. | | | | | | No Software | Yes (if no | Intheevent thatfollowing subsections. Unless explicitly stated, the| | Measurements | software | implementation doespresence of an attribute is OPTIONAL. Note that, as described in [I-D.ietf-rats-architecture], a relying party will typically see the result of the verification process from the Verifier in form of an attestation result, rather than the "naked" PSA token from the attesting endpoint. Therefore, a relying party is notcontain | | | components | any software measurements then | | | specified) |expected to understand the Software Componentsclaim | | | | above can be omitted but instead | | | |claim. Instead, itwill be mandatory to include | | | | this claimis for the Verifier toindicatecheck thisis a | | | | deliberate state. Thisclaimis | | | | intended for devices that are not | | | | compliant with [PSA-SM]. | +----------------+--------------+-----------------------------------+ Table 1: Information Model of PSA Attestation Claims. 3.1. PSA Lifecycle States The PSA lifecycle states consist ofagainst thefollowing values: - PSA_LIFECYCLE_UNKNOWN (0x0000u) - PSA_LIFECYCLE_ASSEMBLY_AND_TEST (0x1000u) - PSA_LIFECYCLE_PSA_ROT_PROVISIONING (0x2000u) - PSA_LIFECYCLE_SECURED (0x3000u) - PSA_LIFECYCLE_NON_PSA_ROT_DEBUG (0x4000u) - PSA_LIFECYCLE_RECOVERABLE_PSA_ROT_DEBUG (0x5000u) - PSA_LIFECYCLE_DECOMMISSIONED (0x6000u) 3.2. PSA Software Components Each software componentavailable endorsements and provide an answer in form of an "high level" attestation result, which may or may not include the original Software Componentsclaim MUST include the required properties of Table 2. +-----+-------------+-----------+-----------------------------------+ | Key | Type | Mandatory | Description | | ID | | | | +-----+-------------+-----------+-----------------------------------+ |claim. psa-software-component = { ? 1|=> text, ; measurement type 2 => psa-hash-type, ; measurement value ? 4 => text, ; version 5 => psa-hash-type, ; signer id ? 6 => text, ; measurement description } psa-software-components = ( arm_psa_sw_components => [ + psa-software-component ] ) 3.4.1.1. Measurement| No | AType The Measurement Type attribute (key=1) is short string representing the| | | Type | |role of this softwarecomponent | | | | | (e.g. 'BL' forcomponent. The following measurement types MAY be used: * "BL": a BootLoader). | | | | | | | 2 |Loader * "PRoT": a component of the PSA Root of Trust * "ARoT": a component of the Application Root of Trust * "App": a component of the NSPE application * "TS": a component of a Trusted Subsystem 3.4.1.2. Measurement| Yes | RepresentsValue The Measurement Value attribute (key=2) represents a hash of the| | | value | |invariant software component in| | | | |memory at startup time. The value| | | | | mustMUST be a cryptographic hash of| | | | |256 bits or stronger.| | | | | | | 3 | Reserved | No | Reserved | | | | | | | 4 |This attribute MUST be present in a PSA software component. 3.4.1.3. Version| No |The Version attribute (key=4) is the issued software version in| | | | |the form of a text string. The| | | | |value of thisclaimattribute will| | | | |correspond to the entry in the| | | | |original signed manifest of the| | | | |component.| | | | | | | 5 |3.4.1.4. Signer ID| No |The Signer ID attribute (key=5) is the hash of a signing authority| | | | |public key for the software| | | | |component. The value of this| | | | | claimattribute will correspond to the| | | | |entry in the original manifest| | | | |for the component. This can be| | | | |used by a verifier to ensure the| | | | |components were signed by an| | | | |expected trusted source. This| | | | | field mustattribute MUST be present in a PSA software component to be| | | | |compliant with [PSA-SM].| | | | | | | 6 |3.4.1.5. Measurement Description The Measurement| No |Description attribute (key=6) is the description of the way in which| | | description | |the measurement value of the| | | | |software component is computed.| | | | |The value will be a text string| | | | |containing an abbreviated| | | | |description (or name) of the| | | | |measurement method which can be| | | | |used to lookup the details of the| | | | |method in a profile document.| | | | |Thisclaimattribute will normally be| | | | |excluded, unless there was an| | | | |exception to the default| | | | |measurement described in the| | | | |profile for a specific component.| +-----+-------------+-----------+-----------------------------------+ Table 2:3.4.2. No Software Measurements In the event that the implementation does not contain any software measurements then the Software ComponentsClaims.claim Section 3.4.1 can be omitted but instead the token MUST include this claim to indicate this is a deliberate state. Thefollowing measurement typesvalue SHOULD be 1. This claim is intended for devices that arecurrent defined: - 'BL':not compliant with [PSA-SM]. psa-no-sw-measurements-type = 1 psa-no-sw-measurement = ( arm_psa_no_sw_measurements => psa-no-sw-measurements-type ) 3.5. Verification Claims 3.5.1. Verification Service Indicator The Verification Service Indicator claim is aBoot Loader - 'PRoT':hint used by acomponent ofrelying party to locate a validation service for thePSA Root of Trust - 'ARoT':token. The value is acomponent oftext string that can be used to locate theApplication Root of Trust - 'App':service or acomponentURL specifying the address of theNSPE application - 'TS': a componentservice. A verifier may choose to ignore this claim in favor of other information. psa-verification-service-indicator-type = text psa-verification-service-indicator = ( ? arm_psa_origination => psa-verification-service-indicator-type ) 3.5.2. Profile Definition The Profile Definition claim contains the name of aTrusted Subsystemdocument that describes the "profile" of the report. The document name may include versioning. The value for this specification MUST be PSA_IOT_PROFILE_1. psa-profile-type = "PSA_IOT_PROFILE_1" psa-profile = ( ? arm_psa_profile_id => psa-profile-type ) 4. Token Encoding and Signing The report is encoded as a COSE Web Token (CWT) [RFC8392], similar to the Entity Attestation Token (EAT) [I-D.ietf-rats-eat]. The token consists of a series of claims declaring evidence as to the nature of the instance of hardware and software. The claims are encoded in CBOR [RFC7049] format.5. Claims The token is modelled to include custom values that correspond to the following claims suggested inFor asymmetric key algorithms, theEAT specification: - nonce (mandatory); arm_psa_nonce is used instead - UEID (mandatory); arm_psa_UEID is used instead Later revisions of this documents might phase out those custom claims tosignature structure MUST bereplaced byCOSE-Sign1. For symmetric key algorithms, theEAT standard claims. As noted, some fields muststructure MUST beat least 32 bytes long to provide sufficient cryptographic strength. +-------+-------------+------------------------+--------------------+ | Claim | Claim | Claim Name | CBOR Value Type | | Key | Description | | | +-------+-------------+------------------------+--------------------+ | -7500 | Profile |COSE-Mac0. 5. Collated CDDL psa-token = { psa-nonce-claim, psa-instance-id, psa-verification-service-indicator, psa-profile, psa-implementation-id, psa-client-id, psa-lifecycle, psa-hardware-version, psa-boot-seed, ( psa-software-components // psa-no-sw-measurement ), } arm_psa_profile_id| Text string | | 0 | Definition | | | | | | | | | -7500 | Client ID |= -75000 arm_psa_partition_id| Unsigned integer | | 1 | | | or Negative | | | | | integer | | | | | | | -7500 | Security | arm_psa_security_lifec | Unsigned integer | | 2 | Lifecycle | ycle | | | | | | | | -7500 | Implementat | arm_psa_implementation | Byte string (>=32 | | 3 | ion ID | _id | bytes) | | | | | | | -7500 | Boot Seed |= -75001 arm_psa_security_lifecycle = -75002 arm_psa_implementation_id = -75003 arm_psa_boot_seed| Byte string (>=32 | | 4 | | | bytes) | | | | | | | -7500 | Hardware |= -75004 arm_psa_hw_version| Text string | | 5 | Version | | | | | | | | | -7500 | Software |= -75005 arm_psa_sw_components| Array of map | | 6 | Components | | entries (compound | | | | | map claim). See | | | | | below for allowed | | | | | key-values. | | | | | | | -7500 | No Software | arm_psa_no_sw_measurem | Unsigned integer | | 7 | Measurement | ents | | | | s | | | | | | | | | -7500 | Auth |= -75006 arm_psa_no_sw_measurements = -75007 arm_psa_nonce| Byte string | | 8 | Challenge | | | | | | | | | -7500 | Instance ID |= -75008 arm_psa_UEID| Byte string (the | | 9 | | | type byte of the | | | | | UEID should be set | | | | | to 0x01. The type | | | | | byte is described | | | | | in [I-D.ietf-rats- | | | | | eat].) | | | | | | | -7501 | Verificatio |= -75009 arm_psa_origination| Byte string | | 0 | n Service | | | | | Indicator | | | +-------+-------------+------------------------+--------------------+ When using the Software Components claim each key value MUST correspond to the following types: 1. Text string (type) 2. Byte string (measurement, >=32 bytes) 3. Reserved 4. Text string (version) 5. Byte string (signer ID, >=32 bytes) 6. Text string (measurement description) 6. Example The following example shows an attestation token that was produced for a device that has a single-stage bootloader, and an RTOS with a device management client. From a code point of view, the RTOS and the device management client form a single binary. EC key using curve P-256 with: - x: 0xdcf0d0f4bcd5e26a54ee36cad660d283d12abc5f7307de58689e77cd60452e75 - y: 0x8cbadb5fe9f89a7107e5a2e8ea44ec1b09b7da2a1a82a0252a4c1c26ee1ed7cf - d: 0xc74670bcb7e85b3803efb428940492e73e3fe9d4f7b5a8ad5e480cbdbcb554c2 Key using COSE format (base64-encoded): pSJYIIy621/p+JpxB+Wi6OpE7BsJt9oqGoKgJSpMHCbuHtfPI1ggx0ZwvLfoWzgD77Q olASS5z4/6dT3taitXkgMvby1VMIBAiFYINzw0PS81eJqVO42ytZg0oPRKrxfcwfeWG ied81gRS51IAE= Example of EAT token (base64-encoded): 0oRDoQEmoFkCIqk6AAEk+1ggAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8 6AAEk+lggAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh86AAEk/YSkAlggAA ECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8EZTMuMS40BVggAAECAwQFBgcIC QoLDA0ODxAREhMUFRYXGBkaGxwdHh8BYkJMpAJYIAABAgMEBQYHCAkKCwwNDg8QERIT FBUWFxgZGhscHR4fBGMxLjEFWCAAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0 eHwFkUFJvVKQCWCAAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHwRjMS4wBV ggAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8BZEFSb1SkAlggAAECAwQFB gcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8EYzIuMgVYIAABAgMEBQYHCAkKCwwNDg8Q ERITFBUWFxgZGhscHR4fAWNBcHA6AAEk+RkwADoAAST/WCAAAQIDBAUGBwgJCgsMDQ4 PEBESExQVFhcYGRobHB0eHzoAASUBbHBzYV92ZXJpZmllcjoAAST4IDoAASUAWCEBAA ECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh86AAEk93FQU0FfSW9UX1BST0ZJT EVfMVhAWIYFCO5+jMSOuoctu11pSlQrEyKtDVECPBlw30KfBlAcaDqVEIoMztCm6A4J ZvIr1j0cAFaXShG6My14d4f7Tw== Same token using extended CBOR diagnostic format: 18( [ / protected / h'a10126' / { \ alg \ 1: -7 \ ECDSA 256 \ } / , / unprotected / {}, / payload / h'a93a000124fb5820000102030405060708090a0b0c0d0e0f1011121 31415161718191a1b1c1d1e1f3a000124fa5820000102030405060708090a0b0c0d0e 0f101112131415161718191a1b1c1d1e1f3a000124fd84a4025820000102030405060 708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0465332e312e34055820 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f01624 24ca4025820000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c 1d1e1f0463312e31055820000102030405060708090a0b0c0d0e0f101112131415161 718191a1b1c1d1e1f016450526f54a4025820000102030405060708090a0b0c0d0e0f 101112131415161718191a1b1c1d1e1f0463312e30055820000102030405060708090 a0b0c0d0e0f101112131415161718191a1b1c1d1e1f016441526f54a4025820000102 030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0463322e320 55820000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f 01634170703a000124f91930003a000124ff5820000102030405060708090a0b0c0d0 e0f101112131415161718191a1b1c1d1e1f3a000125016c7073615f76657269666965 723a000124f8203a00012500582101000102030405060708090a0b0c0d0e0f1011121 31415161718191a1b1c1d1e1f3a000124f7715053415f496f545f50524f46494c455f 31'= -75010 psa-hash-type = bytes .size 32 /{bytes .size 48 / bytes .size 64 psa-boot-seed-type = bytes .size 32 psa-boot-seed = ( arm_psa_boot_seed/ -75004: h'000102030405060708090a0b0c0d0e0f10 1112131415161718191a1b1c1d1e1f', /=> psa-boot-seed-type ) psa-client-id-nspe-type = -2147483648...0 psa-client-id-spe-type = 1..2147483647 psa-client-id-type = psa-client-id-nspe-type / psa-client-id-spe-type psa-client-id = ( arm_psa_partition_id => psa-client-id-type ) psa-hardware-version-type = text .regexp "[0-9]{13}" psa-hardware-version = ( ? arm_psa_hw_version => psa-hardware-version-type ) psa-implementation-id-type = bytes .size 32 psa-implementation-id = ( arm_psa_implementation_id/ -75003: h'000102030405060708090a0b0c 0d0e0f101112131415161718191a1b1c1d1e1f', / arm_psa_sw_components / -75006: [ { / measurement / 2: h'000102030405060708090a0b0c0d0e0f101112 131415161718191a1b1c1d1e1f', / version / 4: "3.1.4", / signerID / 5: h'000102030405060708090a0b0c0d0e0f101112131 415161718191a1b1c1d1e1f', / type / 1: "BL" },=> psa-implementation-id-type ) psa-instance-id-type = bytes .size 33 psa-instance-id = ( arm_psa_UEID => psa-instance-id-type ) psa-no-sw-measurements-type = 1 psa-no-sw-measurement = ( arm_psa_no_sw_measurements => psa-no-sw-measurements-type ) psa-nonce-claim = ( arm_psa_nonce => psa-hash-type ) psa-profile-type = "PSA_IOT_PROFILE_1" psa-profile = ( ? arm_psa_profile_id => psa-profile-type ) psa-lifecycle-unknown-type = 0x0000..0x00ff psa-lifecycle-assembly-and-test-type = 0x1000..0x10ff psa-lifecycle-psa-rot-provisioning-type = 0x2000..0x20ff psa-lifecycle-secured-type = 0x3000..0x30ff psa-lifecycle-non-psa-rot-debug-type = 0x4000..0x40ff psa-lifecycle-recoverable-psa-rot-debug-type = 0x5000..0x50ff psa-lifecycle-decommissioned-type = 0x6000..0x60ff psa-lifecycle-type = psa-lifecycle-unknown-type / psa-lifecycle-assembly-and-test-type / psa-lifecycle-psa-rot-provisioning-type / psa-lifecycle-secured-type / psa-lifecycle-non-psa-rot-debug-type / psa-lifecycle-recoverable-psa-rot-debug-type / psa-lifecycle-decommissioned-type psa-lifecycle = ( arm_psa_security_lifecycle => psa-lifecycle-type ) psa-software-component = {/? 1 => text, ; measurement/ 2: h'000102030405060708090a0b0c0d0e0f101112 131415161718191a1b1c1d1e1f', / version / 4: "1.1", / signerID / 5: h'000102030405060708090a0b0c0d0e0f101112131 415161718191a1b1c1d1e1f', /type/ 1: "PRoT" }, { /2 => psa-hash-type, ; measurement/ 2: h'000102030405060708090a0b0c0d0e0f101112 131415161718191a1b1c1d1e1f', /value ? 4 => text, ; version/ 4: "1.0", / signerID / 5: h'000102030405060708090a0b0c0d0e0f101112131 415161718191a1b1c1d1e1f', / type / 1: "ARoT" }, { /5 => psa-hash-type, ; signer id ? 6 => text, ; measurement/ 2: h'000102030405060708090a0b0c0d0e0f101112 131415161718191a1b1c1d1e1f', / version / 4: "2.2", / signerID / 5: h'000102030405060708090a0b0c0d0e0f101112131 415161718191a1b1c1d1e1f', / type / 1: "App" } ], / arm_psa_security_lifecycle / -75002: 12288 / SECURED /, / arm_psa_nonce / -75008: h'000102030405060708090a0b0c0d0e0f10111 2131415161718191a1b1c1d1e1f', / arm_psa_origination / -75010: "psa_verifier", / arm_psa_partition_id / -75001: -1, / arm_psa_UEID / -75009: h'01000102030405060708090a0b0c0d0e0f1011 12131415161718191a1b1c1d1e1f', / arm_psa_profile_id / -75000: "PSA_IoT_PROFILE_1" }),description }/ , / signature / h'58860508ee7e8cc48eba872dbb5d694a542b1322ad0d51023c197 0df429f06501c683a95108a0cced0a6e80e0966f22bd63d1c0056974a11ba332d7877 87fb4f'psa-software-components = ( arm_psa_sw_components => [ + psa-software-component ] )7.psa-verification-service-indicator-type = text psa-verification-service-indicator = ( ? arm_psa_origination => psa-verification-service-indicator-type ) 6. Security and Privacy Considerations This specification re-uses the CWT and the EAT specification. Hence, the security and privacy considerations of those specifications apply here as well. Since CWTs offer different ways to protect thetokentoken, this specification profiles those options andonly usesallows signatures based on use of public keycryptography.cryptography as well as MAC authentication. The token MUST be signed following the structure of the COSE specification [RFC8152]. The COSE type MUST beCOSE-Sign1.COSE-Sign1 for public key signatures or COSE-Mac0 for MAC authentication. Note however that use of MAC authentication is NOT RECOMMENDED due to the associated infrastructure costs for key management and protocol complexities. It may also restrict the ability to interoperate with third parties. Attestation tokens contain information that may be unique to a device and therefore they may allow to single out an individual device for tracking purposes.ImplementationImplementations that have privacy requirements must take appropriate measures to ensure thatonly those claims are included that fulfil the purpose oftheapplication and that users of those devices consenttoken is only used tothe data sharing. 8.provision anonymous/pseudonym keys. 7. IANA Considerations IANA is requested to allocate the claims defined in Section53 to the CBOR Web Token (CWT) Claims registry [IANA-CWT]. The change controller are the authors and the reference is this document.9.8. References9.1.8.1. Normative References [EAN-13] GS1, "International Article Number - EAN/UPC barcodes", 2019, <https://www.gs1.org/standards/barcodes/ean-upc>. [PSA-FF] Arm, "Platform Security Architecture Firmware Framework 1.0 (PSA-FF)", February 2019, <https://pages.arm.com/psa-resources-ff.html>. [PSA-SM] Arm, "Platform Security Architecture Security Model 1.0 (PSA-SM)", February 2019, <https://pages.arm.com/psa-resources-sm.html>. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>. [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, October 2013, <https://www.rfc-editor.org/info/rfc7049>. [RFC8152] Schaad, J., "CBOR Object Signing and Encryption (COSE)", RFC 8152, DOI 10.17487/RFC8152, July 2017, <https://www.rfc-editor.org/info/rfc8152>. [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>. [RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392, May 2018, <https://www.rfc-editor.org/info/rfc8392>.9.2.[RFC8610] Birkholz, H., Vigano, C., and C. Bormann, "Concise Data Definition Language (CDDL): A Notational Convention to Express Concise Binary Object Representation (CBOR) and JSON Data Structures", RFC 8610, DOI 10.17487/RFC8610, June 2019, <https://www.rfc-editor.org/info/rfc8610>. 8.2. Informative References[EAN-13] GS1, "International Article Number - EAN/UPC barcodes", 2019, <https://www.gs1.org/standards/barcodes/ean-upc>.[I-D.ietf-rats-architecture] Birkholz, H., Thaler, D., Richardson, M., and N. Smith, "Remote Attestation Procedures Architecture", Work in Progress, Internet-Draft, draft-ietf-rats-architecture-01, 4 February 2020, <http://www.ietf.org/internet-drafts/ draft-ietf-rats-architecture-01.txt>. [I-D.ietf-rats-eat] Mandyam, G., Lundblade, L., Ballesteros, M., and J. O'Donoghue, "The Entity Attestation Token (EAT)",draft- ietf-rats-eat-01 (workWork inprogress), July 2019.Progress, Internet-Draft, draft-ietf-rats-eat-03, 20 February 2020, <http://www.ietf.org/internet-drafts/draft- ietf-rats-eat-03.txt>. [IANA-CWT] IANA, "CBOR Web Token (CWT) Claims",2019,2020, <https://www.iana.org/assignments/cwt/cwt.xhtml>. [PSA] Arm, "Platform Security Architecture Resources", 2019,<https://www.arm.com/why-arm/architecture/ platform-security-architecture/psa-resources>. [PSA-FF] Arm, "Platform Security Architecture Firmware Framework 1.0 (PSA-FF)", February 2019, <https://pages.arm.com/psa-resources-ff.html>. [PSA-SM] Arm, "Platform Security Architecture Security Model 1.0 (PSA-SM)", February 2019, <https://pages.arm.com/psa-resources-sm.html>.<https://www.arm.com/why-arm/architecture/platform- security-architecture/psa-resources>. [TF-M] Linaro, "Trusted Firmware",2019,2020, <https://www.trustedfirmware.org>. Appendix A. Reference Implementation A reference implementation is provided by the Trusted Firmware project [TF-M]. Appendix B. Example The following example shows an attestation token that was produced for a device that has a single-stage bootloader, and an RTOS with a device management client. From a code point of view, the RTOS and the device management client form a single binary. EC key using curve P-256 with: * x: 0xdcf0d0f4bcd5e26a54ee36cad660d283d12abc5f7307de58689e77cd60452e75 * y: 0x8cbadb5fe9f89a7107e5a2e8ea44ec1b09b7da2a1a82a0252a4c1c26ee1ed7cf * d: 0xc74670bcb7e85b3803efb428940492e73e3fe9d4f7b5a8ad5e480cbdbcb554c2 Key using COSE format (base64-encoded): pSJYIIy621/p+JpxB+Wi6OpE7BsJt9oqGoKgJSpMHCbuHtfPI1ggx0ZwvLfoWzgD77Q olASS5z4/6dT3taitXkgMvby1VMIBAiFYINzw0PS81eJqVO42ytZg0oPRKrxfcwfeWG ied81gRS51IAE= Example of EAT token (base64-encoded): 0oRDoQEmoFkCIqk6AAEk+1ggAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8 6AAEk+lggAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh86AAEk/YSkAlggAA ECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8EZTMuMS40BVggAAECAwQFBgcIC QoLDA0ODxAREhMUFRYXGBkaGxwdHh8BYkJMpAJYIAABAgMEBQYHCAkKCwwNDg8QERIT FBUWFxgZGhscHR4fBGMxLjEFWCAAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0 eHwFkUFJvVKQCWCAAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHwRjMS4wBV ggAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8BZEFSb1SkAlggAAECAwQFB gcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8EYzIuMgVYIAABAgMEBQYHCAkKCwwNDg8Q ERITFBUWFxgZGhscHR4fAWNBcHA6AAEk+RkwADoAAST/WCAAAQIDBAUGBwgJCgsMDQ4 PEBESExQVFhcYGRobHB0eHzoAASUBbHBzYV92ZXJpZmllcjoAAST4IDoAASUAWCEBAA ECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh86AAEk93FQU0FfSW9UX1BST0ZJT EVfMVhAWIYFCO5+jMSOuoctu11pSlQrEyKtDVECPBlw30KfBlAcaDqVEIoMztCm6A4J ZvIr1j0cAFaXShG6My14d4f7Tw== Same token using extended CBOR diagnostic format: 18( [ / protected / h'a10126' / { \ alg \ 1: -7 \ ECDSA 256 \ } / , / unprotected / {}, / payload / h'a93a000124fb5820000102030405060708090a0b0c0d0e0f10111 2131415161718191a1b1c1d1e1f3a000124fa5820000102030405060708090a0b0c 0d0e0f101112131415161718191a1b1c1d1e1f3a000124fd84a4025820000102030 405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0465332e312e 34055820000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1 d1e1f0162424ca4025820000102030405060708090a0b0c0d0e0f10111213141516 1718191a1b1c1d1e1f0463312e31055820000102030405060708090a0b0c0d0e0f1 01112131415161718191a1b1c1d1e1f016450526f54a40258200001020304050607 08090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0463312e30055820000 102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f016441 526f54a4025820000102030405060708090a0b0c0d0e0f101112131415161718191 a1b1c1d1e1f0463322e32055820000102030405060708090a0b0c0d0e0f10111213 1415161718191a1b1c1d1e1f01634170703a000124f91930003a000124ff5820000 102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f3a0001 25016c7073615f76657269666965723a000124f8203a00012500582101000102030 405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f3a000124f771 5053415f496f545f50524f46494c455f 31' / { / arm_psa_boot_seed / -75004: h'000102030405060708090a0b0c0d0e0f 101112131415161718191a1b1c1d1e1f', / arm_psa_implementation_id / -75003: h'000102030405060708090a0b 0c0d0e0f101112131415161718191a1b1c1d1e1f', / arm_psa_sw_components / -75006: [ { / measurement / 2: h'000102030405060708090a0b0c0d0e0f1011 12131415161718191a1b1c1d1e1f', / version / 4: "3.1.4", / signerID / 5: h'000102030405060708090a0b0c0d0e0f1011121 31415161718191a1b1c1d1e1f', / type / 1: "BL" }, { / measurement / 2: h'000102030405060708090a0b0c0d0e0f1011 12131415161718191a1b1c1d1e1f', / version / 4: "1.1", / signerID / 5: h'000102030405060708090a0b0c0d0e0f1011121 31415161718191a1b1c1d1e1f', / type / 1: "PRoT" }, { / measurement / 2: h'000102030405060708090a0b0c0d0e0f1011 12131415161718191a1b1c1d1e1f', / version / 4: "1.0", / signerID / 5: h'000102030405060708090a0b0c0d0e0f1011121 31415161718191a1b1c1d1e1f', / type / 1: "ARoT" }, { / measurement / 2: h'000102030405060708090a0b0c0d0e0f1011 12131415161718191a1b1c1d1e1f', / version / 4: "2.2", / signerID / 5: h'000102030405060708090a0b0c0d0e0f1011121 31415161718191a1b1c1d1e1f', / type / 1: "App" } ], / arm_psa_security_lifecycle / -75002: 12288 / SECURED /, / arm_psa_nonce / -75008: h'000102030405060708090a0b0c0d0e0f101 112131415161718191a1b1c1d1e1f', / arm_psa_origination / -75010: "psa_verifier", / arm_psa_partition_id / -75001: -1, / arm_psa_UEID / -75009: h'01000102030405060708090a0b0c0d0e0f10 1112131415161718191a1b1c1d1e1f', / arm_psa_profile_id / -75000: "PSA_IoT_PROFILE_1" }), } / , / signature / h'58860508ee7e8cc48eba872dbb5d694a542b1322ad0d51023c1 970df429f06501c683a95108a0cced0a6e80e0966f22bd63d1c0056974a11ba332d 787787fb4f' ] ) Contributors We would like to thank the followingsupporterscolleagues for their contributions: * Laurence Lundblade Security Theory LLC lgl@securitytheory.com * Tamas Ban Arm Limited Tamas.Ban@arm.comAppendix B. Reference Implementation Trusted Firmware M (TF-M) [TF-M] is the name of the open source project that provides a reference implementation of PSA APIs and an SPM, created for the latest* Sergei Trofimov Armv8-M microcontrollersLimited Sergei.Trofimov@arm.com Acknowledgments Thanks to Carsten Bormann for help withTrustZone technology. TF-M provides foundational firmware components that silicon manufacturersthe CDDL andOEMs can build on (including trusted boot, secure device initialisationNicholas Wood for ideas andsecure function invocation).comments. Authors' Addresses Hannes Tschofenig(editor)Arm LimitedEMail: hannes.tschofenig@arm.comEmail: Hannes.Tschofenig@arm.com Simon Frost Arm LimitedEMail:Email: Simon.Frost@arm.com Mathias Brossard Arm LimitedEMail:Email: Mathias.Brossard@arm.com Adrian Shaw Arm LimitedEMail:Email: Adrian.Shaw@arm.com Thomas Fossati Arm LimitedEMail: thomas.fossati@arm.comEmail: Thomas.Fossati@arm.com