One-time pad storage key updating method, system and device and readable storage medium

Through the one-crypto-a-time storage key update method, the nested mode of packet and sequence encryption algorithms is used to achieve efficient ciphertext update, solving the problem of low efficiency of ciphertext update in large-scale data processing, and improving data security and System performance.

CN118944871AActive Publication Date: 2024-11-12XIDIAN UNIV
View PDF 17 Cites 0 Cited by

Patent Information

Application Number
CN202410999778.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-12
Estimated Expiration
2044-07-24

AI Technical Summary

Technical Problem

When the prior art updates ciphertexts in large-scale data processing, the decryption time overhead is huge, resulting in low key update efficiency and inability to effectively protect data security.

Method used

Using one-cryptocurrency storage key update method, the nested mode of packet encryption algorithm and sequence encryption algorithm is used to generate random sequences using long-term keys and updateable keys, calculate the update token for XOR operation, and realize efficient ciphertext Update to avoid decryption and re-encryption operations.

Benefits of technology

It significantly accelerates the speed of ciphertext updates, adapts to large-scale file storage systems, improves data security and system performance, and meets the needs of big data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118944871A_ABST
    Figure CN118944871A_ABST
Patent Text Reader

Abstract

The invention discloses a one-time pad storage key updating method, system and device and a readable storage medium. The method comprises the following steps: encrypting an original plaintext by using a long-term key KB through an encryption algorithm to obtain a first encrypted ciphertext CB; generating a random sequence RS by using an updatable key KS and utilizing a sequence encryption algorithm, and when # imgabs0 # is calculated to obtain a ciphertext # imgabs1 # encrypted by the updatable key for data updating, obtaining a current updatable key KS and a new updatable key KS + 1, respectively generating the random sequence RS and RS + 1 by using the updatable keys KS and KS + 1, and calculating an update token T; performing XOR operation by using the update token T and a to-be-updated ciphertext # imgabs2 # to obtain a ciphertext # imgabs3 # encrypted by a new key, generating a random sequence RS according to the latest updatable key KS, and calculating the ciphertext # imgabs4 # to obtain a first-layer decrypted ciphertext CB; and decrypting the ciphertext CB by using a block encryption algorithm used during encryption by using the long-term key KB to obtain a plaintext file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of information security technology, and in particular relates to a one-time-one-pad storage key updating method, system, device and readable storage medium. Background Art

[0002] In the current digital age, the use of cloud storage has become more and more common. However, with the popularity of its use, data security issues have become increasingly prominent. In the network environment, whether it is file transmission or storage, its security has become an urgent problem to be solved. In order to solve this problem, file encryption has become an important means.

[0003] In order to ensure system performance, the industry has compromised on security. Currently, there are two main types of key update schemes: storage platform trust-based schemes and digital envelope replacement-based schemes. The storage platform trust-based scheme assumes that the data storage platform (i.e., cloud platform) is trustworthy. When the ciphertext storage key needs to be updated, the storage platform directly uses the old key to decrypt the data and uses the new key to encrypt the data. This method avoids the communication overhead of the data download process, but the computational overhead is still huge. At the same time, the storage key is exposed to the cloud platform and is vulnerable to internal attacks on the cloud platform. The digital envelope replacement-based scheme uses a long-term key to encrypt the stored data, uses the periodic key generated by the data owner to encrypt the long-term key (the ciphertext of the long-term key is called a "digital envelope"), and stores the digital envelope and the ciphertext data together. When a legitimate user downloads data, he obtains the decryption key of the digital envelope from the data owner, and obtains the digital envelope and ciphertext data from the cloud server. After decrypting the digital envelope to obtain the long-term key, the legitimate user can decrypt the ciphertext data. When a key update is required, the data owner downloads the digital envelope and replaces the encryption key of the digital envelope, and finally re-uploads the digital envelope. This process only replaces the key that protects the long-term key, and does not actually update the ciphertext storage key. If the storage key is leaked, the data will still be leaked. The above two solutions are widely used by cloud service providers such as Google, Amazon, and Alibaba Cloud. Although they have high performance, they cannot effectively protect data security.

