UFS 15 - UFS RPMB操作

news2024/11/24 2:46:37

UFS 15 - UFS RPMB操作

  • 1 Request Type Message Delivery(请求类型消息传递)
  • 2 Response Type Message Delivery(响应类型消息传递)
  • 3 Authentication Key Programming
    • 3.1 Authentication Key Programming
    • 3.2 报文示例
      • 3.2.1 Authentication Key Programming Request
      • 3.2.2 Result Read Request
      • 3.2.3 Result Read Response
  • 4 Read Counter Value
    • 4.1 Read Counter Value
    • 4.2 Read Counter Value报文示例
      • 4.2.1 Write Counter Read Request
      • 4.2.2 Write Counter Read Response
  • 5 Authenticated Data Write(验证数据写入)
    • 5.1 Authenticated Data Write
    • 5.2 Authenticated Data Write报文示例
      • 5.2.1 Authenticated Data Write Request
      • 5.2.2 Result Read Request
      • 5.2.3 Result Read Response
  • 6 Authenticated Data Read(验证数据读取)
    • 6.1 Authenticated Data Read
    • 6.2 Authenticated Data Read报文示例
      • 6.2.1 Authenticated Data Read Request
      • 6.2.2 Authenticated Data Read Response

UFS 1-UFS架构简介1
UFS 2 -UFS架构简介2
UFS 3 - UFS RPMB
UFS 4 - UFS Boot
UFS 5 - UFS UIC Layer: MIPI M-PHY
UFS 6 - UAP – SCSI Commands(1)
UFS 7 - UAP – SCSI Commands(2)
UFS 8 - UAP – SCSI Commands(3)
UFS 9 - UAP – SCSI Commands(4)
UFS 10 - UAP – SCSI Commands(5)
UFS 11 - UFS RPMB分区功能验证
UFS 12 - UAP – SCSI Commands(6)
UFS 13 - Logical Unit Management
UFS 14 - UFS RPMB安全读写命令

在本篇博文中将介绍RPMB的Authentication Key Programming、Read Counter Value、Authenticated Data Write、Authenticated Data Read等操作

1 Request Type Message Delivery(请求类型消息传递)

  • Only one RPMB operation can be executed at any time.
  • 任何时候只能执行一个 RPMB 操作。
    • An initiator sends request type message to RPMB well known logical unit to request the execution of an operation.
    • 发起者将请求类型消息发送到RPMB W-LUN以请求执行操作。
  • To deliver a request type message, the initiator sends a SECURITY PROTOCOL OUT command with SECURITY PROTOCOL field is set to ECh (i.e., the JEDEC Universal Flash Storage) and indicating the target RPMB region in the SECURITY PROTOCOL SPECIFIC field.
  • 为了传递请求类型消息,发起者发送SECURITY PROTOCOL OUT命令,其中SECURITY PROTOCOL字段设置为ECh(即,JEDEC通用闪存存储)并在SECURITY PROTOCOL SPECIFIC字段中指示目标RPMB区域。
  • For an authenticated data write request, the data to be written into the RPMB data area is included in the request message. The maximum data size in a single Authenticated Data Write request is equal to bRPMB_ReadWriteSize × 256 bytes; multiple Authenticated Data Write operations should be executed if the desired data size exceeds this value.
  • 对于经过验证的数据写入请求,要写入RPMB数据区域的数据包含在请求消息中。单次Authenticated Data Write请求的最大数据大小等于bRPMB_ReadWriteSize × 256字节;如果所需的数据大小超过此值,则应执行多个已验证数据写入操作
  • For SECURITY PROTOCOL OUT command, the Flags.W in the COMMAND UPIU is set to one since data is transferred from the host to the device.
  • 对于 SECURITY PROTOCOL OUT 命令,COMMAND UPIU 中的 Flags.W 设置为 1,因为数据从主机传输到设备。
  • Table 12.17 defines the Expected Data Transfer Length field value in the COMMAND UPIU for the various cases.
  • 表 12.17 定义了各种情况下 COMMAND UPIU 中的预期数据传输长度字段值。
    在这里插入图片描述
  • The device indicates to the host that it is ready to receive the request type message sending READY TO TRANSFER UPIU. If the Expected Data Transfer Length is 512 byte, then Data Buffer Offset field shall be set to a value of zero and Data Transfer Count field shall be set to a value of 512.
  • 设备向主机指示它已准备好接收请求类型消息,发送 READY TO TRANSFER UPIU。如果预期数据传输长度为 512 字节,则数据缓冲区偏移字段应设置为 0 值,数据传输计数字段应设置为 512 值。
  • The number of bytes requested in a single READY TO TRANSFER UPIU shall not be greater than the value indicated by bMaxDataOutSize attribute. A single READY TO TRANSFER UPIU may request the transfer of one or more RPMB Messages.
  • 单个 READY TO TRANSFER UPIU 中请求的字节数不得大于 bMaxDataOutSize 属性指示的值。单个准备传输 UPIU 可以请求传输一个或多个 RPMB 消息。
  • In response to each READY TO TRANSFER UPIU, the host delivers the requested portion of the message sending DATA OUT UPIU.
  • 响应于每个 READY TO TRANSFER UPIU,主机传送发送 DATA OUT UPIU 的消息的请求部分。
  • To complete the SECURITY PROTOCOL OUT command, the device returns a RESPONSE UPIU with the status.
  • 为了完成 SECURITY PROTOCOL OUT 命令,设备返回带有状态的 RESPONSE UPIU。
  • Figure 12.2 depicts a request type message delivery. The application client loads the RPMB Message in the Data Out Buffer and indicates the target RPMB Region in SECURITY PROTOCOL SPECIFIC field.
  • 图 12.2 描述了请求类型的消息传递。应用程序客户端将 RPMB 消息加载到数据输出缓冲区中,并在安全协议特定字段中指示目标 RPMB 区域。
    在这里插入图片描述
    该说明对应于ufs-utils开源工具中的struct sec_proto_cdb结构,对应到scsi_security_out和scsi_security_in接口中的sec_out_cmd和sec_in_cmd。
