Digital media copyright file encryption protection method and system based on block chain

Through the blockchain-based dual-path encryption protection method, the mirror peak information and clipping residual are detected and encoded to generate a dual-domain mixing matrix, which solves the common correlation leakage problem of mirror frequency band oscillation and fixed-length padding conflict in digital media copyright encryption, and improves the security and resource utilization efficiency of the encryption system.

CN120639487APending Publication Date: 2025-09-12HUNAN GOLDEN EAGLE CARTOON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511023227.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing digital media copyright encryption technology has common correlation leakage problems when facing mirror frequency band oscillation and fixed-length padding conflicts. Attackers can infer content usage or behavior patterns by identifying structural similarities and bypass the masking effect of the encryption algorithm.

Method used

A blockchain-based dual-path encryption protection method is adopted. By detecting the mirror frequency band oscillation and fixed-length padding conflict, the mirror peak coordinates, amplitude ratio coding and clipping residuals are extracted, and a dual-domain mixing matrix is ​​generated. Combined with the pseudo-random sequence and AES-CTR mode, the final ciphertext is generated and written into the blockchain.

Benefits of technology

It significantly enhances the digital media content's ability to resist structural similarity attacks in multimodal processing links, improves the protection strength of the encryption system, and takes into account the processing efficiency in non-sensitive scenarios, achieving tamper-proof and traceable ciphertext evidence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120639487A_ABST
    Figure CN120639487A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of encryption protection, and discloses a digital media copyright file encryption protection method and system based on a block chain, and the method comprises the steps: carrying out the synchronous detection of mirror image frequency band oscillation and fixed-length filling conflict of a digital media stream segment; aiming at mirror image frequency band oscillation, extracting mirror image peak coordinates, amplitude ratio codes and cutting residual errors; performing first processing on the mirror image peak coordinate and the amplitude ratio code to form a first parameter; performing second processing on the cutting residual error and the mirror image peak coordinate to form a second parameter; performing fusion processing on the first parameter and the second parameter to form a dual-domain hybrid matrix; combining the digital media stream segment with the double-domain hybrid matrix to obtain an intermediate ciphertext; processing the intermediate ciphertext by using a preset master key to obtain a final ciphertext of the digital media stream segment; processing the digital media stream segment by using a preset master key to obtain a final ciphertext of the digital media stream segment; and writing the final ciphertext of the digital media stream segment into the block chain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of encryption protection technology, and more specifically, to a blockchain-based digital media copyright file encryption protection method and system. Background Art

[0002] In the practical application of digital media copyright protection, especially when distributing audio and video streams, images, textbooks, and other content over the internet, content providers often use encryption technology to prevent the illegal copying, dissemination, or tampering of the content. However, as the streaming media processing chain becomes increasingly complex, content is often compressed, segmented, transcoded, and even partially edited before being delivered to end-user devices.

[0003] In practice, multiple media segments with similar structures but different semantics are processed in batches, uniformly applying standardized encryption strategies. At the same time, to ensure playback performance, media systems often use fixed-length fragmentation strategies to divide the original content into smaller segments that are easier to transmit over the network. This leads to the following problems:

[0004] 1. Mirror frequency band oscillations: This phenomenon causes certain content segments to appear highly similar or even identical in data structure, even though they differ visually, aurally, or semantically. When such content is structurally regularized using a bidirectional normalization algorithm, it exhibits stable frequency-domain symmetry, manifested as mirror signals with enhanced oscillations at symmetrical locations.

[0005] 2. Fixed-length padding conflicts cause the length of some content segments to approach the system's clipping threshold. Because the differences are minimal, they are all clipped to the same length. The system may use the same padding structure, resulting in repeated tail patterns.

[0006] The presence of mirror peaks in the frequency domain and fixed-length clipping threshold collisions allows attackers to capture commonalities between different media segments before encryption. Once recorded or learned, these commonalities can be used for identification, comparison, or classification, thereby bypassing the encryption algorithm's inherent obscuring effects on the content. Furthermore, even if an attacker cannot decrypt the original content, simply by counting these commonalities, it is possible to determine whether specific segments have appeared, their frequency, and their order of occurrence, thereby inferring content usage or behavioral patterns.

[0007] In summary, existing encrypted content is subject to common correlation leakage, which has become a hidden threat in the digital copyright encryption system. Summary of the Invention

[0008] The present invention provides a blockchain-based digital media copyright file encryption protection method and system to solve the technical problems raised in the background technology.

[0009] In a first aspect, the present invention provides a blockchain-based method for encrypting and protecting digital media copyright files, comprising:

[0010] Step 1: synchronously detect mirror frequency band oscillation and fixed-length padding conflicts on digital media stream segments; if the synchronous detection is successful, proceed to step 2; otherwise, proceed to step 8;

[0011] Step 2: For the mirror frequency band oscillation, extract the mirror peak coordinates, amplitude ratio coding and clipping residual;

[0012] Step 3, performing a first processing on the mirror peak coordinates and the amplitude ratio code to form a first parameter;