[0004] In order to solve the security issues of the above industrial solutions, the academic community has proposed the concept of renewable encryption. In the renewable encryption scheme, the data owner only needs to generate a very short update token, which allows the cloud server to re-encrypt the data based on the existing ciphertext while maintaining the security of the encryption. Renewable encryption can directly implement ciphertext storage key rotation on the cloud server without the need for decryption and re-encryption operations, providing an ideal key update model.

[0005] In the prior art, the updateable encryption technology often uses the method of decryption and re-encryption to update the ciphertext. For example, the invention patent with application number CN201811364409.6, entitled "Secure and Reliable Cloud Storage Method and Device Based on Updateable Encryption", requires the searcher to apply for a one-time decryption token from the storer, use the encoded and encrypted feature vector to search on the server side, and use the decryption token to decrypt the search results. After the search is completed, the storer updates the key of the ciphertext on the server side.

[0006] However, the decryption and re-encryption method in the prior art does not take into account the needs of large-scale data processing. In the context of large-scale ciphertext updates, the time overhead for decrypting ciphertext is huge. When the key is updated, the user needs to download the file from the cloud, decrypt it with the original key, and then encrypt it with the new key, which will bring a huge time overhead. Especially for large-scale and large-scale file storage systems, it is not realistic to decrypt the file and then encrypt it. Summary of the invention

[0007] In order to solve the problems existing in the prior art, the present invention provides a one-time storage key update method, system, device and readable storage medium for efficiently updating data encryption keys for an encrypted file storage system of a big data cloud storage.

[0008] To achieve the above object, the present invention provides the following technical solutions:

[0009] A one-time storage key update method, comprising:

[0010] Use the long-term key K B Encrypt the original plaintext through the encryption algorithm to obtain the first encrypted ciphertext C B ;

[0011] Use the renewable key K S Generate a random sequence R using a sequence encryption algorithm S , and calculate Get the ciphertext encrypted with the updateable key

[0012] When updating data, obtain the current updateable key K S and the new renewable key K S+1 , using the renewable key K S and K S+1 Generate random sequences R respectively S and R S+1 , and calculate the update token T; use the update token T and the ciphertext to be updated Perform XOR operation to obtain the ciphertext encrypted with the new key

[0013] According to the latest renewable key K S Generate a random sequence R S , calculate the ciphertext Get the first layer of decrypted ciphertext C B ; Use the long-term key K B , using the block encryption algorithm used in encryption to encrypt the ciphertext C B Decrypt to get the plaintext file.

[0014] Preferably, a long-term key K is used B Encrypt the original plaintext using the block encryption algorithm to obtain the first encrypted ciphertext C B .

[0015] Preferably, the update token T is calculated by subtracting R S and R S+1 Perform an XOR operation, that is

[0016] Preferably, ciphertext The calculation method is to perform an XOR operation on the update token T and the ciphertext to be updated, specifically:

[0017]

[0018] Preferably, when the key management center updates the key,

[0019] In the data encryption phase, the key management center first initializes the ciphertext state S = 0, and uses the key derivation function KDF to generate an updateable key K S =KDF(K D ,S), and generate a random sequence R S ; The key K will be updated B and the random sequence R S Sent to authorized users; when authorized users encrypt data, they use the long-term key K B Encrypt the original plaintext using the block encryption algorithm to obtain the first encrypted ciphertext C B , and then use the random sequence to calculate Get the final ciphertext

[0020] In the data update phase, the key management center first obtains the ciphertext update status S from the cloud server, and then calculates the current update key K S =KDF(K D ,S) and the new renewable key K S+1 =KDF(K D , S+1); then, use the updateable key K S and K S+1Generate a random sequence R S and R S+1 , and calculate the update token T; send the update token T and the new update state S = S + 1 to the cloud server; the cloud server performs subsequent ciphertext update operations to obtain the ciphertext encrypted with the new key

[0021] In the data decryption phase, the key management center can generate the latest updateable key K based on the latest update status S and KD. S and the long-term key K B Send it to the legitimate user together; the legitimate user downloads the original ciphertext from the cloud Use the obtained key K S and K B Decryption can get the plaintext file.

[0022] Preferably, when performing a key update of a digital envelope, the user has a long-term key K encrypted using block encryption. B and the key K used to derive the renewable key D ;

