A method for securely reading digital identity data from a 5G SIM card

By combining a security chip with an NFC terminal, random numbers and temporary session keys are generated, solving the security problem of offline data reading of 5G SIM cards and enabling secure data reading in environments without internet access.

CN117750358BActive Publication Date: 2026-11-24THE FIRST RES INST OF MIN OF PUBLIC SECURITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311757481.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-20
Publication Date
2026-11-24
Estimated Expiration
2043-12-20

AI Technical Summary

Technical Problem

Existing methods for reading digital identity data from 5G SIM cards have low security in offline scenarios, a high risk of key diffusion, and the use of symmetric keys for encryption leads to a high risk of key cracking, making it impossible to guarantee data security in environments without internet access.

Method used

By using a security chip in conjunction with an NFC terminal, and generating random numbers and temporary session keys, and employing PKI-based certificates and temporary session key encryption mechanisms, the security of data transmission is ensured. 5G SIM card data can only be read offline in NFC terminals with integrated security chips.

Benefits of technology

It enables secure reading of 5G SIM card digital identity data in offline scenarios, ensuring data security, preventing data from being read arbitrarily, and ensuring channel security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117750358B_ABST
    Figure CN117750358B_ABST
Patent Text Reader

Abstract

This invention discloses a method for securely reading digital identity data from a 5G SIM card. The device terminal can only read the encrypted SIM digital identity data from the 5G SIM card offline through a security chip. The security chip decrypts the encrypted SIM digital identity data, ensuring data security in offline scenarios. Only terminal devices integrating a security chip can read the SIM digital identity data from the 5G SIM card offline, ensuring that the data cannot be read arbitrarily. The security chip employs a PKI-based certificate and temporary session key encryption mechanism to ensure channel security and protect the security of the digital identity data in the 5G SIM card during the reading process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of secure communication technology, and specifically to a method for securely reading digital identity data from a 5G SIM card. Background Technology

[0002] Based on 5G innovative technologies, telecom operators have integrated domestically produced security chips with independent operating systems and support for national cryptographic algorithms into SIM cards, forming 5G SIM cards. By merging 5G SIM cards with digital identities, leveraging their respective advantages, this approach can meet the identity authentication needs of various scenarios, including online and offline network environments, rapid access, convenient authentication for wearable devices, and IoT applications, enriching the application methods and forms of trusted digital identities. Furthermore, digital identity applications are a key driver for the implementation of 5G applications.

[0003] To fully leverage the value of 5G SIM cards, while protecting personal information, the 5G SIM cards can carry personal digital certificates, personal identity information, and other content, supporting online and offline applications of various facility authentication services. This will also expand the service scope and provide a brand-new internet ecosystem for social governance and daily life.

[0004] The current method for reading digital identity data from a 5G SIM card typically involves the device sending a data read command to the SIM card. The SIM card parses the command, encrypts the response data using a service key, and returns ciphertext to the device. Upon receiving the ciphertext, the device sends it to the server, which decrypts it using the service key and returns plaintext data. The device then retrieves the plaintext data and executes subsequent business processes. However, this method has limited application scenarios. It can only be used in an environment with internet access, where the read data can be sent to the server for decryption. In offline scenarios, the key needs to be stored in the terminal device, posing a significant risk of key leakage and insecurity. Furthermore, this method has low security, lacking reliable hardware for restriction. Any device with NFC functionality can read data from a 5G SIM card; moreover, the encryption uses a symmetric key, and all data uses the same key, increasing the risk of key cracking. Summary of the Invention

[0005] In view of the shortcomings of existing technologies, the present invention aims to provide a method for securely reading digital identity data from a 5G SIM card.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] A method for securely reading digital identity data from a 5G SIM card includes the following steps:

[0008] S1. The NFC terminal sends an NFC external authentication initialization command to the security chip.

[0009] S2. The security chip parses the instructions in step S1, generates a random number A, and returns the security chip authorization certificate and random number A to the NFC terminal;

[0010] S3, the NFC terminal sends a command to the 5G SIM card to select the card application and obtain the card application information and the Network Identity Security Space Address (NISSA);

[0011] S4. The NFC terminal uses the security chip authorization certificate and random number A to generate instructions and send them to the 5G SIM card;

