Cryptographic resource distribution and controlled use system in soft computing environment
By establishing a two-way identity authentication and encryption transmission channel in a soft computing environment, combined with hardware cryptographic resources and operating system control, the problems of key management and data protection in the soft computing environment are solved, and secure distributed cryptographic computing is achieved.
Patent Information
- Application Number
- CN202510928723.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-09-30
AI Technical Summary
In soft computing environments, the lack of hardware random number generation devices and trusted execution environments leads to difficulties in key management, insufficient protection of sensitive data, and the risk of data leakage and attack.
By establishing a two-way identity authentication and encryption transmission channel between the cryptographic application end and the cryptographic resource end, using hardware cryptographic resources to provide secure storage and computing services, and implementing process-level access control at the operating system level, it ensures that only authorized processes access cryptographic resources.
Construct a secure software cryptographic computing space in a soft computing environment to protect data confidentiality, integrity and authenticity, prevent unauthorized access, and achieve security and credibility of distributed cryptographic computing.
Smart Images

Figure CN120729593A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular to a cryptographic resource distribution and controlled use system in a soft computing environment. Background Art
[0002] With the widespread adoption of soft computing environments such as cloud computing, edge computing, and virtualization platforms, an increasing number of application systems are running in physically uncontrollable or low-trust soft computing environments. These environments lack cryptographic devices (such as encryption cards and smart cryptographic keys) for generating hardware random numbers, and they also lack trusted execution environments to protect and store high-value cryptographic materials. Consequently, cryptographic capabilities in soft computing environments are often difficult to deploy locally or effectively control due to factors such as deployment structure, insufficient resource isolation, and lack of local hardware support. This leads to difficulties in key management, insufficient protection of sensitive data, and significant risks of data leakage and attacks. Summary of the Invention
[0003] In response to the above-mentioned problems and technical requirements, this application proposes a cryptographic resource distribution and controlled use system in a soft computing environment. The technical solution of this application is as follows:
[0004] A cryptographic resource distribution and controlled use system in a soft computing environment includes a cryptographic application end and a cryptographic resource end. The cryptographic application end provides a soft computing environment and is deployed with an application system. The cryptographic application end also includes an application end kernel, an application end memory, and an application end transmission module. The cryptographic resource end includes a resource end kernel, hardware cryptographic resources, and a resource end transmission module. The hardware cryptographic resources include a secure storage space, a cryptographic calculation module, and a hardware random number generator.
[0005] After receiving the network access request for the cryptographic resource end initiated by the application system process, the application end kernel of the cryptographic application end performs a two-way identity authentication with the cryptographic resource end according to the network access request, and after completing the two-way identity authentication, uses the application end transmission module and the resource end transmission module of the cryptographic resource end to establish a secure transmission channel based on the encryption transmission mechanism;
[0006] The application system process of the cryptographic application end remotely uses the hardware cryptographic resources in the cryptographic resource end via a secure transmission channel to perform encrypted and secure access to the application system data.
[0007] A further technical solution is that the application-side kernel monitors the operation behavior of the user mode process including:
[0008] After receiving a network access request initiated by an application system process to a cryptographic resource end, the application-side kernel of the cryptographic application end performs permission verification on the application system process that initiated the network access request; when it is determined that the application system process that initiated the network access request has network connection permission to the cryptographic resource end, it responds to the network access request and performs two-way identity authentication with the cryptographic resource end.
[0009] A further technical solution is that the cryptographic application end verifies the integrity of the startup component during the startup phase and starts running after the startup component passes the integrity verification;
[0010] During the operation of the cryptographic application, the application kernel continuously monitors the operation behavior of the user mode process and triggers a response action when an abnormality is detected in the operation behavior of the user mode process; among them, the user mode process includes the application system process and the operating system running process.
[0011] A further technical solution is that the application-side kernel monitors the operation behavior of the user mode process including:
[0012] When the application-side kernel of the cryptographic application receives a process creation request for a user-mode process, it performs an integrity check on the user-mode process to be created and its dependent libraries. If the integrity check passes, it responds to the process creation request to create and start the user-mode process. Otherwise, it does not respond to the process creation request.
[0013] The application-side kernel of the cryptographic application also continuously performs integrity checks on the user-mode process while it is running, and triggers a response action when it detects that the integrity check fails.
[0014] A further technical solution is that the application-side kernel monitors the operation behavior of the user mode process, including monitoring the data access behavior of the application system process, including:
[0015] When the application-side kernel of the cryptographic application detects a data access request to application system data initiated by an application system process, it performs integrity verification and access permission verification on the application system process that initiated the data access request and its dependent libraries, and performs integrity verification on the application system data requested for access by the data access request;
[0016] When the application system process and its dependent libraries pass integrity verification and access permission verification, and the application system data requested by the data access request passes integrity verification, the data access request is responded to so that the application system process can perform encrypted and secure access to the application system data.
[0017] A further technical solution is that each application system process has data access rights to its own application system data, and the application system data of each application system process includes application system memory data in the application end kernel and application system disk data in the application end storage.
[0018] Its further technical solution is that the configuration files and system files on the operating system boot chain of the cryptographic application end are in read-only state, and the cryptographic application end is prohibited from installing new kernel modules and prohibiting bypass loading of security / process / data guard file system kernel modules.
[0019] A further technical solution is that the application system process of the cryptographic application end remotely uses the hardware cryptographic resources in the cryptographic resource end via a secure transmission channel to encrypt and securely access the application system data, including:
[0020] The application system process reads key sensitive data from the secure storage space of the password resource end through a secure transmission channel, and performs encrypted and secure access to the application system data based on the key sensitive data;
[0021] Alternatively, the application system process reads the storage key from the secure storage space of the cryptographic resource end via a secure transmission channel, and uses the storage key to decrypt the encrypted key sensitive data stored locally on the cryptographic application end to obtain the key sensitive data, and performs encrypted and secure access to the application system data based on the key sensitive data.
[0022] Its further technical solution is that the application-side kernel will suspend multiple application system processes that request the same key sensitive data or storage keys and manage them through a queue, and after reading the key sensitive data or storage keys from the secure storage space of the cryptographic resource end through a secure transmission channel, it will restore the suspended application system processes in the order of the queue.
[0023] Its further technical solution is that when the cryptographic application end obtains key sensitive data from the cryptographic resource end, a waiting logic for network access events is introduced in the kernel sub-thread of the application end kernel for the application system data, and the application system process accesses the corresponding application system data through a general file data access interface.
[0024] Its further technical solution is that the cryptographic resource distribution and controlled use system includes multiple cryptographic application terminals, and any first cryptographic application terminal and second cryptographic application terminal use the cryptographic resource terminal to perform two-way identity authentication, and after completing the two-way identity authentication, a secure communication channel is established between the first cryptographic application terminal and the second cryptographic application terminal for communication.
[0025] A further technical solution is that the secure storage space of the cryptographic resource end stores the cryptographic application end authentication passwords of the cryptographic application end, and the first cryptographic application end and the second cryptographic application end use the cryptographic resource end to perform two-way identity authentication, including:
[0026] The first cryptographic application end uses the cryptographic application end authentication password of the second cryptographic application end stored in the secure storage space of the cryptographic resource end to authenticate the second cryptographic application end using an entity authentication mechanism based on a symmetric encryption algorithm;
[0027] The second cryptographic application end uses the cryptographic application end authentication password of the first cryptographic application end stored in the secure storage space of the cryptographic resource end, and applies an entity authentication mechanism based on a symmetric encryption algorithm to authenticate the identity of the first cryptographic application end.
[0028] A further technical solution is that the cryptographic resource generates an identity certificate and a corresponding identity private key for each cryptographic application. The secure storage space of the cryptographic resource stores the identity private keys of each cryptographic application, and each cryptographic application holds its own identity certificate. The first cryptographic application and the second cryptographic application use the cryptographic resource to perform two-way identity authentication, including:
[0029] The first cryptographic application sends the identity certificate to the second cryptographic application, and the second cryptographic application sends the identity certificate to the first cryptographic application;
[0030] The first cryptographic application end uses the identity certificate of the second cryptographic application end and adopts a one-time delivery authentication mechanism of digital signature technology in the cryptographic resource end to authenticate the second cryptographic application end; the second cryptographic application end uses the identity certificate of the first cryptographic application end and adopts a one-time delivery authentication mechanism of digital signature technology in the cryptographic resource end to authenticate the first cryptographic application end.
[0031] A further technical solution is that the password application end and the password resource end perform two-way identity authentication including:
[0032] When the cryptographic application end accesses the cryptographic resource end, the cryptographic application end uses a one-time authentication mechanism based on digital signature technology to authenticate the cryptographic resource end, and the cryptographic resource end uses a two-time authentication mechanism based on symmetric encryption algorithm to authenticate the cryptographic application end.
[0033] A further technical solution is that data transmitted between the cryptographic application end and the cryptographic resource end via the secure transmission channel are all encrypted using a session key, and a method for determining the session key includes:
[0034] The random key generated by the cryptographic resource end when the cryptographic application end registers with the cryptographic resource end and shared with the cryptographic application end through the side channel is used as the session key;
[0035] Alternatively, the encrypted random number in the message first sent by the cryptographic resource end to the cryptographic application end when the cryptographic resource end performs identity authentication on the cryptographic application end is used as the session key;
[0036] Alternatively, the encrypted random number in the message first sent by the cryptographic resource end to the cryptographic application end when the cryptographic resource end authenticates the cryptographic application end is used as the key material, and a key derivation algorithm is used to derive a message encryption and decryption key based on the key material as the session key;
[0037] Alternatively, the cryptographic resource end and the cryptographic application end negotiate to obtain the session key through the ECDHE key exchange protocol.
[0038] A further technical solution is that the session key is dynamically updated according to a predetermined update strategy.
[0039] The beneficial technical effects of this application are:
[0040] The present application discloses a cryptographic resource distribution and controlled use system in a soft computing environment. The system uses a cryptographic application end and a cryptographic resource end to establish a high-strength secure transmission channel based on authentication, ensuring that remote cryptographic resources are not eavesdropped, tampered with, or replayed when crossing an untrusted network. Through this secure communication channel, the cryptographic application end in the soft computing environment can securely introduce hardware cryptographic resources such as random number generation, secure storage, trusted computing, and key management from the cryptographic resource end. This allows the cryptographic application end in the soft computing environment to ensure that its cryptographic calculations have hardware-level cryptographic security even when there are no direct hardware random number resources and no direct hardware secure storage space available for local storage of key sensitive data. A secure software cryptographic calculation space is thus constructed in the local software computing environment of the cryptographic application end. The application system where the cryptographic application end is located performs cryptographic operations through the local software cryptographic calculation space to protect the confidentiality, integrity, and authenticity of the application system data, thereby constructing a secure and efficient distributed cryptographic computing environment for the application system. While protecting data privacy, complex distributed cryptographic computing tasks are implemented, providing a distributed secure software cryptographic computing environment for the application system.
[0041] This application further designs mandatory access control based on the process level for the cryptographic application side, intercepts all data access requests in real time and verifies the process identity at the file system level, allowing only authorized processes to access specific keys or encrypted data, and strengthens the process trust boundary through multi-dimensional verification methods such as process signatures, call stacks, and module hashes, building a multi-layer trusted security chain from system, process, memory to data to prevent sensitive cryptographic resources from being called by unauthorized processes. Furthermore, the present invention also proposes to implement a kernel-based network access control mechanism on the cryptographic application side. By combining process identification with network policies, only authorized application processes are allowed to access specified network resources (such as the cryptographic resource end address and port), preventing other local processes from bypassing security controls through network paths, thereby minimizing the attack surface and blocking abnormal traffic.
[0042] This application also designs a series of system security enhancement mechanisms for the cryptographic end, including monitoring the integrity of system programs, the integrity of the system boot chain, prohibiting modifications to key system files, monitoring illegal memory access and kernel module loading behaviors, and / or automatically triggering recovery mechanisms when illegal root behaviors are detected on the cryptographic application end, such as entering read-only security mode, clearing sensitive data, restricting privileged functions, and strictly isolating root-level permission operations from the application space, prohibiting application-layer programs from executing privilege-elevation instructions or accessing kernel interfaces, etc., thereby building a controlled and trusted operating environment. The cryptographic application end encrypts and protects application system data in the software's cryptographic computing space to ensure the confidentiality, integrity, and authenticity of application system data during storage, transmission, and use.
[0043] In order to improve the adaptability and availability of the system in actual environments, the present invention also introduces an enhancement mechanism for the file access interface in the operating system kernel, which supports non-blocking scheduling, queue recovery and process consistency maintenance of application layer processes in the case of network intermittent or remote resource waiting, ensuring that the impact of the security mechanism on system performance and operation logic is minimized.
[0044] In addition, the system also supports the establishment of secure communication channels between multiple cryptographic application terminals after obtaining authorization from the cryptographic resource terminal through a two-way authentication mechanism based on remote hardware cryptographic capabilities, thereby realizing data collaboration and cryptographic interaction between trusted computing environments, and providing basic capabilities for building a horizontally scalable distributed cryptographic computing platform.
[0045] In summary, this application realizes the secure distribution, controlled use and trusted integration of remote hardware cryptographic resources in the application system through a secure connection mechanism between the cryptographic application end and the remote cryptographic resource end, combined with cryptography-based system security enhancement means and operating system kernel-based process-level access control technology, which is used to improve the security protection capabilities of key data and processes in distributed computing environments. The above mechanism provides In addition, the present invention also supports the establishment of a secure communication channel between multiple cryptographic application ends through a two-way authentication mechanism based on remote hardware cryptographic capabilities after obtaining authorization from the cryptographic resource end, thereby realizing data collaboration and cryptographic interaction between trusted computing environments, and providing basic capabilities for building a horizontally scalable distributed cryptographic computing platform. Using this framework, a high-security resource channel from a remote controlled hardware cryptographic platform to the application system process can be constructed in various soft computing environments, realizing the secure distribution and controlled use of remote hardware cryptographic resources, supporting the construction of distributed, flexible and secure cryptographic service capabilities, and thus improving the data security level of the entire software computing environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is a system framework diagram of a cryptographic resource distribution and controlled use system according to an embodiment of the present application.
[0047] Figure 2 This is a schematic diagram of using an application stack file system in the application-side kernel of a cryptographic application side to protect the security of the operating environment in one embodiment of the present application.
[0048] Figure 3 This is a system framework diagram of a cryptographic resource distribution and controlled use system according to another embodiment of the present application. DETAILED DESCRIPTION
[0049] The specific implementation of this application will be further described below with reference to the accompanying drawings.
[0050] In order to improve data security in a soft computing environment, this application discloses a cryptographic resource distribution and controlled use system in a soft computing environment. Figure 1 The architecture diagram of the cryptographic resource distribution and controlled use system shown in FIG. 1 includes a cryptographic resource end 100 and a cryptographic application end 200 .
[0051] The cryptographic resource 100 includes a resource core 110, hardware cryptographic resources 120, and a resource transmission module 130. It also includes a resource memory 140. Hardware cryptographic resources 120 are typically provided by specialized cryptographic hardware, which typically possesses a dedicated cryptographic qualification certificate to ensure compliance with various cryptographic standards. Hardware cryptographic resources 120 can be smart cryptographic keys, cryptographic cards, or other hardware cryptographic products that meet the relevant inspection specifications of the National Cryptography Administration and have received cryptographic compliance certification.
[0052] The hardware cryptographic resource 120 includes a secure storage space 121 , a cryptographic calculation module 122 and a hardware random number generator 123 .
[0053] (1) Secure storage space 121 is provided by specialized hardware. In cryptographic computing, hardware-level secure storage space is crucial because it provides a way to protect sensitive data from unauthorized access. This secure storage space 121 is typically used to protect encryption keys and other sensitive information, ensuring that this data remains secure even if the system is hacked. Therefore, to ensure the security and efficiency of cryptographic systems, developers need to consider hardware-level secure storage space 121 to protect key cryptographic elements such as keys and private data. Such measures help prevent password cracking and data leakage, thereby providing users and enterprises with a high level of data security.
[0054] (2) The cryptographic calculation module 122 is used to implement various standard cryptographic calculations, including SM2 encryption and decryption, SM2 signature verification, SM3 hashing, SM3-based HMAC calculation, SM4 encryption and decryption, and international standard cryptographic operations such as AES and RSA.
[0055] (3) The hardware random number generator 123 has the function of generating hardware-level random numbers and provides random number resources for the entire distributed cryptographic computing environment. In cryptographic computing, the randomness of random numbers is very important. Random numbers bring a key attribute to cryptographic systems: unpredictability. In the context of cryptography, randomness is equivalent to entropy, which represents the degree of uncertainty or disorder in the system. The more unpredictable the numbers in the sequence, the higher the entropy, and therefore, the stronger the cryptographic security. In cryptography, the hardware random number generator 123 generates random numbers to enhance security. Even if the cryptographic algorithm is public, its strength depends on the key, but cryptanalysis of the encryption password can significantly reveal the key of the password. Therefore, in order to ensure high data security on the network, the randomness of random numbers is crucial. This application improves the cryptographic security of the entire cryptographic resource distribution and controlled use system, including the cryptographic application end, by ensuring that all random numbers come from the hardware random number generator 123.
[0056] The cryptographic application 200 provides a software computing environment. This software computing environment can be any operating system, such as general-purpose Windows, Linux, and various embedded operating systems. This software computing environment can be implemented on various platforms, such as a physical computer or a virtual machine on a virtual machine management platform. The cryptographic application 200 is deployed with an application system 210, and the cryptographic application 200 also includes an application kernel 220, an application memory 230, and an application transmission module 240. The operating system (OS) of the cryptographic application 200 is software (including multiple programs and libraries) that controls the use of the computer's available hardware and software resources. The application kernel 220 is the core component of the operating system and is used to manage all programs in the cryptographic application 200. During runtime, kernel processes instantiated from the kernel also manage processes instantiated from programs outside the kernel (e.g., programs launched by users) and provide a unified interface (called system calls) for these non-kernel processes to access hardware devices.
[0057] The core of this application is to provide the hardware cryptographic resources 120 in the cryptographic resource end 100 to the cryptographic application end 200 for use, thereby realizing the secure distribution and use of remote hardware cryptographic resources. Since the hardware cryptographic resources 120 in the cryptographic resource end 100 can generate high-entropy random numbers based on physical processes, protect the hardware storage module of sensitive data, and have complete key lifecycle management capabilities (including key generation, storage, distribution and destruction), the cryptographic application end 200 can enhance the security capabilities of the local operating system by using the hardware cryptographic resources 120 in the remote cryptographic resource end 100, and establish a trusted software operating environment for the cryptographic application end 200 in the soft computing environment, including the following processes:
[0058] In step S110 , after receiving a network access request from the application system process to the cryptographic resource end 100 , the application end kernel 220 of the cryptographic application end 200 performs a two-way identity authentication with the cryptographic resource end 100 according to the network access request.
[0059] In one embodiment, since the cryptographic resource end 100 includes the hardware cryptographic resource 120 and can directly perform trusted cryptographic operations, the cryptographic application end 200 and the cryptographic resource end 100 perform two-way identity authentication, including: when the cryptographic application end 200 accesses the cryptographic resource end 100, the cryptographic application end 200 uses a one-time transfer authentication mechanism of a digital signature technology to authenticate the cryptographic resource end 100, and the cryptographic resource end 100 uses a two-time transfer authentication mechanism of a symmetric encryption algorithm to authenticate the cryptographic application end 200.
[0060] The specific process of two-way identity authentication between the password application terminal 200 and the password resource terminal 100 is described as follows:
[0061] 1. When the cryptographic application terminal 200 accesses the cryptographic resource terminal 100, a one-time authentication mechanism based on digital signature technology is used to authenticate the cryptographic resource terminal 100, including the following steps:
[0062] 1. The cryptographic resource end 100 uses the IP address IPeng of the cryptographic application end 200 as the cryptographic application end identity identifier, and the timestamp Ta is a time-varying parameter. The cryptographic resource end uses the cryptographic resource end private key PRIcsp in the associated hardware cryptographic device to sign Ta and IPeng, generating a token Tokencsp = Ta||IPeng||PRIcsp(Ta||IPeng), and sends the token to the cryptographic application end 200 (|| is a connector).
[0063] 2. After receiving the token Tokencsp, the cryptographic application terminal 200 performs the following steps:
[0064] (1) Use the public key PUBcsp of the cryptographic resource end 100 in the preset identity certificate of the cryptographic resource end 100 to verify the digital signature of the token. If it passes, continue; otherwise, return failure.
[0065] (2) Calculate: time difference = local time Tb - Ta, and check whether the time difference is within 60 seconds. If so, continue; otherwise, return failure.
[0066] (3) Check whether IPeng in the Tokencsp signature data is the IP of the cryptographic application end. If it is, the authentication is successful; otherwise, it returns failure.
[0067] In one embodiment of the present application, the IPeng used as the local identifier of the cryptographic application 200 can also be a globally unique identifier, such as a GUID generated by combining a hardware random number generator 123 with a timestamp, IP address, and other local information, or an identifier generated using a GUID generator within the software computing environment. This identifier can then be used as the identity of the cryptographic application 200.
[0068] 2. When the cryptographic resource terminal 100 allows a cryptographic application terminal 200 to access, it uses the entity authentication mechanism (GB / T 15843.2) of the symmetric encryption algorithm to authenticate the cryptographic application terminal 200. This authentication includes the following steps:
[0069] 1. The cryptographic resource terminal 100 generates a token and sends it to the cryptographic application terminal, including
[0070] (1) The cryptographic resource terminal 100 generates random numbers saltM1, saltE1, and Rcsp2 through the hardware random number generator 123, and generates a message M=IPcsp||saltM1||saltE1||Rcsp2, where the IP address IPcsp of the cryptographic resource terminal 100 is the identity identifier of the cryptographic resource terminal 100.
[0071] (2) Using the cryptographic application authentication password pwd stored in the secure storage space 121 of the hardware cryptographic resource 120 of the cryptographic resource end 100, the message authentication code key KM1 is derived from the hardware cryptographic resource of the cryptographic resource end 100 according to the password-based key derivation specification (GM / T 0091), KM1 = KDF(pwd, saltM1, c), where the number of iterations c = 100000 and the key byte length dkLen = 16.
[0072] (3) Generate a message verification code Mac = HMAC-SM3 (KM1, M).
[0073] (4) Based on pwd, derive the encryption key KE1 in the hardware cryptographic resource 120, KE1 = KDF(pwd, saltE1, c), where c = 100000, dkLen = 32.
[0074] (5) Generate encryption field E1 = SM4-CBC-PAD (KE1, Mac||M).
[0075] (6) Generate a token Tokencsp=IPcsp||saltM1||saltE1||E1 and send it to the cryptographic application terminal 200.
[0076] 2. After receiving Tokencsp, the cryptographic application terminal 100 obtains the random number and generates a token to send back, including:
[0077] (1) The cryptographic application 200 parses saltM1||saltE1 in Tokencsp.
[0078] (2) The password application end 200 obtains the password application end authentication password pwd2 from the password administrator via the terminal device.
[0079] (3) Based on pwd2, derive the key KE2 = KDF(pwd2, saltE1, c), where c = 100000 and dkLen = 32.
[0080] (4) Execute SM4_CBC_DEC(KE2,E1) to decrypt E1 into plaintext and obtain Mac2||M2.
[0081] (5) Based on pwd2, derive the message authentication code key KM2, KM2 = KDF(pwd2, saltM1, c), where c = 100000, dkLen = 16.
[0082] (6) Calculate HMAC-SM3(KM2, M2) and compare the result with Mac2. If they are consistent, continue; otherwise, fail and reject the connection.
[0083] (7) Compare saltM / saltE obtained from M2 with saltM1||saltE1 obtained from the token. If they are consistent, continue; otherwise, fail and reject the connection.
[0084] (8) Obtain Rcsp2' from M2.
[0085] (9) The cryptographic application uses Rcsp2' as a seed to generate a local random number through the pseudo-random function HMAC-SM3, and then generates random numbers saltM3 and saltE3.
[0086] (10) Generate message M3=IPeng||saltM3||saltE3||Rcsp2'.
[0087] (11) Based on pwd2, the message authentication code key KM3 is derived, KM3 = KDF(pwd, saltM3, c), where c = 100000, dkLen = 16.
[0088] (12) Generate message verification code Mac3 = HMAC-SM3 (KM3, M3).
[0089] (13) Based on pwd2, the encryption key KE3 is derived, KE3 = KDF(pwd, saltE3, c), where c = 100000, dkLen = 32.
[0090] (14) Generate encryption field E3 = SM4_CBC_ENC (KE3, Mac3 || M3).
[0091] (15) Generate the token Tokeneng=IPeng||saltM3||saltE3||E3 and send it to the cryptographic resource terminal 100.
[0092] 3. The authentication token Tokeneng on the password resource end 100 includes:
[0093] (1) After receiving Tokeneng, the cryptographic resource terminal 100 parses saltM3 and saltE3 in Tokeneng.
[0094] (2) The cryptographic resource end 100 uses the cryptographic application end authentication password pwd stored in the secure storage space 121 to derive the encryption key KE4, KE4 = KDF (pwd, saltE3, c), where c = 100000 and dkLen = 32.
[0095] (3) Execute SM4_CBC_DEC(KE4,E3) to decrypt E3 into plaintext and obtain Mac4 and M4.
[0096] (4) Based on pwd, derive the message authentication code key KM4, KM4 = KDF(pwd, saltM3, c), where c = 100000, dkLen = 16.
[0097] (5) Calculate HMAC-SM3(KM4,M4) for integrity check and compare the result with Mac4. If they are consistent, continue; otherwise, return failure and reject the connection.
[0098] (6) Compare saltM||saltE obtained from M4 with saltM3||saltE3 obtained from the token. If they are consistent, continue; otherwise, fail and return, indicating authentication failure.
[0099] (7) Compare the Rcsp2' obtained from M4 with the Rcsp2 initially generated by the cryptographic resource end. If they are the same, it means that the cryptographic resource end has successfully authenticated the cryptographic application end; otherwise, the authentication fails.
[0100] In step S120 , after the cryptographic application end 200 and the cryptographic resource end 100 complete the two-way identity authentication, a secure transmission channel based on an encryption transmission mechanism is established using the application-end transmission module 240 in the cryptographic application end 200 and the resource-end transmission module 130 in the cryptographic resource end 100 .
[0101] Establishing a secure transmission channel based on an encrypted transmission mechanism means that when the cryptographic application 200 and the cryptographic resource 100 transmit data via the secure transmission channel, all transmitted data is encrypted using a session key. Therefore, the cryptographic application 200 and the cryptographic resource 100 also need to determine the session key to complete bidirectional identity authentication. Methods for determining the session key include the following:
[0102] Method 1: The random key generated by the cryptographic resource end 100 when the cryptographic application end 200 registers with the cryptographic resource end 100 and shared with the cryptographic application end 200 through the side channel is used as the session key.
[0103] Method 2: Use the encrypted random number Rcsp2 in the message first sent by the cryptographic resource end 100 to the cryptographic application end 200 when the cryptographic resource end 100 performs identity authentication on the cryptographic application end 200 as the session key.
[0104] Method 3: Use the encrypted random number Rcsp2 in the message first sent by the cryptographic resource end 100 to the cryptographic application end 200 when the cryptographic resource end 100 authenticates the cryptographic application end 200 as the key material, and use the key derivation algorithm to derive the message encryption and decryption key as the session key based on the key material.
[0105] A general key derivation algorithm defines a process for deriving a key from key material and hardware-generated random numbers. The algorithm is as follows:
[0106] First, let the key material be Mk, which has 4096 bits. A 32-byte (256-bit) random number is read from the external random number source of the smart password key and is recorded as R.
[0107] (1) From the beginning of R, take 22 12-bit numbers, denoted as Ni. When the last 12-bit number is taken from the end of R, it automatically loops to the beginning of R.
[0108] (2) For each 12-bit number Ni, treat Ni as a starting point in Mk. Starting from this starting point, extract 256 bits from Mk, denoted as MKi. Note that when the end of Mk is obtained, it automatically loops back to the beginning. R is used as Q0, and is XORed with the obtained 256-bit number MKi. The SM3 hash is then performed, and the result is recorded as Qi+1.
[0109] (3) Repeat step 2 to obtain 22 256-bit numbers, and perform bit XOR on them to obtain a 256-bit number, which is recorded as K0.
[0110] (4) Take K0 as the initial Ki, perform XOR on Ki and R, and then calculate its SM3 hash, which is recorded as Ki+1.
[0111] (5) Repeat step 4 100 times to obtain K100. Take the first 128 bits as the current secret key. Record R as the nonce in the file / message header.
[0112] The random number used in the key derivation algorithm above can be part of the random number Rcsp2. Alternatively, the initial random number Rcsp2 can be used to derive a shared key, which is then used to encrypt a hardware random number obtained from the cryptographic resource 100 and transmitted to the cryptographic application 200 for subsequent key derivation. The general key derivation algorithm above is used to derive a key to implement a one-time pad for message or file encryption and decryption.
[0113] Method 4: The cryptographic resource end 100 and the cryptographic application end 200 negotiate a session key through the ECDHE key exchange protocol, including the following steps:
[0114] (1) The cryptographic application end 200 uses the random number encrypted and transmitted from the cryptographic resource end 100 during the identity authentication process, uses SM2 to generate a pair of public and private keys (dB, HB), and sends the public key HB to the cryptographic resource end 100.
[0115] (2) The cryptographic resource end 100 obtains a random number from the hardware random number generator 123, generates a pair of public and private keys (dA, HA) using SM2, sends the public key HA to the cryptographic application end 200, and calculates the shared key S = dA·HB.
[0116] (3) The cryptographic application end 200 calculates the shared key S=dB·HA and sends an ACK message to the cryptographic resource end 100.
[0117] (4) The cryptographic resource end 100 generates a session key using a random number, encrypts the session key using a shared key, and then sends it to the cryptographic application end 200.
[0118] (5) The cryptographic application end 200 uses the shared key to decrypt the session key and uses the session key to maintain secure communication with the cryptographic resource end 100.
[0119] In another embodiment, after the shared key S is exchanged between the cryptographic resource end 100 and the cryptographic application end 200 using ECDHE, the shared key S can be used as key material, and the key derivation algorithm can be used to derive the message encryption and decryption key as the session key to protect the message in a one-time pad manner.
[0120] Regardless of the method used to determine the session key, the determined session key can remain unchanged during the secure transmission channel establishment process. Alternatively, the session key can be dynamically updated according to a predetermined update policy to further enhance security. One implementation is for the cryptographic resource end 100 to initiate session key updates at predetermined intervals. For example, the cryptographic resource end 100 encrypts and sends a random number obtained from the hardware random number generator 123 to the cryptographic application end 200 at a configured time period, re-exchanges the key, establishes a new session key, and maintains the secure channel between the cryptographic application end 200 and the cryptographic resource end 100. Another implementation is for the session key to be updated based on the secure transmission channel encryption usage, for example, after each predetermined number of successful login user identity authentications.
[0121] In step S130 , the application system process of the cryptographic application end 200 remotely uses the hardware cryptographic resources 120 in the cryptographic resource end 100 via the established secure transmission channel to perform encrypted secure access to the application system data.
[0122] Application processes rely on key sensitive data for secure encrypted access to application data. Key sensitive data here, such as the core master key, therefore has a direct impact on the secure encrypted access of the cryptographic application. Application processes can remotely use the hardware cryptographic resources 120 within the cryptographic resource terminal 100 to securely access application data using encryption, including two implementation methods:
[0123] (1) The key sensitive data used by the application system process is remotely stored in the secure storage space 121 of the cryptographic resource end 100. The application system process reads the key sensitive data from the secure storage space 121 of the cryptographic resource end 100 via a secure transmission channel, and performs encrypted secure access to the application system data based on the read key sensitive data.
[0124] (2) The ciphertext of the key sensitive data used by the application system process is stored locally on the cryptographic application end 200, while the storage key used to encrypt the key sensitive data is remotely stored in the secure storage space 121 of the cryptographic resource end 100. When the application system process needs to use the key sensitive data to securely access the application system data, the application system process reads the storage key from the secure storage space 121 of the cryptographic resource end 100 via a secure transmission channel, and uses the read storage key to decrypt the encrypted key sensitive data stored locally on the cryptographic application end to obtain the plaintext of the key sensitive data. The application system process then securely accesses the application system data based on the decrypted key sensitive data.
[0125] Both of the above implementation methods avoid directly storing the plaintext of critical sensitive data in the insecure local storage of the cryptographic application terminal 200. The cryptographic algorithms, standards, and protocols employed in this application securely extend the core secure storage resources of a cryptographic operation system from a cryptographic resource terminal 100 with hardware cryptographic resources 120 to the cryptographic application terminal 200 in a soft computing environment via a network link for the required cryptographic calculations, thereby greatly improving the convenience of cryptographic applications in various software environments. In today's widespread use of various virtual machine platforms and cloud computing environments, in soft computing environments that lack direct cryptographic hardware support, the introduction of hardware-level secure storage resources using cryptographically secure methods improves the security of cryptographic applications in these software computing environments from the original data security based on complex computational operations such as code reverse engineering and disk data mining to data security based on information loss (the plaintext of critical core data is not in local storage). The introduction of hardware-level random number resources using cryptographically secure methods will greatly facilitate the ultimate data security achieved through cryptographic means in these software environments.
[0126] exist Figure 1In another illustrated embodiment, multiple application system processes are running in the soft computing environment where the cryptographic application terminal 200 resides. Only some of these processes are explicitly authorized to access the hardware cryptographic services provided by the cryptographic resource terminal 100. To maintain the credibility and enforceability of this access boundary during system operation, the application-side kernel 220 of the cryptographic application terminal 200, upon receiving a network access request from an application system process directed to the cryptographic resource terminal 100, performs permission verification on the application system process initiating the network access request. If it determines that the application system process initiating the network access request has network connection permission to the cryptographic resource terminal 100, it responds to the network access request and performs two-way identity authentication with the cryptographic resource terminal 100. Otherwise, it does not respond to the network access request.
[0127] The cryptographic application 200 sets up a process-based access control mechanism in the network protocol stack or network interface layer of the local operating system. This mechanism identifies the process identity information of the application system process that initiates the network access request and detects whether the process identity information has network connection permissions for the cryptographic resource 100. The process identity information includes at least one of a process identifier (PID), an execution path, a signature hash, a user, or a security context.
[0128] In one embodiment, the application-side kernel 220 includes a kernel control module 221, a kernel encryption and decryption module 222, and a network control module 223. The kernel control module 221 and the kernel encryption and decryption module 222 work together to control the application system process, and the network control module 223 is used to control the network connection behavior of the application system process. The application-side kernel 220 establishes a network access control mechanism based on process identification in the local operating system of the cryptographic application end 220 through the network control module 223, thereby achieving trusted limitation of the access path to the cryptographic resource. Specifically, the network control module 223 operates on the kernel layer network protocol stack and is tightly integrated with the process scheduling system. It dynamically captures and processes all requests to initiate external network connections. Whenever a local process attempts to establish a connection with the cryptographic resource end 100 through the application-side transmission module 240, the network control module 223 will immediately intercept the network access request and obtain the process identity information of the process that initiated the network access request from the operating system. Based on this information, the network control module 223 will compare the process identity information of the process that initiates the network access request with the preset trusted policy. The permission verification process relies on the trusted policy issued by the kernel control module 221 during the system initialization or policy synchronization phase. The trusted policy should include process identity information that clearly identifies the authorized process, including the identity characteristics of the process and the address range and port set of the cryptographic resource end that the process is allowed to access. Under the constraints of the network control module 223, the network connection request will be released only when and only when the process identity information of the process fully complies with the trusted policy and its access destination is the authorized address and port of the cryptographic resource end 100, allowing the process to obtain the key, random number and encryption and decryption services provided by the cryptographic resource end 100. The network control module 223 will directly intercept all process requests with unknown identities, inconsistent paths, abnormal behavior patterns or illegal access targets.
[0129] Therefore, the network control module 223 integrated in the application-side kernel 220 inside the cryptographic application side 200 performs dynamic constraints on all outbound network connection behaviors at the process level, forming a network communication trust boundary with the process as the smallest granularity, minimizing the attack surface, blocking abnormal traffic, and strengthening the process trust boundary, so that only the specified application system process of the cryptographic application side can access the hardware cryptographic resources 120 of the cryptographic resource side 100, so that the cryptographic capabilities output by the cryptographic resource side 100 are strictly limited to the scope of use of the specified trusted process.
[0130] Through the above method, the application-side kernel 220 not only realizes real-time perception and precise control of network access behavior through the network control module 223, but also constructs a complete access control chain from process identity, communication path to cryptographic resource use, thereby realizing effective access separation and permission constraints within the cryptographic application end 200, so that key resources in the entire distributed cryptographic computing environment can only be legally called by authenticated application system processes, ensuring the security and controllability of cryptographic resource distribution.
[0131] It is worth noting that in this embodiment, the application-side transmission module 240 serves as the unified communication outlet for the cryptographic application 200 and is responsible for establishing external connections with the cryptographic resource 100. The network control module 223 injects checking logic into the module's interface call path, ensuring that even if other local processes attempt to bypass access control by calling the same communication service, their connection attempts will still be blocked due to failure to meet process authorization requirements.
[0132] During the entire access control process, all rejected connection attempts and their corresponding process identity information, access targets, rejection reasons and other data are recorded in the system's security log for subsequent use by the policy analysis and behavior audit modules. This not only achieves access closure at runtime, but also provides the system with retrospective audit capabilities.
[0133] Through this mechanism, the cryptographic application end 200 can implement minimum privilege restrictions on network access paths at the operating system level, so that high-value cryptographic resources from the cryptographic resource end 100 can only be legally called by pre-authorized trusted application system processes, thereby effectively preventing potential process injection, path hijacking, cross-authority abuse and other attacks, building a dynamically verifiable access boundary at runtime, and improving the security and trustworthiness of the entire distributed cryptographic service environment.
[0134] By establishing a secure transmission channel between the cryptographic application terminal 200 and the cryptographic resource terminal 100, the cryptographic resource terminal 100's hardware cryptographic resources 120 can be utilized to remotely provide cryptographic services to the cryptographic application terminal 200, thereby improving data security in a soft computing environment. Further implementing process-level network access control within the cryptographic application terminal 200 can further enhance the security and trustworthiness of the entire distributed cryptographic service environment. However, both of the aforementioned designs primarily ensure that the cryptographic application terminal 200 can securely access the cryptographic resource terminal 100's hardware cryptographic resources 120. The security of the cryptographic calculations performed by the cryptographic application terminal 200 also relies on the local operation of the cryptographic application terminal 200. Therefore, security design of the local system operation of the cryptographic application terminal 200 is also required to ensure a secure and stable trusted computing environment within the cryptographic application terminal 200.
[0135] A process is an instance of a program, i.e., a copy of a program in a computer's memory that is ready for execution by the computer's central processing unit (CPU). In the following discussion, reference is made to a computer system's processor and operations performed by the computer system's processor. It should be understood that such reference includes one or more processing elements and the use of one or more processing elements to perform operations, such as one or more processing cores within one or more CPUs. The processor can be configured to distinguish between instructions from the kernel and instructions from programs other than the kernel, and to execute instructions in separate modes (i.e., kernel mode and user mode). A process instantiated within an operating system from a program other than the kernel (i.e., outside the kernel) may be referred to as a user mode process in this article. The corresponding program or application may be referred to as a user mode application.
[0136] The security design of the local system operation of the cryptographic application terminal 200 in this embodiment includes the security design of the startup phase and the operation process of the cryptographic application terminal 200:
[0137] 1. The cryptographic application performs integrity verification on the startup components during the startup phase and starts running after the integrity verification of the startup components has passed, preventing the loading of unauthorized modified startup programs or kernel modules.
[0138] In one embodiment, the cryptographic application performs bootloader verification and partition validation during the startup phase to ensure that the boot components have not been tampered with and to prevent the implantation of malicious modules in the boot chain. In some embodiments, behavior monitoring and anti-cheating mechanisms (Play Protect and security analysis) are also included. In addition, the system supports log auditing, security event monitoring, and remote forced uninstallation.
[0139] In another embodiment, the operating system is further hardened as follows: configuration files and system files (e.g., MBR, GRUB) in the operating system boot chain of the cryptographic application 200 are set to read-only, ensuring that they can only be read and not modified. Furthermore, the cryptographic application 200 prohibits the installation of new kernel modules and prohibits the bypass loading of security / process / data guard file system kernel modules, thereby protecting the data security and startup security of the operating system where the cryptographic application 200 resides.
[0140] 2. During the operation of the cryptographic application 200, the application kernel 220 continuously monitors the operational behavior of user mode processes and triggers a response action when it detects an abnormality in the operational behavior of a user mode process. User mode processes here include not only application system processes but also operating system processes, such as common system service processes, login and session processes, etc.
[0141] Monitoring the operational behavior of user mode processes mainly includes the following aspects:
[0142] (1) Monitor the creation and operation of user mode processes to achieve safe operation protection of user mode processes.
[0143] When the application-side kernel 220 of the cryptographic application 200 receives a process creation request for a user-mode process, it performs an integrity check on the user-mode process to be created and its dependent libraries. If the integrity check passes, it responds to the process creation request to create and start the user-mode process. Otherwise, it does not respond to the process creation request. After completing process creation, the application-side kernel 220 of the cryptographic application 200 continues to perform integrity checks on the user-mode process while it is running, and triggers a response action if it detects that the integrity check fails. This secure operation protection of user-mode processes is primarily implemented by the kernel control module 221 within the application-side kernel 220. Triggered response actions include isolating suspicious processes, blocking access to sensitive data, or suspending communication connections.
[0144] User mode processes and their dependent libraries, such as dynamic link libraries under Windows or shared libraries under Linux. In one embodiment of the present application, integrity protection of user mode processes and their dependent libraries can be performed by calculating corresponding hash or HMAC values, and then verifying the corresponding hash values or HMAC values when the user mode process is started, thereby protecting the operational security of the user mode process. If the target application program or dependent library is tampered with, the integrity check will fail and the process will be refused to run. In another embodiment of the present application, integrity protection of user mode processes and their dependent libraries can also be performed by calculating a digital signature when protection is started, and then verifying the digital signature during verification.
[0145] The operational security of application system processes can be protected by system call filtering. Android uses the seccomp (secure computing) mechanism to restrict some system calls. For example, system calls such as ptrace, mount, and fork are restricted to prevent malicious behavior from gaining debugging capabilities or launching child processes. In some embodiments, the operational security of application system processes can be protected by code signing and verification mechanisms. All applications must be signed by the developer. The system performs integrity checks on APK files during installation and upgrades to prevent tampering. The system also uses mechanisms such as dm-verity and AVB to perform runtime integrity protection on system partitions and critical files.
[0146] (2) Monitor the data access operations of user mode processes, especially application system processes, to achieve process-level data protection.
[0147] When the application-side kernel 220 of the cryptographic application 220 detects a data access request for application system data initiated by an application system process, it performs integrity and access rights verification on the application system process initiating the data access request and its dependent libraries, as well as integrity verification on the application system data requested by the data access request. If the integrity and access rights verification of the application system process and its dependent libraries pass, and the integrity verification of the application system data passes, the application system kernel 220 responds to the data access request, allowing the application system process to securely access the application system data. Each application system process has predetermined data access rights to its own application system data.
[0148] The application-side kernel 220 implements file system-level encryption for data files through the kernel encryption / decryption module 222. When an application process creates application data, the kernel encryption / decryption module 222 can encrypt and store the application data using key sensitive data as needed. When an application process accesses the application data, the kernel encryption / decryption module 222 decrypts the application data using the key sensitive data and provides it to the application process. The encryption and decryption operations performed on the application data using the key sensitive data are primarily performed by the kernel encryption / decryption module 222. Therefore, the kernel encryption / decryption module 222 is transparent to user-mode processes, which can access files normally and perform operations on them through system calls.
[0149] In this process, this embodiment utilizes a combination of the kernel encryption and decryption module 222 and the mandatory access control provided by the kernel control module 221 to encrypt and protect application system data. The kernel encryption and decryption module 222 intercepts and verifies data access requests for critical application system data in real time, identifying and comparing the security attributes of the application system process initiating the data access request. The security attributes include at least one of the process identifier, execution path, loaded module, signature fingerprint, or call stack. Based on these security attributes, integrity and access rights verification are performed, allowing only authorized processes to access application system data encrypted and protected by the cryptographic mechanism. Other unauthorized processes or processes in a tampered state are prohibited from accessing application system data. Application system data with compromised integrity is also prohibited from being used. Strong kernel consistency and non-bypassability are maintained during the access control process, thereby achieving trusted chain protection for application system processes, process memory space, and data storage paths. This ensures that application system data is accessible only to authorized, untampered application system processes. Unauthorized application system processes or compromised / tampered application system processes cannot obtain the correct decryption service and thus cannot obtain the plaintext of protected data.
[0150] In one embodiment, each application system process has data access permissions to its own application system data. The application system data of each application system process includes application system memory data in the application-side kernel and application system disk data in the application-side storage. In other words, in addition to disk data, the application system's memory space is also protected, prohibiting process memory from being accessed by system calls, thereby improving the security of the cryptographic application's memory environment.
[0151] In one embodiment of the present application, the above-mentioned data protection of the target application system can be a method implemented in the Android operating system, in which the application system performs security protection on its own data. This method is based on the user isolation mechanism and mandatory access control policy provided by the Android kernel, which effectively prevents other unauthorized processes from accessing the private data of this application system and improves the security boundary of the application. The mobile terminal described in this embodiment runs the Android system, and the system kernel is based on Linux, supporting user-level isolation, file system permission management and SELinux mandatory access control mechanism. In this embodiment, the data protection process is as follows: unique UID allocation, when the application system is installed on the Android device, the system PackageManager assigns it a unique user identifier (UID), and the UID is used to distinguish the permission boundaries of different application processes. Exclusive data directory creation and permission setting: The system creates an exclusive data directory / data / data / for this application system under the / data / data / path.<package_name> / and set its access permissions. This permission configuration ensures that only processes belonging to this UID (i.e., this application) can access the directory contents. Processes of other UIDs cannot directly access it even if they have root permissions. In some embodiments, SELinux policy restrictions are also used: the Android system has SELinux mandatory access control enabled, and the system defines a set of SELinux Domain rules for application processes. The process belonging to this application is restricted to accessing only the data files in its corresponding directory and is prohibited from accessing the data directories of other applications.
[0152] In some embodiments, IPC access protection is also implemented: if an application system needs to expose a content provider (ContentProvider) or interface service (AIDL / Binder), it must explicitly define access permissions in the AndroidManifest.xml file or set it to private (android:exported=false). If set to private, other applications cannot initiate IPC calls, preventing cross-process data access.
[0153] In some embodiments, runtime data protection: During operation, the application system encrypts its sensitive data (such as user information, tokens, keys) with AES or SM and stores them in a dedicated private directory (such as / data / data / <package_name> Even if the device is rooted, an attacker who does not obtain the application key cannot decrypt the data.
[0154] In some embodiments, further isolation under multi-user / work profile space (optional): In multi-user devices or devices with enterprise work profile (Work Profile) enabled, the system further uses user ID (UserId) to isolate application data. Even if the same application is installed in two user spaces, they cannot access each other's data directories.
[0155] In some embodiments, the operational security of application system processes also includes runtime memory protection mechanisms. Android introduces multiple mechanisms to ensure runtime memory security: Address Space Layout Randomization (ASLR): randomizes memory address distribution each time an application starts; Data Execution Prevention (DEP): prohibits execution of code in the stack area; Control Flow Integrity (CFI): restricts function jump behavior; and stack canary mechanism: prevents stack overflow attacks. In some embodiments, the operational security of application system processes also includes permission management and user authorization mechanisms (Runtime Permissions). Starting with Android 6.0, applications dynamically request permissions at runtime, and users can grant them in a granular manner. High-risk permissions such as recording, reading location information, and reading contacts require active user confirmation. The system has a permission sandbox to restrict applications from accessing resources beyond their scope.
[0156] Within the application-side kernel 220, the file system is an essential module that provides user-mode processes with access to non-volatile storage such as disks, flash memories, and the like. From the perspective of a user-mode process, the process accesses and operates (for example, opens and reads / writes / closes files on non-volatile storage) by issuing system calls to the application-side kernel 220. Upon receiving these system calls, the application-side kernel 220 manages whether the requesting process is allowed and how to access the requested file. The application-side kernel 220 can perform access control by arbitrating whether the requesting process (the process that issued the system call) is allowed to access the target file or directory based on information about the initiator (the requesting process) and the target file, thereby performing access control, and using the file system module to execute a system call if access is allowed, and notify the user-mode process through the return value of the system call.
[0157] The process security protection and data security protection implemented by the kernel control module 221 and the kernel encryption and decryption module 222 are implemented by stacking file system modules in the kernel layer of multiple file systems. Figure 2 , including three file system kernel layer stacked file system modules: Security Guard File System (SGFS), Process Guard File System (PGFS) and Data Guard File System (DGFS):
[0158] The Security Guard File System (SGFS) uses digital signature technology to protect the integrity of authorized user mode processes, their dependent libraries, and operating environment variables, forming a complete trusted security chain startup to prevent authorized user mode processes from being illegally replaced, modified, or destroyed, thereby preventing the use of authorized programs to execute, modify, and read sensitive security parameters in the operating environment.
[0159] The Process Guard File System (PGFS) protects the memory space of a process by prohibiting the execution of the ptrace system call, preventing the process's memory from being accessed. This ensures that random numbers and other sensitive security parameters in the memory are not stolen or destroyed by any legal or illegal process.
[0160] The Data Guard File System (DGFS) provides process-level mandatory control protection for statically stored application system disk data, allowing only authorized application system processes to access protected application system disk data, and preventing any unauthorized process from accessing it, even the process of the operating system root user (root). This ensures the security of the application system disk data stored in the application-side memory 230, including the security of sensitive security parameters, control and status data.
[0161] Based on these file systems, a process-based mandatory access control policy is implemented, allowing only authorized processes to access protected application system data. By dynamically loading these file system kernel modules, the operational security of cryptographic applications in a modifiable runtime environment is enhanced, including pre-operational protection (trusted security chain startup), in-operation protection (memory protection), and static data protection (file protection). This ensures that only the application system's own processes can access the application system data in memory and application-side storage on the cryptographic application side, and no other processes can access the data of the target application of the application system in memory and application-side storage, thereby ensuring the data security of the cryptographic application system on the cryptographic application side.
[0162] In another embodiment, all user mode processes in the password application terminal 220 can be protected by the above method, or the user mode processes can be divided into protected programs and non-protected programs, such as Figure 2As shown, the Security Guard File System (SGFS) provides secure operation protection for protected programs, which run in protected memory. Non-protected processes are directly created, started, and run in non-protected memory. The corresponding Process Guard File System (PGFS) provides memory protection for the protected memory of protected processes. When other processes access the protected memory of protected processes, the PGFS intercepts and prohibits them. Protected processes write disk data to protected files, while non-protected processes write disk data to non-protected files. The Data Guard File System (DGFS) protects the protected files of protected processes. Protected processes with permission can read and write protected files normally, while non-protected processes' requests for data ranges on protected files are intercepted by the DGFS. Both protected and non-protected processes can access non-protected files normally.
[0163] In this embodiment, the cryptographic application further protects the startup and operation of the application system process, ensuring the operational security of the application system process. It also protects the local data access of the application system process, ensuring the security of the application system data. During the startup phase, the cryptographic application establishes a secure communication channel with the remote cryptographic resource end to verify the integrity of the local operating system's startup components, preventing the loading of unauthorized modified startup programs or kernel modules. During the system operation phase, the cryptographic application continuously monitors the integrity status of key system files and system programs, monitors kernel-mode memory access and module loading behavior, and verifies and compares the detection results with the remote cryptographic resource end. When system integrity anomalies or unauthorized tampering are detected, a response action is triggered through a remote policy delivery mechanism, including isolating suspicious processes, blocking sensitive data access, or suspending communication connections, thereby establishing a software operating environment constrained by remote trusted resources. Ultimately, a highly secure resource channel system is constructed in a diverse soft computing environment that can securely and efficiently distribute and manage hardware cryptographic resources, providing a universal and stable foundation for sensitive data protection and the implementation of a trusted computing environment.
[0164] exist Figure 1In the cryptographic application 200, the data security of the processes or services of the application system 210 running in the cryptographic resource 100 rests on the secure storage space 121 of the cryptographic resource 100. The cryptographic resource 100 and the cryptographic application 200 have an uncertain network connection. This network connection introduces uncertainties in two ways: response delay and intermittent connection. Response delay means that when the application system 210 running in the cryptographic application 200 needs to retrieve critical sensitive data / storage keys from the secure storage space 121 of the cryptographic resource 100, the logic of the process or service of the application system 210 cannot be disrupted by network response delays. In real-world environments, the response speed of a process or service when retrieving data is typically set by the application developer. In some cases, application developers, when using common file access interfaces, don't anticipate any file access response delays because local file access is typically timely. In other cases, application developers anticipate data access response delays and implement corresponding timeout mechanisms in the process logic. If data retrieval is successful, everything is normal. If the response delay exceeds the timeout, the process logic will enter an abnormal branch. In these situations, there's a mismatch between the response speed expected by the application developer and the actual network latency. An application process or service that might work normally in a standard, unenhanced environment might experience operational issues when running in a security-enhanced distributed software cryptographic computing environment, such as the cryptographic application 200, due to an underestimation of the response latency introduced by the network link between the cryptographic resource 100 and the cryptographic application 200. This requires systematic processing of the file access interface. Systematic processing refers to a solution that is not targeted at a specific target application but rather is suitable for a variety of target applications.
[0165] In one embodiment of the present application, a systematic approach to handling response delays introduced by the network link between the cryptographic resource end and the cryptographic application end includes: when the cryptographic application end obtains key sensitive data from the cryptographic resource end, introducing waiting logic for network access events in the kernel subthread of the application-end kernel for the application system data, so that the application system process can still normally access the corresponding application system data through the general file data access interface. Specifically, the kernel control module 221 accesses the event of obtaining key sensitive data / encryption keys from the cryptographic resource end via the network and immediately waits for the response from the cryptographic resource end, thereby avoiding the application layer process accessing the file directly handling the network response delay, thereby preventing the operating logic of the application layer process using the relevant file data access interface from being affected by the network delay. This method is effective for handling common network delay situations.
[0166] In the event of extremely long network latency or even network disconnection, the method used to handle network waits in the file system kernel's child process may trigger the operating system's process management to intervene in the application-layer process's data access, thereby affecting the application-layer process's operational logic. In some cases, such as a service's automatic startup process, if a logic timeout jump occurs during the process, the service often fails to automatically start normally. This can have a significant impact on the operation and maintenance of complex services, for example, forcing the service to be started manually, which may even require additional environmental recovery operations to restart manually. To avoid these situations, the basic file data access interface logic is enhanced at the file system kernel layer of the cryptographic application end, including: when the cryptographic application end needs to obtain key sensitive data from the cryptographic resource end through a network link, the application end kernel will request multiple application system processes with the same key sensitive data or storage keys to be suspended and managed through a queue, and after reading the key sensitive data or storage keys from the secure storage space of the cryptographic resource end through a secure transmission channel, the suspended application system processes will be restored in the order of the queue. The logic of these suspended processes will not change during the waiting period until the kernel control module obtains the required key sensitive data and restores the related application layer processes, thereby ensuring that the operation and maintenance methods of the application layer processes corresponding to the encrypted and protected data are not affected by network intermittentness; at the same time, this processing is independent of the specific target application because it handles all general file data access interfaces that support the target application to access disk files.
[0167] In another embodiment of the present application, the password resource distribution and controlled use system includes multiple password application terminals 200, please refer to Figure 3 Taking two cryptographic application terminals 200 as an example, a cryptographic resource terminal 100 and multiple cryptographic application terminals 200 establish a secure link based on the bidirectional identity authentication described above. The hardware-level random number resources, secure storage resources, and trusted cryptographic computing functions of the cryptographic resource terminal 100 are provided to the multiple cryptographic application terminals 200. Secure distributed cryptographic computing is implemented on the cryptographic application terminals 200, supporting secure cryptographic computing in various distributed software environments and ensuring the security of data in each software environment, including data storage confidentiality, data storage integrity, data storage authenticity, data storage non-repudiation, etc.
[0168] After the cryptographic resource end 100 provides the random number resources, secure storage resources, and secure and trusted computing functions that support multiple cryptographic application ends 200 to perform secure cryptographic calculations to multiple cryptographic application ends 200, the multiple cryptographic application ends 200 can use their respective acquired hardware-level random number resources, hardware-level secure storage resources, and key secure and trusted cryptographic computing functions to establish a secure communication channel between the software computing environments where the multiple cryptographic application ends 200 are located, including: any first cryptographic application end and the second cryptographic application end use the cryptographic resource end to perform two-way identity authentication, and after completing the two-way identity authentication, establish a secure communication channel between the first cryptographic application end and the second cryptographic application end for communication.
[0169] In one embodiment, bidirectional identity authentication between the first and second cryptographic applications using the cryptographic resource includes: the first cryptographic application uses the second cryptographic application's authentication password stored in the cryptographic resource's secure storage space to authenticate the second cryptographic application using an entity authentication mechanism based on a symmetric encryption algorithm. The second cryptographic application uses the first cryptographic application's authentication password stored in the cryptographic resource's secure storage space to authenticate the first cryptographic application using an entity authentication mechanism based on a symmetric encryption algorithm. This enables bidirectional identity authentication between the first and second cryptographic applications based on hardware cryptographic computing resources. This authentication is based on the respective cryptographic application authentication passwords of the two cryptographic applications in the secure storage space of the cryptographic resource 100. During this authentication process, all storage and computation of the relevant cryptographic application authentication passwords are performed within the hardware cryptographic resources of the cryptographic resource 100. The plaintext of all cryptographic application authentication passwords never leaves the hardware cryptographic resource environment of the cryptographic resource 100, thereby maximizing computational security throughout the entire process.
[0170] In another embodiment, the first cryptographic application and the second cryptographic application perform bidirectional identity authentication using the cryptographic resource end, including: the cryptographic resource end 100 generates an identity certificate and a corresponding private key for each cryptographic application end, the secure storage space of the cryptographic resource end 100 stores the private keys of each cryptographic application end, and each cryptographic application end 200 holds its own identity certificate. Then, when the first cryptographic application and the second cryptographic application end need to perform bidirectional identity authentication, the first cryptographic application end sends the identity certificate to the second cryptographic application end, and the second cryptographic application end sends the identity certificate to the first cryptographic application end. After both parties obtain each other's identity certificates, the first cryptographic application end uses the identity certificate of the second cryptographic application end to authenticate the second cryptographic application end using a one-time pass authentication mechanism using digital signature technology in the cryptographic resource end. Similarly, the second cryptographic application end uses the identity certificate of the first cryptographic application end to authenticate the first cryptographic application end using a one-time pass authentication mechanism using digital signature technology in the cryptographic resource end. The signature and verification cryptographic calculations performed by the one-time authentication mechanism method used here are completed in the hardware cryptographic resources of the associated cryptographic resource end 100, thereby realizing two-way identity authentication between the first cryptographic application end and the second cryptographic application end based on the hardware cryptographic computing resources.
[0171] The above description is only a preferred embodiment of the present application, and the present application is not limited to the above embodiments. It is understood that other improvements and variations directly derived or imagined by those skilled in the art without departing from the spirit and concept of the present application should be considered to be included in the scope of protection of the present application.
Claims
1. A cryptographic resource distribution and controlled use system in a soft computing environment, characterized in that: The cryptographic resource distribution and controlled use system includes a cryptographic application end and a cryptographic resource end; the cryptographic application end provides a soft computing environment and is deployed with an application system, and the cryptographic application end also includes an application end kernel, an application end memory, and an application end transmission module; the cryptographic resource end includes a resource end kernel, hardware cryptographic resources, and a resource end transmission module, and the hardware cryptographic resources include a secure storage space, a cryptographic calculation module, and a hardware random number generator; After receiving a network access request for the cryptographic resource end initiated by the application system process, the application-side kernel of the cryptographic application end performs a two-way identity authentication with the cryptographic resource end according to the network access request, and after completing the two-way identity authentication, establishes a secure transmission channel based on an encryption transmission mechanism using the application-side transmission module and the resource-side transmission module of the cryptographic resource end; The application system process of the cryptographic application end remotely accesses the hardware cryptographic resources in the cryptographic resource end via the secure transmission channel, thereby realizing controllable distribution and controllable use of the hardware cryptographic resources at the cryptographic application end.
2. The cryptographic resource distribution and controlled use system according to claim 1, characterized in that: The application-side kernel monitors the operational behavior of user-mode processes, including: After receiving a network access request initiated by an application system process to a cryptographic resource end, the application end kernel of the cryptographic application end performs permission verification on the application system process that initiated the network access request; when it is determined that the application system process that initiated the network access request has network connection permission to the cryptographic resource end, it responds to the network access request and performs two-way identity authentication on the cryptographic resource end.
3. The cryptographic resource distribution and controlled use system according to claim 1, characterized in that: The cryptographic application terminal verifies the integrity of the startup component during the startup phase and starts running after the startup component passes the integrity verification; During the operation of the cryptographic application end, the application end kernel continuously monitors the operation behavior of the user mode process, and triggers a response action when an abnormality is detected in the operation behavior of the user mode process; wherein, the user mode process includes the application system process and the related operating system running process.
4. The cryptographic resource distribution and controlled use system according to claim 3, characterized in that: The application-side kernel monitors the operational behavior of user-mode processes, including: When the application-side kernel of the cryptographic application receives a process creation request for a user mode process, it performs an integrity check on the user mode process to be created and its dependent libraries, and responds to the process creation request to create and start the user mode process if the integrity check passes, otherwise it does not respond to the process creation request; The application-side kernel of the cryptographic application side also continuously performs integrity detection on the user-mode process during its operation, and triggers a response action when it is detected that the integrity detection fails.
5. The cryptographic resource distribution and controlled use system according to claim 3, characterized in that: The application kernel monitors the operational behavior of user mode processes, including the data access behavior of application system processes, including: When the application-side kernel of the cryptographic application detects a data access request to application system data initiated by an application system process, it performs integrity verification and access permission verification on the application system process initiating the data access request and its dependent libraries, and performs integrity verification on the application system data requested for access by the data access request; When the application system process and its dependent libraries pass integrity verification and access permission verification, and the application system data requested by the data access request passes integrity verification, the data access request is responded to so that the application system process can perform encrypted and secure access to the application system data.
6. The cryptographic resource distribution and controlled use system according to claim 5, characterized in that: Each application system process has data access rights to its own application system data. The application system data of each application system process includes application system memory data in the application-side kernel and application system disk data in the application-side storage.
7. The cryptographic resource distribution and controlled use system according to claim 3, characterized in that: The configuration files and system files on the operating system boot chain of the cryptographic application end are in read-only state, and the cryptographic application end is prohibited from installing new kernel modules and prohibiting bypass loading of security / process / data guard file system kernel modules.
8. The cryptographic resource distribution and controlled use system according to claim 1, characterized in that: The application system process of the password application end remotely uses the hardware password resources in the password resource end via the secure transmission channel to perform encrypted secure access to the application system data, including: The application system process reads key sensitive data from the secure storage space of the password resource end via a secure transmission channel, and performs encrypted secure access to the application system data based on the key sensitive data; Alternatively, the application system process reads the storage key from the secure storage space of the cryptographic resource end via a secure transmission channel, and uses the storage key to decrypt the encrypted key sensitive data stored locally on the cryptographic application end to obtain the key sensitive data, and performs encrypted and secure access to the application system data based on the key sensitive data.
9. The cryptographic resource distribution and controlled use system according to claim 8, characterized in that: The application-side kernel suspends multiple application system processes that request the same key sensitive data or storage keys and manages them through a queue. After reading the key sensitive data or storage keys from the secure storage space of the cryptographic resource end via a secure transmission channel, the application system processes that are suspended are restored in the order of the queue.
10. The cryptographic resource distribution and controlled use system according to claim 8, characterized in that: When the cryptographic application side obtains key sensitive data from the cryptographic resource side, a waiting logic for network access events is introduced in the kernel sub-thread of the application system data in the application side kernel, and the application system process accesses the corresponding application system data through a general file data access interface.
11. The cryptographic resource distribution and controlled use system according to claim 1, characterized in that: The cryptographic resource distribution and controlled use system includes multiple cryptographic application terminals. Any first cryptographic application terminal and second cryptographic application terminal use the cryptographic resource terminal to perform two-way identity authentication, and after completing the two-way identity authentication, a secure communication channel is established between the first cryptographic application terminal and the second cryptographic application terminal for communication.
12. The cryptographic resource distribution and controlled use system according to claim 11, characterized in that: The secure storage space of the password resource end stores the password application end authentication passwords of the password application end. The first password application end and the second password application end use the password resource end to perform two-way identity authentication, including: The first cryptographic application end uses the cryptographic application end authentication password of the second cryptographic application end stored in the secure storage space of the cryptographic resource end to authenticate the second cryptographic application end using an entity authentication mechanism based on a symmetric encryption algorithm; The second cryptographic application end uses the cryptographic application end authentication password of the first cryptographic application end stored in the secure storage space of the cryptographic resource end, and applies an entity authentication mechanism based on a symmetric encryption algorithm to authenticate the identity of the first cryptographic application end.
13. The cryptographic resource distribution and controlled use system according to claim 11, characterized in that: The cryptographic resource end generates an identity certificate and corresponding identity private key for each cryptographic application end. The secure storage space of the cryptographic resource end stores the identity private key of each cryptographic application end. Each cryptographic application end holds its own identity certificate. The first cryptographic application end and the second cryptographic application end perform two-way identity authentication using the cryptographic resource end, including: The first cryptographic application sends the identity certificate to the second cryptographic application, and the second cryptographic application sends the identity certificate to the first cryptographic application; The first cryptographic application end uses the identity certificate of the second cryptographic application end and adopts a one-time delivery authentication mechanism of digital signature technology in the cryptographic resource end to authenticate the second cryptographic application end; the second cryptographic application end uses the identity certificate of the first cryptographic application end and adopts a one-time delivery authentication mechanism of digital signature technology in the cryptographic resource end to authenticate the first cryptographic application end.
14. The cryptographic resource distribution and controlled use system according to claim 1, characterized in that: Two-way identity authentication between the password application and the password resource includes: When the cryptographic application end accesses the cryptographic resource end, the cryptographic application end uses a one-time authentication mechanism based on digital signature technology to authenticate the cryptographic resource end, and the cryptographic resource end uses a two-time authentication mechanism based on symmetric encryption algorithm to authenticate the cryptographic application end.
15. The cryptographic resource distribution and controlled use system according to claim 1, characterized in that: Data transmitted between the cryptographic application end and the cryptographic resource end via the secure transmission channel is encrypted using a session key. Methods for determining the session key include: The random key generated by the cryptographic resource end when the cryptographic application end registers with the cryptographic resource end and shared with the cryptographic application end through the side channel is used as the session key; Alternatively, the encrypted random number in the message first sent by the cryptographic resource end to the cryptographic application end when the cryptographic resource end performs identity authentication on the cryptographic application end is used as the session key; Alternatively, the encrypted random number in the message first sent by the cryptographic resource end to the cryptographic application end when the cryptographic resource end authenticates the cryptographic application end is used as the key material, and a key derivation algorithm is used to derive a message encryption and decryption key based on the key material as the session key; Alternatively, the cryptographic resource end and the cryptographic application end negotiate to obtain the session key through the ECDHE key exchange protocol.
16. The cryptographic resource distribution and controlled use system according to claim 15, characterized in that: The session key is dynamically updated according to a predetermined update strategy.