A ciphertext fusion entropy integrated key derivation method and system based on a TEE-mTLS-MPC architecture

CN122932995APending Publication Date: 2026-10-16李杰
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611343545.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]1.熵源供给体系单薄,大多仅采用单一硬件随机熵源,缺少多维度、跨软硬件异构熵源互补设计;部分多路熵方案出于业务可用性优先的工程思路,当单路熵源校验失败时,选择降级复用剩余合格熵继续派生密钥,虽然保障本轮业务不中断,但会造成密钥实际熵强度隐性下降

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure QLYQS_1
    Figure QLYQS_1
  • Figure QLYQS_2
    Figure QLYQS_2
Patent Text Reader

Abstract

The application discloses a ciphertext fusion entropy integrated key derivation method and system based on a TEE-mTLS-MPC architecture, and belongs to the technical field of privacy calculation and password security. The application constructs a three-layer cross-domain heterogeneous entropy source collection, a five-stage serial pre-entropy quality inspection pipeline, a ciphertext fusion entropy engine and an integrated architecture of key derivation operation. The task fence synchronization subunit is used for completing multi-entropy source synchronization and timeout control, setting a forced access rule, and deriving a key only when three-way entropy sources are all qualified. When collection timeout or verification failure occurs, the entropy data of the current round is destroyed in the TEE trusted domain, and the incomplete entropy of the current round is not reused. The application integrates multi-dimensional entropy quality verification means, uses bit string splicing for ciphertext, binds and traces the context, and stores the key in the TEE trusted domain. The application eliminates the hidden security risks of degraded reuse of incomplete entropy, is suitable for the security requirements of financial privacy calculation, government hardware isolation, tamper resistance and key collision prevention, and can avoid the great risks caused by key leakage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of privacy-preserving computation cryptographic security technology. Specifically, it involves the interdisciplinary technical fields of trusted hardware execution, transport layer security, multi-party secure computation, and cryptographic key derivation. Background Technology

[0002] There is a fundamental consensus in the field of cryptographic engineering that the security of cryptographic primitives does not equate to the security of the system. Security at the algorithm level does not automatically guarantee security at the system level. The HKDF defined in the RFC5869 standard is merely a basic layered key derivation operation, a neutral, fundamental cryptographic tool. The algorithm specification itself does not have security flaws; the flaw lies in the lack of a complete supporting system built around HKDF, including pre-entropy collection, multi-level verification, multi-source fusion, and runtime anomaly protection. Existing standardized HKDF key derivation algorithms, following the RFC5869 specification, only provide basic extraction and extended two-stage general operational logic. Existing traditional multi-entropy source key derivation schemes have multiple inherent flaws in high-security scenarios involving multi-party collaborative ciphertext operations, making it difficult to meet the comprehensive security compliance requirements of high-concurrency and high-adversarial environments.

[0003] Specifically, these shortcomings are mainly reflected in the following five dimensions of the business-first model:

[0004] 1. The entropy source supply system is weak, mostly relying on a single hardware random entropy source, lacking a multi-dimensional, cross-hardware heterogeneous entropy source complementary design. Some multi-entropy solutions, prioritizing business availability, choose to downgrade and reuse the remaining qualified entropy to continue deriving keys when a single entropy source verification fails. While this ensures uninterrupted business operations, it causes a hidden decrease in the actual entropy strength of the key. This type of defect is highly concealed and difficult to detect in routine functional testing. Only when the entropy source deteriorates, is tampered with, or becomes abnormal will the key security strength decrease unexpectedly, posing a cryptographic security risk.

[0005] 2. The methods for fusing multi-path random data are crude, and the XOR operation is commonly used to mix the entropy values ​​of multiple paths. This will erase the independent cryptographic contributions of each entropy source, and at the same time, there is a lack of an entropy length balance constraint mechanism.

[0006] 3. There is a lack of a complete entropy source pre-security screening mechanism. Most systems only set a simple minimum entropy threshold, which cannot identify hidden security risks such as entropy transmission tampering, distribution bias, time-series periodic pseudo-randomness, and gradient drift. Although some business systems have mathematical tools for entropy quality quantification, they are only used for upper-layer business risk identification and have not been deployed as entropy source access judgment tools in the key generation link.

[0007] 4. The context isolation design is simple, only equipped with basic task identifiers, and lacks multi-dimensional environment binding parameters such as device, session, and node, which is prone to cross-scenario key reuse and collision issues.

[0008] 5. Trusted computing components such as MPC, TEE, and mTLS lack a supporting integrated entropy enhancement collection, verification, and derivation closed-loop architecture, resulting in shortcomings in the control of the original random performance of entropy.