[0013] Step 4, performing a second processing on the clipping residual and the mirror peak coordinates to form a second parameter;

[0014] Step 5: Fusing the first parameter and the second parameter to form a dual-domain mixing matrix;

[0015] Step 6: Combine the digital media stream segments with the dual-domain mixing matrix to obtain the intermediate ciphertext;

[0016] Step 7: Using the preset master key to process the intermediate ciphertext, obtain the final ciphertext of the digital media stream segment;

[0017] Step 8: Using the preset master key to process the digital media stream segment to obtain the final ciphertext of the digital media stream segment;

[0018] Step 9: Write the final ciphertext of the digital media stream segment into the blockchain.

[0019] Furthermore, the digital media stream segments are synchronously detected for mirror frequency band oscillation and fixed-length padding conflicts, including:

[0020] Step 101: convert the digital media stream segments into slice vectors, and perform fast Fourier transform on the slice vectors to obtain spectrum vectors;

[0021] Step 102 , calculating a symmetrical frequency difference based on the frequency spectrum vector, and if the symmetrical frequency difference is greater than or equal to a preset mirror threshold, marking the detection of mirror frequency band oscillation as 1;

[0022] Step 103: Compare the length of the slice vector with the a priori clipping length. If the length of the slice vector is greater than or equal to the a priori clipping length, and the tail padding value sequence of the slice vector is consistent with the preset padding value sequence, then mark the detection of the fixed-length padding conflict as 1.

[0023] Step 104 : When the detection flags of the mirror frequency band oscillation and the fixed-length padding conflict are both 1, proceed to step 2 ; otherwise, proceed to step 8 .

[0024] Furthermore, for the image band oscillation, the image peak coordinates, amplitude ratio coding and clipping residual are extracted, including:

[0025] Use the symmetric frequency difference to locate the maximum difference index and determine the mirror peak coordinates;

[0026] Generate amplitude ratio encoding by taking the ratio of the amplitude at the mirror peak coordinate to the amplitude of the fragment vector;

[0027] The cropping residual is determined based on the relationship between the length of the segmentation vector and the prior cropping length.

[0028] Furthermore, the mirror peak coordinates and the amplitude ratio codes are first processed to form first parameters, including:

[0029] Splicing the mirror peak coordinates and the amplitude ratio code into an initial seed according to a preset bit width;

[0030] Initialize the register with the initial seed and output a 256-byte pseudo-random sequence;

[0031] An index is established for the pseudo-random sequence to obtain a self-inverse mapping table as a first parameter S(1).

[0032] Furthermore, the clipping residual and the mirror peak coordinates are subjected to a second processing to form a second parameter, including:

[0033] Step 51, selecting the smallest prime number greater than or equal to the length of the slice vector;

[0034] Step 52, performing a modulo operation on the cropping residual by the minimum prime number to obtain a multiplication factor;

[0035] Step 53: If the multiplication factor is zero or is not co-prime with the multiplication factor and the minimum prime number, the multiplication factor is increased in sequence until it is co-prime with the multiplication factor and the minimum prime number;

[0036] Step 54, for the pseudo-random parameter corresponding to the j-th index in the self-inverse mapping table, calculate the scrambled mapping value over the range of the minimum prime number, as follows:

[0037] δ(j)=(j Z ×α+k p )mod(q)

[0038] Among them, δ(j) represents the scrambled mapping value, j Z represents the pseudo-random parameter corresponding to the j-th index in the self-inverse mapping table, α represents the multiplication factor, k p Mirror peak coordinates, q represents the minimum prime number, mod represents the modulo operation;

[0039] Step 55: If the scrambled mapping value is greater than the length of the slice vector, it is deleted; and a scrambled mapping table is constructed based on the remaining scrambled mapping values ​​as the second parameter S(2).

[0040] Furthermore, the first parameter and the second parameter are fused to form a dual-domain mixing matrix, including:

[0041] Step 61, using the length n of the segment vector as the number of rows and columns of the dual-domain mixing matrix;

[0042] Step 62, for the dual-domain mixing matrix row index a and column index b, calculate the element M[a,b] of the dual-domain mixing matrix in the index range 1 to n, M[a,b]=S(1)[S(2)⊕b]; where ⊕ represents byte-wise XOR;

[0043] In step 63, the determinant of the dual-domain mixing matrix is ​​calculated within the finite field. If the determinant is not equal to zero, the dual-domain mixing matrix is ​​confirmed to be an invertible matrix. Otherwise, return to step 51 to reselect the minimum prime number to obtain an updated second parameter, and repeat steps 61 and 62 until the dual-domain mixing matrix is ​​an invertible matrix.

[0044] Furthermore, the digital media stream segments are combined with the dual-domain mixing matrix to obtain the intermediate ciphertext, including:

[0045] In a finite field, matrix multiplication is performed on the row index a and column index b of the dual-field mixing matrix to obtain an intermediate ciphertext vector; wherein the a-th component of the intermediate ciphertext vector satisfies:

[0046]

[0047] Among them, c a represents the ath component of the intermediate ciphertext vector, p b represents the bth component of the slice vector, and 256 represents a finite field;

