Security U disk data processing method and system suitable for power grid sensitive computing environment
By combining adaptive throughput selection and optimized parameters with drift spectrum, superblock parallel authentication encryption is generated, which solves the problems of insufficient throughput and time delay tail of secure USB flash drives in power grid sensitive computing environments, and realizes secure USB flash drive data processing with high parallelism and high reliability.
Patent Information
- Application Number
- CN202511569490.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-10-30
AI Technical Summary
Existing secure USB flash drives have insufficient throughput in power grid-sensitive computing environments. Fixed throughput parameters lead to a sharp drop in performance under extreme conditions. They cannot adapt to aging and environmental changes. Furthermore, authentication and encryption overhead is high, and the number of bus round trips is high, resulting in long tails and poor stability during writes.
By obtaining the bit-flip distribution of physically unclonable features to form a drift spectrum, and combining throughput events and failure events to perform adaptive throughput selection, a superblock parallel authentication encryption and error correction collaboration is generated. A unique initialization vector is generated using a hash ticket chain to optimize parallelism, aggregation and window depth, and reduce write amplification and latency.
It achieves stable throughput under extreme environments and aging scenarios, reduces fluctuations, improves the steady-state throughput of the secure USB flash drive and reduces latency, enhances the parallelism and reliability of the secure USB flash drive, and avoids the problems of switching lag and incompatible throughput parameters in existing technologies.
Smart Images

