Repudiable storage method and system with multi-snapshot security

By initializing the master key in a deniable storage system and encrypting the storage data using the PPRF key tree, the problem of insufficient security under multi-snapshot attacks is solved, and the balance between multi-snapshot security and deniable storage is achieved.

CN119808180AActive Publication Date: 2025-04-11UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510017392.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-04-11
Estimated Expiration
2045-01-06

AI Technical Summary

Technical Problem

The prior art lacks security under multi-snapshot attacks and cannot effectively guarantee the reliability of denied storage.

Method used

By generating system common parameters, initializing the master key of the secure deletion system and hidden storage system, encrypting storage data using the PPRF key tree and file key table, and storing disk status through a tree structure, building a storage space that can deny storage system.

Benefits of technology

It realizes the provision of multi-snapshot security in a multi-snapshot attack environment, ensuring that the existence of hidden data cannot be inferred through snapshot differences, and ensuring complete deletion or deep hiding of sensitive information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808180A_ABST
    Figure CN119808180A_ABST
Patent Text Reader

Abstract

The invention discloses a deniable storage method and system with multi-snapshot security. The method comprises the following steps: generating system public parameters according to security parameters; inputting a password of a secure deletion system to initialize the first master key; inputting a password of the hidden storage system to initialize a second master key; the disk state of the PPRF is stored through a tree structure, and a first key tree is generated; encrypting and storing encryption keys of all files to generate a first file key table; constructing a storage space of the deniable storage system; writing / updating, reading and deleting the public file; and writing, updating and deleting the hidden data. According to the method, normal file change in the snapshot period has multi-snapshot security; the hidden space and the public space can be freely switched, and compared with an existing deniable storage system with multi-snapshot safety, the capacity can be increased by 50 times at most; and the hidden space is completely encrypted by using the master key in the TPM module, so that a powerful guarantee is provided for the security of the hidden space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information security, and in particular to a deniable storage method and system with multi-snapshot security. Background Art

[0002] In scenarios facing high scrutiny, users not only need to ensure that certain sensitive data can be safely and thoroughly deleted when necessary (ensuring that attackers cannot recover it), but also need to be able to reasonably deny the remaining hidden data under external pressure. This ability is called "deniable storage." Deniable storage means that when faced with scrutiny, users can deny the existence of hidden data, making it impossible for external inspectors to confirm the true state of the data. However, when an attacker is able to obtain the state of the storage device multiple times (i.e., perform a multi-snapshot attack), it is still possible to infer the existence of hidden data by comparing the differences between different snapshots, thereby threatening the security of deniable storage.

[0003] Traditional steganography mainly protects user privacy by hiding stored information, but its design goal does not cover the security requirements under multiple snapshot attacks. In the case of a single observation, some steganography or deniable storage schemes can provide reasonable deniability, but in the case of multiple snapshots, small and continuous file changes may still expose the existence of hidden data. This means that traditional steganography has significant security deficiencies when dealing with multiple snapshot attacks and cannot effectively guarantee the reliability of deniable storage.

[0004] To solve this problem, recent studies have proposed secure deletion technology based on puncturable pseudorandom functions (PPRF). The core capability of a secure deletion system is to completely delete specific data when needed, ensuring that it cannot be recovered. Through the "puncture" operation, PPRF enables specific data keys to be quickly and seamlessly invalidated, thereby achieving secure deletion of data. However, simply integrating the secure deletion mechanism with deniable storage still cannot provide sufficient security in the environment of multi-snapshot attacks. Because even if the data can be deleted, the changes between snapshots may still reveal traces of hidden data. Summary of the invention

[0005] The purpose of the present invention is to overcome the deficiencies of the prior art and to provide a deniable storage method and system with multi-snapshot security.

[0006] The objective of the present invention is achieved through the following technical solutions: In a first aspect, the present invention discloses a deniable storage method with multi-snapshot security, comprising the following steps: S1. Generate system public parameters based on security parameters; S2, input the password of the secure deletion system to initialize the first master key; S3, input the password of the hidden storage system to initialize the second master key; S4, storing the disk state of PPRF in a tree structure to generate a first key tree; S5, encrypt and store the encryption keys of all files, and generate a first file key table; S6. Construct storage space for a deniable storage system; S7, write / update, read and delete public files; S8. Write, update and delete hidden data.

[0007] Based on the first aspect, step S1 specifically includes: according to the security parameter Generate system common parameters ;in represents the key derivation algorithm; and Represents a symmetric cryptographic algorithm; Represents a puncturable pseudorandom function.

[0008] Based on the first aspect, step S2 specifically includes: uniformly randomly selecting the first master key of the secure deletion system , according to the user password The first derived key , encrypt the first master key And stored in the TPM module .

[0009] Based on the first aspect, step S3 specifically includes: uniformly randomly selecting a second master key of the hidden storage system , according to the user password The second derived key , encrypt the second master key And stored in the TPM module .

[0010] Based on the first aspect, step S4 specifically includes: each leaf node includes an encrypted block in a PPRF state, each encrypted internal node includes a pointer to a child node in the tree and a first key required to decrypt the child node in the tree, and a first master key is used to decrypt the child node in the tree. Encrypt the second-layer nodes and obtain the left child nodes of the second-layer nodes and right node ,in is the key of the left child of the root node, It is the key of the right child node of the root node; the second-level nodes encrypt the third-level nodes until they reach the leaf nodes, thus constructing a complete first key tree.

