Data processing method and device based on SIM card, electronic equipment and storage medium
By using the encryption mechanism of the SIM card and password management platform in the terminal device, the problem of low data storage security in the terminal device is solved, efficient encrypted storage of data is achieved, and data leakage is prevented.
Patent Information
- Application Number
- CN202410983800.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-10-08
AI Technical Summary
The security of data storage in terminal devices is low, and illegal applications or holders can easily obtain data, leading to the risk of data leakage.
Using a SIM card-based data processing method, the first key information in the SIM card is obtained, sent to the password management platform to encrypt the second key, and the encrypted key is fed back to the terminal device, and the key is used to encrypt the pending key. Store the data and ensure that the data is stored in ciphertext.
It improves the security of data storage, prevents illegal acquisition and leakage, reduces the risk of data theft after the terminal device is lost, and enhances the data protection mechanism.
Smart Images

Figure CN118748796A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication technology, and in particular relates to a data processing method, device, electronic equipment and storage medium based on a SIM card. Background Art
[0002] After acquiring data such as pictures, videos, audio, and files, the application software (Application, App) in the terminal device can store these data in the terminal device for access by other application software.
[0003] In the related art, data acquired by application software is stored in plain text in the storage space of the terminal device, and other application software directly calls these data from the storage space.
[0004] However, this data storage method has the risk of data leakage. For example, illegal applications can easily obtain data, and illegal holders of terminal devices can directly export data from the storage space. The data storage security in the terminal device is low. Summary of the invention
[0005] The present invention provides a data processing method, device, electronic device and storage medium based on a SIM card, so as to solve the technical problem of low data storage security in a terminal device in the related art.
[0006] In a first aspect, the present invention provides a data processing method based on a SIM card, the method being applied to a terminal device, the method comprising:
[0007] In response to receiving the data storage request, obtaining data to be stored;
[0008] Acquire first key information from the SIM card, and send the first key information to the password management platform, so that the password management platform encrypts the second key according to the first key information to obtain a first data encryption key, and feeds the first data encryption key back to the terminal device;
[0009] decrypting the first data encryption key based on the first key information to obtain a second key;
[0010] The data to be stored is encrypted using the second key to obtain the encrypted data and store it.
[0011] In a second aspect, the present invention provides a data processing device based on a SIM card, the device is applied to a terminal device, and the method includes:
[0012] A first acquisition module, configured to acquire data to be stored in response to receiving a data storage request;
[0013] A first sending module, configured to obtain first key information from the SIM card, and send the first key information to a password management platform, so that the password management platform encrypts a second key according to the first key information to obtain a first data encryption key, and feeds the first data encryption key back to the terminal device;
[0014] A second acquisition module, configured to decrypt the first data encryption key based on the first key information to obtain a second key;
[0015] The encryption storage module is used to encrypt the data to be stored using the second key to obtain the encrypted data and store it.
[0016] In a third aspect, the present invention provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned SIM card-based data processing method when executing the program.
[0017] In a fourth aspect, the present invention provides a readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the above-mentioned SIM card-based data processing method.
[0018] In the embodiment of the present invention, the first key information is stored in the SIM card, and the user does not need to replace the customized interrupt device. The method of the present embodiment can be implemented by using the SIM card filled with the first key corresponding to the first key information, thereby reducing the hardware cost for implementing the present embodiment. The second key in the password management platform of a third party is used to encrypt the data to be stored, instead of using the key stored in the terminal device to encrypt the data to be stored, so as to avoid the problem that after the terminal device is lost, an illegal user steals the key from the terminal device to decrypt the encrypted data, resulting in data leakage. The password management platform encrypts the second key by the first key information, and feeds back the encrypted first data encryption key to the terminal device, so that the second key is transmitted between the terminal device and the password management platform in the form of ciphertext, thereby improving the security of the key for encrypting the data to be stored, and further improving the security of the encrypted data to be stored. The present embodiment realizes the storage of the data to be stored in the form of ciphertext, improves the storage security of the data to be stored, and solves the problem of low data storage security caused by storing data in plaintext in the related art. The problem of low data storage security in the process of users using application software in terminal devices (such as mobile phones) is solved, and the security of data stored locally in terminal devices is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 is a flow chart of the steps of a data processing method based on a SIM card provided by an embodiment of the present invention;
[0021] Figure 2 is a flowchart of specific steps of another SIM card-based data processing method provided by an embodiment of the present invention;
[0022] Figure 3 is a structural block diagram of a SIM card-based data processing system provided by an embodiment of the present invention;
[0023] Figure 4 This is a block diagram of the connection structure between a quantum cryptography management platform and a SIM card quantum security chip provided by an embodiment of the present invention;
[0024] Figure 5 is a flowchart of specific steps of another SIM card-based data processing method provided by an embodiment of the present invention;
[0025] Figure 6 is a structural block diagram of a SIM card-based data processing device provided by an embodiment of the present invention;
[0026] Figure 7 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] Some nouns or terms appearing in this application are subject to the following interpretations:
[0029] The Subscriber Identity Module (SIM) card is equipped with a secure storage chip, which stores the quantum key pre-filled by the password management platform and the encrypted identity information. The middleware App obtains the quantum key to encrypt and decrypt the data to be stored, and authenticates the user identity based on the encrypted identity information.
[0030] Android Interface Definition Language (AIDL), the middleware SDK interacts with the access application through AIDL anonymous sharing.
[0031] The middleware software development kit (SDK) is used to provide the function of encrypting and storing the data to be stored in the middleware App to the access application in the form of an interface through the AIDL anonymous shared memory method.
[0032] Open Mobile Alliance (Object Management Architecture, OMA) protocol, a communication protocol for data exchange between middleware apps and the secure storage medium of SIM cards.
[0033] Inter-Process Communication (IPC) is the way the middleware SDK calls the middleware App.
[0034] Application Protocol Data Unit (APDU) instructions are the communication protocol used by smart cards SIM cards and card readers to communicate. They can be used to perform specific operations on SIM cards, such as reading data, writing data, and verifying identity.
[0035] Figure 1 FIG. 1 is a flow chart of a method for processing data based on a SIM card provided by an embodiment of the present invention. Figure 1 As shown, the method may include:
[0036] Step 101: In response to receiving a data storage request, obtain data to be stored.
[0037] The method of this implementation is applied to a terminal device, which may be a mobile phone, a tablet computer with a SIM card installed, or other terminal devices that can install a SIM card. The data to be stored may be text, video, audio, or other data.
[0038] For example, the terminal device is installed with a second application, and the second application responds to a data storage request sent by the first application to obtain the data to be stored.
[0039] Furthermore, the first application is an access application that needs to store the data to be stored in the terminal device in a ciphertext form, and the second application is a middleware App for storing the data to be stored after encryption. For example, the access application transfers the data to be stored to the middleware App by calling the file encryption storage interface of the middleware SDK.
[0040] Step 102, obtain the first key information from the SIM card, and send the first key information to the password management platform, so that the password management platform encrypts the second key according to the first key information to obtain the first data encryption key, and feeds back the first data encryption key to the terminal device.
[0041] For example, the password management platform uses a symmetric encryption algorithm to encrypt the second key using the first key information to obtain a first data encryption key.
[0042] The SIM card stores a first key pre-filled by a password management platform. The first key has first key information. The first key information may include a first key identifier. The first key may be a quantum key. The first key may be stored in a secure storage chip of the SIM.
[0043] Furthermore, when the password management platform charges the SIM card with the first key, it also stores the first key locally on the password management platform. Through the second application installed in the terminal device, the key identifier in the first key information is obtained from the SIM card, and the key identifier is sent to the password management platform. The password management platform obtains the key data of the first key corresponding to the key identifier from the locally stored keys, encrypts the second key with the key data, obtains the first data encryption key, and feeds the first data encryption key back to the second application installed in the terminal device.
[0044] The second application is an application that can access the first application and encrypt and store the data to be stored through the first application. The second application can be a chat application, an audio and video processing application, a picture acquisition application or other application. This application does not limit the type of the second application.
[0045] Step 103: decrypt the first data encryption key based on the first key information to obtain a second key.
[0046] The first key information includes key data and a key identifier of the first key. The second key is obtained by obtaining the key data in the first key information and using the key data to decrypt the encryption key of the first data.
[0047] For example, the password management platform uses the first key information to encrypt the second key to obtain a symmetric encryption algorithm for the first data encryption key, and uses the symmetric encryption algorithm to decrypt the first data encryption key using the first key information to obtain the second key.
[0048] Step 104: Use the second key to encrypt the data to be stored, obtain the encrypted data, and store it.
[0049] The data to be stored is encrypted using the second key. After the encrypted data is obtained, the encrypted data can be stored in a system sandbox of the terminal device operating system (eg, Android system).
[0050] In the related art, after obtaining data such as pictures, videos, audio, and files, mobile apps of terminal devices such as mobile phones store the data in plain text in the storage space of the terminal device (e.g., disk). Any software can access the data in the storage space, which may cause the data to be stolen by illegal applications. In addition, after the terminal device is lost, the data in the storage space may be easily obtained by others. The data storage method in the related art has the problem of low data storage security.
[0051] In the embodiment of the present application, after obtaining the data to be stored, the first key information is obtained from the SIM card, and the first key information is stored in the SIM card. The user does not need to replace the customized interrupt device, and only needs to use the SIM charged with the first key corresponding to the first key information to implement the method of this embodiment, which reduces the hardware cost for implementing this embodiment. The first key information is sent to the password management platform, and the password management platform uses the first key information to encrypt the second key to obtain the first data encryption key, and the first data encryption key is fed back to the terminal device. The terminal device decrypts the first data encryption key based on the first key information, obtains the second key and encrypts the data to be stored, obtains the encrypted data and stores it. The second key in the third-party password management platform is used to encrypt the data to be stored, instead of using the key stored in the terminal device to encrypt the data to be stored, so as to avoid the problem of illegal users stealing the key from the terminal device to decrypt the encrypted data after the terminal device is lost, resulting in data leakage. The password management platform encrypts the second key through the first key information, and feeds back the encrypted first data encryption key to the terminal device, so that the second key is transmitted between the terminal device and the password management platform in ciphertext form, which improves the security of the key for encrypting the data to be stored, thereby improving the security of the encrypted data to be stored.
[0052] This embodiment realizes the storage of the data to be stored in ciphertext form, improves the storage security of the data to be stored, and solves the problem of low data storage security caused by storing data in plaintext form in the related art. It solves the problem of low data storage security when users use application software in terminal devices (such as mobile phones), and improves the security of data stored locally in terminal devices.
[0053] Figure 2 Another SIM card-based data processing method provided in the present application is referred to as Figure 2 , the method may include the following steps:
[0054] Step 201: The second application responds to a data storage request sent by the first application to obtain the data to be stored that is sent by the first application to the second application in an anonymous shared memory manner.
[0055] For example, the first application is an access application, and the second application is a middleware App installed in the terminal device for data management based on the first key information stored in the SIM card. The access application can call the file encryption storage interface of the middleware SDK to pass the data to be stored to the second application in the form of anonymous shared memory.
[0056] Sub-step 2011, in response to a data storage request sent by a first application, obtaining first token information carried in the data storage request.
[0057] The second application installed in the terminal device responds to the data storage request sent by the first application and obtains the first token information carried in the data storage request.
[0058] For example, the first application is the access application, and the second application is the middleware App. The access application accesses the interface SDK of the middleware App, and configures the application authentication AppKey provided by the official platform for accessing the middleware App, sends the AppKey to the middleware App, obtains the first token information fed back by the second application, and then sends the first token information to the middleware App.
[0059] Sub-step 2012: If it is determined based on the first token information that the first application has the authority to store the data to be stored, then the data to be stored indicated by the data storage request is obtained.
[0060] For example, the first token information is compared with the token information with the permission to store data stored by the second application of the terminal device. If the first token information is the same as any of the stored token information, it is determined that the first application has the permission to store the data to be stored. If the first token information is different from all the stored token information, it is determined that the first application does not have the permission to store the data to be stored.
[0061] If the first token information determines that the first application has the authority to store the data to be stored, the data to be stored indicated by the data storage request is received. If the first token information determines that the first application does not have the authority to store the data to be stored, the data to be stored indicated by the data storage request is rejected.
[0062] Step 202: Obtain first key information from the quantum key information stored in the secure storage chip of the SIM card.
[0063] The quantum key information stored in the secure storage chip is stored through the cryptographic management platform, and the cryptographic management platform stores the quantum key information.
[0064] Specifically, the password management platform randomly generates multiple quantum keys, injects the multiple quantum keys into the secure storage chip of the SIM card, and stores the quantum keys injected into the secure storage chip of the SIM card locally on the password management platform.
[0065] For example, the first key information includes a key identifier of the first key; correspondingly, after step 204, it also includes:
[0066] Step 203: Send the key identifier of the first key to the password management platform, so that the password management platform can obtain the first key corresponding to the key identifier from the stored quantum key information, and use the first key to encrypt the randomly generated second key to obtain the first data encryption key, and feed back the first data encryption key to the terminal device.
[0067] For example, the password management platform includes a quantum random number generator, a quantum exchange key machine, and a quantum key filling machine. The quantum random number generator generates a quantum key, stores the quantum key in the quantum exchange key machine, and stores the quantum key in the SIM card through the quantum key filling machine. Among them, the first key has a key identifier. Therefore, the password management platform and the SIM card both store the first key. After the password management platform obtains the key identifier of the first key, it obtains the second key corresponding to the key identifier from the locally stored keys, and uses the first key to encrypt the randomly generated second key to obtain the first data encryption key.
[0068] Step 204: decrypt the first data encryption key based on the first key information to obtain a second key.
[0069] The method of this step has been described in the aforementioned step 103 and will not be repeated here.
[0070] Step 205: Use the second key to encrypt the data to be stored, obtain the encrypted data and store it.
[0071] In this embodiment, in response to the data storage request sent by the first application, the first token information carried in the data storage request is obtained, the first application is authorized to confirm the first token information, and after the confirmation is passed, the data to be stored sent by the first application in an anonymous sharing manner is obtained. Through the permission confirmation, it is possible to prevent illegal applications from accessing the second application storage data, and the data to be stored is sent in an anonymous sharing manner, thereby improving the data transmission rate.
[0072] The first key information is a quantum key stored in the SIM card security storage chip. Storing the first key in the SIM card security storage chip can protect the first key from being easily leaked, thereby improving the security of the first key. Sending the key identifier of the first key to the password management platform instead of directly sending the key data of the first key to the password management platform can prevent key data leakage.
[0073] The password management platform uses the first key corresponding to the key identifier to encrypt the second key to obtain the first data encryption key. Because the second key is randomly generated, the first data encryption key is fed back to the terminal device. After the terminal device decrypts the first data encryption key to obtain the second key, it uses the second key to encrypt the data to be stored, which can ensure that different data to be stored are encrypted and stored using different second keys, realizing the "one-time one-key" encrypted storage of the data to be stored. Compared with the method in which the second key is a fixed key, using the randomly generated second key to obtain the first data encryption key can avoid the leakage of the second key, which leads to the problem of reduced security of the data to be stored.
[0074] The password management platform transmits the first data key after encrypting the second key, rather than directly transmitting the second key. The key is transmitted in ciphertext form throughout its entire life cycle, which can prevent the second key used to encrypt the data to be stored from being leaked, thereby improving the security of key transmission and the storage security of the data to be stored.
[0075] In one embodiment, after step 205, the method further includes:
[0076] Step 206: Respond to the data read request sent by the third application and obtain user identity information.
[0077] For example, the third application is an access program, and the third application may be the same as the first application or may be different.
[0078] For example, the first application is an image acquisition application, and the third application is a chat application; for another example, the first application and the third application are both chat applications.
[0079] For example, step 206 may include the following sub-steps:
[0080] Sub-step 2061, in response to a data read request sent by a third application, obtaining, through a second application, second token information carried in the data read request.
[0081] For example, the third application is the access application, and the second application is the middleware APP. The access application accesses the interface SDK of the middleware App, and configures the application authentication AppKey provided by the official platform for accessing the middleware App, sends the AppKey to the middleware App, obtains the first token information fed back by the middleware APP, and then sends the first token information to the middleware App.
[0082] Sub-step 2062: If it is determined based on the second token information that the third application has the authority to read the data to be stored, the step of obtaining the user identity information is executed.
[0083] For example, the second token information is compared with the token information with the permission to store data stored by the second application of the terminal device. If the first token information is the same as the locally stored token information, it is determined that the third application has the permission to store the data to be stored. If the second token information is not the same as the locally stored token information, it is determined that the third application does not have the permission to store the data to be stored.
[0084] If it is determined according to the second token information that the third application has the authority to store the data to be stored, the step of obtaining the user identity information is performed. If it is determined according to the second token information that the third application does not have the authority to store the data to be stored, the step of obtaining the user identity information is refused, and the subsequent data reading operation is not performed.
[0085] For example, step 206 may include the following sub-steps:
[0086] Sub-step 2063: displaying a user information input interface in response to the data read request sent by the third application.
[0087] For example, the user identity information may include a password, a gesture, a fingerprint, a facial information, or other information that can identify the user.
[0088] Correspondingly, the user information input interface may include a control for inputting a password, an interface for receiving user gesture information, and an interface for collecting user fingerprint or face information.
[0089] Sub-step 2064, in response to the user's input operation on the user information input interface, obtaining the user identity information.
[0090] For example, if the user information is a password, then after displaying a user information input interface for the user to input the password, the user inputs the password in the user information input interface, and then the password information input by the user is received.
[0091] For example, after sub-step 2064, the following steps may also be included:
[0092] Sub-step 2065, obtain the fourth key information from the key stored in the SIM card, and send the fourth key information to the password management platform, so that the password management platform uses the fourth key information to encrypt the fifth key to obtain the identity encryption key, and feeds back the identity encryption key to the terminal device.
[0093] For example, the fourth key information is obtained from the quantum key information stored in the secure storage chip of the SIM card. The fourth key information is information about the fourth key, and may include key data and a key identifier of the fourth key.
[0094] For example, a quantum key can be randomly selected from the quantum keys stored in the secure storage chip of the SIM card as the fourth key, and the key information can be used as the fourth key information.
[0095] The password management platform obtains the fourth key corresponding to the key identifier of the fourth key from the locally stored quantum key according to the key identifier of the fourth key, and uses the key data of the fourth key to encrypt the fifth key to obtain the identity encryption key.
[0096] Sub-step 2066, decrypt the identity encryption key based on the fourth key information to obtain the fifth key.
[0097] Obtain an encryption algorithm for the password management platform to obtain an identity encryption key by encrypting the fifth key through the fourth key information, and based on the encryption algorithm, use the fourth key information to decrypt the identity encryption key to obtain the fifth key.
[0098] Sub-step 2067, using the fifth key to encrypt the user identity information to obtain the target encrypted identity information.
[0099] For example, the user identity information is encrypted using a fifth encryption key through a symmetric encryption algorithm to obtain target encrypted identity information.
[0100] Sub-step 2068, authenticating the user identity information based on the pre-stored encrypted identity information and the target encrypted identity information.
[0101] If the target encrypted identity information is the same as any pre-stored encrypted identity information, it is determined that the user identity information authentication is successful; if the target encrypted identity information is different from all pre-stored encrypted identity information, it is determined that the user identity information authentication is unsuccessful.
[0102] For example, before sub-step 2065, the method further includes:
[0103] The identity information of the legitimate user is collected through the second application of the terminal device, the quantum key and the SIM card identification are obtained from the SIM card security chip, and the quantum key is sent to the password management platform. The password management platform generates a random number and stores the correspondence between the random number and the SIM card identification. The random number is encrypted using the quantum key to obtain the encryption key and fed back to the second application. The second application uses the quantum key to decrypt the encryption key to obtain the random number, and the random number is used to encrypt the identity information. The encrypted identity information is obtained and sent to the SIM card for storage by the SIM card. The encrypted identity information stored in the SIM card is encrypted using the random number corresponding to the SIM identification.
[0104] Correspondingly, the cryptographic service platform obtains the key identifier of the fourth key and the SIM card identifier, obtains the fourth key according to the key identifier, obtains a random number according to the SIM card identifier, and determines the random number corresponding to the SIM card identifier as the fifth key. The fifth key is encrypted using the fourth key to obtain an identity encryption key. The identity encryption key is fed back to the second application, and the second application uses the fourth key to decrypt the identity encryption key to obtain the fifth key, and uses the fifth key to encrypt the identity information to obtain the target encrypted identity information.
[0105] For the same SIM card, the SIM card identifier is the same. Therefore, the fifth key used to encrypt the identity information is the random number used to encrypt the identity information of the legitimate user. If the identity information obtained during identity information authentication is the identity information of the legitimate user, the target identity encrypted information obtained after encrypting the identity information using the fifth key should be the same as the encrypted identity information stored in the SIM card.
[0106] Further, after obtaining the target encrypted identity information, the target encrypted identity information is forwarded to the SIM card, and the SIM card stores the encrypted identity information obtained by encrypting the identity information using the fifth key. By comparing the encrypted identity information stored in the SIM card with the target encrypted identity information, if the target encrypted identity information is the same as any encrypted identity information stored in the SIM card, it is determined that the user identity information authentication is passed, otherwise it is determined that the user identity information authentication is not passed.
[0107] The user's access rights to the stored data are controlled through user identity information such as passwords, gestures, fingerprints and faces. The user identity information is encrypted and stored in the dynamic storage area of the SIM card security medium. Based on the stored encrypted identity information and the target encrypted identity information, it can be quickly determined whether the user has the authority to obtain the data to be stored. Storing identity information in an encrypted identity information state can prevent identity information leakage. For example, after the terminal device and SIM card are lost, the identity information in the SIM card can be obtained by others, thereby ensuring the security of identity information storage.
[0108] Step 207, if the user identity information authentication is passed, the third key information is obtained from the SIM card, and the third key information is sent to the password management platform, so that the password management platform encrypts the second key according to the third key information to obtain the second data encryption key, and feeds back the second data encryption key to the terminal device.
[0109] Specifically, the password management platform obtains the third key corresponding to the key identifier from the quantum key locally stored in the password management platform according to the key identifier of the third key in the third key information, and uses the key data of the third key to decrypt the second key to obtain the second data encryption key.
[0110] Step 208: decrypt the second data encryption key based on the third key information to obtain a second key.
[0111] Obtain a symmetric encryption algorithm in which the password management platform uses the third key information to encrypt the second key to obtain the second data encryption key. Based on the symmetric encryption algorithm, use the third key information to decrypt the second data encryption key to obtain the second key.
[0112] Step 209: decrypt the encrypted data using the second key to obtain the decrypted data to be stored, and feed it back to the third application.
[0113] A symmetric encryption algorithm is obtained by encrypting the data to be stored using the second key to obtain encrypted data, and the encrypted data is decrypted using the symmetric encryption algorithm based on the second key to obtain the decrypted data to be stored.
[0114] Furthermore, in the aforementioned process of encrypting and storing the data to be stored, the password management platform receives the first key information and the data identifier (e.g., name, number, etc.) of the data to be stored sent by the terminal device, and then generates a random number, uses the random number as the second key, and stores the correspondence between the random number and the data identifier. After encrypting the second key using the first key in the first key information, the obtained first data key is fed back to the terminal device, so that the terminal device can decrypt and obtain the second key, and use the second key to encrypt the data to be stored.
[0115] Correspondingly, in this step, if the user identity information passes, the third key information is obtained from the SIM card, and the data identifier in the data read request is obtained, and the third key information and the data identifier are sent to the password management platform. The password management platform obtains the key data of the third key according to the key identifier in the third key information, and obtains the second key corresponding to the data identifier according to the data identifier and the correspondence between the stored data identifier and the second key, and then uses the third key to encrypt the second key, obtains the second data encryption key and feeds it back to the terminal device.
[0116] Therefore, after the terminal device uses the third key to decrypt the second data encryption key, the second key obtained is the key used to encrypt the data to be stored. Based on the second key, the encrypted data obtained after encrypting the data to be stored can be decrypted to obtain the decrypted data.
[0117] In summary, in response to the data reading request sent by the third application, the user identity information is obtained. When the user identity information is authenticated, it means that the user who uses the third application to obtain the data to be stored is a legitimate user with data reading authority. In this case, the second key sent by the password management platform in an encrypted manner is obtained to avoid leakage of the second key, and the encrypted data is decrypted using the second key to obtain the decrypted data to be stored. This embodiment can prevent illegal applications or users who do not have data acquisition authority from obtaining the data to be stored, thereby improving the storage security of the data to be stored.
[0118] For example, refer to Figure 3 The SIM card-based data processing system includes a terminal device (e.g., a mobile phone) and a quantum key management platform as a password management platform. The terminal device is installed with an access application as a first application and a middleware App as a second application. The middleware App has a file encryption cabinet, which can be a sandbox for the terminal device operating system. The quantum key management platform generates quantum keys, stores quantum keys, and injects quantum keys into the secure storage chip of the SIM card.
[0119] Reference Figure 4 The quantum key management platform generates a quantum key through a quantum random number generator 10 and stores the quantum key in a quantum exchange cryptographic machine 20. The quantum exchange cryptographic machine 20 receives the quantum key issued by the quantum random number generator 10 and provides key services for the middleware App.
[0120] Among them, a key is pre-stored in the quantum exchange cryptographic machine 20, which is a quantum key pre-generated by the quantum random number generator 10 and stored in the quantum exchange cryptographic machine 20. The quantum key filling machine 30 is connected to the output end of the quantum exchange cryptographic machine 20, and is used to fill the quantum key into the quantum security chip 40 of the SIM card. The quantum key stored in the quantum exchange cryptographic machine 20 and the key in the SIM card quantum security chip 40 are symmetric keys. Further, the quantum key management platform realizes data interaction with the instant messaging system and the quantum security chip through the network respectively, and the quantum cryptographic management service system is directly connected to the quantum cryptographic switch to provide encryption keys and identity authentication functions. Among them, the quantum security chip in the SIM card is the secure storage chip in the aforementioned embodiment.
[0121] Furthermore, the SIM card has a quantum security chip for storing quantum security keys and media information, wherein the media information may be a media identifier (e.g., a media ID), and by way of example, the media identifier may be a SIM identifier. The keys stored in each quantum security chip and the keys pre-stored in the quantum exchange cryptographic machine are symmetric keys, and the security keys in the quantum security chip are symmetric entity authenticated through the network and the quantum cryptography management service system.
[0122] For example, the second application is a middleware App, and the third-party application calls the file encryption and decryption storage function of the middleware App by integrating the middleware SDK. Among them, the middleware App obtains the quantum key pre-filled in the SIM card security storage chip through OMA, and the quantum key is the first key in the aforementioned embodiment. Then, the quantum key is used to decrypt the quantum session key of the secret service platform to obtain the decrypted session key. The quantum session key is the first data encryption key obtained by encrypting the second key using the first key, and the decrypted session key is the second key. Use the decrypted session key to encrypt the file and store it in the application sandbox.
[0123] Figure 5 This is a flow chart of the steps of a SIM card-based data processing method provided by an embodiment of the present application. Figure 3 and Figure 5 , further exemplifies the data processing method based on the SIM card of the present application. Figure 5 , the method may include the following steps:
[0124] Step S1, access the interface SDK of the application access middleware App, configure the Appkey used for access application authentication, complete the initialization of the middleware SDK, and wake up the middleware App.
[0125] Among them, the AppKey used for authentication is provided by the official platform.
[0126] The access application in this step is equivalent to the first application in the aforementioned embodiment, and the middleware App is equivalent to the second application in the aforementioned embodiment.
[0127] The middleware SDK is a basic service component with a simple interface design. It can complete the identity authorization login method of the middleware App based on the SIM card security storage chip through one-click call.
[0128] Step S2: Call the middleware SDK interface, and call the middleware App through IPC to perform application authentication for access applications.
[0129] The access application completes the access application authentication of the middleware App by calling the SDK interface to obtain the SDK usage capabilities. Specifically, the application authentication is completed based on the AppKey.
[0130] Step S3: Call the file encryption storage interface of the middleware SDK to transfer the file data to the middleware App in the form of anonymous shared memory.
[0131] The file data is the data to be stored in the above-mentioned embodiment. The access application calls the file encryption storage interface of the SDK and transfers the file data to the middleware App through anonymous shared memory.
[0132] Step S4: The middleware App sends an APDU command to the SIM card via OMA to obtain the pre-filled quantum key in the SIM card security medium.
[0133] The SIM card security medium is a SIM card security storage chip. The pre-filled quantum key in the SIM card security medium is generated by the quantum key management platform and then filled into the SIM card security medium. When the quantum key management platform fills the quantum key into the SIM card security medium, it also stores the quantum key locally on the quantum key management platform.
[0134] Step S5: The middleware App uses the pre-charged quantum key obtained from the SIM card security medium to negotiate with the quantum cryptography management platform to obtain the file encryption key.
[0135] The file encryption key is equivalent to the first data encryption key in the aforementioned embodiment. The middleware App obtains the pre-filled quantum key in the SIM card security medium, sends the key identifier of the obtained quantum key to the quantum cryptography management platform, and negotiates with the quantum cryptography management platform to obtain the file encryption key. Specifically, the quantum cryptography management platform uses the key identifier to encrypt the random number to obtain the file encryption key.
[0136] Step S6: The middleware App uses the file encryption key to perform symmetric encryption on the file data in accordance with the national encryption algorithm, and stores the encrypted file data in the local sandbox.
[0137] In this embodiment, the quantum key is pre-filled in the SIM card security storage chip, and the quantum key is protected by the security storage chip, thereby improving the security of the quantum key. Storing encrypted file data in a local sandbox can effectively prevent other applications from illegally accessing file data. The middleware App uses the quantum key in the SIM card security storage chip to obtain the business key encrypted by the quantum cryptography management platform through the quantum key, and encrypts and stores the file data once based on the business key.
[0138] According to step S1 to step S6, the access application obtains the success status callback result of the middleware App, and completes the encryption and storage processing of the local file data.
[0139] Step S7, access the interface SDK of the application access middleware App, configure the Appkey for access application authentication, complete the initialization of the middleware SDK, and wake up the middleware App.
[0140] This step can refer to the description of the aforementioned step S1 and will not be repeated here.
[0141] Step S8, calling the SDK interface, and calling the middleware App through IPC to perform application authentication for accessing the application.
[0142] Furthermore, the SDK interface is called, and the middleware App is called through IPC in combination with AppKey to complete the application authentication of the access application and obtain the SDK usage capability.
[0143] Step S9, calling the file decryption acquisition interface of the SDK.
[0144] Call the file decryption acquisition interface of the SDK and jump to the user authentication interface of the middleware App.
[0145] Step S10, the middleware App opens a user authentication interface such as password, gesture, fingerprint, face, etc., for the user to select a corresponding method for authentication.
[0146] The user authentication interface provides users with selectable authentication methods. Users select the corresponding method for authentication, and the middleware App encrypts the user's authentication data with quantum keys.
[0147] Step S11, the middleware App performs quantum key encryption on the user authentication data.
[0148] The encrypted authentication data of the middleware App is transmitted to the SIM card security medium for comparison with the pre-set encrypted authentication password, gesture, fingerprint, face and other data pre-stored in the SIM card security medium.
[0149] In step S12, the middleware App transfers the encrypted authentication data into the SIM card security medium, and performs a comparison operation with the encrypted data pre-stored in the SIM card security medium, such as the pre-set encrypted authentication password, gesture, fingerprint, face, etc.
[0150] Specifically, the SIM compares the encrypted authentication data with the encrypted authentication data of the legitimate user pre-stored locally, and returns the comparison result to the middleware App. The middleware App obtains the comparison result of the user authentication data and enters the file pre-selection interface if it meets the conditions.
[0151] Step S13, the middleware App obtains the comparison result of the user authentication data, and enters the file pre-selection interface if the conditions are met.
[0152] If the comparison operation result is that the encrypted authentication data received by the SIM card is identical to the pre-stored encrypted authentication data of the legitimate user, the comparison operation result is determined to meet the condition; otherwise, the comparison operation result is determined to not meet the condition.
[0153] After the user selects the corresponding file data, the middleware App obtains the pre-charged quantum key in the SIM card security storage chip, and uses the pre-charged quantum key in the SIM card storage chip to negotiate with the quantum cryptography management platform to obtain the file decryption key.
[0154] Step S14, after obtaining the file data selected by the user, the middleware App sends an APDU instruction to the SIM card via OMA to obtain the pre-filled quantum key in the SIM card security medium.
[0155] The middleware App decrypts the file selected by the user and returns the decrypted file to the middleware SDK
[0156] Step S15, the middleware App uses the pre-charged quantum key of the SIM card security medium to negotiate with the quantum cryptography management platform to obtain the file decryption key.
[0157] The middleware SDK returns the decrypted file data to the calling application, completing the extraction operation of the file from the file encryption cabinet. The specific method of this step can refer to the description of the above steps 207 to 208, which will not be repeated here.
[0158] Step S16, the middleware App decrypts the selected file data, and returns the decrypted file data to the middleware SDK in the form of anonymous shared memory.
[0159] The data transmission efficiency can be improved through anonymous memory sharing.
[0160] S17: The middleware SDK returns the decrypted file data to the access application that calls the middleware SDK, completing the operation of extracting the file data from the local sandbox.
[0161] Among them, the local sandbox is equivalent to a file encryption cabinet.
[0162] In this embodiment, the quantum key is pre-filled in the SIM card security storage chip, and the quantum key is protected by the security storage chip, thereby improving the security of the quantum key. Storing encrypted file data in a local sandbox can effectively prevent other applications from illegally accessing the file data. The middleware App uses the quantum key in the SIM card security storage chip to obtain the business key encrypted by the quantum key of the quantum cryptography management platform, decrypts the file data one-time based on the business key, and extracts the decrypted file data from the sandbox. In addition, the middleware App uses the quantum key in the SIM card security storage chip to identify and verify user identity information such as passwords, gestures, fingerprints, and faces, which can prevent illegal users from obtaining file data. The present invention makes fewer changes to the access application and is not invasive. The access application can use the authorization scheme at will to customize the login authorization product. It only needs to replace the security SIM card, and there is no need to replace the customized machine, which reduces the security threshold and cost.
[0163] Figure 6 60 is a structural block diagram of a SIM card-based data processing device provided by an embodiment of the present invention. The device 60 may include:
[0164] A first acquisition module 601 is used to acquire data to be stored in response to receiving a data storage request;
[0165] The first sending module 602 is used to obtain the first key information from the SIM card, and send the first key information to the password management platform, so that the password management platform encrypts the second key according to the first key information to obtain the first data encryption key, and feeds the first data encryption key back to the terminal device;
[0166] A second acquisition module 603, configured to decrypt the first data encryption key based on the first key information to obtain a second key;
[0167] The encryption storage module 604 is used to encrypt the data to be stored using the second key, obtain the encrypted data, and store it.
[0168] Optionally, the first sending module 602 may include:
[0169] A first acquisition submodule is used to obtain first key information from quantum key information stored in a secure storage chip of the SIM card; the quantum key information stored in the secure storage chip is stored through a password management platform, and the password management platform stores the quantum key information;
[0170] The first key information includes a key identifier of the first key; the first sending module 602 may also include:
[0171] The first sending submodule is used to send the key identifier of the first key to the password management platform, so that the password management platform can obtain the first key corresponding to the key identifier from the stored quantum key information, and use the first key to encrypt the randomly generated second key to obtain the first data encryption key, and feed back the first data encryption key to the terminal device.
[0172] Optionally, the first acquisition module may include:
[0173] A second acquisition submodule, configured to respond to a data storage request sent by the first application and acquire first token information carried in the data storage request;
[0174] The third acquisition submodule is used to acquire the data to be stored indicated by the data storage request if it is determined according to the first token information that the first application has the authority to store the data to be stored.
[0175] Optionally, the third acquisition submodule may include:
[0176] The first acquisition unit is used to respond to the data storage request sent by the first application through the second application, and acquire the to-be-stored data sent by the first application to the second application in an anonymous shared memory manner.
[0177] Optionally, the device 60 further includes:
[0178] The third acquisition module is used to encrypt the data to be stored using the second key, obtain the encrypted data and store it, and further includes:
[0179] A fourth acquisition module, configured to acquire user identity information in response to a data read request sent by a third application;
[0180] a fifth acquisition module, configured to acquire the third key information from the SIM card if the user identity information is authenticated, and send the third key information to the password management platform, so that the password management platform encrypts the second key according to the third key information to obtain a second data encryption key, and feeds the second data encryption key back to the terminal device;
[0181] A sixth acquisition module, configured to decrypt the second data encryption key based on the third key information to obtain a second key;
[0182] The decryption module is used to decrypt the encrypted data using the second key, obtain the decrypted data to be stored, and feed it back to the third application.
[0183] Optionally, the fourth acquisition module may include:
[0184] A display submodule, used to display a user information input interface in response to a data read request sent by a third application;
[0185] The fourth acquisition submodule is used to acquire user identity information in response to an input operation of the user on the user information input interface.
[0186] Optionally, the device 60 further includes:
[0187] a seventh acquisition module, configured to, after acquiring the user identity information, acquire fourth key information from the key stored in the SIM card, and send the fourth key information to the password management platform, so that the password management platform uses the fourth key information to encrypt the fifth key to obtain the identity encryption key, and feed the identity encryption key back to the terminal device;
[0188] an eighth acquisition module, configured to decrypt the identity encryption key based on the fourth key information to obtain a fifth key;
[0189] a ninth acquisition module, configured to encrypt the user identity information using the fifth key to obtain target encrypted identity information;
[0190] The identity authentication module is used to authenticate the user identity information according to the pre-stored encrypted identity information and the target encrypted identity information.
[0191] Optionally, the device 60 further includes:
[0192] a tenth acquisition module, configured to, before acquiring the user identity information, in response to a data read request sent by a third application, acquire, through a second application, second token information carried in the data read request;
[0193] The execution module is used to execute the step of obtaining the user identity information if it is determined that the third application has the authority to read the data to be stored according to the second token information.
[0194] In summary, the second key in the third-party password management platform is used to encrypt the data to be stored, rather than the key stored in the terminal device, to avoid the problem of data leakage caused by illegal users stealing the key from the terminal device to decrypt the encrypted data after the terminal device is lost. The password management platform encrypts the second key with the first key information, and feeds the encrypted first data encryption key back to the terminal device, so that the second key is transmitted between the terminal device and the password management platform in ciphertext form, which improves the security of the key for encrypting the data to be stored, and thus improves the security of the encrypted data to be stored.
[0195] The present invention also provides an electronic device, see Figure 7 , including: a processor 701, a memory 702, and a computer program 7021 stored in the memory and executable on the processor, wherein when the processor executes the program, the data processing method based on the SIM card of the aforementioned embodiment is implemented.
[0196] The present invention also provides a readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the SIM card-based data processing method of the aforementioned embodiment.
[0197] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0198] It should be noted that the various information and data obtained in the embodiments of the present invention are all obtained with the authorization of the information / data holder.
[0199] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0200] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0201] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0202] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0203] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention may also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0204] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
[0205] The user information (including but not limited to the user's device information, user personal information, etc.) and related data involved in the present invention are all information authorized by the user or by all parties.
[0206] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0207] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0208] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A data processing method based on a SIM card, characterized in that: The method is applied to a terminal device, and the method comprises: In response to receiving the data storage request, obtaining data to be stored; Acquire first key information from the SIM card, and send the first key information to the password management platform, so that the password management platform encrypts the second key according to the first key information to obtain a first data encryption key, and feeds the first data encryption key back to the terminal device; decrypting the first data encryption key based on the first key information to obtain a second key; The data to be stored is encrypted using the second key to obtain the encrypted data and store it.
2. The method according to claim 1, characterized in that The obtaining the first key information from the SIM card includes: Acquire the first key information from the quantum key information stored in the secure storage chip of the SIM card; the quantum key information stored in the secure storage chip is stored through the password management platform, and the password management platform stores the quantum key information; The first key information includes a key identifier of the first key; and sending the first key information to the password management platform includes: The key identifier of the first key is sent to the password management platform, so that the password management platform can obtain the first key corresponding to the key identifier from the stored quantum key information, and use the first key to encrypt the randomly generated second key to obtain the first data encryption key, and feed back the first data encryption key to the terminal device.
3. The method according to claim 1, characterized in that The step of obtaining the data to be stored in response to receiving the data storage request includes: In response to a data storage request sent by a first application, obtaining first token information carried in the data storage request; If it is determined, based on the first token information, that the first application has the authority to store the data to be stored, the data to be stored indicated by the data storage request is obtained.
4. The method according to claim 3, characterized in that The obtaining the data to be stored indicated by the data storage request includes: The second application responds to the data storage request sent by the first application to obtain the data to be stored that is sent by the first application to the second application in an anonymous shared memory manner.
5. The method according to claim 1, characterized in that After encrypting the data to be stored using the second key to obtain the encrypted data and storing it, the method further includes: Responding to a data read request sent by a third application, obtaining user identity information; If the user identity information authentication is passed, the third key information is obtained from the SIM card, and the third key information is sent to the password management platform, so that the password management platform encrypts the second key according to the third key information to obtain a second data encryption key, and feeds the second data encryption key back to the terminal device; decrypting the second data encryption key based on the third key information to obtain the second key; The encrypted data is decrypted using the second key to obtain the decrypted data to be stored, and the decrypted data is fed back to the third application.
6. The method according to claim 5, characterized in that The step of obtaining user identity information in response to a data reading request sent by a third application program includes: In response to the data reading request sent by the third application, displaying a user information input interface; In response to an input operation of the user on the user information input interface, the user identity information is acquired.
7. The method according to claim 5, characterized in that After obtaining the user identity information, it also includes: Acquire fourth key information from the key stored in the SIM card, and send the fourth key information to the password management platform, so that the password management platform uses the fourth key information to encrypt the fifth key to obtain an identity encryption key, and feed the identity encryption key back to the terminal device; decrypting the identity encryption key based on the fourth key information to obtain the fifth key; Encrypt the user identity information using the fifth key to obtain target encrypted identity information; The user identity information is authenticated according to the pre-stored encrypted identity information and the target encrypted identity information.
8. The method according to claim 5, characterized in that Before obtaining the user identity information, the method further includes: In response to the data reading request sent by the third application, obtaining, through the second application, second token information carried in the data reading request; If it is determined based on the second token information that the third application has the authority to read the data to be stored, the step of obtaining the user identity information is performed.
9. A data processing device based on a SIM card, characterized in that: The device is applied to a terminal device, and the device includes: A first acquisition module, configured to acquire data to be stored in response to receiving a data storage request; A first sending module, configured to obtain first key information from the SIM card, and send the first key information to a password management platform, so that the password management platform encrypts a second key according to the first key information to obtain a first data encryption key, and feeds the first data encryption key back to the terminal device; A second acquisition module, configured to decrypt the first data encryption key based on the first key information to obtain a second key; The encryption storage module is used to encrypt the data to be stored using the second key to obtain the encrypted data and store it.
10. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 8 when executing the program.
11. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the methods described in claims 1-8.
Citation Information
Patent Citations
Information transmission method and device
CN104955031A
Terminal file encryption method, terminal file decryption method and terminal
CN107426723A
Data encryption method and device and storage medium
CN114258013A
File encryption method and device based on quantum key, electronic equipment and medium
CN114448633A
Audio and video data encryption method and device
CN114760500A
Cited By
File encryption method and device based on quantum encryption, equipment and medium
CN119293823A
A file encryption method, device and equipment based on quantum encryption and medium
CN119293823B
Key distribution method, electronic equipment and readable storage medium
CN119299096A
Data processing method and related device
CN119767297A
Key processing method and related device
CN120091314A
