Security encryption and privacy protection method for online learning data in credential environment
By generating device private keys using microarchitecture probes and national cryptographic algorithm libraries in a domestic IT innovation environment, and combining them with frequency domain spread spectrum watermarking technology, the problems of fragile key security and low encryption efficiency in online learning data protection are solved, achieving secure encryption and rapid traceability of data.
Patent Information
- Application Number
- CN202511795319.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-02
- Publication Date
- 2026-05-08
AI Technical Summary
Existing online learning data protection technologies suffer from vulnerabilities in key security, low encryption efficiency, and difficulty in tracing data leaks in the context of domestic IT innovation. In particular, they cannot effectively utilize the hardware characteristics of domestic CPUs in heterogeneous computing environments, resulting in keys being easily copied, low encryption efficiency, and an inability to quickly trace the source of the leak.
By detecting the specific instruction set of domestic CPUs through microarchitecture probes, loading the adapted national cryptographic algorithm library, generating device private keys and negotiating session keys with the platform server, embedding traceability identification information in combination with frequency domain spread spectrum watermarking technology, and using national cryptographic algorithms for encryption processing, a strong association between hardware and user identity is achieved.
It effectively resists key duplication attacks, improves encryption efficiency, ensures data traceability, and quickly identifies the source of leakage, solving the problems of weak key security and low encryption efficiency, and achieving data security and traceability.
Smart Images