[0009] Even when applying the design principles of existing security-first technologies to a three-way cross-domain heterogeneous entropy joint key derivation scenario, numerous practical engineering obstacles remain. Specifically, in multi-way cross-domain heterogeneous entropy key derivation scenarios, existing technologies lack supporting engineering mechanisms adapted to the security-first mode. The three entropy sources originate from local chips, communication networks, and distributed MPC clusters, respectively, with significant differences in their acquisition completion times. Existing solutions lack a barrier synchronization waiting mechanism for multi-way entropy, easily leading to task suspension; the lack of comprehensive task instance and timeout management can cause task backlog and resource exhaustion; the semantic ambiguity of fault outputs makes it difficult for upper-layer services to distinguish between transient and permanent faults; the lack of trusted domain secure memory destruction logic after a failed round can result in residual entropy materials in memory, introducing side-channel leakage risks; and the upper-layer service interfaces, callbacks, and retry maintenance systems are not adequately adapted. Due to these engineering constraints, industry engineering practices largely favor a more easily implemented availability-first degraded operation strategy. For example, current underlying cryptographic hardware and entropy source components such as HSM, TPM2.0, Secure Element, RISC V cryptographic extensions, and JitterEntropy entropy sources have adopted a security-first design philosophy, refusing to output keys or random numbers when entropy anomalies are detected, and are widely used in high-security scenarios such as finance and confidential computing. However, most of these underlying components only support local single-node entropy source input, lacking an integrated collaborative acquisition mechanism for three types of cross-trust domain heterogeneous entropy sources: TEE hardware entropy, mTLS communication session entropy, and MPC distributed multi-party entropy, for multi-party collaborative ciphertext operation scenarios; and lacking a complete upper-layer architecture for multi-path cross-domain entropy, including barrier synchronization, multi-dimensional independent quality inspection, entropy fusion constraints prohibiting XOR, multi-dimensional context key isolation, and complete engineering handling after failure. Directly using underlying hardware components for multi-party collaborative key derivation still requires the business side to supplement the multi-source entropy control logic, which can easily lead to security risks caused by incomplete entropy control, unreasonable entropy fusion strategies, and missing fault handling logic.

[0010] In summary, the industry currently lacks an independent underlying key generation architecture that integrates multi-source heterogeneous entropy acquisition, multi-level entropy security verification, dynamic context isolation, and standardized HKDF layered derivation. Existing technologies, influenced by the inherent engineering approach of prioritizing business needs, have not constructed an entropy source access barrier architecture with a multi-level entropy pre-verification pipeline as a veto-based approach. They have not set the successful verification of all three entropy sources as a mandatory condition for entering entropy fusion and key derivation. Consequently, they cannot simultaneously meet the multiple compliance and security requirements of privacy computing, hardware isolation, tamper prevention, and key collision prevention in financial scenarios. Therefore, the market urgently needs a new security-first technical architecture to address this issue. Summary of the Invention

[0011] To address the series of technical defects and pain points caused by the lack of upstream supporting links in HKDF, this invention provides a key derivation method and system based on the TEE-mTLS-MPC architecture, which integrates encrypted fusion entropy. It adds three layers of heterogeneous entropy acquisition, multi-level entropy pre-verification, and dynamic splicing protection to the upstream of HKDF. This complete supporting architecture compensates for the security shortcomings of traditional HKDF deployments. While the computing tools remain unchanged, the peripheral security system has been comprehensively upgraded. This enables collaborative acquisition of multiple heterogeneous entropy sources, multi-level entropy pre-verification, and layered standardized key derivation, constructing a complete hardware-isolated security closed loop from entropy generation to key output. It overcomes the security defect of implicit key entropy strength decay caused by the degradation and reuse of remaining entropy when a single entropy path fails under the availability-first mode of existing technologies.

[0012] The underlying logic of the overall architecture of this invention. This invention constructs four primary functional modules to form a complete closed loop: Module 1, a three-layer cross-domain heterogeneous entropy source acquisition module; Module 2, a five-level serial pre-entropy quality inspection pipeline module; Module 3, a ciphertext fusion entropy engine module; and Module 4, an RFC5869 HKDF key derivation module with operational anomaly protection. The complete link operates within a TEE hardware-isolated trusted domain, and the complete execution link is divided into five stages:

[0013] In the first phase, a three-layer cross-domain heterogeneous entropy source collection system is established, generating a TEE hardware trusted entropy source, an mTLS session entropy source, and an MPC multi-party collaborative entropy source. These three types of entropy sources have independent trust roots and complementary security capabilities. Simultaneously, an expansion channel is reserved, allowing the generation of business logic layer auxiliary entropy sources through knowledge graph triple hash operations to participate in key material assembly. A unique task instance identifier is assigned to each key derivation, and the three heterogeneous entropy sources are bound to the same task instance. A fence synchronization unit is set up to wait for all three entropy sources for the same task to be collected before initiating independent multi-level verification of the multi-entropy sources. Global timeout protection for tasks is implemented to prevent indefinite task suspension and resource accumulation.

[0014] In the second phase, a unified set of hard constraints for entropy fusion is implemented: all entropy sources are only allowed to be directly concatenated from the beginning and end of the bit string, and XOR operations are prohibited throughout the process to mix multiple entropy data, thus fully preserving the independent cryptographic contribution of each entropy source; the entropy bit concatenation order can be dynamically adjusted according to the scenario's security strategy, and the concatenation order parameter is synchronously included in the context field binding storage, so as to achieve full traceability of the entropy combination strategy.

