Secure shared storage system and method based on transparent encrypted projection and strong consistency
By using a secure shared storage system with transparent encrypted projection and strong consistency, the contradiction between plaintext access to storage devices and encrypted access from multiple terminals is resolved, achieving secure data consistency and efficient collaboration, suitable for scenarios such as personal data synchronization and enterprise document collaboration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN MM ELECTRONIC CO LTD
- Filing Date
- 2026-01-20
- Publication Date
- 2026-05-05
AI Technical Summary
Existing storage devices cannot simultaneously support high-speed plaintext access from computers and real-time consistent encrypted access from multiple mobile terminals. They also suffer from issues such as data leakage, weak security mechanisms, lack of end-to-end encryption for wireless transmission, and coarse-grained access control.
It adopts a secure shared storage system based on transparent encrypted projection and strong consistency. It utilizes a microcontroller unit (MCU), a trusted execution environment (TEE), a USB communication interface, and a wireless communication module. Through hardware root key generation, a transparent encrypted projection layer, and a global transaction log engine, it achieves encrypted data transmission and consistent access. It supports USB plaintext access and wireless end-to-end encryption, combined with fine-grained access control.
It achieves seamless integration of plaintext and encrypted access on a single physical storage medium, ensuring data integrity and security, supporting multi-terminal collaborative access, improving the system's robustness and the flexibility of access management, and meeting the compliance requirements of commercial cryptographic algorithms.
Smart Images