[0023] In the data encryption phase, the user first uses the long-term key K B Encrypt the original plaintext to get the first encrypted ciphertext C B , then initialize the ciphertext state S = 0, and use the key derivation function KDF to generate the updateable key K S =KDF(K D ,S), and use the renewable key K S Generate a random sequence R S , and calculate Get the final ciphertext After encryption, the user uses the public key Encrypted ciphertext state S, long-term key K B and the key K that can rekey S , and compare it with the ciphertext Store to cloud server;

[0024] During the data update phase, the cloud server first uses the private key Decrypt the digital envelope, obtain the ciphertext state S and send it to the authorized user; at the same time, the cloud server also needs to update the asymmetric key to obtain a new public key and private key The new public key is made public to the user; the authorized user updates the ciphertext state S = S + 1, and then calculates the current update key K S =KDF(K D ,S) and the new renewable key K S+1 =KDF(K D, S+1), using the updateable key K according to the above data update method S and K S+1 Update the ciphertext; authorize the user to use the new public key Encrypted ciphertext state S = S + 1 and updated token and the long-term key K B and the latest rekeyable key K S , and sends it to the cloud server; the cloud server uses the new private key After decryption to obtain the ciphertext status and update token, subsequent ciphertext update operations are performed to obtain the ciphertext encrypted with the new key.

[0025] During the data decryption phase, the cloud server uses the latest updated private key Decrypt the digital envelope to obtain the ciphertext state S, which is sent to the legitimate user; the legitimate user then decrypts the ciphertext according to the above data decryption method.

[0026] Preferably, when updating the key of the trusted platform module,

[0027] During the data encryption phase, the user will use the long-term key K B , the key KD used to derive the updateable key and the plaintext to be encrypted are sent to the TPM; the TPM will store the long-term key K B and the key K used to derive the renewable key D , and use these two keys to complete the encryption process of the plaintext file to obtain the final ciphertext Finally, TPM will replace the user to convert the ciphertext state S and ciphertext Send to cloud server;

[0028] In the data update phase, the user only needs to send a ciphertext update instruction, and the TPM will complete the ciphertext update on behalf of the user; specifically, the TPM will obtain the ciphertext state S from the cloud server, and then calculate the current update key K S =KDF(K D ,S) and the new renewable key K S+1 =KDF(K D , S+1); then, use the updateable key K S and K S+1 Generate a random sequence R S and R S+1 , and calculate the update token TPM sends T and the new update status S=S+1 to the cloud server; the cloud server performs subsequent ciphertext update operations and obtains the ciphertext encrypted with the new key

[0029] During the data decryption phase, TPM obtains the ciphertext from the cloud server. And the ciphertext state S, decrypt the ciphertext according to the above data decryption method to obtain the plaintext file and then send it to the user.

[0030] A one-time storage key update system, including a data encryption module, a data update module and a data decryption module;

[0031] The data encryption module is used to use the long-term key K B and the renewable key K S Encrypt the original plaintext to get the ciphertext encrypted with the updateable key

[0032] The data update module is used to obtain the current updateable key K when performing data update. S and the new renewable key K S+1 , using the renewable key K S and K S+1 Generate random sequences R respectively S and R S+1 , and calculate the update token T; use the update token T and the ciphertext to be updated Perform XOR operation to obtain the ciphertext encrypted with the new key

[0033] The data decryption module is used to decrypt the data according to the latest updateable key K S Generate a random sequence R S , calculate the ciphertext Get the first layer of decrypted ciphertext C B ; Use the long-term key K B , using the block encryption algorithm used in encryption to encrypt the ciphertext C B Decrypt to get the plaintext file.

[0034] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the one-time-one-pad storage key update method as described in any one of the above when executing the computer program.

[0035] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of any one of the above-mentioned one-time pad storage key update methods.

[0036] Compared with the prior art, the present invention has the following beneficial technical effects:

[0037] The present invention provides a one-time one-key storage key update method. By selecting block ciphers (SM4 / AES) and sequence ciphers (RC4 / ZUC), an efficient encryption storage mechanism for dynamic key updates is constructed. The nested encryption mode of block ciphers and sequence ciphers is used to achieve efficient data access "one-time one-key", thereby accelerating the speed of ciphertext update, making it more adaptable to large-scale file storage systems. The present invention successfully constructs a key update mechanism for an efficient ciphertext secure storage access system. The design and implementation of this system are both for improving data security and availability. The present invention satisfies the requirement of quickly updating ciphertext without affecting system performance. This feature enables the new system to maintain efficient performance when processing large amounts of data.