[0015] In the third stage, a serial multi-level entropy pre-verification pipeline is configured. The verification execution order is as follows: entropy length balance verification, segmented hash integrity verification, minimum entropy health screening, Shannon entropy static uniformity coarse screening, and ciphertext fusion entropy time-series fine quality inspection with gradient variance term. The three entropy sources are independently subjected to a complete set of verifications. Only when all three entropy sources pass the verification is the subsequent entropy splicing and key derivation allowed. If the verification result of any entropy source fails, the current key derivation process is terminated directly and a security alarm is triggered. The remaining qualified entropy sources are not downgraded and reused in this round. If the task fails in this round, all entropy bit data in this round is zeroed out and securely erased in memory within the TEE trusted domain, and related session resources are destroyed. When the service is restored, the upper-layer service scheduling platform initiates a new round of complete entropy collection-verification process. Each retry completely recollects the three entropy sources and does not cache and reuse the entropy data collected in the previous round. The multi-level entropy pre-verification pipeline configuration allows for customizable security control parameters, including the entropy length balance verification ratio threshold Rratio, the timing fluctuation weight coefficient λ in the ciphertext fusion entropy fine-grained quality inspection calculation formula, and the task global timeout. The entropy length balance verification ratio threshold is used to determine whether the bit length difference between multiple entropy sources exceeds the limit; the timing fluctuation weight coefficient λ is used to adjust the severity of the judgment for identifying timing periodic defects; and the task global timeout is used to control the maximum waiting time for multiple entropy source acquisition. These parameters can be flexibly configured according to the business security level and terminal hardware computing power. This solution is not a fixed, inflexible, and stringent judgment standard: for the highest security level scenarios in finance and government, stricter parameters are selected to maintain high sensitivity to entropy length imbalance and minor timing drift; for privacy computing scenarios with relatively lower security requirements and greater sensitivity to latency and availability, the corresponding verification threshold can be appropriately relaxed to reduce the probability of verification failure while retaining the core admission rule that all three entropy sources must pass verification before entering key derivation. In the preferred implementation of this solution, the multi-level entropy pre-verification pipeline is specifically implemented as a five-level serial pre-entropy quality inspection pipeline. Different parameter values ​​can be matched to different business scenarios, with low-computing-power, lenient parameters selected for lightweight vehicle networking scenarios. For occasional verification failures, a reasonable automatic retry strategy can be configured based on the upper-layer business to digest occasional failures by re-collecting entropy sources multiple times, thereby improving the actual availability of the business. Upper-layer retry is an adaptation strategy at the business operation and maintenance level. The strong access constraint and multi-dimensional cross-domain entropy verification system of this invention is mainly aimed at specific business scenarios of multi-path heterogeneous entropy joint key derivation, which is different from the security priority mechanism of HSM and TPM2.0 for local single-source hardware entropy.The existing HSM and TPM2.0 do not have the cross-domain multi-entropy source acquisition synchronization, multi-dimensional entropy quality inspection, and supporting parameter management architecture of this solution. They are low-level cryptographic hardware, and their native working mode is to use only the single-source entropy generated by the local internal hardware. The entropy source trust boundary is entirely within the hardware. Random numbers that do not meet the entropy quality requirements are directly rejected. HSM and TPM2.0, as mature low-level cryptographic hardware, are suitable for secure key generation scenarios with local single-source hardware entropy, but they are not natively adapted to TEE-mTLS-MPC. Three-way cross-domain heterogeneous entropy joint key derivation service; even if some of the verification, destruction, and traceability functions of this solution are deployed on top of HSM and TPM2.0, only limited security enhancement can be achieved under traditional single-entropy source services; only in cross-domain multi-entropy source scenarios for multi-party collaborative privacy computing can the entire architecture of this solution fully leverage its technical advantages; this solution is an upper-layer integrated key derivation architecture, with inputs being three-way cross-trust domain heterogeneous entropy: TEE hardware entropy, mTLS session entropy, and MPC multi-party collaborative entropy. The runtime can be deployed on TEE or connected to HSM and TPM2.0 hardware as the underlying cryptographic foundation. The two are complementary, forming a foundation and an upper-layer business architecture. The hardware trust root of HSM and TPM2.0 cannot replace the complete key derivation architecture of this solution for cross-domain, multi-path heterogeneous entropy. Similarly, this solution cannot replace the hardware trust root capabilities provided by HSM and TPM2.0. Therefore, the architecture of this solution is suitable for deployment on trusted hardware foundations such as HSM and TPM2.0, filling the gap in cross-domain heterogeneous entropy joint key derivation capabilities in multi-party collaborative privacy computing scenarios. The core calculation formulas used for verification and context tracing in this invention are as follows:

[0016] Shannon entropy static uniformity calculation formula:

[0017]

[0018] The formula for fine-grained quality control of encrypted text fusion entropy is as follows:

[0019]

[0020] Segmented hash integrity verification formula:

[0021]

[0022] Entropy length balance ratio verification formula:

[0023] The context-bound hash formula is:

[0024]

[0025] Wherein, Ctxbind is the context binding hash digest; DeviceID is the device identifier; SessionNo is the session number; TaskID is the task instance identifier; and Timestamp is the timestamp. The context binding hash digest is generated through this hash calculation and is used to achieve binding between task, device, and session dimensions and post-event security auditing.

[0026] In the fourth stage, a two-stage HKDF conforming to RFC 5869 is used to perform key derivation operations; the Extract stage uses the TEE remote proof metric as the salt value to improve the random perturbation capability of the joint entropy material; the Expand stage takes into account the scene-specific fixed identifier Info and the multi-dimensional dynamic context Context; the corresponding key derivation formula is:

[0027]

[0028]

[0029] Context uniformly carries multi-dimensional environmental information such as device fingerprint, session number, task identifier, timestamp, and entropy concatenation order. It can also generate Ctxbind, i.e., context binding hash traceability digest, based on the above parameters, and divide mutually isolated independent key spaces to avoid the risks of cross-scenario key reuse and key collision.

[0030] In the fifth stage, the entire key derivation operation logic supports two deployment forms: a software cryptographic library conforming to RFC 5869 and a hardware security module (HSM). This invention deploys the ciphertext fusion entropy fine-grained quality control calculation formula in the multi-level entropy source pre-verification stage, using it only as an entropy source admission judgment tool for HKDF key derivation to quantify the random security quality of the three-layer cross-domain heterogeneous entropy sources. The operation anomaly security scheduling subunit within module 4 of this invention only monitors and protects against runtime internal anomalies in HKDF extraction, expansion operations, and TEE domain memory access; the interception logic for unqualified entropy source quality is entirely completed by the multi-level entropy pre-verification pipeline. The actual operation of the above five stages is specifically subdivided into two aspects: method and system.

