中文翻译 — 第 1-4 章 原文:FiRa® Common Service & Management Layer (CSML) Technical Specification V1.0.0 翻译日期:2026-06-24
1 Executive Summary / 执行摘要
本文档规定了实现 FiRa 安全测距(FiRa Secure Ranging)所必需的通用逻辑组件,即 FiRa 框架(FiRa Framework)、带外通道(Out-Of-Band Channels)、基于 OOB 通道的安全通道(Secure Channels)、带有 FiRa Applet 的 FiRa 安全组件(FiRa Secure Component)以及安全组件与 UWB 子系统(UWB Subsystem)之间的安全通道。本文档还规定了框架 API(Framework API),即 FiRa 使能应用(FiRa-enabled Application)通过该参考 API 与 FiRa 框架交互。
2 References / 引用
2.1 Documents / 引用文档
- IEEE Std 802.15.4-2020, IEEE Standard for Low-Rate Wireless Personal Area Networks (WPANs)
- IEEE Std 802.15.4z-2020, IEEE Standard for Low-Rate Wireless Networks—Amendment 1: Enhanced Ultra Wideband (UWB) Physical Layers (PHYs) and Associated Ranging Techniques
- FiRa Use Cases & Requirements Document
- FiRa Consortium UWB PHY Technical Requirements, Version 1.3.0
- FiRa Consortium UWB MAC Technical Requirements, Version 1.3.0
- FiRa Consortium UCI Generic Specification, Version 1.1.0
- FiRa® Secure UWB Service (SUS) API Technical Specification v1.0.0
- FiRa® Bluetooth® Low Energy Out-of-Band Channel Technical Specification v.1.0.0
- FiRa® Physical Access Control System (PACS) Profile Technical Specification v1.0.0
- RFC 2119, Key words for use in RFCs to Indicate Requirement Levels
- RFC 5652, Cryptographic Message Syntax (CMS)
- NIST SP 800-108, Recommendation for Key Derivation Using Pseudorandom Functions
- NIST SP 800-38A, Recommendation for Block Cipher Modes of Operation: Methods and Techniques
- NIST SP 800-38B, Recommendation for Block Cipher Modes of Operation: the CMAC Mode for Authentication
- FIPS 197, Advanced Encryption Standard (AES)
- Java Card Classic Platform Specification 3.1
- GlobalPlatform Technology Secure Channel Protocol '03' Card Specification v2.3 – Amendment D v1.2
- GlobalPlatform Technology Card Specification v2.3.1
- GlobalPlatform Technology Confidential Card Content Management Card Specification v2.3 – Amendment A v1.2
- GlobalPlatform Technology Secure Channel Protocol '11' Card Specification v2.3 – Amendment F
- GlobalPlatform Technology Secure Element Management Service Card Specification v2.3 – Amendment I
- INCITS 504-1-2013, Information Technology - Generic Identity Command Set - Part 1: Card Application Command Set
- ISO/IEC 9797-1:2011, Information technology — Security techniques — Message Authentication Codes (MACs) — Part 1: Mechanisms using a block cipher
- ISO/IEC 7816-4:2020, Identification cards — Integrated circuit cards — Part 4: Organization, security and commands for interchange
- ISO/IEC 7816-5:2004, Identification cards — Integrated circuit cards — Part 5: Registration of application providers
- ITU-T X.660, Information technology – Procedures for the operation of object identifier registration authorities: General procedures and top arcs of the international object identifier tree
2.2 Terms / 术语定义
表 1 — 定义(Table 1 — Definitions)
| 术语(Term) | 定义(Definition) |
|---|---|
| Access Credential / 访问凭证 | 数字对象,规定了 PACS 内的访问权限。详见 FiRa Consortium Physical Access Control Service Technical Specification。 |
| Application Dedicated File (ADF) / 应用专用文件 | 应用数据结构(Application Data Structure)中的一种数据结构,承载如应用和应用特定数据,详见 ISO/IEC 7816-4。 |
| Application Protocol Data Unit (APDU) / 应用协议数据单元 | 与 FiRa 设备中的应用数据结构通信时使用的命令和响应。APDU 的使用方法详见 ISO/IEC 7816-4。 |
| Application Data Structure / 应用数据结构 | 包含根级别和应用级别的文件系统,持有如 UWB Controlee Info 和 UWB Session Data 等虚拟数据对象(Data Object),用于 UWB 会话建立(见 7.5 节)。应用数据结构的示例包括 8.2 节所述的 FiRa Applet、专有 applet 或 FiRa 设备中的等效实现。 |
| Block-based Mode / 基于块模式 | IEEE Std 802.15.4-2020 定义的两种测距模式之一。 |
| Common Service and Management / 公共服务与管理 | 本规范的名称。 |
| Command APDU / 命令 APDU | 包含命令的 APDU(用法见 GlobalPlatform Technology Card Specification v2.3.1)。 |
| Controller / 控制器 | 通过发送测距控制消息(Ranging Control Message, CM)定义和控制测距参数的 ERDEV。详见 FiRa Consortium UWB MAC Technical Requirements 第 5.1.1 节。 |
| Controlee / 被控设备 | 从 CM 中接收控制器参数的 ERDEV。详见 FiRa Consortium UWB MAC Technical Requirements 第 5.1.2 节。 |
| Data Object / 数据对象 | BER-TLV 编码信息,由强制性的标签字段、强制性的长度字段和条件性的值字段拼接组成。 |
| Dynamic STS Mode / 动态 STS 模式 | STS 为机密且在测距会话期间永不重复的工作模式。该模式下 STS 由安全组件管理。 |
| EPOCH / 纪元 | 系统时间测量的起始日期和时间。本规范使用 POSIX 纪元,即 1970 年 1 月 1 日 00:00:00 UT。 |
| Extended Logical Channels / 扩展逻辑通道 | 相对于 ISO/IEC 7816-4 所述基本逻辑通道的附加逻辑通道。 |
| FiRa Applet | FiRa 定义的在安全组件上运行的 applet,持有 UWB 参数和服务数据,可由服务提供方(Service Provider)配置。 |
| FiRa Device / FiRa 设备 | 符合 IEEE Std 802.15.4-2020 定义的增强测距设备(Enhanced Ranging Device, ERDEV),同时满足 FiRa 规定的要求。 |
| FiRa-enabled Application / FiRa 使能应用 | 使用框架 API 配置 FiRa OOB 连接器、安全服务和 UWBS 以建立 UWB 会话的应用程序。 |
| FiRa Framework / FiRa 框架 | 逻辑软件组件的集合,包括 FiRa Profile Manager、FiRa OOB Connector、Secure Service 和 UWB Service(详见第 4.1.1.2 节)。 |
| FiRa OOB Connector / FiRa OOB 连接器 | 负责在 FiRa 设备之间建立 OOB 连接的软件组件。 |
| FiRa Profile / FiRa 配置文件 | 为特定用例建立 UWB 会话的明确定义方式。 |
| FiRa Profile Manager / FiRa 配置文件管理器 | FiRa 框架中管理 FiRa 设备上可用 FiRa Profile 的软件组件。 |
| FiRa Service / FiRa 服务 | 向最终用户提供服务的用例实现。依赖于 FiRa 设备,包含启用该用例所需的所有硬件和软件(包括设备端和服务器端)。 |
| FiRa Smart Device / FiRa 智能设备 | 同时实现了可选框架 API 的 FiRa 设备。 |
| Global Dedicated File (GDF) / 全局专用文件 | 应用数据结构的根级别,持有建立 UWB 会话所需的数据。应用数据结构可以是 8.2 节所述的 FiRa Applet、专有 applet 或 FiRa 设备中的等效实现。 |
| Framework API / 框架 API | FiRa 使能应用用于与 FiRa 框架通信的 API。 |
| Initiator / 发起方 | 发起测距交换的 ERDEV。详见 FiRa Consortium UWB MAC Technical Requirements 第 5.1.3 节。 |
| Interval-based mode / 基于间隔模式 | IEEE Std 802.15.4-2020 定义的两种测距模式之一。 |
| Key Derivation Function (KDF) / 密钥派生函数 | NIST SP 800-108 规定的密钥派生函数。 |
| Key Exchange Applet / 密钥交换 Applet | 生成 RDS 并通过 SUS Applet 提供给 UWBS 的 applet。 |
| Key Version Number (KVN) / 密钥版本号 | 密钥集的唯一标识,在认证过程中用于标识所使用的密钥集。 |
| Logical Channel / 逻辑通道 | ISO/IEC 7816-4 定义的安全元件与另一实体之间的接口。 |
| Object Identifier (OID) / 对象标识符 | 应用数据结构中 ADF 的标识符。OID 由 ITU 在 ITU-T X.660 中定义。 |
| Out-Of-Band (OOB) / 带外 | 不使用 UWB 作为底层无线电技术的数据通信。 |
| OOB Service / OOB 服务 | 假定由 FiRa 设备的本地操作系统实现的软件组件。OOB Service 负责与 OOB 子系统交互。 |
| OOB Subsystem / OOB 子系统 | 负责在 FiRa 设备之间建立 OOB 连接的硬件组件。 |
| Privacy Selection Key / 隐私选择密钥 | 用于在认证过程中保护隐私的密钥。 |
| Provisioning Authority (PA) / 配置授权方 | 有权管理 FiRa 设备应用数据结构的第三方实体。服务提供方可使用配置授权方将其 ADF 写入应用数据结构、配置 FiRa 服务,或在 FiRa 服务在设备上停用时将其删除。 |
| Pseudorandom Function (PRF) / 伪随机函数 | 密钥和输入的确定性函数,其输出与真正随机函数不可区分。 |
| Ranging Data Set (RDS) / 测距数据集 | 建立 UWB 会话所需的数据(如 UWB Session Key、Session ID 等),需要保护其机密性、真实性和完整性。通过 SUS API 提供给 UWBS。 |
| Responder / 响应方 | 在测距交换中响应发起方的 ERDEV。详见 FiRa Consortium UWB MAC Technical Requirements 第 5.1.4 节。 |
| Responder Specific Sub-session Key / 响应方特定子会话密钥 | 在使用动态 STS 和响应方特定子会话密钥时,用于保护从响应方到发起方的 UWB 消息的密钥。 |
| Response APDU / 响应 APDU | 包含响应的 APDU(用法见 GlobalPlatform Technology Card Specification v2.3.1)。 |
| Scrambled Timestamp Sequence (STS) / 扰码时序序列 | 用于确保测距测量时间戳的完整性和准确性的加密序列。详见 FiRa Consortium UWB MAC Technical Requirements 第 5.5 节。 |
| Secure Channel / 安全通道 | 抗窃听和篡改的数据通道。 |
| Secure Component / 安全组件 | 具有定义安全级别的实体,与 UWBS 接口交互,主要目的是在使用动态 STS 时向其提供 Ranging Data Set(RDS)。 |
| Security Domain (SD) / 安全域 | 用法见 GlobalPlatform Technology Card Specification v2.3.1。 |
| Secure Element (SE) / 安全元件 | 防篡改的安全硬件组件,可用作 FiRa 设备中的安全组件。 |
| Secure Messaging / 安全消息传递 | 在安全通道上传输的结构化数据交换。 |
| Secure Messaging Authentication Key / 安全消息认证密钥 | 用于建立安全通道以执行安全消息传递的密钥。 |
| Secure Messaging Session Keys / 安全消息会话密钥 | 安全通道建立后用于确保安全消息传递的密钥。 |
| Secure Ranging / 安全测距 | 基于通过强密码操作生成的 STS 进行的测距和距离界定计算。 |
| Secure Service / 安全服务 | FiRa 框架中负责与系统的安全组件(如安全元件或 TEE)交互的软件组件。 |
| Secure UWB Service (SUS) / 安全 UWB 服务 | 由 SUS Applet 提供的服务。 |
| Service Applet / 服务 Applet | 安全元件上处理服务特定事务(如提供开锁凭证)的 applet,在 UWB 会话中达到指定接近条件后触发。 |
| Service Data / 服务数据 | 由服务提供方定义的、需要在两个 FiRa 设备之间传输以实现完整用例(FiRa 服务)的数据,例如开门凭证、旅行钱包扣款信息等。 |
| Service Provider / 服务提供方 | 定义并提供向最终用户提供特定服务所需的硬件和软件的实体。 |
| Short Address / 短地址 | 16 位 UWB 设备 MAC 地址。详见 FiRa Consortium UWB MAC Technical Requirements。 |
| Static STS Mode / 静态 STS 模式 | STS 在会话期间重复、且不必由安全组件管理的工作模式。 |
| Supplementary Security Domain (SSD) / 补充安全域 | 除发行方安全域(Issuer Security Domain)之外的附加安全域(参照 ISO/IEC 9797-1:2011)。 |
| SUS Applet | 驻留在安全元件上的 applet,与 FiRa Applet 或 Service Applet 通信以获取启用与其他 FiRa 设备的安全 UWB 会话所需的数据,然后将该信息传递给 UWBS。 |
| SUS Internal API / SUS 内部 API | SUS Applet 向 FiRa Applet 或能够生成 RDS 的 Service Applet 暴露的接口,用于将 RDS 传输给 SUS Applet。在此定义中,FiRa Applet 和 Service Applet 都是密钥交换 Applet(Key Exchange Applet)的实例。 |
| SUS External API / SUS 外部 API | SUS Applet 向 UWB 子系统暴露的接口,使 UWB 子系统能够获取 RDS。 |
| UWB Sub-session ID / UWB 子会话 ID | 分配给参与一对多 UWB 会话的 Controlee 的 32 位唯一整数,使用响应方特定子会话密钥。 |
| UWB Service / UWB 服务 | 实现相关的软件组件,提供对 UWB 子系统的访问。 |
| UWB Session / UWB 会话 | 从控制器和 Controlee 开始通过 UWB 通信到停止通信的期间。会话可包括测距、数据传输或两者同时进行。 |
| UWB Session ID / UWB 会话 ID | 标识 UWB 会话的 32 位唯一整数,在控制器和 Controlee 之间共享。 |
| UWB Session Key / UWB 会话密钥 | 用于保护 UWB 会话的密钥。 |
| UWB Subsystem (UWBS) / UWB 子系统 | 实现 FiRa PHY 和 MAC 规范的硬件组件。通过 UCI 逻辑接口层与 FiRa 框架交互,并通过与安全组件交互获取 Ranging Data Set。 |
| Vendor ID / 厂商标识符 | IEEE 802.15.4 规范中定义的 16 位唯一厂商 ID。 |
2.3 Abbreviations and Acronyms / 缩略语和缩写词
表 2 — 缩略语和缩写词(Table 2 — Abbreviations and Acronyms)
| 缩写 | 定义 |
|---|---|
| ADF | Application Dedicated File / 应用专用文件 |
| AID | Application Identifier / 应用标识符 |
| AoA | Angle of Arrival / 到达角 |
| APDU | Application Protocol Data Unit / 应用协议数据单元 |
| BER | Basic Encoding Rules / 基本编码规则 |
| CA | Certificate Authority / 证书颁发机构 |
| C-APDU | Command APDU / 命令 APDU |
| C-IV | Command Initial Vector / 命令初始向量 |
| C-MAC | Command Message Authentication Code / 命令消息认证码 |
| CM | Ranging Control Message / 测距控制消息 |
| CMAC | Cipher-based MAC / 基于密码的消息认证码 |
| CP | Connector Primary / 连接器主设备 |
| CPS | Connector Primary Service / 连接器主设备服务 |
| CS | Connector Secondary / 连接器从设备 |
| CSS | Connector Secondary Service / 连接器从设备服务 |
| DGI | Data Grouping Identifier / 数据分组标识符 |
| DO | Data Object / 数据对象 |
| DS-TWR | Double-sided Two-Way Ranging / 双边双向测距 |
| EC | Encryption Counter / 加密计数器 |
| ECC | Elliptic Curve Cryptography / 椭圆曲线密码学 |
| ERDEV | Enhanced Ranging Device / 增强测距设备 |
| FCI | File Control Information / 文件控制信息 |
| FOM | Figure of Merit / 品质因数 |
| GDF | Global Dedicated File / 全局专用文件 |
| IV | Initial Vector / 初始向量 |
| KDF | Key Derivation Function / 密钥派生函数 |
| KVN | Key Version Number / 密钥版本号 |
| LV | Length-Value / 长度-值 |
| MAC | Message Authentication Code / 消息认证码 |
| MRR | Measurement Result Report / 测量结果报告 |
| MRRM | Measurement Result Report Message / 测量结果报告消息 |
| OID | Object Identifier / 对象标识符 |
| OOB | Out-Of-Band / 带外 |
| PACS | Physical Access Control System / 物理访问控制系统 |
| PA | Provisioning Authority / 配置授权方 |
| PRF | Pseudorandom Function / 伪随机函数;或 Pulse Repetition Frequency / 脉冲重复频率 |
| QOS | Quality of Service / 服务质量 |
| R-APDU | Response APDU / 响应 APDU |
| RDS | Ranging Data Set / 测距数据集 |
| RFU | Reserved for Future Use / 保留将来使用 |
| RFM | Ranging Final Message / 测距最终消息 |
| RIM | Ranging Initiation Message / 测距发起消息 |
| R-IV | Response Initial Vector / 响应初始向量 |
| R-MAC | Response Message Authentication Code / 响应消息认证码 |
| RRM | Ranging Result Message / 测距结果消息 |
| RSTU | Ranging Scheduling Time Unit / 测距调度时间单位 |
| SC1 | Secure Channel 1 / 安全通道 1(见 7.2 节) |
| SC2 | Secure Channel 2 / 安全通道 2(见 7.3 节) |
| SD | Security Domain / 安全域 |
| SE | Secure Element / 安全元件 |
| SIO | Sharable Interface Object / 可共享接口对象 |
| SSD | Supplementary Security Domain / 补充安全域 |
| STS | Scrambled Timestamp Sequence / 扰码时序序列 |
| SUS | Secure UWB Service / 安全 UWB 服务 |
| TEE | Trusted Execution Environment / 可信执行环境 |
| TLV | Tag-Length-Value / 标签-长度-值 |
| ToF | Time of Flight / 飞行时间 |
| UCI | UWB Command Interface / UWB 命令接口 |
| UWB | Ultra Wideband / 超宽带 |
3 Conventions / 约定
本文档中的关键词"REQUIRED"(要求)、"SHALL"(应)、"SHALL NOT"(不应)、"SHOULD"(宜)、"SHOULD NOT"(不宜)、"RECOMMENDED"(建议)、"MAY"(可)和"OPTIONAL"(可选)应按照 RFC 2119 中的描述进行解释。
本文档中,若干术语以每个单词首字母大写、其余字母小写的方式印刷(例如 Secure Element)。这些术语在表 1 中定义。这些单词的任何小写用法具有普通的英文含义。
十六进制值以"0x"前缀标识。
二进制值以"0b"前缀标识。
4 Architectural Overview / 架构概述
FiRa 设备(FiRa Device)是符合 IEEE Std 802.15.4-2020 定义的增强测距设备(Enhanced Ranging Device, ERDEV),它通过使用先前与其他 FiRa 设备交换的信息(例如通过 OOB 通道),通过 UWB 会话与另一个 FiRa 设备进行交互。FiRa 智能设备(FiRa Smart Device)是同时实现了框架 API(Framework API)的 FiRa 设备。框架 API 允许设备上的 FiRa 使能应用以标准化方式使用设备的 UWB 能力(见 10.3 节)。
下图描述了 FiRa 设备的分层架构。
图 1 — FiRa 设备架构(Figure 1 — FiRa Device Architecture)
图中标注翻译对照:
| English | 中文 |
|---|---|
| UWBS | UWB 子系统(UWB Subsystem) |
| UWB Subsystem | UWB 子系统 |
MAC 层和 PHY 层统称为 UWB 子系统(UWB Subsystem, UWBS)。它基于 IEEE Std 802.15.4z-2020 规范,支持 FiRa Use Cases & Requirements Document 中定义的用例。
公共服务与管理层规范(即本文档)定义了为 FiRa 使能应用实现 UWB 安全测距所必需的通用组件和流程。
4.1 System Architecture / 系统架构
本节描述了 FiRa 系统架构以及 FiRa 设备实现的 FiRa 框架的功能模块。
FiRa 区分 FiRa 智能设备(FiRa Smart Device)和 FiRa 设备(FiRa Device)。FiRa 设备是符合 IEEE Std 802.15.4z-2020 定义的增强测距设备(ERDEV),通过使用先前通过 OOB 通道与其他 FiRa 设备交换的信息,通过 UWB 会话(即控制器和 Controlee 开始通过 UWB 通信到停止通信的期间,包括测距、数据传输或两者同时进行)与另一个 FiRa 设备交互。FiRa 智能设备是同时实现了框架 API 的 FiRa 设备。框架 API 允许设备上的应用以标准化方式使用设备的 UWB 能力(见 10.3 节)。FiRa 智能设备可承载多个 FiRa 使能应用,包括由第三方提供、用户自行安装的应用(例如手机)。FiRa 设备不暴露框架 API,但可使用专有接口仅支持制造商提供的特定应用(例如物理访问读取器)。
图 2 — FiRa 智能设备和 FiRa 设备的软件组件和接口示例(Figure 2 — Example of software components and interfaces)
图中标注翻译对照:
| English | 中文 |
|---|---|
| FiRa Smart Device | FiRa 智能设备 |
| FiRa Device | FiRa 设备 |
| FiRa-enabled Application | FiRa 使能应用 |
| FiRa Framework | FiRa 框架 |
| Framework API | 框架 API |
| Proprietary API | 专有 API |
| FiRa Profile Manager | FiRa 配置文件管理器 |
| FiRa OOB Connector | FiRa OOB 连接器 |
| Secure Service | 安全服务 |
| UWB Service | UWB 服务 |
| OOB Service | OOB 服务 |
各功能实体的角色及实体间关系定义见第 4.1.1 节。
4.1.1 Functional Entities / 功能实体
本节描述各功能实体的角色。
4.1.1.1 FiRa-enabled Application / FiRa 使能应用
FiRa 使能应用使用框架 API 触发 UWBS 建立 UWB 会话。它实例化某个 FiRa 配置文件(FiRa Profile),或通过提供其自身的 OOB 连接器和 UWBS 配置来使用自定义配置文件。应用还使用框架 API 处理相关事件,例如:
- 服务发现(Service discovery)
- 测距通知(Ranging notifications)
- 错误条件(Error conditions)
4.1.1.2 The FiRa Framework / FiRa 框架
图 3 — FiRa 框架(Figure 3 — FiRa Framework)
图中标注翻译对照:
| English | 中文 |
|---|---|
| FiRa Framework | FiRa 框架 |
| FiRa-enabled Application(s) | FiRa 使能应用 |
| Framework API | 框架 API |
| FiRa Profile Manager | FiRa 配置文件管理器 |
| FiRa OOB Connector(s) | FiRa OOB 连接器 |
| Secure Service | 安全服务 |
| UWB Service | UWB 服务 |
| OOB Service(s) | OOB 服务 |
| OOB Subsystem | OOB 子系统 |
| UWBS | UWB 子系统 |
| Secure Component(s) | 安全组件 |
| Legend | 图例 |
| Hardware | 硬件 |
| Software | 软件 |
FiRa 框架是逻辑软件组件的集合。FiRa 使能应用通过框架 API 与 FiRa 框架交互。FiRa 框架的软件组件包括:
- FiRa Profile Manager — 配置文件管理器
- FiRa OOB Connector — OOB 连接器
- Secure Service — 安全服务
- UWB Service — UWB 服务
- OOB Service — OOB 服务
4.1.1.2.1 FiRa Profile Manager / FiRa 配置文件管理器
FiRa Profile Manager 管理 FiRa 设备上可用的 FiRa Profile。FiRa Profile 是在 FiRa 设备之间建立通信所需参数的集合,包括:
- 使用哪个 OOB 安全通道
- UWB 和 OOB 配置参数的值
- 是否强制要求使用特定安全组件
- ADF 的文件结构
配置实例(profile instance)是 FiRa 使能应用通过框架 API 请求创建的 FiRa Profile 实例。
FiRa Profile 在单独的 FiRa 规范文档中定义。它们有助于减少建立过程中需要传输的数据量,并促进互操作性。然而,希望为特定用例定义自己 UWB 参数集的服务提供方也可使用自定义配置文件选项。
FiRa Profile Manager 还将 UWB 和 OOB 配置参数从 FiRa 使能应用中抽象出来。它与 FiRa OOB Connector 交互,并提供方法将通过 OOB 连接交换的应用协议数据单元(APDU)路由到驻留在 FiRa 设备安全组件上的 FiRa Applet(通过与 Secure Service 交互)。将发送至安全组件和从安全组件接收的数据格式化为 APDU 是常见做法,本文档沿用此做法,其格式符合 ISO/IEC 7816-4。
为优化 UWB 资源利用和良好的用户体验,FiRa 使能应用可以测距频率和优先级的维度请求配置实例的 QoS(服务质量)。FiRa Profile Manager 接收来自多个 FiRa 使能应用的 QoS 请求,并为每个应用决定测距频率。FiRa Profile Manager 将指示 FiRa 使能应用的 QoS 要求是否可满足。如果请求无法满足,它还可提供可支持 QoS 水平的信息(更多细节见第 10 节的 Framework API 描述)。
4.1.1.2.2 FiRa OOB Connector / FiRa 带外连接器
FiRa OOB Connector(FiRa OOB 连接器)是负责在 FiRa 设备之间建立和管理 OOB 连接的软件组件。它使用 OOB Service 与 OOB 子系统通信。
FiRa 设备可使用 OOB 连接执行建立 UWB 会话所需的信息交换所需的 APDU 传输。FiRa OOB 子系统和 FiRa Profile Manager 不感知 APDU 的内容。FiRa OOB 子系统、FiRa OOB Connector 和 FiRa Profile Manager 应充当到安全组件的逻辑管道,不得基于 APDU 的内容做出任何决策。
关于如何使用低功耗蓝牙(Bluetooth Low Energy)建立 OOB 连接的进一步细节见第 5 节。
4.1.1.2.3 Secure Service / 安全服务
Secure Service(安全服务)是假定由 FiRa 设备的本地操作系统实现的组件。Secure Service 负责与设备的安全组件(如安全元件 SE 或可信执行环境 TEE)交互。
4.1.1.2.4 UWB Service / UWB 服务
UWB Service(UWB 服务)是实现相关的软件组件,通过实现 UCI 提供从 Profile Manager 到 UWBS 的访问。
4.1.1.2.5 OOB Service / 带外服务
OOB Service(OOB 服务)是假定由 FiRa 设备的本地操作系统实现的软件组件。OOB Service 负责与 OOB 子系统交互。
4.1.1.3 Secure Component / 安全组件
安全组件(Secure Component)是安全的硬件组件,应提供以下两个接口:1)与 FiRa 框架交互;2)与 UWBS 交互,以向其提供 Ranging Data Set(RDS)。
4.1.1.4 UWB Subsystem (UWBS) / UWB 子系统
UWBS(UWB 子系统)是实现 FiRa PHY 和 MAC 规范的硬件组件。UWBS 通过 UWB 命令接口(UWB Command Interface, UCI)与 FiRa 框架交互,并使用 FiRa Consortium Secure UWB Service API 规范中定义的 SUS 外部 API 直接从安全组件获取 RDS。
4.2 Device Architecture / 设备架构
本节描述了使用安全元件(Secure Element)作为安全组件的 FiRa 设备的内部架构。
FiRa 设备包含以下组件:
- 应用:需要 FiRa UWB 功能的应用,通过 FiRa 框架访问 UWBS。
- FiRa 框架:提供对 FiRa Profile、单个 UWB 设置和通知的访问,由 FiRa Profile Manager、FiRa OOB Connector、Secure Service 和 UWB Service 组成。
- 安全元件(SE):包含 FiRa Applet、SUS Applet 以及可选的一个或多个 Service Applet。FiRa Applet 包含安全生成 Ranging Data Set(RDS)所需的应用专用文件(ADF),并通过 SUS Applet 将 RDS 传输给 UWBS。服务提供方可使用单独的 Service Applet 处理服务数据(Service Data)。Service Applet 可以使用 FiRa Applet 通过 SUS Applet 将 RDS 提供给 UWBS,或使用 SUS 内部 API 直接与 SUS Applet 通信。FiRa 规范中仅详细描述了第一种选项。
- FiRa OOB Connector:负责在 FiRa 设备之间建立 OOB 连接的软件组件。
- UWB Service:管理 UWBS 的软件组件。UWBS 执行 UWB 会话管理,并与另一个 FiRa 设备的 UWBS 通信。UWBS 从 SE 接收安全测距所需的 RDS。如果 UWB 会话满足预定义条件,服务数据可被转发到 SE 上的 Service Applet。
图 4 — FiRa 设备功能架构(Figure 4 — FiRa Device Functional Architecture)
图中标注翻译对照:
| English | 中文 |
|---|---|
| FiRa-enabled Application | FiRa 使能应用 |
| Framework API | 框架 API |
| FiRa Framework | FiRa 框架 |
| FiRa Profile Manager | FiRa 配置文件管理器 |
| FiRa OOB Connector | FiRa OOB 连接器 |
| Secure Service / UWB Service | 安全服务 / UWB 服务 |
| OOB Service / OOB Subsystem | OOB 服务 / OOB 子系统 |
| OOB Channel | OOB 通道 |
| UWB Subsystem (UWBS) | UWB 子系统 |
| UCI | UWB 命令接口 |
| Secure Element | 安全元件(SE) |
| Secure UWB Service Applet (SUS Applet) | 安全 UWB 服务 Applet |
| FiRa Applet | FiRa Applet |
| SUS Internal API | SUS 内部 API |
| SUS External API | SUS 外部 API |
| SIO | 可共享接口对象(Shareable Interface Object) |
| Key Exchange Applets | 密钥交换 Applet |
| Service Applets | 服务 Applet |
| Service Applet APDUs | 服务 Applet APDU |
| FiRa Applet APDUs | FiRa Applet APDU |
| Other Subsystem (e.g. NFC Controller) | 其他子系统(如 NFC 控制器) |
| FiRa defined interface | FiRa 定义接口 |
| Non-FiRa defined interface | 非 FiRa 定义接口 |
| FiRa defined component | FiRa 定义组件 |
| Non-FiRa defined component | 非 FiRa 定义组件 |
4.2.1 Functional Flow / 功能流程
4.2.1.1 Functional Flow - Static STS / 静态 STS 功能流程
对于使用静态 STS(Static STS)的 UWB 会话,其功能流程(如下图 5 所示)不涉及 Secure Service、FiRa Applet 或 SUS Applet 的使用。在此用例中,使用 FiRa MAC Requirements 中规定的 UWB Session Key 固定值。
图 5 — 静态 STS 功能流程(Figure 5 — Functional Flow - Static STS)
图中标注翻译对照:
| English | 中文 |
|---|---|
| FiRa-enabled Application | FiRa 使能应用 |
| FiRa Framework API | FiRa 框架 API |
| FiRa Profile Manager | FiRa 配置文件管理器 |
| FiRa OOB Connectors | FiRa OOB 连接器 |
| UWB Service | UWB 服务 |
| Secure Service | 安全服务 |
| FiRa Applet | FiRa Applet |
| SUS Applet | SUS Applet |
| UWBS | UWB 子系统 |
| UCI | UWB 命令接口 |
| UCI Notifications | UCI 通知 |
| UCI Notification Flow | UCI 通知流 |
| Control and CMD flow | 控制和命令流 |
| OOB Connection | OOB 连接 |
| Unused blocks in Static STS | 静态 STS 中未使用的模块 |
| Unused flows in Static STS | 静态 STS 中未使用的流 |
| Step 1 / Step 2 | 步骤 1 / 步骤 2 |
图 5 展示了使用静态 STS 的典型 UWB 会话流程。后续章节提供更多细节。图中编号步骤的描述如下:
- 步骤 1:FiRa 使能应用与 FiRa 框架交互,实例化一个 FiRa Profile,以启用与另一个 FiRa 设备的后续 OOB 和 UWB 通信。对应交互如下:
- 步骤 1a:通过 FiRa 框架 API,FiRa 使能应用请求 FiRa 框架(其 FiRa Profile Manager)实例化一个特定的 FiRa Profile,该 Profile 包含部分 UWB 配置参数(包括静态 STS 服务部署类型),并指定要使用的 OOB 发现技术类型。
-
步骤 1b:一旦另一个 FiRa 设备进入 OOB 范围,FiRa 框架的 FiRa OOB Connector 功能与该 FiRa 设备建立 OOB 通道,通过该通道可交换 UWB 配置信息。然后 FiRa OOB Connector 触发 FiRa Profile Manager 启动 UWB 会话建立的步骤。
-
步骤 2:基于 FiRa 使能应用提供的信息以及通过 OOB 通道接收的信息,FiRa 框架通过 UWB Service 配置 UWBS 以进行静态 STS 操作,之后 UWB 会话变为活动状态。对应交互如下:
- 步骤 2a:FiRa Profile Manager 激活 UWB Service,使 FiRa 框架能够与 UWBS 交互。
- 步骤 2b:UWB Service 通过 UCI 命令处理 UWBS 的配置。UWB Service 将 RDS 传输给 UWBS。
- 步骤 2c:两个 UWBS 发起 UWB 会话。UWB 会话的确切开始时间由 UWB Service 确定。
- 步骤 2d:FiRa Profile Manager 通过 UCI 定义的通知定期接收 UWB 会话状态通知。
4.2.1.2 Functional Flow - Dynamic STS / 动态 STS 功能流程
图 6 — 动态 STS 功能流程(Figure 6 — Functional Flow - Dynamic STS)
图中标注翻译对照:
| English | 中文 |
|---|---|
| FiRa-enabled Application | FiRa 使能应用 |
| FiRa Framework API | FiRa 框架 API |
| FiRa Profile Manager | FiRa 配置文件管理器 |
| FiRa OOB Connectors | FiRa OOB 连接器 |
| UWB Service | UWB 服务 |
| Secure Service | 安全服务 |
| FiRa Applet | FiRa Applet |
| SUS Applet | SUS Applet |
| UWBS | UWB 子系统 |
| UCI | UWB 命令接口 |
| UCI Notifications | UCI 通知 |
| UCI Notification Flow | UCI 通知流 |
| Control and CMD flow | 控制和命令流 |
| OOB Connection | OOB 连接 |
| Applet Action Status | Applet 操作状态 |
| Step 1 / Step 2 / Step 3 | 步骤 1 / 步骤 2 / 步骤 3 |
图 6 展示了使用动态 STS(Dynamic STS)的典型 UWB 会话流程。图中编号步骤的描述如下:
- 步骤 1:FiRa 使能应用与 FiRa 框架交互,实例化一个 FiRa Profile,以启用与另一个 FiRa 设备的后续 OOB 和 UWB 通信。
- 步骤 1a:通过 FiRa 框架 API,FiRa 使能应用请求 FiRa 框架使用一个特定的 FiRa Profile,该 Profile 包含用于 UWB 会话配置参数协商的 OOB 连接类型。
-
步骤 1b:一旦另一个 FiRa 设备进入 OOB 范围,建立 OOB 安全通道,通过该通道在两个 FiRa 设备之间交换 UWB 配置信息。FiRa OOB Connector 触发 FiRa Profile Manager 启动 UWB 会话建立的步骤。
-
步骤 2:FiRa 框架将 OOB 从远程 FiRa 设备接收的 APDU 转发给 FiRa Applet,以建立安全通道(见第 8 节),传输 UWB 配置并触发 Ranging Data Set(RDS)信息的生成。随后将 RDS 提供给 SUS Applet。
- 步骤 2a:FiRa Profile Manager 激活 Secure Service,使远程 FiRa 设备与 FiRa Applet 之间能够交互。
- 步骤 2b:远程 FiRa 设备选择 FiRa Applet 并建立安全通道,通过该通道交换建立 UWB 连接所需的数据。所有命令和响应通过 Secure Service 和 OOB Connector 透明地传输给远程 FiRa 设备。
- 步骤 2c:FiRa Applet 生成 RDS(包括 UWB Session Key、UWB Session ID 以及可能其他数据),并将 RDS 传输给 SUS Applet。RDS 由本地派生数据、从其他设备接收的数据或两者组合构造而成。
- 步骤 2d:FiRa Profile Manager 从 FiRa Applet 接收针对特定 UWB Session ID 的事件,通知 FiRa Profile Manager 相应的 RDS 已生成。
-
步骤 2e:FiRa Profile Manager 从 FiRa Applet 获取 UWBS 配置。
-
步骤 3:FiRa 框架通过 UWB Service 继续 UWB 会话建立过程。
- 步骤 3a:FiRa Profile Manager 激活 UWB Service,使 FiRa 框架能够与 UWBS 交互。
- 步骤 3b:UWB Service 通过 UCI 命令处理 UWBS 的配置。UWB Service 将 RDS 传输给 UWBS。
- 步骤 3c:UWBS 从 SUS Applet 获取相应的 RDS。
- 步骤 3d:两个 UWBS 发起 UWB 会话。UWB 会话的确切开始时间由 UWB Service 确定。
- 步骤 3e:FiRa Profile Manager 通过 UCI 定义的通知定期接收 UWB 会话状态通知。
需要注意的是,虽然图中未显示,上述序列可能包括一个步骤:一旦达到指定的接近条件(如 RDS 中所定义),UWBS 与安全元件中的 Service Applet(也在 RDS 中定义)建立通信,以执行特定于服务的安全事务。
4.2.1.3 Functional Flow - Dynamic STS with Responder Specific Sub-session Key Management / 使用响应方特定子会话密钥管理的动态 STS 功能流程
在典型的一对多(组播,Multicast)TWR 测距方法中,控制器在其控制消息(CM)中为响应方分配时隙。然后每个响应方按照动态 STS 过程解码 CM 中发送的载荷,为其响应生成 STS,然后加密作为 RRM 一部分发送的载荷。当该方法应用于 PACS 用例或其他类似用例时,参与测距轮次的响应方应生成 STS 并加密载荷,以防止冒充攻击(与读取器进行测距的移动设备不知道另一个设备的信息)。这通过为每个响应方使用不同的密钥,在密码学上对响应方进行隔离来实现。
在这种情况下,FiRa 设备应使用 FiRa Consortium UWB MAC Technical Requirements 中定义的动态 STS,FiRa 框架使用 FiRa Applet 或 Service Applet 为每个参与测距轮次的响应方创建响应方特定子会话密钥(Responder Specific Sub-session Key),并将该密钥与 UWB 子会话 ID 一起提供给 SUS Applet。UWB 子会话 ID 和 UWB 会话 ID 对控制器来说是局部唯一的,宜随机生成。UWB 会话 ID 和 UWB 会话密钥始终从控制器传输到 Controlee,而 UWB 子会话 ID 和响应方特定子会话密钥也可在本地派生。
4.2.1.3.1 Dynamic STS with Responder Specific Sub-session Key – Detailed Description / 详细描述
图 7 — 使用响应方特定子会话密钥的动态 STS 示例(Figure 7 — Example of Dynamic STS with Responder Specific Sub-session Key)
图中标注翻译对照:
| English | 中文 |
|---|---|
| Secure Element 1 | 安全元件 1 |
| FiRa Applet | FiRa Applet |
| pushes Responder Specific Sub-session Key and other parameters via SUS API | 通过 SUS API 推送响应方特定子会话密钥及其他参数 |
| SUS Applet | SUS Applet |
| generates the UWB Session ID, stores the UWB Session Key and related parameters and provides them to the UWBS | 生成 UWB 会话 ID,存储 UWB 会话密钥及相关参数,并提供给 UWBS |
| SUS API | SUS API |
| UWBS | UWB 子系统 |
| SE-UWB Secure Channel | SE-UWB 安全通道 |
| Session ID | 会话 ID |
在与图 7 所示的动态 STS 操作相关的典型功能流程中,FiRa Applet 触发控制器/发起方与 Controlee/响应方之间的认证。该认证的结果是 UWB Session Key 和 Responder Specific Sub-session Key。UWB Session Key 映射到 UWB Session ID。Responder Specific Sub-session Key 映射到 UWB Sub-session ID。
转化为一对多测距的情况,控制器与 Controlee 认证并配置 Controlee 在组播 UWB 会话中充当响应方。这种配置通过 OOB 完成,响应方开始加密和解密 STS 索引。STS 生成的细节在 FiRa Consortium UWB MAC Technical Requirements 的安全部分中规定。
4.2.1.3.2 Dynamic STS with Responder Specific Sub-session Key - Sequence Flow / 序列流程
以下是图 7 中的流程描述:
- FiRa Applet 创建 UWB Session Key 并提供给 SUS Applet。
- 控制器和所有潜在 Controlee 上的 FiRa Applet 通过 OOB 安全通道协商 UWB Session Key。
- 控制器和 Controlee 上的 FiRa Applet 协商 Responder Specific Sub-session Key,并将其与 UWB Sub-session ID 一起提供给自己一方的 SUS Applet。UWB Sub-session ID 和 UWB Session ID 是局部唯一的,宜随机生成。FiRa Applet 将 UWB Sub-session ID 提供给 FiRa 框架。
- FiRa 框架随后可通过 UCI 将 UWB Sub-session ID 参数与需要添加到测距设备管理列表(Ranging Device Management List, RDML)中的短地址一起提供(在 MAC 规范中定义)。详见 FiRa Consortium UCI Generic Specification 中的
SESSION_UPDATE_MULTICAST_LIST_CMD。 - 当在控制器/发起方上启动组播 UWB 会话时,UWBS 从 SUS Applet 获取 UWB Session Key。向 RDML 添加新的响应方会触发控制器的 UWBS 使用对应于 RDML 中新响应方地址的 UWB Sub-session ID 来获取 Responder Specific Sub-session Key。
- UWBS 使用 GET RDS 命令,并传入 UWB Sub-session ID 而不是 UWB Session ID。
- 组播 UWB 会话启动后,响应方使用与该 UWB 会话关联的 UWB Session ID 获取 UWB Session Key。响应方还使用 UWB Sub-session ID 获取 Responder Specific Sub-session Key。
4.2.1.3.3 UWB Session Keys and Responder Specific Sub-session Key / UWB 会话密钥和响应方特定子会话密钥
响应方应使用 UWB Session Key 解码 STS 并解密由发起方发送的载荷。响应方应使用 Responder Specific Sub-session Key 生成 STS 并加密传输给发起方的载荷。
UWB Session Key 和 Responder Specific Sub-session Key 应遵循 FiRa Consortium UWB MAC Technical Requirements 安全部分中定义的动态 STS 安全要求。
4.2.1.3.4 Ranging Round Slot Ordering and Payload Encryption Details / 测距轮次时隙排序和载荷加密细节
下表考虑两个响应方设备参与一对多延迟模式 DS-TWR 测距的情况。
表 3 — 响应方特定子会话密钥时隙排序(Table 3 — Responder Specific Sub-session Key slot ordering)
| 时隙号 | 测距帧类型 | 描述 |
|---|---|---|
| 0 | CM(测距控制消息)— SP0 帧 | 载荷使用与 UWB Session ID 关联的会话密钥加密 |
| 1 | RIM(测距发起消息)SP3 帧 | STS 使用与 UWB Session ID 关联的会话密钥生成 |
| 2 | RRM — Controlee/响应方1(测距响应消息)SP3 帧 | STS 使用与 UWB Sub-session ID 关联的 Responder Specific Sub-session Key 生成 |
| 3 | RRM — Controlee/响应方2(测距响应消息)SP3 帧 | STS 使用与 UWB Sub-session ID 关联的 Responder Specific Sub-session Key 生成 |
| 4 | RFM(测距最终消息)— SP3 帧 | STS 使用与 UWB Session ID 关联的 UWB Session Key 生成 |
| 5 | RMR(测距测量报告)— SP0 帧 | 载荷使用与 UWB Session ID 关联的 UWB Session Key 加密 |
| 6 | RRRM Controlee/响应方1(测距结果报告消息)— SP0 帧 | 载荷使用与 UWB Sub-session ID 关联的 Responder Specific Sub-session Key 加密 |
| 7 | RRRM Controlee/响应方2(测距结果报告消息)— SP0 帧 | 载荷使用与 UWB Sub-session ID 关联的 Responder Specific Sub-session Key 加密 |
4.2.1.3.5 Example Configuration of Responder Specific Sub-session Key using UCI / 使用 UCI 的响应方特定子会话密钥配置示例
表 4 — 使用 UCI 的响应方特定子会话密钥配置示例(Table 4 — Example configuration of Responder Specific Sub-session Key using UCI)
| 参数名 | 描述 | 控制器 | Controlee |
|---|---|---|---|
| DEVICE_TYPE | 0x00 = Controlee, 0x01 = Controller | 0x01 | 0x00 |
| RANGING_ROUND_USAGE | 0x00=RFU, 0x01=SS-TWR Deferred, 0x02=DS-TWR Deferred(默认), 0x03=SS-TWR Non-deferred, 0x04=DS-TWR Non-deferred | 0x02 | 0x02 |
| STS_CONFIG | STS 生成方式: 0x00=Static STS(默认), 0x01=Dynamic STS, 0x02=Dynamic STS for Responder Specific Sub-session Key | 0x02 | 0x02 |
| MULTI_NODE_MODE | 0x00=单设备对单设备(单播), 0x01=一对多, 0x02=多对多 | 0x01 | 0x01 |
| DEVICE_ROLE | 0x00=Responder, 0x01=Initiator | 0x01 | 0x00 |