[0048] Calculate the CRC32 checksum for the intermediate ciphertext vector and combine the checksum and the intermediate ciphertext vector to obtain the intermediate ciphertext.

[0049] Furthermore, the intermediate ciphertext is processed using the preset master key to obtain the final ciphertext of the digital media stream segment, including:

[0050] Concatenate the checksum of the intermediate ciphertext and the intermediate ciphertext vector to generate the initial value of the 128-bit counter;

[0051] AES-CTR mode is used to generate byte-level key stream with preset master key and counter initial value;

[0052] The check value and the intermediate ciphertext vector are XORed with the key stream byte by byte to obtain the final ciphertext.

[0053] Furthermore, the digital media stream segment is processed using the preset master key to obtain the final ciphertext of the digital media stream segment, including:

[0054] Convert digital media stream segments into slice vectors;

[0055] Generate the initial value of a 128-bit counter by concatenating a 96-bit fixed random constant with the slice vector;

[0056] AES counter mode is used to generate byte-level key stream using the preset master key and counter initial value.

[0057] The shard vector is XORed with the key stream byte by byte to obtain the final ciphertext.

[0058] In a second aspect, a blockchain-based digital media copyright file encryption protection system, applied to any of the blockchain-based digital media copyright file encryption protection methods, comprises:

[0059] The feature detection module is used to synchronously detect the mirror frequency band oscillation and fixed-length padding conflicts of the digital media stream segments; if the synchronous detection is successful, the module enters the parameter extraction module; otherwise, the module enters the second master key encryption module;

[0060] Parameter extraction module, used to extract the mirror peak coordinates, amplitude ratio coding and clipping residual for the mirror frequency band oscillation;

[0061] A first processing module is used to perform a first processing on the mirror peak coordinates and the amplitude ratio code to form a first parameter;

[0062] A second processing module is used to perform a second processing on the clipping residual and the mirror peak coordinates to form a second parameter;

[0063] A dual-domain matrix module, configured to fuse the first parameter and the second parameter to form a dual-domain hybrid matrix;

[0064] Matrix encryption module, used to combine digital media stream segments with a dual-domain mixing matrix to obtain intermediate ciphertext;

[0065] A first master key encryption module, configured to process the intermediate ciphertext using a preset master key to obtain a final ciphertext of the digital media stream segment;

[0066] A second master key encryption module is used to process the digital media stream segment using a preset master key to obtain a final ciphertext of the digital media stream segment;

[0067] The chain storage ciphertext module is used to write the final ciphertext of the digital media stream segment into the blockchain.

[0068] The beneficial effects of the present invention are: by constructing a dual-path encryption processing mechanism based on the execution of mirror frequency band oscillation detection and fixed-length padding conflict detection on digital media stream segments, the digital media content in the multimodal processing link is significantly enhanced in its resistance to structural similarity attacks. If a structural feature that can be classified is detected, the mirror peak information and the clipping residual are extracted and encoded, and a fusion key matrix is ​​generated through multi-layer mapping to disrupt the structural correlation, thereby breaking the potential identifiable commonality; otherwise, the master key is used for direct encryption to avoid the waste of additional computing resources. In the overall process, all ciphertexts are ultimately written into the blockchain to achieve tamper-proof and traceable ciphertext evidence. The present invention not only improves the protection strength of the encryption system against classification analysis attacks, but also takes into account the processing efficiency of the algorithm in non-structurally sensitive scenarios, thereby achieving a balance between security and resource consumption, and has a high degree of engineering feasibility and promotion value. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 This is a flowchart of the blockchain-based digital media copyright file encryption protection method of the present invention. DETAILED DESCRIPTION

[0070] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed solely to enable those skilled in the art to better understand and implement the subject matter described herein, and that the functions and arrangements of the elements discussed may be varied without departing from the scope of this specification. Various examples may omit, substitute, or add various processes or components as needed. In addition, features described with respect to some examples may also be combined in other examples.

[0071] Example 1 is as follows:

[0072] like Figure 1 As shown, the blockchain-based digital media copyright file encryption protection method includes:

[0073] Step 1: synchronously detect mirror frequency band oscillation and fixed-length padding conflicts on digital media stream segments; if the synchronous detection is successful, proceed to step 2; otherwise, proceed to step 8;

[0074] Step 2: For the mirror frequency band oscillation, extract the mirror peak coordinates, amplitude ratio coding and clipping residual;

[0075] Step 3, performing a first processing on the mirror peak coordinates and the amplitude ratio code to form a first parameter;

[0076] Step 4, performing a second processing on the clipping residual and the mirror peak coordinates to form a second parameter;

[0077] Step 5: Fusing the first parameter and the second parameter to form a dual-domain mixing matrix;

[0078] Step 6: Combine the digital media stream segments with the dual-domain mixing matrix to obtain the intermediate ciphertext;

[0079] Step 7: Using the preset master key to process the intermediate ciphertext, obtain the final ciphertext of the digital media stream segment;