[0031] The complete implementation scheme on the method side is as follows: A hardware-isolated trusted domain (TEE) is constructed based on a hardware root of trust. Three layers of cross-domain heterogeneous entropy sources are collected in parallel: TEEattest, mTLSsession, and MPCentropy. TEEattest integrates the TEE remote proof metric with the Enclave's internal temporary key pair with the public key as a random enhancement component. mTLSsession is generated from a TLS key derivation function based on the business-specific security label. MPCentropy relies on a (t,n) threshold secret sharing mechanism to collect random components from at least t MPC participating nodes and concatenate them. Multi-level pre-verification is performed independently on each of the three entropy sources. Subsequent processing is only allowed if all three sources pass verification; failure of any one source terminates the current round and triggers an alarm, and the remaining qualified entropy is not reused. Business recovery relies on the upper layer initiating a new round of complete collection and verification. The collected multi-entropy sources are combined only using bit string concatenation; XOR fusion operations are prohibited. The entropy concatenation order can be dynamically configured and written to the Context for binding. Before performing HKDF operations, the aforementioned five-level serial entropy verification process is fully executed; only after all verifications pass can the joint key material be generated. The HKDF operation is divided into two independent stages: Extract and Expand. The globally trusted key output by the operation is stored in the TEE isolation domain throughout the process and is prohibited from being exported to the plaintext space of the operating system.

[0032] Complete implementation solution on the system side. A hardware-software integrated system adapted to the above methods is constructed. The system includes a hardware root of trust foundation, a multi-source entropy acquisition unit, a multi-level entropy pre-verification unit, a ciphertext fusion engine, a context manager, and a key derivation operation unit. The multi-source entropy acquisition unit is further subdivided into TEE entropy source sub-modules, mTLS entropy source sub-modules, and MPC entropy source sub-modules, with an optional knowledge graph hash sub-module for generating business-aided entropy sources. The multi-level entropy pre-verification unit integrates a hash integrity verification sub-unit, a minimum entropy health monitoring sub-unit, a fusion entropy fine-grained quality inspection sub-unit, an entropy length balance determination sub-unit, a task barrier synchronization sub-unit, and a trusted domain entropy secure destruction sub-unit. The fusion entropy fine-grained quality inspection sub-unit includes a Shannon entropy static uniformity coarse screening process and a ciphertext fusion entropy time-series fine-grained quality inspection process. The ciphertext fusion engine manages the entropy bit splicing rules and dynamic order configuration logic. The context manager generates Context information carrying multi-dimensional environmental parameters. The key derivation operation unit is deployed within the TEE trusted domain, compatible with standard cryptographic libraries and HSM hardware modules, and the generated trusted keys are stored in isolation and prohibited from being output externally. The key derivation operation unit includes a security scheduling subunit for monitoring internal anomalies in HKDF extraction, expansion, and TEE domain memory access. When an internal anomaly is detected, fault tolerance protection is triggered, prohibiting the output of the derived key. All entropy processing units, verification units, and HKDF derivation units within the system operate within the TEE hardware isolation domain. Upper-layer business systems can only issue task control commands and do not have permission to read raw entropy data, verification thresholds, or intermediate key materials, thus protecting against attacks such as memory sniffing, process hijacking, and parameter tampering. Attached Figure Description

[0033] Appendix Figure 1 This is a block diagram of the integrated security architecture of the three-layer cross-domain heterogeneous entropy source, five-level serial pre-entropy quality inspection pipeline, ciphertext fusion entropy engine, and key derivation operation unit of this invention. It includes four primary operation modules, multiple sets of internal operation sub-units, and independent signal output terminals. The hardware root of trust is the underlying hardware operating environment of the entire system, providing TEE hardware isolation trusted domain support for all functional modules. The hardware root of trust is an existing mature trusted hardware operating environment. This invention does not modify the hardware itself. It can be the TEE environment built into the SOC chip or an external HSM or TPM2.0 trusted cryptographic hardware. It is not shown as a separate data processing block. The function of the context manager is integrated into the 3-2 multi-dimensional context generation and binding sub-unit within the ciphertext fusion entropy engine module.

[0034] 1. Module 1 is a three-layer cross-domain heterogeneous entropy source acquisition module. Its internal operation sub-units are as follows: 1-1. TEE hardware trusted entropy acquisition sub-unit, 1-2. mTLS session entropy acquisition sub-unit, 1-3. MPC multi-party collaborative entropy acquisition sub-unit, 1-4. Knowledge graph business entropy extension sub-unit; the output data of module 1 flows into module 2 through terminal 6.

[0035] 2. Module 2 is a five-level serial pre-entropy quality inspection pipeline module. The "five levels" in the module name correspond to five quality inspection and verification processes from 2-2 to 2-6. Sub-unit 2-1, the task fence synchronization sub-unit, belongs to the pipeline's pre-schedule control unit and is used for multi-source entropy synchronization and timeout judgment. Sub-unit 2-7, the trusted domain entropy security destruction sub-unit, belongs to the fault handling unit after verification failure. These two sub-units do not perform entropy quality inspection and verification, and they do not belong to the scope of the "five-level" quality inspection and verification process. Therefore, the total number of sub-units in the module is 7, and the quality inspection process is 5 levels. The internal operation subunits are as follows: 2-1. Task fence synchronization subunit, 2-2. Entropy length balance verification subunit, 2-3. Segmented hash integrity verification subunit, 2-4. Minimum entropy health threshold screening subunit, 2-5. Shannon entropy static uniformity coarse screening subunit, 2-6. Ciphertext fusion entropy fine quality inspection subunit, 2-7. Trusted domain entropy secure destruction subunit, 5. Verification fault output terminal. If any level of verification fails, the fault signal is transmitted from module 2 to terminal 5 and the process is terminated; after all five levels of verification pass, the pure entropy data flows into the first-level module 3 through terminal 6.

