Encrypted SIM card implementation device and method and terminal equipment
By physically isolating SIM card data from secure encryption functions in encrypted SIM cards, and using SM4 encryption and decryption algorithm based on mapreduce model, the security risks of SIM card encryption technology in the existing technology are solved, and the efficiency of encryption algorithm is improved and security performance to meet high security needs.
Patent Information
- Application Number
- CN202411864503.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-02-18
AI Technical Summary
The existing SIM card encryption technology has security risks and applications that are difficult to meet high security needs such as user identity verification, mobile payment and sensitive information encryption transmission.
An encrypted SIM card implementation device is designed to physically isolate the SIM card data from the secure encryption function, and the SM4 encryption and decryption algorithm based on mapreduce model is used to process data to ensure the security and efficiency of the data.
The problem of limited storage space of traditional SIM chips is solved through physical isolation, and the optimization of SM4 encryption and decryption algorithm improves the computing efficiency of the encryption algorithm and the security performance of the SIM card to meet applications with high security needs.
Smart Images

Figure CN119485320A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication security technology, and in particular to an apparatus, method and terminal device for implementing an encrypted SIM card. Background Art
[0002] With the rapid development of mobile communication technology, mobile phones have become an indispensable part of people's daily lives, storing a large amount of personal information and sensitive data. This information includes address books, text messages, payment information, etc. Once leaked or illegally obtained, it will cause serious economic losses and privacy violations to users.
[0003] Therefore, the emergence of encrypted SIM cards (Subscriber Identity Module) has improved the information security of SIM cards and ensured the security of user data through built-in encryption technology and security chips. With the popularity of mobile payments, more and more users are transferring money and making payments through their mobile phones. These operations require a high degree of security and reliability. Encrypted SIM cards provide a more secure guarantee for mobile financial transactions by integrating PKI asymmetric encryption technology and high-security chips. It can not only protect users' payment passwords and transaction information, but also prevent attacks from malware and hackers to ensure the security of financial transactions. In the digital age, identity authentication and certification are becoming more and more important. The built-in security chip and encryption technology of encrypted SIM cards can provide users with unique identity authentication information, which is not only difficult to forge and copy, but can also be bound to various digital services and applications to achieve more convenient and secure identity authentication and access control.
[0004] However, the current SIM card encryption technology still has certain security risks. Summary of the invention
[0005] The technical problem to be solved by the present application is to provide an encrypted SIM card implementation device, method and terminal equipment to solve the problems existing in the prior art in view of the above-mentioned deficiencies in the prior art.
[0006] In a first aspect, the present application provides an encrypted SIM card implementation device, the device comprising: a SIM card chip, a security encryption chip, a communication bus, and a communication interface;
[0007] The SIM card chip is connected to the security encryption chip through a communication bus;
[0008] The SIM card chip is connected to the external device through a communication interface;
[0009] Wherein, when the SIM card chip receives the extended password application data from the external device, it sends the extended password application data to the security encryption chip;
[0010] The security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, and sends the data processing result to the SIM card chip for subsequent processing.
[0011] In some embodiments, when there is a file encryption request in the data processing, the security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, specifically including:
[0012] Input stage: Get the data file to be encrypted;
[0013] Split stage: read the data file to be encrypted through the sharding algorithm, divide it into blocks according to the preset unit size, and obtain the key-value pairs corresponding to each file data block;
[0014] Map parallel encryption stage: the SM4 algorithm is used to encrypt the key-value pairs of each file data block through the map function to obtain the data block key-value pairs of the encryption function;
[0015] Reduction and merging phase: merge the key-value pairs of all encryption functions to obtain the key-value pairs of ciphertext data blocks;
[0016] Output stage: Output and store the key-value pairs of the ciphertext data blocks.
[0017] In some embodiments, the data file to be encrypted is read by a slicing algorithm, and is processed into blocks according to a preset unit size to obtain N file data blocks, where N is an integer greater than or equal to 2;
[0018] Among all the file data blocks, the data size of the first N-1 file data blocks is the preset unit size, and the Nth file data block is the remaining data of the data file to be encrypted after removing the first N-1 file data blocks.
[0019] In some embodiments, when there is a need for user identity authentication in data processing, the security encryption chip performs user identity authentication based on the extended password application data, and sends the authentication processing result to the SIM card chip for subsequent processing.
[0020] In some embodiments, when encryption and decryption are required for data processing, the security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, and sends the data processing results to the SIM card chip for subsequent processing.
[0021] In a second aspect, the present application provides a method for implementing an encrypted SIM card, the method comprising:
[0022] When the SIM card chip receives the extended password application data from the external device, it sends the extended password application data to the security encryption chip;
[0023] The security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, and sends the data processing result to the SIM card chip for subsequent processing.
[0024] In some embodiments, when there is a file encryption request in the data processing, the security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, specifically including:
[0025] Input stage: Get the data file to be encrypted;
[0026] Split stage: read the data file to be encrypted through the sharding algorithm, divide it into blocks according to the preset unit size, and obtain the key-value pairs corresponding to each file data block;
[0027] Map parallel encryption stage: the SM4 algorithm is used to encrypt the key-value pairs of each file data block through the map function to obtain the data block key-value pairs of the encryption function;
[0028] Reduction and merging phase: merge the key-value pairs of all encryption functions to obtain the key-value pairs of ciphertext data blocks;
[0029] Output stage: Output and store the key-value pairs of the ciphertext data blocks.
[0030] In some embodiments, the data file to be encrypted is read by a slicing algorithm, and is processed into blocks according to a preset unit size to obtain N file data blocks, where N is an integer greater than or equal to 2;
[0031] Among all the file data blocks, the data size of the first N-1 file data blocks is the preset unit size, and the Nth file data block is the remaining data of the data file to be encrypted after removing the first N-1 file data blocks.
[0032] In some embodiments, when there is a user identity authentication requirement in data processing, the security encryption chip performs user identity authentication based on the extended password application data, and sends the authentication processing result to the SIM card chip for subsequent processing;
[0033] When encryption and decryption are required for data processing, the security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, and sends the data processing results to the SIM card chip for subsequent processing.
[0034] In a third aspect, the present application provides a terminal device, wherein the terminal device includes the above-mentioned encrypted SIM card implementation device.
[0035] The encrypted SIM card implementation device, method and terminal device provided in the present application include: a SIM card chip, a security encryption chip, a communication bus and a communication interface; the SIM card chip is connected to the security encryption chip through the communication bus; the SIM card chip is connected to the external device through the communication interface; wherein, when the SIM card chip receives the extended password application data from the external device, it sends the extended password application data to the security encryption chip; the security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, and sends the data processing result to the SIM card chip for subsequent processing. The present application not only overcomes the problem of limited storage space of traditional SIM chips by physically isolating SIM card data from security encryption functions, but also provides exclusive password processing and protection barriers for extended applications with high security requirements such as user identity authentication, mobile payment and encrypted transmission of sensitive information. In addition, the present application has further optimized the SM4 national secret algorithm, and the SM4 encryption and decryption algorithm based on the mapreduce model includes five stages: input, split, Map, Reduce and output. Input and output are responsible for processing the input and output of big data files. Split is used to implement the sharding operation of big data files. The map function encrypts each shard in parallel. The Reduce function is used to merge the encrypted data block slices, which improves the computational efficiency of the encryption algorithm and improves the security performance of the SIM card. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0037] Figure 1 A schematic diagram of a device for implementing an encrypted SIM card provided in an embodiment of the present application;
[0038] Figure 2 An example diagram of the SM4 encryption and decryption algorithm based on the mapreduce model provided in the embodiment of the present application;
[0039] Figure 3 A schematic diagram of a method for implementing an encrypted SIM card provided in an embodiment of the present application;
[0040] Figure 4 A schematic diagram of a terminal device provided in an embodiment of the present application.
[0041] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the technical solution of the present application, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0043] It should be understood that the specific embodiments and drawings described herein are only used to explain the present application, rather than to limit the present application.
[0044] It can be understood that, in the absence of conflict, the various embodiments in the present application and the various features in the embodiments can be combined with each other.
[0045] It can be understood that, for the convenience of description, the drawings of the present application only show the parts related to the present application, while the parts unrelated to the present application are not shown in the drawings.
[0046] It can be understood that each unit and module involved in the embodiments of the present application may correspond to only one physical structure, or may be composed of multiple physical structures, or multiple units and modules may be integrated into one physical structure.
[0047] It can be understood that the terms "first", "second", etc. in the embodiments of the present application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.
[0048] It is understandable that, in the absence of conflict, the functions and steps marked in the flowcharts and block diagrams of the present application may occur in an order different from that marked in the drawings.
[0049] It is understood that the flowcharts and block diagrams of the present application illustrate the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to the various embodiments of the present application. Among them, each box in the flowchart or block diagram may represent a unit, module, program segment, code, which contains executable instructions for implementing the specified functions. Moreover, each box or combination of boxes in the block diagram and flowchart may be implemented by a hardware-based system that implements the specified functions, or by a combination of hardware and computer instructions.
[0050] It can be understood that the units and modules involved in the embodiments of the present application can be implemented by software or hardware, for example, the units and modules can be located in a processor.
[0051] The current SIM card encryption technology is mainly developed and studied from the aspects of software and hardware:
[0052] At the software encryption level, the national secret algorithm is introduced to achieve high security and self-controllable encryption technology. However, since only the algorithm is introduced alone, the absolute physical isolation between the encryption module and the SIM card data module is not achieved. Once the attacker breaks through the encryption module, it is also easy to obtain the private data of the SIM card. Quantum keys use the special properties of quantum mechanics, such as the non-cloning, randomness and fidelity of quantum states, to provide higher security than traditional encryption methods. However, the technology is not yet mature, and the R&D and production costs of quantum encryption equipment are high, which may limit its popularization speed in large-scale applications.
[0053] At the hardware encryption level, hardware encryption devices usually require special encryption chips or modules, as well as corresponding production, initialization, logistics, installation and maintenance costs. This makes hardware encryption have certain disadvantages in terms of cost compared to software encryption.
[0054] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0055] In order to make up for the limitations of the prior art, this application designs a method for realizing physical isolation of encrypted SIM cards based on the SM4 national secret algorithm. The core components of this method include a SIM chip, a communication interface, a communication bus, and a security encryption module chip with integrated key information. This security module is not only responsible for processing key processes such as user identity authentication and digital mobile payment, but also undertakes the encryption, decryption, transmission and storage of sensitive privacy data. The SIM chip and the security encryption module are closely connected through a communication bus to ensure efficient data transmission.
[0056] In addition, in terms of operating mechanism, the SIM chip exchanges data with external devices through its communication interface, and standard SIM application data is directly stored in the built-in memory. When encountering scenarios that require extended cryptographic application processing, such as user identity authentication or file encryption and decryption requests, the SIM chip forwards these requests to the security encryption module for processing, and then receives the processing results to continue the subsequent process.
[0057] This application revolves around the interaction between the SIM chip and the security encryption module:
[0058] The SIM chip first receives data through the communication interface and intelligently determines whether the data requires user identity verification or decryption processing. For identity verification requirements, the data is sent to the security encryption module for verification and then returned; for decryption requirements, the decryption operation is performed first and then feedback is given.
[0059] At the same time, this application also supports the active acquisition and transmission of user identity information, as well as the dynamic update process of key information:
[0060] After the SIM chip receives the acquisition instruction, it securely transmits the user identity information through the security encryption module; when receiving the key modification information, it first performs verification, and if the verification passes, the stored key is updated.
[0061] In addition, for data acquisition requests, the security encryption module will first encrypt the target data, and then the SIM chip will securely send it to the recipient through the communication interface.
[0062] Figure 1 A schematic diagram of an encrypted SIM card implementation device provided in an embodiment of the present application, such as Figure 1 As shown, the present application provides an encrypted SIM card implementation device, the device comprising: a SIM card chip, a security encryption chip, a communication bus and a communication interface;
[0063] The SIM card chip is communicatively connected to the security encryption chip via a communication bus. For example, the SIM card chip and the security encryption chip are connected via a data bus BUS1. BUS1 includes but is not limited to SPI, IIC, UART, GPIO, etc., so that the storage areas inside the two chips are physically isolated.
[0064] The SIM card chip is connected to the external device through a communication interface. For example, the communication interface adopts a 7816 interface.
[0065] Wherein, when the SIM card chip receives the extended password application data from the external device, it sends the extended password application data to the security encryption chip;
[0066] The security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, and sends the data processing result to the SIM card chip for subsequent processing.
[0067] The present application divides the SIM card module into two modules: a SIM card chip and a security encryption chip. Each module corresponds to a chip. The chips are connected and communicated through a data bus. The SIM card chip is mainly responsible for some standardized application data interaction and data storage.
[0068] This application realizes the absolute physical isolation of SIM card data and security encryption module, which can not only solve the problem of insufficient storage space of traditional SIM card chip, but also significantly improve the security functionality of SIM card application data interaction. The SIM card chip inside the device can control the data interaction between SIM card application data and the outside, and the security encryption module chip can be used to process user identity authentication, digital mobile payment, and encryption, decryption, transmission and storage of sensitive privacy data.
[0069] The security encryption module of this application is based on the SM4 national secret algorithm. The SM4 algorithm has the advantages of simple algorithm structure, easy implementation, fast encryption and decryption speed, and high security. It has quickly gained recognition in the industry and is widely used in data encryption storage and information communication and other fields.
[0070] Among them, the SM4 algorithm is a symmetric block encryption and decryption algorithm, and its main body adopts an unbalanced Feistel network. The plaintext and key input of this algorithm are both 128 bits. The main structure can be divided into a round key expansion algorithm and an encryption and decryption algorithm. Both algorithms adopt a nonlinear iterative structure and require 32 rounds of iteration to generate the final data. The SM4 encryption algorithm is almost exactly the same as the decryption algorithm. The only difference is that the order of inputting round keys is reversed. The order of round keys used in the encryption algorithm is the same as the order of round key expansion, while the order of keys used in the decryption algorithm is opposite to the order of round key expansion. After inputting the key information, after the system parameter XOR, it is sent to function F', the output data is recombined with the first 96 bits of data and sent to function F' again, and 32 rounds of round key data can be obtained by repeated iterations of 32 rounds. The encryption module sends the input data and round key data to function F together, and similarly recombines the obtained 32-bit data with the first 96 bits of data and sends it back to function F for 32 iterations. Finally, a reverse operation is performed to obtain the final ciphertext data.
[0071] This application also further optimizes the encryption efficiency of the SM4 national encryption algorithm, and adopts the SM4 encryption and decryption algorithm based on the mapreduce model, including five stages: input, split, map, reduce and output. Input and output are responsible for processing the input and output of large data files, split is used to implement the sharding operation of large data files, the map function encrypts each shard in parallel, and the reduce function is used to merge the encrypted data block slices.
[0072] In some embodiments, when there is a file encryption request in the data processing, the security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, specifically including:
[0073] Input stage: Get the data file to be encrypted;
[0074] Split stage: read the data file to be encrypted through the sharding algorithm, divide it into blocks according to the preset unit size, and obtain the key-value pairs corresponding to each file data block;
[0075] Map parallel encryption stage: the SM4 algorithm is used to encrypt the key-value pairs of each file data block through the map function to obtain the data block key-value pairs of the encryption function;
[0076] Reduction and merging phase: merge the key-value pairs of all encryption functions to obtain the key-value pairs of ciphertext data blocks;
[0077] Output stage: Output and store the key-value pairs of the ciphertext data blocks.
[0078] In some embodiments, the data file to be encrypted is read by a slicing algorithm, and is processed into blocks according to a preset unit size to obtain N file data blocks, where N is an integer greater than or equal to 2;
[0079] Among all the file data blocks, the data size of the first N-1 file data blocks is the preset unit size, and the Nth file data block is the remaining data of the data file to be encrypted after removing the first N-1 file data blocks.
[0080] Specifically, the detailed steps of the encryption algorithm design of this application are as follows:
[0081] (1) In the input stage, the large data file to be encrypted is uploaded from the local computer to HDFS.
[0082] (2) In the Split stage, the sharding algorithm is used to read the big data file on HDFS and divide the input big data file into 1kB blocks. The big data file is divided into four unit blocks, where the size of the first N-1 blocks is 1kB, and the last block is the remaining part. The return value of the sharding algorithm is four key-value pairs (keys, values) (i = 1, 2, ..., IV).
[0083] (3) Map parallel encryption phase
[0084] The map function can implement the SM4 algorithm encryption operation on each shard data. The output can be stored in the local disk as an intermediate result. The input of the map encryption function is the output value of the shard function. The output of the map encryption function is the data block key-value pair (key, value) of the encryption function (i=1,2,3,4,5..N).
[0085] The algorithm steps of the map encryption function are as follows:
[0086] First, call the key-value pair data after split processing
[0087] Then, the SM4 algorithm is integrated: the encryption and decryption algorithms and the key expansion algorithms all use nonlinear iterative structures, and both require 32 rounds of iterations to generate the final data. The SM4 encryption algorithm is almost identical to the decryption algorithm, with the only difference being that the order of input round keys is in reverse order. The order of round keys used by the encryption algorithm is the same as the order of round key expansion, while the order of keys used by the decryption algorithm is opposite to the order of round key expansion.
[0088] Figure 2 An example diagram of the SM4 encryption and decryption algorithm based on the mapreduce model provided in the embodiment of the present application is as follows: Figure 2 As shown in the figure, when a block of 128-bit plaintext data is input, it can be split into 4 data blocks x0, x1, x2, x3, each of which is 32 bits in size. When i=0, the first round of transformation is performed, and it continues until i=31. i No processing is done for now. i+1 , x i+2 , x i+3 and round key rk i XOR gets a 32-bit data as the input of the box transformation, that is, The symbol represents the exclusive-or operation. The input of the box transform is split into four 8-bit data, and the box transform is performed separately. Then the four 8-bit outputs are combined into a 32-bit box transform output. The box transform output just obtained is circularly shifted left by 2, 10, 18, and 24 bits respectively to obtain four 32-bit results. The shift results are recorded as y2, y 10 ,y 18 ,y 24 , the shifted result y2,y 10 ,y 18 ,y 24 With the box transform output sbox_output and x i XOR, get x i+4 ,Right now:
[0089]
[0090] So far, one round of encryption and decryption operations has been completed. In the actual encryption and decryption process, the above operations need to be performed 32 times, using 32 different rx i , rx i Generated by key expansion.
[0091] (4) Reduce and merge operations
[0092] Finally, the last 4 32-bit data X will be generated 35 , X 34 , X 33 , X 32 , merged into a 128-bit data output as the final output.
[0093] In the Reduce phase, the input value of the Reduce function is the output value (key, value) of the Map function. After the output is sorted, merged, and combined, the key-value pair of the ciphertext data block is (i=1,2,…,Ⅳ)。
[0094] (5) In the output stage, the merged ciphertext data blocks are stored in HDFS in the form of large data files.
[0095] In some embodiments, the present application also includes a key expansion algorithm. The key expansion process is similar to the encryption and decryption principle, as follows:
[0096]
[0097] Enter the round key rk i When i=0, it is the first round of transformation, which continues until i=31. i No processing is done for now. i+1 ,ki+2 ,k i+3 Fixed parameter Ck i XOR gets a 32-bit data as the input of the box transform, that is:
[0098]
[0099] Split sbox_input into 4 8-bit data, perform box transform on each of them, and then merge the 4 8-bit outputs into a 32-bit sbox_input. Circularly shift the sbox_input just obtained by 12 and 23 bits to the left to obtain two 32-bit results. The shift result is recorded as y 12 ,y 23 . The shift result y 12 ,y 23 With the box transform output sbox_input and k i XOR, get k i+4 ,Right now:
[0100]
[0101] So far, one round of encryption and decryption operations has been completed. In the actual encryption and decryption process, the above operations need to be performed 32 times, using 32 different Ck i , Ck i is a fixed parameter. After 32 rounds, 32 rks for encryption and decryption can be obtained. i .
[0102] In some embodiments, when there is a need for user identity authentication in data processing, the security encryption chip performs user identity authentication based on the extended password application data, and sends the authentication processing result to the SIM card chip for subsequent processing.
[0103] In some embodiments, when encryption and decryption are required for data processing, the security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, and sends the data processing results to the SIM card chip for subsequent processing.
[0104] In this application, the encapsulated cryptographic security chip serves as an extended cryptographic application module, mainly providing users with functions such as identity authentication, mobile payment, information encryption transmission and storage on mobile terminals.
[0105] The present application provides an encrypted SIM card implementation device, which overcomes the problem of limited storage space of traditional SIM chips through physical isolation of SIM card data and security encryption functions, and provides exclusive cryptographic processing and protection barriers for extended applications with high security requirements such as user identity authentication, mobile payment and encrypted transmission of sensitive information.
[0106] In addition, this application has further optimized the SM4 national encryption algorithm, and adopted the SM4 encryption and decryption algorithm based on the mapreduce model, which includes five stages: input, split, Map, Reduce, and output. Input and output are responsible for processing the input and output of large data files, split is used to implement the sharding operation of large data files, the map function encrypts each shard in parallel, and the Reduce function is used to merge the encrypted data block slices, which improves the computational efficiency of the encryption algorithm and improves the security performance of the SIM card.
[0107] Based on the encrypted SIM card implementation devices of the above embodiments, the present application provides an encrypted SIM card implementation method.
[0108] Figure 3 A schematic diagram of a method for implementing an encrypted SIM card provided in an embodiment of the present application, such as Figure 3 As shown, the method includes:
[0109] S1. When the SIM card chip receives the extended password application data from the external device, the extended password application data is sent to the security encryption chip;
[0110] S2. The security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, and sends the data processing result to the SIM card chip for subsequent processing.
[0111] In some embodiments, when there is a file encryption request in the data processing, the security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, specifically including:
[0112] Input stage: Get the data file to be encrypted;
[0113] Split stage: read the data file to be encrypted through the sharding algorithm, divide it into blocks according to the preset unit size, and obtain the key-value pairs corresponding to each file data block;
[0114] Map parallel encryption stage: the SM4 algorithm is used to encrypt the key-value pairs of each file data block through the map function to obtain the data block key-value pairs of the encryption function;
[0115] Reduction and merging phase: merge the key-value pairs of all encryption functions to obtain the key-value pairs of ciphertext data blocks;
[0116] Output stage: Output and store the key-value pairs of the ciphertext data blocks.
[0117] In some embodiments, the data file to be encrypted is read by a slicing algorithm, and is processed into blocks according to a preset unit size to obtain N file data blocks, where N is an integer greater than or equal to 2;
[0118] Among all the file data blocks, the data size of the first N-1 file data blocks is the preset unit size, and the Nth file data block is the remaining data of the data file to be encrypted after removing the first N-1 file data blocks.
[0119] In some embodiments, when there is a user identity authentication requirement in data processing, the security encryption chip performs user identity authentication based on the extended password application data, and sends the authentication processing result to the SIM card chip for subsequent processing;
[0120] When encryption and decryption are required for data processing, the security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, and sends the data processing results to the SIM card chip for subsequent processing.
[0121] The present application provides a method for implementing an encrypted SIM card. By physically isolating the SIM card data from the security encryption function, it not only overcomes the problem of limited storage space of traditional SIM chips, but also provides exclusive cryptographic processing and protection barriers for extended applications with high security requirements such as user identity authentication, mobile payment, and encrypted transmission of sensitive information.
[0122] In addition, this application has further optimized the SM4 national encryption algorithm, and adopted the SM4 encryption and decryption algorithm based on the mapreduce model, which includes five stages: input, split, Map, Reduce, and output. Input and output are responsible for processing the input and output of large data files, split is used to implement the sharding operation of large data files, the map function encrypts each shard in parallel, and the Reduce function is used to merge the encrypted data block slices, which improves the computational efficiency of the encryption algorithm and improves the security performance of the SIM card.
[0123] It should be understood that, although the various steps in the flowcharts in the above-described embodiments are sequentially displayed according to the indications of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and they can be executed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily to be carried out sequentially, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0124] Figure 4 A schematic diagram of a terminal device provided in an embodiment of the present application, such as Figure 4 As shown, in some embodiments, the present application provides a terminal device, which includes the encrypted SIM card implementation device of the above embodiments.
[0125] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present application, but the present application is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of the present application, and these modifications and improvements are also considered to be within the scope of protection of the present application.
Claims
1. A device for implementing an encrypted SIM card, characterized in that: The device comprises: a SIM card chip, a security encryption chip, a communication bus and a communication interface; The SIM card chip is connected to the security encryption chip through a communication bus; The SIM card chip is connected to the external device through a communication interface; Wherein, when the SIM card chip receives the extended password application data from the external device, it sends the extended password application data to the security encryption chip; The security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, and sends the data processing result to the SIM card chip for subsequent processing.
2. The encrypted SIM card implementation device according to claim 1, characterized in that: When there is a file encryption request in the data processing, the security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, specifically including: Input stage: Get the data file to be encrypted; Split stage: read the data file to be encrypted through the sharding algorithm, divide it into blocks according to the preset unit size, and obtain the key-value pairs corresponding to each file data block; Map parallel encryption stage: the SM4 algorithm is used to encrypt the key-value pairs of each file data block through the map function to obtain the data block key-value pairs of the encryption function; Reduction and merging phase: merge the key-value pairs of all encryption functions to obtain the key-value pairs of ciphertext data blocks; Output stage: Output and store the key-value pairs of the ciphertext data blocks.
3. The encrypted SIM card implementation device according to claim 2, characterized in that: The data file to be encrypted is read by a sharding algorithm, and is divided into blocks according to a preset unit size to obtain N file data blocks, where N is an integer greater than or equal to 2; Among all the file data blocks, the data size of the first N-1 file data blocks is the preset unit size, and the Nth file data block is the remaining data of the data file to be encrypted after removing the first N-1 file data blocks.
4. The encrypted SIM card implementation device according to claim 1, characterized in that: When there is a user identity authentication requirement in data processing, the security encryption chip performs user identity authentication based on the extended password application data, and sends the authentication processing result to the SIM card chip for subsequent processing.
5. The encrypted SIM card implementation device according to claim 1, characterized in that: When encryption and decryption are required for data processing, the security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, and sends the data processing results to the SIM card chip for subsequent processing.
6. A method for implementing an encrypted SIM card, characterized in that: The method comprises: When the SIM card chip receives the extended password application data from the external device, it sends the extended password application data to the security encryption chip; The security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, and sends the data processing result to the SIM card chip for subsequent processing.
7. The method for implementing an encrypted SIM card according to claim 6, characterized in that: When there is a file encryption request in the data processing, the security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, specifically including: Input stage: Get the data file to be encrypted; Split stage: read the data file to be encrypted through the sharding algorithm, divide it into blocks according to the preset unit size, and obtain the key-value pairs corresponding to each file data block; Map parallel encryption stage: the SM4 algorithm is used to encrypt the key-value pairs of each file data block through the map function to obtain the data block key-value pairs of the encryption function; Reduction and merging phase: merge the key-value pairs of all encryption functions to obtain the key-value pairs of ciphertext data blocks; Output stage: Output and store the key-value pairs of the ciphertext data blocks.
8. The method for implementing an encrypted SIM card according to claim 7, characterized in that: The data file to be encrypted is read by a sharding algorithm, and is divided into blocks according to a preset unit size to obtain N file data blocks, where N is an integer greater than or equal to 2; Among all the file data blocks, the data size of the first N-1 file data blocks is the preset unit size, and the Nth file data block is the remaining data of the data file to be encrypted after removing the first N-1 file data blocks.
9. The method for implementing an encrypted SIM card according to claim 6, characterized in that: When there is a user identity authentication requirement in data processing, the security encryption chip performs user identity authentication based on the extended password application data, and sends the authentication processing result to the SIM card chip for subsequent processing; When encryption and decryption are required for data processing, the security encryption chip uses the SM4 encryption and decryption algorithm based on the mapreduce model to process the extended password application data, and sends the data processing results to the SIM card chip for subsequent processing.
10. A terminal device, characterized in that: The terminal device comprises the encrypted SIM card implementation device as described in any one of claims 1-5.