[0080] Step 8: Using the preset master key to process the digital media stream segment to obtain the final ciphertext of the digital media stream segment;

[0081] Step 9: Write the final ciphertext of the digital media stream segment into the blockchain.

[0082] In one embodiment of the present invention, synchronously detecting mirror frequency band oscillation and fixed-length padding conflicts in digital media stream segments includes:

[0083] Step 101: convert the digital media stream segments into slice vectors, and perform fast Fourier transform on the slice vectors to obtain spectrum vectors;

[0084] The slice vector represents a vector data structure formed by a byte sequence sequentially extracted from a digital media stream segment, and the spectrum vector represents an array of complex amplitudes obtained by performing fast Fourier transform on the slice vector.

[0085] The technical operation of converting digital media stream segments into fragment vectors and performing fast Fourier transform on the fragment vectors to obtain spectrum vectors is used to uniformly transfer time domain data into frequency domain.

[0086] Step 102 , calculating a symmetrical frequency difference based on the frequency spectrum vector, and if the symmetrical frequency difference is greater than or equal to a preset mirror threshold, marking the detection of mirror frequency band oscillation as 1;

[0087] The symmetric frequency difference is the result of calculating the absolute value of the amplitude difference between two frequency points in the spectrum vector that are symmetrical in terms of their positive and negative values. The preset mirror threshold is a fixed scalar used to compare the symmetric frequency difference to determine whether oscillation in the mirror frequency band is significant. For example, the preset mirror threshold is 0.05.

[0088] The symmetric frequency difference is calculated based on the spectrum vector. If the symmetric frequency difference is not less than a preset mirror threshold, the detection of the mirror frequency band oscillation is marked as 1, thereby quickly and stably identifying the mirror frequency band oscillation.

[0089] Step 103: Compare the length of the slice vector with the a priori clipping length. If the length of the slice vector is greater than or equal to the a priori clipping length, and the tail padding value sequence of the slice vector is consistent with the preset padding value sequence, then mark the detection of the fixed-length padding conflict as 1.

[0090] The a priori clipping length is the maximum byte threshold set by the system to achieve uniform fragment size. For example, the a priori clipping length is 2048 bytes. The preset padding value sequence is a fixed byte sequence appended to the end of a clipping operation, such as a twenty-byte hexadecimal zero padding sequence. The tail padding value sequence represents a fixed byte sequence appended to the end of an oversized fragment to meet the a priori clipping length.

[0091] Step 104 : When the detection flags of the mirror frequency band oscillation and the fixed-length padding conflict are both 1, proceed to step 2 ; otherwise, proceed to step 8 .

[0092] In one embodiment of the present invention, for the image frequency band oscillation, extracting the image peak coordinates, amplitude ratio coding, and clipping the residual includes:

[0093] Use the symmetric frequency difference to locate the maximum difference index and determine the mirror peak coordinates;

[0094] The symmetric frequency difference can highlight the mirror symmetry feature and use the amplitude difference as the judgment basis. Therefore, by finding the maximum difference index, the coordinates of the most significant mirror peak can be accurately locked in the frequency domain.

[0095] Generate amplitude ratio encoding by taking the ratio of the amplitude at the mirror peak coordinate to the amplitude of the fragment vector;

[0096] The total amount of amplitude can vary due to subjective content or gain adjustments, but the ratio format automatically offsets overall energy fluctuations, maintaining stability across clips.

[0097] The cropping residual is determined based on the relationship between the length of the segmentation vector and the prior cropping length.

[0098] The length of the fragment vector directly reflects the data block structure, and the degree of deviation between the fragment vector and the uniform threshold can be quantitatively described by calculating the clipping residual.

[0099] Specifically, the symmetric frequency difference is the data obtained by selecting positive and negative symmetric frequency points in the spectrum and calculating the absolute value of the amplitude difference between the two points; the maximum difference index is used to represent the serial number with the largest absolute value of the amplitude difference among all symmetric frequency differences; the mirror peak coordinates represent the frequency position corresponding to the maximum difference index located by the symmetric frequency difference; the amplitude is the complex amplitude modulus of a single frequency point in the spectrum; the amplitude of the slice vector is the cumulative sum of the amplitudes of each frequency after the slice vector is fast Fourier transformed; the amplitude ratio encoding represents the encoding number obtained by fixed-point quantization of the ratio of the amplitude at the mirror peak coordinates to the amplitude of the slice vector; the length of the slice vector is the total number of bytes constituting the byte sequence of the slice; the priori clipping length is the maximum allowable byte threshold set by the system to unify the slice size; the clipping residual is the non-negative difference between the length of the slice vector and the priori clipping length.

[0100] In one embodiment of the present invention, the mirror peak coordinates and the amplitude ratio encoding are first processed to form the first parameters, including:

[0101] Splicing the mirror peak coordinates and the amplitude ratio code into an initial seed according to a preset bit width;

[0102] The mirror peak coordinates and amplitude ratio codes are combined into a unified high-entropy binary string through precise length splicing to maximize the random source quality.

[0103] Initialize the register with the initial seed and output a 256-byte pseudo-random sequence;