[0011] Based on the first aspect, step S5 specifically includes: encrypting and storing the encryption keys of all files at a fixed location on the disk, obtaining a first file key table, wherein the first file key table is divided into blocks of 4 KB each, and each 4 KB storage block is divided into blocks of 4 KB each. Includes 127 32-byte file keys and a single 8-byte tag value , 16 magic bytes and 8 bytes of padding, while maintaining the first atomic counter , used to indicate the current storage block The maximum value of the , which will be stored persistently.

[0012] Based on the first aspect, step S6 specifically includes: storing the hidden space table and the actual hidden space together, when the deniable storage system is started, starting multiple threads to scan the first eight bytes of all sectors and decrypt them, filtering out the hidden space using the magic value and the offset value range, and constructing a hidden space linked list in the memory. Each item in the linked list is the detailed information of the underlying sector, and the size of the available hidden space is maintained in memory. The size of each underlying sector is 512 bytes. The first eight bytes of the sector are used to identify the hidden volume and hidden sector where the sector is located; the first byte and the second byte are used to identify the hidden volume where the sector is located. The third byte to the sixth byte are used to identify the hidden logical sector LHS where the sector is located, the seventh byte is used to identify the offset of the sector in the hidden logical sector, and the eighth byte is used to identify the magic value. ; When a sector is included in the hidden space table, it is first marked as unused, the first eight bytes of the sector are filled with magic bytes, and the first master key is used Encryption; if a hidden sector is used, fill its first eight bytes in the same way.

[0013] Based on the first aspect, step S7 specifically includes the following sub-steps: S71, based on the first key tree and the first file key table, generate a first encryption key for the public file, encrypt the public file using the first encryption key, then write the public file to the disk, and encrypt the first encryption key using the second encryption key of the first key tree and store it in the first file key table; S72, obtaining a second encryption key from the first file key table, decrypting the second encryption key to obtain the first encryption key, and decrypting the public file using the first encryption key to obtain the plain text; S73: intercept the deletion request, puncture the first encryption key of the public file corresponding to the deletion request, obtain the third encryption key, and encrypt the storage block using the third encryption key All file keys in the table are obtained to obtain the second file key table; the first master key is rotated at the same time to obtain the third master key, the second-layer nodes are encrypting with the third master key, and the second-layer nodes are encrypting with the third-layer nodes until the leaf nodes are reached to construct a complete second key tree; the first atomic counter is incremented to obtain the second atomic counter; the second file key table, the second key tree and the second atomic counter are written to the disk, thereby obtaining the storage space for the public files corresponding to the deletion request and obtaining the first storage space.

[0014] Based on the first aspect, in step S71, a first encryption key is generated for the public file, and the public file is encrypted and written to the disk. If there is a conflict with the hidden sector, the allocation strategy is dynamically adjusted, that is, the hidden space list is updated. Obtain hidden sectors for public files and write them to improve space utilization; the specific steps include: S711, extracting the sector information to be written from the bio; S712, comparing with the hidden sector record table in the memory, if there is an intersection and the hidden sector in the intersection is in use, reselecting sectors in the intersection; S713: If after reselection, there are still not enough sectors to meet the non-cross-use condition, then select the hidden space list. Take out the specified hidden sector for use; S714: If the intersection part is not used, remove the block space from the hidden space list. Removed; S715, for public documents Generate the first encryption key ; S716: Use the first encryption key Encrypting public files ; S717: Calculate the first encryption key The corresponding storage block ; S718: Calculate the first encryption key The storage block Storage location in ; S719, calculation storage block The second encryption key ; S7110, use the second encryption key Encrypting the first encryption key In storage block Position in .

[0015] Based on the first aspect, in step S72, the storage block is calculated according to the inode number. With location , using PPRF from the label Deriving the Second Encryption Key , specifically including the following steps: S721, by file inode number Calculate the corresponding storage block and location ; S722, calculate storage block The second encryption key , decrypt the first encryption key using the second encryption key , using the first encryption key For public documents Decrypt and read.

[0016] Based on the first aspect, step S73 specifically includes the following steps: S731, intercept the delete request REQ_OP_DISCARD, through the file inode number Calculate the corresponding storage block and location ; S732: Replace storage block using random key Position b; S733, through PPRF puncture label The first encryption key at ; S734, Refresh Tag ; S735, increment atomic tag counter ; S736: Recalculate storage blocks The second encryption key , get the third encryption key ; S737: Use the third encryption key Encrypted storage blocks All file keys in the second file key table are obtained; S738: Rotate the first master key , get the third master key , through the third master key The second-layer nodes are encrypted, and the second-layer nodes encrypt the third-layer nodes until the leaf nodes are reached, thus constructing a complete second key tree; S739, writing the second key tree, the second file key table and the atomic calculator value into the disk; S7310: Read and record the physical sectors occupied by the public file corresponding to the deletion request. , recorded in the hidden space list in memory and marked as not in use; S7311. Returns the deletion success status and does not issue a cleanup command to the disk.

[0017] Based on the first aspect, step S8 specifically includes the following steps: S81, writing hidden data into the first storage space; S82, when the hidden data is changed, the hidden data in the first storage space is synchronously updated; S83, deleting the hidden data, and reclaiming the storage space corresponding to the deleted hidden data; S84: Perform persistence processing on the current state of the hidden data, clear the second master key in the memory and TPM, and restore to a safe deletion state without hidden data storage.

