Digital key synchronization method and apparatus, and storage medium
By establishing a secure channel between the trusted execution environment of the smart terminal device and the security unit and writing the digital key information, the problem of the smart terminal device not supporting NFC is solved, the secure copying and NFC control of the digital key are realized, and the digital key information is improved. Key availability.
Patent Information
- Application Number
- PCT/CN2023/088526
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-04-14
- Publication Date
- 2024-10-17
AI Technical Summary
Existing smart terminal devices do not support NFC, making it impossible to control the vehicle through NFC, which limits the use scenarios and usability of digital keys.
By establishing a secure channel between the Trusted Execution Environment (TEE) and the Security Element (SE), writing digital key information ensures the security of the digital key copying process, and extends it to NFC scenarios to enable terminal devices to access vehicles through NFC. Take control.
It realizes the safe copying and expanded usage scenarios of digital keys, improves the usability of digital keys, enables terminal devices to control vehicles through NFC, and solves the problem of smart terminal devices not supporting NFC.
Smart Images

Figure CN2023088526_17102024_PF_FP_ABST
Abstract
Description
Digital key synchronization method and device, and storage medium Technical Field
[0001] The present disclosure relates to the field of digital keys, and in particular to a digital key synchronization method and device, and a storage medium. Background Art
[0002] The current digital key regulations mainly include: Car Connectivity Consortium (CCC) digital key specification, Intelligent Car Connectivity Industry Ecosystem Alliance (ICCE) digital key specification, and Intelligent Car Connectivity Open Alliance (ICCOA) digital key specification.
[0003] The Trusted Execution Environment (TEE) implements secure computing based on memory isolation based on the hardware-secure Central Processing Unit (CPU). Many smart devices on the market currently meet the security of vehicle control by creating digital car keys in TEE.
[0004] A security element (SE) is a device unit on a smart terminal device. On a smart terminal device, the SE is usually integrated with the near field communication (NFC) module.
[0005] However, many smart terminal devices on the market currently do not support NFC, and how to control the vehicle through NFC is an urgent problem to be solved.
[0006] Summary of the Invention
[0007] To overcome the problems existing in the related art, the embodiments of the present disclosure provide a digital key synchronization method and device, and a storage medium.
[0008] According to a first aspect of an embodiment of the present disclosure, a digital key synchronization method is provided, the method being executed by a terminal device and comprising:
[0009] Establishing a first secure channel between the trusted execution environment TEE and the security element SE;
[0010] The digital key information in the TEE is written into the SE through the first secure channel.
[0011] Optionally, before establishing the first secure channel between the trusted execution environment TEE and the security element SE, the method further includes:
[0012] The SE obtains first information for establishing the first secure channel, and
[0013] The TEE obtains second information for establishing the first secure channel.
[0014] Optionally, the obtaining, from the SE, first information for establishing the first secure channel includes:
[0015] Establishing a second secure channel between the SE and the device server of the terminal device;
[0016] The SE obtains the first information provided by the device server through the second secure channel.
[0017] Optionally, the second information obtained by the TEE for establishing the first secure channel includes at least one of the following:
[0018] Obtain the public key of the control authority CA-KLCC of the off-card entity OCE certificate pre-written into the TEE;
[0019] Generate an OCE key pair by the TEE;
[0020] Obtain an OCE public key certificate provided by a device server of the terminal device and used for key negotiation.
[0021] Optionally, the method further includes:
[0022] The TEE sends a certificate signing request (CSR) message to the device server, so that the device server provides the OCE public key certificate to the terminal based on the CSR request message.
[0023] Optionally, establishing a first secure channel between the trusted execution environment TEE and the security element SE includes:
[0024] Based on a secure channel protocol SCP, the first secure channel is established between the TEE and the SE.
[0025] Optionally, after writing the digital key information in the TEE into the SE through the first secure channel, the method further includes:
[0026] In response to determining that the digital key information in the TEE is updated, the trusted application TA of the TEE synchronizes the updated digital key information to the applet of the SE through the first secure channel.
[0027] Optionally, the method further includes:
[0028] Interacting with the vehicle via Bluetooth on a first application protocol data unit (APDU), where the first APDU is at least used to authenticate the digital key information in the TEE; and / or
[0029] Interacting a second APDU with the vehicle via near field communication (NFC), where the second APDU is at least used to authenticate the digital key information in the SE;
[0030] The format of the second APDU is the same as that of the first APDU, and the data content included in the second APDU is the same as that included in the first APDU.
[0031] According to a second aspect of an embodiment of the present disclosure, a digital key synchronization method is provided, the method being executed by a device server and comprising:
[0032] Sending first information to the SE of the terminal device, where the first information is used to establish a first secure channel between the SE and the trusted execution environment TEE of the terminal device; and
[0033] At least part of the second information is sent to the TEE, where the second information is used to establish the first secure channel between the TEE and the SE.
[0034] Optionally, the sending the first information to the SE of the terminal device includes:
[0035] Establishing a second secure channel with the SE;
[0036] The first information is sent to the SE through the second secure channel.
[0037] Optionally, sending at least part of the second information to the TEE includes:
[0038] In response to receiving the certificate signature CSR request message sent by the TEE, an off-card entity OCE public key certificate for key negotiation is sent to the TEE based on the CSR request message.
[0039] According to a third aspect of an embodiment of the present disclosure, a digital key synchronization device is provided. The device is applied to a terminal device and includes:
[0040] A channel establishment module is used to establish a first secure channel between the trusted execution environment TEE and the security element SE;
[0041] An execution module is configured to write the digital key information in the TEE into the SE through the first secure channel.
[0042] According to a fourth aspect of an embodiment of the present disclosure, a digital key synchronization device is provided. The device is applied to a device server and includes:
[0043] A first sending module is configured to send first information to the SE of a terminal device, where the first information is used to establish a first secure channel between the SE and the trusted execution environment TEE of the terminal device; and
[0044] At least part of the second information is sent to the TEE, where the second information is used to establish the first secure channel between the TEE and the SE.
[0045] According to a fifth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute any one of the digital key synchronization methods described above.
[0046] According to a sixth aspect of an embodiment of the present disclosure, a digital key synchronization device is provided, including:
[0047] processor;
[0048] a memory for storing processor-executable instructions;
[0049] Wherein, the processor is configured to execute any of the digital key synchronization methods described above.
[0050] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:
[0051] In the disclosed embodiment, the digital key information in the TEE of the terminal device can be written into the SE through the first secure channel between the TEE and the SE to ensure the security of the digital key copying process. The terminal device can control the vehicle through NFC by writing the digital key of the SE, which expands the usage scenarios of the digital key and improves the usability of the digital key.
[0052] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0054] FIG1 is a schematic flow chart of a digital key synchronization method according to an exemplary embodiment.
[0055] FIG2 is a schematic flow chart of another digital key synchronization method according to an exemplary embodiment.
[0056] FIG3 is a schematic flow chart of another digital key synchronization method according to an exemplary embodiment.
[0057] FIG4 is a schematic flow chart of another digital key synchronization method according to an exemplary embodiment.
[0058] FIG5A is a schematic diagram showing a standard transaction process according to an exemplary embodiment.
[0059] FIG5B is a schematic diagram showing a quick transaction process according to an exemplary embodiment.
[0060] FIG6 is a schematic flow chart of another digital key synchronization method according to an exemplary embodiment.
[0061] FIG7 is a schematic flow chart of another digital key synchronization method according to an exemplary embodiment.
[0062] FIG8 is a block diagram of a digital key synchronization device according to an exemplary embodiment.
[0063] FIG9 is a block diagram showing another digital key synchronization device according to an exemplary embodiment.
[0064] FIG10 is a schematic structural diagram of a digital key synchronization device according to an exemplary embodiment of the present disclosure.
[0065] FIG11 is a structural diagram of a digital key synchronization device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0066] Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent like or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present invention, as detailed in the appended claims.
[0067] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of at least one of the associated listed items.
[0068] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining."
[0069] In related technologies, after a digital car key is created in the TEE of a smart device, it can support controlling the vehicle via Bluetooth.
[0070] However, if the smart device is in a low-battery state or is powered off, it will no longer be able to control the vehicle via Bluetooth. Considering that NFC is not limited by device battery or whether the device is powered on, and is more suitable for wearable devices, the use cases of digital keys can be expanded to NFC scenarios. Since many smart devices currently do not support NFC, how to control the vehicle through NFC is obviously an urgent problem that needs to be solved.
[0071] In order to solve the above technical problems, the present disclosure provides the following digital key synchronization method, device, and storage medium to ensure the security of the digital key copying process. The terminal device can write the digital key of the SE so that the terminal can control the vehicle through NFC, which expands the usage scenarios of the digital key and improves the usability of the digital key.
[0072] The following first introduces the digital key synchronization method provided by the present invention from the terminal device side.
[0073] An embodiment of the present disclosure provides a digital key synchronization method, as shown in FIG1 , which is a flow chart of a digital key synchronization method according to an embodiment. The method may be executed by a terminal device, wherein the terminal device may be a vehicle owner terminal device or a friend terminal device. The vehicle owner terminal device is a terminal device of the vehicle owner, and the friend terminal device is a terminal device authorized by the vehicle owner to use the digital key, including but not limited to a mobile phone, a laptop computer, a desktop computer, a tablet computer, a wearable device, etc. As shown in FIG1 , the method may include the following steps:
[0074] In step 101 , a first secure channel is established between a trusted execution environment (TEE) and a secure element (SE).
[0075] In the embodiment of the present disclosure, the first secure channel can be established between the TEE and the SE based on the Secure Channel Protocol (SCP). Of course, the first secure channel can also be established between the TEE and the SE based on other protocols, which is not limited in the present disclosure.
[0076] Specifically, the SCP may be a Global Platform (GP) SCP11a protocol.
[0077] In one possible implementation, the TEE may send a GET DATA message to the SE, and the SE returns a GET DATA Response message to the TEE. The GET DATA Response message may carry a Secure Digital (SD) public key certificate for key negotiation. The SD public key certificate is issued by the Controlling Authority for Confidential Key Loading Card Certificates (CA-KLCC).
[0078] Furthermore, the TEE sends a Perform Security Operation (PSO) message to the SE. This PSO message may carry the public key certificate of the Off Card Entity (OCE) used for key negotiation. This OCE public key certificate may be issued by the Controlling Authority for Confidential Key Loading OCE certificates (CA-KLOC). The SE returns a PSO response message to the TEE.
[0079] Furthermore, the TEE can send a mutual authentication message to the SE, which carries the OCE temporary public key used for key negotiation. The SE returns a mutual authentication response message, which carries the SD temporary public key used for key negotiation.
[0080] Furthermore, the TEE and SE use the Advanced Encryption Standard (AES) session key to perform Application Protocol Data Unit (APDU) interaction through SCP03 security messages, thereby establishing the first secure channel.
[0081] In the embodiment of the present disclosure, CA-KLOC and CA-KLCC may be device servers of the terminal device. The device server may be a server provided by the terminal device manufacturer, or a server provided by a third party, which is not limited in the present disclosure.
[0082] In step 102, the digital key information in the TEE is written into the SE through the first secure channel.
[0083] In the embodiments of the present disclosure, digital key information includes, but is not limited to, at least one of the following: key information of the digital key; certificate information of the digital key; expiration information of the digital key; permission information of the digital key; status information of the digital key, etc. Status information may include, but is not limited to, suspension, deletion, and restoration, etc. This disclosure does not limit this.
[0084] In the disclosed embodiment, the digital key information in the TEE can be written to the SE through the first secure channel. This synchronization process occurs automatically between the TEE and SE of the terminal device. For the user or vehicle, the digital key stored on the same terminal device is the same.
[0085] In the above embodiment, the synchronization of digital key information occurs between secure hardware and secure hardware, and the synchronization of digital key information is performed through the first secure channel between the secure hardware, ensuring the security of the digital key duplication process. In addition, by writing the digital key information from the TEE to the SE, the Bluetooth-enabled digital key can be extended to scenarios where NFC is used to control the vehicle without modification, thus expanding the use cases of digital keys and improving their usability.
[0086] In some optional embodiments, referring to FIG. 2 , FIG. 2 is a flow chart of a digital key synchronization method according to an embodiment, which may be executed by a terminal device, wherein the terminal device may be a vehicle owner device or a friend device, including but not limited to a mobile phone, a laptop computer, a desktop computer, a tablet computer, a wearable device, etc. As shown in FIG. 2 , the method may include the following steps:
[0087] In step 201, the SE obtains first information for establishing the first secure channel, and the TEE obtains second information for establishing the first secure channel.
[0088] Among them, the first security channel is a channel established between TEE and SE based on SCP for synchronizing digital key information.
[0089] In one possible implementation, the first information includes but is not limited to at least one of the following: a CA-KLOC public key; an SD public key certificate containing a key negotiation; and an SD private key used for key negotiation.
[0090] The CA-KLOC public key is used to verify the OCE public key certificate used for key negotiation.
[0091] In the embodiment of the present disclosure, a second secure channel may be established between the SE and the device server. After the SE obtains the first information provided by the device server through the second secure channel, the SE writes the first information into the SE.
[0092] In a possible implementation, the second information includes but is not limited to at least one of the following: a CA-KLCC public key; an OCE key pair; and an OCE public key certificate for key negotiation.
[0093] The CA-KLCC public key is used to verify the SD public key certificate used for key negotiation.
[0094] The OCE key pair includes: an OCE private key used for key negotiation and an OCE public key used for key negotiation.
[0095] In the embodiment of the present disclosure, the CA-KLCC public key may be pre-written into the TEE, for example, written into the TEE when the terminal device leaves the factory.
[0096] In the embodiment of the present disclosure, the OCE key pair can be generated by the TEE itself.
[0097] In the disclosed embodiment, the TEE can send a Certificate Signing Request (CSR) message to the device server. The TEE obtains the OCE public key certificate provided by the device server based on the CSR message and writes the OCE public key certificate into the TEE. The CSR message can carry the OCE public key used for key negotiation.
[0098] It should be noted that step 201 only needs to be executed once. After the first secure channel is established between the TEE and the SE, step 201 does not need to be executed again.
[0099] In step 202, a first secure channel is established between the TEE and the SE.
[0100] In the embodiment of the present disclosure, the SE can establish the first secure channel based on the SCP based on the first information and the TEE can establish the first secure channel based on the SCP based on the second information. The process of establishing the first secure channel is similar to step 101 above and will not be repeated here.
[0101] In step 203, the digital key information in the TEE is written into the SE through the first secure channel.
[0102] The implementation of step 203 is similar to that of step 102 above, and will not be repeated here.
[0103] In the above embodiment, SE and TEE can respectively obtain at least part of the first information and the second information from the device server, so that SE and TEE can establish a first security channel. Subsequently, the digital key information on TEE can be written into SE through the first security channel, which is simple to implement and has high availability.
[0104] In some optional embodiments, referring to FIG. 3 , FIG. 3 is a flow chart of a digital key synchronization method according to an embodiment, which may be executed by a terminal device, wherein the terminal device may be a vehicle owner device or a friend device, including but not limited to a mobile phone, a laptop computer, a desktop computer, a tablet computer, a wearable device, etc. As shown in FIG. 3 , the method may include the following steps:
[0105] In step 301 , a first secure channel is established between a trusted execution environment (TEE) and a secure element (SE).
[0106] The implementation of step 301 is similar to that of step 101 above, and will not be repeated here.
[0107] In step 302, the digital key information in the TEE is written into the SE through the first secure channel.
[0108] The implementation of step 302 is similar to that of step 102 above, and will not be repeated here.
[0109] In step 303, in response to determining that the digital key information in the TEE is updated, the trusted application TA of the TEE synchronizes the updated digital key information to the applet of the SE through the first secure channel.
[0110] In an embodiment of the present disclosure, if the terminal detects that the user has updated the digital key information in the TEE, the trusted application (TA) of the TEE can synchronize the updated digital key information to the applet of the SE through the first secure channel established above.
[0111] In one possible implementation, the digital key information includes but is not limited to at least one of the following: key information of the digital key; certificate information of the digital key; expiration information of the digital key; permission information of the digital key; status information of the digital key, etc. This disclosure does not limit this.
[0112] In one possible implementation, the update of digital key information includes but is not limited to at least one of the following: digital key key update; digital key certificate update; digital key authority update; digital key validity period update; digital key status update.
[0113] The digital key status update includes, but is not limited to, suspension, restoration, and deletion of the digital key. Suspension of a digital key means that the digital key is temporarily unavailable, and restoration of a digital key means that the suspended digital key is restored to use.
[0114] In the above embodiment, the TA of TEE can ensure the synchronization of digital key information in TEE and SE, which expands the usage scenarios of digital keys and improves the usability of digital keys.
[0115] In some optional embodiments, referring to FIG. 4 , FIG. 4 is a flow chart of a digital key synchronization method according to an embodiment, which may be executed by a terminal device, wherein the terminal device may be a vehicle owner device or a friend device, including but not limited to a mobile phone, a laptop computer, a desktop computer, a tablet computer, a wearable device, etc. As shown in FIG. 4 , the method may include the following steps:
[0116] In step 401 , a first secure channel is established between a trusted execution environment (TEE) and a secure element (SE).
[0117] The implementation of step 401 is similar to that of step 101 above, and will not be repeated here.
[0118] In step 402, the digital key information in the TEE is written into the SE through the first secure channel.
[0119] The implementation of step 402 is similar to that of step 102 above, and will not be repeated here.
[0120] In step 403, a first application protocol data unit (APDU) is exchanged with the vehicle via Bluetooth, and / or a second APDU is exchanged with the vehicle via NFC.
[0121] In the embodiment of the present disclosure, the first APDU can at least be used to authenticate the digital key information in the TEE, and the second APDU can at least be used to authenticate the digital key information in the SE.
[0122] The format of the second APDU is the same as that of the first APDU, and the data content included in the second APDU is the same as that included in the first APDU.
[0123] Specifically, the second APDU has the same format as the first APDU, indicating that the APDU on the terminal device is compatible with Bluetooth and NFC for authentication.
[0124] Specifically, the data information included in the second APDU is the same as the data information included in the first APDU, which means that the TEE and SE of the terminal device store relevant information for the same digital key. In the above embodiment, the APDU provided by the present disclosure is compatible with Bluetooth and NFC methods to authenticate the digital key, thereby improving the usability of the digital key.
[0125] In some optional embodiments, for the above step 403, the present disclosure provides an APDU for NFC mode, and the data portion of the APDU is compatible with data packets authenticated by Bluetooth. Whether the digital key is authenticated between the terminal device and the vehicle by Bluetooth or NFC, the authentication data content and the authentication data packet format are the same, and the digital key is extended to the wearable device. That is, the first APDU is used to authenticate the digital key information in the TEE, and the second APDU is used to authenticate the digital key information in the SE. The second APDU has the same format as the first APDU, and the data information included in the second APDU is the same as the data information included in the first APDU.
[0126] It should also be noted that when the terminal device is a wearable device, such as a smart watch, smart bracelet, etc., the quality of creating and deleting digital keys can be defined separately. Other instructions, such as configuring the validity period and permissions of the digital key or authenticating the digital key for transactions with the vehicle, can reuse the following processes and APDUs provided by this disclosure:
[0127] 5A is a flow chart showing a standard transaction between a terminal device and a vehicle according to an embodiment, including the following steps:
[0128] In step 501 , the vehicle sends a select (SELECT) command to the terminal device.
[0129] In step 502 , the terminal device sends a select response command to the vehicle.
[0130] The vehicle and the terminal device complete information exchange by exchanging SELECT commands and SELECT response commands.
[0131] In step 503 , the vehicle sends an EXCHANGE Perfectly Keyless (EXCHANGE PK) instruction to the terminal device.
[0132] The EXCHANGE PK command is used to exchange temporary public key information between the vehicle and the SE applet of the terminal. It can only be used for wireless interfaces and can be used for non-secure channels.
[0133] In step 504 , the terminal device sends an exchange response instruction to the vehicle.
[0134] In step 505 , the vehicle sends a standard authentication (STANDARD AUTH) command to the terminal device.
[0135] The STANDARD AUTH command is used by the vehicle to initiate a standard transaction request. It can only be used on wireless interfaces and can be used on non-secure channels.
[0136] In step 506 , the terminal device sends a standard response (STANDARD response) command to the vehicle.
[0137] In step 507 , the vehicle sends a flow control (CONTROL FLOW) instruction to the terminal device.
[0138] The CONTROL FLOW instruction is used to synchronize the authentication status of the vehicle terminal device during transactions.
[0139] In step 508 , the terminal device sends a CONTROL FLOW response instruction to the vehicle.
[0140] 5B , which is a flow chart illustrating a method for performing a quick transaction between a terminal device and a vehicle according to an embodiment, includes the following steps:
[0141] In step 501 ′, the vehicle sends a SELECT command to the terminal device.
[0142] In step 502 ′, the terminal device sends a SELECT response command to the vehicle.
[0143] The vehicle and the terminal device complete information exchange by exchanging SELECT commands and SELECT response commands.
[0144] In step 503 ′, the vehicle sends an EXCHANGE PK instruction to the terminal device.
[0145] The EXCHANGE PK command is used to exchange temporary public key information between the vehicle and the terminal's SE applet. It can only be used on wireless interfaces and can be used in non-secure channels.
[0146] In step 504 ′, the terminal device sends an EXCHANGE response instruction to the vehicle.
[0147] In step 505 ′, the vehicle sends a fast authentication (FAST AUTH) instruction to the terminal device.
[0148] The FAST AUTH command is used by the vehicle to initiate a fast transaction request. It can only be used on the wireless interface and can be used in non-secure channels.
[0149] In step 506 ′, the terminal device sends a fast response instruction to the vehicle.
[0150] In step 507 ′, the vehicle sends a CONTROL FLOW instruction to the terminal device.
[0151] The CONTROL FLOW instruction is used to synchronize the authentication status of the vehicle terminal device during transactions.
[0152] In step 508 ′, the terminal device sends a CONTROL FLOW response instruction to the vehicle.
[0153] Specifically, the APDU used in FIG. 5A or FIG. 5B is as follows:
[0154] In step 503 or step 503', the vehicle sends an EXCHANGE PK command to the terminal device. The format of the command message is as follows:
[0155] 80 61 00 P2 Lc data Le
[0156] Wherein, data is a data field, which may adopt a tag length value (TLV) format, as shown in Table 1, for example.
[0157] Table 1
[0158] In step 504 or step 504', the terminal device sends an EXCHANGE response command to the vehicle. The format of the response message is as follows:
[0159] [Data field] 9000
[0160] The data field may also be represented in TLV format, as shown in Table 2, for example.
[0161] Table 2
[0162] In step 505, the vehicle sends a STANDARD AUTH command to the terminal device. The format of the command message is as follows:
[0163] 80 62 00 P2 Lc[data][cmd mac]Le
[0164] The data field may be represented in TLV format, as shown in Table 3, for example.
[0165] Table 3
[0166] In step 506, the terminal device sends a STANDARD response command to the vehicle. The format of the command message is as follows:
[0167] [Encrypted Data] 9000
[0168] The data field may be represented in TLV format, as shown in Table 4, for example.
[0169] Table 4
[0170] In step 505', the vehicle sends a FAST AUTH command to the terminal device. The format of the command message is as follows:
[0171] 84 63 00 P2 Lc[encrypted data][cmd mac]Le
[0172] The data field may be represented in TLV format, as shown in Table 5, for example.
[0173] Table 5
[0174] In step 506', the terminal device sends a FAST response command to the vehicle. The format of the response message is as follows:
[0175] [Encrypted Data] 9000
[0176] Among them, the data field can be expressed in TLV format, which is the same as the content of the data field returned by vehicle rapid authentication, and will not be repeated here.
[0177] In step 507 or step 507', the vehicle sends a CONTROL FLOW command to the terminal device. The format of the command message is as follows:
[0178] 80 64 P1 P2 Lc data 00
[0179] In step 508 or step 508', the vehicle terminal device sends a CONTROL FLOW response command to the vehicle. The format of the response message is as follows:
[0180] 9000
[0181] It should be understood that each element in Tables 1 to 5 exists independently. These elements are illustratively listed in the same table, but this does not necessarily mean that all elements in the table must be present simultaneously as shown. The value of each element is independent of the value of any other element in the table. Therefore, those skilled in the art will understand that the value of each element in the table represents an independent embodiment.
[0182] The above description is merely an example. During a standard transaction or a fast transaction, the command message or the response message may also adopt other message formats, which is not limited in the present disclosure.
[0183] In the above embodiments, the usage scenarios of digital keys are expanded and the usability of digital keys is improved.
[0184] Next, the digital key synchronization method provided by the present invention will be introduced from the device server side.
[0185] An embodiment of the present disclosure provides a digital key synchronization method. As shown in FIG6 , FIG6 is a flow chart of a digital key synchronization method according to an embodiment. The method may be executed by a device server. The device server may be a server provided by the terminal device manufacturer or a server provided by a third party. The present disclosure does not limit this. As shown in FIG6 , the method may include the following steps:
[0186] In step 601, first information is sent to the SE of the terminal device, where the first information is used to establish a first secure channel between the SE and the trusted execution environment TEE of the terminal device.
[0187] In an embodiment of the present disclosure, the device server may establish a second secure channel with the SE of the terminal device. Furthermore, the device server provides the first information to the terminal device through the second secure channel so that the terminal device writes the first information into the SE.
[0188] In one possible implementation, the first information includes but is not limited to at least one of the following: a CA-KLOC public key; an SD public key certificate containing a key negotiation; and an SD private key used for key negotiation.
[0189] In step 602, at least part of the second information is sent to the TEE, where the second information is used to establish the first secure channel between the TEE and the SE.
[0190] In an embodiment of the present disclosure, after receiving the CSR request message sent by the TEE, the device server may send an OCE public key certificate for key negotiation to the terminal device so that the terminal device writes the OCE public key certificate into the TEE.
[0191] In a possible implementation, the second information includes but is not limited to at least one of the following: a CA-KLCC public key; an OCE key pair; and an OCE public key certificate for key negotiation.
[0192] The CA-KLCC public key is used to verify the SD public key certificate used for key negotiation.
[0193] The OCE key pair includes: an OCE private key used for key negotiation and an OCE public key used for key negotiation.
[0194] In the embodiment of the present disclosure, the CA-KLCC public key may be pre-written into the TEE, for example, written into the TEE when the terminal device leaves the factory.
[0195] In the embodiment of the present disclosure, the OCE key pair can be generated by the TEE itself.
[0196] In the disclosed embodiment, after receiving the CSR message sent by the TEE, the device server sends the OCE public key certificate to the TEE so that the terminal device can write the OCE public key certificate into the TEE. The CSR message can carry the OCE public key used for key negotiation.
[0197] In the above steps, the device server can act as CA-KLOC and CA-KLCC to provide corresponding information to SE and TEE.
[0198] In the above embodiment, the device server can provide at least part of the first information and the second information to the SE and TEE of the terminal device respectively, so that the SE and TEE establish the first secure channel, which is simple to implement and has high availability.
[0199] In some optional embodiments, referring to FIG. 7 , FIG. 7 is a flow chart of a digital key synchronization method according to an embodiment, including the following steps:
[0200] In step 701, the device server establishes a second secure channel with the SE of the terminal device and writes the first information into the SE.
[0201] The implementation of step 701 is similar to that of the above step 601 and will not be repeated here.
[0202] In step 702, the CA-KLCC public key is pre-written into the TEE, and the TEE generates an OCE key pair.
[0203] In step 703, the TEE sends a CSR message to the device server.
[0204] The CSR message may carry the OCE public key used for key negotiation.
[0205] In step 704 , the device server returns the OCE public key certificate to the TEE.
[0206] The implementation of step 704 is similar to that of step 602 above, and will not be repeated here.
[0207] The above steps 701 to 704 correspond to the key and certificate preparation stage, which is used by the TEE and SE to prepare the key and certificate for establishing the first secure channel. After the first secure channel is established between the TEE and SE, the above steps 701 to 704 do not need to be performed again.
[0208] In step 705, the TEE sends a get data message to the SE.
[0209] In step 706, the SE sends a get data response message to the TEE.
[0210] In step 707, the TEE sends a security operation execution message to the SE.
[0211] In step 708, the SE sends a security operation execution response message to the TEE.
[0212] In step 709 , the TEE sends a mutual authentication message to the SE.
[0213] In step 710, the SE sends a mutual authentication response message to the TEE.
[0214] In step 711 , APDUs are exchanged between the TEE and the SE.
[0215] The above steps 705 to 711 correspond to the stage of establishing the first secure channel.
[0216] In step 712 , the TEE writes the digital key information into the SE.
[0217] In addition, after the digital key information is written into the SE, the TA of the TEE is responsible for synchronizing the digital key information of the TEE with the digital key information in the SE.
[0218] Specifically, when the user suspends, resumes, or deletes the digital key in the TEE, the TA of the TEE should ensure that the digital key in the SE applet is also suspended, resumed, or deleted accordingly.
[0219] Alternatively, when the user changes the validity period, permission configuration and other information of the digital key in the TEE, the TA of the TEE should ensure that the validity period, permission configuration and other information of the digital key in the SE applet are also changed accordingly.
[0220] In the above embodiment, the synchronization of digital key information occurs between secure hardware and secure hardware, and the synchronization of digital key information is performed through the first secure channel between the secure hardware, ensuring the security of the digital key duplication process. In addition, the digital key information on the TEE and SE points to the same digital key, reducing the complexity and space consumption of vehicle implementation. Without any modification to the Bluetooth-enabled digital key, it can be extended to scenarios where NFC is used to control the vehicle, expanding the use cases of digital keys and improving their usability.
[0221] Corresponding to the aforementioned embodiment of the method for realizing application functions, the present disclosure also provides an embodiment of an apparatus for realizing application functions.
[0222] 8 , which is a block diagram of a digital key synchronization device according to an exemplary embodiment, the device is applied to a terminal device and includes:
[0223] A channel establishment module 801 is configured to establish a first secure channel between the trusted execution environment TEE and the security element SE;
[0224] The execution module 802 is configured to write the digital key information in the TEE into the SE through the first secure channel.
[0225] The specific implementation is similar to that of the embodiment shown in FIG1 , and will not be described in detail here.
[0226] Optionally, the device further comprises (not shown in FIG8 ):
[0227] an acquisition module, configured to acquire, by the SE, first information for establishing the first secure channel, and
[0228] The TEE obtains second information for establishing the first secure channel.
[0229] Optionally, the acquisition module includes:
[0230] A second establishing submodule, configured to establish a second secure channel between the SE and the device server of the terminal device;
[0231] The first acquisition submodule is configured to enable the SE to acquire the first information provided by the device server through the second secure channel.
[0232] Optionally, the acquisition module includes at least one of the following:
[0233] The second acquisition submodule is used to obtain the public key of the control agency CA-KLCC of the off-card entity OCE certificate pre-written into the TEE;
[0234] A generation submodule, configured to generate an OCE key pair from the TEE;
[0235] The third acquisition submodule is configured to obtain an OCE public key certificate provided by a device server of the terminal device and used for key negotiation.
[0236] Optionally, the device further comprises (not shown in FIG8 ):
[0237] The second sending module is configured to send a certificate signing request (CSR) message from the TEE to the device server, so that the device server provides the OCE public key certificate to the terminal based on the CSR request message.
[0238] The specific implementation is similar to that of the embodiment shown in FIG2 , and will not be described in detail here.
[0239] Optionally, the channel establishing module includes:
[0240] The first establishing submodule is used to establish the first secure channel between the TEE and the SE based on a secure channel protocol SCP.
[0241] Optionally, the device further comprises (not shown in FIG8 ):
[0242] A synchronization module is used to synchronize the updated digital key information to the SE applet through the first secure channel by the trusted application TA of the TEE in response to determining that the digital key information in the TEE is updated.
[0243] The specific implementation is similar to that of the embodiment shown in FIG3 , and will not be described in detail here.
[0244] Optionally, the device further comprises (not shown in FIG8 ):
[0245] An interaction module, configured to interact with the vehicle via Bluetooth using a first application protocol data unit (APDU), wherein the first APDU is at least used to authenticate the digital key information in the TEE; and / or
[0246] Interacting a second APDU with the vehicle via near field communication (NFC), where the second APDU is at least used to authenticate the digital key information in the SE;
[0247] The format of the second APDU is the same as that of the first APDU, and the data content included in the second APDU is the same as that included in the first APDU.
[0248] The specific implementation is similar to that of the embodiments shown in FIG. 4 and FIG. 5A and FIG. 5B , and will not be described in detail here.
[0249] 9 is a block diagram of a digital key synchronization apparatus according to an exemplary embodiment. The apparatus is applied to a device server and includes:
[0250] A first sending module 901 is configured to send first information to the SE of a terminal device, where the first information is used to establish a first secure channel between the SE and the trusted execution environment TEE of the terminal device; and
[0251] At least part of the second information is sent to the TEE, where the second information is used to establish the first secure channel between the TEE and the SE.
[0252] Optionally, the first sending module includes:
[0253] A third establishing submodule, configured to establish a second secure channel with the SE;
[0254] The first sending submodule is configured to send the first information to the SE through the second secure channel.
[0255] Optionally, the first sending module includes:
[0256] The second sending submodule is configured to, in response to receiving a certificate signature CSR request message sent by the TEE, send an off-card entity OCE public key certificate containing a public key certificate for key negotiation to the TEE based on the CSR request message.
[0257] The specific implementation is similar to that of the embodiment shown in FIG6 , and will not be described in detail here.
[0258] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0259] Correspondingly, the present disclosure also provides a computer-readable storage medium, which stores a computer program, and the computer program is used to execute any of the digital key synchronization methods described above on the terminal device side.
[0260] Correspondingly, the present disclosure also provides a computer-readable storage medium, which stores a computer program, and the computer program is used to execute any of the digital key synchronization methods described above on the device server side.
[0261] Accordingly, the present disclosure also provides a digital key synchronization device, comprising:
[0262] processor;
[0263] a memory for storing processor-executable instructions;
[0264] Wherein, the processor is configured to execute any of the digital key synchronization methods described above on the terminal device side.
[0265] Figure 10 is a block diagram of a digital key synchronization device 1000 according to an exemplary embodiment. Device 1000 can be, for example, a mobile phone, tablet computer, e-book reader, multimedia player, wearable device, in-vehicle user device, iPad, smart TV, or other terminal. This terminal can serve as a shared device and / or a vehicle owner's device.
[0266] 10 , apparatus 1000 may include one or more of the following components: a processing component 1002 , a memory 1004 , a power component 1006 , a multimedia component 1008 , an audio component 1010 , an input / output (I / O) interface 1012 , a sensor component 1016 , and a communication component 1018 .
[0267] The processing component 1002 generally controls the overall operation of the device 1000, such as operations associated with display, phone calls, data digital key synchronization, camera operation, and recording operations. The processing component 1002 may include one or more processors 1020 to execute instructions to complete all or part of the steps of the above-mentioned digital key synchronization method. In addition, the processing component 1002 may include one or more modules to facilitate the interaction between the processing component 1002 and other components. For example, the processing component 1002 may include a multimedia module to facilitate the interaction between the multimedia component 1008 and the processing component 1002. For another example, the processing component 1002 can read executable instructions from the memory to implement the steps of a digital key synchronization method provided in the above-mentioned embodiments.
[0268] The memory 1004 is configured to store various types of data to support the operation of the device 1000. Examples of such data include instructions for any application or method operating on the device 1000, contact data, phone book data, messages, pictures, videos, etc. The memory 1004 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0269] The power supply component 1006 provides power to the various components of the device 1000. The power supply component 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 1000.
[0270] The multimedia component 1008 includes a display screen that provides an output interface between the device 1000 and the user. In some embodiments, the multimedia component 1008 includes a front-facing camera and / or a rear-facing camera. When the device 1000 is in an operating mode, such as a capture mode or a video mode, the front-facing camera and / or the rear-facing camera can receive external multimedia data. Each front-facing camera and the rear-facing camera can have a fixed optical lens system or have a variable focal length and optical zoom capability.
[0271] The audio component 1010 is configured to output and / or input audio signals. For example, the audio component 1010 includes a microphone (MIC) that is configured to receive external audio signals when the device 1000 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 1004 or transmitted via the communication component 1018. In some embodiments, the audio component 1010 also includes a speaker for outputting audio signals.
[0272] I / O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0273] The sensor assembly 1016 includes one or more sensors for providing various aspects of the status assessment of the device 1000. For example, the sensor assembly 1016 can detect the open / closed state of the device 1000, the relative positioning of components, such as the display and keypad of the device 1000. The sensor assembly 1016 can also detect changes in the position of the device 1000 or a component of the device 1000, the presence or absence of user contact with the device 1000, the orientation or acceleration / deceleration of the device 1000, and changes in the temperature of the device 1000. The sensor assembly 1016 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1016 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1016 can also include an accelerometer, a gyroscope, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0274] The communication component 1018 is configured to facilitate wired or wireless communication between the device 1000 and other devices. The device 1000 can access a wireless network based on a communication standard, such as Wi-Fi, 2G, 3G, 4G, 5G or 6G, or a combination thereof. In an exemplary embodiment, the communication component 1018 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1018 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0275] In an exemplary embodiment, the device 1000 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the digital key synchronization method described above on either the shared device or the owner's device side.
[0276] Accordingly, the present disclosure also provides a digital key synchronization device, comprising:
[0277] processor;
[0278] a memory for storing processor-executable instructions;
[0279] Wherein, the processor is configured to execute any of the digital key synchronization methods described above on the device server side.
[0280] FIG11 is a schematic diagram illustrating the structure of a digital key synchronization device 1100 according to an exemplary embodiment. Device 1100 can be provided as a device server. Referring to FIG11 , device 1100 includes a processing component 1122, a wireless transmit / receive component 1124, an antenna component 1126, and a signal processing unit specific to a wireless interface. Processing component 1122 may further include at least one processor.
[0281] One of the processors in the processing component 1122 can be configured to execute any of the digital key synchronization methods described above on the device server side.
[0282] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0283] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A digital key synchronization method, characterized in that: The method is executed by a terminal device, and includes: Establishing a first secure channel between the trusted execution environment TEE and the security element SE; The digital key information in the TEE is written into the SE through the first secure channel.
2. The method according to claim 1, characterized in that Before establishing the first secure channel between the trusted execution environment TEE and the security element SE, the method further includes: The SE obtains first information for establishing the first secure channel, and The TEE obtains second information for establishing the first secure channel.
3. The method according to claim 2, characterized in that The obtaining, from the SE, first information for establishing the first secure channel includes: The SE establishes a second secure channel with the device server of the terminal device; The SE obtains the first information provided by the device server through the second secure channel.
4. The method according to claim 2, characterized in that The second information for establishing the first secure channel obtained by the TEE includes at least one of the following: Obtain the public key of the control authority CA-KLCC of the off-card entity OCE certificate pre-written into the TEE; Generate an OCE key pair by the TEE; Obtain an OCE public key certificate for key negotiation provided by a device server of the terminal device.
5. The method according to claim 4, characterized in that The method further comprises: The TEE sends a certificate signing request CSR message to the device server, so that the device server provides the OCE public key certificate to the terminal based on the CSR request message.
6. The method according to claim 1, characterized in that The establishing of a first secure channel between the trusted execution environment TEE and the security element SE includes: Based on a secure channel protocol SCP, the first secure channel is established between the TEE and the SE.
7. The method according to claim 1, characterized in that After writing the digital key information in the TEE into the SE through the first secure channel, the method further includes: In response to determining that the digital key information in the TEE is updated, the trusted application TA of the TEE synchronizes the updated digital key information to the applet of the SE through the first secure channel.
8. The method according to claim 1, characterized in that The method further comprises: Interacting with the vehicle via Bluetooth on a first application protocol data unit APDU, wherein the first APDU is at least used to authenticate the digital key information in the TEE; and / or Interacting a second APDU with the vehicle via near field communication (NFC), wherein the second APDU is at least used to authenticate the digital key information in the SE; The format of the second APDU is the same as that of the first APDU, and the data content included in the second APDU is the same as that included in the first APDU.
9. A digital key synchronization method, characterized in that: The method is executed by a device server and includes: Sending first information to the SE of the terminal device, where the first information is used to establish a first secure channel between the SE and the trusted execution environment TEE of the terminal device; and At least part of the second information is sent to the TEE, where the second information is used to establish the first secure channel between the TEE and the SE.
10. The method according to claim 9, characterized in that The sending the first information to the SE of the terminal device includes: Establishing a second secure channel with the SE; The first information is sent to the SE through the second secure channel.
11. The method according to claim 9, characterized in that The sending at least part of the second information to the TEE includes: In response to receiving a certificate signature CSR request message sent by the TEE, an off-card entity OCE public key certificate for key negotiation is sent to the TEE based on the CSR request message.
12. A digital key synchronization device, characterized in that: The device is applied to a terminal device, comprising: A channel establishment module, used to establish a first secure channel between the trusted execution environment TEE and the security unit SE; The execution module is configured to write the digital key information in the TEE into the SE through the first security channel.
13. A digital key synchronization device, characterized in that: The device is applied to a device server, comprising: A first sending module, configured to send first information to the SE of the terminal device, wherein the first information is used to establish a first secure channel between the SE and the trusted execution environment TEE of the terminal device; and At least part of the second information is sent to the TEE, where the second information is used to establish the first secure channel between the TEE and the SE.
14. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the digital key synchronization method described in any one of claims 1-8 or 9-11 above.
15. A digital key synchronization device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the digital key synchronization method described in any one of claims 1-8 or 9-11 above.
Citation Information
Patent Citations
Trusted pin management
US20160255073A1
Methods and apparatus for user authentication and human intent verification in mobile devices
US20160277930A1
Remote secure element policy management
US20160344560A1
Capability exposure method and device
WO2020088323A1