[0038] The present invention provides a one-time one-key storage key update system, which supports the "one-time one-key" for data operation access. The system supports the need for ciphertext update of large-scale data on the cloud, and can realize the encryption update of ciphertext without decrypting the original file, which can meet the needs of big data processing while maintaining good performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A flow chart of a one-time-one-pad storage key update method according to an embodiment of the present invention;

[0040] Figure 2 This is a ciphertext update flow chart in an embodiment of the present invention;

[0041] Figure 3 This is a general architecture diagram based on a key management center in an embodiment of the present invention;

[0042] Figure 4 This is a flowchart based on a key management center in an embodiment of the present invention;

[0043] Figure 5 is a general architecture diagram based on a digital envelope in an embodiment of the present invention;

[0044] Figure 6 A flowchart based on a digital envelope in an embodiment of the present invention;

[0045] Figure 7 A flowchart of data encryption using a digital envelope in an embodiment of the present invention;

[0046] Figure 8 The overall architecture diagram based on TPM in an embodiment of the present invention;

[0047] Fig. 9 This is a flow chart of ciphertext update based on TPM in an embodiment of the present invention;

[0048] Fig.10 It is a comparison diagram of the present invention and the traditional mechanism. DETAILED DESCRIPTION

[0049] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present invention. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.

[0050] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.

[0051] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0052] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or a communication; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0053] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may include that the first and second features are in direct contact, or may include that the first and second features are not in direct contact but are in contact through another feature between them. Moreover, a first feature being "above", "above" and "above" a second feature includes that the first feature is directly above and obliquely above the second feature, or simply indicates that the first feature is higher in level than the second feature. A first feature being "below", "below" and "below" a second feature includes that the first feature is directly above and obliquely above the second feature, or simply indicates that the first feature is lower in level than the second feature.

[0054] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0055] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.

[0056] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0057] Various structural schematic diagrams of the embodiments disclosed in the present invention are shown in the accompanying drawings. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.

[0058] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0059] like Figure 1 As shown, the one-time storage key update method of the present invention is mainly divided into three stages: data encryption, data update and data decryption. The specific process is as follows:

[0060] Step 1: Data encryption:

[0061] The original data encryption mechanism uses a single block encryption algorithm and a permanent key to encrypt the original plaintext, which cannot achieve efficient key updates. However, it has been found that the XOR encryption feature of the sequence cipher is updatable. However, using the same key to encrypt multiple data does not meet semantic security. Therefore, a nested encryption mode is designed, which uses block encryption to ensure semantic security and sequence ciphers to ensure updatability.

[0062] Nested encryption mainly uses two keys, one is the long-term key K used for group encryption B , one is the renewable key K for the stream cipher S When encrypting data: First, use the long-term key K B Use a block encryption algorithm (such as SM4, AES, etc.) to encrypt the original plaintext to obtain the first encrypted ciphertext C B ; Then, the updateable key K is used S Generate a random sequence R using a sequence encryption algorithm (such as ZUC, RC4, etc.) S , and calculate Get the final ciphertext

[0063] Step 2: Data Update

[0064] When data needs to be updated, first get the current update key K S and the new renewable key K S+1 . Then, the updateable key K is used S and K S+1 Generate a random sequence R S and R S+1 , and calculate the update token T, which is calculated by replacing R S and R S+1 Perform an XOR operation, that is like Figure 2 As shown, the update token T is used to perform an XOR operation with the ciphertext to be updated to obtain

[0065]

[0066] , which is the ciphertext encrypted with the new key. This mechanism uses the property of XOR, where the result of XORing a number with itself is 0, so the ciphertext can be updated efficiently without downloading and decrypting the original ciphertext.

[0067] Step 3: Data decryption

[0068] The decryption process is the opposite of the encryption process, that is, according to the latest updateable key K S Generate a random sequence R S ,calculate Get the first layer of decrypted ciphertext C B. Second, use the permanent key K B , using the block encryption algorithm used in encryption to encrypt C B Decryption can get the plaintext file.