[0018] Based on the first aspect, in step S81, check the size of the hidden space Is it enough to store hidden data? If not, delete the public files to obtain more first storage space, allocate hidden sectors and pass the second master key. Write after encryption and update the hidden space size ; Specifically include the following steps: S811, obtaining the size of hidden data to be written in the write request ; S812, compare the size to be written and hidden space size , if the size to be written is >Hidden space size , then a request error is returned, and the public file is deleted to obtain more first storage space; S813. Calculate the number of hidden sectors actually required ; S814, from the hidden space list Take out Hidden sectors, initialize the hidden volume of each sector , hidden logical sector LHS, offset Offset and magic value ; S815, use the second master key Encrypted and retrieved separately Hidden sectors; S816, will be used Write the hidden sectors to the disk and remove them from the hidden space list Remove and update the hidden space size The value is written.

[0019] Based on the first aspect, in step S82, the number of hidden sectors is adjusted to adapt to the size of the updated hidden data to be written, and corresponding mapping update and encryption write-back operations are performed; specifically, the following steps are included: S821, receiving an update request, and issuing a request to update hidden data, including the target logical volume , target logical hidden sector LHS', size of new data , content data pointer of new data; S822, search for current mapping information in the hidden space list Check whether there is a corresponding logical volume If there is no corresponding hidden logical sector LHS, a request error is returned and the update fails; S823. Calculate the number of hidden sectors required for updating , and read the current number of hidden sectors ; S824: If the required number of hidden sectors is equal to the current number of hidden sectors , update data on the original sector; S825: If the required number of hidden sectors is less than the current number of hidden sectors , release some hidden sectors that are no longer needed, remove the redundant hidden sectors from the current mapping, and return the corresponding physical sectors to the hidden space list , update the hidden space size ; S826: If the required number of hidden sectors is greater than the current number of hidden sectors , perform additional hidden sector expansion, and verify the number of additional extended sectors , If the number of additional sectors is expanded , then a request error is returned, and the public file is deleted to obtain more first storage space; If the number of additional sectors is expanded , then from the hidden space list The number of extra extended sectors taken out The number of hidden sectors is logically spliced ​​to the original number of hidden sectors Then initialize the hidden volume of each sector , hidden logical sector LHS, offset Offset, magic value ; S827. Execute step S815-step S816 to complete the update of hidden data.

[0020] Based on the first aspect, in step S83, the first eight bytes of the corresponding hidden sector are filled with magic values. , returned to the hidden space list , update the hidden space size , to achieve hidden data deletion; specifically including the following steps: S831, receiving a deletion request, searching for mapping information of the hidden data to be deleted, and Query the corresponding hidden volume and hidden logical sector LHS, if it does not exist, a request error is returned and the deletion fails; S832: Determine the number of hidden sectors to be deleted , obtain how many hidden sectors the corresponding hidden data occupies from the mapping information; S833, use magic value to replace the first 8 bytes of the hidden sector to be deleted Fill and re-add to the hidden space list and update value; S124. Store the changes of the hidden sectors to be deleted in the disk.

[0021] Based on the first aspect, step S84 specifically includes the following steps: S841, if there are any ongoing hidden data write, update or delete operations, wait for these operations to complete to ensure that the hidden space list The hidden data in is consistent with the hidden data written on the disk; S842, refresh all the original data structures related to the hidden space to the disk; S843, clear the hidden data structure in the memory and release the hidden space list and hidden space size The memory of the TPM module is the second master key Export and erase the second master key in the TPM module ; S844. Uninstall the secure deletion system and then reinstall it to ensure that there is no code logic in the secure deletion system that can deny the storage system.

[0022] In a second aspect, the present invention discloses a deniable storage system with multi-snapshot security, which is used in the above-mentioned deniable storage method with multi-snapshot security, comprising: Safe deletion system initialization module: used to input the password of the safe deletion system to initialize the master key; Hidden storage system initialization module: used to input the password of the hidden storage system to initialize the master key; PPRF key tree module: used to store PPRF disk status through a tree structure; File key table module: used to encrypt and store encryption keys for all files; Hidden space table module: used to design deleted space and build storage space of deniable storage system; Efficient and secure deletion module: used to write / update, read and delete public files; Removable hidden storage module: used to write, update and delete hidden data.

[0023] The beneficial effects of the present invention are: 1) The storage layout of the deniable storage system proposed in the present invention is consistent with that of the existing secure deletion system, which can be interpreted as a space that has been deleted but has not been cleaned up by the underlying disk, and has storage deniability.

[0024] 2) The key of the deleted ciphertext in the present invention has been punctured and cannot be recovered. It can be interpreted as a normal file change during the snapshot period, which has multi-snapshot security.

[0025] 3) The hidden space and public space in the present invention can be switched freely, and the capacity can be increased by up to 50 times compared with the existing deniable storage system with multi-snapshot security.

[0026] 4) All hidden spaces in the present invention are encrypted using the master key located in the TPM module, providing a strong guarantee for the security of the hidden space.