[0104] A linear feedback shift register is used to generate a long-period and reproducible pseudo-random sequence in a finite state space to ensure reversibility.

[0105] An index is established for the pseudo-random sequence to obtain a self-inverse mapping table as a first parameter S(1).

[0106] A bidirectional reversible lookup table is realized by mapping and storing each pseudo-random byte with its corresponding index one by one; the bidirectional reversible lookup table can be used for both forward permutation and reverse restoration.

[0107] In detail, the preset bit width represents the binary bit allocation rule pre-specified by the system for splicing the mirror peak coordinates and amplitude ratio codes; the initial seed represents a high-entropy binary string formed by splicing the mirror peak coordinates and amplitude ratio codes in sequence according to the preset bit width; the register represents an eight-bit linear feedback shift register module that can generate a pseudo-random sequence according to feedback logic; the 256-byte pseudo-random sequence represents the byte stream output by the register after 256 consecutive iterations driven by the initial seed; the self-inverse mapping table represents a 256-item byte permutation table whose index value pairs meet the mutual reversibility; the first parameter S(1) represents the time-frequency integrated mapping data structure solidified by the self-inverse mapping table for subsequent matrix construction and call.

[0108] In one embodiment of the present invention, the clipping residual and the mirror peak coordinates are subjected to a second processing to form a second parameter, including:

[0109] Step 51, selecting the smallest prime number greater than or equal to the length of the slice vector;

[0110] The minimum prime number is determined in the length domain as the modular operation benchmark to ensure the prime domain consistency of subsequent modular operations, thereby providing a controllable and coprime length periodic basis for the clipping residual mapping.

[0111] Step 52, performing a modulo operation on the cropping residual by the minimum prime number to obtain a multiplication factor;

[0112] The cropping residuals of arbitrary size are constrained to a fixed prime field to control the range of random parameters, thereby generating a multiplication factor that is tightly coupled to the slice length.

[0113] Step 53: If the multiplication factor is zero or is not co-prime with the multiplication factor and the minimum prime number, the multiplication factor is increased in sequence until it is co-prime with the multiplication factor and the minimum prime number;

[0114] The multiplication factors are ensured to be coprime with the prime field to avoid mapping period degradation, thereby optimizing the ergodicity of the length scrambling parameters and circumventing the zero value or non-coprime problem.

[0115] Step 54, for the pseudo-random parameter corresponding to the j-th index in the self-inverse mapping table, calculate the scrambled mapping value over the range of the minimum prime number, as follows:

[0116] δ(j)=(j Z ×α+k p )mod(q)

[0117] Among them, δ(j) represents the scrambled mapping value, j Z represents the pseudo-random parameter corresponding to the j-th index in the self-inverse mapping table, α represents the multiplication factor, k p Mirror peak coordinates, q represents the minimum prime number, mod represents the modulo operation;

[0118] The randomness of the scrambled index is extended by coupling the multiplication factor with the frequency domain mirror peak coordinates through linear combination, thereby generating a reversible mapping index that relies on the mirror feature and embeds length information; δ(j) = (j Z ×α+k p )mod(q) ensures that δ(j) falls within the range of 0 to q-1 through modular operation and linear weighting ensures that the mapping table maintains high entropy and reversibility.

[0119] Step 55: If the scrambled mapping value is greater than the length of the slice vector, it is deleted; and a scrambled mapping table is constructed based on the remaining scrambled mapping values ​​as the second parameter S(2).

[0120] Invalid mappings that exceed the valid index range are removed to prevent scrambling from going out of bounds, thereby streamlining the scrambled mapping table and ensuring that each mapping value corresponds to a valid shard position.

[0121] Specifically, the minimum prime number represents the smallest element selected from the set of all prime numbers that are not less than the length of the slice vector; the multiplication factor represents an integer parameter obtained by taking the trimming residual modulo the minimum prime number and determined by the coprime check; the scrambled mapping value is calculated by using the multiplication factor and the mirror peak coordinates within the minimum prime value domain; the second parameter S(2) represents the scrambled mapping table constructed based on the scrambled mapping value and eliminating the overlong results.

[0122] In one embodiment of the present invention, the first parameter and the second parameter are fused to form a dual-domain mixing matrix, including:

[0123] Step 61, using the length n of the segment vector as the number of rows and columns of the dual-domain mixing matrix;

[0124] The size of the dual-domain mixing matrix is ​​determined by the length of the slice vector to ensure that the number of rows and columns of the matrix corresponds one-to-one with the length of the data vector to be encrypted.

[0125] Step 62, for the dual-domain mixing matrix row index a and column index b, calculate the element M[a,b] of the dual-domain mixing matrix in the index range 1 to n, M[a,b]=S(1)[S(2)⊕b]; where ⊕ represents byte-wise XOR;

[0126] The first parameter self-inverse mapping table and the second parameter scrambling mapping table are combined by byte-wise XOR operation and indexed into the self-inverse mapping table to generate matrix elements, so as to achieve deep fusion of the first parameter and the second parameter.