[0069] The present invention selects block ciphers (SM4 / AES) and sequence ciphers (RC4 / ZUC) to construct an efficient encryption storage mechanism with dynamic key updates, and uses a nested encryption mode of block ciphers and sequence ciphers to achieve efficient data access "one-time one-key", thereby speeding up the ciphertext update speed, making it more suitable for large-scale file storage systems.

[0070] The use scenarios of the present invention are mainly divided into three types, namely, key update based on a key management center, key update based on a data envelope, and key update based on a TPM (Trusted Platform Module).

[0071] Example 1

[0072] When the usage scenario is a key management center, the key update based on the key management center includes the following steps:

[0073] The role of the key management center is introduced in this scenario. The key management center keeps two keys secret for a long time, such as Figure 3 As shown, one is the long-term key K using block encryption B , one is the key K used to derive the renewable key D In the subsequent key update phase, only K D The key can be updated with the update number, while the long-term key K is retained. B The overall flow chart is as follows: Figure 4 shown.

[0074] In the data encryption phase, the key management center first initializes the ciphertext state S = 0, and uses the key derivation function KDF to generate an updateable key K S =KDF(K D ,S), using the key to generate a random sequence R using a sequence encryption algorithm S , K B and R S Sent to authorized users. When users need to encrypt data, they use the long-term key K B Encrypt the original plaintext using the block encryption algorithm to obtain the first encrypted ciphertext C B , and then use the random sequence to calculate Get the final ciphertext

[0075] In the data update phase, the key management center first obtains the ciphertext update status S from the cloud server, and then calculates the current update key K S =KDF(KD ,S) and the new renewable key K S+1 =KDF(K D , S+1). Then, the updateable key K is used S and K S+1 Generate a random sequence R S and R S+1 , and calculate the update token T, which is calculated by replacing R S and R S+1 Perform an XOR operation, that is Send T and the new updated state S = S + 1 to the cloud server. The cloud server performs subsequent ciphertext update operations to obtain the ciphertext encrypted with the new key.

[0076] In the data decryption phase, the key management center uses the latest update status S and K D The latest updateable key K can be generated S and the long-term key K B The legitimate user downloads the original ciphertext from the cloud. Use the obtained key K S and K B Decryption can get the plaintext file.

[0077] Example 2

[0078] When the usage scenario is a digital envelope, the key update based on the digital envelope includes the following steps. This scenario uses the digital envelope method to protect the key.

[0079] The original digital envelope process is that the sender encrypts the data M using the symmetric key K and then uses the public key K pub Encrypt the symmetric key K, and finally send the data ciphertext and the symmetric key ciphertext together to the recipient. When the data needs to be decrypted, the recipient uses his own private key K pri Decrypt the symmetric key ciphertext, and then use the decrypted symmetric key to decrypt the data ciphertext to get the original data. When the original process updates the key, it only uses the asymmetric key K used for digital envelope protection. pub and K pri The symmetric key ciphertext is updated, but the data ciphertext is not updated.

[0080] In this scenario, the ciphertext will be updated synchronously when the key is updated. The digital envelope needs to protect the ciphertext state S and store it together with the ciphertext on the cloud server. The overall architecture diagram is as follows Figure 5 The specific process is as shown in Figure 6 shown.

[0081] The user has a long-term key K that is encrypted using a blockB and the key K used to derive the renewable key D .

[0082] In the data encryption phase, the user first uses the long-term key K B Encrypt the original plaintext to get the first encrypted ciphertext C B , then initialize the ciphertext state S = 0, and use the key derivation function KDF to generate the updateable key K S =KDF(K D ,S), and use the renewable key K S Generate a random sequence R S , and calculate Get the final ciphertext After encryption, the user uses the public key Encrypted ciphertext state S, long-term key K B and the key K that can rekey S , and compare it with the ciphertext Store to cloud server.

[0083] During the data update phase, the cloud server first uses the private key Decrypt the digital envelope, get the ciphertext state S and send it to the authorized user. At the same time, the cloud server also needs to update the asymmetric key to get a new public key and private key The new public key is made public to the user. The authorized user updates the ciphertext state S = S + 1, and then calculates the current update key K S =KDF(K D ,S) and the new renewable key K S+1 =KDF(K D , S+1), using the updateable key K according to the above data update method S and K S+1 Update the ciphertext. Authorize the user to use the new public key Encrypted ciphertext state S = S + 1 and updated token and the long-term key K B and the latest rekeyable key K S , and sends it to the cloud server. The cloud server uses the new private key After decryption to obtain the ciphertext status and update token, subsequent ciphertext update operations are performed to obtain the ciphertext encrypted with the new key.