[0027] 5) The hidden storage module in the present invention is detachable, and the process of disassembly and reinstallation does not affect the reading and writing of public files, and has good expansibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A schematic diagram of the steps of a deniable storage method with multi-snapshot security according to an embodiment of the present invention; Figure 2 The present invention is a schematic diagram of a deniable storage system with multi-snapshot security according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0030] The present invention discloses a deniable storage method and system with multi-snapshot security; by integrating an advanced secure deletion mechanism with a specific storage layout design, it is not only able to efficiently delete sensitive data when needed, but also able to conceal the existence of hidden data in a multi-snapshot attack environment. Specifically, the system presents a storage evolution trajectory that is no different from normal operation between multiple snapshots, making it impossible for external observers to infer the existence of hidden data through snapshot differences. When faced with strong scrutiny, the system can continue to provide reasonable explanations while ensuring that sensitive information has been completely deleted or is still in a deeply hidden state. This innovative design provides new research ideas and application value for addressing data protection challenges under multi-snapshot attacks at the theoretical and practical levels. The present invention discloses a deniable storage method with multi-snapshot security, and its step diagram is shown as follows: Figure 1 As shown, the system public parameters are generated according to the security parameters; the user password is input to initialize the master key of the secure deletion system and the hidden storage system; the PPRF key tree module is used to encrypt and store the PPRF disk status and file key table; the physical space occupied by the deleted files is included in the hidden space table management; in the normal reading, writing and deletion process of public files, the deleted file key is punctured through the cooperation of the pierceable pseudo-random function (PPRF) and the atomic counter, so that the key cannot be recovered in multiple snapshots; the hidden storage is encrypted using an independent master key, and the actual deleted space is interpreted as an uncleaned area, thereby achieving deniability. Specifically, the following steps are included: S1. Generate system public parameters based on security parameters; S2, input the password of the secure deletion system to initialize the first master key; S3, input the password of the hidden storage system to initialize the second master key; S4, storing the disk state of PPRF in a tree structure to generate a first key tree; S5, encrypt and store the encryption keys of all files, and generate a first file key table; S6. Construct storage space for a deniable storage system; S7, write / update, read and delete public files; S8. Write, update and delete hidden data.

[0031] Specifically, step S1 specifically includes: according to the security parameters Generate system common parameters ;in represents the key derivation algorithm; and Represents a symmetric cryptographic algorithm; Represents a puncturable pseudorandom function.

[0032] Specifically, step S2 specifically includes: uniformly randomly selecting the first master key of the secure deletion system , according to the user password The first derived key , encrypt the first master key And stored in the TPM module .

[0033] Specifically, step S3 specifically includes: uniformly randomly selecting a second master key of the hidden storage system , according to the user password The second derived key , encrypt the second master key And stored in the TPM module .

[0034] Specifically, step S4 specifically includes: each leaf node includes an encrypted block in the PPRF state, each encrypted internal node includes a pointer to a child node in the tree and a first key required to decrypt the child node in the tree, and the first master key is used to decrypt the child node in the tree. Encrypt the second-layer nodes and obtain the left child nodes of the second-layer nodes and right node ,in is the key of the left child of the root node, It is the key of the right child node of the root node; the second-level nodes encrypt the third-level nodes until they reach the leaf nodes, thus constructing a complete first key tree.

[0035] Specifically, step S5 specifically includes: encrypting and storing the encryption keys of all files at a fixed location on the disk, obtaining a first file key table, wherein the first file key table is divided into blocks of 4KB each, and each 4KB storage block is Consists of 127 32-byte file keys (one for each of the 127 files with adjacent inode numbers), a single 8-byte tag value , 16 magic bytes (used to assist PPRF key rotation) and 8 bytes of padding, while maintaining the first atomic counter , used to indicate the current storage block The maximum value of the , which will be stored persistently.

[0036] Specifically, step S6 includes: storing the hidden space table and the actual hidden space together, starting multiple threads to scan the first eight bytes of all sectors and decrypting them when the deniable storage system is started, filtering out the hidden space using the magic value and the offset value range, and constructing a hidden space linked list in the memory. Each item in the linked list is the detailed information of the underlying sector, and the size of the available hidden space is maintained in memory. The size of each underlying sector is 512 bytes. The first eight bytes of the sector are used to identify the hidden volume and hidden sector where the sector is located; the first byte and the second byte are used to identify the hidden volume where the sector is located. The third byte to the sixth byte are used to identify the hidden logical sector LHS where the sector is located, the seventh byte is used to identify the offset of the sector in the hidden logical sector, and the eighth byte is used to identify the magic value. ; When a sector is included in the hidden space table, it is first marked as unused, the first eight bytes of the sector are filled with magic bytes, and the first master key is used Encryption; if a hidden sector is used, fill the first eight bytes in the same way.

[0037] Specifically, step S7 includes the following sub-steps: S71, based on the first key tree and the first file key table, generate a first encryption key for the public file, encrypt the public file using the first encryption key, then write the public file to the disk, and encrypt the first encryption key using the second encryption key of the first key tree and store it in the first file key table; S72, obtaining a second encryption key from the first file key table, decrypting the second encryption key to obtain the first encryption key, and decrypting the public file using the first encryption key to obtain the plain text; S73: intercept the deletion request, puncture the first encryption key of the public file corresponding to the deletion request, obtain the third encryption key, and encrypt the storage block using the third encryption key All file keys in the table are obtained to obtain the second file key table; the first master key is rotated at the same time to obtain the third master key, the second-layer nodes are encrypting with the third master key, and the second-layer nodes are encrypting with the third-layer nodes until the leaf nodes are reached to construct a complete second key tree; the first atomic counter is incremented to obtain the second atomic counter; the second file key table, the second key tree and the second atomic counter are written to the disk to obtain the storage space of the public file corresponding to the deletion request and obtain the first storage space.

