Esim authentication method and related apparatus
By negotiating and sharing a security key between the eSIM module and the processing module, device binding and verification information is generated, which solves the problem of unauthorized access after the eSIM module is disassembled and improves the security of mobile communication networks.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2024-11-12
- Publication Date
- 2026-05-15
AI Technical Summary
When an eSIM module is disassembled and inserted into another device to access a mobile communication network, it affects the security of the mobile communication network.
By negotiating and sharing a security key between the eSIM module and the processing module, device binding information and verification information are generated, ensuring the consistency of device identification and preventing the eSIM module from being inserted into other devices after being disassembled.
It improves the security of eSIM modules when accessing mobile communication networks, preventing unauthorized devices from accessing them.
Smart Images

Figure CN2024131567_15052026_PF_FP_ABST
Abstract
Description
An eSIM authentication method and related apparatus
[0001] This application claims priority to two Chinese patent applications filed on November 14, 2023, with application number 202311520265.X and entitled "An eSIM Authentication Method and Related Device", and filed on February 6, 2024, with application number 202410173927.9 and entitled "An eSIM Authentication Method and Related Device", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of communication technology, and in particular to an eSIM authentication method and related apparatus. Background Technology
[0003] In the field of mobile communications, one common mobile communication access scheme is the user authentication access scheme based on the subscriber identity module (SIM). The common implementation involves the user inserting a SIM card into the SIM card slot of a mobile communication device such as a mobile phone or tablet. The mobile communication device then uses the inserted SIM card to authenticate its legitimacy with the communication service provider. Once authentication is successful, the mobile communication device is allowed to access the mobile communication network.
[0004] With the development of mobile communication technology, an embedded SIM (eSIM) solution has been proposed in existing technologies based on the SIM card solution. The eSIM solution embeds the traditional SIM card directly into the chip of the electronic device, rather than adding it to the device as a separate removable component, eliminating the need for users to insert a physical SIM card. This solution allows users greater flexibility in choosing operators and the ability to rewrite new phone numbers into the eSIM module of the electronic device.
[0005] Currently, users can write new phone numbers to the eSIM module of devices such as watches on their mobile phones, allowing them to make and receive calls and access the internet independently using the eSIM module. However, if the eSIM module is disassembled and inserted into other devices to connect to mobile communication networks, it can compromise the security of those networks.
[0006] Summary of the Invention
[0007] This application provides an eSIM authentication method and related apparatus, which can prevent the eSIM module in an electronic device from being disassembled and inserted into other devices to access the mobile communication network, thereby improving the security of the eSIM module when accessing the mobile communication network.
[0008] In a first aspect, this application provides an eSIM authentication method applied to an eSIM module. The method includes: the eSIM module storing a first device identifier sent by a first processing module; the eSIM module receiving device verification information sent by a second processing module after detecting a power outage and subsequent power-on; the eSIM module decrypting a second device identifier from the device verification information; if the first device identifier and the second device identifier are the same, the eSIM module performs mobile communication services normally; if the first device identifier and the second device identifier are different, or if the eSIM module does not receive device verification information sent by the second processing module after detecting a power outage and subsequent power-on, the eSIM module prohibits mobile communication services.
[0009] The eSIM authentication method provided in this embodiment allows a first processing module and an eSIM module in an electronic device to first negotiate a shared security key. Then, the first processing module encrypts the device identifier using the shared security key to generate device binding information and sends this information to the eSIM module. The eSIM module can decrypt the first device identifier from the device binding information using the shared security key and store it. Before the eSIM module powers on again or initiates mobile communication services, it can allow a second processing module communicating with it to obtain a second device identifier, encrypt it using the shared security key, and generate device verification information. The eSIM module can decrypt the second device identifier from the device verification information using a shared security key. If the second device identifier is the same as the first device identifier already stored in the eSIM module, it indicates that the second processing module and the first processing module bound to the eSIM module are the same processing module. Therefore, the eSIM module can perform mobile communication services normally. If the second device identifier is different from the first device identifier already stored in the eSIM module, or if the eSIM module does not receive the device verification information sent by the second processing module after detecting a power outage and subsequent power-on, it indicates that the second processing module and the first processing module bound to the eSIM module are not the same processing module. Therefore, the eSIM module can disable mobile communication services. This prevents the eSIM module in the electronic device from being disassembled and inserted into other devices to access the mobile communication network, thus improving the security of the eSIM module when accessing the mobile communication network.
[0010] In one possible implementation, before the eSIM module stores the first device identifier sent by the first processing module, the method further includes: the eSIM module receiving device binding information sent by the first processing module; after receiving the device binding information, the eSIM module decrypts the first device identifier from the device binding information and stores the first device identifier.
[0011] In one possible implementation, after receiving the device binding information, the eSIM module decrypts the first device identifier from the device binding information. Specifically, after receiving the device binding information, the eSIM module decrypts the first device identifier from the device binding information using a shared security key generated by the eSIM module.
[0012] In one possible implementation, after receiving the device verification information, the eSIM module decrypts the second device identifier from the device verification information. Specifically, after receiving the device verification information, the eSIM module decrypts the second device identifier from the verification information using a shared security key generated by the eSIM module.
[0013] In one possible implementation, before the eSIM module stores the first device identifier sent by the first processing module, the method further includes: the eSIM module generating an eUICC temporary working public key and an eUICC temporary working private key; the eSIM module receiving a TEE temporary working public key generated by the first processing module; and the eSIM module generating a shared security key based on the eUICC temporary working private key and the TEE temporary working public key.
[0014] In one possible implementation, before the eSIM module receives the TEE temporary working public key sent by the first processing module, the method further includes: the eSIM module receiving TEE signature data sent by the first processing module; the eSIM module verifying the legality of the TEE signature data using the TEE public key; and the eSIM module receiving the TEE temporary working public key sent by the first processing module, specifically including: after the eSIM module successfully verifies the legality of the TEE signature data, obtaining the TEE temporary working public key from the TEE signature data.
[0015] In one possible implementation, before the eSIM module receives the TEE signature data sent by the first processing module, the method further includes: the eSIM module verifying the legitimacy of the TEE certificate; and after the eSIM module successfully verifies the legitimacy of the TEE certificate, obtaining the TEE public key from the TEE certificate.
[0016] In one possible implementation, the TEE certificate includes a terminal certificate, and the TEE public key is the OEM public key in the terminal certificate; the eSIM module verifies the legitimacy of the TEE certificate by: the eSIM module verifying the legitimacy of the terminal certificate through the OEM public key in the terminal certificate.
[0017] In one possible implementation, the TEE certificate includes a device certificate and a terminal certificate, and the TEE public key is the OEM public key in the terminal certificate. Before the eSIM module verifies the validity of the TEE certificate, the method further includes: the eSIM module receiving the TEE certificate sent by the first processing module; the eSIM module verifying the validity of the TEE certificate specifically includes: the eSIM module using the terminal manufacturer's root public key in the terminal manufacturer's root certificate to verify the validity of the device certificate; after the eSIM module verifies the validity of the device certificate, it uses the device public key in the device certificate to verify the validity of the terminal certificate; wherein, if the validity of both the device certificate and the terminal certificate is verified, then the validity of the TEE certificate is verified.
[0018] In one possible implementation, the TEE certificate is a terminal manufacturer's root certificate, which is pre-installed in the eSIM module. The eSIM module verifies the legitimacy of the TEE certificate by verifying the legitimacy of the terminal manufacturer's root certificate using the terminal manufacturer's root public key in the root certificate.
[0019] In one possible implementation, the method further includes: the eSIM module generating the eUICC temporary working private key and the eUICC temporary working public key, the eUICC temporary working private key and the eUICC temporary working public key being a public-private key pair; the eSIM module signing the eUICC temporary working public key with the eUICC private key to obtain eUICC signature data; the eSIM module sending the eUICC signature data to the first processing module; wherein the eUICC signature data is used by the first processing module to obtain the eUICC temporary working public key and generate a shared security key based on the eUICC temporary working public key and the TEE temporary working private key, the TEE temporary working private key and the TEE temporary working public key being a public-private key pair.
[0020] In one possible implementation, the method further includes: the eSIM module sending an EUM certificate and an eUICC certificate to the first processing module; wherein the eUICC certificate is signed by an EUM private key paired with the EUM public key in the EUM certificate, the EUM certificate includes an eUICC public key, the eUICC public key and the eUICC private key are a public-private key pair, and the eUICC public key is used by the first processing module to verify the legality of the eUICC signature data.
[0021] In one possible implementation, the first device identifier is the chip identifier of the first processing module, and the second device identifier is the chip identifier of the second processing module; or, the first device identifier is the International Mobile Equipment Identity (IMEI) of the first processing module, and the second device identifier is the IMEI of the second processing module; or, the first device identifier is both the chip identifier and the IMEI of the first processing module, and the second device identifier is both the chip identifier and the IMEI of the second processing module.
[0022] In one possible implementation, after detecting a power outage and subsequent power-on, the eSIM module receives device verification information sent by the second processing module. Specifically, after detecting a power outage and subsequent power-on, the eSIM module sends a first request to the second processing module, which requests the second processing module to send a device identifier to the eSIM module.
[0023] In one possible implementation, the first request includes a first eUICC random number, which is used to be encrypted by the second processing module together with the second device identifier into device verification information.
[0024] In one possible implementation, the method further includes: the eSIM module decrypting a second eUICC random number from the device verification information; if the first device identifier is the same as the second device identifier, the eSIM module performs mobile communication services normally, specifically including: if the first device identifier is the same as the second device identifier and the second eUICC random number is the same as the first eUIC random number, the eSIM module performs mobile communication services normally.
[0025] In one possible implementation, the first request is a Get Input command.
[0026] In one possible implementation, the eSIM module receives device binding information sent by the first processing module, specifically including: the eSIM module receives device binding information sent by the first processing module through the Storedata command.
[0027] Secondly, this application provides an eSIM authentication method applied to an electronic device including an eSIM module and a second processing module. The method includes: the eSIM module storing a first device identifier sent by a first processing module; after detecting a power outage and subsequent power-on, the eSIM module sends a first request to the second processing module, the first request being used to request the second processing module to send a device identifier to the eSIM module; the second processing module obtaining a second device identifier; the second processing module encrypting the second device identifier to obtain device verification information; the second processing module sending the device verification information to the eSIM module; the eSIM module decrypting the second device identifier from the device verification information; if the first device identifier and the second device identifier are the same, the eSIM module normally performs mobile communication services; if the first device identifier and the second device identifier are different, or if the eSIM module does not receive the device verification information sent by the second processing module after detecting a power outage and subsequent power-on, the eSIM module prohibits mobile communication services.
[0028] The eSIM authentication method provided in this embodiment allows a first processing module and an eSIM module in an electronic device to first negotiate a shared security key. Then, the first processing module encrypts the device identifier using the shared security key to generate device binding information and sends this information to the eSIM module. The eSIM module can decrypt the first device identifier from the device binding information using the shared security key and store it. Before the eSIM module powers on again or initiates mobile communication services, it can allow a second processing module communicating with it to obtain a second device identifier, encrypt it using the shared security key, and generate device verification information. The eSIM module can decrypt the second device identifier from the device verification information using a shared security key. If the second device identifier is the same as the first device identifier already stored in the eSIM module, it indicates that the second processing module and the first processing module bound to the eSIM module are the same processing module. Therefore, the eSIM module can perform mobile communication services normally. If the second device identifier is different from the first device identifier already stored in the eSIM module, or if the eSIM module does not receive the device verification information sent by the second processing module after detecting a power outage and subsequent power-on, it indicates that the second processing module and the first processing module bound to the eSIM module are not the same processing module. Therefore, the eSIM module can disable mobile communication services. This prevents the eSIM module in the electronic device from being disassembled and inserted into other devices to access the mobile communication network, thus improving the security of the eSIM module when accessing the mobile communication network.
[0029] In one possible implementation, before the eSIM module stores the first device identifier sent by the first processing module, the method further includes: the eSIM module receiving device binding information sent by the first processing module; after receiving the device binding information, the eSIM module decrypts the first device identifier from the device binding information and stores the first device identifier.
[0030] In one possible implementation, after receiving the device binding information, the eSIM module decrypts the first device identifier from the device binding information. Specifically, after receiving the device binding information, the eSIM module decrypts the first device identifier from the device binding information using a shared security key.
[0031] In one possible implementation, after receiving the verification information, the eSIM module decrypts the second device identifier from the device verification information. Specifically, after receiving the device verification information, the eSIM module decrypts the second device identifier from the verification information using a shared security key.
[0032] In one possible implementation, before the eSIM module stores the first device identifier sent by the first processing module, the method further includes: the eSIM module generating an eUICC temporary working public key and an eUICC temporary working private key; the eSIM module receiving a TEE temporary working public key generated by the first processing module; and the eSIM module generating the shared security key based on the eUICC temporary working private key and the TEE temporary working public key.
[0033] In one possible implementation, before the eSIM module receives the TEE temporary working public key generated by the first processing module, the method further includes: the eSIM module receiving TEE signature data sent by the first processing module; the eSIM module verifying the legality of the TEE signature data using the TEE public key; and the eSIM module receiving the TEE temporary working public key generated by the first processing module, specifically including: after the eSIM module successfully verifies the legality of the TEE signature data, obtaining the TEE temporary working public key from the TEE signature data.
[0034] In one possible implementation, before the eSIM module receives the TEE signature data sent by the first processing module, the method further includes: the eSIM module verifying the legitimacy of the TEE certificate; and after the eSIM module successfully verifies the legitimacy of the TEE certificate, obtaining the TEE public key from the TEE certificate.
[0035] In one possible implementation, the TEE certificate includes a terminal certificate, and the TEE public key is the OEM public key in the terminal certificate; the eSIM module verifies the legitimacy of the TEE certificate by: the eSIM module verifying the legitimacy of the terminal certificate through the OEM public key in the terminal certificate.
[0036] In one possible implementation, the TEE certificate includes a terminal certificate, and the TEE public key is the OEM public key in the terminal certificate; the eSIM module verifies the legitimacy of the TEE certificate by: the eSIM module verifying the legitimacy of the terminal certificate through the OEM public key in the terminal certificate.
[0037] In one possible implementation, the TEE certificate includes a device certificate and a terminal certificate, and the TEE public key is the OEM public key in the terminal certificate. Before the eSIM module verifies the validity of the TEE certificate, the method further includes: the eSIM module receiving the TEE certificate sent by the first processing module; the eSIM module verifying the validity of the TEE certificate specifically includes: the eSIM module using the terminal manufacturer's root public key in the terminal manufacturer's root certificate to verify the validity of the device certificate; after the eSIM module verifies the validity of the device certificate, it uses the device public key in the device certificate to verify the validity of the terminal certificate; wherein, if the validity of both the device certificate and the terminal certificate is verified, then the validity of the TEE certificate is verified.
[0038] In one possible implementation, the TEE certificate is a terminal manufacturer's root certificate, which is pre-installed in the eSIM module. The eSIM module verifies the legitimacy of the TEE certificate by verifying the legitimacy of the terminal manufacturer's root certificate using the terminal manufacturer's root public key in the root certificate.
[0039] In one possible implementation, the method further includes: the eSIM module generating the eUICC temporary working private key and the eUICC temporary working public key, the eUICC temporary working private key and the eUICC temporary working public key being a public-private key pair; the eSIM module signing the eUICC temporary working public key with the eUICC private key to obtain eUICC signature data; the eSIM module sending the eUICC signature data to the first processing module; wherein the eUICC signature data is used by the first processing module to obtain the eUICC temporary working public key, and to generate the shared security key based on the eUICC temporary working public key and the TEE temporary working private key, the TEE temporary working private key and the TEE temporary working public key being a public-private key pair.
[0040] In one possible implementation, the method further includes: the eSIM module sending an EUM certificate and an eUICC certificate to the first processing module; wherein the eUICC certificate is signed by an EUM private key paired with the EUM public key in the EUM certificate, the EUM certificate includes an eUICC public key, the eUICC public key and the eUICC private key are a public-private key pair, and the eUICC public key is used by the first processing module to verify the legality of the eUICC signature data.
[0041] In one possible implementation, the first device identifier is the chip identifier of the first processing module, and the second device identifier is the chip identifier of the second processing module; or, the first device identifier is the International Mobile Equipment Identity (IMEI) of the first processing module, and the second device identifier is the IMEI of the second processing module; or, the first device identifier is both the chip identifier and the IMEI of the first processing module, and the second device identifier is both the chip identifier and the IMEI of the second processing module.
[0042] In one possible implementation, the first request includes a first eUICC random number; the second processing module encrypts the second device identifier to obtain device verification information, specifically including: the second processing module encrypts the first eUICC random number and the second device identifier to obtain the device verification information.
[0043] In one possible implementation, the method further includes: the eSIM module decrypting a second eUICC random number from the device verification information; if the first device identifier is the same as the second device identifier, the eSIM module performs mobile communication services normally, specifically including: if the first device identifier is the same as the second device identifier and the second eUICC random number is the same as the first eUICC random number, the eSIM module performs mobile communication services normally.
[0044] In one possible implementation, the first request is a Get Input command.
[0045] In one possible implementation, the eSIM module receives device binding information sent by the first processing module, specifically including: the eSIM module receives device binding information sent by the first processing module via the Storedata command.
[0046] Thirdly, this application provides an eSIM authentication method applied to a processing module. The method includes: storing a first eSIM identifier sent by a first eSIM module in the TEE of the processing module; receiving eSIM verification information sent by the second eSIM module after the second eSIM module is powered off and then powered on; decrypting the second eSIM identifier from the eSIM verification information; if the second eSIM identifier is the same as the first eSIM identifier, the processing module can use the second eSIM module normally for mobile communication services; if the second eSIM identifier is different from the first eSIM identifier or the processing module does not receive the eSIM verification information sent by the second eSIM module after the second eSIM module is powered off and then powered on, the processing module prohibits the use of the second eSIM module for mobile communication services.
[0047] The eSIM authentication method provided in this embodiment allows the processing module and the first eSIM module in an electronic device to first negotiate a shared key. Then, the first eSIM module encrypts the eSIM identifier using the shared security key to generate eSIM binding information and sends this information to the processing module. The processing module can decrypt the first eSIM identifier from the eSIM binding information using the shared security key and store it. Before the eSIM module powers on again or before engaging in mobile communication services, the processing module can instruct the second eSIM module communicating with it to obtain the second eSIM identifier, encrypt it using the shared security key, and generate eSIM verification information. The processing module can decrypt the second eSIM identifier from the verification information using the shared security key. If the second eSIM identifier matches the first eSIM identifier already stored in the processing module's TEE, it indicates that the second eSIM module and the first eSIM module bound to the processing module are the same eSIM module, and therefore the processing module can normally engage in mobile communication services. If the second eSIM identifier differs from the first device identifier stored in the processing module's TEE, or if the processing module does not receive device verification information from the second eSIM module after power-off and power-on, it indicates that the second eSIM module and the first eSIM module bound to the processing module are not the same eSIM module. Therefore, the processing module can prohibit the use of the second eSIM for mobile communication services. This prevents eSIM modules in electronic devices from being disassembled or obtained through other means from being inserted into the current device to access the mobile communication network, thus improving the security when the current device simultaneously contains an eSIM module to access the mobile communication network.
[0048] In one possible implementation, before the first eSIM identifier sent by the first eSIM module is stored in the TEE of the processing module, the method further includes: the processing module receiving eSIM binding information sent by the first eSIM module; after receiving the eSIM binding information, the processing module decrypts the first eSIM identifier from the eSIM binding information and stores the first eSIM identifier in the TEE.
[0049] In one possible implementation, after receiving the eSIM binding information, the processing module decrypts the first eSIM identifier from the eSIM binding information. Specifically, after receiving the eSIM binding information, the processing module decrypts the first eSIM identifier from the eSIM binding information using the shared security key generated by the TEE in the processing module.
[0050] In one possible implementation, after receiving the eSIM verification information, the processing module decrypts the second eSIM identifier from the eSIM verification information. Specifically, after receiving the eSIM verification information, the processing module decrypts the second device identifier from the verification information using the shared security key generated by the TEE.
[0051] In one possible implementation, before the processing module stores the first eSIM identifier sent by the first eSIM module, the method further includes: the processing module generating a TEE temporary working public key and a TEE temporary working private key through the TEE; the processing module receiving the eUICC temporary working public key generated by the first processing module; and the processing module generating a shared security key based on the TEE temporary working private key and the eUICC temporary working public key.
[0052] In one possible implementation, before the processing module receives the eUICC temporary working public key sent by the first eSIM module, the method further includes: the processing module receiving TEE signature data sent by the first processing module;
[0053] The processing module verifies the legitimacy of the eUICC signature data using the eUICC public key in the eUICC certificate; the processing module receives the eUICC temporary working public key sent by the first eSIM module, specifically including: after the processing module verifies the legitimacy of the eUICC signature data, it obtains the eUICC temporary working public key from the eUICC signature data.
[0054] In one possible implementation, before the processing module receives the eUICC signature data sent by the first eSIM module, the method further includes: the processing module receiving the EUM certificate and the eUICC certificate sent by the first eSIM module; the processing module verifying the validity of the EUM certificate using the authentication root public key in the authentication root certificate; after successfully verifying the validity of the EUM certificate, the processing module verifying the validity of the eUICC certificate using the EUM public key in the EUM certificate; and after successfully verifying the validity of the eUICC certificate, the processing module obtaining the eUICC public key from the eUICC certificate.
[0055] In one possible implementation, the method further includes: the processing module generating a TEE temporary working private key and a TEE temporary working public key in the TEE, the TEE temporary working private key and the TEE temporary working public key being a public-private key pair; the processing module signing the TEE temporary working public key with the TEE private key to obtain TEE signature data; the processing module sending the TEE signature data to the first eSIM module; wherein the TEE signature data is used by the first eSIM module to obtain the TEE temporary working public key and generate a shared security key based on the TEE temporary working public key and the eUICC temporary working private key, the eUICC temporary working private key and the eUICC temporary working public key being a public-private key pair.
[0056] In one possible implementation, before the processing module receives the eSIM verification information sent by the second eSIM module, the method further includes: after detecting that the second eSIM module has been powered off and then powered on, the processing module sends a first device random number to the second eSIM module, the first device random number being used to be encrypted by the second eSIM module together with the second eSIM identifier to form the eSIM verification information.
[0057] In one possible implementation, the method further includes: the processing module decrypting the second device random number from the eSIM verification information; if the second eSIM identifier is the same as the first eSIM identifier, the processing module uses the second eSIM module normally for mobile communication services, specifically including: if the second eSIM identifier is the same as the first eSIM identifier and the second device random number is the same as the first device random number, the processing module uses the second eSIM module normally for mobile communication services.
[0058] Fourthly, this application provides an eSIM authentication method applied to an electronic device including a processing module and a second eSIM module. The method includes: storing a first eSIM identifier sent by the first eSIM module in the TEE of the processing module; obtaining the second eSIM identifier of the second eSIM module after power failure and power restoration; encrypting the second eSIM identifier to obtain eSIM verification information; sending the eSIM verification information to the processing module; decrypting the second eSIM identifier from the eSIM verification information; if the second eSIM identifier is the same as the first eSIM identifier, the processing module normally uses the second eSIM module for mobile communication services; if the second eSIM identifier is different from the first eSIM identifier or the processing module does not receive the device verification information sent by the second processing module after power failure and power restoration, the processing module prohibits the use of the second eSIM module for mobile communication services.
[0059] The eSIM authentication method provided in this embodiment allows the processing module and the first eSIM module in an electronic device to first negotiate a shared key. Then, the first eSIM module encrypts the eSIM identifier using the shared security key to generate eSIM binding information and sends this information to the processing module. The processing module can decrypt the first eSIM identifier from the eSIM binding information using the shared security key and store it. Before the eSIM module powers on again or before engaging in mobile communication services, the processing module can instruct the second eSIM module communicating with it to obtain the second eSIM identifier, encrypt it using the shared security key, and generate eSIM verification information. The processing module can decrypt the second eSIM identifier from the verification information using the shared security key. If the second eSIM identifier matches the first eSIM identifier already stored in the processing module's TEE, it indicates that the second eSIM module and the first eSIM module bound to the processing module are the same eSIM module, and therefore the processing module can normally engage in mobile communication services. If the second eSIM identifier differs from the first eSIM identifier already stored in the processing module's TEE, it indicates that the second eSIM module and the first eSIM module bound to the processing module are not the same eSIM module. Therefore, the processing module can prohibit the use of the second eSIM for mobile communication services. This prevents eSIM modules in electronic devices from being disassembled or obtained through other means from being inserted into the current device to access the mobile communication network, thus improving the security when the current device simultaneously contains an eSIM module to access the mobile communication network.
[0060] In one possible implementation, before the first eSIM identifier sent by the first eSIM module is stored in the TEE of the processing module, the method further includes: the processing module receiving eSIM binding information sent by the first eSIM module; after receiving the eSIM binding information, the processing module decrypts the first eSIM identifier from the eSIM binding information and stores the first eSIM identifier in the TEE.
[0061] In one possible implementation, after receiving the eSIM binding information, the processing module decrypts the first eSIM identifier from the eSIM binding information. Specifically, after receiving the eSIM binding information, the processing module decrypts the first eSIM identifier from the eSIM binding information using the shared security key generated by the TEE in the processing module.
[0062] In one possible implementation, after receiving the eSIM verification information, the processing module decrypts the second eSIM identifier from the eSIM verification information. Specifically, after receiving the eSIM verification information, the processing module decrypts the second device identifier from the verification information using the shared security key generated by the TEE.
[0063] In one possible implementation, before the processing module stores the first eSIM identifier sent by the first eSIM module, the method further includes: the processing module generating a TEE temporary working public key and a TEE temporary working private key through the TEE; the processing module receiving the eUICC temporary working public key generated by the first processing module; and the processing module generating a shared security key based on the TEE temporary working private key and the eUICC temporary working public key.
[0064] In one possible implementation, before the processing module receives the eUICC temporary working public key sent by the first eSIM module, the method further includes: the processing module receiving TEE signature data sent by the first processing module; the processing module verifying the legitimacy of the eUICC signature data using the eUICC public key in the eUICC certificate; the processing module receiving the eUICC temporary working public key sent by the first eSIM module specifically includes: after the processing module successfully verifies the legitimacy of the eUICC signature data, obtaining the eUICC temporary working public key from the eUICC signature data.
[0065] In one possible implementation, before the processing module receives the eUICC signature data sent by the first eSIM module, the method further includes: the processing module receiving the EUM certificate and the eUICC certificate sent by the first eSIM module; the processing module verifying the validity of the EUM certificate using the authentication root public key in the authentication root certificate; after successfully verifying the validity of the EUM certificate, the processing module verifying the validity of the eUICC certificate using the EUM public key in the EUM certificate; and after successfully verifying the validity of the eUICC certificate, the processing module obtaining the eUICC public key from the eUICC certificate.
[0066] In one possible implementation, the method further includes: the processing module generating a TEE temporary working private key and a TEE temporary working public key in the TEE, the TEE temporary working private key and the TEE temporary working public key being a public-private key pair; the processing module signing the TEE temporary working public key with the TEE private key to obtain TEE signature data; the processing module sending the TEE signature data to the first eSIM module; wherein the TEE signature data is used by the first eSIM module to obtain the TEE temporary working public key and generate a shared security key based on the TEE temporary working public key and the eUICC temporary working private key, the eUICC temporary working private key and the eUICC temporary working public key being a public-private key pair.
[0067] In one possible implementation, before the processing module receives the eSIM verification information sent by the second eSIM module, the method further includes: after detecting that the second eSIM module has been powered off and then powered on, the processing module sends a first device random number to the second eSIM module, the first device random number being used to be encrypted by the second eSIM module together with the second eSIM identifier to form the eSIM verification information.
[0068] In one possible implementation, the method further includes: the processing module decrypting the second device random number from the eSIM verification information; if the second eSIM identifier is the same as the first eSIM identifier, the processing module uses the second eSIM module normally for mobile communication services, specifically including: if the second eSIM identifier is the same as the first eSIM identifier and the second device random number is the same as the first device random number, the processing module uses the second eSIM module normally for mobile communication services.
[0069] Fifthly, this application provides an eSIM authentication method applied to an electronic device including a second processing module and a second eSIM module. The method includes: storing a first eSIM identifier sent by a first eSIM module in the TEE of the second processing module; storing a first device identifier sent by the first processing module in the second eSIM module; obtaining the second eSIM identifier of the second eSIM module after power failure and power restoration; encrypting the second eSIM identifier to obtain eSIM verification information; sending the eSIM verification information to the second processing module; obtaining the second device identifier, encrypting the second device identifier to obtain device verification information, and sending the device verification information to the second eSIM module; the second processing module obtains the second device identifier, encrypts the second device identifier to obtain device verification information, and sends the device verification information to the second eSIM module; the second processing module... The second processing module decrypts the second eSIM identifier from the eSIM verification information; the second eSIM module decrypts the second device identifier from the device verification information; if the second eSIM identifier is the same as the first eSIM identifier and the second device identifier is the same as the first device identifier, then the electronic device can normally use the second eSIM module for mobile communication services; if the second eSIM identifier is different from the first eSIM identifier or the second device identifier is different from the first device identifier, or if the second processing module does not receive the eSIM verification information sent by the second eSIM module after the second eSIM module is powered off and then powered on, or if the second eSIM module does not receive the device verification information sent by the second processing module after the second eSIM module is powered off and then powered on, then the electronic device is prohibited from using the second eSIM module for mobile communication services.
[0070] Through the eSIM authentication method provided in this embodiment, the second processing module is legally bound to the first eSIM module. Therefore, the TEE of the second processing module stores the first eSIM identifier of the first eSIM module and the shared security key negotiated with the first eSIM module. The second eSIM module is also legally bound to the first processing module. Therefore, the second eSIM module stores the first device identifier of the first processing module and the shared security key negotiated with the first processing module. When the second processing module and the second eSIM module work together, if the second eSIM module is powered on or before engaging in mobile communication services, the second processing module can obtain the second device identifier of the second processing module and encrypt the second device identifier into device verification information using the shared security key before sending it to the second eSIM module. The second eSIM module can also obtain the second eSIM identifier of the second eSIM module and encrypt the second eSIM identifier into eSIM verification information using the shared security key before sending it to the second processing module. The second processing module can decrypt the second eSIM identifier from the eSIM verification information using a shared security key. Similarly, the second eSIM module can decrypt the second device identifier from the device verification information using the shared security key. If the second eSIM identifier is the same as the first eSIM identifier stored in the processing module's TEE, and the second device identifier is the same as the first device identifier, then the second eSIM module and the second processing module are bound together. Therefore, the second processing module can use the second eSIM module for mobile communication services normally. If the second eSIM identifier is different from the first eSIM identifier stored in the processing module's TEE, or the second device identifier is different from the first device identifier, or the second processing module does not receive eSIM verification information after the second eSIM module is powered off and then powered on, or the second eSIM module does not receive device verification information after power off and then powered on, then the second eSIM module and the second processing module are not bound together. Therefore, the second processing module can prohibit the use of the second eSIM for mobile communication services. This prevents the eSIM module in the electronic device from being disassembled and inserted into other devices to access the mobile communication network, thus improving the security of the eSIM module when accessing the mobile communication network.
[0071] In one possible implementation, before the second eSIM module stores the first device identifier sent by the first processing module, the method further includes: the second eSIM module receiving device binding information sent by the first processing module; after receiving the device binding information, the second eSIM module decrypts the first device identifier from the device binding information and stores the first device identifier.
[0072] In one possible implementation, after receiving the device binding information, the second eSIM module decrypts the first device identifier from the device binding information. Specifically, after receiving the device binding information, the second eSIM module decrypts the first device identifier from the device binding information using a shared security key generated by the second eSIM module.
[0073] In one possible implementation, after receiving the device verification information, the second eSIM module decrypts the second device identifier from the device verification information. Specifically, after receiving the device verification information, the second eSIM module decrypts the second device identifier from the verification information using a shared security key generated by the second eSIM module.
[0074] In one possible implementation, before the second eSIM module stores the first device identifier sent by the first processing module, the method further includes: the second eSIM module generating an eUICC temporary working public key and an eUICC temporary working private key; the second eSIM module receiving a TEE temporary working public key generated by the first processing module; and the second eSIM module generating a shared security key based on the eUICC temporary working private key and the TEE temporary working public key.
[0075] In one possible implementation, before the second eSIM module receives the TEE temporary working public key sent by the first processing module, the method further includes: the second eSIM module receiving TEE signature data sent by the first processing module; the second eSIM module verifying the legality of the TEE signature data using the TEE public key; and the second eSIM module receiving the TEE temporary working public key sent by the first processing module, specifically including: after the second eSIM module successfully verifies the legality of the TEE signature data, obtaining the TEE temporary working public key from the TEE signature data.
[0076] In one possible implementation, before the second eSIM module receives the TEE signature data sent by the first processing module, the method further includes: the second eSIM module verifying the legitimacy of the TEE certificate; and after the second eSIM module successfully verifies the legitimacy of the TEE certificate, obtaining the TEE public key from the TEE certificate.
[0077] In one possible implementation, the TEE certificate includes a terminal certificate, and the TEE public key is the OEM public key in the terminal certificate; the second eSIM module verifies the legitimacy of the TEE certificate by: the second eSIM module verifying the legitimacy of the terminal certificate through the OEM public key in the terminal certificate.
[0078] In one possible implementation, the TEE certificate includes a device certificate and a terminal certificate, and the TEE public key is the OEM public key in the terminal certificate. Before the eSIM module verifies the validity of the TEE certificate, the method further includes: the second eSIM module receiving the TEE certificate sent by the first processing module; the second eSIM module verifying the validity of the TEE certificate specifically includes: the second eSIM module using the terminal manufacturer's root public key in the terminal manufacturer's root certificate to verify the validity of the device certificate; after the second eSIM module verifies the validity of the device certificate, it uses the device public key in the device certificate to verify the validity of the terminal certificate; wherein, if the validity of both the device certificate and the terminal certificate is verified, the validity of the TEE certificate is verified.
[0079] In one possible implementation, the TEE certificate is a terminal manufacturer's root certificate, which is pre-installed in the second eSIM module. The second eSIM module verifies the legitimacy of the TEE certificate by verifying the legitimacy of the terminal manufacturer's root certificate using the terminal manufacturer's root public key in the root certificate.
[0080] In one possible implementation, the method further includes: the second eSIM module generating the eUICC temporary working private key and the eUICC temporary working public key, the eUICC temporary working private key and the eUICC temporary working public key being a public-private key pair; the second eSIM module signing the eUICC temporary working public key with the eUICC private key to obtain eUICC signature data; the second eSIM module sending the eUICC signature data to the first processing module; wherein, the eUICC signature data is used by the first processing module to obtain the eUICC temporary working public key, and to generate a shared security key based on the eUICC temporary working public key and the TEE temporary working private key, the TEE temporary working private key and the TEE temporary working public key being a public-private key pair.
[0081] In one possible implementation, the method further includes: the second eSIM module sending an EUM certificate and an eUICC certificate to the first processing module; wherein the eUICC certificate is signed by an EUM private key paired with the EUM public key in the EUM certificate, the EUM certificate includes an eUICC public key, the eUICC public key and the eUICC private key are a public-private key pair, and the eUICC public key is used by the first processing module to verify the legality of the eUICC signature data.
[0082] In one possible implementation, the first device identifier is the chip identifier of the first processing module, and the second device identifier is the chip identifier of the second processing module; or, the first device identifier is the International Mobile Equipment Identity (IMEI) of the first processing module, and the second device identifier is the IMEI of the second processing module; or, the first device identifier is both the chip identifier and the IMEI of the first processing module, and the second device identifier is both the chip identifier and the IMEI of the second processing module.
[0083] In one possible implementation, before the first eSIM identifier sent by the first eSIM module is stored in the TEE of the second processing module, the method further includes: the second processing module receiving eSIM binding information sent by the first eSIM module; after receiving the eSIM binding information, the second processing module decrypts the first eSIM identifier from the eSIM binding information and stores the first eSIM identifier in the TEE.
[0084] In one possible implementation, after receiving the eSIM binding information, the second processing module decrypts the first eSIM identifier from the eSIM binding information. Specifically, after receiving the eSIM binding information, the second processing module decrypts the first eSIM identifier from the eSIM binding information using the shared security key generated by the TEE in the second processing module.
[0085] In one possible implementation, after receiving the eSIM verification information, the second processing module decrypts the second eSIM identifier from the eSIM verification information. Specifically, after receiving the eSIM verification information, the second processing module decrypts the second device identifier from the verification information using the shared security key generated by the TEE.
[0086] In one possible implementation, before the second processing module stores the first eSIM identifier sent by the first eSIM module, the method further includes: the second processing module generating a TEE temporary working public key and a TEE temporary working private key through the TEE; the second processing module receiving the eUICC temporary working public key generated by the first processing module; and the second processing module generating a shared security key based on the TEE temporary working private key and the eUICC temporary working public key.
[0087] In one possible implementation, before the second processing module receives the eUICC temporary working public key sent by the first eSIM module, the method further includes: the second processing module receiving TEE signature data sent by the first processing module; the second processing module verifying the legitimacy of the eUICC signature data using the eUICC public key in the eUICC certificate; and the second processing module receiving the eUICC temporary working public key sent by the first eSIM module, specifically including: after the second processing module successfully verifies the legitimacy of the eUICC signature data, obtaining the eUICC temporary working public key from the eUICC signature data.
[0088] In one possible implementation, before the second processing module receives the eUICC signature data sent by the first eSIM module, the method further includes: the second processing module receiving the EUM certificate and the eUICC certificate sent by the first eSIM module; the second processing module verifying the validity of the EUM certificate using the authentication root public key in the authentication root certificate; after successfully verifying the validity of the EUM certificate, the second processing module verifying the validity of the eUICC certificate using the EUM public key in the EUM certificate; and after successfully verifying the validity of the eUICC certificate, the second processing module obtaining the eUICC public key from the eUICC certificate.
[0089] In one possible implementation, the method further includes: the second processing module generating a TEE temporary working private key and a TEE temporary working public key in the TEE, the TEE temporary working private key and the TEE temporary working public key being a public-private key pair; the second processing module signing the TEE temporary working public key with the TEE private key to obtain TEE signature data; the second processing module sending the TEE signature data to the first eSIM module; wherein the TEE signature data is used by the first eSIM module to obtain the TEE temporary working public key and generate a shared security key based on the TEE temporary working public key and the eUICC temporary working private key, the eUICC temporary working private key and the eUICC temporary working public key being a public-private key pair.
[0090] In one possible implementation, the method further includes: after detecting that the second eSIM module has been powered off and then powered on again, the second processing module sends an eUICC random number acquisition command to the second processing module, the eUICC random number acquisition command being used to request the second processing module to send an eUICC random number to the second processing module; after receiving the eUICC random number acquisition command, the second eSIM module generates a first eUICC random number and sends the first eUICC random number to the second processing module; the second processing module generates a first device random number; the second processing module acquires the second device identifier and encrypts the second device identifier to obtain device verification information, specifically including: the second processing module acquires the second device identifier and encrypts the second device identifier, the first device random number, and the first eUICC random number to obtain device verification information.
[0091] In one possible implementation, the method further includes: after receiving the device verification information, the second eSIM module decrypts the second eUICC random number and the third device random number from the device verification information; the second eSIM module encrypts the second eSIM identifier to obtain the eSIM verification information, specifically including: the second eSIM module encrypts the second eSIM identifier and the third device random number to obtain the eSIM verification information.
[0092] In one possible implementation, the method further includes: the second processing module decrypting a second device random number from the eSIM verification information; if the second eSIM identifier is the same as the first eSIM identifier and the second device identifier is the same as the first device identifier, then the electronic device normally uses the second eSIM module to perform mobile communication services, specifically including: if the second eSIM identifier is the same as the first eSIM identifier and the second device identifier is the same as the first device identifier and the second device random number is the same as the first device random number and the second eUICC random number is the same as the first eUICC random number, then the electronic device normally uses the second eSIM module to perform mobile communication services.
[0093] In a sixth aspect, this application provides an eSIM module, comprising: a processing circuit, a storage circuit, and an interface circuit. The storage circuit is used to store data and code instructions, and the interface circuit is used to send commands to the processing module via a modem or to receive commands sent by the processing module via the modem. The processing circuit is used to execute the code instructions to perform the methods in the first aspect and any possible implementation thereof.
[0094] In a seventh aspect, this application provides a processing module, characterized in that it includes: a processing circuit, a storage circuit, and an interface circuit, wherein the storage circuit is used to store data and code instructions, the interface circuit is used to send commands to the eSIM module via a modem or to receive commands sent by the eSIM module via the modem; and the processing circuit is used to run the code instructions to perform the methods in the third aspect and any possible implementation thereof.
[0095] Eighthly, this application provides an electronic device including: an eSIM module, a second processing module, and one or more memories, wherein the one or more memories are coupled to the second processing module, and the one or more memories are used to store a computer program, which, when executed by the second processing module, causes the first electronic device to perform the methods described in the second aspect and any possible implementation thereof.
[0096] Ninthly, this application provides an electronic device including: a second eSIM module, a processing module, and one or more memories, wherein the one or more memories are coupled to the processing module, and the one or more memories are used to store a computer program, which, when executed by the processing module, causes the second electronic device to perform the methods in the fourth aspect and any possible implementation thereof.
[0097] In a tenth aspect, this application provides an electronic device including: a second eSIM module, a second processing module, and one or more memories, wherein the one or more memories are coupled to the second processing module, and the one or more memories are used to store a computer program, which, when executed by the second processing module, causes the electronic device to perform the methods in the fifth aspect and any possible implementation thereof.
[0098] Eleventhly, embodiments of this application provide a computer storage medium including computer instructions that, when executed on a processor of an electronic device, cause the electronic device to perform the method in any possible implementation of the second aspect described above.
[0099] In a twelfth aspect, embodiments of this application provide a computer storage medium including computer instructions that, when executed on a processor of an electronic device, cause the electronic device to perform the methods described in the fourth aspect and any possible implementation thereof.
[0100] In a thirteenth aspect, embodiments of this application provide a computer storage medium including computer instructions that, when executed on a processor of an electronic device, cause the electronic device to perform the methods described in the fifth aspect and any possible implementation thereof.
[0101] The beneficial effects of the second to thirteenth aspects mentioned above can be referred to the beneficial effects of the first aspect and any possible implementation of the first aspect, which will not be repeated here. Attached Figure Description
[0102] Figure 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0103] Figure 2 is a schematic diagram of the structure of a trusted execution environment for an electronic device provided in an embodiment of this application;
[0104] Figure 3 is a schematic diagram of the certificate chain in the TEE and eSIM modules of an electronic device provided in an embodiment of this application;
[0105] Figure 4 is a schematic diagram of a certificate signing process provided in an embodiment of this application;
[0106] Figure 5 is a schematic diagram of the device-SIM card binding process in an eSIM authentication method provided in an embodiment of this application;
[0107] Figure 6 is a schematic diagram of the device-card verification process in an eSIM authentication method provided in an embodiment of this application;
[0108] Figure 7 is a schematic diagram of the signaling interaction process of device-card binding in an eSIM authentication method provided in an embodiment of this application;
[0109] Figure 8A is a schematic diagram of the encryption process of plaintext data in a Storedata command according to an embodiment of this application;
[0110] Figure 8B is a schematic diagram of the encryption process of plaintext response data in a Response command according to an embodiment of this application;
[0111] Figure 9 is a schematic diagram of the signaling interaction process for SIM card verification in an eSIM authentication method provided in an embodiment of this application;
[0112] Figure 10 is a schematic diagram of the command format of the Get Input command provided in an embodiment of this application;
[0113] Figure 11 is a schematic diagram of the execution environment of an electronic device provided in an embodiment of this application;
[0114] Figure 12 is a schematic diagram of the certificate chain in the TEE and eSIM modules of an electronic device provided in an embodiment of this application;
[0115] Figure 13 is a schematic diagram of the one-way binding process of the SIM card in an eSIM authentication method provided in this application embodiment;
[0116] Figure 14 is a schematic diagram of the two-way binding process of the SIM card in an eSIM authentication method provided in this application embodiment;
[0117] Figure 15 is a schematic diagram of the two-way binding process of the SIM card in an eSIM authentication method provided in this application embodiment;
[0118] Figure 16 is a schematic diagram of the two-way verification process between the SIM card and the device in an eSIM authentication method provided in this application embodiment;
[0119] Figure 17 is a schematic diagram of the signaling interaction process of one-way binding of the SIM card and the device in an eSIM authentication method provided in this application embodiment;
[0120] Figure 18 is a schematic diagram of the signaling interaction process of two-way binding between the device and the SIM card in an eSIM authentication method provided in this application embodiment;
[0121] Figure 19 is a schematic diagram of the signaling interaction process of two-way binding between the device and the SIM card in an eSIM authentication method provided in another embodiment of this application;
[0122] Figure 20 is a schematic diagram of the two-way verification process of the SIM card in an eSIM authentication method provided in this application embodiment. Detailed Implementation
[0123] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0124] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0125] Figure 1 shows a schematic diagram of the structure of the electronic device 100.
[0126] The following description uses electronic device 100 as an example to illustrate the embodiment. It should be understood that the electronic device 100 shown in FIG1 is merely an example, and the electronic device 100 may have more or fewer components than shown in FIG1, may combine two or more components, or may have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0127] Electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and embedded SIM (eSIM) module 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0128] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0129] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0130] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0131] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0132] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0133] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0134] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0135] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0136] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0137] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device 100 to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device 100 to display images.
[0138] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0139] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0140] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0141] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0142] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0143] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0144] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0145] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0146] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0147] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0148] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0149] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0150] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be manufactured using organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), miniled, microled, micro-OLEDs, quantum dot light-emitting diodes (QLEDs), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0151] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0152] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimizations on image noise, brightness, etc. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0153] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0154] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.
[0155] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0156] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0157] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0158] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0159] Electronic device 100 can implement audio functions such as music playback and recording through an audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor. A pressure sensor 180A is used to sense pressure signals and can convert them into electrical signals. In some embodiments, the pressure sensor 180A can be located on a display screen 194. A gyroscope sensor 180B can be used to determine the motion posture of electronic device 100. A barometric pressure sensor 180C is used to measure barometric pressure. A magnetic sensor 180D includes a Hall effect sensor. Electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of a flip cover. An accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in various directions (generally three axes). A distance sensor 180F is used to measure distance. A proximity sensor 180G can include, for example, a light-emitting diode (LED) and a photodetector, such as a photodiode. An ambient light sensor 180L is used to sense ambient light intensity. A fingerprint sensor 180H is used to collect fingerprints. Temperature sensor 180J is used to detect temperature. Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In some embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194. Bone conduction sensor 180M can acquire vibration signals. Buttons 190 include power button, volume buttons, etc. Motor 191 can generate vibration cues. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc.
[0160] The eSIM module 195 can be embedded in the electronic device 100. The eSIM module is typically embedded inside the motherboard of the electronic device. It can replace a physical SIM card, but the eSIM is much smaller. Unlike a SIM card, an eSIM can freely switch numbers or change operators because the information on the eSIM can be rewritten. The eSIM card is remotely configured via over-the-air (OTA) technology, enabling the download, installation, activation, deactivation, and deletion of operator configuration files, all downloaded and installed to the terminal over the network.
[0161] In this application embodiment, the device type of electronic device 100 may include any one of the following: smartphone, smartwatch, smart speaker, personal computer, smart TV, tablet computer, smart socket, air purifier, smart desk lamp, smart air conditioner, smart curtain, smart water heater, smart door lock, smart camera, etc.
[0162] Figure 2 is a schematic diagram of the structure of a trusted execution environment for an electronic device provided in an embodiment of this application.
[0163] As shown in Figure 2, the electronic device 100 may include a central processing unit (CPU), a modem, and an eSIM module. The CPU can run two application environments: a rich execution environment (REE) and a trusted execution environment (TEE).
[0164] Applications running on the REE can be referred to as client applications. Client applications within the REE can include encryption / decryption client applications (CAs). The REE can also run a local profile assistant (LPA), a card application service (Catservice), and a telephone management module (Telephony Manager).
[0165] Applications running within a TEE can be called Trusted Applications (TEE applications, TAs). A TEE's Trusted Applications can include encryption and decryption TAs. The TEE can also manage digital certificates issued by Certificate Authorities (CAs). For example, digital certificates in a TEE can include root certificates (CERT.CI.ECDSA), device certificates (CERT.DEVICE.ECDSA), and terminal certificates (CERT.OEM.ECDSA), and so on.
[0166] An operating system running in a REE (Reliable Execution Environment) can be called a Rich Execution Environment (REE) OS, while an operating system running in a TEE (Trusted Execution Environment) can be called a Trusted Execution Environment (TEE) OS. The TEE is a secure runtime environment running on the CPU. Its secure boot process requires verification and is separate from the REE. Applications running within the TEE are independent of each other and cannot access each other without authorization, ensuring that the processing of resources and data within the TEE is performed in a trusted environment, thus providing security services for the REE OS. The TEE has its own execution space, offering a higher level of security than the REE OS, and is a secure architecture overlapping with the current CPU hardware architecture. The hardware and software resources accessible by the TEE are separate from those of the REE OS, providing hardware-supported isolation. In this system, the encryption / decryption CA and encryption / decryption TA share memory. If the encryption / decryption CA needs to communicate with the encryption / decryption TA, the CA can request and establish a session with the requesting encryption / decryption TA from the TEE OS. After the session is established, the CA can send processing requests and the data to be processed to the TA through shared memory. The TA, after receiving the processing requests and data from shared memory, can execute the processing requests within the TEE environment, and the processing results are stored in shared memory. The CA can then retrieve the processing results from the TA through shared memory. If the CA no longer needs the TA to process the results after receiving them, it can request to close the session from the TEE OS. Upon receiving the close session request, the TEE OS can reclaim the relevant resources of the encryption / decryption TA.
[0167] The LPA can invoke the SIM card binding logic and send SIM card binding commands to the eSIM module. The LPA can interact with the eSIM module for SIM card binding via Telephony Manager and Modem. The LPA can communicate with the encryption / decryption TA in the TEE by invoking the encryption / decryption CA, thereby enabling the encryption / decryption TA to provide services such as encryption / decryption, certificate verification, and key negotiation during the SIM card binding interaction.
[0168] The eSIM module can manage SIM card binding logic, digital certificates, security status, and send SIM card verification commands. The digital certificates managed by the eSIM module can include authentication root certificates, terminal manufacturer root certificates (CERT.OEMCI.ECDSA), and so on.
[0169] The eSIM module can invoke the SIM card binding logic and send a SIM card verification command to the Cat Service via the Modem, thereby triggering SIM card verification interaction between the eSIM module and the Cat Service. The Cat Service can communicate with the encryption / decryption TA in the TEE by calling the encryption / decryption CA, thereby invoking the encryption / decryption TA to provide encryption and decryption services during the SIM card verification interaction.
[0170] 1. In the machine-card binding logic:
[0171] The LPA can first request the eSIM module's certificate chain, and then use the encryption / decryption CA to call the encryption / decryption TA to verify the eSIM module's certificate chain. After successfully verifying the legitimacy of the eSIM module's certificate chain, the encryption / decryption TA can obtain the embedded universal integrated circuit card (eUICC) public key from the eSIM module's certificate chain. The LPA can then use the encryption / decryption CA to call the encryption / decryption TA to generate a TEE temporary working public key and a TEE temporary working private key, and then call the encryption / decryption TA to sign the TEE temporary working public key using the TEE private key (e.g., the OEM private key), and send the signed data including the TEE temporary working public key to the eSIM module.
[0172] The LPA can send the TEE's certificate chain to the eSIM module. The eSIM module can verify the TEE's certificate chain. After successfully verifying the legitimacy of the TEE's certificate chain, the eSIM module can obtain the TEE's public key (e.g., the OEM public key) from the TEE's certificate chain. The eSIM module generates an eUICC temporary working public key and an eUICC temporary working private key, signs the eUICC temporary working public key using the eUICC private key, and sends the signed data including the eUICC temporary working public key to the LPA.
[0173] LPA can verify the signature data containing the eUICC temporary working key using the eUICC public key by calling the encryption / decryption TA, and obtain the eUICC temporary working key after successful verification. The encryption / decryption TA can generate a shared security key based on the eUICC temporary working key and the TEE temporary working private key.
[0174] The eSIM module can use the TEE public key (e.g., the OEM public key) to verify signed data including the TEE temporary working key, and obtain the TEE temporary working key after successful verification. The eSIM module can generate a shared security key based on the TEE temporary working key and the eUICC temporary working private key.
[0175] Both the eSIM module and the encryption / decryption TA can generate the same shared security key using the other party's temporary working public key and their own temporary working private key.
[0176] The LPA can obtain Device Identifier 1 (e.g., CPU identifier and / or IMEI) and call the Encryption / Decryption TA to encrypt Device Identifier 1 using a shared security key to obtain the binding information. The LPA can then send the binding information to the eSIM module.
[0177] The eSIM module can decrypt the device identifier from the binding information using a shared security key and store the device identifier 1.
[0178] 2. In the machine-card verification logic:
[0179] After the aforementioned SIM card binding logic, the eSIM module is bound to Device Identifier 1. Upon power-up or before initiating network registration, the eSIM module can proactively send a Device Identifier retrieval request to the Cat Service. Upon receiving the request, the Cat Service retrieves Device Identifier 2 within its CPU and uses the encryption / decryption TA to encrypt Device Identifier 2 using the shared security key, obtaining verification information. The Cat Service can then send this verification information to the eSIM module. The eSIM module can decrypt Device Identifier 2 from the verification information using the shared security key. The eSIM module can then determine if the decrypted Device Identifier 2 matches the stored Device Identifier 1. If Device Identifier 2 matches Device Identifier 1, the SIM card verification is successful, and the eSIM module can perform communication services normally. If Device Identifier 2 differs from Device Identifier 1, the SIM card verification fails, and the eSIM module prohibits communication services.
[0180] In one possible implementation, the device identifier acquisition request may include a random number. The encryption / decryption key (TA) can encrypt the device identifier 2 and the random number together using a shared security key to obtain verification information. The eSIM module can then decrypt the device identifier 2 and the random number from the verification information using the shared security key. If the decrypted random number is the same as the random number carried in the device identifier acquisition request, and device identifier 2 is the same as device identifier 1, then the SIM card verification passes. If the decrypted random number is different from the random number carried in the device identifier acquisition request, or device identifier 2 is different from device identifier 1, then the SIM card verification fails.
[0181] In the embodiments of this application, the above-mentioned central processing unit is only an exemplary explanation of this application and is not intended to limit it. The central processing unit may also be other processing modules. The processing modules may include the above-mentioned REE and TEE. For the functional description of REE and TEE and the architecture of internal modules, please refer to the embodiment shown in Figure 2 above, which will not be repeated here.
[0182] In the embodiments of this application, a CPU can be referred to as a processing module, a first CPU can be referred to as a first processing module, and a second CPU can be referred to as a second processing module. The first CPU can be understood as an example of the first processing module, and the second CPU can also be understood as an example of the second processing module. In some possible embodiments of this application, the first processing module and the second processing module can be the same processing module or different processing modules.
[0183] In this embodiment, the electronic device 100 can be referred to as a terminal, and the processing module and modem in the electronic device 100 can be collectively referred to as a terminal device. Therefore, the terminal may include a terminal device and an eSIM module.
[0184] Figure 3 shows a schematic diagram of the certificate chain in the TEE and eSIM modules of an electronic device 100 provided in an embodiment of this application.
[0185] As shown in Figure 3, the TEE can manage the authentication root certificate (CERT.CI.ECDSA), device certificate, and terminal certificate (CERT.OEM.ECDSA). The authentication root certificate is the root certificate of the embedded UICC manufacture (EUM) certificate in the eSIM module, and the EUM certificate is the root certificate of the eUICC certificate. That is, the EUM certificate is signed with the private key corresponding to the authentication root certificate, and the eUICC certificate is signed with the private key corresponding to the EUM certificate.
[0186] Among them, the authentication root certificate (CERT.CI.ECDSA) can be imported into the TEE of electronic device 100 via OTA through the public key infrastructure (PKI) device authorized by the authentication root certificate.
[0187] TEE can generate a pair of OEM public and private keys, consisting of an OEM public key (PK.OEM.ECDSA) and an OEM private key (SK.OEM.ECDSA). The OEM public and private keys can be public and private keys based on the NIST P256 standard's elliptic curve cryptography (ECC) standard. The signature algorithm for the OEM public and private keys can be the elliptic curve digital signature algorithm (ECDSA).
[0188] The TEE can import its certificate into the PKI device offline via a vendor-certified certificate. For example, the TEE certificate can include device certificates and terminal certificates. The TEE can send an offline certificate signing request to the vendor-certified PKI device. This offline certificate signing request includes the OEM public key (PK.OEM.ECDSA). This request is used to request the vendor-certified PKI device to issue a digital certificate for the OEM public key. Upon receiving the offline certificate signing request, the vendor-certified PKI device can first issue a device certificate using the private key corresponding to the terminal manufacturer's root certificate, and then issue a terminal certificate containing the OEM public key using the private key corresponding to the device certificate. The terminal certificate includes the OEM public key (PK.OEM.ECDSA), and the corresponding private key is the OEM private key (SK.OEM.ECDSA).
[0189] For example, refer to the certificate signing process shown in Figure 4:
[0190] 1. The device manufacturer's root certificate authorized PKI device can store the terminal manufacturer's root certificate and its corresponding private key (SK.OEMCI.ECDSA). The device manufacturer's root certificate authorized PKI device can use the private key (SK.OEMCI.ECDSA) corresponding to the terminal manufacturer's root certificate to sign the certificate content of the device certificate and generate a device certificate. The device certificate includes the device public key (PK.DEVICE.ECDSA), and the terminal manufacturer's root authorized PKI device stores the device private key (SK.DEVICE.ECDSA) that is paired with the device public key (PK.DEVICE.ECDSA).
[0191] 2. After receiving the offline certificate signing request from the TEE of Electronic Device 100, the PKI device authorized by the equipment vendor certificate can obtain the OEM public key (PK.OEM.ECDSA) from the offline certificate signing request and generate the certificate content of the terminal certificate. The certificate content of the terminal certificate may include the OEM public key (PK.OEM.ECDSA), the specified signature algorithm (e.g., ECDSA), the certificate validity period, the user, etc.
[0192] 3. The terminal manufacturer's root authorization PKI device can perform a hash operation on the certificate content of the terminal certificate to generate a digital digest of the terminal certificate. The terminal manufacturer's root authorization PKI device can encrypt the digital digest of the terminal certificate into a certificate signature using the device's private key (SK.DEVICE.ECDSA) and a specified signature algorithm. The terminal manufacturer's root authorization PKI device can then combine the digital digest of the terminal certificate with the certificate signature of the business root certificate to generate the terminal certificate.
[0193] The eSIM module can pre-configure a terminal manufacturer's root certificate, an authentication root certificate (CERT.CI.ECDSA), an EUM certificate, an eUICC certificate, the EUM private key corresponding to the EUM certificate, and the eUICC private key corresponding to the eUICC certificate (SK.eUICC.ECDSA). The terminal manufacturer's root certificate includes the terminal manufacturer's root public key; the authentication root certificate (CERT.CI.ECDSA) includes the authentication root public key (PK.CI.ECDSA); the EUM certificate includes the EUM public key; and the eUICC certificate includes the eUICC public key (PK.eUICC.ECDSA). The authentication root private key corresponding to the authentication root certificate (CERT.CI.ECDSA) has been used to sign the EUM certificate. The EUM private key corresponding to the EUM certificate has also been used to sign the EUM certificate.
[0194] The TEE and eSIM module can mutually verify each other's certificate chains and exchange temporary working public keys.
[0195] in:
[0196] (1) The encryption / decryption TA in the TEE can verify the certificate chain of the eSIM module.
[0197] The eSIM module's certificate chain includes an authentication root certificate, an EUM certificate, and an eUICC certificate. The eSIM module can send the EUM certificate and eUICC certificate to the encryption / decryption TA. The encryption / decryption TA can verify the validity of the EUM certificate using the authentication root public key in the pre-installed authentication root certificate within the TEE. If the EUM certificate verification is successful, the encryption / decryption TA can verify the validity of the eUICC certificate using the EUM public key within the EUM certificate. If the eUICC certificate verification is successful, the encryption / decryption TA can confirm that the validity of the eSIM module's certificate chain has been verified.
[0198] (2) The eSIM module can verify the TEE certificate chain.
[0199] The TEE certificate chain includes a device certificate and a terminal certificate. The encryption / decryption TA (Transaction Authorization Key) sends both the device certificate and the terminal certificate to the eSIM module. The eSIM module can verify the validity of the device certificate using the public key in the terminal manufacturer's root certificate pre-installed within the eSIM module. If the device certificate verification is successful, the eSIM module can verify the validity of the terminal certificate using the device's public key within the device certificate. If the terminal certificate verification is successful, the eSIM module can determine that the validity of the TEE certificate chain has been verified.
[0200] In one possible implementation, the TEE certificate may include the terminal manufacturer's root certificate. The terminal manufacturer's root certificate is self-signed by the terminal manufacturer's root private key corresponding to the root certificate. In this case, the eSIM module can store the terminal manufacturer's root certificate after the OTA upgrade is complete. Since the device certificate managed by the TEE is only the terminal manufacturer's root certificate, the LPA does not need to send the terminal manufacturer's root certificate to the eSIM module for verification. The eSIM module can directly verify it through signing after receiving the TEE's temporary working public key.
[0201] (3) The encryption / decryption TA in the TEE exchanges a temporary working public key with the eSIM module.
[0202] The encryption / decryption TA can generate TEE temporary working public and private keys, which include the TEE temporary working public key (otPK.TEE.ECKA) and the TEE temporary working private key (otSK.TEE.ECKA). After the encryption / decryption TA and the eSIM module have verified each other's certificate chains, the encryption / decryption TA can sign the TEE temporary working public key (otPK.TEE.ECDSA) using the OEM private key (SK.OEM.ECDSA) and send the TEE signature data, including the TEE temporary working public key (otPK.TEE.ECKA), to the eSIM module.
[0203] After verifying the TEE certificate chain, the eSIM module can obtain the OEM public key from the TEE terminal certificate. The eSIM module can then verify the TEE signature data, which includes the TEE temporary working public key (otPK.TEE.ECKA), using the OEM public key, and obtain the TEE temporary working public key (otPK.TEE.ECKA) upon successful verification.
[0204] The eSIM module can generate eUICC temporary working public and private keys, which include an eUICC temporary working public key (otPK.eUICC.ECKA) and an eUICC temporary working private key (otSK.eUICC.ECKA). The eSIM module can sign the eUICC temporary working public key (otPK.eUICC.ECKA) using the eUICC private key (SK.eUICC.ECDSA) and send the eUICC signature data, including the eUICC temporary working public key (otPK.eUICC.ECKA), to the encryption / decryption TA.
[0205] After verifying the certificate chain of the eSIM module, the encryption / decryption TA can obtain the eUICC public key (PK.eUICC.ECDSA) from the eUICC certificate. The encryption / decryption TA can then use the eUICC public key (PK.eUICC.ECDSA) to verify the eUICC signature data, which includes the eUICC temporary working public key (otPK.eUICC.ECKA). Upon successful verification, the TA obtains the eUICC temporary working public key (otPK.TEE.ECKA).
[0206] The eSIM module can generate a shared secret key (ShS) based on the TEE temporary working public key (otPK.TEE.ECKA) and the eUICC temporary working private key (otSK.eUICC.ECKA).
[0207] The encryption / decryption TA can generate a shared secret key (ShS) based on the eUICC temporary working public key (otPK.eUICC.ECKA) and the TEE temporary working private key (otSK.TEE.ECKA).
[0208] Since the TEE temporary working public key (otPK.TEE.ECKA) and TEE temporary working private key (otSK.TEE.ECKA) are a public-private key pair, and the eUICC temporary working public key (otPK.eUICC.ECKA) and eUICC temporary working private key (otSK.eUICC.ECKA) are also a public-private key pair, both the eSIM module and the encryption / decryption TA can use the other party's temporary working public key and their own temporary working private key to generate the same shared security key (ShS).
[0209] In one possible implementation, the authentication root certificate (CERT.CI.ECDSA) can be a root certificate issued by the operator, a root certificate issued by a third-party organization, a root certificate issued by the terminal manufacturer, a root certificate issued by the EUM manufacturer, and so on.
[0210] In one possible implementation, the terminal certificate (CERT.OEM.ECDSA) can be issued directly by the terminal manufacturer's root certificate or by an intermediate certificate issued by the terminal manufacturer's root certificate, or it can be issued by the authentication root certificate.
[0211] In one possible implementation, the terminal certificate (CERT.OEM.ECDSA) can be self-signed.
[0212] In one possible implementation, the device manufacturer's root certificate (CERT.OEMCI.ECDSA) can be pre-installed in the eSIM module before the electronic device 100 leaves the factory.
[0213] In one possible implementation, the device manufacturer's root certificate (CERT.OEMCI.ECDSA) can also be issued to the electronic device 100 by the server during OTA upgrades after the electronic device 100 has left the factory. The processing module (e.g., CPU) in the electronic device 100 is pre-installed in the eSIM module.
[0214] The abbreviations for certificates used in the embodiments of this application will be explained uniformly below.
[0215] (1) The abbreviation for the root certificate can be CERT.CI.ECDSA, CERT.CI.SIG, or CERT.CNCI.SIG. The abbreviation for the root public key of the root certificate can be PK.CI.ECKA, PK.CNCI.ECKA, or PK.CNCI.SIG, etc. The abbreviation for the corresponding root private key can be SK.CI.ECKA, SK.CNCI.ECKA, or SK.CNCI.SIG, etc.
[0216] (2) The abbreviation for an EUM certificate can be CERT.EUM.ECDSA or CERT.EUM.SIG. The abbreviation for the EUM public key of the EUM certificate can be PK.EUM.ECKA, PK.EUM.ECKA, or PK.EUM.SIG, etc. The abbreviation for the EUM private key corresponding to the EUM certificate can be SK.EUM.ECKA, SK.EUM.ECKA, or SK.EUM.SIG, etc.
[0217] (3) An eUICC certificate can also be called an eSIM certificate. The abbreviation for an eUICC certificate (also known as an eSIM certificate) can be CERT.eUICC.ECDSA, CERT.eUICC.SIG, CERT.eSIM.ECDSA, or CERT.eSIM.SIG. The abbreviation for the eUICC public key (also known as the eSIM public key) of the eUICC certificate (also known as the eSIM certificate) can be PK.eUICC.ECKA, PK.eUICC.ECKA, PK.eUICC.SIG, PK.eSIM.ECKA, PK.eSIM.ECKA, or PK.eSIM.SIG, etc. The abbreviation for the eUICC private key (also known as the eSIM private key) corresponding to the eUICC certificate (also known as the eSIM certificate) can be SK.eUICC.ECKA, SK.eUICC.ECKA, SK.eUICC.SIG, SK.eSIM.ECKA, SK.eSIM.ECKA, or SK.eSIM.SIG, etc.
[0218] (4) The abbreviation for the terminal manufacturer's root certificate can be CERT.OEMCI.ECDSA or CERT.OEMCI.SIG. The abbreviation for the terminal manufacturer's root public key can be PK.OEMCI.ECKA or PK.OEMCI.SIG. The abbreviation for the terminal manufacturer's root private key corresponding to the terminal manufacturer's root certificate can be SK.OEMCI.ECKA or SK.OEMCI.SIG.
[0219] (5) The abbreviation for the device certificate can be CERT.DEVICE.ECDSA or CERT.DEVICE.SIG. The abbreviation for the device public key of the device certificate can be PK.DEVICE.ECKA or PK.DEVICE.SIG. The abbreviation for the device private key corresponding to the device certificate can be SK.DEVICE.ECKA or SK.DEVICE.SIG.
[0220] (6) The abbreviation for the terminal certificate can be CERT.OEM.ECDSA or CERT.OEM.SIG. The abbreviation for the terminal public key of the terminal certificate can be PK.OEM.ECKA or PK.OEM.SIG. The abbreviation for the device private key corresponding to the device certificate can be SK.OEM.ECKA or SK.OEM.SIG.
[0221] In this embodiment of the application, for the sake of convenience in describing the certificates, the abbreviation ".ECDSA" is used to describe the certificates.
[0222] The following describes an eSIM authentication method provided in the embodiments of this application.
[0223] Figure 5 shows a schematic diagram of the device-SIM card binding process in an eSIM authentication method provided in an embodiment of this application.
[0224] This eSIM authentication method can be applied to a first electronic device including a first CPU and an eSIM module. The first CPU may run an REE and a TEE. The REE may run an LPA and an encryption / decryption CA, and the TEE may run an encryption / decryption TA. For a detailed description of the REE and TEE, please refer to the embodiments shown in Figures 2-4 above, which will not be repeated here.
[0225] As shown in Figure 5, the process of binding the SIM card to the device may include the following steps:
[0226] S501, the first CPU can detect the first power-on after leaving the factory, or the first power-on after the system upgrade card binding verification function.
[0227] The first CPU can detect the first power-on after the product leaves the factory, or the first power-on after the system upgrade and SIM card binding verification function is activated, and then trigger the subsequent SIM card binding process. The SIM card binding process can include the following three stages: mutual certificate verification, mutual exchange of temporary working public keys and device identifier binding.
[0228] The first electronic device can have its SIM card binding and verification functions pre-installed at the factory. This allows the first CPU and eSIM module to be bound together upon the first power-on after leaving the factory, preventing the eSIM module from being disassembled and used normally on other devices.
[0229] In one possible implementation, the first electronic device can acquire SIM card binding and verification functions during an OTA (Over-The-Air) system upgrade after leaving the factory. This way, the first CPU and eSIM module in the already released electronic device are bound together through a system upgrade, preventing the eSIM module from being disassembled and used normally in other devices.
[0230] Phase 1: Verification of certificates by both parties.
[0231] S502. The first CPU can send the TEE certificate to the eSIM module.
[0232] The TEE certificate can include device certificates and terminal certificates. The TEE certificate can be managed by the TEE. The TEE can also manage root authentication certificates.
[0233] In one possible implementation, the TEE certificate can be the terminal manufacturer's root certificate, which is signed by the terminal manufacturer's root public key in the terminal manufacturer's root certificate.
[0234] The S503.eSIM module can use the terminal manufacturer's root public key in the terminal manufacturer's root certificate to verify the legitimacy of the device certificate.
[0235] The eSIM module can pre-configure a terminal manufacturer's root certificate, an authentication root certificate (CERT.CI.ECDSA), an EUM certificate, an eUICC certificate, the EUM private key corresponding to the EUM certificate, and the eUICC private key corresponding to the eUICC certificate (SK.eUICC.ECDSA). The terminal manufacturer's root certificate includes the terminal manufacturer's root public key; the authentication root certificate (CERT.CI.ECDSA) includes the authentication root public key (PK.CI.ECDSA); the EUM certificate includes the EUM public key; and the eUICC certificate includes the eUICC public key (PK.eUICC.ECDSA). The authentication root private key corresponding to the authentication root certificate (CERT.CI.ECDSA) has been used to sign the EUM certificate. The EUM private key corresponding to the EUM certificate has been used to sign the eUICC certificate.
[0236] Specifically, the eSIM module can decrypt the device certificate digest information 1 from the certificate signature of the device certificate using the terminal manufacturer's root public key in the terminal manufacturer's root certificate. Then, the eSIM module can perform a hash operation on the certificate content in the device certificate to obtain digest information 2. If digest information 2 is the same as digest information 1, the eSIM module can determine that the device certificate is valid; if digest information 2 is different from digest information 1, the eSIM module can determine that the device certificate is invalid.
[0237] The S504.eSIM module can verify the legitimacy of the terminal certificate using the device public key in the device certificate after the device certificate has been verified.
[0238] Specifically, the eSIM module can decrypt the terminal certificate digest information 3 from the certificate signature of the terminal certificate using the device public key in the device certificate. Then, the eSIM module can perform a hash operation on the certificate content in the terminal certificate to obtain digest information 4. If digest information 3 and digest information 4 are the same, the eSIM module can determine that the terminal certificate is valid; if digest information 3 and digest information 4 are different, the eSIM module can determine that the terminal certificate is invalid.
[0239] The S505.eSIM module can send the EUM certificate and eUICC certificate to the first CPU after the TEE certificate has been verified as valid.
[0240] S506. After receiving the EUM certificate and eUICC certificate, the first CPU can use the authentication root public key in the authentication root certificate to verify the legitimacy of the EUM certificate.
[0241] The TEE running on the first CPU can manage the authentication root certificate (CERT.CI.ECDSA), device certificate, and terminal certificate (CERT.OEM.ECDSA). The authentication root certificate is the root certificate of the embedded UICC manufacture (EUM) certificate in the eSIM module, and the EUM certificate is the root certificate of the eUICC certificate. That is, the EUM certificate is signed with the authentication root private key corresponding to the authentication root certificate, and the eUICC certificate is signed with the EUM private key corresponding to the EUM certificate. The terminal certificate is signed with the device private key corresponding to the device certificate, and the device certificate is signed with the terminal manufacturer's root private key corresponding to the terminal manufacturer's root certificate.
[0242] Specifically, after receiving the EUM certificate and the eUICC certificate, the first CPU can first decrypt the EUM certificate digest information 5 from the certificate signature using the authentication root public key in the authentication root certificate. Then, the first CPU can perform a hash operation on the EUM certificate content to obtain digest information 6. If digest information 5 and digest information 6 are the same, the first CPU can determine that the EUM certificate is valid; if digest information 5 and digest information 6 are different, the first CPU can determine that the EUM certificate is invalid.
[0243] S507. After the first CPU verifies the validity of the EUM certificate, it can use the EUM public key in the EUM certificate to verify the validity of the eUICC certificate.
[0244] Specifically, the first CPU can first decrypt the eUICC certificate digest information 7 from the certificate signature of the eUICC certificate using the EUM public key in the EUM certificate. Then, the first CPU can perform a hash operation on the certificate content of the eUICC certificate to obtain digest information 8. If digest information 7 and digest information 8 are the same, the first CPU can determine that the eUICC certificate is valid; if digest information 7 and digest information 8 are different, the first CPU can determine that the eUICC certificate is invalid.
[0245] S508. After the first CPU passes the verification of the eUICC certificate's validity, it sends a verification completion notification to the eSIM module.
[0246] The verification completion notification indicates that the eUICC certificate verification has passed.
[0247] Phase Two: Both parties exchange temporary working public keys.
[0248] S509. After sending the verification completion notification to the eSIM module, the first CPU can generate a TEE temporary working public key and a TEE temporary working private key.
[0249] The TEE temporary working public key and the TEE temporary working private key are a pair of public and private keys.
[0250] S510. The first CPU can use the OEM private key to sign the TEE temporary working public key to obtain TEE signature data.
[0251] The OEM private key and OEM public key are a paired public-private key pair. The TEE signature data may include the TEE temporary working public key and the TEE signature value.
[0252] After receiving the verification completion notification, the S511.eSIM module can generate an eUICC temporary working public key and an eUICC temporary working private key.
[0253] The eUICC temporary working public key and eUICC temporary working private key are a pair of public and private keys.
[0254] The S512.eSIM module can use the eUICC private key to sign the eUICC temporary working public key to obtain eUICC signature data.
[0255] The eUICC signature data includes the eUICC temporary working public key and the eUICC signature value.
[0256] S513. The first CPU can send TEE signature data to the eSIM module.
[0257] The S514.eSIM module can send eUICC signature data to the first CPU.
[0258] S515. The first CPU can verify the legitimacy of the eUICC signature data through the eUICC public key in the eUICC certificate, and obtain the eUICC temporary working public key after the legitimacy of the eUICC signature data is verified.
[0259] The first CPU can decrypt the eUICC signature value in the eUICC signature data using the eUICC public key in the eUICC certificate to obtain digest information 9. Then, the first CPU can perform a hash operation on the eUICC temporary working public key in the eUICC signature data to obtain digest information 10. If digest information 10 is the same as digest information 9, the first CPU can determine that the legality verification of the eUICC signature data has passed, and the first CPU can save the eUICC temporary working public key in the eUICC signature data through the TEE.
[0260] The S516.eSIM module can verify the legitimacy of the TEE signature data using the OEM public key in the terminal certificate, and obtain the TEE temporary working public key after the legitimacy of the TEE signature data is verified.
[0261] Specifically, the eSIM module can decrypt the TEE signature value in the TEE signature data using the OEM public key in the terminal certificate to obtain digest information 11. Then, the eSIM module can sign the TEE temporary working public key in the TEE signature data to obtain digest information 12. If digest information 12 is the same as digest information 11, the eSIM module can determine that the TEE signature data has passed legal verification, and the eSIM module can save the TEE temporary working public key in the TEE signature data.
[0262] Phase 3: Device Identification Binding.
[0263] S517. The first CPU can generate a shared security key (ShS) based on the TEE temporary working private key and the eUICC temporary working public key.
[0264] The S518.eSIM module can generate a shared security key (ShS) based on the eUICC temporary working private key and the TEE temporary working public key.
[0265] Since the TEE ephemeral working public key and TEE ephemeral working private key are a public-private key pair, and the eUICC ephemeral working public key and eUICC ephemeral working private key are also a public-private key pair, both the eSIM module and the encryption / decryption TA can use the other party's ephemeral working public key and their own ephemeral working private key to generate the same shared security key (ShS).
[0266] S519. The first CPU can obtain the device identifier.
[0267] The device identifier may include the chip ID of the first CPU and / or the international mobile equipment identity (IMEI), etc.
[0268] S520. The first CPU can obtain binding information by encrypting the device identifier using a shared security key.
[0269] S521. The first CPU can send binding information to the eSIM module.
[0270] The S522.eSIM module can decrypt the device identifier from the binding information using a shared security key and store the device identifier.
[0271] Once the eSIM module stores the device identifier, the SIM card binding process is complete.
[0272] In some embodiments, step S501 is optional, and steps S502 to S522 may be performed on the production line before the electronic device leaves the factory.
[0273] In the embodiment shown in Figure 5 of this application, the steps executed by the first CPU can specifically be executed by the LPA in the first CPU or by the LPA triggering the encryption / decryption TA in the TEE through encryption / decryption CA. For example, in steps S501 and S502, after the LPA detects the first power-on after factory release or the first power-on after system upgrade and card binding function, it can obtain the TEE certificate from the TEE and send the TEE certificate to the eSIM module. Steps S506, S507, S509, S510, S515, S517, S519, and S520 are executed by the LPA triggering the encryption / decryption TA through encryption / decryption CA. Steps S509, S513, and S521 are executed by the LPA.
[0274] Figure 6 shows a schematic diagram of the device-card verification process in an eSIM authentication method provided in an embodiment of this application.
[0275] This eSIM authentication method can be applied to electronic devices that include a second CPU and an eSIM module. The second CPU can run an REE and a TEE. The REE can run a Cat Service and an encryption / decryption CA, while the TEE can run an encryption / decryption TA. For a detailed description of the REE and TEE, please refer to the embodiments shown in Figures 2-4 above, which will not be repeated here.
[0276] As shown in Figure 6, the card verification process can include the following steps:
[0277] When the S601 eSIM module detects a power-on reset, it can internally determine whether the eSIM module is bound to a device identifier through the security status.
[0278] In one possible implementation, the eSIM module can also determine whether it is bound to a device identifier when it receives a request to conduct communication services.
[0279] S602. If the eSIM module is bound to a device identifier (device identifier 1), generate a random number A.
[0280] The S603.eSIM module sends a device identifier acquisition request to the second CPU, wherein the device identifier acquisition request carries a random number A.
[0281] S604. The second CPU can obtain the device identifier of the electronic device (device identifier 2).
[0282] The device identifier of an electronic device may include chip ID and / or IMEI, etc.
[0283] S605. The second CPU can use the shared security key to encrypt the device identifier 2 and the random number A to obtain the verification information.
[0284] S606. The second CPU sends verification information to the eSIM module.
[0285] The S607.eSIM module can use a shared security key to decrypt the device identifier 2 and the random number B from the verification information.
[0286] The S608.eSIM module can determine whether device identifier 2 is the same as device identifier 1 and whether random number B is the same as random number A.
[0287] S609. If device identifier 2 is the same as device identifier 1 and random number B is the same as random number A, then the SIM card verification is successful and the eSIM module can perform mobile communication services normally.
[0288] S610. If device identifier 2 is different from device identifier 1 or random number B is different from random number A, the SIM card verification fails and the eSIM module is prohibited from conducting mobile communication services.
[0289] In this embodiment of the application, if the card verification is successful, it means that the second CPU and the first CPU in the embodiment shown in Figure 5 above are the same CPU, and the first electronic device and the second electronic device are the same.
[0290] If the SIM card verification fails, it means that the second CPU is not the same CPU as the first CPU in the embodiment shown in Figure 5 above. For the eSIM module, the second electronic device is not bound to the first electronic device.
[0291] In one possible implementation, if the eSIM module detects that the SIM card verification fails more than a specified number of times (e.g., 3 times), it will be permanently locked.
[0292] In the embodiment shown in Figure 6 of this application, the steps executed by the second CPU can specifically be executed by the Catservice in the second CPU or triggered by the Catservice through encryption / decryption CA to execute by the encryption / decryption TA in the TEE. For example, the recipient of the device identifier acquisition request in step S603 can be Catservice, step S604 can be executed by Catservice, step S605 can be executed by Catservice through encryption / decryption CA to trigger the encryption / decryption TA, and step S606 can be executed by Catservice.
[0293] In one possible implementation, if the eSIM module sends a device identifier acquisition request to the second CPU but does not receive verification information from the second CPU, the device and SIM card verification fails, and the eSIM module is prohibited from performing mobile communication services.
[0294] The eSIM authentication method provided in this embodiment allows the first CPU and eSIM module in a first electronic device to negotiate a shared key after system upgrades or initial factory power-on. The first CPU then encrypts the device identifier using the shared security key to generate binding information and sends this information to the eSIM module. The eSIM module can decrypt the first device identifier from the binding information using the shared security key and store it. Before the eSIM module powers on again or initiates mobile communication services, it can allow the second CPU communicating with it to obtain the second device identifier and encrypt it using the shared security key to generate verification information. The eSIM module can decrypt the second device identifier from the verification information using the shared key. If the second device identifier matches the first device identifier already stored in the eSIM module, the eSIM module can perform mobile communication services normally. If the second device identifier differs from the first device identifier already stored in the eSIM module, or if the eSIM module does not receive the device verification information sent by the second CPU after power-off and power-on, the eSIM module can prohibit mobile communication services. This prevents the eSIM module in the first electronic device from being disassembled and inserted into other devices to access the mobile communication network, thus improving the security of the eSIM module when accessing the mobile communication network.
[0295] The following section describes the process of binding the SIM card to the eSIM authentication method provided in this application embodiment, using signaling as a specific example.
[0296] Figure 7 illustrates a schematic diagram of the signaling interaction process for device-SIM card binding in an eSIM authentication method provided in an embodiment of this application.
[0297] This eSIM authentication method can be applied to a first electronic device comprising a first CPU, a first modem, and an eSIM module. The first CPU may run an REE and a TEE. The REE may run an LPA and an encryption / decryption CA, and the TEE may run an encryption / decryption TA. For a detailed description of the REE and TEE, please refer to the embodiments shown in Figures 2-4 above, which will not be repeated here.
[0298] As shown in Figure 7, the signaling interaction process for SIM card binding in this eSIM authentication method may include the following steps:
[0299] S701. The first CPU detected that the ROM upgrade was complete.
[0300] Among them, LPA can call the system upgrade management (OsUpdateManager) module to complete the patch upgrade of the eSIM module after the ROM upgrade is detected.
[0301] The S702.eSIM module has detected that the patch upgrade is complete.
[0302] After the ROM upgrade is complete, the TEE running on the first CPU can manage the TEE certificate and the authentication root certificate (CERT.CI.ECDSA). The authentication root certificate is the root certificate of the EUM certificate in the eSIM module, and the EUM certificate is the root certificate of the eUICC certificate. That is, the EUM certificate is signed with the private key corresponding to the authentication root certificate, and the eUICC certificate is signed with the private key corresponding to the EUM certificate.
[0303] In one possible implementation, the TEE certificate can include a device certificate and a terminal certificate (CERT.OEM.ECDSA). The terminal certificate is signed with the device's private key corresponding to the device certificate; the device certificate is signed with the terminal manufacturer's root private key corresponding to the terminal manufacturer's root certificate; and the terminal manufacturer's root certificate is self-signed with its own root private key. In this case, the eSIM module can store the terminal manufacturer's root certificate after the patch upgrade is complete. The eSIM module can use this terminal manufacturer's root certificate to verify the TEE certificate.
[0304] In one possible implementation, the TEE certificate may include the terminal manufacturer's root certificate. The terminal manufacturer's root certificate is self-signed by the terminal manufacturer's root private key corresponding to the root certificate. In this case, the eSIM module can store the terminal manufacturer's root certificate after the patch upgrade is complete. Since the TEE-managed TEE certificate only contains the terminal manufacturer's root certificate, the LPA does not need to send the terminal manufacturer's root certificate to the eSIM module for verification; the eSIM module can directly self-verify the stored terminal manufacturer's root certificate.
[0305] The following embodiments of this application illustrate the case where the device certificate includes the terminal manufacturer's root certificate, and the LPA does not need to send the terminal manufacturer's root certificate to the eSIM module for verification.
[0306] After the eSIM module patch upgrade is completed, it can store the terminal manufacturer's root certificate, the authentication root certificate (CERT.CI.ECDSA), the EUM certificate, the eUICC certificate, the EUM private key corresponding to the EUM certificate, and the eUICC private key corresponding to the eUICC certificate (SK.eUICC.ECDSA). The terminal manufacturer's root certificate includes the terminal manufacturer's root public key; the authentication root certificate (CERT.CI.ECDSA) includes the authentication root public key (PK.CI.ECDSA); the EUM certificate includes the EUM public key; and the eUICC certificate includes the eUICC public key (PK.eUICC.ECDSA). The authentication root private key corresponding to the authentication root certificate (CERT.CI.ECDSA) has been used to sign the EUM certificate. The EUM private key corresponding to the EUM certificate has also been used to sign the EUM certificate.
[0307] In one possible implementation, steps S701 and S702 are optional, and the first CPU can complete subsequent steps S703 to S735 when the first electronic device is powered on for the first time after leaving the factory.
[0308] The S703 eSIM module can send refresh commands to the first modem.
[0309] The refresh command can be an active command.
[0310] S704. First Modem Power On eSIM Module.
[0311] The first modem can power on the eSIM module upon receiving a notification from the eSIM module.
[0312] S705. After the first modem powers on the eSIM module, it sends a reset command to the eSIM module.
[0313] After the eSIM module completes the patch upgrade, the value of the bound device identifier bit can be set to its initial value. For example, the value of the bound device identifier bit can be set to "0x00".
[0314] The device binding identifier bit is used to indicate the device binding status of the eSIM module. When the device binding identifier bit is set to its initial value, it indicates that the eSIM module is in an unbound state.
[0315] The S706 eSIM module can detect when the eSIM module has not completed the SIM card binding process.
[0316] After a reset, the eSIM module can detect that the eSIM module has not completed the SIM card binding by using the device identification bit.
[0317] The S707 eSIM module can send a reset response (ATR) to the first modem.
[0318] The ATR indicates that the eSIM module reset is complete.
[0319] S708. The first CPU can open a logical channel with the eSIM module.
[0320] After receiving the ATR, the first modem can complete the necessary SIM card interaction process with the eSIM module.
[0321] The first modem can trigger the LPA to call the SIM card binding logic, opening the logical channel between the LPA and the eSIM module.
[0322] S709. The first CPU can send the GetEID command to the eSIM module.
[0323] The LPA can determine whether it has already obtained the eSIM module's electronic identity (EID). If it has not obtained the eSIM module's EID, the LPA can send a GetEID command to the eSIM module to retrieve its EID. If it has already obtained the eSIM module's EID, the LPA does not need to send a GetEID command to the eSIM module.
[0324] Upon receiving an electronic identity acquisition command, the S710 eSIM module can return a response command 1 to the first CPU. This response command 1 carries the EID.
[0325] For example, Response Command 1 can be “BF3312 5A10 12345634202200001234512345112233”. The EID is “12345634202200001234512345112233”.
[0326] The S711 first CPU can send the eUICC random number retrieval (GeteUICCChallenge) command to the eSIM module.
[0327] The LPA can send an eUICC random number retrieval command to the eSIM module to obtain an eUICC random number (eUICCChallenge).
[0328] After receiving the eUICC random number retrieval command, the S712 eSIM module can return a response command 2 to the first CPU. This response command 2 can carry an eUICC random number (eUICCChallenge).
[0329] For example, Response command 2 could be “BF2312 8010 76543212BE97D30B2D1FBECA7B7A9668”. Here, the eUICC random number could be “76543212BE97D30B2D1FBECA7B7A9668”.
[0330] S713. The first CPU can generate a TEE temporary working public key (otPK.TEE.ECKA), a TEE temporary working private key (otSK.TEE.ECKA), a device random number (deviceChallenge), and a host identifier (HostID).
[0331] The LPA can call the encryption / decryption CA, which in turn calls the encryption / decryption TA to generate a temporary TEE temporary working public key, a temporary TEE temporary working private key, and a device random number (deviceChallenge). The temporary TEE working public key and the temporary TEE working private key must meet the public / private key standard "ECC-256".
[0332] The Host ID can be used to identify the initiator of the session currently established on the logical channel between the LPA and the eSIM module.
[0333] S714. The first CPU can generate TEE packet data. The TEE packet data includes the TEE temporary working public key, device random number, eUICC random number, and host identifier.
[0334] Among them, LPA can call CA to call TA to generate the TEE packet data.
[0335] S715. The first CPU can use the TEE private key (SK.TEE.ECKA) to sign the TEE packet data and obtain the TEE signature value (serverSignature).
[0336] LPA can call the encryption / decryption CA, which in turn calls the encryption / decryption TA to sign the TEE packet data using the TEE private key (SK.TEE.ECDSA) to obtain the TEE signature value (serverSignature).
[0337] For example, the TEE packet data, from front to back, can be eUICC random number, device random number, host identifier, and TEE temporary working public key.
[0338] Specifically, the encryption / decryption TA can first perform a hash operation on the TEE packet data to obtain the digest information of the TEE packet data. Then, the encryption / decryption TA can use the TEE private key (SK.TEE.ECDSA) and a specified signature algorithm (e.g., ECDSA signature algorithm) to encrypt the digest information of the TEE packet data into a TEE signature value (serverSignature).
[0339] In one possible implementation, the TEE private key (SK.TEE.ECDSA) can be the OEM private key (SK.OEM.ECDSA) corresponding to the terminal certificate (CERT.OEM.ECDSA) in the aforementioned embodiment, and the TEE public key (PK.TEE.ECDSA) paired with the TEE private key (SK.TEE.ECDSA) can be the OEM public key (PK.OEM.ECDSA) in the terminal certificate (CERT.OEM.ECDSA) in the aforementioned embodiment.
[0340] In one possible implementation, the TEE private key (SK.TEE.ECDSA) can be the terminal manufacturer's root private key (SK.OEMCI.ECDSA) corresponding to the terminal manufacturer's root certificate in the aforementioned embodiments. The TEE public key (PK.TEE.ECDSA) paired with the TEE private key (SK.TEE.ECDSA) can be the terminal manufacturer's root public key (PK.OEMCI.ECDSA) in the terminal manufacturer's root certificate in the aforementioned embodiments.
[0341] S716. The first CPU can send a Stored Data (Storedata) command 1 to the eSIM module. The Stored Data command 1 carries TEE signature data, which may include TEE packet data and the TEE signature value.
[0342] For example, the data storage command 1 can be:
[0343] After receiving the Store Data Command 1, the S717.eSIM module can verify the TEE signature value and eUICC random number in the TEE signature data using the TEE public key (PK.TEE.ECDSA) in the stored TEE certificate.
[0344] The eSIM module first decrypts the digest information A from the TEE signature value using the TEE public key. Then, the eSIM module performs a hash operation on the TEE packet data to generate digest information B. The eSIM module then determines whether digest information A and digest information B are the same. If they are the same, the TEE signature value verification passes. If they are different, the TEE signature value verification fails.
[0345] After the TEE signature verification is successful, the eSIM module can determine whether the eUICC random number in the TEE packet data is the same as the eUICC random number previously generated by the eSIM module. If the eUICC random number in the TEE packet data is the same as the eUICC random number previously generated by the eSIM module, the eUICC random number verification is successful. If the eUICC random number in the TEE packet data is different from the eUICC random number previously generated by the eSIM module, the eUICC random number verification is unsuccessful.
[0346] When the TEE signature value verification fails and / or the eUICC random number verification fails, the eSIM module terminates the subsequent steps.
[0347] After the TEE signature value and eUICC random number are verified, the S718.eSIM module can generate an eUICC temporary working public key (ot.PK.EUICC.ECKA) and an eUICC temporary working private key (ot.SK.EUICC.ECKA).
[0348] The S719.eSIM module can generate eUICC packet data. This eUICC packet data can include the eUICC temporary working public key and a device random number (deviceChallenge).
[0349] The S720 eSIM module can use the eUICC private key (SK.eUICC.ECDSA) to sign the eUICC packet data and obtain the eUICC signature value.
[0350] For example, the eUICC packet data, from front to back, can be a device random number and an eUICC temporary working public key.
[0351] The eSIM module can first perform a hash operation on the eUICC packet data to obtain the digest information of the eUICC packet data. Then, the eSIM module can use the eUICC private key (SK.eUICC.ECDSA) and a specified signature algorithm (e.g., the ECDSA signature algorithm) to encrypt the digest information of the eUICC packet data into an eUICC signature value (eUICCSignature).
[0352] The S721.eSIM module can send Response Command 3 to the first CPU. Response Command 3 carries eUICC signature data, EUM certificate (CERT.EUM.ECDSA), and eUICC certificate (CERT.eUICC.ECDSA).
[0353] The eUICC signature data may include eUICC package data and eUICC signature value.
[0354] For example, response command 3 could be:
[0355] Since response command 3 carries a large amount of content, exceeding a certain limit (e.g., 255 bytes), the first modem can continuously send Get Response commands based on the status word (SW) returned by the eSIM module to obtain the entirety of response command 3. The first modem can then send the entire content of response command 3 to the LPA.
[0356] S722. After receiving response command 3, the first CPU can verify the legitimacy of the EUM certificate and the eUICC certificate using the authentication root public key (PK.CI.ECDSA) in the stored authentication root certificate.
[0357] Specifically, the LPA can invoke the encryption / decryption CA, which in turn invokes the encryption / decryption TA to verify the EUM and eUICC certificates using the root public key (PK.CI.ECDSA) stored in the root certificate. The encryption / decryption TA first decrypts the EUM certificate's digest information (5) from the certificate signature using the root public key in the root certificate. Then, the encryption / decryption TA performs a hash operation on the EUM certificate's content to obtain digest information (6). If digest information (5) and digest information (6) are the same, the encryption / decryption TA determines that the EUM certificate is valid; otherwise, it determines that the EUM certificate is invalid.
[0358] After successfully verifying the validity of the EUM certificate, the encryption / decryption TA can use the EUM public key in the EUM certificate to decrypt the eUICC certificate's digest information 7 from the certificate signature. Then, the encryption / decryption TA can perform a hash operation on the eUICC certificate's content to obtain digest information 8. If digest information 7 and digest information 8 are the same, the encryption / decryption TA can determine that the eUICC certificate is valid; if digest information 7 and digest information 8 are different, the encryption / decryption TA can determine that the eUICC certificate is invalid.
[0359] After the S723 first CPU verifies the legitimacy of the EUM certificate and the eUICC certificate, it can verify the device random number and the eUICC signature value using the eUICC public key in the eUICC certificate.
[0360] The encryption / decryption TA uses the eUICC public key (PK.EUICC.ECDSA) to decrypt the digest information C from the eUICC signature value. Then, the encryption / decryption TA performs a hash operation on the eUICC packet data to generate digest information D. The encryption / decryption TA then checks if digest information C and digest information D are the same. If they are the same, the eUICC signature value verification is successful. If they are different, the eUICC signature value verification fails.
[0361] After the eUICC signature verification is successful, the encryption / decryption TA can determine whether the device random number in the eUICC packet data is the same as the device random number generated before the encryption / decryption TA. If the device random number in the eUICC packet data is the same as the device random number generated before the encryption / decryption TA, the device random number verification is successful. If the device random number in the eUICC packet data is different from the device random number generated before the encryption / decryption TA, the device random number verification is unsuccessful.
[0362] When the eUICC signature value verification fails and / or the device random number verification fails, the encryption / decryption TA terminates the subsequent steps.
[0363] S724. After the device random number and eUICC signature value are verified, the first CPU generates a shared security key (ShS) based on the eUICC temporary working public key and the TEE temporary working private key.
[0364] Among them, LPA can call TA for encryption and decryption. TA for encryption and decryption can generate ShS based on the eUICC temporary working public key and TEE temporary working private key through the "TEE DeriveKey" interface.
[0365] S725. The first CPU can obtain a device identifier. The device identifier may include the first CPU's chip identifier (ChipID) and / or device identification code (IMEI), etc.
[0366] For example, LPA can call the file stream "read" interface to read the storage path " / sys / devices / soc0 / serialnumber" and obtain the chip ID of the first CPU.
[0367] S726. The first CPU can use ShS, host identifier, and EID to encrypt the device identifier and eUICC random number into binding information and generate a command message authentication code (C-MAC).
[0368] S727. The first CPU can send a stored data command 2 to the eSIM module. This stored data command 2 may carry binding information and a C-MAC address.
[0369] The encryption / decryption TA can be derived from ShS, host identifier, and EID according to the "BSI TR-03111X9.63 Key Derivation Function" standard rules to produce the Initial MAC chaining value, session encryption key (S-ENC), and session message authentication code (S-MAC).
[0370] As shown in Figure 8A, the encryption process of plaintext data in the Storedata command can be as follows:
[0371] 1. The encryption / decryption TA can generate plaintext command data based on the device identifier and eUICC random number.
[0372] For example, the plaintext data of the command can be:
[0373] “6F8002 XX
[0374] [Device Identifier in TLV Format]
[0375] [eUICC random numbers in TLV format].
[0376] 2. The encryption / decryption TA can add padding data after the plaintext command data, ensuring that the total length of the plaintext command data and padding data is an integer number of bytes. The padding data can begin with "80".
[0377] 3. The encryption / decryption TA can be based on the counter value 1 and S-ENC, and the integrity check value (ICV) 1 can be determined using the AES-CBC encryption algorithm. The length of the counter value 1 can be 16 bytes.
[0378] 4. The encryption / decryption TA can determine the ciphered command data (CCDF) based on the plaintext command data after adding padding data, the integrity check value 1, and S-ENC, using the AEC-CBC encryption algorithm. This ciphered command data is also the binding information mentioned above.
[0379] 5. To encrypt or decrypt TA, you can add a data length (Lcc) field before the command ciphertext data, add a flag bit (Tag) before the data length field, and add an Initial MAC chaining value before the flag bit to obtain the C-MAC data to be generated.
[0380] 6. The encryption / decryption TA can be based on the C-MAC to be generated data and the S-MAC. The C-MAC signature data is determined by the C-MAC calculation algorithm, and the highest 8 bytes and the lowest 8 bytes of the C-MAC signature data are used as the New MAC chaining value. The C-MAC calculation algorithm can be the "NIST SP 800-38B" standard algorithm.
[0381] 7. The encryption / decryption TA can extract the highest 8 bytes of data from the C-MAC signature data as the C-MAC.
[0382] 8. The encryption / decryption TA can return the C-MAC and command ciphertext data (CCDF) to the LPA through encryption / decryption CA.
[0383] 9. After receiving the C-MAC and command ciphertext data (CCDF), the LPA can assemble the aforementioned Storedata command 2. Storedata command 2 may include a flag bit, a data length field, and a data field. The flag bit value can be "86," indicating that the data structure following the flag bit in Storedata command 2 conforms to the GSMA specification's TLV data lattice structure. The data length field indicates the length of the data field. The data field of Storedata command 2 may include command ciphertext data (CCDF) and the C-MAC. The command ciphertext data (CCDF) of Storedata command 2 is the aforementioned binding information.
[0384] After sending response command 3 to the first CPU, the S728.eSIM module can generate ShS based on the TEE temporary working public key and the eUICC temporary working private key.
[0385] After obtaining Storedata command 2, the S729.eSIM module can verify the C-MAC through ShS, host identifier and EID, decrypt the binding information, obtain the device identifier and eUICC random number, and verify the decrypted eUICC random number.
[0386] The eSIM module can derive the Initial MAC chaining value, S-ENC, and S-MAC based on ShS, host identifier, and EID, according to the "BSI TR-03111X9.63 Key Derivation Function" standard rules.
[0387] Then, the eSIM module adds the flag bits, data length field, and command ciphertext from Storedata command 2 after the Initial MAC chaining value to form MAC verification information. Based on the MAC verification information and S-MAC, and using the C-MAC calculation algorithm, the eSIM module re-determines the C-MAC. The eSIM module can determine whether the re-determined C-MAC is the same as the C-MAC carried in Storedata command 2. If they are the same, the C-MAC verification passes. The eSIM module can decrypt the device identifier and eUICC random number from the command ciphertext data (i.e., binding information) of Storedata command 2 based on S-ENC and S-MAC.
[0388] The eSIM module can determine whether the eUICC random number decrypted from Storedata command 2 is the same as the eUICC random number previously generated by the eSIM module. If they are the same, the eUICC random number verification is successful; otherwise, the eUICC random number verification is successful.
[0389] After the S730 eSIM module verifies the eUICC random number decrypted from the binding information, it encrypts the device random number into eUICC encrypted data using the shared security key, host identifier, and EID, and generates a response message authentication code (R-MAC).
[0390] The S731 eSIM module can send Response Command 4 to the first CPU. Response Command 4 carries eUICC encrypted data and R-MAC.
[0391] As shown in Figure 8B, the encryption process of the plaintext data in the response of Response command 4 can be as follows:
[0392] 1. The eSIM module can assemble the plaintext response data of Response command 4 based on the device's random number.
[0393] For example, the plaintext response data could be:
[0394] “6F8002 XX
[0395] [Device random number in TLV format]
[0396] "
[0397] 2. The eSIM module can add padding data after the plaintext data in response, ensuring that the total length of the plaintext data and padding data is an integer number of bytes. The padding data can begin with "80".
[0398] 3. The eSIM module can determine the Integrity Verification Value (ICV)2 based on the counter value 2 and S-ENC using the AES-CBC encryption algorithm. The counter value 2 can be 16 bytes long.
[0399] 4. The eSIM module can determine the ciphered response data field (CRDF) based on the plaintext response data after adding padding data, the integrity check value 2, and S-ENC, using the AEC-CBC encryption algorithm. This ciphered response data is the same as the eUICC encrypted data mentioned above.
[0400] 5. The eSIM module can add a data length (Lcc) field before the ciphertext data in the response, add a flag bit (Tag) before the data length field, and add a New MAC chaining value before the flag bit to obtain the R-MAC data to be generated.
[0401] 6. The eSIM module can determine the R-MAC signature data based on the R-MAC to be generated data and the S-MAC using the R-MAC calculation algorithm, and use the highest 8 bytes of the R-MAC signature data as the R-MAC. The R-MAC calculation algorithm can be the "NIST SP 800-38B" standard algorithm.
[0402] 7. The eSIM module can assemble Response Command 4. Response Command 4 can include flags, a data length field, and a data field. The data field in Response Command 4 can include Response Ciphertext Data (CRDF) and R-MAC. The data length field indicates the length of the data field. The Response Ciphertext Data (CRDF) in Response Command 4 is the eUICC encrypted data described above.
[0403] S732. The first CPU verifies the R-MAC using ShS, host identifier, and EID, and decrypts the device random number from the eUICC encrypted data, and then verifies the decrypted device random number.
[0404] LPA can call the encryption / decryption TA to verify R-MAC, and decrypt the device random number from the eUICC encrypted data, and then verify the decrypted device random number.
[0405] The process of encrypting / decrypting the TA to verify the R-MAC can be referred to the process of verifying the C-MAC in the eSIM module mentioned above, and will not be repeated here.
[0406] S733. After the first CPU verifies the decrypted device random number, it sends a Storedata command 3 to the eSIM module. This Storedata command 3 indicates the end of the SIM card binding interaction.
[0407] The Storedata command 3 includes a flag bit, a data length field, and a data field. The data field in Storedata command 3 includes the end indication ciphertext (encrypted from the plaintext end indication, e.g., "0F6001 03 03") and the C-MAC.
[0408] The encryption process for the end indication ciphertext and the C-MAC generation process in Storedata command 3 can be referenced to the encryption process for the command ciphertext data and the C-MAC generation process in the embodiment shown in Figure 8A above. The count value used in the encryption process of the end indication ciphertext is increased by 1 from the count value 1 shown in Figure 8A above.
[0409] Upon receiving the Storedata command 3, the S734.eSIM module sets the device binding status to "bound" and stores the device identifier.
[0410] When the eSIM module receives Storedata command 3, it can verify the C-MAC in Storedata command 3. After verifying the C-MAC in Storedata command 3, it decrypts the end indication ciphertext in Storedata command 3 to obtain the end indication plaintext (e.g., "0F600103 03").
[0411] The eSIM module can set the value of the bound device identifier bit to the first value (e.g., "0x12") after receiving the end instruction plaintext. When the value of the bound device identifier bit is the first value, it indicates that the eSIM module is in a bound state.
[0412] To improve compatibility, the eSIM module can assume successful SIM card verification upon completion of the binding process. The eSIM module can also reset the binding information verification flag to a second value (e.g., "0x44"). A second value for the binding information verification flag indicates that the eSIM module's binding information verification is complete.
[0413] The S735.eSIM module returns a binding completion status code to the first CPU. This binding completion status code indicates that the SIM card binding has been completed.
[0414] The eSIM module can return a binding completion status code to the LPA via status words SW1 and SW2. For example, the values of SW1 and SW2 can be 9000.
[0415] In some embodiments, steps S701 and S702 are optional, and steps S703 to S735 may be performed on the production line before the electronic device leaves the factory.
[0416] The following section describes the SIM card verification process in the eSIM authentication method provided in this application embodiment, using signaling as a specific example.
[0417] Figure 9 illustrates a schematic diagram of the signaling interaction process for SIM card authentication in an eSIM authentication method provided in an embodiment of this application.
[0418] This eSIM authentication method can be applied to a second electronic device that includes a second CPU, a second modem, and an eSIM module. The second CPU can run an REE and a TEE. The REE can run Catservice and encryption / decryption CA, and the TEE can run encryption / decryption TA. For a detailed description of the REE and TEE, please refer to the embodiments shown in Figures 2-4 above, which will not be repeated here.
[0419] As shown in Figure 9, the signaling interaction process for device-card verification in this eSIM authentication method may include the following steps:
[0420] The S901 eSIM module sends a refresh command to the second modem.
[0421] The refresh command can be an active command.
[0422] S902. Second Modem Power On eSIM Module.
[0423] The second modem can repower the eSIM module upon receiving a notification from it.
[0424] S903. After the second modem powers on the eSIM module, it sends a reset command to the eSIM module.
[0425] The S904 eSIM module can detect that the eSIM module has completed the SIM card binding.
[0426] After receiving a reset command, the eSIM module can complete the reset operation and detect that the SIM card binding has been completed by binding the device marker.
[0427] The S905 eSIM module can send ATR to the second modem.
[0428] The ATR indicates that the eSIM module reset is complete.
[0429] S906. The second modem can send terminal profile commands to the eSIM module.
[0430] The S907 eSIM module can send setup menu commands to the second modem.
[0431] S908. The second modem can send Terminal response command 1 to the eSIM module.
[0432] The S909.eSIM module sends status code 1 (e.g., "91xx") to the second modem.
[0433] Status code 1 can be used to request Momdem to send a Fetch command to the eSIM module, thereby obtaining the Get Input command from the eSIM module.
[0434] S910. The second modem can send a fetch command to the eSIM module.
[0435] The S911.eSIM module can generate a random number A and generate Message Authentication Code 1 (MAC1) for the random number A.
[0436] The eSIM module can perform MAC calculation on the random number A based on the S-MAC and C-MAC calculation algorithms derived from ShS (e.g., the NIST SP 800-38B standard algorithm), and use the highest 8 bytes of data in the calculation result as MAC1.
[0437] The S912 eSIM module can send a Get Input command to the second modem. The Get Input command can carry a random number A and MAC1.
[0438] As shown in Figure 10, the Get Input command can include a proactive SIM command tag, a data length field, and a data field. The proactive SIM command tag indicates the type of the Get Input command; for example, the proactive SIM command tag in the Get Input command can be "D0". The data length field indicates the length of the data field. The data field can include a command details field, a device identifier field, a text string field, a response length field, and a default text field.
[0439] The textstring field can include a textstring marker, a textstring length field, a textstring encoding scheme field, and a textstring data field. The textstring marker marks the beginning of the textstring field. The textstring length field indicates the total length of the textstring encoding scheme field and the textstring data field. The textstring encoding scheme field indicates the encoding scheme used in the textstring data field.
[0440] The default text field can include a default text marker, a default text length field, a data encoding scheme field, and a default text data field. The default text marker can be used to mark the beginning of the default text field. The default text length field can be used to indicate the total length of the data in the default text encoding scheme field and the default text data field. The default text encoding scheme field can be used to indicate the encoding scheme of the default text data field.
[0441] Random numbers A and MAC1 can be carried in the default text data field of the default text field of the Get Input command. The text string data field of the text string field can include a specified string (e.g., the ASCII code of "Verify"). The ASCII code of the string "Verify" can be "566572696679".
[0442] For example, the values of each field in the Get Input command can be as follows:
[0443] The command flag for an active command SIM card can be "D0";
[0444] The value of the data length field can be "XX";
[0445] The value of the command details field can be "8103012311";
[0446] The value of the device identifier field can be "82028122";
[0447] The value of the text string field can be "0D0E01 566572696679";
[0448] The response length field can have a value of "6102FFFF";
[0449] The default value for the text field can be "970901 [random number A] [MAC1]".
[0450] In one possible implementation, the random number A and MAC1 can also be carried in the text string data field of the text string field of the Get Input command, without limitation.
[0451] S913. The second modem sends the Get Input command to the second CPU. The Get Input command carries a random number A and MAC1.
[0452] After receiving a Get Input command, the Catservice running on the second CPU parses the data structure of the Get Input command using the command parameter proxy class (CommandParamsFactory). Once the command parameter proxy class parses the specified string (e.g., the ASCII code of "VerifyBinding") from the text string data field of the text string field in the Get Input command, the Catservice can parse the default text field in the Get Input command.
[0453] S914. The second CPU verifies MAC1 and obtains device identifier 2 after MAC1 is verified.
[0454] Catservice can call the encryption / decryption CA, and then use the encryption / decryption TA to complete the verification of MAC1. The verification of MAC1 can refer to the verification process for C-MAC or R-MAC in the embodiment shown in Figure 7 above, and will not be repeated here.
[0455] After MAC1 is verified, Catservice can obtain a random number A from the default text field and provide the random number A to the encryption / decryption TA.
[0456] S915. The second CPU uses ShS to encrypt the device identifier 2 and the random number A into verification information and generate MAC2.
[0457] The Catservice can call the encryption / decryption TA to derive S-ENC, S-MAC, and initial MAC chaining value from ShS, encrypting device identifier 2 and random number A into verification information and generating MAC2. The process of encrypting device identifier 2 and random number A and generating MAC2 can be referred to the encryption and C-MAC generation process shown in the embodiment of Figure 8A above, and will not be repeated here.
[0458] S916. The second CPU sends a Terminal response command 2 to the second Modem. The Terminal response command 2 carries verification information and MAC address 2.
[0459] S917. The second modem sends Terminalresponse command 2 to the eSIM module.
[0460] After receiving Terminalresponse command 2, the S918.eSIM module verifies MAC2. After successful MAC2 verification, it decrypts the device identifier 2 and random number B from the verification information using ShS.
[0461] The process of eSIM module verifying MAC2 can be referred to in step S729 of the embodiment shown in Figure 7 above, which is the process of eSIM module verifying C-MAC, and will not be repeated here.
[0462] The S919 eSIM module determines whether device identifier 2 is the same as device identifier 1 already bound to the eSIM module and whether random number B is the same as random number A.
[0463] S920. If device identifier 2 is the same as device identifier 1 already bound to the eSIM module and random number B is the same as random number A, then the device-SIM card verification is successful and the eSIM module can perform mobile communication services normally.
[0464] If the SIM card verification passes, the eSIM module can set the value of the binding information verification flag to a second value (e.g., "0x44"). When the binding information verification flag is set to the second value (e.g., "0x44"), it indicates that the eSIM module has successfully completed the SIM card verification.
[0465] If the SIM card verification passes, the eSIM module can set the binding information verification flag to a third value (e.g., "0x66"). When the binding information verification flag is set to a third value (e.g., "0x66"), it indicates that the eSIM module's SIM card verification has failed.
[0466] S921. If device identifier 2 is different from device identifier 1 already bound to the eSIM module, or random number B is different from random number A, then the device-SIM card verification fails, and the eSIM module is prohibited from conducting mobile communication services.
[0467] For example, when the eSIM module triggers the network authentication process, it can determine whether the aforementioned binding information verification flag indicates that the SIM card verification has been completed and passed. If the binding information verification flag indicates that the SIM card verification has been completed and passed (for example, the value of the binding information verification flag is "0x44"), then the eSIM module completes the network authentication process. If the binding information verification flag indicates that the SIM card verification has failed, the eSIM module returns a verification failure response to the second modem. This verification failure response indicates that the eSIM module is not an eSIM bound to the second CPU.
[0468] In this embodiment of the application, if the card verification is successful, it means that the second CPU and the first CPU in the embodiment shown in Figure 7 above are the same CPU, and the first electronic device and the second electronic device are the same.
[0469] If the SIM card verification fails, it means that the second CPU is not the same CPU as the first CPU in the embodiment shown in Figure 7 above. For the eSIM module, the second electronic device is not bound to the first electronic device.
[0470] In one possible implementation, if the eSIM module sends a device identifier acquisition request to the second CPU but does not receive verification information from the second CPU, the device and SIM card verification fails, and the eSIM module is prohibited from performing mobile communication services.
[0471] In one possible implementation, if the eSIM module detects that the SIM card verification fails more than a specified number of times (e.g., 3 times), it will be permanently locked.
[0472] The eSIM authentication method provided in this embodiment allows the first CPU and eSIM module in a first electronic device to negotiate a shared key after system upgrades or initial factory power-on. The first CPU then encrypts the device identifier using the shared security key to generate binding information and sends this information to the eSIM module. The eSIM module can decrypt the first device identifier from the binding information using the shared security key and store it. Before the eSIM module powers on again or initiates mobile communication services, it can allow the second CPU communicating with it to obtain the second device identifier and encrypt it using the shared security key to generate verification information. The eSIM module can decrypt the second device identifier from the verification information using the shared key. If the second device identifier matches the first device identifier already stored in the eSIM module, the eSIM module can perform mobile communication services normally. If the second device identifier differs from the first device identifier already stored in the eSIM module, or if the eSIM module does not receive the device verification information sent by the second CPU after power-off and power-on, the eSIM module can prohibit mobile communication services. This prevents the eSIM module in the first electronic device from being disassembled and inserted into other devices to access the mobile communication network, thus improving the security of the eSIM module when accessing the mobile communication network.
[0473] The following describes the structure of the execution environment of another electronic device provided in the embodiments of this application.
[0474] Figure 11 is a schematic diagram of the execution environment of another electronic device provided in an embodiment of this application.
[0475] As shown in Figure 11, the electronic device 100 may include a processing module, a modem, and an eSIM module. The processing module can run two application environments: a Free Execution Environment (REE) and a Trusted Execution Environment (TEE). The processing module can be a CPU or other modules with processing capabilities; no limitation is made here.
[0476] The applications running on the REE can be referred to as client applications. Client applications in the REE may include encryption / decryption client applications (CA). The REE may also run a local profile assistant (LPA), a SIM card verification module, and a telephone management module (Telephony Manager). The SIM card verification module may include a card application tool service (Catservice) and a verification module. For example, the verification module may be a radio interface layer (RiL). For ease of description, this application uses the verification module RiL as an example to illustrate the embodiments of this application.
[0477] Applications running within a TEE can be called Trusted Applications (TEE applications, TAs). A TEE's Trusted Applications can include encryption and decryption TAs. The TEE can also manage digital certificates issued by Certificate Authorities (CAs). For example, digital certificates in a TEE can include root certificates (CERT.CI.ECDSA), device certificates (CERT.DEVICE.ECDSA), and terminal certificates (CERT.OEM.ECDSA), and so on.
[0478] The LPA can invoke the SIM card binding logic and send SIM card binding commands to the eSIM module. The LPA can interact with the eSIM module for SIM card binding via Telephony Manager and Modem. The LPA can communicate with the encryption / decryption TA in the TEE by invoking the encryption / decryption CA, thereby enabling the encryption / decryption TA to provide services such as encryption / decryption, certificate verification, and key negotiation during the SIM card binding interaction.
[0479] The eSIM module can invoke the SIM card binding logic and send a SIM card verification command to the SIM card verification module via the Modem, thereby triggering SIM card verification interaction between the eSIM module and the SIM card verification module. The SIM card verification module can communicate with the encryption / decryption TA in the TEE by calling the encryption / decryption CA, thereby invoking the encryption / decryption TA to provide encryption and decryption services during the SIM card verification interaction.
[0480] Specifically, the eSIM module can invoke the SIM card binding logic and interact with the Cat Service via the Modem to verify the device's legitimacy, thereby triggering the eSIM module to verify the device's legitimacy (which can also be understood as verifying the legitimacy of the processing module). The Cat Service can communicate with the encryption / decryption TA in the TEE by calling the encryption / decryption CA, thereby invoking the encryption / decryption TA to provide encryption and decryption services during the device legitimacy verification process.
[0481] The verification module can invoke the SIM card binding logic and interact with the eSIM module via the modem to verify the eSIM module's legitimacy, thereby triggering the verification module to verify the eSIM module's legitimacy. It's possible that the verification module can also trigger the eSIM module to verify the device's legitimacy (which can also be understood as verifying the legitimacy of the processing module). Specifically, the verification module can communicate with the encryption / decryption TA in the TEE by invoking the encryption / decryption CA, thereby invoking the encryption / decryption TA to provide encryption and decryption services during the eSIM module legitimacy verification process.
[0482] For a description of the functions of other modules, please refer to the embodiment shown in Figure 2 above, which will not be repeated here.
[0483] Figure 12 shows a schematic diagram of the certificate chain in the TEE and eSIM modules of an electronic device provided in an embodiment of this application.
[0484] As shown in Figure 12, the TEE can manage the authentication root certificate (CERT.CI.ECDSA) and the terminal certificate (CERT.OEM.ECDSA). The authentication root certificate is the root certificate of the embedded UICC manufacture (EUM) certificate in the eSIM module, and the EUM certificate is the root certificate of the eUICC certificate. That is, the EUM certificate is signed with the private key corresponding to the authentication root certificate, and the eUICC certificate is signed with the private key corresponding to the EUM certificate.
[0485] In one possible implementation, the authentication root certificate (CERT.CI.ECDSA) can be a root certificate issued by the operator, a root certificate issued by a third-party organization, a root certificate issued by the terminal manufacturer, a root certificate issued by the EUM manufacturer, and so on.
[0486] The terminal certificate (CERT.OEM.ECDSA) can be self-signed by the OEM private key corresponding to the terminal certificate (CERT.OEM.ECDSA).
[0487] In one possible implementation, the terminal certificate (CERT.OEM.ECDSA) can be issued directly or indirectly by the terminal manufacturer's root certificate, or it can be issued by the certification root certificate.
[0488] The eSIM module may pre-configure an authentication root certificate (CERT.CI.ECDSA), an EUM certificate, an eUICC certificate, an EUM private key corresponding to the EUM certificate, and an eUICC private key corresponding to the eUICC certificate (SK.eUICC.ECDSA). The authentication root certificate (CERT.CI.ECDSA) includes the authentication root public key (PK.CI.ECDSA), the EUM certificate includes the EUM public key, and the eUICC certificate includes the eUICC public key (PK.eUICC.ECDSA). The authentication root private key corresponding to the authentication root certificate (CERT.CI.ECDSA) has been used to sign the EUM certificate. The EUM private key corresponding to the EUM certificate has also been used to sign the EUM certificate. Optionally, the eSIM module may also pre-configure a terminal certificate (CERT.OEM.ECDSA). In one possible implementation, the eSIM module can obtain the terminal certificate (CERT.OEM.ECDSA) from a server during an OTA upgrade after factory release.
[0489] LPA can exchange temporary working public keys with the eSIM module.
[0490] in:
[0491] (1) LPA calls TEE to verify the certificate chain of the eSIM module.
[0492] The eSIM module's certificate chain includes the root certificate, the EUM certificate, and the eUICC certificate. The eSIM module can send the EUM and eUICC certificates to the LPA. The LPA can then call the encryption / decryption CA to further call the encryption / decryption TA, verifying the EUM certificate's legitimacy using the root certificate's public key pre-installed within the TEE. If the EUM certificate verification passes, the encryption / decryption TA can verify the eUICC certificate's legitimacy using the EUM public key within the EUM certificate. If the eUICC certificate verification passes, the encryption / decryption TA can confirm that the eSIM module's certificate chain verification is successful.
[0493] (2) The eSIM module can verify the terminal certificate (CERT.OEM.ECDSA).
[0494] In one possible implementation, if the terminal certificate (CERT.OEM.ECDSA) is self-signed, the eSIM module can use the OEM public key in the terminal certificate (CERT.OEM.ECDSA) to verify the legitimacy of the terminal certificate (CERT.OEM.ECDSA).
[0495] In one possible implementation, if the terminal certificate (CERT.OEM.ECDSA) is a device certificate, the eSIM module can verify the validity of the device certificate using the public key in the root certificate pre-installed within the eSIM module. If the device certificate verification passes, the eSIM module can verify the validity of the terminal certificate (CERT.OEM.ECDSA) using the device public key in the device certificate.
[0496] (3) The LPA calls the TEE to exchange temporary working public keys with the eSIM module.
[0497] Specifically, LPA calls the encryption / decryption TA in TEE to generate TEE temporary working public and private keys. The TEE temporary working public and private keys include the TEE temporary working public key (otPK.TEE.ECKA) and the TEE temporary working private key (otSK.TEE.ECKA).
[0498] The LPA calls the encryption / decryption TA to sign the TEE temporary working public key (otPK.TEE.ECDSA) using the OEM private key (SK.OEM.ECDSA), and then sends the TEE signature data, including the TEE temporary working public key (otPK.TEE.ECKA), to the eSIM module.
[0499] The eSIM module can verify the TEE signature data, which includes the TEE temporary working public key (otPK.TEE.ECKA), using the OEM public key, and obtain the TEE temporary working public key (otPK.TEE.ECKA) upon successful verification.
[0500] The eSIM module can generate eUICC temporary working public and private keys, which include an eUICC temporary working public key (otPK.eUICC.ECKA) and an eUICC temporary working private key (otSK.eUICC.ECKA). The eSIM module can sign the eUICC temporary working public key (otPK.eUICC.ECKA) using the eUICC private key (SK.eUICC.ECDSA) and send the eUICC signed data, including the eUICC temporary working public key (otPK.eUICC.ECKA), to the LPA.
[0501] The LPA calls the encryption / decryption TA to verify the eUICC signature data, which includes the eUICC temporary working public key (otPK.eUICC.ECDSA), using the eUICC public key (PK.eUICC.ECDSA). After successful verification, the LPA obtains the eUICC temporary working public key (otPK.TEE.ECKA).
[0502] The eSIM module can generate a shared secret key (ShS) based on the TEE temporary working public key (otPK.TEE.ECKA) and the eUICC temporary working private key (otSK.eUICC.ECKA).
[0503] LPA calls the encryption / decryption TA to generate a shared security key (ShS) based on the eUICC temporary working public key (otPK.eUICC.ECKA) and the TEE temporary working private key (otSK.TEE.ECKA).
[0504] Since the TEE temporary working public key (otPK.TEE.ECKA) and TEE temporary working private key (otSK.TEE.ECKA) are a public-private key pair, and the eUICC temporary working public key (otPK.eUICC.ECKA) and eUICC temporary working private key (otSK.eUICC.ECKA) are also a public-private key pair, both the eSIM module and the encryption / decryption TA can use the other party's temporary working public key and their own temporary working private key to generate the same shared security key (ShS).
[0505] In one possible implementation, for example on an electronic device production line, after the LPA calls the encryption / decryption TA in the TEE to generate the TEE temporary working public and private keys, it can directly send the TEE temporary working public key to the other party.
[0506] In one possible implementation, the authentication root certificate (CERT.CI.ECDSA) can be a root certificate issued by the operator, a root certificate issued by a third-party organization, a root certificate issued by the terminal manufacturer, a root certificate issued by the EUM manufacturer, and so on.
[0507] In one possible implementation, the terminal certificate (CERT.OEM.ECDSA) can be issued directly by the terminal manufacturer's root certificate or by an intermediate certificate issued by the terminal manufacturer's root certificate, or it can be issued by the authentication root certificate.
[0508] In one possible implementation, the terminal certificate (CERT.OEM.ECDSA) can be self-signed.
[0509] In one possible implementation, the device manufacturer's root certificate (CERT.OEMCI.ECDSA) can be pre-installed in the eSIM module before the electronic device 100 leaves the factory.
[0510] In one possible implementation, the device manufacturer's root certificate (CERT.OEMCI.ECDSA) can also be issued to the electronic device 100 by the server during OTA upgrades after the electronic device 100 has left the factory. The processing module (e.g., CPU) in the electronic device 100 is pre-installed in the eSIM module.
[0511] Figure 13 shows a schematic diagram of the one-way binding process of the SIM card in an eSIM authentication method provided in an embodiment of this application.
[0512] This eSIM authentication method can be applied to a first electronic device including a first processing module and an eSIM module. The first processing module may run an REE and a TEE. The REE may run an LPA and an encryption / decryption CA, and the TEE may run an encryption / decryption TA. For a detailed description of the REE and TEE, please refer to the embodiments shown in Figures 2-4 or Figures 11 and 12, which will not be repeated here.
[0513] As shown in Figure 13, the process of binding the device and the SIM card can include two stages: the two parties exchange temporary working private keys and bind the device identifier.
[0514] Phase A1: Both parties exchange temporary working private keys.
[0515] S1301. The first processing module generates a TEE temporary working public key and a TEE temporary working private key.
[0516] In the first processing module, the encryption / decryption TA in the TEE can generate a TEE temporary working public key and a TEE temporary working private key, and store the TEE temporary working public key and TEE temporary working private key in the TEE. The TEE temporary working public key and TEE temporary working private key are a paired public and private key pair.
[0517] The S1302.eSIM module generates an eUICC temporary working public key and an eUICC temporary working private key.
[0518] The eUICC temporary working public key and eUICC temporary working private key are a pair of public and private keys.
[0519] S1303. The first processing module sends the TEE temporary working public key to the eSIM module.
[0520] The LPA in the first processing module can obtain the TEE temporary working public key from the TEE through the encryption / decryption CA and encryption / decryption TA, and send the TEE temporary working public key to the eSIM module.
[0521] The S1304.eSIM module sends the eUICC temporary working public key to the first processing module.
[0522] The eSIM module can send the eUICC temporary working public key to the LPA. The LPA can then send the eUICC temporary working public key to the encryption / decryption TA via the encryption / decryption CA.
[0523] Phase A2: Device Identifier Binding
[0524] S1305. The first processing module generates a shared security key (ShS) based on the TEE temporary working private key and the eUICC temporary working public key.
[0525] Among them, the encryption / decryption TA can generate a shared security key (ShS) based on the TEE temporary working private key and the eUICC temporary working public key.
[0526] The S1306.eSIM module generates a shared security key (ShS) based on the eUICC temporary working private key and the TEE temporary working public key.
[0527] Since the TEE ephemeral working public key and TEE ephemeral working private key are a public-private key pair, and the eUICC ephemeral working public key and eUICC ephemeral working private key are also a public-private key pair, both the eSIM module and the encryption / decryption TA can use the other party's ephemeral working public key and their own ephemeral working private key to generate the same shared security key (ShS).
[0528] S1307. The first processing module obtains the device identifier. The device identifier may include the chip identifier and / or IMEI of the first processing module.
[0529] Among them, LPA can obtain the device identifier.
[0530] S1308. The first processing module encrypts the device identifier using the shared security key generated in the TEE to obtain the device binding information.
[0531] The LPA can pass the device identifier to the encryption / decryption TA via the encryption / decryption CA, and then call the encryption / decryption TA to encrypt the device identifier using a shared security key to obtain the device binding information. The encryption / decryption TA can then return the device binding information to the LPA via the encryption / decryption CA.
[0532] S1309. The first processing module sends device binding information to the eSIM module.
[0533] The LPA can send the encryption / decryption CA to the eSIM module.
[0534] The S1310 eSIM module decrypts the device identifier from the device binding information using the shared security key generated by the eSIM module and stores the device identifier.
[0535] The eSIM authentication method provided in this application is secure and controllable on the production line, eliminating concerns about security issues such as man-in-the-middle attacks. Therefore, when the first processing module and the eSIM module exchange temporary working public keys, certificate verification and signing are unnecessary. This completes the binding between the eSIM module and the device identifier.
[0536] Figure 14 shows a schematic diagram of the two-way binding process of the SIM card in an eSIM authentication method provided in an embodiment of this application.
[0537] This eSIM authentication method can be applied to a first electronic device including a first processing module and an eSIM module. The first processing module may run an REE and a TEE. The REE may run an LPA and an encryption / decryption CA, and the TEE may run an encryption / decryption TA. For a detailed description of the REE and TEE, please refer to the embodiments shown in Figures 2-4 or Figures 11 and 12, which will not be repeated here.
[0538] As shown in Figure 14, the process of binding the device and the SIM card can include two stages: the two parties exchange temporary working private keys and bind the device identifier.
[0539] Phase B1: Both parties exchange temporary working private keys.
[0540] S1401. The first processing module generates a TEE temporary working public key and a TEE temporary working private key.
[0541] The S1402.eSIM module generates an eUICC temporary working public key and an eUICC temporary working private key.
[0542] S1403. The first processing module sends the TEE temporary working public key to the eSIM module.
[0543] The S1404.eSIM module sends the eUICC temporary working public key to the first processing module.
[0544] Phase B2: Device Identifier Binding
[0545] S1405. The first processing module generates a shared security key (ShS) based on the TEE temporary working private key and the eUICC temporary working public key.
[0546] The S1406.eSIM module generates a shared security key (ShS) based on the eUICC temporary working private key and the TEE temporary working public key.
[0547] S1407. The first processing module obtains the device identifier. The device identifier may include the CPU chip identifier and / or IMEI.
[0548] S1408. The first processing module encrypts the device identifier using the shared security key generated in the TEE to obtain the device binding information.
[0549] S1409. The first processing module sends device binding information to the eSIM module.
[0550] The S1410 eSIM module decrypts the device identifier from the device binding information using the shared security key generated by the eSIM module and stores the device identifier.
[0551] Steps S1401 to S1410 can be referred to as steps S1301 to S1310 in the embodiment shown in Figure 13 above.
[0552] The S1411.eSIM module obtains the eSIM identifier.
[0553] The eSIM identifier can be an embedded universal integrated circuit card identifier (eUICC ID) and / or other identifiers.
[0554] The S1412.eSIM module encrypts the eSIM identifier using the shared security key generated by the eSIM module to obtain the eSIM binding information.
[0555] The S1413.eSIM module sends the eSIM binding information to the first processing module.
[0556] The eSIM module can send eSIM binding information to the LPA of the first processing module.
[0557] S1414. The first processing module decrypts the eSIM identifier from the eSIM binding information using the shared security key generated in the TEE, and stores the eSIM identifier.
[0558] The LPA can pass the eSIM binding information to the encryption / decryption TA through the encryption / decryption CA, and call the encryption / decryption TA to decrypt the eSIM identifier from the eSIM binding information using the shared security key generated in the TEE, and store the eSIM identifier in the TEE.
[0559] The eSIM authentication method provided in this application offers a secure and controllable solution on the production line, eliminating concerns about security issues such as man-in-the-middle attacks. Therefore, when the first processing module and the eSIM module exchange temporary working public keys, certificate verification and signing are unnecessary. This achieves bidirectional binding between the eSIM module and the device (specifically, the first processing module).
[0560] In some embodiments, steps S1401 to S1414 in the embodiments described in FIG14 above can also be executed by the first processing module and the eSIM module through OTA upgrade after the electronic device leaves the factory, thereby completing the binding of the processing module and the eSIM module in the electronic device even after the electronic device has been sold.
[0561] Figure 15 shows a schematic diagram of the two-way binding process of the SIM card in an eSIM authentication method provided in an embodiment of this application.
[0562] This eSIM authentication method can be applied to a first electronic device including a first processing module and an eSIM module. The first processing module may run an REE and a TEE. The REE may run an LPA and an encryption / decryption CA, and the TEE may run an encryption / decryption TA. For a detailed description of the REE and TEE, please refer to the embodiments shown in Figures 2-4 or Figures 11 and 12, which will not be repeated here.
[0563] As shown in Figure 15, the process of binding the device and the SIM card can include two stages: the two parties exchange temporary working private keys and bind the device identifier.
[0564] S1501, the first processing module can detect the first power-on after leaving the factory, or the first power-on after the system upgrade card binding verification function.
[0565] The first processing module can detect the first power-on after factory release or the first power-on after a system upgrade and SIM card binding verification function, and then trigger the subsequent SIM card binding process. The SIM card binding process can include the following three stages: verification of the certificate chains of both parties, exchange of temporary working public keys between both parties, and two-way binding of the SIM card.
[0566] The first electronic device can have its SIM card binding and verification functions pre-installed before leaving the factory. This allows the first processing module and eSIM module to be bound together upon the first power-on after leaving the factory, preventing the eSIM module from being disassembled and used normally on other devices, and also preventing the first electronic device from being used normally with the eSIM module of other devices.
[0567] In one possible implementation, the first electronic device can acquire the SIM card binding and verification functions during a system upgrade via the first processing module after leaving the factory. This allows for bidirectional binding between the first processing module and the eSIM module in the already released electronic device through a system upgrade, preventing the eSIM module of the already released first electronic device from being disassembled and used normally on other devices, and also preventing the first electronic device from being used normally with the eSIM module of other devices.
[0568] The S1502.eSIM module stores the authentication root certificate, EUM certificate, eUICC certificate, and terminal certificate.
[0569] Phase C1: Verification of Certificate Chains Between Both Parties
[0570] The S1503.eSIM module verifies the legitimacy of the terminal certificate.
[0571] For details, please refer to the embodiment shown in Figure 12 above, which will not be repeated here.
[0572] S1504.eSIM sends the EUM certificate and eUICC certificate to the first processing module.
[0573] S1505. After receiving the EUM certificate and eUICC certificate, the first processing module can use the authentication root public key in the authentication root certificate to verify the legitimacy of the EUM certificate.
[0574] S1506. After the first processing module successfully verifies the legitimacy of the EUM certificate, it can use the EUM public key in the EUM certificate to verify the legitimacy of the eUICC certificate.
[0575] S1507. After the first processing module passes the verification of the eUICC certificate's validity, it sends a verification completion notification to the eSIM module.
[0576] Phase C2: Both parties exchange temporary working public keys.
[0577] S1508. After sending the verification completion notification to the eSIM module, the first processing module can generate a TEE temporary working public key and a TEE temporary working private key.
[0578] S1509. The first processing module can use the OEM private key to sign the TEE temporary working public key to obtain TEE signature data.
[0579] After receiving the verification completion notification, the S1510.eSIM module can generate an eUICC temporary working public key and an eUICC temporary working private key.
[0580] The S1511.eSIM module can use the eUICC private key to sign the eUICC temporary working public key to obtain eUICC signature data.
[0581] S1512. The first processing module can send the TEE signature data to the eSIM module.
[0582] The S1513.eSIM module can send eUICC signature data to the first processing module.
[0583] S1514. The first processing module can verify the legality of the eUICC signature data through the eUICC public key in the eUICC certificate, and obtain the eUICC temporary working public key after the legality verification of the eUICC signature data is passed.
[0584] The S1515.eSIM module can verify the legitimacy of TEE signature data using the OEM public key in the terminal certificate, and obtain the TEE temporary working public key after the legitimacy of the TEE signature data is verified.
[0585] Phase C3: Two-way binding of machine and card.
[0586] S1516. The first processing module can generate a shared security key (ShS) based on the TEE temporary working private key and the eUICC temporary working public key.
[0587] The S1517.eSIM module can generate a shared security key (ShS) based on the eUICC temporary working private key and the TEE temporary working public key.
[0588] S1518. The first processing module can obtain the device identifier.
[0589] S1519. The first processing module can obtain device binding information by encrypting the device identifier with a shared security key.
[0590] S1520. The first processing module can send device binding information to the eSIM module.
[0591] The S1521.eSIM module can decrypt the device identifier from the device binding information using the shared security key generated by the eSIM module, and store the device identifier.
[0592] Steps S1505 to S1521 described above can be referred to steps S506 to S522 in the embodiment shown in Figure 5 above.
[0593] The S1522.eSIM module obtains the eSIM identifier.
[0594] The S1523.eSIM module encrypts the eSIM identifier using a shared security key to obtain eSIM binding information.
[0595] The S1524.eSIM module sends the eSIM binding information to the first processing module.
[0596] The S1525.eSIM module decrypts the eSIM identifier from the eSIM binding information using the shared security key generated in the TEE, and stores the eSIM identifier.
[0597] Steps S1522 to S1525 described above can be referred to steps S1411 to S1414 in the embodiment shown in Figure 14 above, and will not be repeated here.
[0598] The eSIM authentication method provided in this application enables a first processing module and an eSIM module in a first electronic device to first verify and exchange temporary public keys after system upgrades or initial factory power-on, and then negotiate a shared security key based on their own temporary private key and the other party's temporary public key. The first processing module encrypts the device identifier using the shared security key to generate device binding information and sends it to the eSIM module. The eSIM module can decrypt the first device identifier from the device binding information using the shared security key and store it. The eSIM module can also encrypt the first eSIM identifier using the shared security key to generate eSIM binding information. The eSIM module can then send the eSIM binding information to the first processing module. The first processing module can use the shared security key to decrypt the first eSIM identifier from the eSIM binding information and store it in the TEE. This completes the bidirectional binding between the eSIM module and the first processing module.
[0599] Figure 16 shows a schematic diagram of the device-SIM two-way authentication process in an eSIM authentication method provided in an embodiment of this application.
[0600] This eSIM authentication method can be applied to electronic devices that include a second CPU and an eSIM module. The second CPU can run an REE and a TEE. The REE can run a RiL and an encryption / decryption CA, and the TEE can run an encryption / decryption TA. For a detailed description of the REE and TEE, please refer to the embodiments shown in Figures 2-4 or Figures 11 and 12, which will not be repeated here. It should be noted that RiL is only an example and is not intended to limit the scope of this application. In specific implementations, the functionality of RiL can also be integrated into other modules within other REEs.
[0601] As shown in Figure 16, the card verification process can include the following steps:
[0602] S1601. The TEE of the second processing module stores the eSIM identifier of the eSIM module (eSIM identifier 1).
[0603] When the S1602 eSIM module detects a power-on reset, it can internally determine whether the eSIM module is bound to a device identifier through the security status.
[0604] S1603. If the eSIM module is bound to a device identifier (device identifier 1), execute the subsequent SIM card verification process.
[0605] The subsequent SIM card verification process executed by the eSIM module includes subsequent steps S1604 to S1618.
[0606] S1604. The second processing module sends an eUICC random number acquisition command to the eSIM module.
[0607] In particular, RiL in REE can send an eUICC random number acquisition command to the eSIM module.
[0608] The S1605 eSIM module sends an eUICC random number A to the second processing module.
[0609] The eSIM module sends an eUICC random number A to RiL in the REE.
[0610] S1606. The second processing module obtains the device identifier of the electronic device and generates a device random number C.
[0611] In REE, RiL can obtain the device identifier of an electronic device and generate a device random number C.
[0612] S1607. The second processing module can use the shared security key generated by the TEE to encrypt the device identifier, eUICC random number A, and device random number C to obtain verification information.
[0613] RiL in REE can call the encryption / decryption TA in TEE through the encryption / decryption CA, and use the shared security key generated by TEE to encrypt the device identifier, eUICC random number A, and device random number C to obtain the verification information.
[0614] S1608. The second processing module sends device verification information to the eSIM module.
[0615] The S1609.eSIM module can use the shared security key generated by the eSIM module to decrypt the device identifier 2, eUICC random number B, and device random number D from the device verification information.
[0616] The S1610.eSIM module can determine whether device identifier 2 is the same as device identifier 1 and whether eUICC random number B is the same as eUICC random number A.
[0617] S1611. If device identifier 2 is different from device identifier 1 or eUICC random number B is different from eUICC random number A, the device-SIM card verification fails and the eSIM module is prohibited from performing mobile communication services.
[0618] S1612. If device identifier 2 is the same as device identifier 1 and eUICC random number B is the same as eUICC random number A, then the eSIM module obtains the eSIM identifier.
[0619] The S1613.eSIM module uses the shared security key generated by the eSIM module to encrypt the eSIM identifier and the device random number D to obtain eSIM verification information.
[0620] The S1614 eSIM module sends eSIM verification information to the second processing module.
[0621] S1615. The second processing module uses the shared security key generated in the TEE to decrypt the eSIM identifier 2 and the device random number E from the eSIM verification information.
[0622] RiL in REE can call the encryption / decryption TA in TEE through encryption / decryption CA to decrypt the eSIM identifier 2 and device random number E from the eSIM verification information.
[0623] S1616. The second processing module determines whether eSIM identifier 2 is the same as eSIM identifier 1 and whether device random number E is the same as device random number C.
[0624] Among them, RiL in REE can determine whether eSIM identifier 2 is the same as eSIM identifier 1 and whether device random number E is the same as device random number C.
[0625] S1617. If eSIM identifier 2 is different from eSIM identifier 1 or device random number E is different from device random number C, the SIM card verification will fail and the use of the eSIM module for mobile communication services will be prohibited.
[0626] In one possible implementation, if eSIM identifier 2 is different from eSIM identifier 1 or device random number E is different from device random number C, RiL in REE can notify the modem to prohibit the use of the eSIM module for mobile communication services.
[0627] S1618. If eSIM identifier 2 is the same as eSIM identifier 1 and device random number E is the same as device random number C, then the SIM card verification is successful and the eSIM module can be used normally for mobile communication services.
[0628] If the SIM card verification fails, it indicates that the second processing module is not bound to the eSIM module.
[0629] In one possible implementation, if the second processing module does not receive eSIM verification information from the eSIM module after the eSIM module has been powered off and then powered on, or if the eSIM module does not receive device verification information from the second processing module after the eSIM module has been powered off and then powered on, then the SIM card verification fails.
[0630] In one possible implementation, if the second processing module fails to verify the SIM card with the eSIM module, the second processing module can verify the SIM card with the eSIM module again. If the verification fails more than a specified number of times (e.g., 3 times), the second processing module and the eSIM module are permanently locked.
[0631] The eSIM authentication method provided in this application enables the eSIM module to mutually verify the legitimacy of the second processing module communicating with it before powering on again or before engaging in mobile communication services. This prevents the eSIM module from being disassembled and inserted into other devices to access the mobile communication network, and also prevents the eSIM module from being used by other devices to access the mobile communication network, thus improving the security of the eSIM module when accessing the mobile communication network.
[0632] In this embodiment of the application, device identifier 1 can be referred to as the first device identifier, device identifier 2 can be referred to as the second device identifier, eSIM identifier 1 can be referred to as the first eSIM identifier, eSIM identifier 2 can be referred to as the second eSIM identifier, eUICC random number A can be referred to as the first eUICC random number, eUICC random number B can be referred to as the second eUICC random number, device random number C can be referred to as the first device random number, device random number E can be referred to as the second device random number, and device random number D can be referred to as the third device random number.
[0633] In this embodiment, the eUICC random number can also be referred to as the eSIM random number. Therefore, eUICC random number A can be referred to as the first eUICC random number or the first eSIM random number, and eUICC random number B can be referred to as the second eSIM random number. The eUICC temporary working public key can also be referred to as the eSIM temporary working public key. The eUICC temporary working private key can also be referred to as the eSIM temporary working private key.
[0634] The following section describes the process of one-way binding between the SIM card and the device in the eSIM authentication method provided in this application embodiment, in conjunction with signaling.
[0635] Figure 17 illustrates a schematic diagram of the signaling interaction process for one-way binding of the SIM card and device in an eSIM authentication method provided in an embodiment of this application.
[0636] This eSIM authentication method can be applied to a first electronic device including a first processing module and an eSIM module. The first processing module can run an REE and a TEE. The REE can run an LPA and an encryption / decryption CA, and the TEE can run an encryption / decryption TA. For a detailed description of the REE and TEE, please refer to the embodiments shown in Figures 2-4 or Figures 11 and 12, which will not be repeated here.
[0637] As shown in Figure 17, the signaling interaction process for SIM card binding in this eSIM authentication method may include the following steps:
[0638] S1701. The first processing module can open a logical channel with the eSIM module.
[0639] In the first processing module, the LPA can open a logical channel with the eSIM module.
[0640] S1702. The first processing module can send an Electronic Identity Acquisition (GetEID) command to the eSIM module.
[0641] In the first processing module, the LPA can send an electronic identity acquisition command to the eSIM module.
[0642] Upon receiving an electronic identity retrieval command, the S1703.eSIM module can return a response command 1 to the first processing module. This response command 1 carries the EID.
[0643] The eSIM module can send response command 1 to the LPA in the first processing module.
[0644] S1704. The first processing module can send the eUICC random number retrieval (GeteUICCChallenge) command to the eSIM module.
[0645] In the first processing module, the LPA can send the eUICC random number retrieval (GeteUICCChallenge) command to the eSIM module.
[0646] After receiving the eUICC random number acquisition command, the S1705.eSIM module can return a response command 2 to the first processing module. This response command 2 can carry an eUICC random number (eUICCChallenge).
[0647] The eSIM module can return Response Command 2 to the LPA in the first processing module.
[0648] S1706. The first processing module can generate a TEE temporary working public key (otPK.TEE.ECKA), a TEE temporary working private key (otSK.TEE.ECKA), a device random number (deviceChallenge), and a host identifier (HostID).
[0649] In the first processing module, the LPA can generate a temporary working public key (otPK.TEE.ECKA) and a temporary working private key (otSK.TEE.ECKA) for TEE by calling the encryption / decryption TA through the encryption / decryption CA.
[0650] LPA can generate device challenge numbers and obtain host ID.
[0651] S1707. The first processing module sends the Storage Data Command 3 to the eSIM module, wherein the Storage Data Command 3 carries the device random number, host identifier and TEE temporary working public key.
[0652] Among them, the LPA in the first processing module can send the stored data (Storedata) command 3 to the eSIM module.
[0653] The S1708.eSIM module generates an eUICC temporary working public key (ot.PK.EUICC.ECKA) and an eUICC temporary working private key (ot.SK.EUICC.ECKA).
[0654] The S1709.eSIM module sends a response command 5 to the first processing module, wherein the response command 5 carries the eUICC temporary working public key.
[0655] The eSIM module sends a response command 5 to the LPA in the first processing module.
[0656] S1710. The first processing module generates a shared security key (ShS) based on the eUICC temporary working public key and the TEE temporary working private key.
[0657] In the first processing module, the LPA can call the encryption / decryption TA through the encryption / decryption CA, generate a shared security key (ShS) based on the eUICC temporary working public key and the TEE temporary working private key, and store the shared security key in the TEE.
[0658] S1711. The first processing module obtains the device identifier. The device identifier may include the chip identifier of the first processing module.
[0659] Among them, the LPA in the first processing module can obtain the device identifier.
[0660] S1712. The first processing module uses ShS, host identifier, and EID to encrypt the device identifier and eUICC random number into device binding information and generate a command message authentication code (C-MAC).
[0661] In the first processing module, the LPA calls the encryption / decryption TA through the encryption / decryption CA, using ShS, host identifier, and EID to encrypt the device identifier and eUICC random number into device binding information, and generates a command message authentication code (C-MAC).
[0662] Specifically, the process of encrypting the device identifier and eUICC random number into device binding information can be referred to step S726 in the embodiment shown in Figure 7 above, and will not be repeated here.
[0663] S1713. The first processing module sends a stored data (Storedata) command 2 to the eSIM module. The stored data (Storedata) command 2 carries device binding information and the C-MAC address.
[0664] In this process, the LPA in the first processing module can send a stored data command 2 to the eSIM module. For a detailed description of the stored data command 2, please refer to step S727 in the embodiment shown in Figure 7 above.
[0665] The S1714.eSIM module generates a shared security key (ShS) based on the TEE temporary working public key and the eUICC temporary working private key.
[0666] After obtaining Storedata command 2, the S1715.eSIM module can verify the C-MAC through ShS, host identifier and EID, decrypt the binding information, obtain the device identifier and eUICC random number, and verify the decrypted eUICC random number.
[0667] After the S1716.eSIM module verifies the eUICC random number decrypted from the binding information, it encrypts the device random number into eUICC encrypted data using the shared security key, host identifier, and EID, and generates a response message authentication code (R-MAC).
[0668] The S1717 eSIM module can send Response Command 4 to the first processing module. Response Command 4 carries eUICC encrypted data and R-MAC.
[0669] S1718. The first processing module verifies the R-MAC using ShS, host identifier, and EID, and decrypts the device random number from the eUICC encrypted data, and verifies the decrypted device random number.
[0670] In the first processing module, the LPA can call the encryption / decryption TA through the encryption / decryption CA, use ShS, host identifier, and EID to verify the R-MAC, and decrypt the device random number from the eUICC encrypted data, and verify the decrypted device random number.
[0671] S1719. After the first processing module verifies the decrypted device random number, it sends a Storedata command 3 to the eSIM module. This Storedata command 3 indicates the end of the SIM card binding interaction.
[0672] Upon receiving the Storedata command 3, the S1720.eSIM module sets the device binding status to "bound" and stores the device identifier.
[0673] The S1721.eSIM module returns a binding completion status code to the first CPU. This binding completion status code indicates that the SIM card binding has been completed.
[0674] For a detailed description of steps S1714 to S1721, please refer to steps S728 to S735 in the embodiment shown in Figure 7 above, which will not be repeated here.
[0675] The eSIM authentication method provided in this application is secure and controllable on the production line, eliminating concerns about security issues such as man-in-the-middle attacks. Therefore, when the first processing module and the eSIM module exchange temporary working public keys, certificate verification and signing are unnecessary. This completes the binding between the eSIM module and the device identifier.
[0676] Figure 18 shows a schematic diagram of the signaling interaction process for bidirectional binding of the SIM card and the device in an eSIM authentication method provided in an embodiment of this application.
[0677] This eSIM authentication method can be applied to a first electronic device including a first processing module and an eSIM module. The first processing module can run an REE and a TEE. The REE can run an LPA and an encryption / decryption CA, and the TEE can run an encryption / decryption TA. For a detailed description of the REE and TEE, please refer to the embodiments shown in Figures 2-4 or Figures 11 and 12, which will not be repeated here.
[0678] As shown in Figure 18, the signaling interaction process for SIM card binding in this eSIM authentication method may include the following steps:
[0679] S1801. The first processing module can open a logical channel with the eSIM module.
[0680] In the first processing module, the LPA can open a logical channel with the eSIM module.
[0681] S1802. The first processing module can send an Electronic Identity Acquisition (GetEID) command to the eSIM module.
[0682] In the first processing module, the LPA can send an electronic identity acquisition command to the eSIM module.
[0683] Upon receiving an electronic identity acquisition command, the S1803.eSIM module can return a response command 1 to the first processing module. This response command 1 carries the EID.
[0684] The eSIM module can send response command 1 to the LPA in the first processing module.
[0685] S1804. The first processing module can send the eUICC random number retrieval (GeteUICCChallenge) command to the eSIM module.
[0686] In the first processing module, the LPA can send the eUICC random number retrieval (GeteUICCChallenge) command to the eSIM module.
[0687] After receiving the eUICC random number acquisition command, the S1805.eSIM module can return a response command 2 to the first processing module. This response command 2 can carry an eUICC random number (eUICCChallenge).
[0688] The eSIM module can return Response Command 2 to the LPA in the first processing module.
[0689] S1806. The first processing module can generate a TEE temporary working public key (otPK.TEE.ECKA), a TEE temporary working private key (otSK.TEE.ECKA), a device random number (deviceChallenge), and a host identifier (HostID).
[0690] In the first processing module, the LPA can generate a temporary working public key (otPK.TEE.ECKA) and a temporary working private key (otSK.TEE.ECKA) for TEE by calling the encryption / decryption TA through the encryption / decryption CA.
[0691] LPA can generate device challenge numbers and obtain host ID.
[0692] S1807. The first processing module sends the Storage Data Command 3 to the eSIM module, wherein the Storage Data Command 3 carries the device random number, the host identifier and the TEE temporary working public key.
[0693] Among them, the LPA in the first processing module can send the stored data (Storedata) command 3 to the eSIM module.
[0694] The S1808.eSIM module generates an eUICC temporary working public key (ot.PK.EUICC.ECKA) and an eUICC temporary working private key (ot.SK.EUICC.ECKA).
[0695] The S1809.eSIM module sends a response command 5 to the first processing module, wherein the response command 5 carries the eUICC temporary working public key.
[0696] The eSIM module sends a response command 5 to the LPA in the first processing module.
[0697] S1810. The first processing module generates a shared security key (ShS) based on the eUICC temporary working public key and the TEE temporary working private key.
[0698] In the first processing module, the LPA can call the encryption / decryption TA through the encryption / decryption CA, generate a shared security key (ShS) based on the eUICC temporary working public key and the TEE temporary working private key, and store the shared security key in the TEE.
[0699] S1811. The first processing module obtains the device identifier. The device identifier may include the chip identifier of the first processing module.
[0700] Among them, the LPA in the first processing module can obtain the device identifier.
[0701] S1812. The first processing module uses ShS, host identifier, and EID to encrypt the device identifier and eUICC random number into device binding information and generate a command message authentication code (C-MAC).
[0702] In the first processing module, the LPA calls the encryption / decryption TA through the encryption / decryption CA, using ShS, host identifier, and EID to encrypt the device identifier and eUICC random number into device binding information, and generates a command message authentication code (C-MAC).
[0703] Specifically, the process of encrypting the device identifier and eUICC random number into device binding information can be referred to step S726 in the embodiment shown in Figure 7 above, and will not be repeated here.
[0704] S1813. The first processing module sends a Stored Data (Storedata) command 2 to the eSIM module. The Stored Data (Storedata) command 2 carries device binding information and the C-MAC address.
[0705] In this process, the LPA in the first processing module can send a stored data command 2 to the eSIM module. For a detailed description of the stored data command 2, please refer to step S727 in the embodiment shown in Figure 7 above.
[0706] The S1814.eSIM module generates a shared security key (ShS) based on the TEE temporary working public key and the eUICC temporary working private key.
[0707] After obtaining Storedata command 2, the S1815.eSIM module can verify the C-MAC through ShS, host identifier and EID, decrypt the binding information, obtain the device identifier and eUICC random number, and verify the decrypted eUICC random number.
[0708] After verifying the eUICC random number decrypted from the binding information, the S1816.eSIM module encrypts the device random number and eSIM identifier into eSIM binding information by sharing the security key, host identifier, and EID, and generates a response message authentication code (R-MAC).
[0709] The S1817 eSIM module can send Response Command 4 to the first processing module. Response Command 4 carries eSIM binding information and R-MAC.
[0710] For details regarding the encryption process of eSIM binding information, please refer to the encryption process of eUICC encrypted data in the embodiment shown in Figure 7 above, which will not be repeated here.
[0711] S1818. The first processing module verifies the R-MAC using ShS, host identifier, and EID, and decrypts the device random number and eSIM identifier from the eSIM binding information, and verifies the decrypted device random number.
[0712] In the first processing module, the LPA can call the encryption / decryption TA through the encryption / decryption CA, use ShS, host identifier and EID to verify R-MAC, and decrypt the device random number and eSIM identifier from the eSIM binding information, and verify the decrypted device random number.
[0713] The process of decrypting eSIM binding information can be referred to the process of eUICC decryption in the embodiment shown in Figure 7 above, and will not be repeated here.
[0714] S1819. After the first processing module verifies the decrypted device random number, it stores the eSIM identifier in the TEE.
[0715] In the first processing module, the LPA can call the encryption / decryption TA through the encryption / decryption CA to store the eSIM identifier in the TEE.
[0716] S1820. The first processing module sends a StoredData command 3 to the eSIM module. This StoredData command 3 indicates the end of the SIM card binding interaction.
[0717] Upon receiving the Storedata command 3, the S1821.eSIM module sets the device binding status to "bound" and stores the device identifier.
[0718] The S1822.eSIM module returns a binding completion status code to the first CPU. This binding completion status code indicates that the SIM card binding has been completed.
[0719] For a detailed description of steps S1820 to S1822, please refer to steps S733 to S735 in the embodiment shown in Figure 7 above, which will not be repeated here.
[0720] The eSIM authentication method provided in this application offers a secure and controllable solution on the production line, eliminating concerns about security issues such as man-in-the-middle attacks. Therefore, when the first processing module and the eSIM module exchange temporary working public keys, certificate verification and signing are unnecessary. This achieves bidirectional binding between the eSIM module and the device (specifically, the first processing module).
[0721] Figure 19 illustrates a signaling interaction flow diagram of two-way binding between the device and the SIM card in an eSIM authentication method provided in another embodiment of this application.
[0722] This eSIM authentication method can be applied to a first electronic device including a first processing module and an eSIM module. The first processing module can run an REE and a TEE. The REE can run an LPA and an encryption / decryption CA, and the TEE can run an encryption / decryption TA. For a detailed description of the REE and TEE, please refer to the embodiments shown in Figures 2-4 or Figures 11 and 12, which will not be repeated here.
[0723] As shown in Figure 19, the signaling interaction process for SIM card binding in this eSIM authentication method may include the following steps:
[0724] S1901. The first processing module detected that the ROM upgrade was complete.
[0725] The S1902.eSIM module detected that the patch upgrade was complete.
[0726] The S1903 eSIM module can send refresh commands to the first modem.
[0727] S1904. First Modem Power On eSIM Module.
[0728] S1905. After the first modem powers on the eSIM module, it sends a reset command to the eSIM module.
[0729] The S1906 eSIM module can detect when the eSIM module has not completed the SIM card binding process.
[0730] The S1907 eSIM module can send a reset response (ATR) to the first modem.
[0731] S1908. The first processing module can open a logical channel with the eSIM module.
[0732] S1909. The first processing module can send an Electronic Identity Acquisition (GetEID) command to the eSIM module.
[0733] Upon receiving an electronic identity acquisition command, the S1910.eSIM module can return a response command 1 to the first processing module. This response command 1 carries the EID.
[0734] S1911. The first processing module can send the eUICC random number retrieval (GeteUICCChallenge) command to the eSIM module.
[0735] After receiving the eUICC random number acquisition command, the S1912.eSIM module can return a response command 2 to the first processing module. This response command 2 can carry an eUICC random number (eUICCChallenge).
[0736] S1913. The first processing module can generate a TEE temporary working public key (otPK.TEE.ECKA), a TEE temporary working private key (otSK.TEE.ECKA), a device random number (deviceChallenge), and a host identifier (HostID).
[0737] S1914. The first processing module can generate TEE packet data. The TEE packet data includes the TEE temporary working public key, device random number, eUICC random number, and host identifier.
[0738] S1915. The first processing module can use the TEE private key (SK.TEE.ECKA) to sign the TEE packet data and obtain the TEE signature value (serverSignature).
[0739] LPA can call the encryption / decryption CA, which in turn calls the encryption / decryption TA to sign the TEE packet data using the TEE private key (SK.TEE.ECDSA) to obtain the TEE signature value (serverSignature).
[0740] In one possible implementation, the TEE private key (SK.TEE.ECDSA) can be the OEM private key (SK.OEM.ECDSA) corresponding to the terminal certificate (CERT.OEM.ECDSA) in the aforementioned embodiment, and the TEE public key (PK.TEE.ECDSA) paired with the TEE private key (SK.TEE.ECDSA) can be the OEM public key (PK.OEM.ECDSA) in the terminal certificate (CERT.OEM.ECDSA) in the aforementioned embodiment.
[0741] S1916. The first processing module can send a stored data command 1 to the eSIM module. The stored data command 1 carries TEE signature data, which may include TEE packet data and TEE signature value.
[0742] After receiving the data storage command 1, the S1917.eSIM module can verify the TEE signature value and eUICC random number in the TEE signature data through the TEE public key (PK.TEE.ECDSA) in the stored TEE certificate.
[0743] After the TEE signature value and eUICC random number are verified, the S1918.eSIM module can generate an eUICC temporary working public key (ot.PK.EUICC.ECKA) and an eUICC temporary working private key (ot.SK.EUICC.ECKA).
[0744] The S1919.eSIM module can generate eUICC packet data. This eUICC packet data can include the eUICC temporary working public key and a device random number (deviceChallenge).
[0745] The S1920.eSIM module can use the eUICC private key (SK.eUICC.ECDSA) to sign the eUICC packet data and obtain the eUICC signature value.
[0746] The S1921.eSIM module can send Response Command 3 to the first CPU. Response Command 3 carries eUICC signature data, EUM certificate (CERT.EUM.ECDSA), and eUICC certificate (CERT.eUICC.ECDSA).
[0747] S1922. After receiving response command 3, the first processing module can verify the legitimacy of the EUM certificate and the eUICC certificate using the authentication root public key (PK.CI.ECDSA) in the stored authentication root certificate.
[0748] S1923. After the first processing module successfully verifies the legitimacy of the EUM certificate and the eUICC certificate, it can verify the device random number and the eUICC signature value using the eUICC public key in the eUICC certificate.
[0749] S1924. After the device random number and eUICC signature value are verified, the first processing module generates a shared security key (ShS) based on the eUICC temporary working public key and the TEE temporary working private key.
[0750] For a detailed description of steps S1901 to S1924, please refer to steps S701 to S724 in the embodiment shown in Figure 7 above.
[0751] S1925. The first processing module can obtain a device identifier. The device identifier may include the chip identifier (ChipID) and / or device identification code (IMEI) of the first processing module, etc.
[0752] S1926. The first processing module can use ShS, host identifier, and EID to encrypt the device identifier and eUICC random number into device binding information and generate a command message authentication code (C-MAC).
[0753] S1927. The first processing module can send a stored data command 2 to the eSIM module. The stored data command 2 may carry device binding information and C-MAC.
[0754] After sending response command 3 to the first processing module, the S1928.eSIM module can generate ShS based on the TEE temporary working public key and the eUICC temporary working private key.
[0755] After obtaining Storedata command 2, the S1929.eSIM module can verify the C-MAC through ShS, host identifier and EID, decrypt the device binding information, obtain the device identifier and eUICC random number, and verify the decrypted eUICC random number.
[0756] After the S1930.eSIM module verifies the eUICC random number decrypted from the binding information, it encrypts the device random number and eSIM identifier into eSIM binding information using the shared security key, host identifier, and EID, and generates a response message authentication code (R-MAC).
[0757] The S1931.eSIM module can send Response Command 4 to the first processing module. Response Command 4 carries eSIM binding information and R-MAC.
[0758] S1932. The first processing module verifies the R-MAC using ShS, host identifier, and EID, and decrypts the device random number and eSIM identifier from the eSIM binding information, and verifies the decrypted device random number.
[0759] S1933. After the first processing module verifies the decrypted device random number, it stores the eSIM identifier in the TEE.
[0760] S1934. After the first processing module verifies the decrypted device random number, it sends a Storedata command 3 to the eSIM module. This Storedata command 3 indicates the end of the SIM card binding interaction.
[0761] Upon receiving the Storedata command 3, the S1935.eSIM module sets the device binding status to "bound" and stores the device identifier.
[0762] The S1936.eSIM module returns a binding completion status code to the first processing module. This binding completion status code indicates that the SIM card binding has been completed.
[0763] For a detailed textual description of steps S1925 to S1936, please refer to steps S1811 to S1822 in the embodiment shown in Figure 18 above.
[0764] The eSIM authentication method provided in this application enables a first processing module and an eSIM module in a first electronic device to first verify certificates and exchange temporary public keys before the first electronic device leaves the factory, during system upgrades after the first electronic device is sold, or during the first power-on after the first electronic device leaves the factory. Then, based on their own temporary private keys and the other party's temporary public keys, they negotiate a shared security key. The first processing module encrypts the device identifier using the shared security key to generate device binding information and sends this information to the eSIM module. The eSIM module can decrypt the first device identifier from the device binding information using the shared security key and store it. Alternatively, the eSIM module can encrypt the first eSIM identifier using the shared security key to generate eSIM binding information. The eSIM module can then send this eSIM binding information to the first processing module. The first processing module can use the shared security key to decrypt the first eSIM identifier from the eSIM binding information and store it in the TEE. This completes the bidirectional binding between the eSIM module and the first processing module.
[0765] Figure 20 shows a schematic diagram of the two-way verification process of the SIM card in an eSIM authentication method provided in an embodiment of this application.
[0766] This eSIM authentication method can be applied to electronic devices that include a second CPU and an eSIM module. The second CPU can run an REE and a TEE. The REE can run a RiL and an encryption / decryption CA, and the TEE can run an encryption / decryption TA. For a detailed description of the REE and TEE, please refer to the embodiments shown in Figures 2-4 or Figures 11 and 12, which will not be repeated here. It should be noted that RiL is only an example and is not intended to limit the scope of this application. In specific implementations, the functionality of RiL can also be integrated into other modules within other REEs.
[0767] As shown in Figure 20, the card verification process can include the following steps:
[0768] S2001. The second processing module detected that the ROM upgrade was complete.
[0769] S2002. The second processing module detected the bound eSIM identifier 1.
[0770] The S2003 eSIM module sends a refresh command to the second modem.
[0771] The refresh command can be an active command.
[0772] S2004. Second Modem Power On eSIM Module.
[0773] The second modem can repower the eSIM module upon receiving a notification from it.
[0774] S2005. After the second modem powers on the eSIM module, it sends a reset command to the eSIM module.
[0775] The S2006 eSIM module can detect that the eSIM module has completed the SIM card binding.
[0776] After receiving a reset command, the eSIM module can complete the reset operation and detect that the SIM card binding has been completed by binding the device marker.
[0777] The S2007 eSIM module can send ATR to the second processing module via the second modem.
[0778] The ATR indicates that the eSIM module reset is complete.
[0779] S2008. The second processing module sends an eUICC random number acquisition command to the eSIM module.
[0780] In particular, RiL in REE can send an eUICC random number acquisition command to the eSIM module.
[0781] The S2009 eSIM module sends an eUICC random number A to the second processing module.
[0782] The eSIM module sends an eUICC random number A to RiL in the REE.
[0783] S2010. The second processing module obtains the device identifier and device random number C of the electronic device.
[0784] In REE, RiL can be the device identifier of the electronic device and the device random number C.
[0785] S2011. The second processing module can use the shared security key generated by the TEE to encrypt the device identifier, eUICC random number A, and device random number C to obtain verification information.
[0786] RiL in REE can call the encryption / decryption TA in TEE through the encryption / decryption CA, and use the shared security key generated by TEE to encrypt the device identifier, eUICC random number A, and device random number C to obtain the verification information.
[0787] S2012. The second processing module sends device verification information to the eSIM module.
[0788] The S2013.eSIM module can use the shared security key generated by the eSIM module to decrypt the device identifier 2, eUICC random number B, and device random number D from the device verification information.
[0789] The S2014.eSIM module can determine whether device identifier 2 is the same as device identifier 1 and whether eUICC random number B is the same as eUICC random number A.
[0790] S2015. If device identifier 2 is different from device identifier 1 or eUICC random number B is different from eUICC random number A, the device-SIM card verification fails and the eSIM module is prohibited from performing mobile communication services.
[0791] S2016. If device identifier 2 is the same as device identifier 1 and eUICC random number B is the same as eUICC random number A, then the eSIM module obtains the eSIM identifier.
[0792] The S2017.eSIM module uses the shared security key generated by the eSIM module to encrypt the eSIM identifier and the device random number D to obtain eSIM verification information.
[0793] The S2018 eSIM module sends eSIM verification information to the second processing module.
[0794] S2019. The second processing module uses the shared security key generated in the TEE to decrypt the eSIM identifier 2 and the device random number E from the eSIM verification information.
[0795] RiL in REE can call the encryption / decryption TA in TEE through encryption / decryption CA to decrypt the eSIM identifier 2 and device random number E from the eSIM verification information.
[0796] S2020. The second processing module determines whether eSIM identifier 2 is the same as eSIM identifier 1 and whether device random number E is the same as device random number C.
[0797] Among them, RiL in REE can determine whether eSIM identifier 2 is the same as eSIM identifier 1 and whether device random number E is the same as device random number C.
[0798] S2021. If eSIM identifier 2 is different from eSIM identifier 1 or device random number E is different from device random number C, the SIM card verification will fail and the use of the eSIM module for mobile communication services will be prohibited.
[0799] In one possible implementation, if eSIM identifier 2 is different from eSIM identifier 1 or device random number E is different from device random number C, RiL in REE can notify the modem to prohibit the use of the eSIM module for mobile communication services.
[0800] S2022. If eSIM identifier 2 is the same as eSIM identifier 1 and device random number E is the same as device random number C, then the SIM card verification is successful and the eSIM module can be used normally for mobile communication services.
[0801] If the SIM card verification fails, it indicates that the second processing module is not bound to the eSIM module.
[0802] In one possible implementation, if the second processing module does not receive eSIM verification information from the eSIM module after the eSIM module has been powered off and then powered on, or if the eSIM module does not receive device verification information from the second processing module after the eSIM module has been powered off and then powered on, then the SIM card verification fails.
[0803] In one possible implementation, if the second processing module fails to verify the SIM card with the eSIM module, the second processing module can verify the SIM card with the eSIM module again. If the verification fails more than a specified number of times (e.g., 3 times), the second processing module and the eSIM module are permanently locked.
[0804] The eSIM authentication method provided in this application enables the eSIM module to mutually verify the legitimacy of the second processing module communicating with it before powering on again or before engaging in mobile communication services. This prevents the eSIM module from being disassembled and inserted into other devices to access the mobile communication network, and also prevents the eSIM module from being used by other devices to access the mobile communication network, thus improving the security of the eSIM module when accessing the mobile communication network.
[0805] In some embodiments, the eSIM authentication method is applied to an electronic device including a processing module and a second eSIM module. The method includes: storing a first eSIM identifier sent by a first eSIM module in the TEE of the processing module; obtaining the second eSIM identifier of the second eSIM module after power failure and power restoration; encrypting the second eSIM identifier to obtain eSIM verification information; sending the eSIM verification information to the processing module; decrypting the second eSIM identifier from the eSIM verification information; if the second eSIM identifier is the same as the first eSIM identifier, the processing module normally uses the second eSIM module for mobile communication services; if the second eSIM identifier is different from the first eSIM identifier or the processing module does not receive the device verification information sent by the second processing module after power failure and power restoration, the processing module prohibits the use of the second eSIM module for mobile communication services.
[0806] The eSIM authentication method provided in this embodiment allows the processing module and the first eSIM module in an electronic device to first negotiate a shared key. Then, the first eSIM module encrypts the eSIM identifier using the shared security key to generate eSIM binding information and sends this information to the processing module. The processing module can decrypt the first eSIM identifier from the eSIM binding information using the shared security key and store it. Before the eSIM module powers on again or before engaging in mobile communication services, the processing module can instruct the second eSIM module communicating with it to obtain the second eSIM identifier, encrypt it using the shared security key, and generate eSIM verification information. The processing module can decrypt the second eSIM identifier from the verification information using the shared security key. If the second eSIM identifier matches the first eSIM identifier already stored in the processing module's TEE, it indicates that the second eSIM module and the first eSIM module bound to the processing module are the same eSIM module, and therefore the processing module can normally engage in mobile communication services. If the second eSIM identifier differs from the first eSIM identifier stored in the processing module's TEE, or if the processing module does not receive device verification information from the second eSIM module after a power outage and power-on, it indicates that the second eSIM module and the first eSIM module bound to the processing module are not the same eSIM module. Therefore, the processing module can prohibit the use of the second eSIM for mobile communication services. This prevents the eSIM module in the electronic device from being disassembled and inserted into other devices to access the mobile communication network, thus improving the security of the eSIM module when accessing the mobile communication network.
[0807] In one possible implementation, before the first eSIM identifier sent by the first eSIM module is stored in the TEE of the processing module, the method further includes: the processing module receiving eSIM binding information sent by the first eSIM module; after receiving the eSIM binding information, the processing module decrypts the first eSIM identifier from the eSIM binding information and stores the first eSIM identifier in the TEE.
[0808] In one possible implementation, after receiving the eSIM binding information, the processing module decrypts the first eSIM identifier from the eSIM binding information. Specifically, after receiving the eSIM binding information, the processing module decrypts the first eSIM identifier from the eSIM binding information using the shared security key generated by the TEE in the processing module.
[0809] In one possible implementation, after receiving the eSIM verification information, the processing module decrypts the second eSIM identifier from the eSIM verification information. Specifically, after receiving the eSIM verification information, the processing module decrypts the second device identifier from the verification information using the shared security key generated by the TEE.
[0810] In one possible implementation, before the processing module stores the first eSIM identifier sent by the first eSIM module, the method further includes: the processing module generating a TEE temporary working public key and a TEE temporary working private key through the TEE; the processing module receiving the eUICC temporary working public key generated by the first processing module; and the processing module generating a shared security key based on the TEE temporary working private key and the eUICC temporary working public key.
[0811] In one possible implementation, before the processing module receives the eUICC temporary working public key sent by the first eSIM module, the method further includes: the processing module receiving TEE signature data sent by the first processing module; the processing module verifying the legitimacy of the eUICC signature data using the eUICC public key in the eUICC certificate; the processing module receiving the eUICC temporary working public key sent by the first eSIM module specifically includes: after the processing module successfully verifies the legitimacy of the eUICC signature data, obtaining the eUICC temporary working public key from the eUICC signature data.
[0812] In one possible implementation, before the processing module receives the eUICC signature data sent by the first eSIM module, the method further includes: the processing module receiving the EUM certificate and the eUICC certificate sent by the first eSIM module; the processing module verifying the validity of the EUM certificate using the authentication root public key in the authentication root certificate; after successfully verifying the validity of the EUM certificate, the processing module verifying the validity of the eUICC certificate using the EUM public key in the EUM certificate; and after successfully verifying the validity of the eUICC certificate, the processing module obtaining the eUICC public key from the eUICC certificate.
[0813] In one possible implementation, the method further includes: the processing module generating a TEE temporary working private key and a TEE temporary working public key in the TEE, the TEE temporary working private key and the TEE temporary working public key being a public-private key pair; the processing module signing the TEE temporary working public key with the TEE private key to obtain TEE signature data; the processing module sending the TEE signature data to the first eSIM module; wherein the TEE signature data is used by the first eSIM module to obtain the TEE temporary working public key and generate a shared security key based on the TEE temporary working public key and the eUICC temporary working private key, the eUICC temporary working private key and the eUICC temporary working public key being a public-private key pair.
[0814] In one possible implementation, before the processing module receives the eSIM verification information sent by the second eSIM module, the method further includes: after detecting that the second eSIM module has been powered off and then powered on, the processing module sends a first device random number to the second eSIM module, the first device random number being used to be encrypted by the second eSIM module together with the second eSIM identifier to form the eSIM verification information.
[0815] In one possible implementation, the method further includes: the processing module decrypting the second device random number from the eSIM verification information; if the second eSIM identifier is the same as the first eSIM identifier, the processing module uses the second eSIM module normally for mobile communication services, specifically including: if the second eSIM identifier is the same as the first eSIM identifier and the second device random number is the same as the first device random number, the processing module uses the second eSIM module normally for mobile communication services.
[0816] Specifically, the process of binding and verifying the processing module with the eSIM module can be referred to the aforementioned embodiments, and will not be repeated here.
[0817] In some embodiments, an eSIM authentication method provided in this application can be applied to an electronic device including a second processing module and a second eSIM module. The method includes: the TEE of the second processing module stores a first eSIM identifier sent by the first eSIM module; the second eSIM module stores a first device identifier sent by the first processing module; after a power outage and power-on, the second eSIM module obtains its second eSIM identifier; the second eSIM module encrypts the second eSIM identifier to obtain eSIM verification information; the second eSIM module sends the eSIM verification information to the second processing module; the second processing module obtains the second device identifier and encrypts it to obtain device verification information; the second processing module... The second eSIM module decrypts the second eSIM identifier from the eSIM verification information; the second eSIM module decrypts the second device identifier from the device verification information; if the second eSIM identifier is the same as the first eSIM identifier and the second device identifier is the same as the first device identifier, the electronic device can normally use the second eSIM module for mobile communication services; if the second eSIM identifier is different from the first eSIM identifier, or the second device identifier is different from the first device identifier, or the second processing module does not receive the eSIM verification information sent by the second eSIM module after the second eSIM module is powered off and then powered on, or the second eSIM module does not receive the device verification information sent by the second processing module after the second eSIM module is powered off and then powered on, the electronic device is prohibited from using the second eSIM module for mobile communication services.
[0818] Through the eSIM authentication method provided in this embodiment, the second processing module is legally bound to the first eSIM module. Therefore, the TEE of the second processing module stores the first eSIM identifier of the first eSIM module and the shared security key negotiated with the first eSIM module. The second eSIM module is also legally bound to the first processing module. Therefore, the second eSIM module stores the first device identifier of the first processing module and the shared security key negotiated with the first processing module. When the second processing module and the second eSIM module work together, if the second eSIM module is powered on or before engaging in mobile communication services, the second processing module can obtain the second device identifier of the second processing module and encrypt the second device identifier into device verification information using the shared security key before sending it to the second eSIM module. The second eSIM module can also obtain the second eSIM identifier of the second eSIM module and encrypt the second eSIM identifier into eSIM verification information using the shared security key before sending it to the second processing module. The second processing module can decrypt the second eSIM identifier from the eSIM verification information using a shared security key. Similarly, the second eSIM module can decrypt the second device identifier from the device verification information using the shared security key. If the second eSIM identifier is the same as the first eSIM identifier stored in the processing module's TEE, and the second device identifier is the same as the first device identifier, then the second eSIM module and the second processing module are bound together. Therefore, the second processing module can use the second eSIM module for mobile communication services normally. If the second eSIM identifier is different from the first eSIM identifier stored in the processing module's TEE, or the second device identifier is different from the first device identifier, or the second processing module does not receive eSIM verification information from the second eSIM module after a power outage and power-on, or the second eSIM module does not receive device verification information from the second processing module after a power outage and power-on, then the second eSIM module and the second processing module are not bound together. Therefore, the second processing module can prohibit the use of the second eSIM for mobile communication services. This prevents the eSIM module in the electronic device from being disassembled and inserted into other devices to access the mobile communication network, improving the security of the eSIM module when accessing the mobile communication network.
[0819] Specifically, the process of binding and verifying the processing module with the eSIM module can be referred to the aforementioned embodiments, and will not be repeated here.
[0820] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. An embedded user identification eSIM authentication method, characterized in that, Applied to an eSIM module, the method includes: The eSIM module stores the first device identifier sent by the first processing module; After detecting a power outage and subsequent power-on, the eSIM module receives device verification information sent by the second processing module. The eSIM module decrypts the second device identifier from the device verification information; If the first device identifier is the same as the second device identifier, the eSIM module will perform mobile communication services normally. If the first device identifier is different from the second device identifier, or if the eSIM module does not receive device verification information sent by the second processing module after detecting a power outage and subsequent power-on, the eSIM module will prohibit mobile communication services.
2. The method according to claim 1, characterized in that, Before the eSIM module stores the first device identifier sent by the first processing module, the method further includes: The eSIM module receives device binding information sent by the first processing module; After receiving the device binding information, the eSIM module decrypts the first device identifier from the device binding information and stores the first device identifier.
3. The method according to claim 2, characterized in that, After receiving the device binding information, the eSIM module decrypts the first device identifier from the device binding information, specifically including: After receiving the device binding information, the eSIM module decrypts the first device identifier from the device binding information using the shared security key generated by the eSIM module.
4. The method according to any one of claims 1-3, characterized in that, After receiving the device verification information, the eSIM module decrypts the second device identifier from the device verification information, specifically including: After receiving the device verification information, the eSIM module decrypts the second device identifier from the verification information using the shared security key generated by the eSIM module.
5. The method according to any one of claims 3 or 4, characterized in that, Before the eSIM module stores the first device identifier sent by the first processing module, the method further includes: The eSIM module generates an eUICC temporary working public key and an eUICC temporary working private key; The eSIM module receives the TEE temporary working public key generated by the first processing module; The eSIM module generates a shared security key based on the eUICC temporary working private key and the TEE temporary working public key.
6. The method according to claim 5, characterized in that, Before the eSIM module receives the TEE temporary working public key sent by the first processing module, the method further includes: The eSIM module receives the TEE signature data sent by the first processing module; The eSIM module verifies the legitimacy of the TEE signature data using the TEE public key; The eSIM module receives the TEE temporary working public key sent by the first processing module, specifically including: After verifying the legitimacy of the TEE signature data, the eSIM module obtains the TEE temporary working public key from the TEE signature data.
7. The method according to claim 6, characterized in that, Before the eSIM module receives the TEE signature data sent by the first processing module, the method further includes: The eSIM module verifies the legitimacy of the TEE certificate; After verifying the legitimacy of the TEE certificate, the eSIM module obtains the TEE public key from the TEE certificate.
8. The method according to claim 7, characterized in that, The TEE certificate includes a terminal certificate, and the TEE public key is the OEM public key in the terminal certificate; The eSIM module verifies the legitimacy of the TEE certificate, specifically including: The eSIM module verifies the legitimacy of the terminal certificate using the OEM public key in the terminal certificate.
9. The method according to claim 7, characterized in that, The TEE certificate includes a device certificate and a terminal certificate, and the TEE public key is the OEM public key in the terminal certificate; Before the eSIM module verifies the validity of the TEE certificate, the method further includes: The eSIM module receives the TEE certificate sent by the first processing module; The eSIM module verifies the legitimacy of the TEE certificate, specifically including: The eSIM module uses the terminal manufacturer's root public key in the terminal manufacturer's root certificate to verify the legitimacy of the device certificate; After verifying the validity of the device certificate, the eSIM module uses the device public key in the device certificate to verify the validity of the terminal certificate; wherein, if both the validity of the device certificate and the validity of the terminal certificate are verified, then the validity of the TEE certificate is verified.
10. The method according to claim 7, characterized in that, The TEE certificate is the terminal manufacturer's root certificate, and the terminal manufacturer's root certificate is pre-installed in the eSIM module; The eSIM module verifies the legitimacy of the TEE certificate, specifically including: The eSIM module verifies the legitimacy of the terminal manufacturer's root certificate using the terminal manufacturer's root public key in the terminal manufacturer's root certificate.
11. The method according to any one of claims 7-10, characterized in that, The method further includes: The eSIM module generates the eUICC temporary working private key and the eUICC temporary working public key, which are a public-private key pair; The eSIM module signs the eUICC temporary working public key with the eUICC private key to obtain eUICC signature data; The eSIM module sends the eUICC signature data to the first processing module; wherein, the eUICC signature data is used by the first processing module to obtain the eUICC temporary working public key, and to generate a shared security key based on the eUICC temporary working public key and the TEE temporary working private key, wherein the TEE temporary working private key and the TEE temporary working public key are a public-private key pair.
12. The method according to claim 11, characterized in that, The method further includes: The eSIM module sends the EUM certificate and the eUICC certificate to the first processing module; wherein, the eUICC certificate is signed by the EUM private key paired with the EUM public key in the EUM certificate, the EUM certificate includes the eUICC public key, the eUICC public key and the eUICC private key are a public-private key pair, and the eUICC public key is used by the first processing module to verify the legality of the eUICC signature data.
13. The method according to any one of claims 1-12, characterized in that, The first device identifier is the chip identifier of the first processing module, and the second device identifier is the chip identifier of the second processing module; or, The first device identifier is the International Mobile Equipment Identity (IMEI) of the first processing module, and the second device identifier is the IMEI of the second processing module; or, The first device identifier is the chip identifier of the first processing module and the IMEI of the first processing module, and the second device identifier is the chip identifier of the second processing module and the IMEI of the second processing module.
14. The method according to any one of claims 1-13, characterized in that, After detecting a power outage and subsequent power restoration, the eSIM module receives device verification information sent by the second processing module, specifically including: After detecting a power outage and subsequent power restoration, the eSIM module sends a first request to the second processing module. The first request is used to request the second processing module to send a device identifier to the eSIM module.
15. The method according to claim 14, characterized in that, The first request includes a first eUICC random number, which is used to be encrypted by the second processing module together with the second device identifier to form the device verification information.
16. The method according to claim 15, characterized in that, The method further includes: The eSIM module decrypts the second eUICC random number from the device verification information; If the first device identifier is the same as the second device identifier, the eSIM module performs mobile communication services normally, specifically including: If the first device identifier is the same as the second device identifier and the second eUICC random number is the same as the first eUICC random number, the eSIM module will perform mobile communication services normally.
17. The method according to claim 14 or 15, characterized in that, The first request is the Get Input command.
18. The method according to claim 2, characterized in that, The eSIM module receives device binding information sent by the first processing module, specifically including: The eSIM module receives device binding information sent by the first processing module via the Storedata command.
19. An eSIM authentication method, characterized in that, Applied to an electronic device including an eSIM module and a second processing module, the method includes: The eSIM module stores the first device identifier sent by the first processing module; After detecting a power outage and subsequent power-on, the eSIM module sends a first request to the second processing module. The first request is used to request the second processing module to send a device identifier to the eSIM module. The second processing module obtains the second device identifier; The second processing module encrypts the second device identifier to obtain device verification information; The second processing module sends the device verification information to the eSIM module; The eSIM module decrypts the second device identifier from the device verification information; If the first device identifier is the same as the second device identifier, the eSIM module will perform mobile communication services normally. If the first device identifier is different from the second device identifier, or if the eSIM module does not receive the device verification information sent by the second processing module after detecting a power outage and subsequent power-on, the eSIM module will prohibit mobile communication services.
20. The method according to claim 19, characterized in that, Before the eSIM module stores the first device identifier sent by the first processing module, the method further includes: The eSIM module receives device binding information sent by the first processing module; After receiving the device binding information, the eSIM module decrypts the first device identifier from the device binding information and stores the first device identifier.
21. The method according to claim 20, characterized in that, After receiving the device binding information, the eSIM module decrypts the first device identifier from the device binding information, specifically including: After receiving the device binding information, the eSIM module decrypts the first device identifier from the device binding information using a shared security key.
22. The method according to any one of claims 19-21, characterized in that, After receiving the verification information, the eSIM module decrypts the second device identifier from the device verification information, specifically including: After receiving the device verification information, the eSIM module decrypts the second device identifier from the verification information using a shared security key.
23. The method according to claim 21 or 22, characterized in that, Before the eSIM module stores the first device identifier sent by the first processing module, the method further includes: The eSIM module generates an eUICC temporary working public key and an eUICC temporary working private key; The eSIM module receives the TEE temporary working public key generated by the first processing module; The eSIM module generates the shared security key based on the eUICC temporary working private key and the TEE temporary working public key.
24. The method according to claim 23, characterized in that, Before the eSIM module receives the TEE temporary working public key generated by the first processing module, the method further includes: The eSIM module receives the TEE signature data sent by the first processing module; The eSIM module verifies the legitimacy of the TEE signature data using the TEE public key; The eSIM module receives the TEE temporary working public key generated by the first processing module, specifically including: After verifying the legitimacy of the TEE signature data, the eSIM module obtains the TEE temporary working public key from the TEE signature data.
25. The method according to claim 24, characterized in that, Before the eSIM module receives the TEE signature data sent by the first processing module, the method further includes: The eSIM module verifies the legitimacy of the TEE certificate; After verifying the legitimacy of the TEE certificate, the eSIM module obtains the TEE public key from the TEE certificate.
26. The method according to claim 25, characterized in that, The TEE certificate includes a terminal certificate, and the TEE public key is the OEM public key in the terminal certificate; The eSIM module verifies the legitimacy of the TEE certificate, specifically including: The eSIM module verifies the legitimacy of the terminal certificate using the OEM public key in the terminal certificate.
27. The method according to claim 26, characterized in that, The TEE certificate includes a terminal certificate, and the TEE public key is the OEM public key in the terminal certificate; The eSIM module verifies the legitimacy of the TEE certificate, specifically including: The eSIM module verifies the legitimacy of the terminal certificate using the OEM public key in the terminal certificate.
28. The method according to claim 26, characterized in that, The TEE certificate includes a device certificate and a terminal certificate, and the TEE public key is the OEM public key in the terminal certificate; Before the eSIM module verifies the validity of the TEE certificate, the method further includes: The eSIM module receives the TEE certificate sent by the first processing module; The eSIM module verifies the legitimacy of the TEE certificate, specifically including: The eSIM module uses the terminal manufacturer's root public key in the terminal manufacturer's root certificate to verify the legitimacy of the device certificate; After verifying the validity of the device certificate, the eSIM module uses the device public key in the device certificate to verify the validity of the terminal certificate; wherein, if both the validity of the device certificate and the validity of the terminal certificate are verified, then the validity of the TEE certificate is verified.
29. The method according to claim 26, characterized in that, The TEE certificate is the terminal manufacturer's root certificate, and the terminal manufacturer's root certificate is pre-installed in the eSIM module; The eSIM module verifies the legitimacy of the TEE certificate, specifically including: The eSIM module verifies the legitimacy of the terminal manufacturer's root certificate using the terminal manufacturer's root public key in the terminal manufacturer's root certificate.
30. The method according to any one of claims 26-29, characterized in that, The method further includes: The eSIM module generates the eUICC temporary working private key and the eUICC temporary working public key, which are a public-private key pair; The eSIM module signs the eUICC temporary working public key with the eUICC private key to obtain eUICC signature data; The eSIM module sends the eUICC signature data to the first processing module; wherein, the eUICC signature data is used by the first processing module to obtain the eUICC temporary working public key, and to generate the shared security key based on the eUICC temporary working public key and the TEE temporary working private key, wherein the TEE temporary working private key and the TEE temporary working public key are a public-private key pair.
31. The method according to claim 30, characterized in that, The method further includes: The eSIM module sends the EUM certificate and the eUICC certificate to the first processing module; wherein, the eUICC certificate is signed by the EUM private key paired with the EUM public key in the EUM certificate, the EUM certificate includes the eUICC public key, the eUICC public key and the eUICC private key are a public-private key pair, and the eUICC public key is used by the first processing module to verify the legality of the eUICC signature data.
32. The method according to any one of claims 19-31, characterized in that, The first device identifier is the chip identifier of the first processing module, and the second device identifier is the chip identifier of the second processing module; or, The first device identifier is the International Mobile Equipment Identity (IMEI) of the first processing module, and the second device identifier is the IMEI of the second processing module; or, The first device identifier is the chip identifier of the first processing module and the IMEI of the first processing module, and the second device identifier is the chip identifier of the second processing module and the IMEI of the second processing module.
33. The method according to any one of claims 19-32, characterized in that, The first request includes a first eUICC random number; The second processing module encrypts the second device identifier to obtain device verification information, specifically including: The second processing module encrypts the first eUICC random number and the second device identifier to obtain the device verification information.
34. The method according to claim 33, characterized in that, The method further includes: The eSIM module decrypts the second eUICC random number from the device verification information; If the first device identifier is the same as the second device identifier, the eSIM module performs mobile communication services normally, specifically including: If the first device identifier is the same as the second device identifier and the second eUICC random number is the same as the first eUICC random number, the eSIM module will perform mobile communication services normally.
35. The method according to claim 33 or 34, characterized in that, The first request is the Get Input command.
36. The method according to claim 20, characterized in that, The eSIM module receives device binding information sent by the first processing module, specifically including: The eSIM module receives device binding information sent by the first processing module via the Storedata command.
37. An eSIM authentication method, characterized in that, Applied to a processing module, the method includes: The TEE of the processing module stores the first eSIM identifier sent by the first eSIM module; The processing module receives the eSIM verification information sent by the second eSIM module after the second eSIM module is powered off and then powered on again; The processing module decrypts the second eSIM identifier from the eSIM verification information; If the second eSIM identifier is the same as the first eSIM identifier, the processing module will use the second eSIM module normally for mobile communication services. If the second eSIM identifier is different from the first eSIM identifier, or if the processing module does not receive the eSIM verification information sent by the second eSIM module after the second eSIM module is powered off and then powered on again, the processing module prohibits the use of the second eSIM module for mobile communication services.
38. The method according to claim 37, characterized in that, Before the first eSIM identifier sent by the first eSIM module is stored in the TEE of the processing module, the method further includes: The processing module receives the eSIM binding information sent by the first eSIM module; After receiving the eSIM binding information, the processing module decrypts the first eSIM identifier from the eSIM binding information and stores the first eSIM identifier in the TEE.
39. The method according to claim 38, characterized in that, After receiving the eSIM binding information, the processing module decrypts the first eSIM identifier from the eSIM binding information, specifically including: After receiving the eSIM binding information, the processing module decrypts the first eSIM identifier from the eSIM binding information using the shared security key generated by the TEE in the processing module.
40. The method according to any one of claims 37-39, characterized in that, After receiving the eSIM verification information, the processing module decrypts the second eSIM identifier from the eSIM verification information, specifically including: After receiving the eSIM verification information, the processing module decrypts the second device identifier from the verification information using the shared security key generated by the TEE.
41. The method according to claim 39 or 40, characterized in that, Before the processing module stores the first eSIM identifier sent by the first eSIM module, the method further includes: The processing module generates a temporary working public key and a temporary working private key for the TEE through the TEE. The processing module receives the eUICC temporary working public key generated by the first processing module; The processing module generates a shared security key based on the TEE temporary working private key and the eUICC temporary working public key.
42. The method according to claim 41, characterized in that, Before the processing module receives the eUICC temporary working public key sent by the first eSIM module, the method further includes: The processing module receives the TEE signature data sent by the first processing module; The processing module verifies the legitimacy of the eUICC signature data using the eUICC public key in the eUICC certificate; The processing module receives the eUICC temporary working public key sent by the first eSIM module, specifically including: After verifying the legality of the eUICC signature data, the processing module obtains the eUICC temporary working public key from the eUICC signature data.
43. The method according to claim 42, characterized in that, Before the processing module receives the eUICC signature data sent by the first eSIM module, the method further includes: The processing module receives the EUM certificate and eUICC certificate sent by the first eSIM module; The processing module uses the root public key in the root certificate to verify the legitimacy of the EUM certificate; After the processing module verifies the legitimacy of the EUM certificate, it uses the EUM public key in the EUM certificate to verify the legitimacy of the eUICC certificate. After verifying the legitimacy of the eUICC certificate, the processing module retrieves the eUICC public key from the eUICC certificate.
44. The method according to claim 42 or 43, characterized in that, The method further includes: The processing module generates the TEE temporary working private key and the TEE temporary working public key in the TEE, and the TEE temporary working private key and the TEE temporary working public key are a public-private key pair; The processing module signs the TEE temporary working public key with the TEE private key to obtain TEE signature data; The processing module sends the TEE signature data to the first eSIM module; wherein, the TEE signature data is used by the first eSIM module to obtain the TEE temporary working public key, and to generate a shared security key based on the TEE temporary working public key and the eUICC temporary working private key, wherein the eUICC temporary working private key and the eUICC temporary working public key are a public-private key pair.
45. The method according to any one of claims 37-44, characterized in that, Before the processing module receives the eSIM verification information sent by the second eSIM module, the method further includes: After detecting that the second eSIM module has been powered off and then powered on again, the processing module sends a first device random number to the second eSIM module. The first device random number is used to be encrypted by the second eSIM module together with the second eSIM identifier to form the eSIM verification information.
46. The method according to claim 45, characterized in that, The method further includes: The processing module decrypts the second device random number from the eSIM verification information; If the second eSIM identifier is the same as the first eSIM identifier, the processing module normally uses the second eSIM module for mobile communication services, specifically including: If the second eSIM identifier is the same as the first eSIM identifier and the second device random number is the same as the first device random number, the processing module will normally use the second eSIM module to perform mobile communication services.
47. An eSIM authentication method, characterized in that, Applied to an electronic device including a processing module and a second eSIM module, the method includes: The TEE of the processing module stores the first eSIM identifier sent by the first eSIM module; After a power outage and subsequent power-on, the second eSIM module acquires its second eSIM identifier. The second eSIM module encrypts the second eSIM identifier to obtain eSIM verification information; The second eSIM module sends eSIM verification information to the processing module; The processing module decrypts the second eSIM identifier from the eSIM verification information; If the second eSIM identifier is the same as the first eSIM identifier, the processing module will use the second eSIM module normally for mobile communication services. If the second eSIM identifier is different from the first eSIM identifier, or if the processing module does not receive eSIM verification information sent by the second eSIM module after the second eSIM module is powered off and then powered on again, the processing module prohibits the use of the second eSIM module for mobile communication services.
48. The method according to claim 47, characterized in that, Before the first eSIM identifier sent by the first eSIM module is stored in the TEE of the processing module, the method further includes: The processing module receives the eSIM binding information sent by the first eSIM module; After receiving the eSIM binding information, the processing module decrypts the first eSIM identifier from the eSIM binding information and stores the first eSIM identifier in the TEE.
49. The method according to claim 48, characterized in that, After receiving the eSIM binding information, the processing module decrypts the first eSIM identifier from the eSIM binding information, specifically including: After receiving the eSIM binding information, the processing module decrypts the first eSIM identifier from the eSIM binding information using the shared security key generated by the TEE in the processing module.
50. The method according to any one of claims 47-49, characterized in that, After receiving the eSIM verification information, the processing module decrypts the second eSIM identifier from the eSIM verification information, specifically including: After receiving the eSIM verification information, the processing module decrypts the second device identifier from the verification information using the shared security key generated by the TEE.
51. The method according to claim 49 or 50, characterized in that, Before the processing module stores the first eSIM identifier sent by the first eSIM module, the method further includes: The processing module generates a temporary working public key and a temporary working private key for the TEE through the TEE. The processing module receives the eUICC temporary working public key generated by the first processing module; The processing module generates a shared security key based on the TEE temporary working private key and the eUICC temporary working public key.
52. The method according to claim 51, characterized in that, Before the processing module receives the eUICC temporary working public key sent by the first eSIM module, the method further includes: The processing module receives the TEE signature data sent by the first processing module; The processing module verifies the legitimacy of the eUICC signature data using the eUICC public key in the eUICC certificate; The processing module receives the eUICC temporary working public key sent by the first eSIM module, specifically including: After verifying the legality of the eUICC signature data, the processing module obtains the eUICC temporary working public key from the eUICC signature data.
53. The method according to claim 52, characterized in that, Before the processing module receives the eUICC signature data sent by the first eSIM module, the method further includes: The processing module receives the EUM certificate and eUICC certificate sent by the first eSIM module; The processing module uses the root public key in the root certificate to verify the legitimacy of the EUM certificate; After the processing module verifies the legitimacy of the EUM certificate, it uses the EUM public key in the EUM certificate to verify the legitimacy of the eUICC certificate. After verifying the legitimacy of the eUICC certificate, the processing module retrieves the eUICC public key from the eUICC certificate.
54. The method according to claim 52 or 53, characterized in that, The method further includes: The processing module generates the TEE temporary working private key and the TEE temporary working public key in the TEE, and the TEE temporary working private key and the TEE temporary working public key are a public-private key pair; The processing module signs the TEE temporary working public key with the TEE private key to obtain TEE signature data; The processing module sends the TEE signature data to the first eSIM module; wherein, the TEE signature data is used by the first eSIM module to obtain the TEE temporary working public key, and to generate a shared security key based on the TEE temporary working public key and the eUICC temporary working private key, wherein the eUICC temporary working private key and the eUICC temporary working public key are a public-private key pair.
55. The method according to any one of claims 37-54, characterized in that, Before the processing module receives the eSIM verification information sent by the second eSIM module, the method further includes: After detecting that the second eSIM module has been powered off and then powered on again, the processing module sends a first device random number to the second eSIM module. The first device random number is used to be encrypted by the second eSIM module together with the second eSIM identifier to form the eSIM verification information.
56. The method according to claim 55, characterized in that, The method further includes: The processing module decrypts the second device random number from the eSIM verification information; If the second eSIM identifier is the same as the first eSIM identifier, the processing module normally uses the second eSIM module for mobile communication services, specifically including: If the second eSIM identifier is the same as the first eSIM identifier and the second device random number is the same as the first device random number, the processing module will normally use the second eSIM module to perform mobile communication services.
57. An eSIM authentication method, characterized in that, Applied to an electronic device including a second processing module and a second eSIM module, the method includes: The TEE of the second processing module stores the first eSIM identifier sent by the first eSIM module; The second eSIM module stores the first device identifier sent by the first processing module; After a power outage and subsequent power-on, the second eSIM module acquires its second eSIM identifier. The second eSIM module encrypts the second eSIM identifier to obtain eSIM verification information; The second eSIM module sends eSIM verification information to the second processing module; The second processing module obtains the second device identifier, encrypts the second device identifier to obtain device verification information, and sends the device verification information to the second eSIM module; The second processing module decrypts the second eSIM identifier from the eSIM verification information; The second eSIM module decrypts the second device identifier from the device verification information; If the second eSIM identifier is the same as the first eSIM identifier and the second device identifier is the same as the first device identifier, then the electronic device normally uses the second eSIM module to perform mobile communication services. If the second eSIM identifier is different from the first eSIM identifier, or the second device identifier is different from the first device identifier, or the second processing module does not receive the eSIM verification information sent by the second eSIM module after the second eSIM module is powered off and then powered on, or the second eSIM module does not receive the device verification information sent by the second processing module after the second eSIM module is powered off and then powered on, then the electronic device is prohibited from using the second eSIM module for mobile communication services.
58. The method according to claim 57, characterized in that, Before the second eSIM module stores the first device identifier sent by the first processing module, the method further includes: The second eSIM module receives the device binding information sent by the first processing module; After receiving the device binding information, the second eSIM module decrypts the first device identifier from the device binding information and stores the first device identifier.
59. The method according to claim 58, characterized in that, After receiving the device binding information, the second eSIM module decrypts the first device identifier from the device binding information, specifically including: After receiving the device binding information, the second eSIM module decrypts the first device identifier from the device binding information using the shared security key generated by the second eSIM module.
60. The method according to any one of claims 57-59, characterized in that, After receiving the device verification information, the second eSIM module decrypts the second device identifier from the device verification information, specifically including: After receiving the device verification information, the second eSIM module decrypts the second device identifier from the verification information using the shared security key generated by the second eSIM module.
61. [Correction 27.11.2024 according to Rule 91] The method according to any one of claims 59 or 60, characterized in that, Before the second eSIM module stores the first device identifier sent by the first processing module, the method further includes: The second eSIM module generates an eUICC temporary working public key and an eUICC temporary working private key; The second eSIM module receives the temporary working public key for the TEE generated by the first processing module; The second eSIM module generates the shared security key based on the eUICC temporary working private key and the TEE temporary working public key.
62. The method according to claim 61, characterized in that, Before the second eSIM module receives the TEE temporary working public key sent by the first processing module, the method further includes: The second eSIM module receives the TEE signature data sent by the first processing module; The second eSIM module verifies the legitimacy of the TEE signature data using the TEE public key; The second eSIM module receives the TEE temporary working public key sent by the first processing module, specifically including: After the second eSIM module verifies the legality of the TEE signature data, it obtains the TEE temporary working public key from the TEE signature data.
63. The method according to claim 62, characterized in that, Before the second eSIM module receives the TEE signature data sent by the first processing module, the method further includes: The second eSIM module verifies the legitimacy of the TEE certificate; After the second eSIM module verifies the legitimacy of the TEE certificate, it obtains the TEE public key from the TEE certificate.
64. The method according to claim 63, characterized in that, The TEE certificate includes a terminal certificate, and the TEE public key is the OEM public key in the terminal certificate; The second eSIM module verifies the legitimacy of the TEE certificate, specifically including: The second eSIM module verifies the legitimacy of the terminal certificate using the OEM public key in the terminal certificate.
65. The method according to claim 63, characterized in that, The TEE certificate includes a device certificate and a terminal certificate, and the TEE public key is the OEM public key in the terminal certificate; Before the eSIM module verifies the validity of the TEE certificate, the method further includes: The second eSIM module receives the TEE certificate sent by the first processing module; The second eSIM module verifies the legitimacy of the TEE certificate, specifically including: The second eSIM module uses the terminal manufacturer's root public key in the terminal manufacturer's root certificate to verify the legitimacy of the device certificate; After the second eSIM module verifies the legality of the device certificate, it uses the device public key in the device certificate to verify the legality of the terminal certificate; wherein, if both the legality of the device certificate and the legality of the terminal certificate are verified, then the legality of the TEE certificate is verified.
66. The method according to claim 63, characterized in that, The TEE certificate is the terminal manufacturer's root certificate, which is pre-installed in the second eSIM module. The second eSIM module verifies the legitimacy of the TEE certificate, specifically including: The second eSIM module verifies the legitimacy of the terminal manufacturer's root certificate using the terminal manufacturer's root public key in the terminal manufacturer's root certificate.
67. The method according to any one of claims 63-66, characterized in that, The method further includes: The second eSIM module generates the eUICC temporary working private key and the eUICC temporary working public key, which are a public-private key pair; The second eSIM module signs the eUICC temporary working public key with the eUICC private key to obtain eUICC signature data; The second eSIM module sends the eUICC signature data to the first processing module; wherein, the eUICC signature data is used by the first processing module to obtain the eUICC temporary working public key, and to generate a shared security key based on the eUICC temporary working public key and the TEE temporary working private key, wherein the TEE temporary working private key and the TEE temporary working public key are a public-private key pair.
68. The method according to claim 67, characterized in that, The method further includes: The second eSIM module sends the EUM certificate and the eUICC certificate to the first processing module; wherein, the eUICC certificate is signed by the EUM private key paired with the EUM public key in the EUM certificate, the EUM certificate includes the eUICC public key, the eUICC public key and the eUICC private key are a public-private key pair, and the eUICC public key is used by the first processing module to verify the legality of the eUICC signature data.
69. The method according to any one of claims 59-68, characterized in that, The first device identifier is the chip identifier of the first processing module, and the second device identifier is the chip identifier of the second processing module; or, The first device identifier is the International Mobile Equipment Identity (IMEI) of the first processing module, and the second device identifier is the IMEI of the second processing module; or, The first device identifier is the chip identifier of the first processing module and the IMEI of the first processing module, and the second device identifier is the chip identifier of the second processing module and the IMEI of the second processing module.
70. The method according to any one of claims 59-69, characterized in that, Before the first eSIM identifier sent by the first eSIM module is stored in the TEE of the second processing module, the method further includes: The second processing module receives the eSIM binding information sent by the first eSIM module; After receiving the eSIM binding information, the second processing module decrypts the first eSIM identifier from the eSIM binding information and stores the first eSIM identifier in the TEE.
71. The method according to claim 70, characterized in that, After receiving the eSIM binding information, the second processing module decrypts the first eSIM identifier from the eSIM binding information, specifically including: After receiving the eSIM binding information, the second processing module decrypts the first eSIM identifier from the eSIM binding information using the shared security key generated by the TEE in the second processing module.
72. The method according to any one of claims 69-71, characterized in that, After receiving the eSIM verification information, the second processing module decrypts the second eSIM identifier from the eSIM verification information, specifically including: After receiving the eSIM verification information, the second processing module decrypts the second device identifier from the verification information using the shared security key generated by the TEE.
73. The method according to claim 71 or 72, characterized in that, Before the second processing module stores the first eSIM identifier sent by the first eSIM module, the method further includes: The second processing module generates a temporary working public key and a temporary working private key for the TEE through the TEE; The second processing module receives the eUICC temporary working public key generated by the first processing module; The second processing module generates a shared security key based on the TEE temporary working private key and the eUICC temporary working public key.
74. The method according to claim 73, characterized in that, Before the second processing module receives the eUICC temporary working public key sent by the first eSIM module, the method further includes: The second processing module receives the TEE signature data sent by the first processing module; The second processing module verifies the legitimacy of the eUICC signature data using the eUICC public key in the eUICC certificate; The second processing module receives the eUICC temporary working public key sent by the first eSIM module, specifically including: After verifying the legality of the eUICC signature data, the second processing module obtains the eUICC temporary working public key from the eUICC signature data.
75. The method according to claim 74, characterized in that, Before the second processing module receives the eUICC signature data sent by the first eSIM module, the method further includes: The second processing module receives the EUM certificate and eUICC certificate sent by the first eSIM module; The second processing module uses the authentication root public key in the authentication root certificate to verify the legitimacy of the EUM certificate; After the second processing module verifies the legitimacy of the EUM certificate, it uses the EUM public key in the EUM certificate to verify the legitimacy of the eUICC certificate. After the second processing module verifies the legitimacy of the eUICC certificate, it retrieves the eUICC public key from the eUICC certificate.
76. The method according to claim 74 or 75, characterized in that, The method further includes: The second processing module generates the TEE temporary working private key and the TEE temporary working public key in the TEE, and the TEE temporary working private key and the TEE temporary working public key are a public-private key pair; The second processing module signs the TEE temporary working public key with the TEE private key to obtain TEE signature data; The second processing module sends the TEE signature data to the first eSIM module; wherein, the TEE signature data is used by the first eSIM module to obtain the TEE temporary working public key, and to generate a shared security key based on the TEE temporary working public key and the eUICC temporary working private key, wherein the eUICC temporary working private key and the eUICC temporary working public key are a public-private key pair.
77. The method according to any one of claims 59-76, characterized in that, The method further includes: After detecting that the second eSIM module has been powered off and then powered on again, the second processing module sends an eUICC random number acquisition command to the second processing module. The eUICC random number acquisition command is used to request the second processing module to send an eUICC random number to the second processing module. After receiving the eUICC random number acquisition command, the second eSIM module generates a first eUICC random number and sends the first eUICC random number to the second processing module; The second processing module generates a first device random number; The second processing module obtains the second device identifier and encrypts the second device identifier to obtain device verification information, specifically including: The second processing module obtains the second device identifier, and encrypts the second device identifier, the first device random number, and the first eUICC random number to obtain device verification information.
78. The method according to claim 77, characterized in that, The method further includes: After receiving the device verification information, the second eSIM module decrypts the second eUICC random number and the third device random number from the device verification information; The second eSIM module encrypts the second eSIM identifier to obtain eSIM verification information, specifically including: The second eSIM module encrypts the second eSIM identifier and the third device random number to obtain the eSIM verification information.
79. The method according to claim 78, characterized in that, The method further includes: The second processing module decrypts the second device random number from the eSIM verification information; If the second eSIM identifier is the same as the first eSIM identifier and the second device identifier is the same as the first device identifier, then the electronic device normally uses the second eSIM module to perform mobile communication services, specifically including: If the second eSIM identifier is the same as the first eSIM identifier, the second device identifier is the same as the first device identifier, the second device random number is the same as the first device random number, and the second eUICC random number is the same as the first eUICC random number, then the electronic device normally uses the second eSIM module to perform mobile communication services.
80. An eSIM module, characterized in that, include: The system includes a processing circuit, a storage circuit, and an interface circuit. The storage circuit stores data and code instructions. The interface circuit sends commands to the processing module via a modem or receives commands sent by the processing module via the modem. The processing circuit executes the code instructions to perform the method as described in any one of claims 1-18.
81. A processing module, characterized in that, include: The system includes a processing circuit, a storage circuit, and an interface circuit. The storage circuit stores data and code instructions. The interface circuit sends commands to the eSIM module via a modem or receives commands sent by the eSIM module via the modem. The processing circuit executes the code instructions to perform the method as described in any one of claims 37-46.
82. An electronic device, characterized in that, include: The electronic device comprises an eSIM module, a second processing module, and one or more memories, wherein the one or more memories are coupled to the second processing module and are used to store a computer program that, when executed by the second processing module, causes the electronic device to perform the method as described in any one of claims 19-36.
83. An electronic device, characterized in that, include: The electronic device comprises a second eSIM module, a processing module, and one or more memories, wherein the one or more memories are coupled to the processing module and are used to store a computer program that, when executed by the processing module, causes the electronic device to perform the method as described in any one of claims 47-56.
84. An electronic device, characterized in that, include: The electronic device comprises a second eSIM module, a second processing module, and one or more memories, wherein the one or more memories are coupled to the second processing module and are used to store a computer program that, when executed by the second processing module, causes the electronic device to perform the method as described in any one of claims 57-79.
85. A computer storage medium, characterized in that, Includes computer instructions that, when executed on a processor of an electronic device, cause the electronic device to perform the method as described in any one of claims 47-56.
86. A computer storage medium, characterized in that, Includes computer instructions that, when executed on a processor of an electronic device, cause the electronic device to perform the method as described in any one of claims 57-79.