[0084] During the data decryption phase, the cloud server uses the latest updated private key Decrypt the digital envelope to obtain the ciphertext state S, and send it to the legitimate user. The legitimate user then decrypts the ciphertext according to the above data decryption method.

[0085] Example 3

[0086] When the usage scenario is TPM (Trusted Platform Module), the key update based on TPM (Trusted Platform Module) includes the following steps:

[0087] This scenario introduces the Trusted Platform Module (TPM) to perform key management and ciphertext update operations. That is, the user only needs to send a ciphertext update instruction, and the TPM will complete the interaction with the cloud server and the related operations of ciphertext update. Figure 8 As shown, the overall flow chart is as follows Fig. 9 shown.

[0088] During the data encryption phase, the user will use the long-term key K B , the key K used to derive the renewable key D The plaintext to be encrypted is sent to the TPM. The TPM stores the long-term key K B and the key K used to derive the renewable key D , and use these two keys to complete the encryption process of the plaintext file to obtain the final ciphertext Finally, TPM will replace the user to convert the ciphertext state S and ciphertext Send to the cloud server.

[0089] In the data update phase, the user only needs to send a ciphertext update instruction, and the TPM will complete the ciphertext update on behalf of the user. Specifically, the TPM will obtain the ciphertext state S from the cloud server, and then calculate the current update key K S =KDF(K D ,S) and the new renewable key K S+1 =KDF(K D , S+1). Then, the updateable key K is used S and K S+1 Generate a random sequence R S and R S+1 , and calculate the update token The TPM sends T and the new update status S=S+1 to the cloud server. The cloud server performs subsequent ciphertext update operations and obtains the ciphertext encrypted with the new key.

[0090] During the data decryption phase, TPM obtains the ciphertext from the cloud server. And the ciphertext state S, decrypt the ciphertext according to the above data decryption method to obtain the plaintext file and then send it to the user.

[0091] The present invention constructs a key update mechanism for an efficient ciphertext secure storage access system, replacing the original single AES encrypted file storage system, supporting key updates while ensuring the speed of ciphertext updates. Users can decrypt the contents of encrypted files based on the number of latest updates and the key. The present invention supports the national secret algorithm SM4 algorithm and the ZUC algorithm in design, and can ensure that the system complies with the application of commercial encryption.

[0092] Example 4

[0093] The invention provides a one-time-one-pad storage key updating system, comprising a data encryption module, a data updating module and a data decryption module.

[0094] The data encryption module is used to use the long-term key K B and the renewable key K S Encrypt the original plaintext to get the ciphertext encrypted with the updateable key

[0095] The data update module is used to obtain the current updateable key K when updating data. S and the new renewable key K S+1 , using the renewable key K S and K S+1 Generate random sequences R respectively S and R S+1 , and calculate the update token T; use the update token T and the ciphertext to be updated Perform XOR operation to obtain the ciphertext encrypted with the new key

[0096] The data decryption module is used to decrypt the data according to the latest updateable key K S Generate a random sequence R S , calculate the ciphertext Get the first layer of decrypted ciphertext C B ; Use the long-term key K B , using the block encryption algorithm used in encryption to encrypt the ciphertext C B Decrypt to get the plaintext file.

[0097] The present invention successfully constructs a key update mechanism for an efficient ciphertext secure storage access system, and the design and implementation of this system are both for improving the security and availability of data.

[0098] The present invention satisfies the requirement of quickly updating ciphertext without affecting system performance. This feature enables the new system to maintain high performance when processing large amounts of data.

[0099] The solution proposed by the present invention is implemented using the JAVA programming language. Fig.10As shown in FIG. 1 , the ciphertext update efficiency of the present invention and the existing scheme is compared on a simulated data set. Different numbers of files and file sizes are used for testing to cover various possible usage scenarios. In each case, the ciphertext update time of the present invention and the existing scheme is recorded and the results are compared.