[0038] Specifically, in step S71, a first encryption key is generated for the public file, and the public file is encrypted and written to the disk. If there is a conflict with the hidden sector, the allocation strategy is dynamically adjusted, that is, the hidden space list is updated. Obtain hidden sectors for public files and write them to improve space utilization; the specific steps include: S711, extracting the sector information to be written from the bio; S712, comparing with the hidden sector record table in the memory, if there is an intersection and the hidden sector in the intersection is in use, reselecting sectors in the intersection; S713: If after reselection, there are still not enough sectors to meet the non-cross-use condition, then select the hidden space list. Take out the specified hidden sector for use; S714: If the intersection part is not used, remove the block space from the hidden space list. Removed; S715, for public documents Generate the first encryption key ; S716: Use the first encryption key Encrypting public files ; S717: Calculate the first encryption key The corresponding storage block ; S718: Calculate the first encryption key The storage block Storage location in ; S719, calculation storage block The second encryption key ; S7110, use the second encryption key Encrypting the first encryption key In storage block Position in .

[0039] Based on the first aspect, in step S72, the storage block is calculated according to the inode number. With location , using PPRF from the label Deriving the Second Encryption Key , specifically including the following steps: S721, by file inode number Calculate the corresponding storage block and location ; S722, calculate storage block The second encryption key , decrypt the first encryption key using the second encryption key , using the first encryption key For public documents Decrypt and read.

[0040] Specifically, step S73 includes the following steps: S731, intercept the delete request REQ_OP_DISCARD, through the file inode number Calculate the corresponding storage block and location ; S732: Replace storage block using random key Position b; S733, through PPRF puncture label The first encryption key at ; S734, Refresh Tag ; S735, increment atomic tag counter ; S736: Recalculate storage blocks The second encryption key , get the third encryption key ; S737: Use the third encryption key Encrypted storage blocks All file keys in the second file key table are obtained; S738: Rotate the first master key , get the third master key , using the third master key The second-layer nodes are encrypted, and the second-layer nodes encrypt the third-layer nodes until the leaf nodes are reached, thus constructing a complete second key tree; S739, writing the second key tree, the second file key table and the atomic calculator value into the disk; S7310: Read and record the physical sectors occupied by the public file corresponding to the deletion request. , recorded in the hidden space list in memory and marked as not in use; S7311. Returns the deletion success status and does not issue a cleanup command to the disk.

[0041] Specifically, step S8 includes the following steps: S81, writing hidden data into the first storage space; S82, when the hidden data is changed, the hidden data in the first storage space is synchronously updated; S83, deleting the hidden data, and reclaiming the storage space corresponding to the deleted hidden data; S84: Perform persistence processing on the current state of the hidden data, clear the second master key in the memory and TPM, and restore to a safe deletion state without hidden data storage.

[0042] Specifically, in step S81, check the size of the hidden space Is it enough to store hidden data? If not, delete the public files to obtain more first storage space, allocate hidden sectors and pass the second master key. Write after encryption, update the hidden space size ; Specifically including the following steps: S811, obtaining the size of hidden data to be written in the write request ; S812, compare the size to be written and hidden space size , if the size to be written is >Hidden space size , then a request error is returned, and the public file is deleted to obtain more first storage space; S813. Calculate the number of hidden sectors actually required ; S814, from the hidden space list Take out Hidden sectors, initialize the hidden volume of each sector , hidden logical sector LHS, offset Offset and magic value ; S815, use the second master key Encrypted and retrieved separately Hidden sectors; S816, will be used Write the hidden sectors to the disk and remove them from the hidden space list Remove and update the hidden space size The value is written.

[0043] Specifically, in step S82, the number of hidden sectors is adjusted to adapt to the size of the updated hidden data to be written, and corresponding mapping update and encryption write-back operations are performed; specifically, the following steps are included: S821, receiving an update request, and issuing a request to update hidden data, including the target logical volume , target logical hidden sector LHS', size of new data , content data pointer of new data; S822, search for current mapping information in the hidden space list Check whether there is a corresponding logical volume If there is no corresponding hidden logical sector LHS, a request error is returned and the update fails; S823. Calculate the number of hidden sectors required for updating , and read the current number of hidden sectors ; S824: If the required number of hidden sectors is equal to the current number of hidden sectors , update data on the original sector; S825: If the required number of hidden sectors is less than the current number of hidden sectors , release some hidden sectors that are no longer needed, remove the redundant hidden sectors from the current mapping, and return the corresponding physical sectors to the hidden space list , update the hidden space size ; S826: If the required number of hidden sectors is greater than the current number of hidden sectors , perform additional hidden sector expansion, and verify the number of additional extended sectors , If the number of additional sectors is expanded , then a request error is returned, and the public file is deleted to obtain more first storage space; If the number of additional sectors is expanded , then from the hidden space list The number of extra extended sectors taken out The number of hidden sectors is logically spliced ​​to the original number of hidden sectors Then initialize the hidden volume of each sector , hidden logical sector LHS, offset Offset, magic value ; S827. Execute step S815-step S816 to complete the update of hidden data.