Figure CN121980587A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of information security and external storage devices, and in particular to a secure shared storage system and method based on transparent encrypted projection and strong consistency. Background Technology
[0002] With the increasing prevalence of mobile office and multi-device collaboration scenarios, more and more users expect portable storage devices to be able to be accessed directly and at high speed by general-purpose computers, while also providing secure remote sharing capabilities to multiple authorized mobile terminals. In existing solutions, some devices adopt a physical or logical partitioning architecture, dividing the storage medium into a "USB public zone" and a "user private zone": the former is exposed to the host operating system in plaintext or weak encryption to ensure compatibility, while the latter provides restricted access through a wireless interface. However, such solutions have significant drawbacks: 1. Lack of effective protection for the USB area: To ensure compatibility with general operating systems, the USB area is usually stored in plaintext, and sensitive data is at risk of being leaked if the device is lost; 2. Weak security mechanisms in the private area: Most devices rely on fixed keys or pure software encryption and do not integrate a hardware-level trusted execution environment (TEE), making them vulnerable to physical extraction, firmware tampering, or side-channel attacks; 3. Lack of end-to-end encryption for wireless transmission: Some devices only encrypt at the storage layer, and wireless communication is still transmitted in plaintext or with weak encryption, making them susceptible to man-in-the-middle attacks; 4. Coarse-grained access control: Usually only "full visibility" or "complete hiding" is supported, and fine-grained access control cannot be implemented based on user identity, path subtree, or operation type (such as read / write / delete); 5. Security gaps introduced by cross-area operations: When a user moves private files to the USB area, if decryption and reencryption are not completed atomically within the TEE, plaintext data may remain in the temporary buffer. Summary of the Invention
[0003] The primary objective of this invention is to address the problem in existing technologies that cannot simultaneously support high-speed plaintext access from computers and real-time consistent encrypted access from multiple mobile terminals. This invention provides a secure shared storage system based on transparent encrypted projection and strong consistency. This system can achieve seamless integration of plaintext and encrypted access on a single physical non-volatile storage medium and can still ensure data integrity even in the event of an unexpected power outage. It is suitable for application scenarios with stringent security requirements, such as personal data synchronization, enterprise document collaboration, and medical image sharing.
[0004] The second objective of this invention is to provide a secure shared storage method based on transparent encrypted projection and strong consistency.
[0005] The first objective of this invention is achieved through the following technical solution: a secure shared storage system based on transparent encrypted projection and strong consistency, comprising: a microcontroller unit (MCU) for configuring the protocol stack and controlling device operation; a trusted execution environment (TEE) closely cooperating with the MCU for secure key generation, encryption processing, and log management; and a USB communication interface for connecting to a host computer. It enables data transmission; a wireless communication module for establishing an encrypted channel with the mobile terminal; and a pluggable single physical non-volatile storage medium for physically storing file systems and encrypted data.
[0006] The single physical non-volatile storage medium is formatted as a single standard file system. Its entire directory tree File attribute metadata For the host connected via USB communication interface The first one connected via wireless communication module mobile terminals They are all completely identical;
[0007] The TEE generates a unique hardware root key for the device via a true random number generator (TRNG) during factory security programming or initial user security initialization. ,in Represents the set of all 256-bit binary strings, the device's unique hardware root key. It is permanently and non-exportable stored in a secure storage unit, ensuring that no polynomial-time adversary can extract the device’s unique hardware root key with a non-negligible probability.
[0008] The MCU is configured to deploy a transparent encrypted projection layer within the TEE. With the global transaction log engine It maintains both the USB mass storage protocol stack and the custom multi-host file access protocol stack during runtime.
[0009] Furthermore, the MCU implements the following collaborative functions:
[0010] When the USB communication interface detects After inserting and completing the USB mass storage device enumeration, the MCU configures the USB protocol stack to enter transparent proxy mode, allowing all... All read and write requests are handled by the TEE. Real-time interception and processing using a device-level fixed session key derived from the device's unique hardware root key. Encrypting and decrypting the data content enables... The plaintext file content is logically observed, while the SM4 ciphertext is always stored on the physical storage medium;
[0011] When the wireless communication module is with the first mobile terminals Establish a two-way authenticated encrypted channel based on TLS 1.3 and enabled with Chinese national cryptographic standards SM2 / SM4 or equivalent international cryptographic suites, and verify the validity of the TEE. Access token for a mobile terminal After that, immediately Start the independent Transparent encrypted projection session for a mobile terminal This allows it to see the agreement through the file protocol. Physically identical directory tree With file attribute metadata However, dynamically derived session keys are used during wireless communication. End-to-end encryption is used to protect the data content, while physical storage still relies on a fixed session key at the device level. Unified encryption and decryption, and all hosts access the same file. All operations are performed on the same physical data block location, ensuring a unique underlying storage layout;
[0012] From Or any number mobile terminals For the same file All write operations, including creating, modifying, deleting, and renaming, are uniformly converted into operations carrying a globally monotonically increasing sequence number. Encrypted log entries ,in Represents the set of natural numbers. Indicates the use of the device's unique hardware root key. Encryption operations, Indicates the operation type. Represents the file identifier. Indicates the amount of change in the operation; encrypted log entries are first sequentially appended to the non-volatile circular log area inside the TEE. Then the background replay thread Strictly follow the serial number Sequential atomic commits to the file system Thus ensuring With any number Storing ciphertext observed at any time ,size and modification time Completely consistent and with no perceptible delay.
[0013] Furthermore, the device's unique hardware root key The security requirements are met:
[0014] ;
[0015] In the formula, Indicates the probability of an event occurring. This represents an attack on a TEE by an adversary of arbitrary polynomial time. This indicates that the probability function can be ignored in cryptography;
[0016] The transparent encrypted projection layer Use a device-level fixed session key derived from the device's unique hardware root key. Encrypt and decrypt the data content, among which HKDF represents a key derivation function based on HMAC. The salt value is a random, unique string; all files accessed via the USB communication interface... Read operation ,pass Real-time decryption of stored ciphertext Obtain plaintext ,Right now:
[0017] ;
[0018] In the formula, the ciphertext is stored. This refers to a block of encrypted data stored on a single physical non-volatile storage medium. This indicates that the SM4 symmetric encryption algorithm uses a device-level fixed session key derived from the device's unique hardware root key. Decryption operations; all files accessed via the USB communication interface Write operation ,pass The file system is updated after encrypting plaintext in real time, that is:
[0019] ;
[0020] In the formula, update represents the file system. Update operation, This indicates that the SM4 symmetric encryption algorithm uses a device-level fixed session key derived from the device's unique hardware root key. Encryption operations.
[0021] Furthermore, the transparent encrypted projection layer For the first mobile terminals Transparent encrypted projection session Dynamically derive independent session keys The generation method is as follows:
[0022] ;
[0023] In the formula, This represents a bit concatenation operation. This represents Diffie-Hellman key exchange based on SM2 elliptic curves. Indicates the first mobile terminals The temporary SM2 public key provided during the TLS handshake, This indicates the SM2 private key temporarily generated by the TEE during this session. The salt value is a random, unique string; the first... mobile terminals For the file Read operation ,pass Real-time decryption of stored ciphertext Obtain plaintext ,Right now:
[0024] ;
[0025] In the formula, This indicates that the SM4 symmetric encryption algorithm uses dynamically derived session keys. Encryption operations, This indicates that the SM4 symmetric encryption algorithm uses dynamically derived session keys. The decryption operation; the first mobile terminals For the file Write operation ,pass The file system is updated after encrypting plaintext in real time, that is:
[0026] ;
[0027] In the formula, update represents the file system. The update operation; the transparent encrypted projection layer Ensure that the same file uses completely different encryption keys on different mobile devices and during different sessions, even if Repeated plugging and unplugging will not leak or affect any dynamically derived session key. .
[0028] Furthermore, the first mobile terminals Access token The TEE uses the device's built-in SM2 private key during the initial network configuration and binding. For structured loads Generate a digital signature:
[0029] ;
[0030] In the formula, This indicates a digital signature algorithm based on SM2;
[0031] ;
[0032] In the formula, Represents the device's unique identifier. Indicates the first A unique identifier for each user; This represents a permission bitmap, where bit 1 represents directory listing permission, bit 2 represents file read permission, bit 3 represents file write permission, and bit 4 represents delete or rename permission. This represents the allowed root path subtree. Indicates the token's expiration time. Indicates the token's unique identifier;
[0033] All subsequent wireless connections must meet the following conditions. Only then can it be opened :
[0034] ;
[0035] In the formula, This indicates a signature verification algorithm based on SM2. Indicates the device's public key. This indicates that the verification has passed. Indicates the current time. This indicates a comparison of less than. This indicates the token revocation list. This indicates that it does not belong to this category.
[0036] Furthermore, the global transaction log engine In log processing, the logs will come from or any For the same file Any write operation, including creating, modifying, deleting, and renaming, is uniformly converted to carrying a globally monotonically increasing sequence number. Encrypted log entries This encrypted log entry First, append data sequentially to the non-volatile circular log area inside the TEE. Then the background replay thread Strictly in accordance with Sequential atomic commits to the file system ,Right now:
[0037] ;
[0038] In the formula, Universal classifiers and Representing different timestamps, and Encrypted log entries representing different timestamps, This indicates a comparison of less than. This indicates an atomic commit operation. Indicates the precedence relationship in atomic order;
[0039] Holder of owner access token That is, satisfying Mobile terminals can request the generation of visitor sub-tokens from the TEE through an established encrypted channel. Visitor sub-token load satisfy:
[0040] ;
[0041] In the formula, This indicates a subset relationship of permissions. This represents a visitor permissions bitmap. This represents the master access bitmap. Indicates the expiration time of the visitor token. Indicates the expiration time of the master token; TEE pairs After independently performing SM2 signing, the visitor sub-token is securely issued via an encrypted channel. It also has the ability to open independent visitor sessions. The ability.
[0042] Furthermore, the transparent encrypted projection layer Combined with structured loads Permission bitmap in With the allowed root path subtree , for the first mobile terminals Transparent encrypted projection session Real-time construction of virtual file system views A virtual view, also known as a virtual view, satisfies the following:
[0043] ;
[0044] In the formula, Represents a set, Represents a file Belongs to the file system , Indicates conditional separation. Indicates the path to the file. express subtree, This represents logical AND. express Allows file operations; unauthorized directories and files in this transparent encrypted projection session. It exists that is completely invisible, untraversable, and uninferable, even if High-frequency read and write operations are being performed on these unauthorized regions;
[0045] TEE internally maintains a hash table-based token revocation list. ;hold Mobile terminals can send cancellation commands at any time. ,in Indicates the undo operation. Indicates the visitor token identifier, TEE will immediately join in And trigger a secure erase:
[0046] ;
[0047] In the formula, Indicates a safe erasure operation. Indicates the visitor session key. Indicates visitor plaintext caching; already established The access will be forcibly disconnected on the next file operation and a "Access token revoked" error will be returned.
[0048] Furthermore, the global transaction log engine Successfully played back any file After the modification operation, if Located in the most recent of the list, sorted by modification time from most recent to oldest. Among the modified hot files, The specified positive integer value will then be the corresponding plaintext. Hot file table cached in TEE secure memory Subsequently, TEE iterates through all established and active instances within a set time. mobile terminals Transparent encrypted projection session Only when At that time, the plaintext will be transmitted via the wireless communication module. Session keys derived dynamically After encryption, actively push to the corresponding ,Right now:
[0049] ;
[0050] In the formula, This indicates a conditional statement. Indicates wireless push operation. This indicates that the SM4 symmetric encryption algorithm uses dynamically derived session keys. Encryption operations.
[0051] The second objective of this invention is achieved through the following technical solution: a secure shared storage method based on transparent encrypted projection and strong consistency, applied to the aforementioned secure shared storage system based on transparent encrypted projection and strong consistency, comprising the following steps:
[0052] 1) After the device is powered on, it establishes and maintains a single standard file system on a single physical non-volatile storage medium. Its directory structure With file attribute metadata The file content is stored in plaintext form using the SM4 symmetric encryption algorithm (a national standard encryption algorithm); when connected to a host via a USB communication interface... During insertion, the device is logically accessed in plaintext as a mass storage device through a transparent encrypted proxy within the TEE.
[0053] 2) No. mobile terminals Establish a TLS 1.3 two-way authentication channel through the wireless communication module and submit the first... mobile terminals Access token ;
[0054] 3) TEE verification mobile terminals Access token After obtaining the signature, validity period, revocation status, and permissions, the first step is to enable... mobile terminals Transparent encrypted projection session And derive dynamically derived session keys. ;
[0055] 4) No. mobile terminals Accessing virtual views via SMB / WebDAV All read and write operations are handled by a transparent encryption projection layer. Real-time encryption and decryption, and conversion to serial number. Encrypted log entries Sequentially appended to the non-volatile circular log area inside the TEE ;
[0056] 5) Background playback thread Strictly follow the serial number encrypt log entries sequentially Atomic commit to file system This ensures strong consistency across hosts.
[0057] 6) After a hot file is modified, the update is actively pushed to all connected mobile terminals with access permissions within a set time. All write operations are atomically written to disk before returning confirmation to ensure data consistency under power failure at any time.
[0058] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0059] 1. Achieves dual-mode transparent access on a single physical non-volatile storage medium: By deploying a transparent encryption projection layer within a Trusted Execution Environment (TEE), the USB host can logically access the data in plaintext as a regular USB flash drive, while the mobile terminal obtains an end-to-end encrypted view via a wireless channel. Both share the same file system structure and underlying data entities, effectively resolving the contradiction in traditional solutions where "plaintext access means loss of security" or "encrypted access means sacrifice of compatibility," eliminating the need for users to manually switch modes or copy files.
[0060] 2. Improved reliability and data integrity for concurrent access from multiple devices: All write operations from the host or mobile terminal are converted into encrypted log entries with global sequence numbers and sequentially appended to the non-volatile circular log area within the TEE, before being committed to the file system by a background thread. This approach not only supports transaction rollback and data recovery in the event of an unexpected power outage, but also avoids metadata corruption or file damage caused by concurrent modifications from multiple clients, significantly enhancing system robustness.
[0061] 3. Provides fine-grained, dynamically revocable access control: The structured access token based on SM2 signature supports permission bitmap and path subtree restrictions. The transparent encrypted projection layer constructs an isolated virtual file view for each session in real time. Directories and files in unauthorized areas are completely invisible, untraversable, and uninferable for the session. The device owner can generate visitor sub-tokens with restricted permissions and supports remote real-time revocation and secure erasure of session keys, greatly improving the flexibility and security of permission management.
[0062] 4. Balancing high performance and cryptographic compliance: The USB side employs a fixed session key derived from the hardware root key to achieve low-latency transparent proxying; the wireless side dynamically generates session keys through SM2 ECDH key negotiation to ensure forward security. SM4 symmetric encryption is used throughout to protect static data, and SM2 digital signatures verify token legitimacy, fully meeting commercial cryptographic algorithm compliance requirements.
[0063] 5. Supports proactive push of frequently modified files for optimized collaborative experience: The system caches recently modified frequently modified files in plaintext in TEE secure memory and proactively pushes updates only to active mobile terminals with access permissions, encrypting them with their exclusive session keys. This method avoids redundant polling, reduces wireless bandwidth consumption, and is suitable for time-sensitive scenarios such as mobile office and medical image sharing.
[0064] In summary, this invention enables secure, efficient, and reliable multi-device shared storage on local hardware devices without relying on networks or cloud services. It overcomes the shortcomings of traditional USB flash drives, which lack encryption capabilities, cloud storage, which cannot be used offline, and the fact that most encrypted devices do not support seamless collaboration between computers and mobile phones. It provides a new solution with high security, low latency, and ease of use for personal privacy protection, enterprise document collaboration, and on-site exchange of sensitive data. Attached Figure Description
[0065] Figure 1 This is a block diagram illustrating the hardware structure of the secure shared storage system of the present invention.
[0066] Figure 2 Workflow diagram for the transparent encryption projection layer and global transaction log engine. Detailed Implementation
[0067] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0068] Example 1
[0069] like Figure 1 and Figure 2 As shown, this embodiment discloses a secure shared storage system based on transparent encrypted projection and strong consistency, including: a microcontroller unit (MCU), a trusted execution environment (TEE) closely cooperating with the MCU, a USB communication interface, a wireless communication module, and a pluggable single physical non-volatile storage medium; the single physical non-volatile storage medium is formatted as a single standard file system. Its entire directory tree With file attribute metadata For the host connected via USB communication interface The first one connected via wireless communication module mobile terminals All are completely identical; in this embodiment, the MCU uses a Rockchip RK3566 quad-core Cortex-A55 SoC with built-in ARM TrustZone security extension; the TEE runs the OP-TEE 3.20 open-source trusted execution environment; the USB communication interface supports the USB 2.0 High-Speed MSC protocol; the wireless communication module uses a Realtek RTL8822CS chip; the non-volatile storage medium is a SanDisk 128GB MicroSDXC card; the file system uses the exFAT format, in which directory entries, FAT tables, and cluster bitmaps are stored in plaintext to ensure that common operating systems such as Windows / macOS / Linux can recognize them without drivers, while all file content data blocks are encrypted in SM4-CBC mode and written to physical sectors to form a unique physical ciphertext representation. .
[0070] The TEE generates a unique hardware root key for the device via a true random number generator (TRNG) during factory security programming or initial user security initialization. ,in This represents the set of all 256-bit binary strings. The device's unique hardware root key is permanently and non-extractable stored in a secure storage unit, ensuring that no polynomial-time adversary can extract the device's unique hardware root key with a non-negligible probability. The TRNG invokes the RK3566 SoC hardware entropy source, and the generation process conforms to the NIST SP 800-90B standard. It is locked in the RPMB secure storage area of the OP-TEE, and is prohibited from being read by any software.
[0071] The MCU is configured to deploy a transparent encrypted projection layer within the TEE. With the global transaction log engine It also maintains both the USB mass storage protocol stack and a custom multi-host file access protocol stack during runtime to achieve the following collaborative functions:
[0072] When the USB communication interface detects the host. After inserting and completing the USB mass storage device enumeration, the MCU configures the USB protocol stack to enter transparent proxy mode. All read and write requests to the file system F are handled by the TEE. Real-time interception and processing using a device-level fixed session key derived from the device's unique hardware root key. Encrypting and decrypting the data content enables... The plaintext file content is logically observed, while the SM4 ciphertext is always stored on a single physical non-volatile storage medium; among which, via HKDF-SHA256 Derivation, specifically: This key remains fixed throughout the device's lifecycle and is used for all USB-side SM4-CBC encryption and decryption operations. The initialization vector (IV) is generated from the file path and cluster offset hash to ensure semantic security.
[0073] When the wireless communication module is with the first mobile terminals Establish a two-way authenticated encrypted channel based on TLS 1.3 and with SM2 / SM4 or equivalent cipher suites enabled, and verify the validity of the TEE. Access token for a mobile terminal After that, immediately Start a separate transparent encrypted projection session This allows it to see the agreement through the file protocol. Physically identical directory tree With file attribute metadata However, dynamically derived session keys are used during wireless transmission. End-to-end encryption is used to protect the data content, while the physical storage remains fixed. Unified encryption and decryption, and all hosts access the same file. All operations apply to the same physical data block location; among them, Real-time generation via SM2-ECDH key negotiation: The TEE generates a temporary SM2 private key during the TLS handshake. , combined Provided temporary public key Calculate the shared key Then derived from HKDF: Each session has an independent key, providing forward security. The HKDF input includes a hardware root key. Ensure that the session key is strongly bound to the device.
[0074] From Or any number mobile terminals For the same file All write operations, including creating, modifying, deleting, and renaming, are uniformly converted into operations carrying a globally monotonically increasing sequence number. Encrypted log entries ,in Represents the set of natural numbers. Indicates the use of the device's unique hardware root key. Encryption operation (attached authentication data AAD is empty). Indicates the operation type (1 byte: 0x01=Create, 0x02=Modify, 0x03=Delete, 0x04=Rename). Represents the file identifier (takes the lower 64 bits of the SM3 hash value of the exFAT short filename). Indicating changes in operations (such as a pointer to the new ciphertext, or a UTF-8 string representing the old path), encrypted log entries are first sequentially appended to the non-volatile circular log area inside the TEE. (Located in RPMB), then replayed by a background thread. Strictly follow the serial number Sequential atomic commits to the file system Thus ensuring With any number The file content observed at any given time (stored as ciphertext) ,size Modification time Completely consistent and with no perceptible delay.
[0075] The transparent encrypted projection layer Use a device-level fixed session key derived from the device's unique hardware root key. Encrypt and decrypt the data content; all file access is done via the USB communication interface. Read operation ,pass Real-time decryption of stored ciphertext Obtain plaintext ,Right now:
[0076] ;
[0077] In the formula, This refers to a block of encrypted data stored on a single physical non-volatile storage medium. This indicates that the SM4 symmetric encryption algorithm uses a device-level fixed session key derived from the device's unique hardware root key. Decryption operations; all files accessed via the USB communication interface Write operation ,pass The file system is updated after encrypting plaintext in real time, that is:
[0078] ;
[0079] In the formula, update represents the file system. Update operation, This indicates that the SM4 symmetric encryption algorithm uses a device-level fixed session key derived from the device's unique hardware root key. Encryption operations.
[0080] Furthermore, the transparent encrypted projection layer For the first mobile terminals Transparent encrypted projection session Dynamically derive independent session keys Its generation method is as follows:
[0081] ;
[0082] In the formula, This represents a bit concatenation operation. This represents Diffie-Hellman key exchange based on SM2 elliptic curves. Indicates the first mobile terminals The temporary SM2 public key provided during the TLS handshake, This indicates the SM2 private key temporarily generated by the TEE during this session. The salt value is a random and unique string. mobile terminals For the file Read operation ,pass Real-time decryption of stored ciphertext Obtain plaintext TEE first uses Decrypting physical ciphertext Obtain the logical plaintext, then use After encryption, it is returned via a wireless channel, that is:
[0083] ;
[0084] In the formula, This indicates that the SM4 symmetric encryption algorithm uses dynamically derived session keys. The decryption operation; the first mobile terminals For the file Write operation ,pass The TEE first uses real-time encryption of plaintext followed by updating the file system. Decrypt the received ciphertext to obtain the logical plaintext, then use... The physical storage is updated after encryption, i.e.:
[0085] ;
[0086] In the formula, update represents the file system. Update operation, This indicates that the SM4 symmetric encryption algorithm uses dynamically derived session keys. The encryption operation; the transparent encryption projection layer ensures that the same file uses completely different encryption keys on different mobile devices and during different sessions, even if Repeated plugging and unplugging will not leak or affect any dynamically derived session key. .
[0087] Furthermore, the first mobile terminals Access token The TEE uses the device's built-in SM2 private key during the initial network configuration and binding. For structured loads Generate a digital signature:
[0088] ;
[0089] In the formula, This indicates a digital signature algorithm based on SM2;
[0090] ;
[0091] In the formula, This represents a 16-byte unique chip ID for the SoC. The table contains 16-byte user UUIDs. The permission bitmap represents permissions (bit 1 represents directory listing permission, bit 2 represents file read permission, bit 3 represents file write permission, and bit 4 represents delete or rename permission). This represents the allowed root path subtree. Indicates the token's expiration time. Indicates the token's unique identifier;
[0092] All subsequent wireless connections must meet the following conditions. Only then can it be opened :
[0093] ;
[0094] In the formula, This indicates a signature verification algorithm based on SM2. Indicates the device's public key. This indicates that the verification has passed. Indicates the current time. This indicates a comparison of less than. This represents the token revocation list (implemented based on a hash table, with a maximum capacity of 1024 items). This indicates that it does not belong to this category.
[0095] Furthermore, the global transaction log engine In log processing, the logs will come from or any For the same file Any write operation, including creating, modifying, deleting, and renaming, will be uniformly converted to carrying a globally monotonically increasing sequence number. Encrypted log entries This encrypted log entry First, append data sequentially to the non-volatile circular log area inside the TEE. Then the background replay thread Strictly in accordance with Sequential atomic commits to the file system ,Right now:
[0096] ;
[0097] In the formula, Universal classifiers and Representing different timestamps, and Encrypted log entries representing different timestamps, This indicates a comparison of less than. This indicates an atomic commit operation, which includes three steps: 1) parsing the log; 2) updating the exFAT directory entry and the FAT table; 3) calling the eMMC CMD13 command to force a disk flush; uncommitted logs can be replayed after a power outage to ensure strong consistency. Indicates the precedence relation of atomic order; holding the master access token That is, satisfying Mobile terminals can request the generation of a visitor sub-token from the TEE through the established encrypted channel. Visitor sub-token load satisfy:
[0098] ;
[0099] In the formula, This indicates a subset relationship of permissions. This represents a visitor permissions bitmap. This represents the master access bitmap. Indicates the expiration time of the visitor token. Indicates the expiration time of the master token; TEE pairs After independently performing SM2 signing, the visitor sub-token is securely issued via an encrypted channel. It also has the ability to open independent visitor sessions. The ability.
[0100] Furthermore, the transparent encrypted projection layer Combined with structured loads Permission bitmap in With the allowed root path subtree , for the first Transparent encrypted projection session for a mobile terminal Real-time construction of virtual file system views (referred to as virtual view), satisfying:
[0101] ;
[0102] In the formula, Represents a set, Represents a file Belongs to the file system , Indicates conditional separation. Indicates the path to the file. express subtree, This represents logical AND. express Allows file operations; unauthorized directories and files in this transparent encrypted projection session. Completely invisible, untraversable, and uninferable in existence, even High-frequency read and write operations are being performed on these unauthorized regions;
[0103] TEE internally maintains a hash table-based token revocation list. ;hold The mobile terminal can send a cancellation command at any time. ,in Indicates the undo operation. Indicates the visitor token identifier, TEE will immediately join in And trigger a secure erase:
[0104] ;
[0105] In the formula, Indicates a safe erasure operation. Indicates the visitor session key. Indicates visitor plaintext caching; already established The access will be forcibly disconnected on the next file operation and a "Access token revoked" error will be returned.
[0106] Furthermore, the global transaction log engine Successfully played back any file After the modification operation, if Located in the most recent of the list, sorted by modification time from most recent to oldest. Among the modified hot files, The specified positive integer value will then be the corresponding plaintext. Hot file table cached in TEE secure memory Subsequently, TEE iterates through all established and active instances within a set time. Only when At that time, the plaintext will be transmitted via the wireless communication module. Session keys derived dynamically After encryption, actively push to the corresponding ,Right now:
[0107] ;
[0108] In the formula, This indicates a conditional statement. Indicates wireless push operation. This indicates that the SM4 symmetric encryption algorithm uses dynamically derived session keys. Encryption operations.
[0109] Example 2
[0110] This embodiment discloses a secure shared storage method based on transparent encrypted projection and strong consistency, applied to the secure shared storage system based on transparent encrypted projection and strong consistency described in Embodiment 1, including the following steps:
[0111] 1) After the device is powered on, it establishes and maintains a single standard file system on a single physical non-volatile storage medium. Its directory structure With file attribute metadata The file content is stored in plaintext form using the SM4 symmetric encryption algorithm (a national standard encryption algorithm); when connected to a host via a USB communication interface... During insertion, the device is logically accessed in plaintext as a mass storage device through a transparent encrypted proxy within the TEE.
[0112] 2) No. mobile terminals Establish a TLS 1.3 two-way authentication channel through the wireless communication module and submit the first... mobile terminals Access token ;
[0113] 3) TEE verification mobile terminals Access token After obtaining the signature, validity period, revocation status, and permissions, the first step is to enable... mobile terminals Transparent encrypted projection session And derive dynamically derived session keys. ;
[0114] 4) No. mobile terminals Accessing virtual views via SMB / WebDAV All read and write operations are handled by a transparent encryption projection layer. Real-time encryption and decryption, and conversion to serial number. Encrypted log entries Sequentially appended to the non-volatile circular log area inside the TEE ;
[0115] 5) Background playback thread Strictly follow the serial number encrypt log entries sequentially Atomic commit to file system This ensures strong consistency across hosts.
[0116] 6) After a hot file is modified, the update is actively pushed to all connected mobile terminals with access permissions within a set time. All write operations are atomically written to disk before returning confirmation to ensure data consistency under power failure at any time.
[0117] Testing showed that this embodiment supports concurrent access from one USB host and up to 15 mobile terminals. All write operations are atomically written to disk before confirmation is returned, ensuring data consistency in the event of an unexpected power outage. All operations meet SM2 / SM4 compliance requirements and are suitable for high-security scenarios such as medical imaging and enterprise document collaboration.
[0118] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. All equivalent variations made in accordance with the shape, structure, and principle of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A secure shared storage system based on transparent encrypted projection and strong consistency, characterized in that, include: The microcontroller unit (MCU) is used to configure the protocol stack and control device operation; the trusted execution environment (TEE) works closely with the MCU for secure key generation, encryption processing, and log management. USB communication interface, used to connect to the host. It enables data transmission; a wireless communication module for establishing an encrypted channel with the mobile terminal; and a pluggable single physical non-volatile storage medium for physically storing file systems and encrypted data. The single physical non-volatile storage medium is formatted as a single standard file system. Its entire directory tree File attribute metadata For the host connected via USB communication interface The first one connected via wireless communication module mobile terminals They are all completely identical; The TEE generates a unique hardware root key for the device via a true random number generator (TRNG) during factory security programming or initial user security initialization. ,in Represents the set of all 256-bit binary strings, the device's unique hardware root key. It is permanently and non-exportable stored in a secure storage unit, ensuring that no polynomial-time adversary can extract the device’s unique hardware root key with a non-negligible probability. The MCU is configured to deploy a transparent encrypted projection layer within the TEE. With the global transaction log engine It maintains both the USB mass storage protocol stack and the custom multi-host file access protocol stack during runtime.
2. The secure shared storage system based on transparent encrypted projection and strong consistency according to claim 1, characterized in that, The MCU implements the following collaborative functions: When the USB communication interface detects After inserting and completing the USB mass storage device enumeration, the MCU configures the USB protocol stack to enter transparent proxy mode, allowing all... All read and write requests are handled by the TEE. Real-time interception and processing using a device-level fixed session key derived from the device's unique hardware root key. Encrypting and decrypting the data content enables... The plaintext file content is logically observed, while the SM4 ciphertext is always stored on the physical storage medium; When the wireless communication module is with the first mobile terminals Establish a two-way authenticated encrypted channel based on TLS 1.3 and enabled with Chinese national cryptographic standards SM2 / SM4 or equivalent international cryptographic suites, and verify the validity of the TEE. Access token for a mobile terminal After that, immediately Start the independent Transparent encrypted projection session for a mobile terminal This allows it to see the agreement through the file protocol. Physically identical directory tree With file attribute metadata However, dynamically derived session keys are used during wireless communication. End-to-end encryption is used to protect the data content, while physical storage still relies on a fixed session key at the device level. Unified encryption and decryption, and all hosts access the same file. All operations are performed on the same physical data block location, ensuring a unique underlying storage layout; From Or any number mobile terminals For the same file All write operations, including creating, modifying, deleting, and renaming, are uniformly converted into operations carrying a globally monotonically increasing sequence number. Encrypted log entries ,in Represents the set of natural numbers. Indicates the use of the device's unique hardware root key. Encryption operations, Indicates the operation type. Represents the file identifier. Indicates the amount of change in the operation; encrypted log entries are first sequentially appended to the non-volatile circular log area inside the TEE. Then the background replay thread Strictly follow the serial number Sequential atomic commits to the file system Thus ensuring With any number Storing ciphertext observed at any time ,size and modification time Completely consistent and with no perceptible delay.
3. The secure shared storage system based on transparent encrypted projection and strong consistency according to claim 2, characterized in that, The device's unique hardware root key The security requirements are met: ; In the formula, Indicates the probability of an event occurring. This represents an attack on a TEE by an adversary of arbitrary polynomial time. This indicates that the probability function can be ignored in cryptography; The transparent encrypted projection layer Use a device-level fixed session key derived from the device's unique hardware root key. Encrypt and decrypt the data content, among which HKDF represents a key derivation function based on HMAC. The salt value is a random and unique string. All files are accessed via the USB communication interface. Read operation ,pass Real-time decryption of stored ciphertext Obtain plaintext ,Right now: ; In the formula, the ciphertext is stored. This refers to a block of encrypted data stored on a single physical non-volatile storage medium. This indicates that the SM4 symmetric encryption algorithm uses a device-level fixed session key derived from the device's unique hardware root key. Decryption operations; all files accessed via the USB communication interface Write operation ,pass The file system is updated after encrypting plaintext in real time, that is: ; In the formula, update represents the file system. Update operation, This indicates that the SM4 symmetric encryption algorithm uses a device-level fixed session key derived from the device's unique hardware root key. Encryption operations.
4. The secure shared storage system based on transparent encrypted projection and strong consistency according to claim 3, characterized in that, The transparent encrypted projection layer For the first mobile terminals Transparent encrypted projection session Dynamically derive independent session keys The generation method is as follows: ; In the formula, This represents a bit concatenation operation. This represents Diffie-Hellman key exchange based on SM2 elliptic curves. Indicates the first mobile terminals The temporary SM2 public key provided during the TLS handshake, This indicates the SM2 private key temporarily generated by the TEE during this session. The salt value is a random, unique string; the first... mobile terminals For the file Read operation ,pass Real-time decryption of stored ciphertext Obtain plaintext ,Right now: ; In the formula, This indicates that the SM4 symmetric encryption algorithm uses dynamically derived session keys. Encryption operations, This indicates that the SM4 symmetric encryption algorithm uses dynamically derived session keys. The decryption operation; the first mobile terminals For the file Write operation ,pass The file system is updated after encrypting plaintext in real time, that is: ; In the formula, update represents the file system. The update operation; the transparent encrypted projection layer Ensure that the same file uses completely different encryption keys on different mobile devices and during different sessions, even if Repeated plugging and unplugging will not leak or affect any dynamically derived session key. .
5. The secure shared storage system based on transparent encrypted projection and strong consistency according to claim 4, characterized in that, The first mobile terminals Access token The TEE uses the device's built-in SM2 private key during the initial network configuration and binding. For structured loads Generate a digital signature: ; In the formula, This indicates a digital signature algorithm based on SM2; ; In the formula, Represents the device's unique identifier. Indicates the first A unique identifier for each user; This represents a permission bitmap, where bit 1 represents directory listing permission, bit 2 represents file read permission, bit 3 represents file write permission, and bit 4 represents delete or rename permission. This represents the allowed root path subtree. Indicates the token's expiration time. Indicates the token's unique identifier; All subsequent wireless connections must meet the following conditions. Only then can it be opened : ; In the formula, This indicates a signature verification algorithm based on SM2. Indicates the device's public key. This indicates that the verification has passed. Indicates the current time. This indicates a comparison of less than. This indicates the token revocation list. This indicates that it does not belong to this category.
6. The secure shared storage system based on transparent encrypted projection and strong consistency according to claim 5, characterized in that, The global transaction log engine In log processing, the logs will come from or any For the same file Any write operation, including creating, modifying, deleting, and renaming, is uniformly converted to carrying a globally monotonically increasing sequence number. Encrypted log entries This encrypted log entry First, sequentially append to the non-volatile circular log area inside the TEE. Then the background replay thread Strictly in accordance with Sequential atomic commits to the file system ,Right now: ; In the formula, Universal classifiers and Representing different timestamps, and Encrypted log entries representing different timestamps, This indicates a comparison of less than. This indicates an atomic commit operation. Indicates the precedence relationship in atomic order; Holder of owner access token That is, satisfying Mobile terminals can request the generation of visitor sub-tokens from the TEE through an established encrypted channel. Visitor sub-token load satisfy: ; In the formula, This indicates a subset relationship of permissions. This represents a visitor permissions bitmap. This represents the master access bitmap. Indicates the expiration time of the visitor token. Indicates the expiration time of the owner's token; TEE After independently performing SM2 signing, the visitor sub-token is securely issued via an encrypted channel. It also has the ability to open independent visitor sessions. The ability.
7. The secure shared storage system based on transparent encrypted projection and strong consistency according to claim 6, characterized in that, The transparent encrypted projection layer Combined with structured loads Permission bitmap in With the allowed root path subtree , for the first mobile terminals Transparent encrypted projection session Real-time construction of virtual file system views A virtual view, also known as a virtual view, satisfies the following: ; In the formula, Represents a set, Represents a file Belongs to the file system , Indicates conditional separation. Indicates the path to the file. express subtree, This represents logical AND. express Allows file operations; unauthorized directories and files in this transparent encrypted projection session. It exists that is completely invisible, untraversable, and uninferable, even if High-frequency read and write operations are being performed on these unauthorized regions; TEE internally maintains a hash table-based token revocation list. ;hold Mobile terminals can send cancellation commands at any time. ,in Indicates the undo operation. Indicates the visitor token identifier, TEE will immediately join in And trigger a secure erase: ; In the formula, Indicates a safe erasure operation. Indicates the visitor session key. Indicates visitor plaintext caching; already established The access will be forcibly disconnected on the next file operation and a "Access token revoked" error will be returned.
8. The secure shared storage system based on transparent encrypted projection and strong consistency according to claim 7, characterized in that, The global transaction log engine Successfully played back any file After the modification operation, if Located in the most recent of the list, sorted by modification time from most recent to oldest. Among the modified hot files, The specified positive integer value will then be the corresponding plaintext. Hot file table cached in TEE secure memory ; Subsequently, TEE iterates through all established and active instances within a set time. mobile terminals Transparent encrypted projection session Only when At that time, the plaintext will be transmitted via the wireless communication module. Session keys derived dynamically After encryption, actively push to the corresponding ,Right now: ; In the formula, This indicates a conditional statement. Indicates wireless push operation. This indicates that the SM4 symmetric encryption algorithm uses dynamically derived session keys. Encryption operations.
9. A secure shared storage method based on transparent encrypted projection and strong consistency, characterized in that, The secure shared storage system based on transparent encrypted projection and strong consistency, as described in any one of claims 1–8, comprises the following steps: 1) After the device is powered on, it establishes and maintains a single standard file system on a single physical non-volatile storage medium. Its directory structure With file attribute metadata The file content is stored in plaintext form using the SM4 symmetric encryption algorithm (a national standard encryption algorithm); when connected to a host via a USB communication interface... During insertion, the device is logically accessed in plaintext as a mass storage device through a transparent encrypted proxy within the TEE. 2) No. mobile terminals Establish a TLS 1.3 two-way authentication channel through the wireless communication module and submit the first... mobile terminals Access token ; 3) TEE verification mobile terminals Access token After obtaining the signature, validity period, revocation status, and permissions, the first step is to enable... mobile terminals Transparent encrypted projection session And derive dynamically derived session keys. ; 4) No. mobile terminals Accessing virtual views via SMB / WebDAV All read and write operations are handled by a transparent encryption projection layer. Real-time encryption and decryption, and conversion to serial number. Encrypted log entries Sequentially appended to the non-volatile circular log area inside the TEE ; 5) Background playback thread Strictly follow the serial number encrypt log entries sequentially Atomic commit to file system This ensures strong consistency across hosts. 6) After a hot file is modified, the update is actively pushed to all connected mobile terminals with access permissions within a set time. All write operations are atomically written to disk before returning confirmation to ensure data consistency under power failure at any time.