[0036] 3. Module 3 is the encrypted fusion entropy engine module. Its internal operation sub-units are as follows: 3-1. Entropy bit string splicing control sub-unit, 3-2. Multi-dimensional context generation and binding sub-unit, 3-3. Context hash tracing sub-unit; The joint entropy data stream spliced ​​by module 3 flows into module 4 through terminal 6.

[0037] 4. Module 4 is the key derivation operation unit; its internal sub-units are: 4-1. HKDF-Extract sub-module, 4-2. HKDF-Expand sub-module, 4-3. Operational anomaly security scheduling sub-unit, and 4-4. TEE domain isolated storage output sub-module; Module 4 has an independent global trusted key output terminal 7 at its bottom, which outputs the trusted key generated by the TEE isolated domain; the derivation completed isolated key is output by Module 4 to terminal 7; this unit implements HKDF key derivation conforming to the RFC5869 standard, and relies on the 4-3 operational anomaly security scheduling sub-unit to achieve operation anomaly protection. Detailed Implementation

[0038] The following is in conjunction with the appendix Figure 1The implementation process of this invention is described in detail with a complete implementation process for high-security scenarios of multi-party privacy computation in finance. The embodiments are only used to explain this invention and are not intended to limit the scope of protection.

[0039] This embodiment corresponds to the attached Figure 1 In the architecture diagram, the hyphenated segmented numbers (1-1, 2-1, 3-1, 4-1) represent functional sub-units with independent computing capabilities within each primary module; the individual Arabic numerals 5, 6, and 7 are data stream transmission terminals / path identifiers and do not have computing processing capabilities.

[0040] Step 1: Parallel acquisition of three-layer cross-domain heterogeneous entropy.

[0041] Appendix Figure 1 Mark 1 represents the three-layer cross-domain heterogeneous entropy source acquisition module. Sub-unit 1-1, the TEE hardware trusted entropy acquisition sub-unit, initiates the local Enclave security environment, generates a hardware remote proof metric, and simultaneously generates a temporary asymmetric key pair within the isolated domain. The public key is used as a random enhancement component for concatenation, resulting in the TEEattest entropy bit string. Sub-unit 1-2, the mTLS session entropy acquisition sub-unit, completes the bidirectional mTLS handshake between the two communication ends, reads the financial business-specific security tag, extracts session random material from the TLS standard key derivation function, and generates an mTLS session. Sub-unit 1-3, the MPC entropy source sub-module, adopts (… The t,n) threshold secret sharing mechanism is used. This financial embodiment exemplarily selects a (3,5) threshold combination of t=3 and n=5, i.e., deploying 5 MP distributed nodes in the cluster, collecting independent random components output by no less than 3 normal nodes, and splicing them to generate the MPC multi-party collaborative entropy source MPCentropy. Other threshold ratios such as (2,4), (2,3), and (4,7) can be flexibly replaced according to the scenario's security level and cluster size. Optionally, subunits 1-4 (Knowledge Graph Business Entropy Extension Subunits) can be enabled to perform dictionary encoding hashing on customer business triplet data, generating business auxiliary entropy. All original entropy bitstreams generated by module 1 are unidirectionally sent to the forward data flow path indicated by number 6 in the attached diagram. Figure 1 The multi-level entropy pre-verification pipeline module marked as 2.

[0042] In this embodiment, a unique task instance ID is assigned for each key derivation, and the three entropy sources are bound to the same task instance. The 2-1 task fence synchronization subunit inside module 2 performs fence synchronization waiting, sets the global task timeout time to 2000ms, and only starts the subsequent verification when all three entropy sources of the same task instance are collected. If the three entropy sources are not collected within the timeout, the task in this round is judged to have failed.

[0043] Step 2: Multi-level entropy pre-verification pipeline verification.

[0044] After the three entropy data flows from Module 1 into the multi-level entropy pre-verification pipeline module of Module 2, the 2-1 task fence synchronization subunit is executed first: it performs fence synchronization waiting and global timeout judgment for this round of tasks; only when it is determined that all three entropy sources are ready to be collected and no timeout has occurred will the full set of verification subunits 2-2, 2-3, 2-4, 2-5, and 2-6 inside Module 2 be started; if 2-1 determines that the collection has timed out, it directly outputs a fault signal to the external terminal 5, triggering the 2-7 trusted domain entropy security destruction subunit to perform memory erasure and session destruction, terminating the key derivation process of this round.

[0045] Inside module 2, the three entropy sources from module 1 are independently subjected to a complete set of checks by subunits 2-2, 2-3, 2-4, 2-5, and 2-6, generating an independent check status flag for each entropy source. This pipeline uses a serial, step-by-step check mode: for each entropy source, checks 2-2, 2-3, 2-4, 2-5, and 2-6 are performed sequentially. If any check of a single entropy source fails, the remaining check processes for that source are immediately stopped. The three entropy sources complete their respective check processes independently and in parallel. If any check of any of the three entropy sources fails, the entire check is considered to have failed. If any entropy source fails a check, a fault signal is output to external terminal 5, directly terminating the key derivation process and triggering a device security alarm. Only when all three entropy sources pass the check are they output together and sent to the ciphertext fusion entropy engine module in module 3 via the forward path of digital 6. Based on the aforementioned customizable verification parameter rules, this high-security financial implementation adopts strict configurations for the balance threshold and weight coefficients: Sub-unit 2-2 Entropy length balance verification: Calculate the three-way entropy bit length balance ratio Rratio, with a preset balance threshold of 0.7. If the ratio is lower than this threshold, it is determined that the multi-way entropy length is unbalanced; Sub-unit 2-3 Segmented hash integrity verification: Perform independent hashing on the three-way entropy, then concatenate the three segments of digest for secondary hashing to obtain Hashtotal, and compare it with the pre-stored benchmark digest. If they are inconsistent, it is determined that the entropy has been tampered with; Sub-unit 2-4 Minimum entropy health threshold screening: Configure the minimum entropy threshold for the financial scenario for each of the three entropies; Sub-unit 2-5 Shannon entropy static uniformity coarse screening: Statistically analyze the bit distribution according to the Shannon entropy formula H(X) and filter out severely biased entropy samples; Sub-unit 2-6 Ciphertext fusion entropy fine quality inspection: Use the ciphertext fusion entropy formula F with gradient variance term, and simultaneously verify the static distribution of entropy and temporal periodic jitter. The weight coefficient λ is configured to 1.5 to increase the sensitivity of temporal periodic pseudo-random defect identification. If any entropy source verification fails, a fault signal is output unidirectionally to external terminal 5 and the current key derivation process is immediately terminated, and the current inferior entropy data is directly discarded; the 2-7 Trusted Domain Entropy Security Destruction Subunit performs memory zeroing security erasure on all entropy bit data in the current round within the TEE trusted domain, destroying the mTLS session and MPC distributed session context; no data transmission path is set up for reverse flow back to module 1 within this architecture.

[0046] Terminal 5 outputs standardized fault messages and hardware interrupt signals, which are simultaneously uploaded to the local TEE security management unit and the upper-level business scheduling platform of the whole machine. The upper-level scheduling platform listens for fault signals from terminal 5 in real time to detect entropy verification anomalies. The platform supports two restart handling modes: 1) Automatic handling mode (default configuration): After listening to the fault signal from terminal 5, it automatically generates an entropy collection restart control command according to the built-in security policy and sends it to module 1, automatically initiating a new round of complete entropy collection and key derivation process. The maximum number of automatic retries can be pre-configured; 2) Manual handling mode (optional for high-security scenarios): Automatic retry logic is turned off. After terminal 5 reports a fault, it only pushes an alarm prompt to the operation and maintenance backend. After the operation and maintenance personnel check the hardware and node faults and complete the repair, they manually issue a control command to trigger module 1 to re-collect the entropy source.

[0047] Step 3: Entropy-ordered splicing and multidimensional context binding.

[0048] Figure 1 Mark 3 is the encrypted fusion entropy engine module. Its internal sub-units 3-1, 3-2, and 3-3 process the pure entropy data in sequence: Sub-unit 3-1 is the entropy bit string splicing control sub-unit: it sets the splicing order of TEE entropy → mTLS entropy → MPC entropy according to the financial security policy, prohibits XOR mixing of multiple entropy sources throughout the process, and only performs direct splicing of the first and last bits of the bit string; Sub-unit 3-2 is the multi-dimensional context generation and binding sub-unit: it generates multi-dimensional context parameters carrying device fingerprint, session number, task ID, timestamp, and current entropy splicing order, and binds them to the joint entropy material for key space isolation; Sub-unit 3-3 is the context hash tracing sub-unit: it performs hash operation on the complete multi-dimensional context, generates an audit binding digest, and retains it for post-event key tracing verification; The joint entropy input material after module 3 completes splicing and binding is sent to the key derivation operation unit of module 4 through the forward path of number 6.

[0049] Step 4: HKDF key generation and hardware-isolated output.

[0050] Figure 1 The subunits 4-1, 4-2, 4-3, and 4-4 within the tag 4 module work together to complete the standardized key derivation:

[0051] Subunit 4-1 HKDF Extract: Using the TEEattest internal remote proof metric as salt, the extraction operation is performed on the joint entropy material, and pseudo-random key material is output.

[0052] Subunit 4-2 HKDF Expand Subunit: Inputs financial scenario-specific Info identifier and multi-dimensional Context parameters to generate a globally trusted key; Subunit 4-3 Operation Anomaly Security Scheduling Subunit: Monitors internal anomalies in HKDF extraction, expansion, and TEE domain memory access; once an operation anomaly is detected, fault tolerance protection is triggered, and the output of the derived key is prohibited; Subunit 4-4 TEE Domain Isolated Storage Output Subunit: Stores the generated globally trusted key in TEE hardware isolated memory, prohibiting its export to the operating system's ordinary plaintext space; the finally generated isolated trusted key is output to external terminal 7 via a connection.

[0053] Beneficial effects

[0054] This invention discloses a method and system for integrated key derivation based on a TEE-mTLS-MPC architecture, which integrates encrypted entropy fusion. It collects three heterogeneous entropy sources in parallel: TEE hardware trusted entropy, mTLS session entropy, and MPC multi-party collaborative entropy. It constructs an integrated security architecture consisting of three layers of cross-domain heterogeneous entropy sources, a five-level serial pre-entropy quality inspection pipeline, an encrypted fusion entropy engine, and RFC5869HKDF with computational anomaly protection. A multi-level entropy pre-verification pipeline is set up as an entropy source access security barrier. Multi-source entropy acquisition synchronization and timeout control are completed through a task barrier synchronization subunit. Only after all three entropy sources pass verification is subsequent entropy fusion and key derivation allowed; if any entropy source verification or acquisition times out, the current round terminates. Key derivation is performed by the Trusted Domain Entropy Security Destruction Subunit within the TEE, which completes the zeroing and destruction of entropy data for this round. This round does not downgrade or reuse the residual entropy, making security risks explicit as alarms. This avoids the implicit cryptographic risks caused by residual entropy flowing into the HKDF link from the source; reduces the risks caused by the inherent defects of a single entropy source; prevents inferior or tampered entropy from flowing into the key derivation link, and eliminates the implicit security risks caused by downgraded reuse of residual entropy; and includes engineering mechanisms for fence synchronization, timeout control, and trusted domain entropy security destruction. This invention is applicable to high-security-value scenarios such as financial privacy computing and government affairs, meeting multiple compliance security requirements for hardware isolation, anti-tampering, and anti-key collision, thus avoiding the risk of significant financial and data security losses due to key leakage.

Claims

1. A key derivation method based on TEE-mTLS-MPC architecture with integrated ciphertext fusion and entropy, characterized in that: Based on a hardware root of trust, a hardware-isolated trusted domain for TEE is constructed, and an integrated TEE-mTLS-MPC encrypted fusion entropy security computing system is built. A three-layer cross-domain heterogeneous independent entropy source joint key derivation mechanism is adopted, collecting the following entropy sources: TEEattest (generated by the TEE trusted execution environment, containing a remote proof metric and an Enclave internal temporary key pair with the public key as a truly random component); mTLSsession (generated after bidirectional handshake authentication of the communication link, with the session key derived from the TLS key derivation function according to the application layer-specific label); and MPC multi-party collaborative entropy source denoted as MPCentropy, generated by at least t random contributions from distributed multi-party computing nodes using a (t,n) threshold secret sharing mechanism. These three types of entropy sources are independent of each other and have complementary security capabilities. TEEattest and mTLSsession... The three original entropy sources (MPCentropy, MPCentropy, and MPCentropy) independently perform multi-level pre-security checks. Subsequent bit string concatenation and key derivation are only allowed when all three entropy sources pass the checks. If any entropy source fails the check, the current key derivation process is terminated and an alarm signal is output. The remaining qualified entropy sources are not reused within this round of the process. Service recovery is achieved by initiating a new round of complete entropy collection and verification from the upper-layer service. The three qualified entropy sources are combined into a unified initial key material using direct bit string concatenation. The bit string concatenation order can be dynamically adjusted according to the security policy, and the concatenation order is bound as part of the multi-dimensional Context field. Before the key material is sent to HKDF, the XOR method is prohibited from fusing multi-source entropy values, ensuring the complete preservation of the independent cryptographic contributions of each layer of entropy sources. Before key derivation, each layer of entropy sources undergoes minimum entropy health detection, integrity verification, entropy length balance verification, and entropy randomness screening. The trusted key is generated iteratively using the HKDF hierarchical key derivation mechanism, which conforms to the RFC5869 financial-grade standard. The process is divided into an Extract digest extraction stage and an Expand key expansion stage. The Extract stage uses the remote proof metric from TEEattest as the salt value for calculation. The corresponding key derivation formula is: Among them, Info is a fixed identifier field specific to the multi-party collaborative encrypted key derivation scenario, used to limit the key to only serve the multi-entropy source integrated key derivation operation of this solution; Context is a dynamic context parameter field, carrying multi-dimensional task and environment information such as current task identifier, timestamp, participant identity, hardware device fingerprint, session sequence number, multi-party computing cluster node identifier, and entropy source bit splicing order, used to isolate the key space of different devices, sessions, and collaborative tasks, and prevent cross-scenario key collisions and key reuse; the key derivation module is implemented by deploying a cryptographic library or hardware security module HSM that conforms to the RFC 5869 standard; the finally generated Kfinal is a global trusted key specific to the multi-entropy source collaborative scenario, which is generated, operated, and iterated entirely within the TEE hardware isolation domain and is not exported externally.

2. A ciphertext fusion entropy integrated key derivation system based on TEE-mTLS-MPC architecture, used to implement the method described in claim 1, characterized in that: It includes a hardware root of trust foundation, a multi-source entropy acquisition unit, a multi-level entropy pre-verification unit, a ciphertext fusion engine, a context manager, and a key derivation operation unit; The hardware trust root trusted base is used to construct the TEE hardware isolated trusted domain, providing a hardware trusted anchor point for end-link entropy collection, verification, and key derivation. The multi-source entropy acquisition unit includes a TEE entropy source submodule, an mTLS entropy source submodule, and an MPC entropy source submodule. The TEE entropy source submodule is deployed within a trusted execution environment, generating a TEEattest containing a remote proof metric and the public key of the Enclave internal temporary key pair. The mTLS entropy source submodule is deployed at both ends of the communication link, and after the handshake is completed, it exports the session key according to the business-specific label to generate an mTLSsession. The MPC entropy source submodule adopts a (t,n) threshold secret sharing mechanism, aggregating random components output by no less than t normal distributed nodes and concatenating them to generate an MPC multi-party collaborative entropy source denoted as MPCentropy. The multi-level entropy pre-verification unit integrates a hash integrity verification subunit, a minimum entropy health monitoring subunit, a fusion entropy fine-grained quality inspection subunit, an entropy length balance judgment subunit, a task fence synchronization subunit, and a trusted domain entropy secure destruction subunit. The multi-level entropy pre-verification unit independently performs multi-layer security screening on the three entropy sources before concatenation. Only when all three entropy sources pass verification is the three entropy sources output downstream. If any entropy source fails verification, the key derivation process for this round is blocked, no entropy source is output downstream in this round, and the remaining qualified entropy sources are not downgraded and reused. The ciphertext fusion engine is used to concatenate the three qualified entropy sources according to a dynamically adjusted bit string order, prohibiting XOR operations throughout the process. The algorithm integrates entropy sources; the context manager generates multi-dimensional context information including task identifier, timestamp, participant identity, and entropy concatenation order; the key derivation operation unit is deployed within the TEE isolation domain, configured with an HKDF key derivation operation module conforming to RFC5869 or an HSM hardware encryption module, possessing operation anomaly protection capabilities, and generates globally exclusive trusted keys based on layered Extract and Expand formulas, with the output keys stored in isolation throughout the process and not exported externally; the key derivation operation unit includes an HKDF-Extract extraction submodule, an HKDF-Expand expansion submodule, and an operation anomaly security scheduling module. The system comprises a sub-unit and a TEE domain isolated storage output sub-module; the HKDF-Extract sub-module is used to perform extraction operations on the joint entropy material; the HKDF-Expand sub-module is used to perform expansion operations to generate a globally trusted key; the operation anomaly security scheduling sub-unit is used to monitor internal anomalies in HKDF extraction operations, expansion operations, and TEE domain memory access, and triggers fault tolerance protection when an internal operation anomaly is detected, prohibiting the output of the derived key; the TEE domain isolated storage output sub-module is used to enclose the globally trusted key in TEE isolated memory and complete the output; the system as a whole adopts an entropy fusion rule that only splices bit strings and prohibits XOR.

3. The ciphertext fusion entropy-integrated key derivation method based on TEE-mTLS-MPC architecture according to claim 1, characterized in that: A two-stage entropy randomness screening pipeline is adopted. First, the static uniformity is coarsely screened by Shannon information entropy. After passing the standard, the temporal dimension is finely checked by encrypted fusion entropy with gradient variance term. Only when all three entropy sources meet the standards of the two-stage screening can the HKDF extraction stage be entered. If any verification of any entropy source fails, the current derivation will be terminated and an alarm will be issued. Shannon entropy coarse sieve formula: The formula for fine-grained quality control of encrypted text fusion entropy is as follows: In the fusion entropy, the weight coefficient λ is adaptively configured according to the scene security level; Shannon entropy only evaluates the static distribution of entropy, and the fusion entropy superimposed with gradient variance captures the periodicity and drift defects of random sequences. The two work together to form a complete entropy random security barrier; the ciphertext fusion entropy fine quality inspection formula is only used to pre-determine the random security quality of the three types of original entropy sources.

4. The ciphertext fusion entropy-integrated key derivation method based on TEE-mTLS-MPC architecture according to claim 1 or 3, characterized in that: Before concatenating the entropy sources, the three entropies are hashed separately in segments, and then the hash digest bits of each entropy are concatenated to generate the total verification digest. XOR operations are prohibited throughout the process of processing entropy and hash digest. Segmented hash verification formula: The real-time Hashtotal is compared with the pre-stored baseline digest. If any entropy tampering causes the total verification digest to be inconsistent, it is determined that the entropy transmission / storage has been tampered with, and the current round of key derivation is terminated directly.

5. A method for ciphertext fusion and entropy-integrated key derivation based on a TEE-mTLS-MPC architecture as described in claim 1 or 4, characterized in that: After completing the hash integrity verification, calculate the independent minimum entropy value of the three entropy sources and configure a dedicated security threshold. If the minimum entropy of any entropy source is lower than the corresponding threshold, it is determined that the randomness is seriously insufficient, and the current round of derivation is terminated in advance to reduce the calculation overhead of subsequent Shannon entropy and fusion entropy.

6. The ciphertext fusion entropy-integrated key derivation method based on TEE-mTLS-MPC architecture according to claim 1, characterized in that: By constraining the bit length weight balance of the three entropy sources through the entropy length balance ratio, the balance verification formula is as follows: If Rratio is lower than the equilibrium threshold, the entropy length is determined to be unbalanced and a single entropy dominates randomness. The system triggers an alarm and terminates the current round of key derivation. Optionally, a business logic layer entropy source can be introduced. The business logic layer entropy source is obtained by performing dictionary encoding hash operation on the knowledge graph triple (subject, relation, object) data, and is concatenated with the three basic entropy sources to generate joint key material.

7. The ciphertext fusion entropy-integrated key derivation method based on TEE-mTLS-MPC architecture according to claim 1, characterized in that: The device ID, session number, task identifier, timestamp, and entropy concatenation order within the Context are compressed into a binding digest for post-event key traceability and auditing, verifying the legality of the key binding scenario. The context-bound hash formula is: 。 8. The ciphertext fusion entropy integrated key derivation system based on TEE-mTLS-MPC architecture according to claim 2, characterized in that: The multi-level entropy pre-verification unit and the HKDF key derivation operation unit are all deployed in the TEE hardware-isolated trusted domain. The upper-layer business system cannot read the original entropy data, verification threshold and key intermediate value, thus resisting memory sniffing and process hijacking tampering attacks. The system is also configured with a knowledge graph hash submodule to generate knowledge graph triple hash business entropy source and input it into the ciphertext fusion engine.