[0127] In step 63, the determinant of the dual-domain mixing matrix is ​​calculated within the finite field. If the determinant is not equal to zero, the dual-domain mixing matrix is ​​confirmed to be an invertible matrix. Otherwise, return to step 51 to reselect the minimum prime number to obtain an updated second parameter, and repeat steps 61 and 62 until the dual-domain mixing matrix is ​​an invertible matrix.

[0128] The reversibility is verified by calculating the determinant of the matrix in a finite field and determining whether it is zero to prevent the matrix from degenerating into an irreversible structure.

[0129] In detail, the dual-domain mixing matrix represents an n×n byte matrix generated by fusing the first parameter and the second parameter; the row index a represents the integer serial number range of 1 to n appearing in the dual-domain mixing matrix for locating the row position; the column index b represents the integer serial number range of 1 to n appearing in the dual-domain mixing matrix for locating the column position; M[a,b] represents the matrix element value corresponding to the intersection of the row index a and the column index b of the dual-domain mixing matrix; ⊕ represents byte-by-byte XOR, which represents the new byte obtained by performing XOR operation on the corresponding bits of the two bytes of data; the determinant represents the matrix determinant value calculated for the dual-domain mixing matrix in a finite field, which is used to determine the reversibility; n represents the length of the slice vector and is also used as the number of rows and columns of the dual-domain mixing matrix.

[0130] In one embodiment of the present invention, combining a digital media stream segment with a dual-domain mixing matrix to obtain an intermediate ciphertext includes:

[0131] In a finite field, matrix multiplication is performed on the row index a and column index b of the dual-field mixing matrix to obtain an intermediate ciphertext vector; wherein the a-th component of the intermediate ciphertext vector satisfies:

[0132]

[0133] Among them, c arepresents the ath component of the intermediate ciphertext vector, p b represents the bth component of the slice vector, and 256 represents a finite field;

[0134] Performing matrix multiplication on the row index a and column index b of the dual-domain mixing matrix in a finite field can deeply couple the dual-domain mixing matrix with the slice vector to achieve data diffusion.

[0135] according to The ath component of the intermediate ciphertext vector can be calculated by linear combination and modulo the result to ensure that all results remain within the byte range.

[0136] Calculate the CRC32 checksum for the intermediate ciphertext vector, combine the checksum and the intermediate ciphertext vector to obtain the intermediate ciphertext, which can provide integrity verification for subsequent transmission and storage.

[0137] In detail, the intermediate ciphertext vector represents the n-dimensional byte result sequence generated by matrix multiplication of the dual-field mixing matrix and the slice vector; c a Represents the single component value corresponding to row index a in the intermediate ciphertext vector; p b Represents the single byte value that appears in the corresponding column index b in the slice vector; 256 indicates that the finite field represents the operational constraint that all multiplication and addition results are modulo 256; the CRC32 checksum represents the 32-bit integrity code generated for the intermediate ciphertext vector based on the polynomial remainder calculation method.

[0138] In one embodiment of the present invention, the intermediate ciphertext is processed using a preset master key to obtain the final ciphertext of the digital media stream segment, including:

[0139] Concatenating the checksum of the intermediate ciphertext and the intermediate ciphertext vector to generate a 128-bit counter initial value can directly couple the integrity information into the encryption initialization parameters to improve randomness and anti-tampering capabilities.

[0140] The AES-CTR mode is used to generate a byte-level key stream with a preset master key and counter initial value. It can utilize the security of the symmetric encryption algorithm and the parallelism of the counter mode to generate a highly random pseudo-random sequence.

[0141] The check value and the intermediate ciphertext vector are XORed with the key stream byte by byte to obtain the final ciphertext. The integrity check and the ciphertext content can be mixed into the final output at the same time to prevent separate modification.

[0142] In detail, the preset master key represents the root key that is fixedly stored by the system during the deployment phase and is used to derive the entire key stream; the 128-bit counter initial value represents the counter starting data block formed by concatenating the check value and the intermediate ciphertext vector and padding them with zeros; the AES-CTR mode represents the counter working mode of the Advanced Encryption Standard for streaming byte encryption; the byte-level key stream represents the pseudo-random sequence generated byte by byte using the preset master key and the counter initial value in the AES-CTR mode; the final ciphertext represents the encryption result obtained by XORing the check value and the intermediate ciphertext vector byte by byte with the byte-level key stream.

[0143] In one embodiment of the present invention, processing a digital media stream segment using a preset master key to obtain a final ciphertext of the digital media stream segment includes:

[0144] Convert digital media stream segments into slice vectors;

[0145] A 128-bit counter initial value is generated by concatenating a 96-bit fixed random constant with the shard vector. This couples the global preset randomness with the vector content of each shard, ensuring that the counter initial value is both unpredictable and tightly bound to the shard.

[0146] Using AES counter mode, a byte-level key stream is generated with a preset master key and counter initial value, which can generate parallel pseudo-random byte sequences by utilizing the strong randomness of the symmetric encryption algorithm.

[0147] The shard vector is XORed with the key stream byte by byte to obtain the final ciphertext.