[0044] Specifically, in step S83, the first eight bytes of the corresponding hidden sector are filled with the magic value , returned to the hidden space list , update the hidden space size , to achieve hidden data deletion; specifically including the following steps: S831, receiving a deletion request, searching for mapping information of the hidden data to be deleted, and Query the corresponding hidden volume and hidden logical sector LHS, if it does not exist, a request error is returned and the deletion fails; S832: Determine the number of hidden sectors to be deleted , obtain how many hidden sectors the corresponding hidden data occupies from the mapping information; S833, the first 8 bytes of the hidden sectors to be deleted are all replaced by magic values Fill and re-add to the hidden space list and update value; S124: Store the changes of the hidden sectors to be deleted in the disk.

[0045] Specifically, step S84 includes the following steps: S841, if there are any ongoing hidden data write, update or delete operations, wait for these operations to complete to ensure that the hidden space list The hidden data in is consistent with the hidden data written on the disk; S842, refresh all the original data structures related to the hidden space to the disk; S843, clear the hidden data structure in the memory and release the hidden space list and hidden space size The memory of the TPM module is the second master key Export and erase the second master key in the TPM module ; S844. Uninstall the secure deletion system and then reinstall it to ensure that there is no code logic in the secure deletion system that can deny the storage system.

[0046] The present invention also discloses a deniable storage system with multi-snapshot security, which is used in the above-mentioned deniable storage method with multi-snapshot security, and provides an efficient and secure deletion module and a detachable hidden storage module, each of which is divided into a number of sub-modules. Through these two large modules, the reading, writing and deletion operations of public files can be efficiently realized, and the space occupied by the deleted files can be used to realize a hidden storage system with multi-snapshot security. Its structural diagram is shown in FIG. Figure 2 As shown, including: Safe deletion system initialization module: used to input the password of the safe deletion system to initialize the master key; Hidden storage system initialization module: used to input the password of the hidden storage system to initialize the master key; PPRF key tree module: used to store PPRF disk status through a tree structure; File key table module: used to encrypt and store encryption keys for all files; Hidden space table module: used to design deleted space and build storage space of deniable storage system; Efficient and secure deletion module: used to write / update, read and delete public files; Removable hidden storage module: used to write, update and delete hidden data. The hidden storage module can be uninstalled and reinstalled freely without affecting the public read and write performance, and has good scalability and security.

[0047] Specifically, the efficient and safe deletion template includes: Public file writing / updating module: Based on the PPRF key tree structure and file key table, the file is encrypted and stored. The file encryption key is encrypted and stored in the file key table using the key derived from the PPRF key tree. The file key is generated for the data to be written and stored on the disk after encryption. If there is a conflict with the hidden sector, the allocation strategy is adjusted dynamically. Obtain hidden sectors for public writing to improve space utilization.

[0048] Public file reading module: used to decrypt and read the specified file; Public file deletion module: Based on the PPRF puncture operation, the key of the specified file is punctured and the key table is updated, and the block storage space is collected at the same time.

[0049] Specifically, the detachable hidden storage module includes: Hidden data writing module: used to write data into the space collected in the public file deletion module; Hidden data update module: used to synchronize data changes to the hidden space; Hidden data deletion module: used to delete hidden data and reclaim part of the hidden space; Hidden storage uninstall module: used to uninstall the hidden data write, update and delete modules from the secure delete. When uninstalling, it synchronizes and persists the hidden data state, cleans up the structure in memory and the hidden key in the TPM, and restores the system to the secure delete state without hidden storage, ensuring that scalability and deniability are not affected.

[0050] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.

Claims

1. A deniable storage method with multi-snapshot security, characterized in that: The following steps are involved: S1. Generate system public parameters based on security parameters; S2, input the password of the secure deletion system to initialize the first master key; S3, input the password of the hidden storage system to initialize the second master key; S4, storing the disk state of PPRF in a tree structure to generate a first key tree; S5, encrypt and store the encryption keys of all files, and generate a first file key table; S6. Construct storage space for a deniable storage system; S7, write / update, read and delete public files; S8. Write, update and delete hidden data.

2. The deniable storage method with multi-snapshot security according to claim 1, characterized in that: Step S1 specifically includes: according to the security parameters Generate system common parameters ;in represents the key derivation algorithm; and Represents a symmetric cryptographic algorithm; Represents a puncturable pseudorandom function.

3. The deniable storage method with multi-snapshot security according to claim 2, characterized in that: Step S2 specifically includes: uniformly randomly selecting the first master key of the secure deletion system , according to the user password The first derived key , encrypt the first master key And stored in the TPM module .

4. The deniable storage method with multi-snapshot security according to claim 3, characterized in that: Step S3 specifically includes: uniformly randomly selecting a second master key of the hidden storage system , according to the user password The second derived key , encrypt the second master key And stored in the TPM module .

5. The deniable storage method with multi-snapshot security according to claim 4, characterized in that: Step S4 specifically includes: each leaf node includes an encrypted block in the PPRF state, each encrypted internal node includes a pointer to a child node in the tree and a first key required to decrypt the child node in the tree, and the first master key is used to decrypt the child node in the tree. Encrypt the second-layer nodes and obtain the left child nodes of the second-layer nodes and right node ,in is the key of the left child of the root node, It is the key of the right child node of the root node; the second-level nodes encrypt the third-level nodes until they reach the leaf nodes, thus constructing a complete first key tree.