[0012] After receiving the instruction in step S4, the S5 and 5G SIM cards verify the received security chip authorization certificate using the security chip authorization root certificate, cache the authorization content Auth of the security chip authorization certificate, generate a random number B, and generate temporary session keys encryptKey and macKey based on random number A and random number B. They encrypt random number B using the public key of the security chip authorization certificate to obtain the ciphertext of random number B, sign the response data using the private key of the 5G SIM card certificate to obtain the signature value, and then return the SIM card certificate, the ciphertext of random number B, and the signature value to the NFC terminal.

[0013] S6. The NFC terminal uses the SIM card certificate, random number B ciphertext, and signature value returned by the 5G SIM card to generate instructions and send them to the security chip.

[0014] S7. After receiving the instruction from step S6, the security chip uses the SP-TSM platform certificate to verify the SIM card certificate and verify whether the signature value is correct; it uses the security chip's private key to decrypt the ciphertext data of random number B to obtain random number B, generates temporary session keys encryptKey and macKey based on random number A and random number B, and uses the security chip's authorized certificate private key to sign random number A and random number B to obtain the signature value and return it to the NFC terminal.

[0015] The S8 and NFC terminals use the signature value returned by the security chip to generate instructions and send them to the 5G SIM card.

[0016] After receiving the instruction from step S8, the S9 and 5G SIM cards use the authorization certificate of the security chip to verify the signature value in the instruction. When the original signature value is a random number A and a random number B, the NFC external authentication success message is returned to the NFC terminal.

[0017] Furthermore, after authentication, the NFC terminal obtains digital identity data from the 5G SIM card. The 5G SIM card encrypts the digital identity data using a temporary session key encryptKey and calculates the MAC address using a temporary session key macKey. After obtaining the encrypted digital identity data, the NFC terminal transmits it to the security chip. The security chip decrypts and verifies the digital identity data using the temporary session keys encryptKey and macKey, and returns the plaintext digital identity data to the NFC terminal.

[0018] The present invention also provides a system for implementing the above-described method for securely reading digital identity data from a 5G SIM card, comprising an NFC terminal, a security chip, and a 5G SIM card. The security chip is integrated into the NFC terminal, and the NFC terminal and the security chip, as well as the NFC terminal and the 5G SIM card, can interact. After successful NFC external authentication is completed according to steps S1-S9 of the above method, the NFC terminal can read digital identity data from the 5G SIM card.

[0019] The beneficial effects of this invention are as follows:

[0020] 1. In this invention, the NFC terminal can read the encrypted SIM digital identity data in the 5G SIM card offline through a security chip, and decrypt the encrypted SIM digital identity data through the security chip, thus ensuring the data security of the SIM digital identity data in offline scenarios.

[0021] 2. In this invention, only NFC terminals with integrated security chips can read the SIM digital identity data in a 5G SIM card offline, ensuring that the data cannot be read arbitrarily.

[0022] 3. In this invention, the security chip uses a PKI system certificate and temporary session key encryption mechanism to ensure channel security and protect the security of digital identity data in the 5G SIM card during the reading process. Attached Figure Description

[0023] Figure 1 This is a flowchart illustrating the implementation of the method in Embodiment 1 of the present invention;

[0024] Figure 2 This is a schematic diagram of data transmission after successful authentication in Embodiment 1 of the present invention;

[0025] Figure 3 This is a schematic diagram illustrating an embodiment of Example 2 of the present invention;

[0026] Figure 4 This is a schematic diagram illustrating an embodiment of Example 3 of the present invention. Detailed Implementation

[0027] The present invention will be further described below with reference to the accompanying drawings. It should be noted that this embodiment is based on the present technical solution and provides detailed implementation methods and specific operation processes, but the protection scope of the present invention is not limited to this embodiment.

[0028] Example 1

[0029] This embodiment provides a method for securely reading digital identity data from a 5G SIM card, such as... Figure 1 As shown, it includes the following steps:

[0030] S1. The NFC terminal sends the NFC external authentication initialization command NFC INIT to the security chip;

[0031] S2. The security chip parsing instruction NFC INIT is executed, a random number A is generated, and the security chip authorization certificate and random number A are returned to the NFC terminal.