[0148] Specifically, the 96-bit fixed random constant refers to a high-entropy random number that is preset by the system and remains unchanged when all counter initial values ​​are spliced ​​together; the AES counter mode refers to a symmetric encryption method that uses the Advanced Encryption Standard to generate a key stream in block increments under counter working mode.

[0149] Example 2 is as follows:

[0150] The blockchain-based digital media copyright file encryption protection system is applied to the blockchain-based digital media copyright file encryption protection method, including:

[0151] The feature detection module is used to synchronously detect the mirror frequency band oscillation and fixed-length padding conflicts of the digital media stream segments; if the synchronous detection is successful, the module enters the parameter extraction module; otherwise, the module enters the second master key encryption module;

[0152] Parameter extraction module, used to extract the mirror peak coordinates, amplitude ratio coding and clipping residual for the mirror frequency band oscillation;

[0153] A first processing module is used to perform a first processing on the mirror peak coordinates and the amplitude ratio code to form a first parameter;

[0154] A second processing module is used to perform a second processing on the clipping residual and the mirror peak coordinates to form a second parameter;

[0155] A dual-domain matrix module, configured to fuse the first parameter and the second parameter to form a dual-domain hybrid matrix;

[0156] Matrix encryption module, used to combine digital media stream segments with a dual-domain mixing matrix to obtain intermediate ciphertext;

[0157] A first master key encryption module, configured to process the intermediate ciphertext using a preset master key to obtain a final ciphertext of the digital media stream segment;

[0158] A second master key encryption module is used to process the digital media stream segment using a preset master key to obtain a final ciphertext of the digital media stream segment;

[0159] The chain storage ciphertext module is used to write the final ciphertext of the digital media stream segment into the blockchain.

[0160] The above describes the embodiments of this embodiment, but this embodiment is not limited to the above specific implementation methods. The above specific implementation methods are merely illustrative and not restrictive. Ordinary technicians in this field can also make many forms based on the inspiration of this embodiment, all of which are protected by this embodiment.

Claims

1. A digital media copyright file encryption protection method based on blockchain, characterized in that: include: Step 1: synchronously detecting mirror frequency band oscillation and fixed-length padding conflicts in digital media stream segments; If the synchronization detection is successful, go to step 2; Otherwise, go to step 8; Step 2: For the mirror frequency band oscillation, extract the mirror peak coordinates, amplitude ratio coding and clipping residual; Step 3, performing a first processing on the mirror peak coordinates and the amplitude ratio code to form a first parameter; Step 4, performing a second processing on the clipping residual and the mirror peak coordinates to form a second parameter; Step 5: Fusing the first parameter and the second parameter to form a dual-domain mixing matrix; Step 6: Combine the digital media stream segments with the dual-domain mixing matrix to obtain the intermediate ciphertext; Step 7: Using the preset master key to process the intermediate ciphertext, obtain the final ciphertext of the digital media stream segment; Step 8: Using the preset master key to process the digital media stream segment to obtain the final ciphertext of the digital media stream segment; Step 9: Write the final ciphertext of the digital media stream segment into the blockchain.

2. The blockchain-based digital media copyright file encryption protection method according to claim 1 is characterized in that: Synchronous detection of mirror frequency band oscillation and fixed-length padding conflicts in digital media stream segments, including: Step 101: convert the digital media stream segments into slice vectors, and perform fast Fourier transform on the slice vectors to obtain spectrum vectors; Step 102 , calculating a symmetrical frequency difference based on the frequency spectrum vector, and if the symmetrical frequency difference is greater than or equal to a preset mirror threshold, marking the detection of mirror frequency band oscillation as 1; Step 103: Compare the length of the slice vector with the a priori clipping length. If the length of the slice vector is greater than or equal to the a priori clipping length, and the tail padding value sequence of the slice vector is consistent with the preset padding value sequence, then mark the detection of the fixed-length padding conflict as 1. Step 104 : When the detection flags of the mirror frequency band oscillation and the fixed-length padding conflict are both 1, proceed to step 2 ; otherwise, proceed to step 8 .

3. The blockchain-based digital media copyright file encryption protection method according to claim 2 is characterized in that: For image band oscillation, extract the image peak coordinates, amplitude ratio encoding, and clipping residuals, including: Use the symmetric frequency difference to locate the maximum difference index and determine the mirror peak coordinates; Generate amplitude ratio encoding by taking the ratio of the amplitude at the mirror peak coordinate to the amplitude of the fragment vector; The cropping residual is determined based on the relationship between the length of the segmentation vector and the prior cropping length.

4. The blockchain-based digital media copyright file encryption protection method according to claim 3 is characterized in that: The mirror peak coordinates and the amplitude ratio codes are first processed to form first parameters, including: Splicing the mirror peak coordinates and the amplitude ratio code into an initial seed according to a preset bit width; Initialize the register with the initial seed and output a 256-byte pseudo-random sequence; An index is established for the pseudo-random sequence to obtain a self-inverse mapping table as a first parameter S(1).