Figure CN122001609A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security technology, and more specifically, to a method for secure encryption and privacy protection of online learning data in a domestically developed information technology environment. Background Technology
[0002] With the deepening of the national strategy for information technology application innovation (IT innovation), online learning terminals in educational institutions are migrating on a large scale to heterogeneous computing environments based on domestic CPUs (such as Loongson, Phytium, Kunpeng, Hygon, etc.) and domestic operating systems (such as Kylin, UnionTech). These domestic hardware platforms have diverse architectures (covering different instruction set systems such as MIPS, ARM, x86, Alpha, etc.), forming a complex heterogeneous IT innovation environment.
[0003] However, most existing online learning data protection technologies directly adopt traditional, general-purpose pure software encryption schemes (such as general-purpose implementations based on OpenSSL). This approach, by design, deviates from the awareness and deep utilization of the underlying hardware architecture characteristics, merely treating the hardware as a general-purpose computing platform, thus causing the following problems: Decoupling of software and hardware leads to vulnerabilities in key security. Because general software solutions cannot utilize device-specific hardware roots of trust (such as Trusted Cryptographic Modules (TCMs) or hardware serial numbers), keys are typically stored as files or memory variables. This allows attackers to easily copy keys to other unauthorized devices, resulting in device cloning and unauthorized data access.
[0004] The inability to fully utilize hardware performance leads to low encryption efficiency. General-purpose encryption libraries are not adapted to the specific extended instruction sets or microarchitectures of domestically produced CPUs. When processing high-throughput video data, the inability to utilize hardware-level acceleration capabilities (such as SIMD instructions) results in excessive CPU load, impacting the smoothness of online learning.
[0005] Furthermore, existing data protection systems lack the ability to quickly trace and identify the source of data breaches on platforms. Once users upload online learning videos containing personal privacy information (such as facial images) to cloud platforms, the data falls out of the user's control. If a platform's internal mismanagement or attack leads to the leakage of its video library, the original video data lacks strong identifiers containing user identity characteristics and hardware origin. When users discover their videos have been publicly disseminated, they find it difficult to quickly prove that the video originated from their upload record, and they cannot directly parse the specific leakage path or related liability information from the leaked video files. This lack of traceability information makes it difficult for affected users to identify the source of the leak in a timely manner during large-scale privacy data breaches, hindering their ability to quickly assert their rights and also impeding the immediate determination of the platform's security responsibility.
[0006] In view of this, the present invention proposes a method for secure encryption and privacy protection of online learning data in a domestically developed information technology environment to solve the above problems. Summary of the Invention
[0007] To overcome the aforementioned deficiencies of the prior art and to achieve the above objectives, the present invention provides the following technical solution: a method for secure encryption and privacy protection of online learning data in a domestically developed information technology environment, comprising: The underlying hardware features of the device are detected by microarchitecture probes, and the target national cryptographic algorithm library adapted to the current hardware architecture is loaded based on the detection results. Based on the feature information of the target national cryptographic algorithm library, generate the integrity metric value of the device, use the integrity metric value as a key generation factor to generate the device private key, and use the device private key to negotiate with the platform server to generate a session key; Using the session key as a parameter, the target national cryptographic algorithm library is invoked to encrypt and protect the video data in the online learning data, and the encrypted video data is uploaded to the platform server.
[0008] Furthermore, the methods for loading the target national cryptographic algorithm library adapted to the current hardware architecture based on the detection results include: When the client starts, it reads the function flag information of the CPU configuration register through the microarchitecture probe, and constructs a list of extended instruction sets supported by the current CPU based on the read function flag information; Based on the extended instruction set list, all algorithm implementation versions supported by the current hardware are selected from the built-in encryption algorithm library, and they are recorded as candidate algorithm microcode implementation units. The candidate algorithm microcode implementation units are then loaded into the memory isolation area. Within the memory isolation area, a temporary data block is generated using a pseudo-random number generator. Then, multiple candidate algorithm microcode implementation units adapted to different extended instruction sets are called to perform throughput comparison tests on the temporary data block. Based on the throughput comparison test results, the algorithm microcode implementation unit with the highest throughput is selected as the target national cryptographic algorithm library and hot-loaded into memory.
[0009] Furthermore, methods for generating device private keys include: Read the binary machine code of the target national cryptographic algorithm library in memory, and perform hash calculation on the binary machine code to obtain feature information; Read the CPU's serial number, perform a hash calculation on the CPU's serial number, and XOR the resulting hash value with the feature information to obtain the integrity metric value. Extend the integrity metric value to the platform configuration register of the trusted cryptographic module; Inside the trusted cryptographic module, its hardware root key is read and its true random number generator is called to generate a random number. The current value of the platform configuration register, the hardware root key, and the random number are used as input data, and a composite master seed is generated using the national cryptographic standard key derivation function. Based on the composite master seed, a key pair is generated in the secure isolation zone of the trusted cryptographic module, and the private key of the key pair is stored in the secure isolation zone as the device private key.
[0010] Furthermore, methods for negotiating and generating session keys using the device's private key and the platform server include: A true random number is generated by the random number generator of the trusted cryptographic module, and the true random number is used as the client's temporary private key. A corresponding client temporary public key is then generated based on the client's temporary private key. The client's temporary public key is sent to the platform server, and the server's temporary public key and server identity public key are returned by the platform server. The legitimacy of the server's identity public key is then verified. After successful verification, the client's temporary public key and the server's temporary public key are digitally signed using the device's private key to generate signature data, which is then sent to the platform server to complete client authentication. Simultaneously, the response signature received from the platform server for this key exchange is verified. After both parties have successfully verified their identities, the key exchange protocol based on the national cryptographic standard uses the device private key, the client temporary private key, the server identity public key, and the server temporary public key as input parameters to calculate the final session key within the trusted cryptographic module.
[0011] Furthermore, methods for encrypting and protecting video data in online learning data include: The process involves acquiring video data, embedding a digital watermark containing traceability information into the video data, encrypting the video data containing the digital watermark using the counter mode of the national cryptographic block cipher algorithm and the target national cryptographic algorithm library and the session key, and then uploading the encrypted video data to the platform server.
[0012] Furthermore, methods for embedding digital watermarks containing traceability information into video data include: Obtain the identity identifier of the currently logged-in user, concatenate the serial number of the trusted cryptographic module, the serial number of the CPU, and the identity identifier of the currently logged-in user, and perform hash calculation on the concatenation result to generate the traceability identifier information; The video data is decoded to obtain a series of original video frame images; The original video frame image is converted to the YUV color space, and the chroma components are subjected to block discrete cosine transform to obtain the coefficient matrix. Using frequency domain spread spectrum technology, the source identification information is embedded into the mid-frequency coefficients of the coefficient matrix; The coefficient matrix containing the source identification information is subjected to inverse discrete cosine transform to obtain video frame data with digital watermark, and the video frame data with digital watermark is then encoded to generate video data with digital watermark.
[0013] Furthermore, methods for embedding traceability identification information into the intermediate frequency coefficients of the discrete cosine transform domain using frequency domain spread spectrum technology include: Based on the currently negotiated session key, a frequency hopping control seed is generated using a key derivation function; A pseudo-random coordinate sequence is generated based on the frequency hopping control seed, and an intermediate frequency coefficient is selected as the embedding carrier based on the pseudo-random coordinate sequence in the coefficient matrix. Based on the frequency hopping control seed, a pseudo-random spreading code is generated, and the source identification information is modulated using the pseudo-random spreading code to generate a spreading sequence. The energy values of the AC coefficients in the coefficient matrix are calculated and then normalized to obtain the embedding strength factor. The spread spectrum sequence is multiplied by the embedding strength factor and then superimposed onto the embedding carrier.
[0014] Furthermore, methods for encrypting video data containing digital watermarks using the counter mode of the national cryptographic block cipher algorithm include: Multiple consecutive counter values are pre-filled into the CPU's vector register to construct a parallel counter matrix; Based on the session key, using the target national cryptographic algorithm library, a single instruction multiple data stream instruction is used to perform parallel encryption operations on the parallel counter matrix to generate a parallel key stream block; The parallel key stream block is XORed with the video data using the CPU's vector XOR instruction to generate a parallel ciphertext data block.
[0015] Furthermore, the method also includes an offline cache protection process: When the client is detected to be offline, the serial number of the trusted cryptographic module, the serial number of the CPU, and the serial number of the disk volume are read as hardware characteristic factors. The hardware feature factor is concatenated with the current user's login credentials, and then input into a key derivation function based on the national cryptographic hash algorithm to generate a device binding key; Using the device binding key and employing the cipher block chaining mode of the national cryptographic block cipher algorithm, the video data stored locally is encrypted a second time to generate an offline cache file.
[0016] Furthermore, the method also includes the following real-time detection process: After the session key negotiation is generated, a background monitoring thread is started to extract features from the target national cryptographic algorithm library running in memory at random time intervals, and to calculate real-time measurement results based on the extracted real-time feature information. The real-time measurement results are compared with the integrity measurement values for consistency. When the comparison results of the two are inconsistent, the security interface of the trusted cryptography module is immediately invoked to forcibly destroy the device private key and session key in memory, and the network connection with the platform server is interrupted.
[0017] The technical effects and advantages of this invention are as follows: 1. This invention abandons the traditional method of storing keys as files or ordinary memory variables. Instead, it utilizes a trusted cryptographic module as a hardware root of trust, deeply binding the generation of the device's private key with the CPU serial number, the trusted module's hardware root key, and the integrity characteristics of the algorithm library. The entire process of key generation, negotiation, and computation is restricted to execution within a hardware security isolation zone, ensuring that the key cannot physically exist outside the specific domestically developed terminal hardware. This mechanism effectively resists theft methods such as memory scanning, cold start attacks, and file copying, ensuring that attackers cannot illegally access encrypted data by cloning the device environment.
[0018] 2. This invention utilizes microarchitecture probing technology to automatically detect the specific instruction set architecture of the underlying domestic CPU (such as Loongson and Phytium) upon client startup. Based on real-time throughput testing, it dynamically loads the optimal algorithm microcode implementation adapted to the current hardware. Combined with parallel encryption technology based on SIMD (Single Instruction Multiple Data) instructions, it fully utilizes the vector register resources of the underlying hardware for accelerated computation. This significantly reduces the CPU load during high-throughput video data processing, solves the video stuttering problem caused by the low efficiency of general-purpose algorithms, and fully unleashes the computing potential of domestic CPUs.
[0019] 3. Before encrypting and uploading data, this invention utilizes frequency-domain spread spectrum watermarking technology to embed the current user's identity identifier and the device's unique hardware serial number into the video data. This digital watermark constitutes a strong association between the data and the source user and physical device. When platform-side data leakage occurs or videos are publicly disseminated, affected users or regulators can extract tamper-proof hardware and identity fingerprints from the leaked video files, thereby quickly proving the video's origin and attribution, and identifying the specific upload path and responsible party. This provides crucial technical support for solving the difficulties in establishing ownership and determining responsibility in large-scale privacy data breaches. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of a method for secure encryption and privacy protection of online learning data in a domestically developed information technology environment, according to the present invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Example 1 Please see Figure 1 As shown in this embodiment, a method for secure encryption and privacy protection of online learning data in a domestically developed information technology environment includes: The underlying hardware features of the device are detected by microarchitecture probes, and the target national cryptographic algorithm library adapted to the current hardware architecture is loaded based on the detection results. Based on the feature information of the target national cryptographic algorithm library, generate the integrity metric value of the device, use the integrity metric value as a key generation factor to generate the device private key, and use the device private key to negotiate with the platform server to generate a session key; Using the session key as a parameter, the target national cryptographic algorithm library is invoked to encrypt and protect the video data in the online learning data, and the encrypted video data is uploaded to the platform server.
[0023] Specifically, the methods for loading the target national cryptographic algorithm library adapted to the current hardware architecture based on the detection results include: When the client starts, it reads the function identifier information of the CPU configuration register through the microarchitecture probe and constructs a list of extended instruction sets supported by the current CPU based on the read function identifier information. Based on the extended instruction set list, it selects all algorithm implementation versions supported by the current hardware from the built-in encryption algorithm library and records them as candidate algorithm microcode implementation units. The candidate algorithm microcode implementation units are loaded into the memory isolation area. In the memory isolation area, a temporary data block is generated using a pseudo-random number generator. Multiple candidate algorithm microcode implementation units adapted to different extended instruction sets are called to perform throughput comparison tests on the temporary data block. Based on the throughput comparison test results, the algorithm microcode implementation unit with the highest throughput is selected as the target national cryptographic algorithm library and hot-loaded into memory.
[0024] Specifically, when the client (online learning terminal software) starts, the main process launches an independent environment adaptation thread. This thread triggers a microarchitecture probe (such as the CPUID instruction under x86 architecture or the MRS instruction under ARM architecture) to obtain the underlying hardware characteristics of the device, namely the CPU model and the supported instruction sets. Using this microarchitecture probe, it reads the function flag information from the CPU configuration register and constructs a list of extended instruction sets supported by the current CPU based on this function flag information. For example, if the CPU is Hygon / Zhaoxin (x86 architecture), the list of extended instruction sets supported by the CPU might be {SSE4.2, AVX, AVX2, BMI2}; if it is Phytium / Kunpeng (ARM architecture), the list might be {NEON, ASIMD, CE}; and if it is Loongson (LoongArch architecture), the list might be {LSX, LASX}.
[0025] It should be noted that SSE4.2 stands for StreamingSIMD Extensions 4.2; AVX stands for Advanced Vector Extensions; AVX2 stands for Advanced Vector Extensions 2; BMI2 stands for Bit Manipulation Instruction Set 2; NEON stands for ARM Advanced SIMD Extensions; ASIMD stands for ARM Scalable SIMD; CE stands for Crypto Extension; LSX stands for Loongson SIMD Extension; and LASX stands for Loongson Advanced SIMD Extension.
[0026] The system reads the built-in encryption algorithm library (such as the SM3 / SM4 dynamic library). The encryption algorithm library employs a multi-version function symbol design, meaning that the same encryption function corresponds to multiple versions, each of which undergoes deep assembly-level optimization for the proprietary instruction sets of different domestically developed CPUs. For example, the SM4_Encrypt encryption function has the following candidate algorithm microcode implementation unit versions: SM4_Encrypt_Generic (pure C scalar implementation, baseline version); SM4_Encrypt_AVX (optimized using 128-bit vector instructions); SM4_Encrypt_AVX2 (optimized using 256-bit vector instructions); SM4_Encrypt_NEON (optimized using 128-bit vector instructions); SM4_Encrypt_CE (Utilizes ARMv8 hardware cryptographic acceleration instructions).
[0027] Based on the obtained extended instruction set list, all algorithm implementations supported by the current hardware are selected from the built-in encryption algorithm library and denoted as candidate algorithm microcode implementation units, thus obtaining the candidate set C={K1,K2,...,Km}, where m represents the number of candidate algorithm microcode implementation units. For example, for a domestic x86 supporting AVX2, the candidate set may include {Generic,AVX,AVX2}; A protected buffer is allocated in the memory heap area and marked as non-swappable to prevent test data from being written to disk; the set of candidate algorithm microcode implementation units is loaded into the memory isolation area; within the memory isolation area, a fixed-size data block is filled using a pseudo-random number generator to obtain a temporary data block; the size of this data block is preferably 16MB to avoid the impact of L2 / L3 cache; each candidate algorithm microcode implementation unit in the candidate set C is traversed, and a throughput comparison test is performed on each candidate algorithm microcode implementation unit; specifically, the following steps are included: Warm-up: Run the program idling for a few rounds to allow the instruction cache (I-Cache) and branch predictor to reach a stable state; Timing: Record the number of CPU's initial clock cycles, call the candidate algorithm microcode implementation unit to perform encryption operations on the temporary data block, and record the number of CPU's final clock cycles after the encryption operation is completed; the difference between the two is recorded as the number of cycles consumed in performing encryption operations on the temporary data block. Throughput Calculation: The formula for calculating throughput is: ; To prevent system jitter interference, each candidate algorithm microcode implementation unit is tested repeatedly 10 to 50 times, and the average value after removing the extreme values is taken as the throughput of the kernel.
[0028] Compare the throughput of all candidate algorithm microcode implementation units, select the candidate algorithm microcode implementation unit with the maximum value as the target kernel, denoted as the target national cryptographic algorithm library, and formally mount it to the function call table of the encryption engine through dynamic function jump or hot patching.
[0029] The above steps resolve the issue of significant performance differences of the same national cryptographic algorithm on different central processing units (CPUs) caused by the fragmentation of the domestic IT innovation ecosystem. Furthermore, this method enables the same client binary file to automatically load the highest-performance algorithm implementation version that is fully compatible with the current hardware on all mainstream domestic IT innovation platforms without recompiling, effectively reducing the CPU usage during the encryption process and improving the smoothness of the online learning platform.
[0030] Specifically, methods for generating device private keys include: The target national cryptographic algorithm library is read from the binary machine code in memory, and a hash calculation is performed on the binary machine code to obtain feature information. The CPU serial number is hashed, and the resulting hash value is XORed with the feature information to obtain an integrity metric. The integrity metric is extended to the platform configuration register of the trusted cryptographic module. Inside the trusted cryptographic module, its hardware root key is read and its true random number generator is called to generate a random number. The current value of the platform configuration register, the hardware root key, and the random number are used as input data, and a composite master seed is generated using the national cryptographic standard key derivation function. Based on the composite master seed, a key pair is generated in the secure isolation area of the trusted cryptographic module, and the private key of the key pair is stored in the secure isolation area as the device private key.
[0031] Specifically, after completing the hot loading of the target national cryptographic algorithm library, the complete binary machine code of the target national cryptographic algorithm library in the memory isolation area (the binary code compiled by the target national cryptographic algorithm library) is read, and the national cryptographic SM3 algorithm is used to perform irreversible hash calculation on it to obtain a hash value with a length of 256 bits. This hash value is the feature information of the target national cryptographic algorithm library. Read the CPU physical serial number (which can be obtained from the microarchitecture probe) and perform SM3 hash calculation; XOR the two hash values bit by bit to obtain the final integrity metric value; this value not only represents which algorithm microcode implementation unit is currently running, but is also strongly bound to the specific CPU hardware.
[0032] Through the standard extension interface (TCG TPM2_PCRExtend) of the Trusted Cryptography Module, the above integrity metric values are extended into the platform configuration register PCR
[10] or dedicated PCR of the Trusted Cryptography Module, so that the current value of PCR becomes a chain accumulation of historical metric hash + new metric hash, thereby realizing a dynamic trusted metric chain that is unforgeable and unrollbackable.
[0033] Within the secure isolation zone (TrustZone or isolated execution environment) of the trusted cryptographic module, a composite master seed of 256 bits is generated by using its physically unclonable hardware root key (Endorsement Key seed or SRK), a random number generated in real time by a true random number generator (TRNG), and the current PCR value as input. Based on this composite master seed, an SM2 key pair is directly generated within the isolation zone of the trusted cryptographic module, and the private key is permanently stored in a non-volatile secure storage area within the secure isolation zone. This private key cannot be read or exported externally under any circumstances and can only be used for encryption / signing operations through an internal handle within the secure isolation zone. This private key is the device private key.
[0034] Through the above steps, the traditional static root of trust is upgraded to a dynamic root of trust, extending the trust boundary from the startup phase to the runtime phase. This fundamentally blocks advanced attack behaviors such as hot replacement, JIT backdoors (which utilize the dynamic code generation characteristics of just-in-time compilation technology to tamper with or inject malicious code during program execution to bypass static security checks, steal sensitive data, or damage system integrity), and algorithm library hijacking. In addition, binding the device's private key to the hardware and the current highest-performance algorithm library also prevents attackers from achieving persistent attacks.
[0035] Specifically, methods for negotiating and generating session keys using the device's private key and the platform server include: A true random number is generated by the random number generator of the trusted cryptographic module. This true random number is used as the client's temporary private key, and a corresponding client temporary public key is generated based on the client's temporary private key. The client temporary public key is sent to the platform server, and the server's temporary public key and server identity public key are received from the platform server. The legitimacy of the server identity public key is verified. After successful verification, the client temporary public key and server temporary public key are digitally signed using the device private key, and the signed data is generated and sent to the platform server to complete the client identity authentication. At the same time, the response signature received from the platform server for this key exchange is verified. After both parties' identities are verified, the device private key, the client temporary private key, the server identity public key, and the server temporary public key are used as input parameters in the key exchange protocol based on the national cryptographic standard. The final session key is then calculated within the trusted cryptographic module.
[0036] Specifically, the system first calls the hardware random number generator interface of the trusted cryptography module to obtain a truly random number, which is then used directly as the client's temporary private key for this session. Next, based on the SM2 elliptic curve algorithm's base-point operation rules, the corresponding client temporary public key is calculated from this temporary private key. Then, the client temporary public key is sent to the platform server over the network, and a response message is received from the platform server. This message contains the server's temporary public key and a digital certificate containing the server's identity public key. Finally, the system's built-in trusted CA root certificate is used to parse and verify the signature chain and validity period of the server's identity public key certificate, thereby ensuring the authenticity and legitimacy of the server's identity.
[0037] After the server-side certificate verification is successful, the secure signature interface of the trusted cryptography module is invoked. Using the device's private key stored in the trusted cryptography module's secure storage area, an SM2 digital signature operation is performed on the combination of the current client's temporary public key and the server's temporary public key. The generated signature data is then transmitted to the platform server, thereby verifying the legitimacy of the client device's hardware identity. Simultaneously, the response signature returned by the platform server for this key exchange process is received and verified, confirming that the server has successfully received and verified the client's parameters. This completes the final confirmation of each other's identities and the exchanged parameters.
[0038] After confirming that the identities of both parties and the temporary public key have not been tampered with, the key negotiation calculation interface of the trusted cryptographic module is invoked. The protected device private key, the client's temporary private key in local memory, the server's identity public key extracted from the certificate, and the server's temporary public key received from the network are passed to the trusted cryptographic module as input parameters. In its internal secure isolation zone, the trusted cryptographic module performs key derivation function (KDF) operations according to the mathematical process of the SM2 key exchange protocol, and calculates and generates the final session key, which is then output for subsequent data encryption.
[0039] Through the above steps, even if an attacker steals the device's private key or the server's identity private key over a long period of time, all historical session keys remain unbreakable. In addition, because the entire key exchange calculation is completed in a hardware-isolated environment of the trusted cryptographic module, attackers cannot obtain it through memory scanning or cold start attacks.
[0040] Specifically, methods for encrypting and protecting video data in online learning data include: Video data is acquired from the buffer of the camera or hard drive, a digital watermark containing traceability information is embedded in the video data, and the video data containing the digital watermark is encrypted using the counter mode of the national cryptographic block cipher algorithm with the target national cryptographic algorithm library and the session key, and the encrypted video data is uploaded to the platform server.
[0041] It should be noted that methods for embedding digital watermarks containing traceability information into video data include: Obtain the identity identifier of the currently logged-in user (such as student ID or account ID), the serial number of the trusted password module, and the serial number of the CPU. Concatenate the three in a fixed order and then hash them using SM3 to obtain a fixed-length traceability identifier. Video data is decoded in real time to obtain a continuous sequence of original video frames. Real-time decoding is necessary because video data is usually in a compressed format, and decoding is required to reconstruct a continuous sequence of original video frames for subsequent operations.
[0042] The original video frame image is converted to the YUV color space, the chromaticity components (U / V channels) that are not sensitive to human vision are extracted, and they are cut into several 8×8 pixel blocks. Then, the discrete cosine transform (DCT) is performed on each pixel block to convert the image data from the spatial domain to the frequency domain, and the coefficient matrix is obtained. Using frequency domain spread spectrum technology, the source identification information is embedded into the mid-frequency coefficients of the coefficient matrix; The coefficient matrix containing the source identification information is subjected to inverse discrete cosine transform, and the transformed coefficient matrix is reconstructed into the original video frame image to obtain video frame data with digital watermark. Finally, the video frame data containing the digital watermark is re-encoded (H.264 / H.265 / AVS3, etc.) to generate video data with the digital watermark.
[0043] It should be noted that the mid-frequency coefficient region refers to the set of AC coefficients with index values between the 10th and 30th positions after zig-zag scanning of the coefficient matrix (8×8). This region gathers the main texture information of the image, preventing visual distortion caused by modifying low-frequency coefficients and avoiding the quantization filtering of high-frequency coefficients by video coding compression algorithms, thus achieving an optimal balance between watermark invisibility and robustness. The methods of embedding source identification information into the mid-frequency coefficients of the discrete cosine transform domain using frequency domain spread spectrum technology include: Based on the currently negotiated session key, a frequency hopping control seed that is only valid within the current session period is generated using the SM3-KDF key derivation function; Based on the frequency hopping control seed-driven random number generator, a pseudo-random coordinate sequence is generated. In the coefficient matrix of each frame, the intermediate frequency coefficients are dynamically and discretely selected as the embedding carriers based on the pseudo-random coordinate sequence. For example, for the first discrete cosine transform (DCT) block (corresponding to the first coefficient matrix), the generated pseudo-random coordinate sequence is {12, 25}. After the discrete cosine transform (DCT) block is arranged in a zigzag pattern, the coordinates of the elements corresponding to the index values 12 and 25 in the 8×8 coefficient matrix are (1, 4) and (4, 3), respectively. At this time, these two coordinates are used as the embedding carriers of the watermark signal.
[0044] Based on the frequency hopping control seed, a pseudo-random spreading code (±1 long sequence) is generated. The spreading code is then used to perform direct sequence spread spectrum modulation on the traceability identification information to generate a spreading sequence. The energy value of the current DCT block AC coefficient is calculated and normalized to obtain the adaptive embedding strength factor. The spread spectrum sequence is multiplied by the embedding intensity factor and then added to the intermediate frequency coefficients of the selected embedding carrier in an additive manner to complete the watermark embedding. This step ensures that the intensity factor can be automatically increased to improve robustness in regions with complex textures (high energy) and the factor can be decreased to ensure invisibility in smooth regions (low energy).
[0045] The above steps integrate the hardware fingerprint of the trusted cryptographic module into the watermark payload, and combined with video recoding technology, achieve precise traceability of the source by integrating human, machine, and chip, solving the problems of traditional watermarks being unable to locate the physical device of the leakage source and the loss of watermarks during data flow; by generating the spread spectrum sequence and embedding carrier, the dynamic distribution of the watermark is realized through one-time key, making it difficult to remove; combined with texture adaptive intensity adjustment, it significantly improves the robustness against attacks while ensuring image quality.
[0046] Specifically, the methods for encrypting video data containing digital watermarks using the counter mode of the national cryptographic block cipher algorithm include: By pre-filling 16 to 32 continuously increasing counter values in the CPU's vector register (typically 256-bit or 512-bit) at once, a parallel counter matrix is constructed, thereby transforming the traditional serial encryption task into an efficient vectorized parallel task. Based on the session key, the target national cryptographic algorithm library is invoked, and the single instruction multiple data (SIMD) instructions adapted to the current hardware architecture (such as relevant instructions in the NEON or AVX instruction set) are used to perform parallel encryption operations on the parallel counter matrix using the session key as a parameter, and multiple parallel key stream blocks are generated simultaneously within a single instruction cycle. By using the CPU's vector XOR instruction, the generated parallel key stream block is batch XORed with the video data to be encrypted in memory to quickly generate parallel ciphertext data blocks and complete the encryption process of the video data. This process avoids repeated data transfer between general-purpose registers and vector registers, significantly reduces CPU load, and ensures high throughput and low latency for video data encryption.
[0047] When the client detects that it is currently offline (unable to establish a valid network connection with the platform server), an offline cache protection mechanism is activated to prevent the unauthorized extraction of locally cached video data; the specific steps are as follows: The client reads the serial number of the trusted cryptographic module, the serial number of the CPU, and the current disk volume serial number (usually the physical serial number of the hard drive or NVMe controller) in real time as hardware characteristic factors. The above hardware feature factors are concatenated with the current user's login credentials (password hash used during login) in a fixed order to form a globally unique device-user binding string; The binding string is input into the key derivation function (SM3-KDF) based on the national cryptographic SM3 hash algorithm, and a device binding key with a length of 128 bits is generated by iterative calculation. Using the device's binding key, and employing a national cryptographic block cipher algorithm (such as SM3 / SM4) in cipher block linking mode (SM4-CBC mode), the downloaded and locally stored video data is encrypted twice to generate an offline cache file.
[0048] The above steps generate a unique device binding key by deeply integrating the trusted cryptographic module serial number, CPU serial number, disk volume serial number and user login credentials. This enables the physical binding of offline cache files with a specific user, device and hard drive, making the files completely undecryptable after changing devices, disks, virtual machines, or reinstalling the system. This achieves security protection for video data throughout its entire lifecycle in a zero-trust environment.
[0049] The process of uploading video data to the server also includes the following real-time detection process: After the session key negotiation is generated, a background monitoring thread is started to extract features from the target national cryptographic algorithm library running in memory at random time intervals, and calculate the real-time measurement result based on the extracted real-time feature information; wherein, the calculation process of the real-time measurement result is the same as the calculation method of the integrity measurement value. The real-time measurement results are compared with the integrity measurement values for consistency. If the comparison results of the two are different, it means that the target national cryptographic algorithm library may have been subjected to hot replacement, patching, memory tampering or injection of backdoors. At this time, the security interface of the trusted cryptographic module should be called immediately to forcibly destroy the device private key and session key in memory and interrupt the network connection with the platform server. This mechanism extends the trusted boundary from startup to the entire runtime, effectively defending against advanced attacks such as runtime hot replacement, JIT backdoors, and dynamic hijacking, and building a complete dynamic trusted defense system that selects the best and binds it, measures it during operation, and self-destructs it in case of anomalies.
[0050] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0051] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0052] In the description of this invention, it should be understood that the terms "first," "second," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0053] In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0054] In the description of this invention, "several" means one or more, and "a large number" means two or more.
[0055] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0056] All formulas in this manual are dimensionless and calculated numerically. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters and thresholds in the formulas are set by those skilled in the art according to the actual situation.
[0057] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A method for secure encryption and privacy protection of online learning data in a domestically developed information technology environment, characterized in that, include: The underlying hardware features of the device are detected by microarchitecture probes, and the target national cryptographic algorithm library adapted to the current hardware architecture is loaded based on the detection results. Based on the feature information of the target national cryptographic algorithm library, generate the integrity metric value of the device, use the integrity metric value as a key generation factor to generate the device private key, and use the device private key to negotiate with the platform server to generate a session key; Using the session key as a parameter, the target national cryptographic algorithm library is invoked to encrypt and protect the video data in the online learning data, and the encrypted video data is uploaded to the platform server.
2. The method for secure encryption and privacy protection of online learning data in a domestically developed information technology environment according to claim 1, characterized in that, The methods for loading the target national cryptographic algorithm library adapted to the current hardware architecture based on the detection results include: When the client starts, it reads the function flag information of the CPU configuration register through the microarchitecture probe, and constructs a list of extended instruction sets supported by the current CPU based on the read function flag information; Based on the extended instruction set list, all algorithm implementation versions supported by the current hardware are selected from the built-in encryption algorithm library, and they are recorded as candidate algorithm microcode implementation units. The candidate algorithm microcode implementation units are then loaded into the memory isolation area. Within the memory isolation area, a temporary data block is generated using a pseudo-random number generator. Then, multiple candidate algorithm microcode implementation units adapted to different extended instruction sets are called to perform throughput comparison tests on the temporary data block. Based on the throughput comparison test results, the algorithm microcode implementation unit with the highest throughput is selected as the target national cryptographic algorithm library and hot-loaded into memory.
3. The method for secure encryption and privacy protection of online learning data in a domestically developed information technology environment according to claim 2, characterized in that, Methods for generating device private keys include: Read the binary machine code of the target national cryptographic algorithm library in memory, and perform hash calculation on the binary machine code to obtain feature information; Read the CPU's serial number, perform a hash calculation on the CPU's serial number, and XOR the resulting hash value with the feature information to obtain the integrity metric value. Extend the integrity metric value to the platform configuration register of the trusted cryptographic module; Inside the trusted cryptographic module, its hardware root key is read and its true random number generator is called to generate a random number. The current value of the platform configuration register, the hardware root key, and the random number are used as input data, and a composite master seed is generated using the national cryptographic standard key derivation function. Based on the composite master seed, a key pair is generated in the secure isolation zone of the trusted cryptographic module, and the private key of the key pair is stored in the secure isolation zone as the device private key.
4. The method for secure encryption and privacy protection of online learning data in a domestically developed information technology environment according to claim 3, characterized in that, Methods for negotiating and generating session keys using the device's private key and the platform server include: A true random number is generated by the random number generator of the trusted cryptographic module, and the true random number is used as the client's temporary private key. A corresponding client temporary public key is then generated based on the client's temporary private key. The client's temporary public key is sent to the platform server, and the server's temporary public key and server identity public key are returned by the platform server. The legitimacy of the server's identity public key is then verified. After successful verification, the client's temporary public key and the server's temporary public key are digitally signed using the device's private key to generate signature data, which is then sent to the platform server to complete client authentication. Simultaneously, the response signature received from the platform server for this key exchange is verified. After both parties have successfully verified their identities, the key exchange protocol based on the national cryptographic standard uses the device private key, the client temporary private key, the server identity public key, and the server temporary public key as input parameters to calculate the final session key within the trusted cryptographic module.
5. The method for secure encryption and privacy protection of online learning data in a domestically developed information technology environment according to claim 4, characterized in that, Methods for encrypting and protecting video data in online learning data include: The process involves acquiring video data, embedding a digital watermark containing traceability information into the video data, encrypting the video data containing the digital watermark using the counter mode of the national cryptographic block cipher algorithm and the target national cryptographic algorithm library and the session key, and then uploading the encrypted video data to the platform server.
6. The method for secure encryption and privacy protection of online learning data in a domestically developed information technology environment according to claim 5, characterized in that, Methods for embedding digital watermarks containing traceability information into video data include: Obtain the identity identifier of the currently logged-in user, concatenate the serial number of the trusted cryptographic module, the serial number of the CPU, and the identity identifier of the currently logged-in user, and perform hash calculation on the concatenation result to generate the traceability identifier information; The video data is decoded to obtain a series of original video frame images; The original video frame image is converted to the YUV color space, and the chroma components are subjected to block discrete cosine transform to obtain the coefficient matrix. Using frequency domain spread spectrum technology, the source identification information is embedded into the mid-frequency coefficients of the coefficient matrix; The coefficient matrix containing the source identification information is subjected to inverse discrete cosine transform to obtain video frame data with digital watermark, and the video frame data with digital watermark is then encoded to generate video data with digital watermark.
7. A method for secure encryption and privacy protection of online learning data in a domestically developed information technology environment, as described in claim 6, is characterized in that... Methods for embedding source identification information into the intermediate frequency coefficients in the discrete cosine transform domain using frequency domain spread spectrum technology include: Based on the currently negotiated session key, a frequency hopping control seed is generated using a key derivation function; A pseudo-random coordinate sequence is generated based on the frequency hopping control seed, and an intermediate frequency coefficient is selected as the embedding carrier based on the pseudo-random coordinate sequence in the coefficient matrix. Based on the frequency hopping control seed, a pseudo-random spreading code is generated, and the source identification information is modulated using the pseudo-random spreading code to generate a spreading sequence. The energy values of the AC coefficients in the coefficient matrix are calculated and then normalized to obtain the embedding strength factor. The spread spectrum sequence is multiplied by the embedding strength factor and then superimposed onto the embedding carrier.
8. A method for secure encryption and privacy protection of online learning data in a domestically developed information technology environment, as described in claim 5, is characterized in that... Methods for encrypting video data containing digital watermarks using the counter mode of the national standard block cipher algorithm include: Multiple consecutive counter values are pre-filled into the CPU's vector register to construct a parallel counter matrix; Based on the session key, using the target national cryptographic algorithm library, a single instruction multiple data stream instruction is used to perform parallel encryption operations on the parallel counter matrix to generate a parallel key stream block; The parallel key stream block is XORed with the video data using the CPU's vector XOR instruction to generate a parallel ciphertext data block.
9. A method for secure encryption and privacy protection of online learning data in a domestically developed information technology environment, as described in claim 1, is characterized in that... This method also includes an offline cache protection process: When the client is detected to be offline, the serial number of the trusted cryptographic module, the serial number of the CPU, and the serial number of the disk volume are read as hardware characteristic factors. The hardware feature factor is concatenated with the current user's login credentials, and then input into a key derivation function based on the national cryptographic hash algorithm to generate a device binding key; Using the device binding key and employing the cipher block chaining mode of the national cryptographic block cipher algorithm, the video data stored locally is encrypted a second time to generate an offline cache file.
10. A method for secure encryption and privacy protection of online learning data in a domestically developed information technology environment, as described in claim 1, is characterized in that... The method also includes the following real-time detection process: After the session key negotiation is generated, a background monitoring thread is started to extract features from the target national cryptographic algorithm library running in memory at random time intervals, and to calculate real-time measurement results based on the extracted real-time feature information. The real-time measurement results are compared with the integrity measurement values for consistency. When the comparison results of the two are inconsistent, the security interface of the trusted cryptography module is immediately invoked to forcibly destroy the device private key and session key in memory, and the network connection with the platform server is interrupted.