6. The deniable storage method with multi-snapshot security according to claim 5, characterized in that: Step S5 specifically includes: encrypting and storing the encryption keys of all files at a fixed location on the disk, obtaining a first file key table, wherein the first file key table is divided into blocks of 4 KB each, and each 4 KB storage block is divided into blocks of 4 KB each. Includes 127 32-byte file keys and a single 8-byte tag value , 16 magic bytes and 8 bytes of padding, while maintaining the first atomic counter , used to indicate the current storage block The maximum value of the , which will be stored persistently.

7. The deniable storage method with multi-snapshot security according to claim 6, characterized in that: Step S6 specifically includes: storing the hidden space table and the actual hidden space together, starting multiple threads to scan the first eight bytes of all sectors and decrypt them when the deniable storage system is started, filtering out the hidden space using the magic value and offset value range, and constructing a hidden space linked list in the memory. Each item in the linked list is the detailed information of the underlying sector, and the size of the available hidden space is maintained in memory. , the size of each underlying sector is 512 bytes. The first eight bytes of the sector are used to identify the hidden volume and hidden sector where the sector is located; the first byte and the second byte are used to identify the hidden volume where the sector is located. The third to sixth bytes are used to identify the hidden logical sector LHS where the sector is located, the seventh byte is used to identify the offset of the sector in the hidden logical sector, and the eighth byte is used to identify the magic value. ; When a sector is included in the hidden space table, it is first marked as unused, the first eight bytes of the sector are filled with magic bytes, and the first master key is used Encryption; if a hidden sector is used, fill its first eight bytes in the same way.

8. The deniable storage method with multi-snapshot security according to claim 7, characterized in that: Step S7 specifically includes the following sub-steps: S71, based on the first key tree and the first file key table, generate a first encryption key for the public file, encrypt the public file using the first encryption key, then write the public file to the disk, and encrypt the first encryption key using the second encryption key of the first key tree and store it in the first file key table; S72, obtaining a second encryption key from the first file key table, decrypting the second encryption key to obtain the first encryption key, and decrypting the public file using the first encryption key to obtain the plain text; S73: intercept the deletion request, puncture the first encryption key of the public file corresponding to the deletion request, obtain the third encryption key, and encrypt the storage block using the third encryption key All file keys in the cipher are used to obtain the second file key table; at the same time, the first master key is rotated to obtain the third master key, the second layer nodes are encrypted using the third master key, and the second layer nodes encrypt the third layer nodes until the leaf nodes are reached, thus constructing a complete second key tree; Incrementing the first atomic counter to obtain a second atomic counter; The second file key table, the second key tree and the second atomic counter are written into the disk, thereby obtaining the storage space of the public file corresponding to the deletion request and obtaining the first storage space.

9. The deniable storage method with multi-snapshot security according to claim 8, characterized in that: In step S71, a first encryption key is generated for the public file, and the public file is encrypted and written to the disk. If there is a conflict with the hidden sector, the allocation strategy is dynamically adjusted, that is, the hidden space list is updated. Obtain hidden sectors for public files and write them to improve space utilization; the specific steps include: S711, extracting the sector information to be written from the bio; S712, comparing with the hidden sector record table in the memory, if there is an intersection and the hidden sector in the intersection is in use, reselecting sectors in the intersection; S713: If after reselection, there are still not enough sectors to meet the non-cross-use condition, then select the hidden space list. Take out the specified hidden sector for use; S714: If the intersection part is not used, remove the block space from the hidden space list. Removed; S715, for public documents Generate the first encryption key ; S716: Use the first encryption key Encrypting public files ; S717: Calculate the first encryption key The corresponding storage block ; S718: Calculate the first encryption key The storage block Storage location in ; S719, calculation storage block The second encryption key ; S7110, use the second encryption key Encrypting the first encryption key In storage block Position in .

10. The deniable storage method with multi-snapshot security according to claim 9, characterized in that: In step S72, the storage block is calculated according to the inode number. With location , using PPRF from the label Deriving the Second Encryption Key , specifically including the following steps: S721, by file inode number Calculate the corresponding storage block and location ; S722, calculate storage block The second encryption key , decrypt the first encryption key using the second encryption key , using the first encryption key For public documents Decrypt and read.

11. The deniable storage method with multi-snapshot security according to claim 10, characterized in that: Step S73 specifically includes the following steps: S731, intercept the delete request REQ_OP_DISCARD, through the file inode number Calculate the corresponding storage block and location ; S732: Replace storage block using random key Position b; S733, through PPRF puncture label The first encryption key at ; S734, Refresh Tag ; S735, increment atomic tag counter ; S736: Recalculate storage blocks The second encryption key , get the third encryption key ; S737: Use the third encryption key Encrypted storage blocks All file keys in the second file key table are obtained; S738: Rotate the first master key , get the third master key , through the third master key The second-layer nodes are encrypted, and the second-layer nodes encrypt the third-layer nodes until the leaf nodes are reached, thus constructing a complete second key tree; S739, writing the second key tree, the second file key table and the atomic calculator value into the disk; S7310: Read and record the physical sectors occupied by the public file corresponding to the deletion request. , recorded in the hidden space list in memory and marked as not in use; S7311. Returns the deletion success status and does not issue a cleanup command to the disk.