[0100] The results show that the present invention has significant advantages in terms of both the number of files and the file size. Specifically, whether processing a large number of small files or a small number of large files, the ciphertext update time of the present invention is significantly shorter than that of the existing solutions. This shows that the present invention can maintain high performance when processing various types of data.

[0101] The present invention is designed to support the national encryption algorithm SM4 algorithm and ZUC algorithm, which can ensure that the system complies with the application of commercial encryption.

[0102] In general, the present invention has significant improvements over the solutions proposed in the prior art in terms of security, efficiency and user experience. This is an important technological breakthrough that will provide stronger protection for data security. At the same time, by supporting RC4 and the national encryption algorithm ZUC, the present invention ensures good randomness in the encryption method, which undoubtedly provides a stronger protection for data security.

[0103] The following are device embodiments of the present invention, which can be used to perform method embodiments of the present invention. For details not disclosed in the device embodiments, please refer to the method embodiments of the present invention.

[0104] In another embodiment of the present invention, a computer device is provided, the computer device including a processor and a memory, the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding functions; the processor described in the embodiment of the present invention can be used for the operation of the one-time storage key update method.

[0105] In another embodiment of the present invention, the present invention further provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both the built-in storage medium in the computer device and the extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the one-time storage key update method in the above embodiment.

[0106] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0107] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0108] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

[0111] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic features of the present invention. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the attached claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved.

[0112] In addition, it should be understood that although this specification is described in accordance with the implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation modes that can be understood by those skilled in the art. The above content is only to illustrate the technical idea of ​​the present invention, and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution according to the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.

Claims

1. One-time storage key update method, It is characterized in that include, Use the long-term key K B Encrypt the original plaintext through the encryption algorithm to obtain the first encrypted ciphertext C B ; Use the renewable key K S Generate a random sequence R using a sequence encryption algorithm S , and calculate Get the ciphertext encrypted with the updateable key When updating data, obtain the current updateable key K S and the new renewable key K S+1 , using the renewable key K S and K S+1 Generate random sequences R respectively S and R S+1 , and calculate the update token T; use the update token T and the ciphertext to be updated Perform XOR operation to obtain the ciphertext encrypted with the new key According to the latest renewable key K S Generate a random sequence R S , calculate the ciphertext Get the first layer of decrypted ciphertext C B ; Use the long-term key K B , using the block encryption algorithm used in encryption to encrypt the ciphertext C B Decrypt the plaintext file.

2. The one-time-one-pad storage key updating method according to claim 1, It is characterized in that Use the long-term key K B Encrypt the original plaintext using the block encryption algorithm to obtain the first encrypted ciphertext C B .

3. The one-time-one-pad storage key updating method according to claim 1, It is characterized in that The update token T is calculated by adding R S and R S+1 Perform an XOR operation, that is 4. The one-time-one-pad storage key updating method according to claim 1, It is characterized in that Ciphertext The calculation method is to perform an XOR operation on the update token T and the ciphertext to be updated, specifically:

5. The one-time-one-pad storage key updating method according to claim 1, It is characterized in that When updating the key of the key management center, In the data encryption phase, the key management center first initializes the ciphertext state S = 0, and uses the key derivation function KDF to generate an updateable key K S =KDF(K D ,S), and generate a random sequence R S ; The key K will be updated B and the random sequence R S Sent to authorized users; when authorized users encrypt data, they use the long-term key K B Encrypt the original plaintext using the block encryption algorithm to obtain the first encrypted ciphertext C B , and then use the random sequence to calculate Get the final ciphertext In the data update phase, the key management center first obtains the ciphertext update status S from the cloud server, and then calculates the current update key K S =KDF(K D ,S) and the new renewable key K S+1 =KDF(K D , S+1); then, use the updateable key K S and K S+1 Generate a random sequence R S and R S+1 , and calculate the update token T; send the update token T and the new update state S=S+1 to the cloud server; The cloud server performs subsequent ciphertext update operations to obtain the ciphertext encrypted with the new key In the data decryption phase, the key management center uses the latest update status S and K D The latest updateable key K can be generated S and the long-term key K B Send it to the legitimate user together; the legitimate user downloads the original ciphertext from the cloud Use the obtained key K S and K B Decryption can get the plaintext file.