Figure CN121030826B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of information security and embedded storage technology, and in particular to a secure USB flash drive data processing method and system, electronic device, and computer-readable storage medium suitable for power grid-sensitive computing environments. Background Technology
[0002] Sensitive hosts within the power grid intranet typically operate under a strategy of "physical isolation + whitelisted peripherals + prohibition of custom driver installation." Cross-domain data exchange and long-term retention heavily rely on removable media, with USB flash drives becoming the mainstream carrier due to their plug-and-play functionality and universal protocols. In sensitive computing scenarios within the power grid, secure USB flash drives must simultaneously meet stringent requirements for confidentiality, integrity, auditability, and availability. Furthermore, the widespread use of mixed workloads such as small-block random I / O (4–8KB), intermittent writes, and batch archiving in power grid business terminals presents even more stringent challenges to traditional "controller + firmware AES" type secure USB flash drives in terms of throughput, latency stability, and lifespan management.
[0003] Currently, existing secure USB drives typically use a symmetric encryption core (such as AES-GCM or SM4-GCM) within the main controller firmware to perform authentication encryption (AEAD) of associated data, and then use a flash memory translation layer to complete page / block mapping and wear leveling. However, in scenarios with small-block random writes, AEAD is frequently triggered, and the startup overhead of AEAD (including one-time random number / counter management, GHASH multiplication, data / tag transfer, etc.) will account for a significant proportion, making it difficult to fully utilize the actual bandwidth of the secure USB drive, resulting in insufficient throughput. Furthermore, the multiple transfers between DMA and on-chip SRAM further amplify the number of bus round trips and energy consumption, leading to a significant write tail. In addition, existing secure USB drives usually adopt a fixed throughput parameter mechanism or a simple threshold switching mechanism, which is not sensitive to device aging and environmental fluctuations, causing stability and throughput to deteriorate simultaneously under extreme conditions. Moreover, setting the three types of throughput parameters (parallelism, aggregation, and window depth) separately ignores the coupling between the three parameters, and there are also problems with switching lag and jitter. Furthermore, for sensitive hosts, it is not possible to introduce custom aggregation / caching strategies on the host side to cooperate with the device side (i.e., secure USB drives), so optimization must be implemented within the USB drive hardware and firmware as much as possible. Summary of the Invention
[0004] This invention provides a secure USB flash drive data processing method and system, electronic device, and computer-readable storage medium suitable for power grid sensitive computing environments. It can achieve adaptive throughput selection, which not only improves the steady-state throughput of the secure USB flash drive and reduces fluctuations, but also maintains stable throughput in extreme environments or aging scenarios. The pipeline utilization is closer to the bandwidth limit of the secure USB flash drive, and it can also significantly reduce the convergence time tail.
[0005] According to one aspect of the present invention, a secure USB flash drive data processing method suitable for power grid-sensitive computing environments is provided, comprising the following:
[0006] Obtain the bit-flip distribution of physically unclonable features under current temperature and voltage conditions to form a drift spectrum;
[0007] The throughput events and failure events of the previous time slice are statistically analyzed, and adaptive throughput selection is performed in combination with the drift spectrum to obtain the optimal throughput level. The throughput level is a triplet composed of parallelism, aggregation, and window depth.
[0008] Based on the aggregation degree and window depth in the optimal throughput tier, small block aggregation and write merging are performed to generate multiple superblocks to be encrypted;
[0009] A unique initialization vector is generated based on the hash ticket chain and the metadata of each superblock;
[0010] Based on the parallelism of the optimal throughput level, start the corresponding number of encryption pipelines, and use the corresponding initialization vector to perform parallel authentication encryption and error correction coordination on multiple superblocks to generate page data;
[0011] The leaf hash of the Merkle tree is calculated based on the initialization vector, the ciphertext in the page data, and the authentication tag, and the page data is written to the flash page.
[0012] Furthermore, an upper confidence bound strategy is adopted during the adaptive throughput selection process, and the optimal throughput level is calculated based on the following formula:
[0013] ;
[0014] in, This represents the action set in the t-th time slice. The optimal throughput level is selected from the given values, where L represents parallelism, B represents aggregation, and W represents window depth. Indicates the exploration coefficient. Represents the logarithm of time t. This indicates the number of times the specified throughput level is selected within a unit of time in the t-th time slice. This represents the throughput per unit time minus a failure rate-weighted penalty term, the recursive formula for which is: , , , This represents the initial value of the penalty term. This indicates the factory settings for throughput. This represents the expected failure under the current drift spectrum. Indicates the baseline penalty weight. This represents the throughput within the t-th time slice. This represents the failure penalty weight for the t-th time slice. , This represents the penalty amplification factor. This represents the 95th percentile in a bit-flipped distribution. This represents the drift mapping function, used to... Mapped to [0,1] This represents the number of failure events within the t-th time slice.
[0015] Furthermore, the process of performing small block aggregation and write merging based on the aggregation degree and window depth in the optimal throughput tier to generate a superblock to be encrypted includes the following:
[0016] Random writes to the host are merged into superblocks on-chip based on aggregation degree and window depth. Within a preset time window, only the latest version of multiple overwrites of the same logical block address is retained and queued. At the same time, each superblock is accompanied by metadata about the logical block address and version.
[0017] Furthermore, the initialization vector is generated based on the following formula:
[0018] ;
[0019] in, This represents a 96-bit initialization vector. This indicates the truncation function that takes the high 96 bits. Represents a hash function. The initialization vector generates the key, which is derived from a stable bit string based on the physically unclonable characteristic through a key derivation function. This represents the logical block address of the superblock. Indicates the superblock version. This indicates the head of the hash ticket chain committed by the previous transaction.
[0020] Furthermore, based on the hash ticket chain head committed by the previous transaction, the next chain head is calculated as a candidate, and the monotonic counter committed by the previous transaction is obtained. After writing the page data to the flash page, the candidate chain head and the incremented monotonic counter are also committed to NVRAM. If the commit fails, the security USB drive is switched to read-only protection and a rewrite retry is performed until the commit is successful.
[0021] Furthermore, when page-level error correction occurs, the repair proof is calculated based on the following formula: , This indicates proof of repair. This represents a key hash message verification code. The key generated to prove the repair is derived from a stable bit string based on the physically unclonable characteristic through a key derivation function. This indicates a raw codeword fragment that failed to be read from a flash memory page and decoded. This represents the codeword after successful decoding and reconstruction. This represents the equivalent repair vector obtained during the error correction process, and the repair proof and timestamp are written to the incremental log of NVRAM.
[0022] Furthermore, during the parallel authentication encryption and error correction collaboration process, the interchangeable intermediate register set is also permuted under the drive of microcode randomization key generation. Under the premise of ensuring data equivalence and that timing boundaries are not violated, fine-grained insertion and rearrangement of non-functional instructions are performed, thereby generating a unique equivalent version of the encryption coprocessor's microcode template. The microcode randomization key is derived from a stable bit string based on the physical non-cloning characteristic through a key derivation function.
[0023] In addition, the present invention also provides a secure USB flash drive data processing system suitable for power grid-sensitive computing environments, comprising:
[0024] The drift spectrum generation module is used to obtain the bit flip distribution of physically unclonable features under current temperature and voltage conditions to form a drift spectrum;
[0025] The adaptive throughput selection module is used to count the throughput events and failure events of the previous time slice, and combine them with the drift spectrum to perform adaptive throughput selection to obtain the optimal throughput level. The throughput level is a triplet composed of parallelism, aggregation, and window depth.
[0026] The superblock generation module is used to perform small block aggregation and write merging based on the aggregation degree and window depth in the optimal throughput tier, generating multiple superblocks to be encrypted;
[0027] The initialization vector generation module is used to generate a unique initialization vector based on the hash ticket chain and the metadata of each superblock.
[0028] The page data generation module is used to start a corresponding number of encryption pipelines based on the parallelism in the optimal throughput level, and use the corresponding initialization vector to perform parallel authentication encryption and error correction collaboration on multiple superblocks to generate page data.
[0029] The page data writing module is used to calculate the leaf hash of the Merkle tree based on the initialization vector, the ciphertext in the page data, and the authentication tag, and write the page data to the flash page.
[0030] In addition, the present invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method described above by calling the computer program stored in the memory.
[0031] In addition, the present invention also provides a computer-readable storage medium for storing a computer program for secure USB flash drive data processing suitable for power grid-sensitive computing environments, wherein the computer program executes the steps of the method described above when running on a computer.
[0032] The present invention has the following beneficial effects:
[0033] The present invention provides a secure USB flash drive data processing method suitable for power grid-sensitive computing environments. First, it acquires the bit-flip distribution of physically unclonable features under current temperature and voltage conditions to form a drift spectrum. Then, it couples three parameters—parallelism, aggregation, and window depth—to form a throughput level. Finally, it uses the throughput events, failure events, and drift spectrum from the previous time slice as prior signals for adaptive throughput selection. This combination of physical priors and online adaptation not only ensures that the selection of the throughput level is adaptive to temperature and pressure drift and aging characteristics, guaranteeing that the adaptive throughput selection is based on evidence and that the starting point for selecting the throughput level is closer to the optimal level, but also maintains stable throughput even in extreme environments or aging scenarios. This avoids the performance drop and increased error rate caused by fixed parameters under extreme conditions. Furthermore, it significantly improves steady-state throughput and reduces fluctuations, significantly shortens the convergence time tail, and avoids the switching lag and jitter problems of existing threshold switching mechanisms. This achieves a secure USB flash drive with both high parallelism and high reliability. Meanwhile, small block aggregation and write merging are performed before authentication encryption, merging the host's random writes into superblocks. This can significantly reduce AEAD's startup overhead and bus round trips, reduce write amplification and smooth latency, making the pipeline utilization closer to the bandwidth limit of the secure USB drive, and further improving the throughput of the secure USB drive.
[0034] In addition, the secure USB flash drive data processing system of the present invention, which is suitable for power grid-sensitive computing environments, also has the above-mentioned advantages.
[0035] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description
[0036] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0037] Figure 1 This is a flowchart illustrating a preferred embodiment of a secure USB flash drive data processing method applicable to a power grid-sensitive computing environment.
[0038] Figure 2 This is another flowchart illustrating a preferred embodiment of the secure USB flash drive data processing method applicable to power grid-sensitive computing environments.
[0039] Figure 3 This is a schematic diagram of the module structure of a secure USB flash drive data processing system suitable for power grid-sensitive computing environments, according to another embodiment of this application. Detailed Implementation
[0040] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0041] It is understood that the hardware architecture of the secure USB flash drive in this application includes an MCU (Microcontroller Unit), a CE (Cryptographic Engine), a DMA (Direct Memory Access) dual-ring buffer, a GF-Array (Galois Field Operator Array), NVRAM (Non-Volatile RAM), and an FTL (Flash Translation Layer), etc., to enable high-throughput authentication encryption and verifiable storage for data-sensitive and critical hosts without modifying the MSC / UASP driver. (See reference...) Figure 1 A preferred embodiment of this application provides a secure USB flash drive data processing method suitable for power grid-sensitive computing environments, including the following:
[0042] Step S1: Obtain the bit flip distribution of physically unclonable features under current temperature and voltage conditions to form a drift spectrum;
[0043] Step S2: Statistically analyze the throughput events and failure events of the previous time slice, and combine them with the drift spectrum to perform adaptive throughput selection to obtain the optimal throughput level. The throughput level is a triplet composed of parallelism, aggregation, and window depth.
[0044] Step S3: Perform small block aggregation and write merging based on the aggregation degree and window depth in the optimal throughput tier to generate multiple superblocks to be encrypted;
[0045] Step S4: Generate a unique initialization vector based on the hash ticket chain and the metadata of each superblock;
[0046] Step S5: Start the corresponding number of encryption pipelines based on the parallelism in the optimal throughput level, and use the corresponding initialization vector to perform parallel authentication encryption and error correction coordination on multiple superblocks to generate page data;
[0047] Step S6: Calculate the leaf hash of the Merkle tree based on the initialization vector, the ciphertext in the page data, and the authentication tag, and write the page data to the flash page.
[0048] It is understood that the secure USB flash drive data processing method applicable to power grid sensitive computing environments in this embodiment first obtains the bit flip distribution of physically unclonable features under the current temperature and voltage conditions to form a drift spectrum. The three parameters of parallelism, aggregation degree, and window depth are coupled into a throughput level. The throughput events, failure events, and drift spectrum of the previous time slice are used as prior signals for adaptive throughput selection. Through the combination of physical prior and online adaptation, the selection of the throughput level is not only adapted to temperature and pressure drift and aging characteristics, ensuring that the adaptive throughput selection is based on evidence, but also that the starting point of the throughput level selection is closer to the optimal level. Stable throughput can still be maintained under extreme environments or aging scenarios, avoiding the performance drop and error rate increase caused by fixed parameters under extreme conditions. Moreover, it greatly improves steady-state throughput and reduces fluctuations, significantly shortens the convergence time tail, and avoids the switching lag and jitter problems of existing threshold switching mechanisms. This achieves a secure USB flash drive with both high parallelism and high reliability. Meanwhile, small block aggregation and write merging are performed before authentication encryption, merging the host's random writes into superblocks. This can significantly reduce AEAD's startup overhead and bus round trips, reduce write amplification and smooth latency, making the pipeline utilization closer to the bandwidth limit of the secure USB drive, and further improving the throughput of the secure USB drive.
[0049] In step S1, after the secure USB flash drive is powered on, its MCU first reads the original response of the Physically Unclonable Feature (PUF) and restores the stable bit string S through error correction. Then, it calculates the bit flip probability under the current temperature and voltage conditions to form a drift spectrum. Optionally, the MCU also uses the stable bit string S as input to call a key derivation function based on HMAC (keyed-hash message authentication code) to generate an initialization vector and generate a key. Repair proof to generate key and microcode randomization key This unifies the key source, ensuring a consistent and trusted starting point for subsequent key usage. Additionally, the MCU reads the hash ticket chain head of the previous transaction commit from NVRAM. and monotonic counter In this context, both the hash ticket chain and the monotonic counter are monotonically increasing, making it easy to use the double monotonic state of the hash ticket chain and the monotonic counter to characterize the global state.
[0050] In addition, in step S2, CE counts the throughput events and failure events of the previous time slice and combines them with the drift spectrum generated in step S1 to perform adaptive throughput selection to obtain the optimal throughput level. The adaptive throughput selection process employs an upper confidence bound strategy (UCB strategy) and calculates the optimal throughput level based on the following formula:
[0051] ;
[0052] in, This represents the action set in the t-th time slice. The optimal throughput level is selected from the given values, where L represents parallelism, B represents aggregation, and W represents window depth. This represents the exploration coefficient, with a value range of [1, 3]. Represents the logarithm of time t. This indicates the number of times the specified throughput level is selected within a unit of time in the t-th time slice. This represents the throughput per unit time minus a failure rate-weighted penalty term, the recursive formula for which is: , , , This represents the initial value of the penalty term. This indicates the factory settings for throughput. This represents the expected failure rate under the current drift spectrum, which is positively correlated with the sensitivity to parallelism and window depth, as well as the drift intensity. Indicates the baseline penalty weight. This represents the throughput within the t-th time slice. This represents the failure penalty weight for the t-th time slice. , This represents the penalty amplification factor, with a value range of [0.2, 1]. This represents the 95th percentile in the bit-flip probability distribution. This represents the drift mapping function, used to... Mapped to [0,1] This represents the number of failure events within the t-th time slice. Furthermore, the UCB strategy is existing technology, and its specific principles will not be elaborated upon here.
[0053] It is understandable that in the above formula The initial value of "environmentally informed" is given based on the drift spectrum, allowing the exploration item to... Faster decay to a reasonable scale and reduced ineffective attempts allow the UCB strategy to lock in high throughput levels earlier. As the drift spectrum increases, the number of failures significantly reduces the penalty term. The UCB strategy will then choose a more conservative approach in the next round. When risks increase, the throughput is promptly reduced to decrease retries and queuing propagation, thereby reducing volatility. Therefore, this invention uses throughput events, failure events, and drift spectra from the previous time slice as prior signals for adaptive throughput selection. By combining physical priors with online adaptive learning, the selection of throughput levels not only adapts to temperature and pressure drift and aging characteristics, ensuring that adaptive throughput selection is based on evidence and that the starting point for selecting throughput levels is closer to the optimal level, but also maintains stable throughput under extreme environments or aging scenarios, avoiding performance drops and increased error rates caused by fixed parameters under extreme conditions. Furthermore, it significantly improves steady-state throughput and reduces volatility, significantly extends the convergence tail, and avoids the switching lag and jitter problems of existing threshold switching mechanisms, achieving a secure USB flash drive with both high parallelism and high reliability.
[0054] Furthermore, after obtaining the optimal throughput tier in step S2, in step S3, small block aggregation and write merging are performed based on the aggregation degree and window depth of the optimal throughput tier to generate multiple superblocks to be encrypted. The specific process includes the following:
[0055] Random writes to the host are merged into superblocks on-chip based on aggregation degree and window depth. Within a preset time window, only the latest version of multiple overwrites of the same logical block address is retained and queued. At the same time, each superblock is accompanied by metadata about the logical block address and version.
[0056] Specifically, DMA merges 4-8KB random writes from the host into superblocks on-chip based on the aggregation degree B and window depth W, and performs this merging within a preset time window. Multiple writes to the same logical block address (LBA) only retain the latest version in the queue. Simultaneously, each superblock is accompanied by metadata about its logical block address and version (ver), thus forming a superblock to be encrypted. The superblock is a BLOB (Binary Large Object). For writing the merged window, the value range is [0.5ms, 3ms], with 1ms being preferred.
[0057] It is understandable that existing secure USB drives mostly rely on host file system aggregation or simple queue splicing by the controller. The drawback is that random writes in small blocks of 4-8KB can trigger frequent encrypted boots and flash write amplification, and overwrite writes are difficult to merge in a timely manner. In contrast, this invention performs two-level packetization on-chip based on the aggregation degree B and window depth W, using a "capacity threshold + time threshold" approach. It also performs "last write priority" deduplication on overwrite writes within the same logical block address (LBA) range to form superblocks. This spreads the boot overhead and bus round trips over a larger effective load, reduces write amplification and smooths latency, making the pipeline utilization closer to the bandwidth limit of the secure USB drive, and further improving the throughput of the secure USB drive.
[0058] Additionally, in step S4, CE uses the hash ticket chain head obtained in step S1. A unique initialization vector is generated corresponding to the metadata of each superblock in step S3, specifically based on the following formula:
[0059] ;
[0060] in, This represents a 96-bit initialization vector. This indicates the truncation function that takes the high 96 bits. Represents a hash function. The initialization vector generates the key, which is derived from a stable bit string based on the physically unclonable characteristic through a key derivation function. This represents the logical block address of the superblock. Indicates the superblock version. This represents the head of the hash ticket chain committed in the previous transaction. Additionally, CE simultaneously calculates the next chain head. As a candidate, then Send it to the parallel encryption queue.
[0061] It is understandable that existing technologies typically require the host or external firmware to generate the initialization vector (IV), or simply concatenate it using a counter / timestamp. However, the authentication and encryption process is sensitive to the uniqueness of the initialization vector. Under extreme conditions such as power outage recovery, firmware rollback, and parallel queue contention, duplicate IVs can occur. Furthermore, the power grid-sensitive computing environment limits complex negotiations with the host, making the host-guaranteed uniqueness approach impractical. Once an IV is duplicated, the security of authentication and encryption may fail entirely without being noticed. This invention maintains a continuously increasing hash ticket chain in NVRAM. Before each write, the head of the hash ticket chain from the previous transaction (equivalent to a ticket) is retrieved. The initialization vector is calculated by concatenating the generated key with the hash ticket head from the previous transaction and the metadata of the superblock. This not only utilizes the monotonically increasing characteristic of the hash ticket chain but also binds it to the logical block address (LBA) and version information (ver). Even in extreme cases such as power outages or firmware rollbacks, the initialization vector will not be duplicated, ensuring the reliability of authentication and encryption, and eliminating the need for interaction with the host.
[0062] In addition, in step S5, a corresponding number of encryption pipelines are started based on the parallelism in the optimal throughput level, and parallel authentication encryption and error correction collaboration are performed on multiple superblocks using the corresponding initialization vector to generate page data.
[0063] Specifically, the CE first initiates a corresponding number of encryption pipelines based on the parallelism L in the optimal throughput tier, thereby initiating L parallel AEADs. It then uses the corresponding initialization vector IV to perform parallel authentication encryption on multiple superblock BLOBs, obtaining the corresponding ciphertext C and authentication tag. Subsequently, the CE performs field multiplication and accumulation on the GF-Array using irreducible GHASH polynomials, and then switches to BCH generator polynomials via a routing switch to perform page-level encoding without moving buffer data. Finally, the page number directly formed in the on-chip buffer as "ciphertext || authentication tag || BCH codeword" is delivered to the subsequent write path. Since the GHASH algorithm and the BCH algorithm run in time-division multiplexing on the same GF-Array, the project cycle satisfies:
[0064] ;
[0065] in, This represents the number of clock cycles consumed from entering the CE to generating a writable page in a single superblock. This represents the number of cycles required to complete the AES block encryption / decryption rounds for a superblock at the selected parallelism L. This indicates the number of cycles required to complete the Galois multiply-accumulate operation of GHASH in AEAD. Indicates the number of cycles required for page-level BCH encoding (or decoding). This represents the total equivalent cycle time saved due to gate multiplexing between the GHASH and BCH algorithms. This represents the gate-level multiplexing efficiency, with a value range of [0.2, 0.5]. Since the GHASH and BCH algorithms are executed in a time-division manner on the same GF-Array, they cannot be superimposed in parallel. The two peak periods are no longer added together; instead, the slower one dominates, further improving the throughput of the secure USB drive and reducing peak latency.
[0066] It is understandable that flash memory error correction is indispensable in the page read / write path, and most of them use the BCH verification algorithm for verification. Existing technologies usually place the BCH verification algorithm in a hardware unit that is completely independent of cryptographic computation. Although the GHASH algorithm (GF(2^128) multiplication) and the BCH algorithm (GF(2) polynomial) in cryptographic computation have different mathematical structures, their gate-level implementations both rely on carry-free multiplication, shifting and bitwise XOR. The coexistence of the two sets of operators leads to area and memory access duplication. The pipelines "compete" for bus timing, which causes throughput bottlenecks and increased energy consumption. The lack of a collaborative design for field operations makes it difficult to promote error correction and encryption in parallel and efficiently. This invention achieves time-division gate-level multiplexing between AEAD's GHASH algorithm and flash error correction BCH algorithm, enabling the reuse of the same set of carry-free multiplication and XOR networks in the "encryption → verification → encoding" stages. This significantly reduces area and memory access round trips, and lowers the total number of cycles to near the maximum value of the traditional "dual-core parallel" scheme. This collaboration does not change the cryptographic interface or reduce the error correction strength, and is a quantifiable hardware acceleration path starting from the operator layer.
[0067] Optionally, in step S5, during the parallel authentication encryption and error correction collaboration, the interchangeable intermediate register set is also permuted under the drive of the microcode randomization key generation, and fine-grained insertion and rearrangement of non-functional instructions are performed on the premise of ensuring data equivalence and that timing boundaries are not violated, so as to generate a unique equivalent version of the microcode template of the encryption coprocessor. The microcode randomization key is derived from a stable bit string based on the physical non-cloning feature through a key derivation function.
[0068] It is understandable that side-channel attacks and tampering detection are real threats to sensitive devices. Power consumption / timing signals are particularly difficult to completely avoid in small system-on-a-chip (SoC). Fixed microcode paths and predictable data access trajectories easily form stable leakage profiles. Although existing technologies use Physically Unclonable Functions (PUFs) as root keys to improve cloning strength, they still cannot completely eliminate the existence of leakage profiles. In this invention, the stable bit string of the PUF is used to generate a key by deriving microcode randomization through a key derivation function. This randomization performs non-functional perturbation on the microinstruction sequence, lookup path, and register mapping of the encryption core, thereby generating a device-unique equivalent version (i.e., a perturbation template) for the microcode template of the encryption coprocessor. This randomization changes the micro-trajectory of power consumption and timing, making the perturbation template different for different cold starts or different device instances. This fundamentally breaks down reproducible leakage profiles, thereby raising the threshold for side-channel attacks and improving security.
[0069] Additionally, in step S6, CE calculates the leaf hash of the Merkle tree based on the following formula: Furthermore, the FTL layer divides the full Merkle tree into partition roots according to erase blocks / channels, performs O(1) online updates on partitions that hit the path, and performs background small-step merging and refreshing of the global root for partitions that miss the path. Subsequently, DMA writes "ciphertext||Tag||Meta(LBA,ver,ctr,IV)" to the flash page in a zero-copy manner and obtains confirmation of disk write.
[0070] It is understandable that existing technologies typically employ file-level digests or full Merkle trees for integrity and auditability, which generally suffer from high path update costs, latency spikes, and significant write amplification. Placing the Merkle tree entirely outside the FTL layer introduces the risk of "address mapping inconsistency with tree paths." Binding leaves to physical pages may conflict with wear leveling. Therefore, obtaining stable block-level verifiable snapshots and range proofs without compromising the autonomy of the FTL layer has long been an unresolved engineering challenge in existing technologies. This invention decomposes the global tree into multiple partition roots within the FTL layer based on erase blocks / channels. The device side only maintains the on-chip cache of the most recently active paths. During writes, only the partition roots are updated, and the global roots are refreshed in the background using micro-merging. This locks update hotspots onto on-chip SRAM and moves cold paths to the background micro-merging stage, avoiding full tree recalculation and cross-regional addressing with each write. This significantly reduces write amplification and latency spikes and naturally supports range proofs and version backtracking, providing fine-grained evidence in compliance audits.
[0071] Optionally, in step S6, if page-level error correction occurs in the FRL layer report, the CE also calculates the repair proof based on the following formula: , This indicates proof of repair. This represents a key hash message verification code. The key generated to prove the repair is derived from a stable bit string based on the physically unclonable characteristic through a key derivation function. This indicates a raw codeword fragment that failed to be read from a flash memory page and decoded. This represents the codeword after successful decoding and reconstruction. It represents the equivalent repair vector obtained during the error correction process, indicating which bits were repaired, and writes the repair proof and timestamp into the incremental log of NVRAM. It can also mark the corresponding partition root as repaired when necessary for subsequent audit traceability.
[0072] It is understandable that existing secure USB drive controllers only record SMART statistics or implicit flags during page-level error correction, failing to robustly bind physical repair facts with logical page identity / version, resulting in insufficient evidence for post-audit. This invention, however, binds physical repair facts and logical integrity paths to the same evidence chain. This allows for verification on the read side whether the data underwent error correction and when the correction occurred, effectively preventing quiescent bit erosion from being overlooked for extended periods. Thus, any post-read audit can verify which page and version the correction corresponds to, and whether it has been incorporated into the tree structure, ensuring strong traceability.
[0073] Optional, such as Figure 2 The secure USB flash drive data processing method for power grid-sensitive computing environments further includes the following:
[0074] Step S7: Submit the candidate chain head and the incremented monotonic counter to NVRAM. If the submission fails, switch the security USB drive to read-only protection and retry the write operation until the submission is successful.
[0075] Specifically, after writing page data to the flash memory page, the MCU receives a successful write-to-disk signal and then uses an atomic transaction to move the candidate chain head to the disk. and the monotonic counter after incrementing Submitted to NVRAM, if and If all conditions are met (monotonicity is satisfied), the submission is successful. If the submission fails, the security USB drive is switched to read-only protection and rewritten and retried until the submission is successful, that is, the global state is consistent with the data already written to the disk. At this point, the writing process of the security USB drive is completed.
[0076] It is understandable that during the commit phase, the candidate chain head and the monotonic counter form a dual monotonicity check. Even after power failure or firmware rollback, consistency can be checked through the chain state and the counter state. If the chain head / counter is inconsistent, it will be detected immediately and the output will be blocked. Moreover, the candidate chain head and the monotonic counter are bound to the page commit as an atomic transaction. If it fails, it will switch to read-only and rewrite, completely eliminating the rollback window and ensuring that the device-side state machine is consistent with the media state.
[0077] Furthermore, when the host reads data from the secure USB drive, the FTL layer first reads the page into the DMA according to the mapping. The DMA initiates a partition root path verification request to the Merkle mechanism. The Merkle mechanism returns proof or hit result to the CE. The CE first performs tag verification. If successful, it decrypts the data. If an error occurs, it records it in NVRAM and blocks the process. Then, the decrypted data is transferred to the USB interface to be sent back to the host. At the same time, parameters are fine-tuned based on read-side hit and latency statistics. During reading, the CE first verifies the tag of the target page and can also perform on-demand verification of the associated partition root path. If successful, it decrypts the data and returns the plaintext to the host. If any step fails, the CE immediately reports to the MCU and triggers read-only protection. If necessary, it can also refer to the repair proof log to locate whether the problem is a media layer issue. By placing authentication and verifiable paths at the beginning of the read link, abnormal pages can be quickly filtered out at minimal cost, and interval-level proofs can be provided when necessary. This ensures both low read latency and meets the availability and integrity requirements for post-event traceability.
[0078] In addition, such as Figure 3 As shown, another embodiment of the present invention also provides a secure USB flash drive data processing system suitable for power grid-sensitive computing environments, preferably employing the secure USB flash drive data processing method for power grid-sensitive computing environments as described above, including:
[0079] The drift spectrum generation module is used to obtain the bit flip distribution of physically unclonable features under current temperature and voltage conditions to form a drift spectrum;
[0080] The adaptive throughput selection module is used to count the throughput events and failure events of the previous time slice, and combine them with the drift spectrum to perform adaptive throughput selection to obtain the optimal throughput level. The throughput level is a triplet composed of parallelism, aggregation, and window depth.
[0081] The superblock generation module is used to perform small block aggregation and write merging based on the aggregation degree and window depth in the optimal throughput tier, generating multiple superblocks to be encrypted;
[0082] The initialization vector generation module is used to generate a unique initialization vector based on the hash ticket chain and the metadata of each superblock.
[0083] The page data generation module is used to start a corresponding number of encryption pipelines based on the parallelism in the optimal throughput level, and use the corresponding initialization vector to perform parallel authentication encryption and error correction collaboration on multiple superblocks to generate page data.
[0084] The page data writing module is used to calculate the leaf hash of the Merkle tree based on the initialization vector, the ciphertext in the page data, and the authentication tag, and write the page data to the flash page.
[0085] It is understood that the secure USB flash drive data processing system applicable to power grid-sensitive computing environments in this embodiment first obtains the bit-flip distribution of physically unclonable features under the current temperature and voltage conditions to form a drift spectrum. The three parameters of parallelism, aggregation, and window depth are coupled into a throughput level. The throughput events, failure events, and drift spectrum of the previous time slice are used as prior signals for adaptive throughput selection. Through the combination of physical prior and online adaptation, the selection of the throughput level is not only adapted to temperature and pressure drift and aging characteristics, ensuring that the adaptive throughput selection is based on evidence, but also that the starting point of the throughput level selection is closer to the optimal level. Stable throughput can still be maintained under extreme environments or aging scenarios, avoiding the performance drop and error rate increase caused by fixed parameters under extreme conditions. Moreover, it greatly improves steady-state throughput and reduces fluctuations, significantly reduces the convergence time tail, and avoids the switching lag and jitter problems of existing threshold switching mechanisms. This achieves a secure USB flash drive with both high parallelism and high reliability. Meanwhile, small block aggregation and write merging are performed before authentication encryption, merging the host's random writes into superblocks. This can significantly reduce AEAD's startup overhead and bus round trips, reduce write amplification and smooth latency, making the pipeline utilization closer to the bandwidth limit of the secure USB drive, and further improving the throughput of the secure USB drive.
[0086] In addition, the secure USB flash drive data processing system suitable for power grid-sensitive computing environments also includes:
[0087] The dual monotonicity verification module is used to submit the candidate chain head and the incremented monotonic counter to NVRAM. If the submission fails, the security USB drive is switched to read-only protection and rewritten and retried until the submission is successful.
[0088] In addition, another embodiment of the present invention provides an electronic device including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method described above by calling the computer program stored in the memory.
[0089] In addition, another embodiment of the present invention provides a computer-readable storage medium for storing a computer program for secure USB flash drive data processing suitable for power grid-sensitive computing environments, wherein the computer program executes the steps of the method described above when running on a computer.
[0090] Common computer-readable storage media include: floppy disks, flexible disks, hard disks, magnetic tapes, any other magnetic media, CD-ROMs, any other optical media, punch cards, paper tape, any other physical media with perforated patterns, random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), flash erasable programmable read-only memory (FLASH-EPROM), any other memory chips or cartridges, or any other media readable by a computer. Instructions may further be transmitted or received by a transmission medium. The term transmission medium can include any tangible or intangible medium used to store, encode, or carry instructions for execution by a machine, and includes digital or analog carrier communication signals or intangible media that facilitate communication of such instructions. Transmission media include coaxial cables, copper wires, and optical fibers, which contain conductors for transmitting a bus of computer data signals.
[0091] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented in various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0092] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0093] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0094] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0095] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0096] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
[0097] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A secure USB flash drive data processing method suitable for power grid-sensitive computing environments, characterized in that, Includes the following: Obtain the bit-flip distribution of physically unclonable features under current temperature and voltage conditions to form a drift spectrum; The throughput events and failure events of the previous time slice are statistically analyzed, and adaptive throughput selection is performed in combination with the drift spectrum to obtain the optimal throughput level. The throughput level is a triplet composed of parallelism, aggregation, and window depth. Based on the aggregation degree and window depth in the optimal throughput tier, small block aggregation and write merging are performed to generate multiple superblocks to be encrypted; A unique initialization vector is generated based on the hash ticket chain and the metadata of each superblock; Based on the parallelism of the optimal throughput level, start the corresponding number of encryption pipelines, and use the corresponding initialization vector to perform parallel authentication encryption and error correction coordination on multiple superblocks to generate page data; The leaf hash of the Merkle tree is calculated based on the initialization vector, the ciphertext in the page data, and the authentication tag, and the page data is written to the flash page; In the adaptive throughput tier selection process, an upper confidence bound strategy is adopted, and the optimal throughput tier is calculated based on the following formula: ; in, This represents the action set in the t-th time slice. The optimal throughput level is selected from the given values, where L represents parallelism, B represents aggregation, and W represents window depth. Indicates the exploration coefficient. Represents the logarithm of time t. This represents the number of times the specified throughput level is selected within a unit of time in the t-th time slice, and this represents the throughput per unit of time minus a penalty term weighted by the failure rate. The recursive formula for this penalty term is: , , , This represents the initial value of the penalty term. This indicates the factory settings for the throughput level. This represents the expected failure under the current drift spectrum. Indicates the baseline penalty weight. This represents the throughput within the t-th time slice. This represents the failure penalty weight for the t-th time slice. , This represents the penalty amplification factor. This represents the 95th percentile in a bit-flipped distribution. This represents the drift mapping function, used to... Mapped to [0,1] This represents the number of failure events within the t-th time slice.
2. The secure USB flash drive data processing method for power grid-sensitive computing environments as described in claim 1, characterized in that, The process of performing small block aggregation and write merging based on the aggregation degree and window depth in the optimal throughput tier to generate a superblock to be encrypted includes the following: Random writes to the host are merged into superblocks on-chip based on aggregation degree and window depth. Within a preset time window, only the latest version of multiple overwrites of the same logical block address is retained and queued. At the same time, each superblock is accompanied by metadata about the logical block address and version.
3. The secure USB flash drive data processing method for power grid-sensitive computing environments as described in claim 1, characterized in that, The initialization vector is generated based on the following formula: ; in, This represents a 96-bit initialization vector. This indicates the truncation function that takes the high 96 bits. Represents a hash function. The initialization vector generates the key, which is derived from a stable bit string based on the physically unclonable characteristic through a key derivation function. This represents the logical block address of the superblock. Indicates the superblock version. This indicates the head of the hash ticket chain committed by the previous transaction.
4. The secure USB flash drive data processing method for power grid-sensitive computing environments as described in claim 3, characterized in that, It also calculates the next chain head as a candidate based on the hash ticket chain head committed by the previous transaction, and obtains the monotonic counter committed by the previous transaction. After writing the page data to the flash page, it also submits the candidate chain head and the incremented monotonic counter to NVRAM. If the submission fails, it switches the security USB drive to read-only protection and retryes the write until the submission is successful.
5. The secure USB flash drive data processing method for power grid-sensitive computing environments as described in claim 1, characterized in that, When page-level error correction occurs, the repair proof is also calculated based on the following formula: , This indicates proof of repair. This represents a key hash message verification code. The key generated to prove the repair is derived from a stable bit string based on the physically unclonable characteristic through a key derivation function. This indicates a raw codeword fragment that failed to be read from a flash memory page and decoded. This represents the codeword after successful decoding and reconstruction. This represents the equivalent repair vector obtained during the error correction process, and the repair proof and timestamp are written to the incremental log of NVRAM.
6. The secure USB flash drive data processing method for power grid-sensitive computing environments as described in claim 1, characterized in that, During the parallel authentication, encryption, and error correction collaboration process, the interchangeable intermediate register set is also permuted under the drive of microcode randomization key generation. Fine-grained insertion and rearrangement of non-functional instructions are performed while ensuring data equivalence and that timing boundaries are not violated. This provides a unique equivalent version of the encryption coprocessor's microcode template for generating devices. The microcode randomization key is derived from a stable bit string based on the physical non-cloning characteristic through a key derivation function.
7. A secure USB flash drive data processing system suitable for power grid-sensitive computing environments, employing the secure USB flash drive data processing method for power grid-sensitive computing environments as described in any one of claims 1 to 6, characterized in that, include: The drift spectrum generation module is used to obtain the bit flip distribution of physically unclonable features under current temperature and voltage conditions to form a drift spectrum; The adaptive throughput selection module is used to count the throughput events and failure events of the previous time slice, and combine them with the drift spectrum to perform adaptive throughput selection to obtain the optimal throughput level. The throughput level is a triplet composed of parallelism, aggregation, and window depth. The superblock generation module is used to perform small block aggregation and write merging based on the aggregation degree and window depth in the optimal throughput tier, generating multiple superblocks to be encrypted; The initialization vector generation module is used to generate a unique initialization vector based on the hash ticket chain and the metadata of each superblock. The page data generation module is used to start a corresponding number of encryption pipelines based on the parallelism in the optimal throughput level, and use the corresponding initialization vector to perform parallel authentication encryption and error correction collaboration on multiple superblocks to generate page data. The page data writing module is used to calculate the leaf hash of the Merkle tree based on the initialization vector, the ciphertext in the page data, and the authentication tag, and write the page data to the flash page.
8. An electronic device, characterized in that, The method includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method as described in any one of claims 1 to 6 by calling the computer program stored in the memory.
9. A computer-readable storage medium for storing a computer program for secure USB flash drive data processing suitable for power grid-sensitive computing environments, characterized in that, The computer program, when run on a computer, performs the steps of the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Vehicle positioning method, related device, equipment and storage medium
CN112558125A
Cooperative authentication method and system of safety U disk
CN120850366A