12. The deniable storage method with multi-snapshot security according to claim 11, characterized in that: Step S8 specifically includes the following steps: S81, writing hidden data into the first storage space; S82, when the hidden data is changed, the hidden data in the first storage space is synchronously updated; S83, deleting the hidden data, and reclaiming the storage space corresponding to the deleted hidden data; S84: Perform persistence processing on the current state of the hidden data, clear the second master key in the memory and TPM, and restore to a safe deletion state without hidden data storage.

13. The deniable storage method with multi-snapshot security according to claim 12, characterized in that: In step S81, check the size of the hidden space Is it enough to store hidden data? If not, delete the public files to obtain more first storage space, allocate hidden sectors and pass the second master key. Write after encryption, update the hidden space size ; The specific steps include: S811, obtaining the size of hidden data to be written in the write request ; S812, compare the size to be written and hidden space size , if the size to be written is >Hidden space size , then a request error is returned, and the public file is deleted to obtain more first storage space; S813. Calculate the number of hidden sectors actually required ; S814, from the hidden space list Take out Hidden sectors, initialize the hidden volume of each sector , hidden logical sector LHS, offset Offset and magic value ; S815, use the second master key Encrypted and retrieved separately Hidden sectors; S816, will be used Write the hidden sectors to the disk and remove them from the hidden space list Remove and update the hidden space size The value is written.

14. The deniable storage method with multi-snapshot security according to claim 13, characterized in that: In step S82, the number of hidden sectors is adjusted to adapt to the size of the updated hidden data to be written, and the corresponding mapping update and encryption write-back operations are performed; specifically, the following steps are included: S821, receiving an update request, and issuing a request to update hidden data, including the target logical volume , target logical hidden sector LHS', size of new data , content data pointer of new data; S822, search for current mapping information in the hidden space list Check whether there is a corresponding logical volume If there is no corresponding hidden logical sector LHS, a request error is returned and the update fails; S823. Calculate the number of hidden sectors required for updating , and read the current number of hidden sectors ; S824: If the required number of hidden sectors is equal to the current number of hidden sectors , update data on the original sector; S825: If the required number of hidden sectors is less than the current number of hidden sectors , release some hidden sectors that are no longer needed, remove the redundant hidden sectors from the current mapping, and return the corresponding physical sectors to the hidden space list , update the hidden space size ; S826: If the required number of hidden sectors is greater than the current number of hidden sectors , perform additional hidden sector expansion, and verify the number of additional extended sectors , If the number of additional sectors is expanded , then a request error is returned, and the public file is deleted to obtain more first storage space; If the number of additional sectors is expanded , then from the hidden space list The number of extra extended sectors taken out The number of hidden sectors is logically spliced ​​to the original number of hidden sectors Then initialize the hidden volume of each sector , hidden logical sector LHS, offset Offset, magic value ; S827. Execute step S815-step S816 to complete the update of hidden data.

15. The deniable storage method with multi-snapshot security according to claim 14, characterized in that: In step S83, the first eight bytes of the corresponding hidden sector are filled with magic values. , returned to the hidden space list , update the hidden space size , to achieve hidden data deletion; specifically including the following steps: S831, receiving a deletion request, searching for mapping information of the hidden data to be deleted, and Query the corresponding hidden volume and hidden logical sector LHS, if it does not exist, a request error is returned and the deletion fails; S832: Determine the number of hidden sectors to be deleted , obtain how many hidden sectors the corresponding hidden data occupies from the mapping information; S833, use magic value to replace the first 8 bytes of the hidden sector to be deleted Fill and re-add to the hidden space list and update value; S124. Store the changes of the hidden sectors to be deleted in the disk.

16. The deniable storage method with multi-snapshot security according to claim 15, characterized in that: Step S84 specifically includes the following steps: S841, if there are any ongoing hidden data write, update or delete operations, wait for these operations to complete to ensure that the hidden space list The hidden data in is consistent with the hidden data written on the disk; S842, refresh all the original data structures related to the hidden space to the disk; S843, clear the hidden data structure in the memory and release the hidden space list and hidden space size The memory of the TPM module is the second master key Export and erase the second master key in the TPM module ; S844. Uninstall the secure deletion system and then reinstall it to ensure that there is no code logic in the secure deletion system that can deny the storage system.

17. A deniable storage system with multi-snapshot security, used in a deniable storage method with multi-snapshot security as claimed in any one of claims 1 to 16, characterized in that: include: Safe deletion system initialization module: used to input the password of the safe deletion system to initialize the master key; Hidden storage system initialization module: used to input the password of the hidden storage system to initialize the master key; PPRF key tree module: used to store PPRF disk status through a tree structure; File key table module: used to encrypt and store encryption keys for all files; Hidden space table module: used to design deleted space and build storage space of deniable storage system; Efficient and secure deletion module: used to write / update, read and delete public files; Removable hidden storage module: used to write, update and delete hidden data.

Citation Information

Patent Citations

  • Method and system for safely deleting key-derived encrypted mobile terminal data

    CN108573176A

  • Security indexing system based on SGX

    CN110069946A

  • Android system data deletion method based on deniable storage encryption

    CN113806822A

  • Data security deletion method based on data encryption and overwriting

    CN115268793A

  • Data hiding and rapid destroying method

    CN117521140A