6. The one-time-one-pad storage key updating method according to claim 1, It is characterized in that When updating the key of the digital envelope, the user has a long-term key K encrypted using block encryption. B and the key K used to derive the renewable key D ; In the data encryption phase, the user first uses the long-term key K B Encrypt the original plaintext to get the first encrypted ciphertext C B , then initialize the ciphertext state S = 0, and use the key derivation function KDF to generate the updateable key K S =KDF(K D ,S), and use the renewable key K S Generate a random sequence R S , and calculate Get the final ciphertext After encryption, the user uses the public key Encrypted ciphertext state S, long-term key K B and the key K that can rekey S , and compare it with the ciphertext Store to cloud server; During the data update phase, the cloud server first uses the private key Decrypt the digital envelope, obtain the ciphertext state S and send it to the authorized user; at the same time, the cloud server also needs to update the asymmetric key to obtain a new public key and private key The new public key is made public to the user; the authorized user updates the ciphertext state S = S + 1, and then calculates the current update key K S =KDF(K D ,S) and the new renewable key K S+1 =KDF(K D , S+1), using the updateable key K according to the above data update method S and K S+1 Update the ciphertext; authorize the user to use the new public key Encrypted ciphertext state S = S + 1 and updated token and the long-term key K B and the latest rekeyable key K S , and sends it to the cloud server; the cloud server uses the new private key After decryption to obtain the ciphertext status and update token, subsequent ciphertext update operations are performed to obtain the ciphertext encrypted with the new key. During the data decryption phase, the cloud server uses the latest updated private key Decrypt the digital envelope, obtain the ciphertext state S, and send it to the legitimate user; The legitimate user then decrypts the ciphertext according to the above data decryption method.

7. The one-time-one-pad storage key updating method according to claim 1, It is characterized in that When updating the key of the Trusted Platform Module, During the data encryption phase, the user will use the long-term key K B , the key K used to derive the renewable key D The plaintext to be encrypted is sent to the TPM; the TPM stores the long-term key K B and the key K used to derive the renewable key D , and use these two keys to complete the encryption process of the plaintext file to obtain the final ciphertext Finally, TPM will replace the user to convert the ciphertext state S and ciphertext Send to cloud server; In the data update phase, the user only needs to send a ciphertext update instruction, and the TPM will complete the ciphertext update on behalf of the user; specifically, the TPM will obtain the ciphertext state S from the cloud server, and then calculate the current update key K S =KDF(K D ,S) and the new renewable key K S+1 =KDF(K D , S+1); then, use the updateable key K S and K S+1 Generate a random sequence R S and R S+1 , and calculate the update token TPM sends T and the new update status S=S+1 to the cloud server; the cloud server performs subsequent ciphertext update operations and obtains the ciphertext encrypted with the new key During the data decryption phase, TPM obtains the ciphertext from the cloud server. And the ciphertext state S, decrypt the ciphertext according to the above data decryption method to obtain the plaintext file and then send it to the user.

8. One-time storage key update system, It is characterized in that It includes a data encryption module, a data update module and a data decryption module; The data encryption module is used to use the long-term key K B and the renewable key K S Encrypt the original plaintext to get the ciphertext encrypted with the updateable key The data update module is used to obtain the current updateable key K when performing data update. S and the new renewable key K S+1 , using the renewable key K S and K S+1 Generate random sequences R respectively S and R S+1 , and calculate the update token T; use the update token T and the ciphertext to be updated Perform XOR operation to obtain the ciphertext encrypted with the new key The data decryption module is used to decrypt the data according to the latest updateable key K S Generate a random sequence R S , calculate the ciphertext Get the first layer of decrypted ciphertext C B ; Use the long-term key K B , using the block encryption algorithm used in encryption to encrypt the ciphertext C B Decrypt the plaintext file.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the one-time pad storage key update method as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of the one-time pad storage key update method as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Terminal equipment for realizing content protection and transmission method thereof

    CN101719910A

  • Efficient data encryption, updating and access control method for cloud storage

    CN102624708A

  • Equivocation augmentation

    CN110313146A

  • Anti-attack data secrecy method based on cloud computing

    CN110740036A

  • Data access permission updating method and device, equipment and readable storage medium

    CN112818404A