CN117195274A - Format file anti-fake method and system - Google Patents

Format file anti-fake method and system Download PDF

Info

Publication number
CN117195274A
CN117195274A CN202311474360.0A CN202311474360A CN117195274A CN 117195274 A CN117195274 A CN 117195274A CN 202311474360 A CN202311474360 A CN 202311474360A CN 117195274 A CN117195274 A CN 117195274A
Authority
CN
China
Prior art keywords
encryption
interval
data
plaintext data
section
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311474360.0A
Other languages
Chinese (zh)
Other versions
CN117195274B (en
Inventor
孙肖辉
沙伏生
赵云
庄玉龙
张伟
朱静宇
杨瑞钦
陆猛
郭尚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dianju Information Technology Co ltd
Original Assignee
Beijing Dianju Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dianju Information Technology Co ltd filed Critical Beijing Dianju Information Technology Co ltd
Priority to CN202311474360.0A priority Critical patent/CN117195274B/en
Publication of CN117195274A publication Critical patent/CN117195274A/en
Application granted granted Critical
Publication of CN117195274B publication Critical patent/CN117195274B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to the technical field of data processing, in particular to a format file anti-counterfeiting method and a format file anti-counterfeiting system, comprising the following steps: acquiring plaintext data; acquiring segmentable data of the plaintext data according to the regional threshold value and the second threshold value of each-order data of the plaintext data; acquiring all encryption nodes of the plaintext data according to the segmentable data of the plaintext data; acquiring the optimal confidence coefficient of each encryption interval of the plaintext data according to all peaks and troughs of all encryption intervals of the plaintext data; and encrypting the plaintext data according to the optimal confidence degree of each encryption interval of the plaintext data. The invention can reduce the iterative multiplication times of the chaotic sequence while ensuring that the encryption effect is not reduced.

Description

Format file anti-fake method and system
Technical Field
The invention relates to the technical field of data processing, in particular to a format file anti-counterfeiting method and system.
Background
The layout file is a document or file with a specific format or typesetting rule, such as word document, vector graphic, PDF, scientific document or academic paper, etc., so that the layout file needs to be protected and anti-fake, thereby avoiding malicious tampering of the file and avoiding error reception of a user.
Existing digital rights protection techniques ensure that layout files are not copied, distributed, or tampered with without authorization by encrypting the files. Chaotic encryption is a data encryption technology based on a chaotic theory, and utilizes unpredictability and sensitivity of a chaotic system to make it difficult for an attacker to predict generation of a chaotic signal, so that encrypted data is difficult to crack, the chaotic encryption is used for enhancing safety of a layout file, the layout file is transmitted to a receiver by utilizing a secret key and ciphertext generated by the chaotic system, and the receiver obtains a data plaintext by combining the ciphertext according to authority, so that an encryption effect is achieved. The Logics chaotic encryption algorithm is a one-dimensional chaotic sequence generation method, has a simple calculation result and a high chaotic effect, and ensures that the encrypted ciphertext has a larger difference compared with the characteristics of the original data; however, in the encryption and decryption processes, the performance of the computer of the transmitting side of the format file is relatively strong, and the performance of the computer of the receiving side for processing the file is generally relatively low, so that although the logics chaotic encryption algorithm is a simple chaotic sequence generation method, the multiplication operation used by the iterative equation and the exclusive or encryption mode of the algorithm extremely occupies computational resources, so that the decryption operation of the format file needs to be calculated in a large amount and is difficult to be applied to a lightweight system of the receiving side.
Disclosure of Invention
In order to solve the problems, the invention provides a format file anti-counterfeiting method and a format file anti-counterfeiting system.
The embodiment of the invention provides a format file anti-counterfeiting method, which comprises the following steps of:
acquiring plaintext data;
acquiring a plurality of orders of data of plaintext data; acquiring regional threshold values and second threshold values of each-order data of plaintext data; acquiring the difference threshold value of all peaks in each-order data of the plaintext data; acquiring segmentable data of the plaintext data according to the regional threshold value and the second threshold value of each-order data and the difference threshold value of all peaks in each-order data; acquiring all encryption nodes of the plaintext data according to the segmentable data of the plaintext data;
acquiring all wave crests and wave troughs of all encryption intervals of the plaintext data according to all encryption nodes of the plaintext data; acquiring the optimal confidence coefficient of each encryption interval according to all wave crests and wave troughs of the encryption interval;
and encrypting the plaintext data according to the optimal confidence of each encryption interval.
Preferably, the method for obtaining the data of several orders of the plaintext data includes the following specific steps:
use of plaintext dataA function, obtaining all wave crests and wave troughs of the plaintext data, forming a first-order peak Gu Xulie of the plaintext data by all wave crests and wave troughs of the plaintext data, and fitting the first-order peak Gu Xulie of the plaintext data by using a least square method to obtain second-order data of the plaintext data; use of second order data for plaintext data >A function, obtaining all wave crests and wave troughs of second-order data of the plaintext data, forming a second-order peak Gu Xulie of the plaintext data by all wave crests and wave troughs of the second-order data of the plaintext data, and fitting the second-order peak Gu Xulie of the plaintext data by using a least square method to obtain third-order data of the plaintext data; third order data use of plaintext data>A function, obtaining all wave crests and wave troughs of third-order data of the plaintext data, forming a third-order peak Gu Xulie of the plaintext data by all wave crests and wave troughs of the third-order data of the plaintext data, and fitting the third-order peak Gu Xulie of the plaintext data by using a least square method to obtain fourth-order data of the plaintext data; and so on, several orders of data of the plaintext data are obtained.
Preferably, the specific formula for acquiring the regional threshold and the second threshold of each-order data of the plaintext data is as follows:
in the method, in the process of the invention,representing +.>Regional thresholds for the order data; />Representing +.>Total number of all peaks in the order data; />Representing +.>Total number of all valley peaks of the order data; />Total number of all data representing plaintext data;
in the method, in the process of the invention,representing +.>A second threshold of the order data; / >Is a preset parameter.
Preferably, the method for obtaining the difference threshold of all peaks in each order of data of the plaintext data includes the following specific steps:
for the first order data of the plaintext data, the first order data of the plaintext data is added with the first order dataPeak and->The absolute value of the difference between the valleys is denoted as +.>First difference of peak value, first order data of plaintext data is +.>Peak and->The absolute value of the difference between the valleys is denoted as +.>Second difference of peak values, will be +.>Maximum value of the first difference and the second difference of the peak values as +.>The difference threshold of each peak value is further obtained, and then the difference threshold of all peak values in the first-order data of the plaintext data is obtained.
Preferably, the method for obtaining the segmentable data of the plaintext data according to the regional threshold value and the second threshold value of each level of data and the difference threshold value of all peaks in each level of data includes the following specific steps:
firstly, judging whether first-order data of the plaintext data can be used as segmentable data of the plaintext data, if the first-order data cannot be used as segmentable data of the plaintext data, judging whether second-order data of the plaintext data can be used as segmentable data of the plaintext data if the first-order data still cannot be used as segmentable data of the plaintext data, and the like until the segmentable data of the plaintext data are obtained.
Preferably, the specific method for judging whether the first-order data of the plaintext data can be used as the segmentable data of the plaintext data is as follows:
if the difference threshold value of all peaks in the first-order data of the plaintext data is greater than or equal to the regional threshold value of the first-order data of the plaintext data, the first-order data of the plaintext data is recorded as segmentable data of the plaintext data; comparing the difference threshold value of all peaks in the first order data of the plaintext data with the second threshold value of the first order data of the plaintext data if the difference threshold value of all peaks in the first order data of the plaintext data is smaller than the regional threshold value of the first order data of the plaintext data, and marking the first order data of the plaintext data as segmentable data of the plaintext data if the difference threshold value of all peaks in the first order data of the plaintext data is larger than or equal to the second threshold value of the first order data of the plaintext data; otherwise, the first-order data of the plaintext data may not be the segmentable data of the plaintext data.
Preferably, the method for obtaining all peaks and troughs of all encryption intervals of plaintext data according to all encryption nodes of plaintext data includes the following specific steps:
for the first place of plaintext data Encryption node and->Encryption node, will->Encryption node numberAll data points between the encryption nodes, denoted by +.>The encryption sections are used for obtaining all encryption sections of the plaintext data; for any encryption section of plaintext data, use +_for the encryption section>And obtaining all wave crests and wave troughs of the encryption interval by using a function.
Preferably, the method for obtaining the optimal confidence coefficient of each encryption interval according to all peaks and troughs of the encryption interval includes the following specific steps:
if the first text dataThe section length of the encryption section is less than or equal to +.>The section length of the encryption section is +.>The section length of the encryption section is +.>Analysis length of each encryption section; otherwise, will be->The section length of the encryption section is +.>Analysis length of each encryption section; will be->Analysis of the encryption intervalLength->The total number of all peaks and valleys under the first number, will be +.>The encryption interval is analyzed for length->The total number of all peaks and valleys below is denoted as second number, the minimum of the first number and the second number is taken as +.>Analysis Length of the encryption section >The number of peaks and valleys below; then the%>The calculation expression of the optimal confidence of each encryption interval is as follows:
in the method, in the process of the invention,represents the->Optimizing confidence of each encryption interval; />Represents the->The encryption interval is analyzed for length->The lower plaintext data average value; />Represents the->The encryption interval is analyzed for length->The lower plaintext data average value; />Indicate->Analysis length of each encryption section;represents the->Analysis Length of the encryption section>The number of peaks and valleys below; />Represents the->The->A peak value; />Represents the->The->A valley;represents the->The->A peak value; />Represents the->The->A valley; />The representation takes absolute value; />An exponential function based on a natural constant; />Representing a linear normalization function.
Preferably, the encrypting the plaintext data according to the optimized confidence of each encryption interval includes the following specific steps:
acquiring a chaotic sequence of a first encryption section of plaintext data by using a logic chaotic encryption algorithm, encrypting the first encryption section by using the chaotic sequence of the first encryption section to acquire a ciphertext of the first encryption section, and taking an encryption parameter of the chaotic sequence of the first encryption section as a key of the first encryption section;
If the optimal confidence of the second encryption interval of the plaintext data is greater than or equal to a preset threshold valueAnd the second encryption zone has a zone length less than or equal to the zone length of the first encryption zone, then the first encryption zone is utilizedEncrypting the second encryption interval by the chaotic sequence of the second encryption interval to obtain a ciphertext of the second encryption interval, taking the chaotic sequence of the first encryption interval as the chaotic sequence of the second encryption interval, and taking the encryption parameter of the chaotic sequence of the second encryption interval as the key of the second encryption interval; if the optimal confidence of the second encryption interval of the plaintext data is greater than or equal to a preset threshold +.>The length of the second encryption section is larger than that of the first encryption section, the length of the first encryption section is recorded as the length of the first section, the length of the second encryption section is recorded as the original section of the second encryption section, the sections except the original section in the second encryption section are recorded as the target section, the original section of the second encryption section is encrypted by using the chaotic sequence of the first encryption section to obtain the ciphertext of the original section of the second encryption section, the chaotic sequence of the target section of the second encryption section is obtained by using a logic chaotic encryption algorithm, the target section of the second encryption section is encrypted by using the chaotic sequence of the target section of the second encryption section to obtain the ciphertext of the target section of the second encryption section, the whole ciphertext of the original section and the target section of the second encryption section is used as the ciphertext of the second encryption section, the whole chaotic sequence of the first encryption section and the chaotic sequence of the target section of the second encryption section is used as the second chaotic encryption section, and the encryption key of the second chaotic sequence is used as the encryption key of the second chaotic encryption section;
If the optimal confidence of the second encryption interval of the plaintext data is less than the preset threshold valueAcquiring a chaotic sequence of a second encryption section of the plaintext data by using a logic chaotic encryption algorithm, encrypting the second encryption section by using the chaotic sequence of the second encryption section to acquire a ciphertext of the second encryption section, and encrypting the second encryption sectionThe encryption parameter of the chaotic sequence is used as a key of a second encryption interval;
if the optimal confidence of the third encryption interval of the plaintext data is greater than or equal to a preset threshold valueIf the interval length of the third encryption interval is smaller than or equal to the interval length of the second encryption interval, encrypting the third encryption interval by using the chaotic sequence of the second encryption interval to obtain a ciphertext of the third encryption interval, taking the chaotic sequence of the second encryption interval as the chaotic sequence of the third encryption interval, and taking the encryption parameter of the chaotic sequence of the third encryption interval as the key of the third encryption interval; if the optimal confidence of the third encryption interval of the plaintext data is greater than or equal to a preset threshold +.>The length of the third encryption section is larger than that of the second encryption section, the length of the second encryption section is recorded as the length of the second section, the length of the third encryption section is recorded as the original section of the third encryption section, the sections except the original section in the third encryption section are recorded as the target section, the original section of the third encryption section is encrypted by using the chaotic sequence of the second encryption section to obtain the ciphertext of the original section of the third encryption section, the chaotic sequence of the target section of the third encryption section is obtained by using a logic chaotic encryption algorithm, the target section of the third encryption section is encrypted by using the chaotic sequence of the target section of the third encryption section to obtain the ciphertext of the target section of the third encryption section, the whole ciphertext of the original section and the target section of the third encryption section is used as the ciphertext of the third encryption section, the whole chaotic sequence of the second encryption section and the chaotic sequence of the target section of the third encryption section is used as the chaotic sequence of the third encryption section, and the encryption key of the third chaotic sequence is used as the encryption key of the third encryption section;
If the plaintext numberThe optimal confidence of the third encryption interval is smaller than a preset threshold valueAcquiring a chaotic sequence of a third encryption section of the plaintext data by using a logic chaotic encryption algorithm, encrypting the third encryption section by using the chaotic sequence of the third encryption section to acquire a ciphertext of the third encryption section, and taking an encryption parameter of the chaotic sequence of the third encryption section as a key of the third encryption section;
and so on, ciphertext and keys of all encryption intervals of the plaintext data are obtained.
The invention also provides a format file anti-counterfeiting system which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the steps of any one of the format file anti-counterfeiting methods when executing the computer program.
The technical scheme of the invention has the beneficial effects that: according to the method, the segmentable data of the plaintext data are obtained by analyzing the plaintext data according to the regional threshold value and the second threshold value of each-order data of the plaintext data; obtaining all encryption nodes of the plaintext data according to the segmentable data of the plaintext data, analyzing the similarity of the data in each encryption interval, and encrypting the plaintext data according to the optimized confidence level of each encryption interval of the plaintext data; if the data between adjacent encryption intervals have larger difference, the same group of chaotic sequences are used for encrypting the data between the two encryption intervals, and a better encryption effect can be obtained, so that the number of times of iterative multiplication of the chaotic sequences is reduced while the encryption effect is not reduced, and the problem of reducing the calculation load of a receiving end is solved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of steps of an anti-counterfeiting method for a layout file.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description is given below of a format file anti-counterfeiting method and system according to the invention, which are specific embodiments, structures, features and effects thereof, with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The invention provides a format file anti-counterfeiting method and a system specific scheme by combining the drawings.
Referring to fig. 1, a flowchart of steps of an anti-counterfeit method for format files according to an embodiment of the present invention is shown, the method includes the following steps:
step S001: and acquiring plaintext data.
It should be noted that, the purpose of this embodiment is to encrypt the layout file to achieve the anti-counterfeiting purpose, so the layout file needs to be obtained as the data to be compressed first, and then recorded as the plaintext data.
Specifically, in order to implement the format file anti-counterfeiting method provided in this embodiment, plaintext data needs to be collected first, and the specific process is as follows:
and obtaining the format file from a transmission party of the format file, wherein the format file comprises characters, formats, pictures and the like, formatting the format file, eliminating file differences caused by different formats, and further, converting the formatted format file data by using ASCII codes to obtain plaintext data. Wherein, ming dynastyThe text data comprises a plurality of data points; the plaintext data is decimal data, and the distribution range is
So far, the plaintext data is obtained by the method.
Step S002: acquiring segmentable data of the plaintext data according to the regional threshold value and the second threshold value of each-order data of the plaintext data; and acquiring all encryption nodes of the plaintext data according to the segmentable data of the plaintext data.
It should be noted that, the purpose of this embodiment is to segment the layout file, encrypt each segment, so as to reduce the iteration number of generating the chaotic sequence and improve the decryption efficiency. Further, according to the regional difference of the plaintext data, the encrypted nodes of the encrypted data are obtained, so that the plaintext data needs to be subjected to data segmentation, and the plaintext data are distributed in detailIf the value difference between adjacent areas of the data is larger, the data distribution is possibly different, the same chaotic sequence is used for encrypting different areas, and ciphertext data which is more complex than the original data can be obtained; thus, the encryption node is obtained by the distribution of data in different areas.
1. And obtaining a plurality of orders of data of the plaintext data.
It should be noted that, in order to avoid the problem of efficiency degradation caused by performing analysis after traversing all the data of the plaintext data, the present embodiment analyzes the plaintext data through the multi-order peak-to-valley values, so that the multi-order peak-to-valley values of the plaintext data need to be obtained.
In particular, use is made of plaintext dataThe function is used for obtaining all peaks and troughs of the plaintext data, forming a first-order peak Gu Xulie of the plaintext data by all peaks and troughs of the plaintext data, and fitting the first-order peak Gu Xulie of the plaintext data by using a least square method to obtainObtaining second-order data of plaintext data; use of second order data for plaintext data>A function, obtaining all wave crests and wave troughs of second-order data of the plaintext data, forming a second-order peak Gu Xulie of the plaintext data by all wave crests and wave troughs of the second-order data of the plaintext data, and fitting the second-order peak Gu Xulie of the plaintext data by using a least square method to obtain third-order data of the plaintext data; third order data use of plaintext data>A function, obtaining all wave crests and wave troughs of third-order data of the plaintext data, forming a third-order peak Gu Xulie of the plaintext data by all wave crests and wave troughs of the third-order data of the plaintext data, and fitting the third-order peak Gu Xulie of the plaintext data by using a least square method to obtain fourth-order data of the plaintext data; and so on, several orders of data of the plaintext data are obtained.
Wherein,the function and the least square method are the prior art, and the implementation is not described in detail here.
To this end, several orders of data of the plain data are obtained.
2. And acquiring a regional threshold and a second threshold of each-order data of the plaintext data.
It should be noted that, for any one order of data of the plaintext data, if the number of the order peaks and troughs of the plaintext data is larger, the more disturbed the plaintext data is described, the larger regional threshold value is used for judging the peak-valley value sequence, even if the data amount in each segmentation result is larger, the larger data difference of different segments can still be described, and the encryption effect is not affected by using the same chaotic sequence.
Specifically, plaintext dataThe computational expression of the regional threshold of the order data is:
in the method, in the process of the invention,representing +.>Regional thresholds for the order data; />Representing +.>Total number of all peaks in the order data; />Representing +.>Total number of all valley peaks of the order data; />Representing the total number of all data of the plaintext data.
Presetting a parameterWherein the present embodiment is +.>To describe the example, the present embodiment is not particularly limited, wherein +.>Depending on the particular implementation.
Further, plaintext dataThe second threshold of the order data is calculated as:
In the method, in the process of the invention,representing +.>A second threshold of the order data; />Representing +.>Total number of all peaks in the order data; />Representing +.>Total number of all valley peaks of the order data; />Is a preset parameter.
To this end, the regional threshold and the second threshold of each-order data of the plaintext data are obtained.
3. All encrypted nodes of the plaintext data are obtained.
Specifically, for the first order data of the plaintext data, the first order data of the plaintext data is the first order data of the plaintext dataPeak and->The absolute value of the difference between the valleys is denoted as +.>First difference of peak value, first order data of plaintext data is +.>Peak and the firstThe absolute value of the difference between the valleys is denoted as +.>Second difference of peak values, will be +.>Maximum value of the first difference and the second difference of the peak values as +.>The difference threshold of each peak value is further obtained, and then the difference threshold of all peak values in the first-order data of the plaintext data is obtained.
Firstly, judging whether first-order data of the plaintext data can be used as segmentable data of the plaintext data, if the first-order data cannot be used as segmentable data of the plaintext data, judging whether second-order data of the plaintext data can be used as segmentable data of the plaintext data if the first-order data still cannot be used as segmentable data of the plaintext data, and the like until the segmentable data of the plaintext data are obtained.
The specific method for judging whether the first-order data of the plaintext data can be used as the segmentable data of the plaintext data is as follows: if the difference threshold value of all peaks in the first-order data of the plaintext data is greater than or equal to the regional threshold value of the first-order data of the plaintext data, the first-order data of the plaintext data is recorded as segmentable data of the plaintext data; comparing the difference threshold value of all peaks in the first order data of the plaintext data with the second threshold value of the first order data of the plaintext data if the difference threshold value of all peaks in the first order data of the plaintext data is smaller than the regional threshold value of the first order data of the plaintext data, and marking the first order data of the plaintext data as segmentable data of the plaintext data if the difference threshold value of all peaks in the first order data of the plaintext data is larger than or equal to the second threshold value of the first order data of the plaintext data; otherwise, the first-order data of the plaintext data may not be the segmentable data of the plaintext data.
Similarly, it is determined whether the second-order data of the plaintext data is segmentable data that can be used as the plaintext data, and whether the third-order data of the plaintext data is segmentable data that can be used as the plaintext data.
Further, all peaks and troughs of the segmentable data of the plaintext data are corresponding to all data points between the peaks and troughs of the segmentable data to the data points of the plaintext data, and the data points are used as all encryption nodes of the plaintext data.
So far, all the encryption nodes of the plaintext data are obtained by the method.
Step S003: and obtaining the optimal confidence coefficient of each encryption interval of the plaintext data according to all peaks and troughs of all encryption intervals of the plaintext data.
After each encryption node is obtained, each two encryption nodes form an encryption interval, and because the chaotic encryption is implemented by encrypting the plaintext exclusive OR according to the chaotic sequence, the encryption interval is traversed according to the encryption sequence. In this embodiment, the similarity of data between sequential encryption intervals is analyzed to obtain the similarity of the next encryption interval and the previous encryption interval, so as to obtain the optimal execution degree of the next encryption interval using the previous chaotic sequence, and if the difference between adjacent encryption intervals is large, the optimal confidence of the next encryption interval using the previous chaotic sequence is high, that is, the ciphertext encrypted by using the same key for plaintext is different, so that optimization can be implemented.
1. And acquiring all peaks and troughs of all encryption intervals of the plaintext data.
Specifically, for the first plaintext dataEncryption node and->Encryption node, will->Encryption node and->All data points between the encryption nodes, denoted by +.>The encryption sections are used for obtaining all encryption sections of the plaintext data; for any encryption section of plaintext data, use +_for the encryption section>And obtaining all wave crests and wave troughs of the encryption interval by using a function.
So far, all peaks and troughs of all encryption intervals of the plaintext data are obtained.
2. And obtaining the optimal confidence of each encryption interval of the plaintext data.
Since only the same length of the adjacent encryption section can be encrypted using the same chaotic sequence, a shorter length of the adjacent encryption section is required as an analysis length for analyzing the data similarity of the encryption section data; for any adjacent encryption interval, if the difference of adjacent peaks and valleys of the adjacent encryption interval under the analysis length is larger, the trend change of the same data point of the adjacent encryption interval is larger, the data with larger difference is more likely to belong to, and the same chaotic sequence can obtain encryption results with larger difference; the farther the data distribution difference between adjacent encryption intervals is from 1, the more the data distribution difference between adjacent encryption intervals is from 1, the plaintext data is distributed in different ranges, and the same chaotic sequence can obtain encryption results with larger difference.
Specifically, if the first text dataThe section length of the encryption section is less than or equal to +.>The section length of the encryption section is +.>Of encrypted intervalsInterval length as->Analysis length of each encryption section; otherwise, will be->The section length of the encryption section is +.>Analysis length of each encryption section; will be->The encryption interval is analyzed for length->The total number of all peaks and valleys under the first number, will be +.>The encryption interval is analyzed for length->The total number of all peaks and valleys below is denoted as second number, the minimum of the first number and the second number is taken as +.>Analysis Length of the encryption section>The number of peaks and valleys below; then the%>The calculation expression of the optimal confidence of each encryption interval is as follows:
in the method, in the process of the invention,represents the->Optimizing confidence of each encryption interval; />Represents the->The encryption interval is analyzed for length->The lower plaintext data average value; />Represents the->The encryption interval is analyzed for length->The lower plaintext data average value; />Indicate->Analysis length of each encryption section;represents the->Analysis Length of the encryption section >The number of peaks and valleys below; />Represents the->The->A peak value; />Represents the->The->A valley;represents the->The->A peak value; />Represents the->The->A valley; />The representation takes absolute value; />An exponential function based on a natural constant; />Representing a linear normalization function.
So far, the optimal confidence of each encryption interval of the plaintext data is obtained through the method.
Step S004: and encrypting the plaintext data according to the optimal confidence degree of each encryption interval of the plaintext data.
Presetting a threshold valueWherein the present embodiment is +.>To describe the example, the present embodiment is not particularly limited, wherein +.>Depending on the particular implementation.
Specifically, a chaotic sequence of a first encryption section of plaintext data is obtained by using a logic chaotic encryption algorithm, the first encryption section is encrypted by using the chaotic sequence of the first encryption section, a ciphertext of the first encryption section is obtained, and encryption parameters of the chaotic sequence of the first encryption section are used as keys of the first encryption section.
If the optimal confidence of the second encryption interval of the plaintext data is greater than or equal to a preset threshold valueIf the interval length of the second encryption interval is smaller than or equal to the interval length of the first encryption interval, encrypting the second encryption interval by using the chaotic sequence of the first encryption interval to obtain a ciphertext of the second encryption interval, taking the chaotic sequence of the first encryption interval as the chaotic sequence of the second encryption interval, and taking the encryption parameter of the chaotic sequence of the second encryption interval as the key of the second encryption interval; if the optimal confidence of the second encryption interval of the plaintext data is greater than or equal to a preset threshold +.>And the interval length of the second encryption interval is larger than that of the first encryption interval, the interval length of the first encryption interval is recorded as the first interval length, and the length of the second encryption interval is recorded as the first interval lengthThe interval of the interval length is marked as an original interval of a second encryption interval, the interval except the original interval in the second encryption interval is marked as a target interval, the original interval of the second encryption interval is encrypted by using the chaotic sequence of the first encryption interval to obtain the ciphertext of the original interval of the second encryption interval, the chaotic sequence of the target interval of the second encryption interval is obtained by using a logic chaotic encryption algorithm, the target interval of the second encryption interval is encrypted by using the chaotic sequence of the target interval of the second encryption interval to obtain the ciphertext of the target interval of the second encryption interval, the whole ciphertext of the original interval of the second encryption interval and the ciphertext of the target interval is taken as the ciphertext of the second encryption interval, the chaotic sequence of the first encryption interval and the whole chaotic sequence of the target interval of the second encryption interval are taken as the chaotic sequence of the second encryption interval, and the encryption parameters of the chaotic sequence of the second encryption interval are taken as the key of the second encryption interval.
If the optimal confidence of the second encryption interval of the plaintext data is less than the preset threshold valueAnd acquiring a chaotic sequence of a second encryption section of the plaintext data by using a logic chaotic encryption algorithm, encrypting the second encryption section by using the chaotic sequence of the second encryption section to acquire a ciphertext of the second encryption section, and taking an encryption parameter of the chaotic sequence of the second encryption section as a key of the second encryption section.
If the optimal confidence of the third encryption interval of the plaintext data is greater than or equal to a preset threshold valueIf the interval length of the third encryption interval is smaller than or equal to the interval length of the second encryption interval, encrypting the third encryption interval by using the chaotic sequence of the second encryption interval to obtain a ciphertext of the third encryption interval, taking the chaotic sequence of the second encryption interval as the chaotic sequence of the third encryption interval, and taking the encryption parameter of the chaotic sequence of the third encryption interval as the third additionSecret keys in the secret section; if the optimal confidence of the third encryption interval of the plaintext data is greater than or equal to a preset threshold +.>And the length of the third encryption section is longer than that of the second encryption section, the length of the second encryption section is recorded as the length of the second section, the length of the third encryption section is recorded as the original section of the third encryption section, the sections except the original section in the third encryption section are recorded as the target section, the original section of the third encryption section is encrypted by using the chaotic sequence of the second encryption section to obtain the ciphertext of the original section of the third encryption section, the chaotic sequence of the target section of the third encryption section is obtained by using a logic chaotic encryption algorithm, the target section of the third encryption section is encrypted by using the chaotic sequence of the target section of the third encryption section to obtain the ciphertext of the target section of the third encryption section, the whole ciphertext of the original section and the target section of the third encryption section is used as the ciphertext of the third encryption section, the whole chaotic sequence of the second encryption section and the chaotic sequence of the target section of the third encryption section is used as the chaotic sequence of the third encryption section, and the third encryption key is used as the encryption key of the third chaotic encryption sequence.
If the optimal confidence of the third encryption interval of the plaintext data is less than the preset thresholdAnd acquiring a chaotic sequence of a third encryption section of the plaintext data by using a logic chaotic encryption algorithm, encrypting the third encryption section by using the chaotic sequence of the third encryption section to acquire a ciphertext of the third encryption section, and taking an encryption parameter of the chaotic sequence of the third encryption section as a key of the third encryption section.
And so on, ciphertext and keys of all encryption intervals of the plaintext data are obtained. The process of acquiring the chaotic sequence by using the logics chaotic encryption algorithm and the process of acquiring the encryption parameters of the chaotic sequence are well known contents of the logics chaotic encryption algorithm, and are not described in detail in this embodiment.
Further, all ciphertext and keys of the plaintext data are transmitted to a receiving end, the receiving end is endowed with decryption permission, and the receiving end decrypts according to the keys corresponding to each ciphertext, wherein each ciphertext corresponds to one key.
Through the steps, the format file anti-counterfeiting method is completed.
The invention also provides a format file anti-counterfeiting system which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the steps of any one of the format file anti-counterfeiting methods when executing the computer program.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the invention, but any modifications, equivalent substitutions, improvements, etc. within the principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. The format file anti-counterfeiting method is characterized by comprising the following steps of:
acquiring plaintext data;
acquiring a plurality of orders of data of plaintext data; acquiring regional threshold values and second threshold values of each-order data of plaintext data; acquiring the difference threshold value of all peaks in each-order data of the plaintext data; acquiring segmentable data of the plaintext data according to the regional threshold value and the second threshold value of each-order data and the difference threshold value of all peaks in each-order data; acquiring all encryption nodes of the plaintext data according to the segmentable data of the plaintext data;
acquiring all wave crests and wave troughs of all encryption intervals of the plaintext data according to all encryption nodes of the plaintext data; acquiring the optimal confidence coefficient of each encryption interval according to all wave crests and wave troughs of the encryption interval;
and encrypting the plaintext data according to the optimal confidence of each encryption interval.
2. The anti-counterfeiting method for the layout file according to claim 1, wherein the step of obtaining the plurality of orders of data of the plaintext data comprises the following specific steps:
Use of plaintext dataA function, obtaining all wave crests and wave troughs of the plaintext data, forming a first-order peak Gu Xulie of the plaintext data by all wave crests and wave troughs of the plaintext data, and fitting the first-order peak Gu Xulie of the plaintext data by using a least square method to obtain second-order data of the plaintext data; use of second order data for plaintext data>A function, obtaining all wave crests and wave troughs of second-order data of the plaintext data, forming a second-order peak Gu Xulie of the plaintext data by all wave crests and wave troughs of the second-order data of the plaintext data, and fitting the second-order peak Gu Xulie of the plaintext data by using a least square method to obtain third-order data of the plaintext data; third order data use of plaintext data>A function, obtaining all wave crests and wave troughs of third-order data of the plaintext data, forming a third-order peak Gu Xulie of the plaintext data by all wave crests and wave troughs of the third-order data of the plaintext data, and fitting the third-order peak Gu Xulie of the plaintext data by using a least square method to obtain fourth-order data of the plaintext data; and so on, several orders of data of the plaintext data are obtained.
3. The format file anti-counterfeiting method according to claim 1, wherein the specific formulas of the regional threshold value and the second threshold value of each-order data of the obtained plaintext data are as follows:
In the method, in the process of the invention,representing +.>Regional thresholds for the order data; />Representing +.>Total number of all peaks in the order data; />Representing +.>Total number of all valley peaks of the order data; />Total number of all data representing plaintext data;
in the method, in the process of the invention,representing +.>A second threshold of the order data; />Is a preset parameter.
4. The anti-counterfeiting method for the layout file according to claim 1, wherein the obtaining the difference threshold of all peaks in each-order data of the plaintext data comprises the following specific steps:
for the first order data of the plaintext data, the first order data of the plaintext data is added with the first order dataPeak and->The absolute value of the difference between the valleys is denoted as +.>First difference of peak value, first order data of plaintext data is +.>Peak and->The absolute value of the difference between the valleys is denoted as +.>Second difference of peak values, will be +.>Maximum value of the first difference and the second difference of the peak values as +.>The difference threshold of each peak value is further obtained, and then the difference threshold of all peak values in the first-order data of the plaintext data is obtained.
5. The anti-counterfeiting method for the layout file according to claim 1, wherein the step of obtaining the segmentable data of the plaintext data according to the regional threshold value and the second threshold value of each level of data and the difference threshold value of all peaks in each level of data comprises the following specific steps:
Firstly, judging whether first-order data of the plaintext data can be used as segmentable data of the plaintext data, if the first-order data cannot be used as segmentable data of the plaintext data, judging whether second-order data of the plaintext data can be used as segmentable data of the plaintext data if the first-order data still cannot be used as segmentable data of the plaintext data, and the like until the segmentable data of the plaintext data are obtained.
6. The method for preventing counterfeit of layout file according to claim 5, wherein the specific method for judging whether the first-order data of the plaintext data can be used as the segmentable data of the plaintext data is as follows:
if the difference threshold value of all peaks in the first-order data of the plaintext data is greater than or equal to the regional threshold value of the first-order data of the plaintext data, the first-order data of the plaintext data is recorded as segmentable data of the plaintext data; comparing the difference threshold value of all peaks in the first order data of the plaintext data with the second threshold value of the first order data of the plaintext data if the difference threshold value of all peaks in the first order data of the plaintext data is smaller than the regional threshold value of the first order data of the plaintext data, and marking the first order data of the plaintext data as segmentable data of the plaintext data if the difference threshold value of all peaks in the first order data of the plaintext data is larger than or equal to the second threshold value of the first order data of the plaintext data; otherwise, the first-order data of the plaintext data may not be the segmentable data of the plaintext data.
7. The anti-counterfeiting method for the layout file according to claim 1, wherein the specific method for acquiring all peaks and valleys of all encryption intervals of the plaintext data according to all encryption nodes of the plaintext data comprises the following steps:
for the first place of plaintext dataEncryption node and->Encryption node, will->Encryption node and->All data points between the encryption nodes, denoted by +.>The encryption sections are used for obtaining all encryption sections of the plaintext data; for any encryption section of plaintext data, use +_for the encryption section>And obtaining all wave crests and wave troughs of the encryption interval by using a function.
8. The format file anti-counterfeiting method according to claim 1, wherein the obtaining the optimal confidence of each encryption interval according to all peaks and troughs of the encryption interval comprises the following specific steps:
if the first text dataThe section length of the encryption section is less than or equal to +.>The section length of the encryption section is +.>The section length of the encryption section is +.>Analysis length of each encryption section; otherwise, will beThe section length of the encryption section is +. >Analysis length of each encryption section; will be->The encryption interval is analyzed for length->The total number of all peaks and valleys under the first number, will be +.>The encryption interval is analyzed for length->The total number of all peaks and valleys below is denoted as second number, the minimum of the first number and the second number is taken as +.>Analysis Length of the encryption section>The number of peaks and valleys below; then the%>The calculation expression of the optimal confidence of each encryption interval is as follows:
in the method, in the process of the invention,represents the->Optimizing confidence of each encryption interval; />Representing the first plaintext dataThe encryption interval is analyzed for length->The lower plaintext data average value; />Represents the->The encryption interval is analyzed for length->The lower plaintext data average value; />Indicate->Analysis length of each encryption section; />Represents the->Analysis Length of the encryption section>The number of peaks and valleys below; />Represents the->Of encrypted intervalsFirst->A peak value; />Represents the->The->A valley; />Represents the->The->A peak value; />Represents the- >The->A valley; />The representation takes absolute value; />An exponential function based on a natural constant; />Representing a linear normalization function.
9. The format file anti-counterfeiting method according to claim 1, wherein encrypting the plaintext data according to the optimized confidence of each encryption interval comprises the following specific steps:
acquiring a chaotic sequence of a first encryption section of plaintext data by using a logic chaotic encryption algorithm, encrypting the first encryption section by using the chaotic sequence of the first encryption section to acquire a ciphertext of the first encryption section, and taking an encryption parameter of the chaotic sequence of the first encryption section as a key of the first encryption section;
if the optimal confidence of the second encryption interval of the plaintext data is greater than or equal to a preset threshold valueIf the interval length of the second encryption interval is smaller than or equal to the interval length of the first encryption interval, encrypting the second encryption interval by using the chaotic sequence of the first encryption interval to obtain a ciphertext of the second encryption interval, taking the chaotic sequence of the first encryption interval as the chaotic sequence of the second encryption interval, and taking the encryption parameter of the chaotic sequence of the second encryption interval as the key of the second encryption interval; if the optimal confidence of the second encryption interval of the plaintext data is greater than or equal to a preset threshold +. >And the interval length of the second encryption interval is larger than that of the first encryption interval, the interval length of the first encryption interval is recorded as the first interval length, the interval of the second encryption interval with the length of the first interval length is recorded as the original interval of the second encryption interval, the interval of the second encryption interval except the original interval is recorded as the target interval, the original interval of the second encryption interval is encrypted by using the chaotic sequence of the first encryption interval to obtain the ciphertext of the original interval of the second encryption interval, and the target interval of the second encryption interval is obtained by using a logics chaotic encryption algorithmEncrypting the target section of the second encryption section by using the chaotic sequence of the target section of the second encryption section to obtain the ciphertext of the target section of the second encryption section, taking the whole ciphertext of the original section and the target section of the second encryption section as the ciphertext of the second encryption section, taking the whole chaotic sequence of the first encryption section and the chaotic sequence of the target section of the second encryption section as the chaotic sequence of the second encryption section, and taking the encryption parameters of the chaotic sequence of the second encryption section as the secret key of the second encryption section;
If the optimal confidence of the second encryption interval of the plaintext data is less than the preset threshold valueAcquiring a chaotic sequence of a second encryption section of the plaintext data by using a logic chaotic encryption algorithm, encrypting the second encryption section by using the chaotic sequence of the second encryption section to acquire a ciphertext of the second encryption section, and taking an encryption parameter of the chaotic sequence of the second encryption section as a key of the second encryption section;
if the optimal confidence of the third encryption interval of the plaintext data is greater than or equal to a preset threshold valueIf the interval length of the third encryption interval is smaller than or equal to the interval length of the second encryption interval, encrypting the third encryption interval by using the chaotic sequence of the second encryption interval to obtain a ciphertext of the third encryption interval, taking the chaotic sequence of the second encryption interval as the chaotic sequence of the third encryption interval, and taking the encryption parameter of the chaotic sequence of the third encryption interval as the key of the third encryption interval; if the optimal confidence of the third encryption interval of the plaintext data is greater than or equal to a preset threshold +.>And the third encryption section has a section length greater than that of the second encryption section, the second encryption section The interval length of the interval is recorded as a second interval length, the interval with the length of the second interval in the third encryption interval is recorded as an original interval of the third encryption interval, the interval except the original interval in the third encryption interval is recorded as a target interval, the original interval of the third encryption interval is encrypted by using the chaotic sequence of the second encryption interval to obtain the ciphertext of the original interval of the third encryption interval, the chaotic sequence of the target interval of the third encryption interval is obtained by using a logic chaotic encryption algorithm, the target interval of the third encryption interval is encrypted by using the chaotic sequence of the target interval of the third encryption interval to obtain the ciphertext of the target interval of the third encryption interval, the whole ciphertext of the original interval and the target interval of the third encryption interval is taken as the ciphertext of the third encryption interval, and the whole chaotic sequence of the second encryption interval and the chaotic sequence of the target interval of the third encryption interval is taken as the chaotic sequence of the third encryption interval;
if the optimal confidence of the third encryption interval of the plaintext data is less than the preset threshold Acquiring a chaotic sequence of a third encryption section of the plaintext data by using a logic chaotic encryption algorithm, encrypting the third encryption section by using the chaotic sequence of the third encryption section to acquire a ciphertext of the third encryption section, and taking an encryption parameter of the chaotic sequence of the third encryption section as a key of the third encryption section;
and so on, ciphertext and keys of all encryption intervals of the plaintext data are obtained.
10. A format document anti-counterfeiting system comprising a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor, when executing the computer program, performs the steps of a format document anti-counterfeiting method according to any one of claims 1 to 9.
CN202311474360.0A 2023-11-08 2023-11-08 Format file anti-fake method and system Active CN117195274B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311474360.0A CN117195274B (en) 2023-11-08 2023-11-08 Format file anti-fake method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311474360.0A CN117195274B (en) 2023-11-08 2023-11-08 Format file anti-fake method and system

Publications (2)

Publication Number Publication Date
CN117195274A true CN117195274A (en) 2023-12-08
CN117195274B CN117195274B (en) 2024-01-26

Family

ID=89005689

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311474360.0A Active CN117195274B (en) 2023-11-08 2023-11-08 Format file anti-fake method and system

Country Status (1)

Country Link
CN (1) CN117195274B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107437266A (en) * 2017-07-11 2017-12-05 大连大学 Image encryption method based on chaos system Yu DNA chain displacement model
CN107992948A (en) * 2017-10-30 2018-05-04 东北林业大学 Quantum resume image based on chaos system and DNA dynamic codings
WO2018153317A1 (en) * 2017-02-24 2018-08-30 陈伟 Chaotic map-based digital chaotic encryption method
CN108665404A (en) * 2018-05-03 2018-10-16 东北林业大学 Resume image based on quantum chaos mapping and DNA encoding
CN114615392A (en) * 2022-03-18 2022-06-10 东北大学 Image encryption method based on bit linkage
CN116527407A (en) * 2023-07-04 2023-08-01 贵州毅丹恒瑞医药科技有限公司 Encryption transmission method for fundus image
CN116669023A (en) * 2023-07-27 2023-08-29 恒辉信达技术有限公司 Data encryption method and system based on chaotic system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018153317A1 (en) * 2017-02-24 2018-08-30 陈伟 Chaotic map-based digital chaotic encryption method
CN107437266A (en) * 2017-07-11 2017-12-05 大连大学 Image encryption method based on chaos system Yu DNA chain displacement model
CN107992948A (en) * 2017-10-30 2018-05-04 东北林业大学 Quantum resume image based on chaos system and DNA dynamic codings
CN108665404A (en) * 2018-05-03 2018-10-16 东北林业大学 Resume image based on quantum chaos mapping and DNA encoding
CN114615392A (en) * 2022-03-18 2022-06-10 东北大学 Image encryption method based on bit linkage
CN116527407A (en) * 2023-07-04 2023-08-01 贵州毅丹恒瑞医药科技有限公司 Encryption transmission method for fundus image
CN116669023A (en) * 2023-07-27 2023-08-29 恒辉信达技术有限公司 Data encryption method and system based on chaotic system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DOAA TAREQ KADHIM 等: "Enhancing the Security of the Blockchain and the File Contents", 2022 3RD INFORMATION TECHNOLOGY TO ENHANCE E-LEARNING AND OTHER APPLICATION (IT-ELA) *
莫鲜 等: "文件检验中的数字水印防伪技术分析", 法制博览 *

Also Published As

Publication number Publication date
CN117195274B (en) 2024-01-26

Similar Documents

Publication Publication Date Title
Alawida et al. An image encryption scheme based on hybridizing digital chaos and finite state machine
Yan et al. Visual secret sharing based on random grids with abilities of AND and XOR lossless recovery
Keshk et al. Privacy-preserving big data analytics for cyber-physical systems
Zhu et al. Dynamic analysis and image encryption application of a sinusoidal-polynomial composite chaotic system
Chang et al. Hiding secret points amidst chaff
Wang et al. A privacy-preserving and traitor tracking content-based image retrieval scheme in cloud computing
El-Bendary FEC merged with double security approach based on encrypted image steganography for different purpose in the presence of noise and different attacks
Zhao et al. Iris template protection based on local ranking
CN114679250B (en) Image encryption algorithm based on mixed chaos and Arnold transformation
CN116226471B (en) Data storage method for homeland resource planning
CN116319110B (en) Data acquisition and management method for industrial multi-source heterogeneous time sequence data
Ahmed et al. Hash-based authentication of digital images in noisy channels
Usama et al. Chaos-based simultaneous compression and encryption for Hadoop
CN114117383A (en) Registration method, authentication method and device
Yang et al. Malicious encryption traffic detection based on NLP
Li et al. Visual image encryption scheme based on inter-intra-block scrambling and weighted diffusion
Vadlamudi et al. Robust hash generation technique for content-based image authentication using histogram
Rajput et al. A novel image encryption and authentication scheme using chaotic maps
Liu et al. High-capacity reversible data hiding in encrypted images based on adaptive arithmetic coding and static Huffman coding
CN117195274B (en) Format file anti-fake method and system
Liu et al. Machine learning-based similarity attacks for chaos-based cryptosystems
CN116861485A (en) Student information privacy protection method based on deep learning fusion
Tharakan et al. Security enhancement and monitoring for data sensing networks using a novel asymmetric mirror-key data encryption method
Ghaemi et al. Simple, robust and secure data hiding based on CRT feature extraction and closed-loop chaotic encryption system
Gu et al. Secure codes with list decoding

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant