A risk adaptive access control method and system for a trusted data space

CN122933092APending Publication Date: 2026-10-16GUIZHOU DATABAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611029814.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0003]然而,现有基于属性加密的访问控制方案存在显著缺陷:其一,风险评估逻辑与密钥生成过程高度耦合,部分改进方案将实时风险因子(如IP信誉、设备可信度)直接嵌入密钥生成流程,一旦风险评估服务被攻破,将直接导致系统主密钥或属性密钥体系泄露,引发全局性安全风险;其二,风险评估结果通常通过非结构化接口(如API响应)传递,缺乏完整性保护与可验证的凭证机制,导致风险等级无法跨系统、跨进程独立验证,难以支撑审计追溯;其三,现有方案普遍缺失时效控制机制,风险凭证可被长期重复使用,无法限制授权的有效时间窗口,存在高风险状态下的持续访问隐患;其四,缺乏抗重放机制,攻击者截取合法风险授权信息后,可在有效期内反复提交,绕过动态风险控制,造成授权滥用

Benefits of technology

通过设立独立于授权机构且不持有系统主密钥的风险评估实体,实现风险评估与密钥发放过程的物理与逻辑解耦,避免因风险评估模块权限过高导致的安全风险。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122933092A_ABST
    Figure CN122933092A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data security and access control, and proposes a risk adaptive access control method and system for a trusted data space; in the access control framework based on attribute encryption, the risk assessment process and the key issuing process are structurally decoupled, a risk credential with integrity protection is generated by a risk assessment entity, and a risk level is mapped into a risk attribute which can be embedded into an access strategy, and the risk attribute and a user identity attribute jointly participate in an access control decision; meanwhile, time window binding and a random identification mechanism are used to realize time limit control and anti-replay of the risk credential. The method can realize dynamic authorization based on a real-time risk level under the premise of guaranteeing the safe isolation of system keys, and improve the security and auditability of data access control in a trusted data space environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a risk-adaptive access control method and system for trusted data spaces, belonging to the field of data security and access control technology. Background Technology

[0002] With the development of the digital economy, the demand for cross-organizational and cross-regional data sharing is increasing. Trusted Data Space, as a core architecture ensuring data is "usable but not visible," access is controllable, and the entire process is auditable, is widely used in cloud storage and data sharing scenarios. To achieve fine-grained access control, existing technologies generally employ Attribute Encryption Based on Ciphertext Policy (CP-ABE) technology, which embeds the access policy directly into the ciphertext. Users can only decrypt data when they possess the attribute key that satisfies the policy. This mechanism relies on static attributes for authorization, such as user identity, organizational role, or long-term credentials. Once authorized, the authorization remains effective until the attribute is revoked, without requiring a reassessment of environmental risks.

[0003] However, existing access control schemes based on attribute encryption have significant drawbacks: First, the risk assessment logic is highly coupled with the key generation process. Some improved schemes directly embed real-time risk factors (such as IP reputation and device trustworthiness) into the key generation process. Once the risk assessment service is compromised, it will directly lead to the leakage of the system master key or attribute key system, triggering a global security risk. Second, risk assessment results are usually transmitted through unstructured interfaces (such as API responses), lacking integrity protection and verifiable credential mechanisms. This makes it impossible to independently verify risk levels across systems and processes, making it difficult to support audit traceability. Third, existing schemes generally lack timeliness control mechanisms. Risk credentials can be reused repeatedly for a long time, and the effective time window of authorization cannot be limited, posing a risk of continuous access under high-risk conditions. Fourth, there is a lack of anti-replay mechanisms. After attackers intercept legitimate risk authorization information, they can repeatedly submit it within the validity period, bypassing dynamic risk control and causing authorization abuse. These problems collectively make it difficult for traditional schemes to achieve real-time adaptive authorization of "static identity + dynamic risk" in a trusted data space, and they cannot cope with increasingly complex network attack and internal threat scenarios.

[0004] Therefore, in the context of a trusted data space, there is an urgent need for a risk-adaptive access control technology that can achieve logical isolation between risk assessment and key distribution, possess timeliness control and anti-replay capabilities, and simultaneously ensure auditability and system security isolation. Summary of the Invention

[0005] The purpose of this invention is to provide a risk-adaptive access control method and system for trusted data spaces. Under an attribute-based encryption framework, the risk assessment process and the key generation process are structurally decoupled. A risk credential with integrity protection serves as a trusted interface between the two, enabling access authorization to dynamically change with the real-time risk level, while simultaneously possessing auditability, timeliness, and replay resistance.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A risk-adaptive access control method for trusted data spaces includes the following steps: Step 1. Establish an encryption environment based on ciphertext policy attribute encryption CP-ABE. The authorized institution executes the initialization algorithm to generate the system public key and system master key. The system master key is held only by the authorized institution. Step 2. Set up an independent risk assessment entity. The risk assessment entity does not hold the system master key and is only used to calculate risk scores and risk levels. Step 3. The risk assessment entity calculates the trust score based on the user identifier and risk context information, and generates the corresponding risk level according to the preset threshold. Step 4. Map the risk level to a set of monotonic risk attributes, and combine the time window identifier to generate time-bound risk attributes; Step 5. The risk assessment entity generates a risk certificate containing a user identifier, issuance timestamp, time window identifier, one-time random number, risk score, risk level, and risk attribute set, and signs the risk certificate; Step 6. The authorized institution reads the risk certificate and performs the following in sequence: signature verification; freshness verification; anti-replay detection based on a one-time random number; when all verifications pass, the authorized institution generates the corresponding CP-ABE attribute key component based on the risk attribute set, and merges it with the user's static attribute key component to form a complete user key; Step 7. The data owner constructs an access policy based on a preset risk threshold and the current time window, and encrypts and generates ciphertext; Step 8. The user decrypts using the complete user key. Decryption succeeds if and only if the set of attributes satisfies the access policy; otherwise, decryption fails.

[0007] The present invention also provides a risk-adaptive access control system for trusted data spaces, comprising: The authorization module is used to generate the system public key and system master key, and to generate risk attribute key components based on verified risk credentials; The risk assessment module is used to calculate risk scores, generate risk levels, and output signed risk certificates. The data encryption module is used to generate ciphertext based on an access policy that includes risk attribute thresholds; The user decryption module is used to decrypt ciphertext based on static attributes and risk attributes. A neutral storage medium is used to exchange risk credentials between the risk assessment module and the authorization module; the risk assessment module and the authorization module are isolated from each other, and the risk assessment module does not hold the system master key; the authorization module includes: a signature verification unit, a freshness verification unit, and a replay detection unit based on one-time random numbers.

[0008] The present invention provides a storage medium on which a computer program is stored, and when the program is executed by a processor, it implements the above-described method steps.

[0009] Furthermore, the risk scoring employs an interpretable additive model, mapping multiple risk factors to independent contribution items and outputting the scoring decomposition results for auditing.

[0010] Furthermore, the risk factors include at least one of the following: IP reputation value, device trustworthiness, multi-factor authentication pass mark, abnormal behavior score, geographical location offset distance, and number of failures within a preset time window.

[0011] Furthermore, the risk level adopts a monotonic mapping mechanism, whereby when the risk level increases, the corresponding risk attribute set becomes a superset of the low-level risk attribute set.

[0012] Furthermore, the risk attributes are bound to the time window identifier, making the risk attributes of different time windows non-interchangeable.

[0013] Furthermore, when the system is initialized or the public key is changed, the authorized agency generates a public key fingerprint by hashing the key elements of the public key, and clears the cached state file bound to the old public key when the fingerprint changes.

[0014] Furthermore, risk certificates are protected by either a symmetric or asymmetric signature mechanism.

[0015] Furthermore, freshness verification is achieved by checking whether the issuance time is within a preset valid time window.

[0016] Furthermore, anti-replay detection is achieved by maintaining a one-time deduplication set of random numbers, which prohibits reuse before the random numbers expire.

[0017] Beneficial effects: Compared with the prior art, the present invention has the following characteristics: By establishing a risk assessment entity that is independent of the authorized agency and does not hold the system master key, the physical and logical decoupling of the risk assessment and key distribution process is achieved, avoiding security risks caused by excessive permissions of the risk assessment module.

[0018] The risk assessment entity calculates a trust score based on the user identifier and real-time risk context information, maps it to a risk level, and transforms the level into a monotonic risk attribute set. Combined with the time window identifier, it generates time-bound risk attributes, forming a dynamically variable attribute dimension, thereby achieving adaptive authorization based on the real-time risk level. The issuance timestamp, time window identifier, and one-time random number are embedded in the risk certificate. The authorized institution performs signature verification, freshness verification, and anti-replay detection based on the one-time random number in sequence to ensure the legality, timeliness, and uniqueness of the certificate and effectively resist replay attacks and the abuse of expired certificates. After all verifications are passed, the authorized agency generates a CP-ABE attribute key component based solely on the risk attribute set, and merges it with the user's inherent static attribute key component to form a complete user key, so that the key's permissions dynamically change with the risk status. The data owner constructs an access policy and encrypts the data based on a preset risk threshold and the current time window. Users can only successfully decrypt the data if the set of attributes carried by their complete key completely matches the access policy, thus achieving fine-grained, context-aware access control.

[0019] The above mechanisms work together to fundamentally solve the problems of risk assessment and key issuance coupling, inability to dynamically respond to risk changes, lack of anti-replay and time-sensitive control in existing technologies. They achieve a comprehensive effect of risk-driven real-time authorization, key security isolation, attack resistance and time-bound control, significantly improving the security, flexibility and controllability of data access in trusted data spaces.

[0020] The technical concept and innovations of this invention are as follows: 1. In terms of system structure, the risk assessment entity and the authorization entity are logically isolated.

[0021] 2. Regarding the risk expression mechanism, this invention maps risk levels to risk attribute information that can be embedded in access policies, and can combine time identifiers to bind time periods, so that risk attributes are associated with specific time windows, thereby improving the dynamism of risk control.

[0022] 3. Regarding the trusted transmission mechanism, the risk assessment entity generates risk credentials containing user identifiers, time information, random identifiers, risk levels, etc., and performs integrity protection processing on them.

[0023] 4. At the access control level, the data owner embeds risk conditions into the access policy during the encryption phase, so that the decryption conditions include both static identity attributes and dynamic risk attributes, thereby realizing a unified authorization model of static identity and dynamic risk. Attached Figure Description

[0024] Figure 1This is the overall system architecture diagram of the risk adaptive access control system for trusted data space of this invention; Figure 2 This is the risk-adaptive core process architecture diagram of the present invention. Detailed Implementation

[0025] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.

[0026] As described in the background section, existing access control schemes based on attribute encryption (CP-ABE) rely on static attributes for authorization. Once a user obtains a key, they can access data for an extended period. They cannot dynamically adjust permissions based on real-time risk status. Furthermore, risk assessment is tightly coupled with the key issuance process, and risk information lacks a structured and verifiable transmission mechanism. This makes the system vulnerable to replay attacks, unable to achieve timely control, and unable to meet the security requirements of trusted data spaces for "dynamic risk adaptive authorization".

[0027] After extensive research, the inventors discovered that the most fundamental reason for the aforementioned predicament lies in the fact that existing systems bind the functions of "risk assessment" and "key generation" within the same trust domain. This prevents risk information from participating in authorization decisions as an independent and verifiable external input. Simultaneously, the risk status is not encoded as a time-sensitive and unique structured attribute that can be embedded in access policies, resulting in a lack of closed-loop linkage between risk assessment results and encryption strategies. The core contradiction manifests as follows: on the one hand, the system needs to dynamically adjust access permissions based on real-time risks; on the other hand, the attribute encryption framework itself requires keys to be fixedly bound to a set of attributes after generation. These two aspects fundamentally conflict in terms of time and trust boundaries—allowing risk information to be injected into key generation in real time undermines the isolation and security of the key system; if risk information is only used as an external judgment basis, it cannot be formally expressed at the encryption strategy level, and authorization decisions lose their verifiable foundation.

[0028] Based on the above findings, the inventors proposed a concept that structurally decouples risk assessment from key issuance, using a signed risk credential as the sole trusted interface. The core of this concept is that the risk assessment entity does not hold the system master key; it is only responsible for generating a complete risk credential containing a user identifier, a time window identifier, a one-time random number, a risk level, and a corresponding set of risk attributes, and signing it. The authorizing institution does not participate in risk calculation at all; it only verifies the signature, validity, and uniqueness of the credential to determine whether to issue a CP-ABE attribute key component bound to the risk level to the user. The risk level is mapped to a monotonically increasing set of attributes and bound to a time window, forming structured attributes such as "RISKGE4T202601250630," which can be directly embedded into access policies. The one-time random number ensures that the credential can only be used once, completely blocking replay attacks. This concept is the first to achieve a verifiable, auditable, and time-bound closed-loop control among the four elements of "risk status, credentials, key components, and access policies": the output of risk assessment is not a vague "high / low risk" notification, but an encrypted attribute unit that can be independently verified by authorized institutions and directly matched by encryption policies; key generation no longer depends on real-time invocation of risk services, but on a storable, transferable, and auditable credential, thereby achieving dynamic authorization based on real-time risks without disclosing the system master key.

[0029] Guided by this inventive concept, the inventors proposed a risk-adaptive access control method, control system, and storage medium for trusted data spaces.

[0030] The method includes the following steps: Step 1: Establish an encryption environment based on ciphertext policy attribute encryption CP-ABE. The authorized institution executes the initialization algorithm to generate the system public key and system master key. The system master key is held only by the authorized institution.

[0031] In this embodiment, an encryption environment based on ciphertext policy attribute encryption (CP-ABE) is first established. This environment relies on the bilinear group hierarchy and the corresponding bilinear mapping operation structure to ensure that the encryption mechanism conforms to the mathematical foundation of CP-ABE. The authorized agency, as the sole trusted entity, executes an initialization algorithm to generate a system public key and a system master key. The system public key is used for subsequent ciphertext generation and attribute key verification, while the system master key is strictly restricted to being held only by the authorized agency; no other entity may access or store this key, thereby achieving centralized and isolated key control at the system architecture level. This step establishes the global parameters and key distribution benchmark of the CP-ABE system through the initialization process, providing an immutable encryption support structure for subsequent attribute-based access control.

[0032] Step 2: Set up an independent risk assessment entity. The risk assessment entity does not hold the system master key and is only used to calculate risk scores and risk levels.

[0033] In this embodiment, an independent risk assessment entity is set up. This entity is explicitly defined as not holding the system master key. Its function is limited to performing risk score calculation and risk level generation. It does not participate in any key generation, distribution or decryption process. This achieves physical or logical separation of risk assessment function and key management function in the system structure, ensuring that the executor of risk assessment behavior cannot access or affect the system's core key system.

[0034] Step 3: The risk assessment entity calculates the trust score based on the user identifier and risk context information, and generates the corresponding risk level according to the preset threshold. In this embodiment, the risk assessment entity calculates a quantitative score reflecting the user's current level of trustworthiness, namely a trust score, based on the user's identifier and risk context information. This score is derived from multiple risk factors in the risk context, and its magnitude directly reflects the risk level of the user's behavior or environment. Subsequently, the trust score is fed into a preset threshold mapping logic, which, according to a fixed level range, transforms it into a discrete risk level. This level is a classification result in integer form, and its value range is determined by a preset threshold. It depends only on the comparison between the trust score and the threshold and does not involve other intermediate processing or the expansion of conditional branches.

[0035] Step 4: Map the risk level to a set of monotonic risk attributes, and combine the time window identifier to generate time-bound risk attributes; In this embodiment, risk levels are mapped to a set of monotonic risk attributes. This means that each risk level corresponds to a set of multiple risk attributes, and as the risk level increases, its corresponding attribute set includes all the attributes contained in the lower levels, forming a hierarchical inclusion relationship. Based on this, risk attributes bound to time are generated by combining time window identifiers. This means that each risk attribute is associated with a specific time window identifier, so that the attribute is only valid within the corresponding time window, thereby ensuring that the attribute and the time window form an inseparable binding relationship and realizing the timeliness constraint of the risk attribute.

[0036] Step 5: The risk assessment entity generates a risk certificate containing a user identifier, issuance timestamp, time window identifier, one-time random number, risk score, risk level, and risk attribute set, and signs the risk certificate; In this embodiment, the risk assessment entity constructs a risk certificate based on the user identifier, issuance timestamp, time window identifier, one-time random number, risk score, risk level, and risk attribute set. By integrating the above elements into a unified data structure, a complete and traceable authorization basis is formed. Subsequently, a signature operation is performed on the risk certificate to bind the certificate content and signature information together, ensuring that the certificate is not tampered with or forged during transmission and verification, thereby guaranteeing the originality and credibility of the risk assessment results.

[0037] Step 6: The authorized institution reads the risk certificate and performs the following in sequence: 1. Signature verification; 2. Freshness verification; 3. Anti-replay detection based on one-time random number; When all verifications pass, the authorized institution generates the corresponding CP-ABE attribute key component based on the risk attribute set and merges it with the user static attribute key component to form a complete user key; In this embodiment, the authorizing agency reads the risk credential from the storage medium and first performs signature verification to confirm the integrity and authenticity of the credential, ensuring it has not been tampered with or forged. Next, a freshness check is performed to determine if the issuance timestamp carried in the credential is within a preset valid time window, thereby eliminating expired or delayed risk information. Then, an anti-replay detection is performed based on a one-time random number; by comparing it with a previously recorded set of random numbers, it is confirmed that the credential has not been submitted repeatedly, preventing attackers from intercepting and replaying historical credentials to illegally obtain authorization. Once all three verifications pass, the authorizing agency generates a CP-ABE attribute key component corresponding to the risk attribute set explicitly recorded in the risk credential, and merges it with the static attribute key component already held by the user to form a complete user key. This ensures that the user is granted full access and decryption capabilities only when the risk credential is legally valid.

[0038] Step 7: The data owner constructs an access policy based on a preset risk threshold and the current time window, and encrypts and generates ciphertext; In this embodiment, the data owner constructs a policy to control data access based on a pre-set risk threshold and the current time window, and performs encryption operations on the data to generate ciphertext based on this policy. The risk threshold determines the minimum risk level requirement that the accessor must meet, while the time window ensures that the requirement is only valid within a specific time period. Together, they constitute the dynamic constraints of the access policy. By directly embedding the risk threshold and time window into the access policy, the data owner solidifies the dynamic authorization conditions for access behavior during the encryption phase, ensuring that the subsequent decryption process must simultaneously satisfy the joint constraints of identity attributes and real-time risk status. This achieves pre-binding of risk-level-based access control logic at the ciphertext level.

[0039] Step 8: The user decrypts using the complete user key. Decryption succeeds if and only if the set of attributes satisfies the access policy; otherwise, decryption fails. In this embodiment, the user uses a complete user key for decryption. This complete user key is formed by merging a static attribute key component and a risk attribute key component. Its attribute set includes user identity attributes and risk attributes mapped by risk level and bound to a time window. The decryption operation will only succeed if the user's attribute set completely satisfies the access policy pre-constructed by the data owner. This access policy consists of static identity conditions and dynamic risk attribute conditions. If any attribute required by the policy is missing from the user's attribute set, the decryption process will fail even if other conditions are met, thus ensuring that the granting of access rights strictly depends on the precise matching relationship between the attribute set and the policy.

[0040] This method establishes an encrypted environment based on Ciphertext Policy Attribute Encryption (CP-ABE), with the authorized institution independently generating and strictly storing the system master key, achieving physical and logical separation between key distribution and risk assessment. A risk assessment entity, which does not hold the system master key, calculates a trust score based on the user identifier and real-time risk context, maps it to a risk level, and further transforms it into a monotonic set of risk attributes. This, combined with a time window identifier, generates time-bound risk attributes, thus transforming dynamic risk states into structured attributes recognizable by the encryption policy. The risk assessment entity issues a risk credential containing the user identifier, issuance timestamp, time window identifier, one-time random number, risk score, and risk attribute set, and completes a digital signature. Upon receiving the credential, the authorized institution sequentially performs signature validity verification, timestamp freshness verification, and one-time random number anti-replay detection to ensure the authenticity, timeliness, and uniqueness of the credential. The mechanism addresses several key challenges in data sharing. First, it decouples risk assessment from key generation. Second, it implements time-bound risk attributes, provides a one-time random number anti-replay mechanism, and uses time-window-based freshness verification. Third, it addresses the issues of coupled risk assessment and key issuance, inability to dynamically authorize, lack of anti-replay and time-sensitive control in existing technologies. This results in fine-grained, real-time, and secure adaptive access control in a trusted data space, significantly improving the security and flexibility of the data sharing environment. Only when all verifications pass does the authorized institution dynamically generate the corresponding CP-ABE attribute key component, which is then merged with the user's static attribute key to form a complete key, achieving precise binding between risk level and access permissions. Data owners construct access policies based on preset risk thresholds and the current time window and encrypt data. Users can successfully decrypt data only when the attribute set contained in their complete key fully satisfies the access policy; otherwise, decryption fails.

[0041] This invention provides a risk-adaptive access control system for trusted data spaces, comprising: an authorization module for generating a system public key and a system master key, and generating a risk attribute key component based on verified risk credentials; a risk assessment module for calculating a risk score, generating a risk level, and outputting a signed risk credential; a data encryption module for generating ciphertext based on an access policy including risk attribute thresholds; a user decryption module for decrypting the ciphertext based on static attributes and risk attributes; and a neutral storage medium for exchanging risk credentials between the risk assessment module and the authorization module; wherein the risk assessment module and the authorization module are isolated from each other, and the risk assessment module does not hold the system master key; the authorization module includes: 1. a signature verification unit; 2. a freshness verification unit; and 3. a replay detection unit based on one-time random numbers.

[0042] By functionally isolating the authorization module and the risk assessment module, the risk assessment entity is ensured not to access the system master key, thereby reducing the cascading risks of key leakage to the overall encryption system. The authorization module incorporates a signature verification unit, a freshness verification unit, and a replay detection unit based on one-time random numbers, forming a triple verification mechanism for risk credentials, ensuring that the source of risk attributes is trustworthy, the validity period is valid, and they are not reusable. Neutral storage media serves as an intermediate transmission channel for risk credentials, achieving asynchronous decoupling between the risk assessment and key issuance processes, and improving the independence and scalability between system modules. The data encryption module generates ciphertext based on an access policy that includes risk attribute thresholds, while the user decryption module decrypts based on a joint key of static and dynamic risk attributes, enabling access control decisions to be directly linked to real-time risk status. Through structured isolation, credential integrity assurance, and a one-time authorization mechanism, this system architecture achieves loose coupling between the risk assessment and key generation processes, effectively supporting the collaborative implementation of dynamic authorization, auditability, and resistance to replay attacks, and improving the security boundary and operational reliability of data access control in the trusted data space.

[0043] In this embodiment, the risk assessment entity uses an interpretable additive model to quantify the independent contributions of multiple risk factors. The contribution of each factor to the final trust score is mapped to a scoring decomposition result in an interpretable form, and this decomposition result is embedded in the risk certificate and signed together. This allows the authorized institution to trace the weight and direction of influence of each risk factor after completing signature verification, freshness verification, and anti-replay detection, thus achieving full-chain auditability of the risk scoring generation process. This design breaks through the limitations of traditional black-box scoring mechanisms, making the risk assessment result no longer just a static input for access control, but an audit basis with transparency, interpretability, and accountability. Thus, without interfering with the access decision logic, it effectively meets the stringent requirements of the trusted data space for transparency, traceability, and compliance review of the entire access control process, significantly improving the trust verifiability and regulatory compliance of the system in high-security scenarios.

[0044] In this embodiment, when calculating a user trust score, the risk assessment entity must comprehensively evaluate at least one risk factor, including IP reputation value, device trustworthiness, multi-factor authentication pass flag, abnormal behavior score, geographical location offset distance, or number of failures within a preset time window. This constraint ensures that the collection of risk context information has standardized, quantifiable, and security-relevant core dimensions, avoiding subjectivity and arbitrariness in the assessment process. By using the explicitly listed factors as the input basis for risk scoring, the risk level can accurately reflect the real security threat level of user access behavior and form a strong correlation with the subsequently generated time-bound risk attributes. This enables the CP-ABE attribute key component generated by the authorizing agency based on the risk attribute set to have the ability to dynamically adapt to the actual risk situation. Thus, without relying on additional configuration, it ensures the comparability of risk assessment results, the consistency of authorization decisions, and the timeliness of key issuance in different scenarios. Ultimately, it achieves adaptive access control based on real-time risk awareness, effectively improving the security and controllability of data access in the trusted data space.

[0045] In this embodiment, risk levels establish a hierarchical inclusion relationship with risk attribute sets through a monotonic mapping mechanism. That is, when the risk level increases, its corresponding risk attribute set includes all risk attributes corresponding to lower-level risks, forming a strict superset relationship. Combined with time-bound risk attributes generated by time window identifiers, a complete risk attribute set is constituted. The authorized institution generates a CP-ABE attribute key component based on this, which is merged with the user's static attribute key to form a complete user key. When the data owner constructs an access policy based on a preset risk threshold, only a threshold policy such as RISKGE_k needs to be set. As long as the user's current risk level is not lower than k, their complete key will necessarily contain all the attributes required to satisfy the policy. Thus, high-level risks are automatically compatible with low-threshold policies during the decryption process. There is no need to configure access policies separately for each risk level. This effectively solves the problem of policy redundancy and compatibility failure caused by the lack of hierarchical inclusion of attribute sets when the risk level increases, and realizes a seamless and automated access control closed loop based on dynamic risk evolution.

[0046] In this embodiment, risk attributes are bound to time window identifiers, making risk attributes in different time windows non-interchangeable. Combined with the monotonic risk attribute set mapped by the risk level generated by the risk assessment entity based on the user identifier and risk context information, and the access policy constructed by the data owner based on the current time window and preset risk thresholds, it ensures that the risk attributes carried in the user key are only valid within the time window bound at the time of issuance. When a user attempts to decrypt ciphertext, if the time window identifier associated with the risk attribute in their complete user key is inconsistent with the time window specified in the access policy, the attribute encryption mechanism will determine that the attribute set does not meet the policy conditions, leading to decryption failure. This fundamentally blocks the cross-period reuse of risk attributes between different time windows, effectively avoiding authorization invalidation, permission abuse, or security policy bypass issues caused by long-term validity or repeated use of historical risk credentials. It achieves precise access control based on dynamic real-time risk levels and time constraints, improving the security and compliance of data sharing in the trusted data space.

[0047] In this embodiment, when the system is initialized or the public key is changed, the authorizing authority extracts the key elements of the system public key and calculates its hash value to generate a unique public key fingerprint. When a new public key fingerprint is detected to be inconsistent with the historical fingerprint, all cached state files bound to the old public key are automatically cleared. This cached state file contains temporary data of the attribute key components previously generated based on the old public key, thereby ensuring that the attribute key components generated subsequently are always strictly bound to the current valid public key. This avoids the risk of key-public key mismatch, decryption failure, or unauthorized authorization caused by historical cache residues after the public key update. By using the change of public key fingerprint as the trigger condition for cache clearing, the consistency and synchronization of the system public key lifecycle and access control state are achieved. This effectively solves the security failure problem caused by state asynchrony during public key rotation and ensures the integrity and reliability of the CP-ABE-based dynamic risk adaptive access control mechanism in the public key update scenario.

[0048] In this embodiment, the risk credential generated by the risk assessment entity includes a user identifier, issuance timestamp, time window identifier, one-time random number, risk score, risk level, and risk attribute set. The credential is digitally signed using either a symmetric or asymmetric signature mechanism. This allows the authorizing institution, upon receiving the credential, to effectively verify whether the credential content has been tampered with or forged during cross-entity transmission, based on the integrity verification capability of the signature mechanism. Combined with subsequent signature verification, freshness verification, and one-time random number anti-replay detection, a multi-dimensional trusted verification chain is formed. This ensures that the risk credential is reliable in origin, complete in content, and timely, solving the technical problem of risk credentials being easily forged or tampered with in untrusted channels, leading to inaccurate authorization decisions. It achieves precise access control based on real, dynamic risk levels, improving the security and adaptability of data access in a trusted data space.

[0049] In this embodiment, by limiting the freshness verification to verifying whether the issuance timestamp in the risk credential is within a preset valid time window, the authorizing institution can accurately judge the validity of the risk credential based on the time dimension before issuing the key. Combining the issuance timestamp and time window identifier already included in the risk credential, it effectively prevents authorization abuse or security vulnerabilities caused by the repeated use of the credential after its expiration. Thus, without changing the original system architecture and process sequence, dynamic access control based on time constraints is achieved, significantly improving the timeliness and anti-replay capability of the risk credential. It ensures that only credentials issued within the valid time window and meeting the real-time risk level can trigger key generation, ultimately achieving the system goal of balancing security and timeliness in risk adaptive access control.

[0050] In this embodiment, after the risk assessment entity generates a risk credential containing a one-time random number, the authorizing institution, when performing anti-replay detection, maintains a dynamically updated set of one-time random numbers for deduplication. It compares and records the random number in each received risk credential in real time. If the random number already exists in the set, it is determined to be a replay attack and authorization is immediately rejected. If it does not exist, it is added to the set and the key generation process continues. This ensures that any risk credential can only be successfully used once, effectively preventing unauthorized authorization due to credential interception, caching, or malicious replay. Combined with time window identification and freshness verification, a strong timeliness and single-use validity authorization mechanism based on one-time random numbers is constructed, significantly improving the system's defense against credential abuse in dynamic risk environments and achieving the security goals of non-repeatable, tamper-proof, and immediate invalidation of risk authorization.

[0051] This invention proposes a "Risk-Adaptive Access Control Method and System for Trusted Data Spaces," targeting dynamic authorization and risk control in scenarios such as cloud storage and data sharing. The method is based on Attribute Encryption Based on Ciphertext Policy (CP-ABE), decoupling the risk assessment process from the key distribution process. A signed risk credential serves as the trusted interface between the two, enabling access authorization to dynamically change with real-time risk levels. It also possesses auditability, timeliness, and replay resistance. Its overall architecture is as follows: Figure 1 As shown.

[0052] In this instruction manual: (1) Authorization Authority / Key Issuance Entity (Authority / RA) refers to an entity that holds the system master key or has the ability to generate attribute key components; (2) Risk assessment entity (Risk Service) refers to the entity responsible for calculating risk scores and risk levels and outputting risk credentials. This entity does not hold the system master key; (3) Data Owner refers to the entity that defines the access policy and encrypts the data; (4) User refers to the entity that holds the attribute key and attempts to decrypt the ciphertext; (5) Risk credentials refer to a data structure that includes at least user identifier, time information, random number, risk score / level and its signature; (6) epoch refers to the time window identifier, which is used to bind risk attributes and encrypted policies in a timely manner; (7) nonce refers to a one-time random number, which is used to realize the one-time use of risk certificates and resistance to replay.

[0053] The system should include at least: Authority / RA, Risk Service, data owner / user-side encryption / decryption modules, and neutral storage media (such as files, caches, or message queues) for exchanging risk credentials across processes.

[0054] I. CP-ABE Initialization and Key Isolation During the system startup phase, first in the bilinear group system G1, G2, G... T and the bilinear mapping e: G1×G2→G T The CP-ABE encryption environment is then established. The authorizing authority executes the initialization algorithm Setup(), generating the system public key pk and the system master key mk. In one implementation, the system public key pk can be represented as:

[0055] The system master key mk is:

[0056] and , ,in These are randomly selected system parameters.

[0057] To achieve structural isolation between risk assessment and key generation, the system stipulates that the system master key mk is held only by Authority / RA, and Risk Service does not hold mk. The output of Risk Service is only the risk credential and its signature, thereby preventing the key system from being leaked directly when the risk assessment service is compromised.

[0058] II. Public Key Fingerprint Consistency Due to the CP-ABE user attribute key component To prevent decryption errors or misauthorizations caused by inconsistencies between historical cache components and the new public key after system reinitialization, a public key fingerprint consistency mechanism is introduced. Specifically, the fingerprint is obtained by serializing the key elements of the public key, concatenating them, and then hashing them.

[0059] and local historical fingerprints In comparison, when When the system clears the state files bound to the old public key (user_store.json cached by the user attribute component, and the optional risk credential cache risk_state.json and nonce deduplication cache nonce_store.json), it updates the fingerprint file; when The system allows for cache reuse. Through the above mechanism, the system ensures the consistency of the "attribute key component and system public key," avoiding state pollution issues where the policy is satisfied but the decryption results are inconsistent.