#define SEC_PROTOCOL_CMD_SIZE           (12)
#define SEC_PROTOCOL_UFS                (0xEC)
#define SECURITY_PROTOCOL_IN  0xa2
#define SECURITY_PROTOCOL_OUT 0xb5

unsigned char sec_out_cmd[SEC_PROTOCOL_CMD_SIZE] = { 
                        SECURITY_PROTOCOL_OUT, SEC_PROTOCOL_UFS,
                        0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

unsigned char sec_in_cmd[SEC_PROTOCOL_CMD_SIZE] = {
                        SECURITY_PROTOCOL_IN, SEC_PROTOCOL_UFS,
                        0, 0, 0, 0, 0, 0, 0, 0, 0, 0};


/*
 * CDB format of SECURITY PROTOCOL IN/OUT commands
 * (JEDEC Standard No. 220D, Page 264)
 */
struct sec_proto_cdb {
    /*  
     * OPERATION CODE = A2h for SECURITY PROTOCOL IN command,
     * OPERATION CODE = B5h for SECURITY PROTOCOL OUT command.
     */
    uint8_t opcode;
    /* SECURITY PROTOCOL = ECh (JEDEC Universal Flash Storage) */
    uint8_t sec_proto;
    /*  
     * The SECURITY PROTOCOL SPECIFIC field specifies the RPMB Protocol ID.
     * CDB Byte 2 = 00h and CDB Byte 3 = 01h for RPMB Region 0.
     */
    uint8_t cdb_byte_2;
    uint8_t cdb_byte_3;
    /*  
     * Byte 4 and 5 are reserved.
     */
    uint8_t cdb_byte_4;
    uint8_t cdb_byte_5;
    /* ALLOCATION/TRANSFER LENGTH in big-endian */                                                                                                                                                                 
    uint32_t length;
    /* Byte 9 is reserved. */
    uint8_t cdb_byte_10;
    /* CONTROL = 00h. */
    uint8_t ctrl;
} __packed;

2 Response Type Message Delivery(响应类型消息传递)

  • A initiator requests the RPMB well known logical unit to send a response type message to retrieve the result of a previous operation, to retrieve the Write Counter, to retrieve data from the RPMB data area, or to retrieve the contents of a Secure Write Protect Configuration Block.
  • 发起者请求 RPMB 众所周知的逻辑单元发送响应类型消息以检索先前操作的结果、检索写计数器、从 RPMB 数据区域检索数据或检索安全写保护配置块。
  • To request the delivery of a response type message, the host sends a SECURITY PROTOCOL IN command with SECURITY PROTOCOL field is set to ECh (i.e., the JEDEC Universal Flash Storage) and indicating the RPMB region in the SECURITY PROTOCOL SPECIFIC field.
  • 为了请求传送响应类型消息,主机发送 SECURITY PROTOCOL IN 命令,其中 SECURITY PROTOCOL 字段设置为 ECh(即,JEDEC 通用闪存存储)并在 SECURITY PROTOCOL SPECIFIC 字段中指示 RPMB 区域。
  • For an authenticated data read the data from the RPMB data area is included in the response message.
  • 对于已验证的数据读取,来自 RPMB 数据区域的数据包含在响应消息中。
  • For SECURITY PROTOCOL IN command, the Flags.R in the COMMAND UPIU is set to one since data is transferred from the device to the host.
  • 对于 SECURITY PROTOCOL IN 命令,COMMAND UPIU 中的 Flags.R 设置为 1,因为数据从设备传输到主机。
  • Table 12.18 defines the Expected Data Transfer Length field value in the COMMAND UPIU for the various cases.
  • 表 12.18 定义了各种情况下 COMMAND UPIU 中的预期数据传输长度字段值。
    在这里插入图片描述
  • The device returns the result or data requested in the RPMB message. The RPMB message is delivered by sending one or more DATA IN UPIU in the data phase. A single DATA IN UPIU may deliver one or more RPMB Messages.
  • 设备返回 RPMB 消息中请求的结果或数据。 RPMB消息是通过在数据阶段发送一个或多个DATA IN UPIU来传递的。单个 DATA IN UPIU 可以传送一个或多个 RPMB 消息。
  • The data size in DATA IN UPIU shall not exceed the value indicated by bMaxDataInSize attribute.
  • DATA IN UPIU 中的数据大小不得超过 bMaxDataInSize 属性指示的值。
  • To complete the SECURITY PROTOCOL IN, the device sends a RESPONSE UPIU with the status.
  • 为了完成 SECURITY PROTOCOL IN,设备发送带有状态的 RESPONSE UPIU。
  • Figure 12.3 depicts a response type message delivery. An application client requests a RPMB Region to transfer the RPMB Message in the Data In Buffer specifying the RPMB Region ID in SECURITY PROTOCOL SPECIFIC field of the CDB.
  • 图 12.3 描述了响应类型消息传递。应用程序客户端请求 RPMB 区域传输缓冲区中数据中的 RPMB 消息,并在 CDB 的安全协议特定字段中指定 RPMB 区域 ID。
    在这里插入图片描述
    和上一章的部分一样,命令格式一样,但是OPERATION CODE为A2h
#define SEC_PROTOCOL_CMD_SIZE           (12)
#define SEC_PROTOCOL_UFS                (0xEC)
#define SECURITY_PROTOCOL_IN  0xa2
#define SECURITY_PROTOCOL_OUT 0xb5

unsigned char sec_out_cmd[SEC_PROTOCOL_CMD_SIZE] = { 
                        SECURITY_PROTOCOL_OUT, SEC_PROTOCOL_UFS,
                        0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

unsigned char sec_in_cmd[SEC_PROTOCOL_CMD_SIZE] = {
                        SECURITY_PROTOCOL_IN, SEC_PROTOCOL_UFS,
                        0, 0, 0, 0, 0, 0, 0, 0, 0, 0};


/*
 * CDB format of SECURITY PROTOCOL IN/OUT commands
 * (JEDEC Standard No. 220D, Page 264)
 */
struct sec_proto_cdb {
    /*  
     * OPERATION CODE = A2h for SECURITY PROTOCOL IN command,
     * OPERATION CODE = B5h for SECURITY PROTOCOL OUT command.
     */
    uint8_t opcode;
    /* SECURITY PROTOCOL = ECh (JEDEC Universal Flash Storage) */
    uint8_t sec_proto;
    /*  
     * The SECURITY PROTOCOL SPECIFIC field specifies the RPMB Protocol ID.
     * CDB Byte 2 = 00h and CDB Byte 3 = 01h for RPMB Region 0.
     */
    uint8_t cdb_byte_2;
    uint8_t cdb_byte_3;
    /*  
     * Byte 4 and 5 are reserved.
     */
    uint8_t cdb_byte_4;
    uint8_t cdb_byte_5;
    /* ALLOCATION/TRANSFER LENGTH in big-endian */                                                                                                                                                                 
    uint32_t length;
    /* Byte 9 is reserved. */
    uint8_t cdb_byte_10;
    /* CONTROL = 00h. */
    uint8_t ctrl;
} __packed;

3 Authentication Key Programming

3.1 Authentication Key Programming

  • The Authentication Key programming is initiated by a SECURITY PROTOCOL OUT command
  • 身份验证密钥编程由 SECURITY PROTOCOL OUT 命令启动
    • An initiator sends the SECURITY PROTOCOL OUT command with SECURITY PROTOCOL field set to ECh and indicating the RPMB region in the SECURITY PROTOCOL SPECIFIC field. The RPMB data frame includes the Request Message Type = 0001h and the Authentication Key.
    • 发起者发送 SECURITY PROTOCOL OUT 命令,其中 SECURITY PROTOCOL 字段设置为 ECh,并在 SECURITY PROTOCOL SPECIFIC 字段中指示 RPMB 区域。 RPMB 数据帧包括请求消息类型 = 0001h 和身份验证密钥。
    • The device returns GOOD status in status response when Authentication Key programming is completed.
    • 当验证密钥编程完成时,设备在状态响应中返回 GOOD 状态。
  • The Authentication Key programming verification process starts by issuing a SECURITY PROTOCOL OUT command
  • 身份验证密钥编程验证过程通过发出 SECURITY PROTOCOL OUT 命令开始
    • An initiator sends a SECURITY PROTOCOL OUT command with SECURITY PROTOCOL field set to ECh and indicating the RPMB region in the SECURITY PROTOCOL SPECIFIC field. The RPMB data frame contains the Request Message Type = 0005h (Result read request). Note that any request other than the Result read request from any initiator will overwrite the Result register of the RPMB Region.
    • 发起者发送 SECURITY PROTOCOL OUT 命令,其中 SECURITY PROTOCOL 字段设置为 ECh,并在 SECURITY PROTOCOL SPECIFIC 字段中指示 RPMB 区域。 RPMB 数据帧包含请求消息类型 = 0005h(结果读取请求)。请注意,除了来自任何发起者的结果读取请求之外的任何请求都将覆盖 RPMB 区域的结果寄存器。
    • The device returns GOOD status in status response when the operation result is ready for retrieval.
    • 当操作结果可供检索时,设备在状态响应中返回 GOOD 状态。
  • An initiator retrieves the operation result by issuing a SECURITY PROTOCOL IN command.
  • 发起者通过发出SECURITY PROTOCOL IN命令来检索操作结果。
    • The SECURITY PROTOCOL field is set to ECh and the SECURITY PROTOCOL SPECIFIC field indicates the RPMB region.
    • 安全协议字段被设置为ECh并且安全协议特定字段指示RPMB区域。
    • Device returns the RPMB data frame containing the Response Message Type = 0100h and the Result code.
    • 设备返回包含响应消息类型 = 0100h 和结果代码的 RPMB 数据帧。
    • If programming of Authentication Key failed then returned result is “Write failure” (0005h). If some other error occured during Authentication Key programming then returned result is “General failure” (0001h).
    • 如果验证密钥编程失败,则返回结果为“写入失败”(0005h)。如果在验证密钥编程期间发生一些其他错误,则返回的结果是“一般失败”(0001h)。
      Access to RPMB data area is not possible before the Authentication Key is programmed in the corresponding RPMB region. The state of the device can be checked by trying to write/read data to/from the RPMB data area: if the Authentication Key is not programmed then the Result field in the response message will be set to “Authentication Key not yet programmed” (0007h).
      在将验证密钥编程到相应的 RPMB 区域之前,无法访问 RPMB 数据区域。可以通过尝试向 RPMB 数据区域写入数据或从 RPMB 数据区域读取数据来检查设备的状态:如果身份验证密钥未编程,则响应消息中的结果字段将设置为“身份验证密钥尚未编程”( 0007h)。
      在这里插入图片描述

3.2 报文示例

3.2.1 Authentication Key Programming Request

报文的数据对应于从196Byte开始的数据
在这里插入图片描述

 d0  81  c5  44  b1  9d  6b  e6  c5  37  cb  17  c4  00  f8  f1  74  25  e4  ab  98  6d  1f  1d  db  b1  c0  69  1f  68  94  b5 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  01 

3.2.2 Result Read Request

报文的数据对应于从196Byte开始的数据
在这里插入图片描述

 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  05 

3.2.3 Result Read Response

报文的数据对应于从196Byte开始的数据
在这里插入图片描述

4 Read Counter Value

4.1 Read Counter Value

  • The Read Counter Value sequence is initiated by a SECURITY PROTOCOL OUT command.
  • 读取计数器值序列由安全协议输出命令启动。
    • An initiator sends the SECURITY PROTOCOL OUT command with SECURITY PROTOCOL field set to ECh and indicating the RPMB region in the SECURITY PROTOCOL SPECIFIC field. The RPMB data frame includes the Request Message Type = 0002h and the Nonce.
    • 发起者发送 SECURITY PROTOCOL OUT 命令,其中 SECURITY PROTOCOL 字段设置为 ECh,并在 SECURITY PROTOCOL SPECIFIC 字段中指示 RPMB 区域。 RPMB 数据帧包括请求消息类型 = 0002h 和 Nonce。
  • When a GOOD status in the status response is received, the write counter value is retrieved sending a SECURITY PROTOCOL IN command.
  • 当收到状态响应中的 GOOD 状态时,将通过发送 SECURITY PROTOCOL IN 命令来检索写入计数器值。
    • An initiator sends the SECURITY PROTOCOL IN command with the SECURITY PROTOCOL field is set to ECh and indicating the RPMB region in the SECURITY PROTOCOL SPECIFIC field.
    • 发起方发送 SECURITY PROTOCOL IN 命令,其中 SECURITY PROTOCOL 字段设置为 ECh,并在 SECURITY PROTOCOL SPECIFIC 字段中指示 RPMB 区域。
    • The device returns a RPMB data frame with Response Message Type = 0200h, a copy of the Nonce received in the request, the Write Counter value, the MAC and the Result.
    • 器件返回响应消息类型 = 0200h 的 RPMB 数据帧、请求中收到的 Nonce 的副本、写入计数器值、MAC 和结果。
      If reading of the counter value fails then returned result is “Read failure” (0006h/0086h).
      如果读取计数器值失败,则返回结果为“读取失败”(0006h/0086h)。
      If some other error occurs then Result is “General failure” (0001h/0081h).
      如果发生其他错误,则结果为“一般故障”(0001h/0081h)。
      If counter has expired also bit 7 is set to 1 in returned results.
      如果计数器已过期,则返回结果中的位 7 也会设置为 1。
      在这里插入图片描述

4.2 Read Counter Value报文示例

4.2.1 Write Counter Read Request

在这里插入图片描述

 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 ee  8f  e0  77  be  32  c7  69  24  c0  32  f2  da  a7  66  2c  00  00  00  00  00  00  00  00  00  00  00  02 

4.2.2 Write Counter Read Response

在这里插入图片描述

 d8  4a  3e  0a  7e  1e  a9  e7  cb  10  4b  03  b4  df  5d  79  80  e8  eb  c3  1f  a6  d0  e5  ec  7a  30  80  ad  f5  63  5d 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 ee  8f  e0  77  be  32  c7  69  24  c0  32  f2  da  a7  66  2c  00  00  00  b7  00  00  00  00  00  00  02  00 

5 Authenticated Data Write(验证数据写入)

5.1 Authenticated Data Write

  • The Authenticated Data Write sequence is initiated by a SECURITY PROTOCOL OUT command.
  • 已验证数据写入序列由SECURITY PROTOCOL OUT命令启动。
    • An initiator sends the SECURITY PROTOCOL OUT command with SECURITY PROTOCOL field set to ECh and indicating the RPMB region in the SECURITY PROTOCOL SPECIFIC field. The RPMB message is composed of one or more RPMB message data frames, each of which includes: Request Message Type = 0003h, Block Count, Address, Write Counter, Data and MAC.
    • 发起者发送 SECURITY PROTOCOL OUT 命令,其中 SECURITY PROTOCOL 字段设置为 ECh,并在 SECURITY PROTOCOL SPECIFIC 字段中指示 RPMB 区域。 RPMB 消息由一个或多个 RPMB 消息数据帧组成,每个 RPMB 消息数据帧包括:Request Message Type = 0003h、Block Count、Address、Write Counter、Data 和 MAC。
    • When the device receives the RPMB message, it first checks whether the write counter has expired. If the write counter is expired then the device sets the Result to “Write failure, write counter expired” (0085h). No data is written to the RPMB data area.
    • 当设备收到RPMB消息时,它首先检查写计数器是否已过期。如果写入计数器过期,则器件将结果设置为“写入失败,写入计数器过期”(0085h)。没有数据写入 RPMB 数据区。
    • Next the address is checked. If the Address value is equal to or greater than the size of target RPMB region which is defined as bRPMBRegion0Size – bRPMBRegion3Size parameter value in the RPMB Unit Descriptor, then the Result is set to “Address failure” (0004h). No data is written to the RPMB data area.
    • 接下来检查地址。如果地址值等于或大于 RPMB 单元描述符中定义为 bRPMBRegion0Size – bRPMBRegion3Size 参数值的目标 RPMB 区域的大小,则结果设置为“地址失败”(0004h)。没有数据写入 RPMB 数据区。
    • If the Address value plus the Block Count value is greater than the size of target RPMB region which is defined as bRPMBRegion0Size – bRPMBRegion3Size parameter value, then the Result is set to “Address failure” (0004h). No data is written to the RPMB data area.
    • If the Block Count indicates a value greater than bRPMB_ReadWriteSize, then the authenticated data write operation fails and the Result is set to “General failure” (0001h).
    • 如果块计数指示值大于 bRPMB_ReadWriteSize,则经过验证的数据写入操作失败,并且结果设置为“一般失败”(0001h)。
    • If the write counter was not expired then the device calculates the MAC of request type, block count, write counter, address and data, and compares this with the MAC in the request. If the two MAC’s are different, then the device sets the Result to ”Authentication failure” (0002h). No data is written to the RPMB data area.
    • 如果写入计数器未过期,则设备计算请求类型的 MAC、块计数、写入计数器、地址和数据,并将其与请求中的 MAC 进行比较。如果两个 MAC 不同,则设备将结果设置为“身份验证失败”(0002h)。没有数据写入 RPMB 数据区。
    • If the MAC in the request and the calculated MAC are equal then the device compares the write counter in the request with the write counter stored in the device. If the two counters are different then the device sets the Result to “Counter failure” (0003h). No data is written to the RPMB data area.
    • 如果请求中的 MAC 和计算出的 MAC 相等,则设备将请求中的写入计数器设备中存储的写入计数器进行比较。如果两个计数器不同,则设备将结果设置为“计数器失败”(0003h)。没有数据写入 RPMB 数据区。
    • If the MAC and write counter comparisons are successful then the write request is considered to be authenticated. The data is written to the address indicated in the request.
    • 如果 MAC 和写计数器比较成功,则认为写请求已通过验证。数据被写入请求中指定的地址。
    • The write counter is incremented by one if the write operation is successfully executed.
    • 如果写操作成功执行,则写计数器加一。
    • If write fails then returned result is “Write failure” (0005h).
    • 如果写入失败,则返回结果为“写入失败”(0005h)。
    • If some other error occurs during the write procedure then returned result is “General failure” (0001h).
    • 如果在写入过程中发生其他错误,则返回结果为“General failure”(0001h)。
    • In an authenticated data write request with Block Count greater than one
    • 在块计数大于 1 的经过身份验证的数据写入请求中
      • the MAC is included only in the last RPMB message data frame. The MAC field is zero in all previous data frames. The device behavior is undefined if a MAC field is non-zero in any but the last RPMB message data frame.
      • MAC 仅包含在最后一个 RPMB 消息数据帧中。所有先前数据帧中的 MAC 字段均为零。如果除最后一个 RPMB 消息数据帧之外的任何帧中的 MAC 字段均非零,则设备行为未定义。
      • In each data frame, the write counter indicates the current counter value, the address is the start address of the full access (not address of the individual logical block) and the block count is the total count of the blocks (not the block numbers).
      • 在每个数据帧中,写计数器指示当前计数器值,地址是完全访问的起始地址(不是单个逻辑块的地址),块计数是块的总数(不是块编号) 。
    • When the authenticated data write operation is completed, the device may return GOOD status in response to the SECURITY PROTOCOL OUT command regardless of whether the Authenticated data write was successful or not.
    • 当认证数据写入操作完成时,无论认证数据写入是否成功,设备都可以响应于 SECURITY PROTOCOL OUT 命令返回 GOOD 状态。
  • The authenticated data write verification process starts by issuing a SECURITY PROTOCOL OUT command.
  • 经过身份验证的数据写入验证过程通过发出 SECURITY PROTOCOL OUT 命令开始。
    • An initiator sends a SECURITY PROTOCOL OUT command with SECURITY PROTOCOL field set to ECh and indicating the RPMB region in the SECURITY PROTOCOL SPECIFIC field. The RPMB data frame contains the Request Message Type = 0005h (Result read request). Note that any request other than the Result read request from any initiator will overwrite the Result register of the RPMB Region.
    • 发起者发送 SECURITY PROTOCOL OUT 命令,其中 SECURITY PROTOCOL 字段设置为 ECh,并在 SECURITY PROTOCOL SPECIFIC 字段中指示 RPMB 区域。 RPMB 数据帧包含请求消息类型 = 0005h(结果读取请求)。请注意,除了来自任何发起者的结果读取请求之外的任何请求都将覆盖 RPMB 区域的结果寄存器。
    • The device returns GOOD status when the operation result is ready for retrieval.
    • 当操作结果可供检索时,设备返回 GOOD 状态。
  • An initiator retrieves the operation result by issuing a SECURITY PROTOCOL IN command.
  • 发起者通过发出SECURITY PROTOCOL IN命令来检索操作结果。
    • The SECURITY PROTOCOL field is set to ECh and the SECURITY PROTOCOL SPECIFIC field indicates the RPMB region.
    • 安全协议字段被设置为ECh并且安全协议特定字段指示RPMB区域。
  • Device returns the RPMB data frame containing the Response Message Type = 0300h, the counter value (incremented if the write operation is successfully executed), the address received in the Authenticated data write request, the MAC and result of the authenticated data write operation.
  • 器件返回 RPMB 数据帧,其中包含响应消息类型 = 0300h、计数器值(如果成功执行写入操作则递增)、在经过验证的数据写入请求中收到的地址、经过验证的数据写入操作的 MAC 和结果。
    在这里插入图片描述

5.2 Authenticated Data Write报文示例

5.2.1 Authenticated Data Write Request

在这里插入图片描述

 f7  99  d2  87  e9  b6  ba  6e  b7  10  3a  24  05  a6  80  22  97  72  76  4c  d3  bf  f0  5b  b9  63  cf  03  fb  f2  c3  ad 
 86  da  70  1a  2c  a0  a6  2a  b1  34  1a  d9  9e  58  4e  53  09  22  1c  57  38  c4  62  60  2e  40  22  88  7a  76  73  e1 
 62  64  30  66  33  35  63  37  63  31  65  31  30  64  37  34  35  64  32  39  66  39  37  65  61  63  35  63  33  39  64  63 
 64  64  65  38  64  63  63  63  33  63  39  33  66  62  36  32  30  61  39  61  64  64  34  65  63  34  37  36  32  66  34  63 
 38  33  31  61  33  32  36  33  35  39  64  35  34  30  30  63  66  32  34  34  31  32  36  32  38  33  61  32  32  61  66  30 
 63  66  39  66  39  61  31  37  30  62  34  30  63  63  66  63  33  31  36  64  39  66  66  33  35  65  32  33  36  65  61  66 
 61  66  37  31  30  61  61  36  38  61  66  36  39  65  30  62  31  61  62  33  34  63  33  62  38  65  32  35  61  62  63  37 
 66  62  39  37  65  39  64  31  30  38  30  30  33  33  31  61  38  33  35  30  30  36  34  39  61  64  38  61  36  33  65  35 
 37  62  61  61  66  31  36  31  62  35  39  35  62  30  63  35  31  33  32  61  31  64  65  61  64  32  32  30  64  38  61  39 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  b7  00  00  00  01  00  00  00  03 

5.2.2 Result Read Request

在这里插入图片描述

 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  05 

5.2.3 Result Read Response

在这里插入图片描述

 46  11  20  35  25  c6  2a  07  c8  e4  56  1f  03  c6  93  f3  90  df  4d  19  cd  52  a6  3b  25  cc  2b  32  d8  43  ac  b3 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  b8  00  00  00  00  00  00  03  00 

6 Authenticated Data Read(验证数据读取)

6.1 Authenticated Data Read

  • The Authenticated Data Read sequence is initiated by a SECURITY PROTOCOL OUT command.
  • 已验证数据读取序列由 SECURITY PROTOCOL OUT 命令启动。
    • An initiator sends the SECURITY PROTOCOL OUT command with SECURITY PROTOCOL field set to ECh and indicating the RPMB region in the SECURITY PROTOCOL SPECIFIC field. The RPMB data frame includes the Request Message Type = 0004h, the nonce, the data address, and the block count.
    • 发起者发送 SECURITY PROTOCOL OUT 命令,其中 SECURITY PROTOCOL 字段设置为 ECh,并在 SECURITY PROTOCOL SPECIFIC 字段中指示 RPMB 区域。 RPMB 数据帧包括请求消息类型 = 0004h、随机数、数据地址和块计数。
    • When the device receives this request it first checks the address. If the Address value is equal to or greater than the size of target RPMB region which is defined as bRPMBRegion0Size – bRPMBRegion3Size parameter value in the RPMB Unit Descriptor, then Result is set to “Address failure” (0004h/0084h). The data read is not valid.
    • 当设备收到此请求时,它首先检查地址。如果地址值等于或大于 RPMB 单元描述符中定义为 bRPMBRegion0Size – bRPMBRegion3Size 参数值的目标 RPMB 区域的大小,则结果设置为“地址失败”(0004h/0084h)。读取的数据无效。
    • If the Address value plus the Block Count value is greater than the size of target RPMB region which is defined as bRPMBRegion0Size – bRPMBRegion3Size parameter value, then the Result is set to “Address failure” (0004h/0084h). No data is read from the RPMB data area.
    • 如果地址值加上块计数值大于目标 RPMB 区域的大小(定义为 bRPMBRegion0Size – bRPMBRegion3Size 参数值),则结果将设置为“地址失败”(0004h/0084h)。没有从 RPMB 数据区读取任何数据。
    • After successful data fetch the MAC is calculated from response type, nonce, address, data and result. If the MAC calculation fails then returned result is “Authentication failure” (0002h/0082h).
    • 成功获取数据后,将根据响应类型、随机数、地址、数据和结果计算 MAC。如果 MAC 计算失败,则返回结果为“验证失败”(0002h/0082h)。
  • If the SECURITY PROTOCOL OUT command completes with GOOD status, data can be retrieved sending a SECURITY PROTOCOL IN command.
  • 如果 SECURITY PROTOCOL OUT 命令以 GOOD 状态完成,则可以通过发送 SECURITY PROTOCOL IN 命令来检索数据。
    • An initiator sends the SECURITY PROTOCOL IN command with SECURITY PROTOCOL field set to ECh and indicating the RPMB region in the SECURITY PROTOCOL SPECIFIC field.
    • 发起者发送 SECURITY PROTOCOL IN 命令,其中 SECURITY PROTOCOL 字段设置为 ECh,并在 SECURITY PROTOCOL SPECIFIC 字段中指示 RPMB 区域。
    • The device returns a RPMB message with Response Message Type = 0400h, the block count, a copy of the nonce received in the request, the address received in the Authenticated data read request, the data, the MAC and the result.
    • 设备返回一条 RPMB 消息,其中响应消息类型 = 0400h、块计数、请求中收到的随机数副本、经过验证的数据读取请求中收到的地址、数据、MAC 和结果。
    • In an authenticated data read response with Block Count greater than one,
    • 在块计数大于 1 的经过身份验证的数据读取响应中,
      • the MAC is included only in the last RPMB message data frame. The MAC field is zero in all previous data frames.
      • MAC 仅包含在最后一个 RPMB 消息数据帧中。所有先前数据帧中的 MAC 字段均为零。
      • In each data frame, the Nonce contains a copy of the received nonce, the address is the start address of the full access (not address of the individual logical block) and the block count is the total count of the blocks (not the sequence number of blocks).
      • 在每个数据帧中,Nonce 包含接收到的 Nonce 的副本,地址是完全访问的起始地址(不是单个逻辑块的地址),块计数是块的总计数(不是序列号)块)。
  • When the authenticated data read operation is completed, the device may return GOOD status in response to the SECURITY PROTOCOL IN command regardless of whether the Authenticated data read was successful or not.
  • 当认证数据读取操作完成时,无论认证数据读取是否成功,设备都可以响应于 SECURITY PROTOCOL IN 命令返回 GOOD 状态。
  • If data fetch from addressed location inside device fails then returned result is “Read failure” (0006h/0086h). If some other error occurs during the read procedure then returned result is “General failure” (0001h/0081h).
  • 如果从设备内的寻址位置获取数据失败,则返回结果为“读取失败”(0006h/0086h)。如果在读取过程中发生其他错误,则返回结果为“General failure”(0001h/0081h)。
    在这里插入图片描述

6.2 Authenticated Data Read报文示例

6.2.1 Authenticated Data Read Request

在这里插入图片描述

 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
 14  77  4e  6b  2c  a9  06  88  cf  71  bf  e0  7c  e4  c3  2d  00  00  00  00  00  00  00  01  00  00  00  04 

6.2.2 Authenticated Data Read Response

在这里插入图片描述

 c8  51  39  bd  63  54  8c  7c  e1  d5  cf  bf  7a  3d  1f  82  32  61  17  75  71  c2  f0  5a  fb  61  d7  90  b0  c3  76  fe 
 86  da  70  1a  2c  a0  a6  2a  b1  34  1a  d9  9e  58  4e  53  09  22  1c  57  38  c4  62  60  2e  40  22  88  7a  76  73  e1 
 62  64  30  66  33  35  63  37  63  31  65  31  30  64  37  34  35  64  32  39  66  39  37  65  61  63  35  63  33  39  64  63 
 64  64  65  38  64  63  63  63  33  63  39  33  66  62  36  32  30  61  39  61  64  64  34  65  63  34  37  36  32  66  34  63 
 38  33  31  61  33  32  36  33  35  39  64  35  34  30  30  63  66  32  34  34  31  32  36  32  38  33  61  32  32  61  66  30 
 63  66  39  66  39  61  31  37  30  62  34  30  63  63  66  63  33  31  36  64  39  66  66  33  35  65  32  33  36  65  61  66 
 61  66  37  31  30  61  61  36  38  61  66  36  39  65  30  62  31  61  62  33  34  63  33  62  38  65  32  35  61  62  63  37 
 66  62  39  37  65  39  64  31  30  38  30  30  33  33  31  61  38  33  35  30  30  36  34  39  61  64  38  61  36  33  65  35 
 37  62  61  61  66  31  36  31  62  35  39  35  62  30  63  35  31  33  32  61  31  64  65  61  64  32  32  30  64  38  61  39 
 14  77  4e  6b  2c  a9  06  88  cf  71  bf  e0  7c  e4  c3  2d  00  00  00  00  00  00  00  01  00  00  04  00 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/747367.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【工具使用】使用J-link离线下载芯唐MCU固件

一,简介 本文主要介绍如何使用J-link工具,离线下载M483的程序。 二,操作步骤 主要分为以下三个步骤: 1,使用SWD接口连接硬件; 2,配置上位机工程; 3,下载程序到芯片&am…

LiveGBS流媒体平台GB/T28181功能-作为上级平台对接海康大华华为宇视等下级平台监控摄像机NVR硬件执法仪等GB28181设备

LiveGBS作为上级平台对接海康大华华为宇视等下级平台监控摄像机NVR硬件执法仪等GB28181设备 1、背景说明2、部署国标平台2.1、安装使用说明2.2、服务器网络环境2.3、信令服务配置 3、监控摄像头设备接入3.1、海康GB28181接入示例3.2、大华GB28181接入示例3.3、华为IPC GB28181接…

图像处理之比特平面分层和重构

一、比特平面分层 像素是由比特组成的数字。例如在256级灰度图像中,每个像素的灰度是由8比特(一个字节)组成。如下图所示,一幅8比特图像由8个1比特平面组成,其中平面1包含图像中所有像素的最低阶比特,而平…

Linux开发工具gdb篇

文章目录 🎻0.前言🎼debug版本🎼release版本 🪕1. gcc/g的默认版本🎸2. gdb使用🎵进入 & 退出🎵查看代码🎵断点 & 跳断点🎵逐过程 & 逐语句🎵监视…

Spring Boot 核心运行原理介绍

Spring Boot 核心运行原理介绍 引言整体介绍1. 核心运行原理图2. 自动配置的整体流程3. 各核心功能和组件初步介绍 总结 引言 还记得,笔者在前面的博文《Spring Boot 项目介绍》中提到了,Spring Boot 最核心的功能就是自动配置,该功能的实现…

编辑距离算法(Levenshtein Distance Algorithm)的概念理解及其应用

概念: 编辑距离,由俄罗斯科学家Vladimir Levenshtein于1965年提出,因此又称为Levenshtein Distance,简称LD,是指两个字串之间,由一个转成另一个所需的最少编辑操作次数。 可用的编辑操作包括:…

使用docker的常见bug

BUG1:磁盘被占满导致docker无法使用 docker ps 【查看docker能否正常使用】 正常的话会打印下图信息: 不正常的话打印如下图信息: journalctl -u docker 【查看docker无法正常使用的原因】,本次测试中遇到下图bug,意思是/var/l…

短视频抖音seo矩阵源码saas--技术开发部署分享

抖音seo源码开发,抖音矩阵源码,短视频seo源码,短视频矩阵源码技术开发部署,模式采用SaaS形式,用户角色分为:总后台,加盟商,企业用户,角色权限划分清楚,多模式…

简单认识MySQL基础部分

文章目录 一、数据库概述1、简介2、数据库类型和常用数据库1.关系型数据库2.非关系型数据库 3、mysql数据库日志1、作用:2、 mysql与 oracle 日志有所区别3、 Mysql 存储引擎 二、数据库基础操作1、SQL 语句2、实际操作1、DDL:数据定义语言,用…

机器学习技术(五)——特征工程与模型评估

机器学习技术(五)——特征工程与模型评估(2️⃣) 文章目录 机器学习技术(五)——特征工程与模型评估(:two:)二、模型评估1、Accuracy score2、Confusion matrix混淆矩阵1、多值2、二值 3、Hamming loss4、Precision, recall and F…

石英灯和石墨加热器结构热试验装置中的低气压控制解决方案

摘要:为解决结构热试验和热真空试验中的低气压真空压力精密控制问题,本文基于动态平衡法和上下游控制模式,提供了相应的解决方案。解决方案中的低气压真空压力控制系统主要是采用电控针阀、电控球阀和双通道真空压力控制器组成上下游两个闭环…

从源码角度看 Golang 的调度

1.简单概念 1.1 调度器的三个抽象概念:G、M、P G:代表一个 goroutine,每个 goroutine 都有自己独立的栈存放当前的运行内存及状态。可以把一个 G 当做一个任务。M: 代表内核线程(Pthread),它本身就与一个内核线程进行绑定&#…

echarts条形图动态显示

1、实现效果 每次展示5个,轮流展示 2、实现思路 使用datazoom,一次展示5项数据,轮流展示每2s刷新一次。 条形图有两个柱子,一个蓝色柱子,一个灰色柱子,两个柱子重合,且蓝柱子在上面。 为了使左侧的类目和柱…

【ubuntu重装系统后的软件配置_memo】

重装系统后系统环境恢复 备份安装系统常用的一些debvscode 更改sourcespip加速爬长城的家伙式儿安装ROS安装cmake安装git安装zsh顺便开个ssh提升幸福感的映射配置neovimplugins字体插件遇到的问题 锁键盘/鼠标小玩意儿 备份 实验时不起眼的图顺手写的脚本忘记从哪儿下载的资源…

华为云命令行工具服务KooCLI助力一键管理云资源

对于CLI即命令行工具,运维同学可能并不陌生,它摒弃了对图形化界面的需求,不再拘泥于可视化的页面切换、按钮点击等操作,反而为用户提供了一个便捷且高控制的解决方案,使用户在日常的运维工作中,用一行命令即…

【深度学习】目标检测的全面回顾

一、说明 随着自动驾驶汽车、智能视频监控、面部检测和各种人数统计应用的兴起,对快速准确的物体检测系统的需求也在不断增长。这些系统不仅涉及识别和分类图像中的每个对象,还涉及通过在图像周围绘制适当的边界框来定位每个对象。这使得对象检测比其传统…

凸包检测、直线检测、点集拟合、二维码检测

目录 1、凸包检测 2、直线检测 3、点集拟合 4、二维码检测 1、凸包检测 //凸包检测 int test1() {Mat img imread("F:/testMap/hand.png");if (img.empty()){cout << "请确认图像文件名称是否正确" << endl;return -1;}// 二值化Mat gray,…

Splashtop 亮相上安会,助力企业安全远程办公

2023年7月5-7日&#xff0c;2023第二届上海网络安全博览会暨高峰论坛在上海新国际博览中心举办。 本届上安会由上海市信息网络安全管理协会等单位主办&#xff0c;上海科学院、上海汽车集团等机构联合协办。大会围绕数字发展主题&#xff0c;多方位展示了网络安全行业的最新发…

SQL性能规范

一、随聊 记录一下吧&#xff0c;2023年7月13日00:11:11&#xff0c;现在的状态真的很&#xff0c;忙&#xff0c;干不完的活&#xff0c;希望巨大的压力&#xff0c;能够让自己快速成长&#xff0c;回想我这一路&#xff0c;21年大专毕业&#xff0c;用一年时间熟悉软件&…

JDK的安装与配置

所有的开发&#xff0c;第一步必然是准备环境&#xff0c;而JDK提供了一套完整的工具和环境&#xff0c;使开发人员能够编写、编译和运行Java应用程序。是Java开发的基础&#xff0c;为开发者提供了丰富的功能和工具&#xff0c;简化了Java应用程序开发的过程。所以这里就记录一…