Verification method and device, electronic equipment and computer program product
By generating encrypted information and performing verification calculations when the eSIM module sends the SIM card verification command through the communication management module, the problem of low network authentication efficiency of the eSIM module is solved, and fast SIM card verification and network registration are achieved.
Patent Information
- Application Number
- CN202511871692.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-03-31
AI Technical Summary
In existing technologies, the device-SIM card verification time of eSIM modules is relatively long, resulting in low network authentication efficiency.
The communication management module intercepts the SIM card verification command sent by the eSIM module, generates encrypted information and performs verification calculations. It then uses the random number generated by the other party to determine the consistency of the encrypted information, thus directly determining whether the SIM card verification was successful.
It significantly reduces the device verification time, improves the efficiency of eSIM module access to the network, and avoids network authentication delays caused by slow AP startup.
Smart Images

Figure CN121771701A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a verification method and apparatus, electronic equipment, and computer program product. Background Technology
[0002] eSIM (embedded subscriber identity module) technology embeds the traditional SIM card directly into the electronic device's chip, rather than adding it as a separate, removable component. Users do not need to insert a physical SIM card. This solution allows users greater flexibility in choosing operators and rewriting new numbers into the eSIM module of their electronic devices. According to communication requirements, an electronic device can only use the network services provided by an operator after the number written into the eSIM module has been authenticated by the network. Furthermore, the communication requirements stipulate that before network authentication, a device-SIM verification process must be performed to verify the legitimacy and consistency between the electronic device and the eSIM module.
[0003] In related technologies, a corresponding communication management module is used to perform device-SIM card verification with the eSIM module. When the electronic device is powered on again, there is a relatively long time required to complete the device-SIM card verification, which delays the network authentication of the eSIM module and consequently leads to low network registration efficiency of the eSIM module. Summary of the Invention
[0004] This application provides a verification method and apparatus, electronic device, and computer program product that can improve the efficiency of card verification.
[0005] The technical solution of this application embodiment is implemented as follows: In a first aspect, embodiments of this application provide a verification method applied to a communication management module in an electronic device. The method includes: upon intercepting a SIM card verification command sent by an eSIM module, generating first encrypted information based on a first random number carried in the SIM card verification command, and generating a first verification calculation result based on the first encrypted information; generating a second random number, and sending the first verification calculation result and the second random number to the eSIM module; receiving a second verification calculation result sent by the eSIM module; wherein the second verification calculation result includes second encrypted information corresponding to the second random number; and determining that the verification is successful if the second encrypted information is the same as a third encrypted information; wherein the third encrypted information is obtained by the communication management module encrypting the second random number.
[0006] Secondly, embodiments of this application provide a verification device, which includes: The generation unit is used to generate first encrypted information based on the first random number carried in the eSIM module's SIM card verification command when the SIM card verification command is intercepted, and to generate a first verification calculation result based on the first encrypted information. The generating unit is also used to generate a second random number; The sending unit is used to send the first verification calculation result and the second random number to the eSIM module; the receiving unit is used to receive the second verification calculation result sent by the eSIM module; wherein, the second verification calculation result includes the second encryption information corresponding to the second random number; The determining unit is used to determine that the verification is successful when the second encrypted information and the third encrypted information are the same; wherein the third encrypted information is obtained by the verification device encrypting the second random number.
[0007] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the program to implement the method as described in the first aspect.
[0008] Fourthly, embodiments of this application provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the method described in the first aspect above.
[0009] This application provides a verification method and apparatus, electronic device, and computer program product, comprising: a communication management module, upon intercepting a SIM card verification command sent by an eSIM module, performing verification calculations based on a first random number carried in the SIM card verification command, generating first encrypted information, and generating a first verification calculation result based on the first encrypted information; then, sending the first verification calculation result and the generated second random number to the eSIM module, and further receiving a second verification calculation result sent by the eSIM module, the second verification calculation result including second encrypted information obtained by the eSIM module based on the second random number; finally, comparing the second encrypted information with third encrypted information obtained by the communication management module based on the second random number, and determining successful verification if they are the same. In other words, in this application's embodiment, the communication management module and the eSIM module perform verification calculations based on random numbers generated by each other. That is, the verification method proposed in this application involves the communication management module intercepting the SIM card verification command sent by the eSIM module to perform SIM card verification, and after determining whether the encrypted information obtained by encrypting the random number is consistent, the communication management module can directly determine whether the SIM card verification is successful, effectively reducing the SIM card verification time. Attached Figure Description
[0010] Figure 1 Flowchart of the verification method proposed for related technologies; Figure 2 This is a schematic diagram of the implementation process of the verification method proposed in the embodiments of this application. Figure 1 ; Figure 3 This is a schematic diagram of the implementation process of the verification method proposed in the embodiments of this application. Figure 2 ; Figure 4 This is a schematic diagram of the first verification calculation result acquisition process proposed in the embodiments of this application; Figure 5 This is a schematic diagram of the implementation process of the verification method proposed in the embodiments of this application. Figure 3 ; Figure 6 This is a schematic diagram of the implementation process of the verification method proposed in the embodiments of this application. Figure 4 ; Figure 7 This is a schematic diagram of the implementation process of the verification method proposed in the embodiments of this application. Figure 5 ; Figure 8 This is a schematic diagram of the composition structure of the verification device proposed in the embodiments of this application; Figure 9 This is a schematic diagram of the composition structure of the electronic device proposed in the embodiments of this application. Detailed Implementation
[0011] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining the differences between the applications and are not intended to limit the application. Furthermore, it should be noted that, for ease of description, only the parts that differ from the relevant applications are shown in the accompanying drawings.
[0012] Figure 1 For the machine-card verification process in related technologies, such as Figure 1 As shown, the process includes the following: Step 101: After detecting that the electronic device has been powered on again, the eSIM module sends a SIM card verification command to the AP (Application Processor).
[0013] Step 102: The AP sends a random number acquisition command to the eSIM module.
[0014] Step 103: The eSIM module sends a random number A to the AP.
[0015] Step 104: The AP obtains the device identifier 1 of the electronic device and generates a device random number C. It then uses a shared security key to encrypt the device identifier 1, the random number A, and the device random number C to obtain the device verification information.
[0016] Step 105: The AP sends the verification information to the eSIM module.
[0017] Step 106: The eSIM module uses the shared security key to decrypt the device identifier 2, random number B, and device random number D from the device verification information.
[0018] Step 107: If device identifier 2 is the same as device identifier 1 and random number B is the same as random number A, the eSIM module obtains eSIM identifier 1.
[0019] Step 108: The eSIM module uses the shared security key to encrypt the eSIM identifier 1 and the device random number D to obtain the eSIM verification information.
[0020] Step 109: The eSIM module sends the eSIM verification information to the AP.
[0021] Step 110: The AP uses the shared security key to decrypt the eSIM identifier 2 and the device random number E from the eSIM verification information.
[0022] Step 111: If the eSIM identifier 2 is the same as the eSIM identifier 1 and the device random number E is the same as the device random number C, the AP determines that the verification is successful.
[0023] However, when the electronic device is powered on again, due to the slow startup of the access point (AP), the eSIM module may receive the network authentication request first. Since the AP has not yet completed the SIM card verification, the eSIM module will reject the network authentication request. Furthermore, due to communication standard requirements, after a network authentication request is rejected, a waiting period must be established before it can be re-initiated. Therefore, the existing long SIM card verification time leads to a prolonged network authentication time for the eSIM module.
[0024] Therefore, to address the issue of the long processing time in existing SIM card verification processes, this application provides a verification method applied to a communication management module in an electronic device. The method includes: upon intercepting a SIM card verification command sent by an eSIM module, performing a verification calculation based on a first random number to generate first encrypted information, and generating a first verification calculation result based on the first encrypted information; wherein the first random number is generated by the eSIM module and included in the SIM card verification command; sending the first verification calculation result and a second random number to the eSIM module; receiving a second verification calculation result sent by the eSIM module; wherein the second verification calculation result includes second encrypted information corresponding to the second random number; and determining that the verification is successful if the second encrypted information is identical to third encrypted information generated by the communication management module corresponding to the second random number.
[0025] In other words, in this embodiment, the communication management module and the eSIM module perform verification calculations based on the random number generated by the other party, and the communication management module can directly determine whether the SIM card verification is successful by comparing whether the encrypted information generated by this module is consistent with the encrypted information sent by the eSIM module that encrypts the random number generated by the communication management module. This effectively reduces the time for SIM card verification.
[0026] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0027] One embodiment of this application provides a verification method applied to a communication management module in an electronic device, such as... Figure 2 As shown, the verification method may include steps 201 to 204: Step 201: If the device verification command sent by the eSIM module is intercepted, first encrypted information is generated based on the first random number carried in the device verification command, and first verification calculation result is generated based on the first encrypted information.
[0028] In this embodiment, the electronic device refers to a device equipped with an eSIM module and possessing network communication capabilities. The eSIM module integrates the functions of a traditional SIM card, and the SIM card can be configured via over-the-air (OTA) writing technology.
[0029] For example, the electronic device can be a smartphone, smartwatch, tablet, etc.
[0030] In this embodiment of the application, the communication management module refers to a module used to manage the network communication of electronic devices.
[0031] For example, the communication management module can be either the modem of a smartphone or the RILD layer of a smartphone. The modem is primarily responsible for the conversion between digital and analog signals, while the RILD layer is used to transmit upper-layer instructions to the modem.
[0032] In some embodiments, the SIM card verification command is an instruction issued by the eSIM module to verify the legitimacy and consistency between the electronic device and the eSIM module.
[0033] It is understandable that data in the eSIM module and data in the electronic device can only be tampered with when the electronic device is powered off. Therefore, in this embodiment, the eSIM module will send a SIM card verification command as soon as the electronic device is powered on again.
[0034] For example, the SIM card verification command is issued by the eSIM module in the form of an APDU (Application Protocol Data Unit).
[0035] In this embodiment of the application, a random number refers to a value temporarily generated according to a pre-set random number generation algorithm, which is unpredictable and unique.
[0036] This application does not impose specific restrictions on the timing of random number generation, that is, random numbers can be generated at any time before the time when the random number is to be sent, and this application also does not impose specific restrictions on the random number generation algorithm.
[0037] For example, random number generation algorithms include HMAC-SHA256.
[0038] In some embodiments, the first random number is generated by the eSIM module when it detects that the electronic device has been powered on again, and the first random number is included in the SIM card verification command.
[0039] In this embodiment of the application, encrypted information refers to data generated after encrypting the original random number with a specific key.
[0040] In this embodiment of the application, the key refers to a string used to control the random number encryption process.
[0041] In some embodiments, the first encrypted information is obtained by the communication management module encrypting the first random number using a first key.
[0042] In some embodiments, the first key is generated by the communication management module.
[0043] For example, the first key is generated by the communication management module based on the communication management module's private key and the eSIM module's public key, or it can be obtained in advance and stored directly in the communication management module.
[0044] In this embodiment of the application, when the communication management module intercepts the card verification command, it performs verification calculation. The verification calculation process of the communication management module includes encrypting the received first random number.
[0045] Step 202: Generate a second random number and send the first verification calculation result and the second random number to the eSIM module.
[0046] In this embodiment of the application, after obtaining the first verification calculation result, the communication management module can further generate a second random number and send the first verification calculation result and the second random number to the eSIM module.
[0047] In some embodiments, after the communication management module intercepts the first random number and generates the first encrypted information, it generates the second random number.
[0048] In this embodiment of the application, after receiving the first verification calculation result, the eSIM module performs a verification calculation based on the first verification calculation result and the second random number to obtain the second verification calculation result and sends the second verification calculation result to the communication management module.
[0049] In some embodiments, the first verification calculation result is used to enable the eSIM module to determine whether the two encrypted messages are consistent based on the first encrypted message and the encrypted message obtained by the eSIM module itself encrypting the first random number.
[0050] Step 203: Receive the second verification calculation result sent by the eSIM module; wherein the second verification calculation result includes the second encryption information corresponding to the second random number.
[0051] In this embodiment of the application, after the communication management module sends the first verification calculation result and the second random number to the eSIM module, it can further receive the second verification calculation result sent by the eSIM module.
[0052] In this embodiment of the application, after receiving the second random number, the eSIM module can use the second key to encrypt the second random number to obtain the second encrypted information and send the second encrypted information to the communication management module.
[0053] In some embodiments, the second key is generated by the eSIM module.
[0054] For example, the second key is generated by the eSIM module based on the public key of the communication management module and the private key of the eSIM module, or it can be obtained in advance and stored directly in the eSIM module.
[0055] In the embodiments of this application, when the first key and the second key are obtained in advance and directly stored in their respective modules, the first key and the second key are the same; when the first key and the second key are generated by the communication management module and the eSIM module respectively based on the public key of this module and the private key of the other party, the first key and the second key are different.
[0056] Step 204: If the second encrypted information and the third encrypted information are the same, the verification is confirmed to be successful; wherein, the third encrypted information is obtained by the communication management module encrypting the second random number.
[0057] In this embodiment of the application, after receiving the second verification calculation result, if the second encrypted information in the second verification calculation result is the same as the third encrypted information, the communication management module can further determine that the verification is successful.
[0058] In some embodiments, the third encrypted information is obtained by the communication management module after encrypting the second random number based on the first key.
[0059] For example, when the second random number is B, the second encrypted information is B', and the third encrypted information is B'. When it is determined that the second encrypted information B' and the third encrypted information B' are the same data, the machine card verification is confirmed to be successful.
[0060] It is understood that in the embodiments of this application, the communication management module and the eSIM module perform verification calculations based on the random number generated by each other, and the communication management module can directly determine whether the device-card verification is successful by comparing whether the encrypted information generated by this module is consistent with the encrypted information sent by the eSIM module that is encrypted with the random number generated by the communication management module, thereby effectively reducing the device-card verification time.
[0061] In the embodiments of this application, such as Figure 3 As shown, the verification method provided in this application embodiment further includes steps 301 and 302: Step 301: Encrypt the second random number using the first key to obtain the third encrypted information.
[0062] In this embodiment of the application, after generating the second random number, the communication management module can further encrypt the second random number using the first key to obtain the third encrypted information.
[0063] Step 302: Store the third encrypted information.
[0064] In this embodiment of the application, after obtaining the third encrypted information, the communication management module can further store the third encrypted information.
[0065] In some embodiments, the third encrypted information is directly stored in a secure storage area within the communication management module. This secure storage area is a read-only or restricted-access hardware security module to prevent unauthorized reading or modification.
[0066] It is understandable that the communication management module generates a second random number and stores the third encrypted information obtained based on the second random number locally, so that when the communication management module performs random number consistency verification, it does not need to decrypt and can directly perform verification based on the local encrypted information, thereby shortening the time of machine-card verification.
[0067] In this embodiment of the application, after the communication management module intercepts the SIM card verification command, it performs verification calculation and then sends a verification request to the eSIM module. The verification request carries at least the first encrypted information and the second random number.
[0068] In some embodiments, such as Figure 4 As shown, the verification request can be sent through steps 401 to 402: Step 401: Encrypt the first random number using the first key to obtain the first encrypted information.
[0069] In this embodiment of the application, after receiving the first random number, the communication management module can further encrypt the first random number using the first key to obtain the first encrypted information.
[0070] In some embodiments, the first encryption information is used to enable the eSIM module to perform a consistency check on the random number.
[0071] Step 402: Send a verification request, including the first encrypted information and the second random number, to the eSIM module.
[0072] In this embodiment of the application, after obtaining the first encrypted information, the communication management module can further send a verification request to the eSIM module based on the first encrypted information and the second random number.
[0073] It is understandable that by combining the first encrypted information with the second random number to obtain the first verification calculation result, the eSIM module can further perform random number verification, thereby improving the accuracy of the verification.
[0074] After performing step 203, the verification method provided in this application embodiment can also perform step 205: Step 205: If the second encrypted information and the third encrypted information are different, the verification is determined to have failed.
[0075] In this embodiment of the application, after receiving the second verification calculation result, if the second encrypted information and the third encrypted information in the second verification calculation result are different, the communication management module can further determine that the verification has failed.
[0076] In some embodiments, when communication is insecure, the second encrypted information may differ from the third encrypted information. Insecure communication situations include one or more of the following: excessive communication noise, tampering with the random number, or tampering with the key.
[0077] For example, when the first key of the communication management module is tampered with, the third encrypted information B'' obtained by the communication management module encrypting the second random number B based on the first key will be different from the second encrypted information B' obtained by the eSIM module encrypting the second random number B based on the second key.
[0078] After sending the first verification calculation result, the verification method provided in this application embodiment can also perform step 206: Step 206: If an indication message indicating verification failure is received after sending the first verification calculation result, the verification is determined to have failed; wherein, the indication message indicating verification failure is obtained by the eSIM module when the first encrypted information and the fourth encrypted information in the received first verification calculation result are different; the fourth encrypted information is obtained by the eSIM module encrypting the first random number with the second key.
[0079] In this embodiment of the application, if the communication management module receives an indication message indicating that the verification has failed after sending the first verification calculation result, it determines that the verification has failed.
[0080] In some embodiments, the fourth encrypted information is obtained by the eSIM module encrypting the first random number using the module's second key.
[0081] In some embodiments, the indication information used to indicate verification failure refers to a message generated by the eSIM module after the consistency verification of the encrypted information fails, indicating that the eSIM module has failed to verify the consistency of the encrypted information.
[0082] For example, the indication message used to indicate a verification failure is false.
[0083] For example, the first random number is A, and the fourth encrypted information is A'. When the noise in the communication process is too high, the first random number received by the communication management module changes to C, and the first encrypted information becomes C'. Then, the first verification calculation result containing the first encrypted information C' is sent to the eSIM module. At this time, the eSIM module determines that the fourth encrypted information A' is different from the first encrypted information C', and sends false to the communication management module.
[0084] Understandably, if either the communication management module or the eSIM module determines that the encrypted information is inconsistent, it can directly determine that the SIM card verification has failed, which significantly enhances the reliability of SIM card verification.
[0085] In some embodiments, when the communication management module has a first key, it intercepts the card verification command and / or obtains the second verification calculation result.
[0086] It is understood that in the embodiments of this application, the machine-card verification command is intercepted and / or the second verification calculation result is obtained only when the communication management module has the first key. This is to avoid performing machine-card verification when the key is not available, thereby generating unnecessary communication processes.
[0087] In this embodiment, the second encrypted information is obtained by the eSIM module encrypting the second random number using the second key when the first encrypted information and the fourth encrypted information are the same.
[0088] In some embodiments, after determining that the first encrypted information is the same as the fourth encrypted information, the eSIM module encrypts the second random number with the second key to obtain the second encrypted information.
[0089] It is understood that, in the embodiments of this application, when the eSIM module determines that the first encrypted information is the same as the fourth encrypted information, it indicates that the eSIM module has successfully verified the consistency of the random number, thereby enabling the eSIM module to further obtain the second encrypted information.
[0090] In some embodiments, after the communication management module determines whether the verification is successful or failed, the verification method provided in this application embodiment further includes: sending indication information indicating successful verification and indication information indicating failed verification to the eSIM module.
[0091] In this embodiment of the application, after the communication management module determines that the verification is successful, it can further send an indication message to the eSIM module to indicate that the verification is successful; after determining that the verification fails, it can further send an indication message to the eSIM module to indicate that the verification fails.
[0092] In some embodiments, the indication information used to indicate successful verification refers to a message generated by the communication management module after the consistency verification of the encrypted information fails.
[0093] For example, the indication message used to indicate successful verification is "success".
[0094] It is understandable that sending indications of successful verification and indications of verification failure to the eSIM module is to inform the eSIM module whether the SIM card verification was successful, avoiding the need for the eSIM module to actively query to know whether the SIM card verification was successful, thereby shortening the verification time and improving the efficiency of the eSIM module accessing the network.
[0095] In some embodiments, after the communication management module determines whether the verification is successful or failed, the verification method provided in this application embodiment further includes: sending indication information for successful verification and indication information for failed verification to the AP.
[0096] In this embodiment of the application, after the communication management module determines that the verification is successful, it can further send an indication message to the AP to indicate that the verification is successful; after determining that the verification fails, it can further send an indication message to the AP to indicate that the verification failed.
[0097] It is understandable that the indication messages sent to the AP to indicate successful verification and those to indicate failed verification are intended to ensure that the AP card verification is successful and to prevent the AP from performing verification even if the verification is successful.
[0098] In summary, the verification method provided in this application, by encrypting the random number provided by the other party and comparing the received encrypted information with its own encrypted information based on the same random number, enables the communication management module of the Modem or RILD layer to effectively determine whether the SIM card verification is successful. Since the Modem or RILD layer starts earlier than the AP, the SIM card verification time is effectively reduced, thereby increasing the efficiency of the eSIM module accessing the network. Furthermore, the communication management module proactively sends an indication of successful SIM card verification to the eSIM module and / or AP, allowing them to understand whether the verification was successful and thus directly proceed with subsequent processing.
[0099] Based on the above embodiments, another embodiment of this application proposes a verification method, which is applied to the Modem side or RILD layer, thereby reducing the time for card verification. For example, the following is an exemplary description of possible implementations of the verification method proposed in the embodiments of this application.
[0100] In related technologies, when using an access point (AP) for SIM card verification, after the electronic device is powered on again, due to the slow startup of the AP, the eSIM module may receive a network authentication request from the network first. However, since the AP and eSIM module have not yet completed the SIM card verification, the eSIM module will reject the network authentication request. Furthermore, according to communication protocol specifications, after a network authentication request is rejected by the eSIM module, it must wait for a period of time (e.g., 15 seconds) before it can be initiated again. Therefore, the efficiency of the eSIM module registering with the network is reduced.
[0101] Therefore, in order to address the problem of low efficiency in existing network registration, this application provides a verification method that is applied to the Modem or RILD layer.
[0102] In some embodiments, the SIM card verification command sent by the eSIM module includes a first random number. When the SIM card verification command is intercepted, the modem receiving the command can directly perform verification calculations based on the first random number in the command. Figure 5 As shown, the verification method may include steps 501 to 509: Step 501: The eSIM module sends a SIM card verification command to the AP.
[0103] In this embodiment of the application, the SIM card verification command sent by the eSIM module is sent to the AP by default.
[0104] For example, the eSIM module sends a SIM card verification command by sending an APDU (Application Protocol Data Unit).
[0105] Step 502: If the Modem intercepts the SIM card verification command, it obtains the first random number from the SIM card verification command.
[0106] In some embodiments, since the SIM card verification command is sent to the AP by default, the Modem will actively intercept the SIM card verification command sent by the eSIM module so that the Modem can receive the SIM card verification command and perform SIM card verification in the Modem.
[0107] For example, the modem determines whether the current command APDU is a card verification command by recognizing the command header of the command APDU. If it is, it intercepts it.
[0108] Step 503: The Modem performs a verification calculation based on the first random number and the first key, generates the first encrypted information, and generates the first verification calculation result based on the first encrypted information.
[0109] Step 504: The Modem generates a second random number and encrypts the second random number with the first key to obtain the third encrypted information.
[0110] Step 505: The Modem sends the first verification calculation result and the second random number to the eSIM module.
[0111] Step 506: The eSIM module performs a verification calculation based on the first verification calculation result and the second random number to obtain a second verification calculation result that includes the second encrypted information.
[0112] In some embodiments, if the first encrypted information in the first verification calculation result is consistent with the fourth encrypted information obtained by the module after encrypting the first random number, the eSIM module encrypts the second random number with the second key to obtain the second encrypted information, and generates the second verification calculation result based on the second encrypted information; if the first encrypted information and the fourth encrypted information are inconsistent, an indication information for indicating verification failure is obtained, and the indication information is sent to the Modem.
[0113] Step 507: The eSIM module sends the second verification calculation result to the Modem.
[0114] For example, the eSIM module sends a second verification calculation result to the modem in response to the APDU.
[0115] Step 508: If the second encrypted information in the second verification calculation result is the same as the third encrypted information, the Modem determines that the verification is successful.
[0116] In some embodiments, the third encrypted information is obtained by encrypting the second random number with the first key of this module.
[0117] Step 509: The Modem sends an indication message to the eSIM module to indicate successful verification.
[0118] It is understood that the verification method applied to the Modem provided in this application embodiment also notifies the eSIM module of the verification success or failure result. Similarly, the Modem determines that the verification has failed if the second encrypted information and the third encrypted information are different, or if it receives an indication message indicating verification failure.
[0119] like Figure 6 As shown, this application provides a verification method applied to the RILD layer. The method uses the example of the RILD layer and the eSIM module pre-stored corresponding keys to illustrate the SIM card verification process, which may include steps 601 to 609: Step 601: The eSIM module sends a SIM card verification command to the AP.
[0120] Step 602: When the RILD layer intercepts the card verification command, it obtains the first random number from the card verification command.
[0121] In some embodiments, since the SIM card verification command sent by the eSIM module includes a first random number, when the RILD layer intercepts the SIM card verification command, it can directly perform verification calculations based on the first random number in the SIM card verification command.
[0122] Step 603: The RILD layer generates a second random number and encrypts the second random number with the first key to obtain the third encrypted information.
[0123] Step 604: The RILD layer performs verification calculations based on the first random number and the first key, generates first encrypted information, and generates a first verification calculation result based on the first encrypted information.
[0124] In step 605, the RILD layer sends the first verification calculation result and the second random number to the eSIM module.
[0125] Step 606: The eSIM module performs a verification calculation based on the first verification calculation result and the second random number to obtain a second verification calculation result including the second encrypted information.
[0126] In some embodiments, if the first encrypted information in the first verification calculation result is consistent with the fourth encrypted information obtained by the module after encrypting the first random number, the eSIM module encrypts the second random number with the second key to obtain the second encrypted information, and generates the second verification calculation result based on the second encrypted information; if the first encrypted information and the fourth encrypted information are inconsistent, an indication information for indicating verification failure is obtained, and the indication information is sent to the RILD layer.
[0127] Step 607: The eSIM module sends the second verification calculation result to the RILD layer.
[0128] Step 608: If the second encrypted information in the second verification calculation result is the same as the third encrypted information, the RILD layer determines that the verification is successful.
[0129] Step 609: The RILD layer sends an indication message to the AP to indicate that the verification was successful.
[0130] It is understood that the verification method applied to the RILD layer provided in this application embodiment also notifies the AP of whether the verification was successful. The RILD layer also determines that the verification has failed if the second encrypted information is different from the third encrypted information or if it receives an indication of verification failure.
[0131] It is understandable that in some embodiments, SIM card verification involves corresponding SIM card verification algorithms, keys, and encryption processes. When SIM card verification is required at the Modem or RILD layer, the corresponding SIM card verification algorithm, the corresponding key, and the corresponding encryption process need to be implemented at the Modem or RILD layer.
[0132] It is understood that in the embodiments of this application, the SIM card verification process is moved to the Modem or RILD layer. Since the Modem or RILD layer starts earlier than the AP, the SIM card verification time can be improved, and the network authentication delay caused by the slow start of the AP can be avoided, which significantly improves the efficiency of the eSIM module accessing the network.
[0133] Based on the above embodiments, another embodiment of this application proposes an eSIM SIM card verification method (verification method), which is applied to the Modem side or RILD layer. This application moves the SIM card verification process to the Modem side or RILD layer. The SIM card verification can be completed before the network initiates the authentication request, avoiding the situation where the network authentication is rejected by the eSIM, and also avoiding the problem of slow network registration due to network authentication rejection.
[0134] For example, the following is an exemplary description of possible implementations of the eSIM card verification method proposed in the embodiments of this application.
[0135] In related technologies, card verification is implemented on the AP side because the algorithms involved in card verification on the AP side have standard APIs in the JAVA layer, making them relatively easy to implement.
[0136] However, the AP's slow startup (due to the slow startup of the JAVA layer within the AP) can lead to situations where the AP hasn't completed the verification process before the network requests authentication from the eSIM module. This can cause the network authentication request to be rejected by the eSIM module, preventing the phone from registering with the network. According to the protocol specifications, after being rejected by the eSIM module, the network must wait 15 seconds before re-initiating network registration.
[0137] To address the aforementioned issues, this application proposes an eSIM card verification method, which is applied to the Modem side or the RILD layer. For example... Figure 7 As shown in the figure, this application embodiment uses the application on the Modem side as an example to illustrate the process of the eSIM card verification method, which may include the following steps: S1, once the eSIM module detects that the device has been powered on again, it will send a SIM card verification command to the AP.
[0138] In some embodiments, the eSIM module sends APDU data to the AP via APDU. The APDU data includes command APDUs and response APDUs.
[0139] S2, when a key (first key) exists on the Modem side, intercept APDU data.
[0140] In this embodiment of the application, when the eSIM module intercepts APDU data, it determines the type of the APDU data. If it determines that the APDU data is an APDU verification request (SIM card verification command) or an APDU verification result (second verification calculation result or indication information), it intercepts the APDU data and performs the following steps accordingly: S21, Verification calculation: The Modem side, based on the received random number A (first random number), encrypts the random number A with the first key to generate encrypted information A' (first encrypted information), then generates a random number B (second random number), encrypts the random number B with the first key, and saves the generated encrypted information B' (third encrypted information).
[0141] In some embodiments, the random number A received by the modem can be carried in the SIM card verification hit, or it can be actively obtained by the modem from the eSIM module when it receives the SIM card verification command. When generating the random number A, the eSIM module also encrypts the random number A with the eSIM key (second key) and saves the generated encrypted information A' (fourth encrypted information).
[0142] In this embodiment of the application, after step S21 is executed, step S3 can be further executed.
[0143] Step S3, reply to eSIM: send the encrypted information A' obtained in step S21 and the random number B to the eSIM module, that is, send the first verification calculation result to the eSIM module.
[0144] S22, Verification Result Check: The Modem side verifies the verification result based on the received second verification calculation result or indication information. This process includes: If the received data is encrypted information B', it is compared with the locally stored encrypted information B'. If they are the same, a success (indicating successful verification) is returned to the eSIM module. If they are different, a failure (indicating verification failure) is returned to the eSIM module. If the received indication is failure, a failure is returned to the eSIM module.
[0145] In some embodiments, when the eSIM module receives the first verification calculation result, it compares the received new encrypted information A' with the locally stored encrypted information A'. If they are the same, it encrypts the random number B using the eSIM key to generate encrypted information B' (second encrypted information) and sends the encrypted information B' to the Modem side, i.e., sends the second verification calculation result; if they are different, it sends a failure message to the Modem side, i.e., sends an indication message indicating verification failure. In this embodiment, after performing step S21, steps S3 and S4 can be further performed.
[0146] Step S3, reply to eSIM: send the instruction information obtained in step S22 to the eSIM module.
[0147] Step S4, Result Notification AP: Send the indication information obtained in step S22 to the eSIM module.
[0148] In this embodiment of the application, when it is determined that the APDU data sent by the eSIM module is not an APDU verification request and APDU verification result (i.e., other commands), these other commands will normally send APDU data to the AP through step S5; and when notifying the AP of the verification result, APDU data will be sent to the AP through step S5.
[0149] In some embodiments, after receiving the result returned by the Modem, the eSIM module responds to the network authentication request if it is successful, and rejects the network authentication request and prohibits the device from registering with the network if it fails.
[0150] It is understandable that when using the RILD layer for machine card verification, the corresponding machine card verification process is as described in steps S1 to S5 above. To avoid redundant limitations, it will not be repeated here.
[0151] In summary, this application migrates the device verification logic to the Modem side or RILD layer, which not only shortens the device verification time but also improves the efficiency of device registration on the network and effectively solves the problem of network registration delay caused by authentication failure.
[0152] Based on the above embodiments, in another embodiment of this application... Figure 8 This is a schematic diagram of the composition structure of the verification device proposed in the embodiments of this application, as shown below. Figure 8 As shown, the verification device 800 proposed in this application embodiment may include: The generation unit 801 is used to generate first encrypted information based on the first random number carried in the eSIM module when the device verification command sent by the eSIM module is intercepted, and to generate a first verification calculation result based on the first encrypted information.
[0153] The generation unit 801 is also used to generate a second random number.
[0154] The sending unit 802 is used to send the first verification calculation result and the second random number to the eSIM module.
[0155] The receiving unit 803 is used to receive the second verification calculation result sent by the eSIM module; wherein the second verification calculation result includes the second encryption information corresponding to the second random number.
[0156] The determining unit 804 is used to determine that the verification is successful when the second encrypted information and the third encrypted information are the same; wherein, the third encrypted information is obtained by the verification device encrypting the second random number.
[0157] The descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0158] It should be noted that the module division in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, exist as separate physical units, or have two or more units integrated into one unit. The integrated units can be implemented in hardware, as software functional units, or a combination of software and hardware.
[0159] It should be noted that, in the embodiments of this application, if the above methods are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause the vehicle to execute all or part of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.
[0160] This application provides an electronic device. Figure 9 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 9 As shown, the electronic device 1000 includes a memory 1001 and a processor 1002. The memory 1001 stores a computer program that can run on the processor 1002. When the processor 1002 executes the program, it implements the steps in the method provided in the above embodiments.
[0161] It should be noted that the memory 1001 is configured to store instructions and applications executable by the processor 1002, and can also cache data to be processed or already processed (e.g., image data, audio data, voice communication data and video communication data) in the processor 1002 and various modules in the electronic device 1000. It can be implemented by flash memory or random access memory (RAM).
[0162] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method provided in the above embodiments.
[0163] This application provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps in the method provided in the above-described method embodiments.
[0164] It should be noted that the descriptions of the storage medium and vehicle embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and vehicle embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0165] It should be understood that the phrases "one embodiment," "an embodiment," or "some embodiments" mentioned throughout the specification mean that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment," "in one embodiment," or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. The descriptions of the various embodiments above tend to emphasize the differences between the various embodiments; their similarities or commonalities can be referred to mutually, and for the sake of brevity, they will not be repeated here.
[0166] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three kinds of relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist simultaneously, and object B exists alone.
[0167] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0168] In the several embodiments provided in this application, it should be understood that the disclosed vehicles and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between vehicles or modules can be electrical, mechanical, or other forms.
[0169] The modules described above as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules. They may be located in one place or distributed across multiple network units. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.
[0170] In addition, each functional module in the various embodiments of this application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated modules can be implemented in hardware or in the form of hardware plus software functional units.
[0171] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0172] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause the vehicle to execute all or part of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0173] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0174] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0175] The features disclosed in the several methods or vehicle embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or vehicle embodiments.
[0176] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
[0177] It should be understood that if this disclosure references any user data and personal information (including but not limited to device information, behavioral data, location information, etc.) and before applying the technical solutions described in the embodiments of this disclosure, the relevant products or services should comply with the laws and regulations concerning the protection of user data and personal information, strictly process users' personal information and data in accordance with the provisions of applicable laws and regulations throughout the entire data processing lifecycle, follow the principles of legality, legitimacy, necessity, good faith, openness, and transparency, and adopt reasonable privacy design schemes and technical measures to ensure the security of user data and personal information, protect users' legitimate rights and interests, and prevent the risks of leakage, theft, or tampering of user data and personal information.
[0178] Specifically, the company must publish and display its privacy policy in a prominent position on the user interface, clearly informing users of the types, purposes, uses, and methods of processing personal information, as well as other matters that should be disclosed as required by laws and regulations; obtain users' prior informed consent or explicit authorization regarding data processing through user-initiated interaction (such as confirmation pop-ups); process or store user data securely within the legally required timeframe; adopt a series of security technologies and management measures, including but not limited to data encryption and access control; share and transfer user data within the scope permitted by law and in a legally required manner; and process user rights, including the rights to query, access, correct, delete, withdraw authorization and consent, cancel registration, and obtain copies of personal information, within the legally required timeframe.
Claims
1. A verification method, characterized in that, The method, applied to a communication management module in an electronic device, includes: If the SIM card verification command sent by the eSIM module is intercepted, first encrypted information is generated based on the first random number carried in the SIM card verification command, and a first verification calculation result is generated based on the first encrypted information. Generate a second random number, and send the first verification calculation result and the second random number to the eSIM module; Receive the second verification calculation result sent by the eSIM module; wherein the second verification calculation result includes the second encryption information corresponding to the second random number; If the second encrypted information and the third encrypted information are the same, the verification is deemed successful; wherein, the third encrypted information is obtained by the communication management module encrypting the second random number.
2. The method according to claim 1, characterized in that, The method further includes: The third encrypted information is obtained by encrypting the second random number using the first key.
3. The method according to claim 2, characterized in that, The step of generating the first encrypted information based on the first random number carried in the card verification command includes: The first random number is encrypted using the first key to obtain the first encrypted information.
4. The method according to claim 1, characterized in that, The method further includes: If the second encrypted information is different from the third encrypted information, the verification is determined to have failed; or, if an indication message indicating verification failure is received after sending the first verification calculation result, the verification is determined to have failed; wherein the indication message indicating verification failure is obtained by the eSIM module when the first encrypted information and the fourth encrypted information in the received first verification calculation result are different; the fourth encrypted information is obtained by the eSIM module encrypting the first random number using the second key.
5. The method according to claim 2 or 3, characterized in that, When the first key exists, the interception of the machine card verification command is performed, and / or the acquisition of the second verification calculation result is performed.
6. The method according to claim 4, characterized in that, The second encrypted information is obtained by the eSIM module encrypting the second random number using the second key, when the first encrypted information and the fourth encrypted information are the same.
7. The method according to any one of claims 1-4, 6, characterized in that, The method further includes: Send an indication message to the eSIM module and / or application processor to indicate successful verification; or send an indication message to the eSIM module and / or application processor to indicate verification failure.
8. A verification device, characterized in that, The verification device includes: The generation unit is used to generate first encrypted information based on the first random number carried in the eSIM module when the device verification command sent by the eSIM module is intercepted, and to generate a first verification calculation result based on the first encrypted information. The generation unit is also used to generate a second random number; The sending unit is configured to send the first verification calculation result and the second random number to the eSIM module; The receiving unit is configured to receive the second verification calculation result sent by the eSIM module; wherein the second verification calculation result includes the second encryption information corresponding to the second random number; The determining unit is used to determine that the verification is successful when the second encrypted information and the third encrypted information are the same; wherein the third encrypted information is obtained by the verification device encrypting the second random number.
9. An electronic device, characterized in that, The method includes a memory and a processor, the memory storing a computer program that can run on the processor, the processor executing the program to implement the method of any one of claims 1 to 7.
10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the method described in any one of claims 1 to 7.