[0060] III. Establishment of Audit Signature Key To ensure that risk credentials are verifiable across processes and runtime environments, the system establishes an audit signature key. In one implementation, the system loads from local secure storage. If it does not exist, it will be randomly generated: And persist it. Risk Service uses For signing risk credentials, the RiskService uses the same key to verify the risk credentials. In another implementation, an asymmetric signature system can also be used, where the RiskService holds the private key for signing and the RA holds the public key for verification, in order to further reduce the risk of shared key proliferation.

[0061] After clearly defining each entity and parameter, the core implementation process of the risk-adaptive access control of this invention is as follows, and the overall core process logic is as follows: Figure 2 As shown.

[0062] IV. Risk Scoring and Rating Generation Risk Service receives user identifiers With risk context vector To achieve detailed, specific, and accurate scoring of risky behaviors, this invention preferably employs an interpretable scoring model, mapping different risk factors to additive contribution items and outputting a breakdown to support auditing.

[0063] Factor Definition: Taking a practically implementable example, the original factor is defined as: IP Reputation. ∈[0,100], Device reliability ∈[0,100], MFA multi-factor authentication pass flag mfa∈{0,1}, anomaly score ∈[0,100], geographical offset distance ≥0 (km), number of failures in the nearest window .

[0064]

[0065] Outlier analysis can employ piecewise or S-shaped nonlinear penalties to enhance sensitivity to high anomalies.

[0066] In one implementation, the trust score consists of the following items (each of which can be written into the breakdown):

[0067]

[0068]

[0069]

[0070]

[0071]

[0072] The overall trust score is defined as follows:

[0073] Risk Service Output Simultaneous output:

[0074] The breakdown and scoring results will be included together in the risk certificate described later and protected by signature, thereby ensuring that the scoring process is interpretable and tamper-proof.

[0075] Map trust scores to discrete risk levels A threshold mapping consistent with the current implementation is:

[0076] The threshold can be configured according to the business risk appetite, but it must remain monotonic: the higher the score, the lower the level.

[0077] To embed risk levels into the CP-ABE strategy, this invention maps risk level ℓ to a set of monotonic risk attributes:

[0078] It satisfies: if , ,but Therefore, only the threshold attribute needs to be set in the access policy. Expressible Access thresholds. To achieve timeliness control, time period identifiers are introduced. (By minute, by 5-minute, or by hour window). Combine risk attributes with... Binding:

[0079] This manual uses RISKGE4T202601250630 as an example to demonstrate how time-period binding prevents the risk attributes of old epochs from meeting the ciphertext policy of new epochs, thereby reducing long-term availability in case of key leakage.

[0080] V. Risk Certificate Risk Service obtains Then, a one-time random number (nonce) is generated to construct the risk certificate payload. It must contain at least: User ID Issuance timestamp Time period identifier One-time random number Risk Score Risk level Risk Attribute Set (or by) (Derivation) Optional: Context summary and Then, the risk certificate is signed:

[0081] And Writes to neutral storage media (JSON files), and atomic writes can be used to ensure consistency. The Risk Service ends here; no CP-ABE key component is generated, and it does not participate in decryption.

[0082] VI. Monotonic coding of risk attributes and time period binding RA reads from storage medium The following security checks will be performed in sequence (failure at any step will result in rejection of the risk attribute component): (1) Signature verification: Verification and Consistency is ensured to prevent tampering or falsification of risk levels and attribute sets.

[0083] (2) Freshness check: Determine whether the voucher is within the allowed window, and preferably meets the requirements. or .

[0084] (3) Anti-replay detection: Maintain a nonce deduplication set (or persistent storage) .when And if it hasn't expired, reject the replay and throw a replay error; when Write and continue. This mechanism ensures that risky credentials "trigger authorization only once".

[0085] VII. Authorization of Risk Attribute Components After the above verification passes, RA is based on and structure and for each attribute Generate or load CP-ABE attribute key component Forming risk key fragments It can also be written to the user property component cache for reuse.

[0086] At the same time, RA distributes static attribute sets to users. and its static key fragment Subsequently merged and Obtain the complete user key Its attribute set satisfies:

[0087] This enables unified authorization based on both static identity conditions and dynamic risk conditions.

[0088] VIII. Encryption Strategy and Decryption Determination Data owners based on risk thresholds Compared to the current time period Construct access strategy: And execute: Generate ciphertext.

[0089] User execution: .

[0090] If and only if ,Right now and Successful decryption Otherwise, decryption fails and access is denied. This achieves risk-adaptive access control, while simultaneously providing auditability, timeliness control, and replay resistance through signature, freshness, and nonce deduplication.

[0091] In this embodiment, the operation of the risk-adaptive access control method proposed in this invention in a trusted data space environment is illustrated. It is assumed that the current system time window is identified as: epoch = T202601250630. User user_001 holds the static attribute: {ONE}; the data owner sets the access policy during the encryption phase: Policy = (ONE ∧RISKGE4T202601250630), which requires the user to simultaneously possess: the static attribute ONE and a dynamic risk attribute of at least level 4.

[0092] (1) Low trust level does not meet the policy scenario The Risk Service receives the risk context information from user_001 and performs a risk assessment, resulting in: = 7. Risk level ℓ = 1, epoch = T202601250630. The Risk Service constructs a risk certificate, which includes at least: {uid, ts, epoch, nonce, , ℓ}, and generate risk attributes: = { || epoch}. The risk certificate is then signed and written to the storage medium.