[0032] S3, the NFC terminal sends a SELECT command to the 5G SIM card to select the card application and obtains card application information and data such as the Network Identity Security Space Address (NISSA);

[0033] S4. The NFC terminal uses the security chip authorization certificate and random number A to generate instructions and send them to the 5G SIM card;

[0034] After receiving the instruction in step S4, the S5 and 5G SIM cards verify the received security chip authorization certificate using the security chip authorization root certificate, cache the authorization content Auth of the security chip authorization certificate, generate a random number B, and generate temporary session keys encryptKey and macKey based on random number A and random number B. They encrypt random number B using the public key of the security chip authorization certificate to obtain the ciphertext of random number B, sign the response data using the private key of the 5G SIM card certificate to obtain the signature value, and then return the SIM card certificate, the ciphertext of random number B, and the signature value to the NFC terminal.

[0035] S6. The NFC terminal uses the SIM card certificate, random number B ciphertext, and signature value returned by the 5G SIM card to generate instructions and send them to the security chip.

[0036] S7. After receiving the instruction from step S6, the security chip uses the SP-TSM (Application Provider Management System) platform certificate to verify the SIM card certificate and verify whether the signature value is correct; it uses the security chip's private key to decrypt the ciphertext data of random number B to obtain random number B, generates temporary session keys encryptKey and macKey based on random number A and random number B, and uses the security chip's authorized certificate private key to sign random number A and random number B to obtain the signature value and return it to the NFC terminal.

[0037] The S8 and NFC terminals use the signature value returned by the security chip to generate instructions and send them to the 5G SIM card.

[0038] After receiving the instruction from step S8, the S9 and 5G SIM cards use the authorization certificate of the security chip to verify the signature value in the instruction. When the original signature value is a random number A and a random number B, the NFC external authentication success message is returned to the NFC terminal.

[0039] S10, such as Figure 2 As shown, after authentication, the NFC terminal obtains digital identity data from the 5G SIM card. The 5G SIM card uses the temporary session key encryptKey to encrypt the digital identity data and uses the temporary session key macKey to calculate the MAC address of the digital identity data. After obtaining the encrypted digital identity data, the NFC terminal transmits it to the security chip. The security chip uses the temporary session keys encryptKey and macKey to decrypt and verify the digital identity data, obtains the plaintext digital identity data, and returns it to the NFC terminal.

[0040] Example 2

[0041] This embodiment provides an application example of the method described in Embodiment 1, such as... Figure 3 As shown.

[0042] Application runtime environment: Android system (gate system), Jard Card Cos (card application runtime platform), Native COS (security chip).

[0043] The turnstile integrates a security chip and an NFC module. The turnstile system runs on Android and includes a "User Identifier" module. Users place their phones (with a 5G SIM card and the SIM digital identity card application installed) on the NFC sensor pad. After the 5G SIM card and security chip complete NFC external authentication, a data reading process is executed. Once the turnstile confirms successful external authentication, it assembles an NFC GET DATA command, where the service type is F5, the field is service index 0003, and the field to be read is the User Identifier (CF). This command is sent to the 5G SIM card. The 5G SIM card parses the command, retrieves the User Identifier from the data storage area, and encrypts it using the temporary session key encryption key encryptKey (SM4_CBC) to obtain ciphertext, returning the ciphertext. The turnstile obtains the ciphertext, assembles a decryption command, and sends it to the security chip. The security chip decrypts the User Identifier using the temporary session key encryption key to obtain plaintext, returning the plaintext User Identifier. The gate obtains the user identifier in plaintext, parses the user identifier in the user identifier recognition module, and opens the gate if the parsing is successful.

[0044] Example 3

[0045] This embodiment provides an application example of the method described in Embodiment 1, such as... Figure 4 As shown.

[0046] Application runtime environment: Android system (self-service ticketing terminal), Jard Card COS (card application runtime platform), Native COS (security chip).