5. The blockchain-based digital media copyright file encryption protection method according to claim 4 is characterized in that: The clipping residuals and the mirror peak coordinates are subjected to a second processing to form second parameters, including: Step 51, selecting the smallest prime number greater than or equal to the length of the slice vector; Step 52, performing a modulo operation on the cropping residual by a minimum prime number to obtain a multiplication factor; Step 53: If the multiplication factor is zero or is not co-prime with the multiplication factor and the minimum prime number, the multiplication factor is incremented in sequence until it is co-prime with the multiplication factor and the minimum prime number; Step 54, for the pseudo-random parameter corresponding to the j-th index in the self-inverse mapping table, calculate the scrambled mapping value over the range of the minimum prime number, as follows: δ(j)=(j Z ×α+k p )mod(q) Among them, δ(j) represents the scrambled mapping value, j Z represents the pseudo-random parameter corresponding to the j-th index in the self-inverse mapping table, α represents the multiplication factor, k p Mirror peak coordinates, q represents the minimum prime number, mod represents the modulo operation; Step 55: If the scrambled mapping value is greater than the length of the slice vector, it is deleted; and a scrambled mapping table is constructed based on the remaining scrambled mapping values ​​as the second parameter S(2).

6. The blockchain-based digital media copyright file encryption protection method according to claim 5 is characterized in that: The first parameter and the second parameter are fused to form a dual-domain mixing matrix, including: Step 61, using the length n of the segment vector as the number of rows and columns of the dual-domain mixing matrix; Step 62, for the dual-domain mixing matrix row index a and column index b, calculate the element M[a,b] of the dual-domain mixing matrix in the index range 1 to n, M[a,b]=S(1)[S(2)⊕b]; where ⊕ represents byte-wise XOR; In step 63, the determinant of the dual-domain mixing matrix is ​​calculated within the finite field. If the determinant is not equal to zero, the dual-domain mixing matrix is ​​confirmed to be an invertible matrix. Otherwise, return to step 51 to reselect the minimum prime number to obtain an updated second parameter, and repeat steps 61 and 62 until the dual-domain mixing matrix is ​​an invertible matrix.

7. The blockchain-based digital media copyright file encryption protection method according to claim 6 is characterized in that: The digital media stream segments are combined with the dual-domain mixing matrix to obtain the intermediate ciphertext, including: In a finite field, matrix multiplication is performed on the row index a and the column index b of the dual-field mixing matrix to obtain an intermediate ciphertext vector; wherein the a-th component of the intermediate ciphertext vector satisfies: Among them, c a represents the ath component of the intermediate ciphertext vector, p b represents the bth component of the slice vector, and 256 represents a finite field; Calculate the CRC32 checksum for the intermediate ciphertext vector and combine the checksum and the intermediate ciphertext vector to obtain the intermediate ciphertext.

8. The blockchain-based digital media copyright file encryption protection method according to claim 7 is characterized in that: The intermediate ciphertext is processed using the preset master key to obtain the final ciphertext of the digital media stream segment, including: Concatenate the checksum of the intermediate ciphertext and the intermediate ciphertext vector to generate the initial value of the 128-bit counter; AES-CTR mode is used to generate byte-level key stream with preset master key and counter initial value; The check value and the intermediate ciphertext vector are XORed with the key stream byte by byte to obtain the final ciphertext.

9. The blockchain-based digital media copyright file encryption protection method according to claim 1 is characterized in that: The digital media stream segment is processed using the preset master key to obtain the final ciphertext of the digital media stream segment, including: Convert digital media stream segments into slice vectors; Generate the initial value of a 128-bit counter by concatenating a 96-bit fixed random constant with the slice vector; AES counter mode is used to generate byte-level key stream using the preset master key and counter initial value. The shard vector is XORed with the key stream byte by byte to obtain the final ciphertext.

10. A blockchain-based digital media copyright file encryption protection system, applied to the blockchain-based digital media copyright file encryption protection method according to any one of claims 1 to 9, characterized in that: include: A feature detection module is used to synchronously detect mirror frequency band oscillation and fixed-length padding conflicts in digital media stream segments; If the synchronization detection is successful, the module enters the parameter extraction module; Otherwise, enter the second master key encryption module; Parameter extraction module, used to extract the mirror peak coordinates, amplitude ratio coding and clipping residual for the mirror frequency band oscillation; A first processing module is used to perform a first processing on the mirror peak coordinates and the amplitude ratio code to form a first parameter; A second processing module is used to perform a second processing on the clipping residual and the mirror peak coordinates to form a second parameter; A dual-domain matrix module, configured to fuse the first parameter and the second parameter to form a dual-domain hybrid matrix; Matrix encryption module, used to combine digital media stream segments with a dual-domain mixing matrix to obtain intermediate ciphertext; A first master key encryption module, configured to process the intermediate ciphertext using a preset master key to obtain a final ciphertext of the digital media stream segment; A second master key encryption module is used to process the digital media stream segment using a preset master key to obtain a final ciphertext of the digital media stream segment; The chain storage ciphertext module is used to write the final ciphertext of the digital media stream segment into the blockchain.