[0093] The RA reads the risk credential from the storage medium and performs the following checks sequentially: signature verification, freshness verification, and nonce replay detection. Once all verifications pass, the RA issues the user a risk attribute key component: {RISKGE1T202601250630}, and merges it with the static attribute ONE to form the user's complete attribute set. = {ONE , RISKGE1T202601250630}.

[0094] Because: RISKGE4T202601250630 ∉ Therefore, the access policy Policy = (ONE ∧RISKGE4T202601250630) is not satisfied, the user's decryption fails, and the access request is rejected. If the attacker uses the same risky credential to trigger an authorization request again within the validity period, RA will detect that: the nonce already exists, and the system will throw a replay error: Replay detected, thus blocking the replay attack.

[0095] (2) High trust level satisfies the strategy scenario In another risk context, the Risk Service performs a risk assessment on the same user, user_001, and obtains the following results: = 73, Risk level ℓ = 4, epoch = T202601250630. Risk Service generates a set of risk attributes: = {RISKGE1||epoch , RISKGE2||epoch , RISKGE3||epoch ,RISKGE4||epoch}. After completing signature verification, freshness verification, and nonce replay detection, the RA issues the corresponding risk attribute key component to the user. The complete set of user attributes is: = {ONE, RISKGE1T202601250630, RISKGE2T202601250630, RISKGE3T202601250630, RISKGE4T202601250630}.

[0096] because: The policy allows users to successfully decrypt the ciphertext and gain access. Similarly, when the same risky credential is used again, the system detects the duplicate use through the nonce deduplication mechanism, thus rejecting the authorization request.

[0097] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A risk-adaptive access control method for trusted data spaces, characterized in that, Includes the following steps: Step 1. Establish an encryption environment based on ciphertext policy attribute encryption CP-ABE. The authorized institution generates the system public key and the system master key, and the system master key is held only by the authorized institution. Step 2. Set up an independent risk assessment entity. This entity does not hold the system master key and is only used to calculate risk scores and risk levels. Step 3. The risk assessment entity calculates a trust score based on the user identifier and risk context information, maps it to a risk level, and transforms the risk level into a set of monotonically increasing risk attributes; Step 4. Bind the set of risk attributes to the current time window identifier to generate time-sensitive risk attributes; Step 5. The risk assessment entity generates a risk credential containing a user identifier, issuance timestamp, time window identifier, one-time random number, risk score, risk level, and a set of risk attributes after binding, and signs the credential using the audit key; Step 6. The authorized institution reads the risk certificate and verifies the signature integrity, time window freshness, and uniqueness of the one-time random number in sequence. When all verifications pass, the authorized institution generates the corresponding CP-ABE attribute key component based on the bound risk attribute set and merges it with the user's static attribute key component to form a complete user key. Step 7. The data owner constructs an access policy containing risk attributes based on the preset risk threshold and the current time window, and uses the system public key to encrypt the data to generate ciphertext; Step 8. The user attempts to decrypt the ciphertext using the complete user key. Decryption will only succeed if the user's set of attributes completely satisfies the access policy. Otherwise, decryption fails and access is denied.

2. The method according to claim 1, characterized in that: The risk level adopts a monotonic mapping mechanism. The higher the risk level, the more the corresponding risk attribute set is a superset of the low-level risk attribute set, thus supporting the "≥k level risk" type access strategy.

3. The method according to claim 1, characterized in that: The risk attributes are bound to time window identifiers, making risk attributes in different time windows incompatible with each other, thereby achieving time-period isolation and automatic expiration of risk authorizations.

4. The method according to claim 1, characterized in that: The risk scoring adopts an interpretable additive model, which maps multiple risk factors into independent contribution items and outputs a scoring decomposition result. This decomposition result serves as a component of the risk certificate and participates in signature protection to support audit traceability.

5. The method according to claim 1, characterized in that: The risk factors include at least one or more of the following: IP reputation value, device trustworthiness, multi-factor authentication pass mark, abnormal behavior score, geographical location offset distance, and number of login failures within a preset time window.

6. The method according to claim 1, characterized in that: When verifying risk credentials, the authorized institution maintains a deduplicated set of one-time random numbers to achieve anti-replay control of risk credentials, and the used random numbers are prohibited from being reused within the validity period.

7. The method according to claim 1, characterized in that: When the system is initialized or the public key is changed, the authorized agency generates a public key fingerprint based on the hash of the key elements of the public key. If the new fingerprint is inconsistent with the historical fingerprint, all cached state files bound to the old public key are cleared to ensure the consistency between the attribute key and the system public key.

8. The method according to claim 1, characterized in that: The risk credentials are signed using a symmetric key mechanism or an asymmetric key mechanism. The signing key is shared between the authorized institution and the risk assessment entity or distributed independently through a public key system to ensure the credibility and immutability of the risk credentials.

9. A risk-adaptive access control system for trusted data spaces, characterized in that, include: The authorization module is used to generate the system public key and master key, and to generate risk attribute key components based on verified risk credentials; The risk assessment module is used to calculate risk scores, map risk levels, and generate signed risk credentials, but does not hold the system master key. The data encryption module is used to encrypt data according to an access policy that includes risk attributes and time windows; The user decryption module is used for decryption based on the merged key of static attributes and risk attributes; Neutral storage media is used to securely transfer risk credentials between the risk assessment module and the authorization module; The risk assessment module is logically isolated from the authorization module, and the authorization module includes a signature verification unit, a freshness verification unit, and a one-time random number replay detection unit.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements all the steps of the risk-adaptive access control method as described in any one of claims 1 to 8.