[0047] The self-service ticketing device integrates a security chip and an NFC module, running on an Android system that includes a "real-name ticketing" module. Users place their phones (with a 5G SIM card and the SIM digital identity card application already installed) on the NFC sensor pad. Upon recognizing the NFC module's action, the self-service ticketing terminal initiates NFC external authentication between the security chip and the 5G SIM card. After successful external authentication, the 5G SIM card and security chip execute the identity information reading process. Once the self-service ticketing terminal confirms successful external authentication, it assembles an NFC GET DATA command, with the service type set to FB and the identity information reading mode set to name + ID number (0003), and sends the command to the 5G SIM card. The 5G SIM card parses the command, retrieves the name and ID number from the identity information storage area, and encrypts the identity information using the temporary session key encryptKey (SM4_CBC encryption algorithm); it then returns the encrypted identity information. The self-service ticketing terminal assembles the encrypted data into an NFCDECRYPT decryption command and sends it to the security chip. The security chip uses a temporary session key to encrypt the data and decrypt it, returning the identity information in plaintext. The self-service ticketing terminal obtains the identity information in plaintext, uses it (name + ID number) to purchase a ticket, and displays the purchase result. The user then takes the phone.

[0048] For those skilled in the art, various corresponding changes and modifications can be made based on the above technical solutions and concepts, and all such changes and modifications should be included within the protection scope of the claims of this invention.

Claims

1. A method for securely reading digital identity data in a 5G SIM card, characterized in that, Includes the following steps: S1. The NFC terminal sends an NFC external authentication initialization command to the security chip. S2. The security chip parses the instructions in step S1, generates a random number A, and returns the security chip authorization certificate and random number A to the NFC terminal; S3, the NFC terminal sends a command to the 5G SIM card to select the card application and obtain the card application information and the Network Identity Security Space Address (NISSA); S4. The NFC terminal uses the security chip authorization certificate and random number A to generate instructions and send them to the 5G SIM card; After receiving the instruction in step S4, the S5 and 5G SIM cards verify the received security chip authorization certificate using the security chip authorization root certificate, cache the authorization content Auth of the security chip authorization certificate, generate a random number B, and generate temporary session keys encryptKey and macKey based on random number A and random number B. They encrypt random number B using the public key of the security chip authorization certificate to obtain the ciphertext of random number B, sign the response data using the private key of the 5G SIM card certificate to obtain the signature value, and then return the SIM card certificate, the ciphertext of random number B, and the signature value to the NFC terminal. S6. The NFC terminal uses the SIM card certificate, random number B ciphertext, and signature value returned by the 5G SIM card to generate instructions and send them to the security chip. S7. After receiving the instruction from step S6, the security chip uses the SP-TSM platform certificate to verify the SIM card certificate and verify whether the signature value is correct; it uses the security chip's private key to decrypt the ciphertext data of random number B to obtain random number B, generates temporary session keys encryptKey and macKey based on random number A and random number B, and uses the security chip's authorized certificate private key to sign random number A and random number B to obtain the signature value and return it to the NFC terminal. The S8 and NFC terminals use the signature value returned by the security chip to generate instructions and send them to the 5G SIM card. After receiving the instruction from step S8, the S9 and 5G SIM cards use the authorization certificate of the security chip to verify the signature value in the instruction. When the original signature value is a random number A and a random number B, the NFC external authentication success message is returned to the NFC terminal.

2. The method of claim 1, wherein, After authentication, the NFC terminal retrieves digital identity data from the 5G SIM card. The 5G SIM card encrypts the digital identity data using a temporary session key encryptKey and calculates the MAC address using a temporary session key macKey. After obtaining the encrypted digital identity data, the NFC terminal transmits it to the security chip. The security chip decrypts and verifies the digital identity data using the temporary session keys encryptKey and macKey, and returns the plaintext digital identity data to the NFC terminal.

3. A system for implementing the method of securely reading digital identity data in a 5G SIM card according to any of claims 1-2, characterized in that, The device includes an NFC terminal, a security chip, and a 5G SIM card. The security chip is integrated into the NFC terminal, and the NFC terminal and the security chip, as well as the NFC terminal and the 5G SIM card, can interact. After successful NFC external authentication is completed in steps S1-S9 of any of the methods described in claims 1-2, the NFC terminal can read digital identity data from the 5G SIM card.

Citation Information

Patent Citations

  • Secure storage method suitable for high-capacity SIM (Subscriber Identity Module) card

    CN113010908A

  • National cryptographic algorithm identity authentication system, method and device based on WebAuthn protocol

    CN115987598A