CN115330584A - Anti-copying encryption method for electronic seal - Google Patents
Anti-copying encryption method for electronic seal Download PDFInfo
- Publication number
- CN115330584A CN115330584A CN202211264135.XA CN202211264135A CN115330584A CN 115330584 A CN115330584 A CN 115330584A CN 202211264135 A CN202211264135 A CN 202211264135A CN 115330584 A CN115330584 A CN 115330584A
- Authority
- CN
- China
- Prior art keywords
- column
- electronic seal
- noise
- random
- elements
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 81
- 239000011159 matrix material Substances 0.000 claims abstract description 109
- 238000012216 screening Methods 0.000 claims abstract description 32
- 238000007792 addition Methods 0.000 claims description 28
- 230000008569 process Effects 0.000 description 8
- 238000004364 calculation method Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000005192 partition Methods 0.000 description 3
- 238000007781 pre-processing Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000013139 quantization Methods 0.000 description 2
- 101100460704 Aspergillus sp. (strain MF297-2) notI gene Proteins 0.000 description 1
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000002238 attenuated effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 229910052799 carbon Inorganic materials 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000005336 cracking Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/0021—Image watermarking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/16—Program or content traceability, e.g. by watermarking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Multimedia (AREA)
- Technology Law (AREA)
- Collating Specific Patterns (AREA)
- Image Processing (AREA)
Abstract
The invention relates to the field of data encryption, in particular to an electronic seal anti-copying encryption method, which comprises the steps of generating a time zone and a random angle of an electronic seal based on time, rotating a scanning straight line anticlockwise according to the scanning straight line of the random angle, and generating a random gray matrix according to a gray value of a pixel point covered by a line segment rotated each time; determining all non-effective information columns in the random gray matrix according to the difference value of the gray mean value of each column of the random gray matrix and the gray mean value of the adjacent column, and screening effective elements in each column; the noise distribution weight of each column is obtained according to the number of effective elements in each column, the noise addition density of each column is obtained according to the noise distribution weight and the number of the elements, the noise distribution amount of each column is obtained, noise is added, a noise encryption random gray matrix is obtained, the anti-copy electronic seal image is obtained according to the position of each row of elements of the noise encryption random gray matrix, the influence of noise encryption on effective information is reduced, and the safety is improved.
Description
Technical Field
The application relates to the field of data encryption, in particular to an electronic seal anti-copying encryption method.
Background
With the development of science and technology, computer network technology is used more and more frequently, and is applied more and more widely in the field of electronic commerce, such as electronic documents in the field of electronic commerce. In order to ensure the authority and the credit of the electronic document, the document needs to be authenticated by the electronic seal, and the electronic seal requires that the seal image must be derived from the physical seal information, so that the safety of the seal information is ensured.
The security of electronic seals is a concern, and if important electronic seals are copied and abused, property loss and credibility reduction of the unit and institution to which the electronic seals belong are easily caused.
The existing anti-copying method of the electronic seal carries out noise encryption on the seal according to the signing time in a file containing the seal, but the signing time is year, month and day, and is only accurate to day, if the electronic seal is copied in the same day, whether the seal encrypted according to the signing time is copied cannot be judged, the encryption method cannot achieve the anti-copying effect, the safety is insufficient, meanwhile, because noise is randomly generated when noise is encrypted, an important area of the electronic seal can be generated, effective information in the electronic seal is shielded, and interference is generated on the effective information.
Disclosure of Invention
Aiming at the problems that in the prior art, when the signing time in a file containing a seal is used for carrying out noise encryption on the seal, whether the seal encrypted in the same day is copied cannot be judged according to the signing time, the anti-copying effect cannot be achieved, the safety is not enough, and random noise interferes with effective information, the invention provides an electronic seal anti-copying encryption method which comprises the following steps:
acquiring an electronic seal image;
dividing an electronic seal image into a plurality of sectors with the same angle;
obtaining a corresponding sector according to the service time of the electronic seal, and generating a random angle in the sector;
taking the center of an electronic seal image as a starting point, making a scanning straight line along a random angle direction, rotating the scanning straight line anticlockwise, and generating a random gray matrix according to the gray value of each pixel point covered on the scanning straight line after each rotation;
determining all non-effective information columns in the random gray matrix by using the difference value of the gray mean value of each column of the random gray matrix and the gray mean value of the adjacent column;
obtaining an effective information screening interval according to the maximum element and the minimum element in all the non-effective information columns, and screening effective elements in each column in the random gray matrix by using the effective information screening interval;
obtaining the noise distribution weight of each column according to the number of effective elements in each column in the random gray matrix, determining the noise distribution amount of each column according to the noise distribution weight of each column, and adding noise to each column of the random gray matrix according to the noise distribution amount of each column;
and obtaining the anti-copying electronic seal image by utilizing the position of each row of elements of the random gray matrix added with the noise.
The method for dividing the electronic seal image into a plurality of sectors with the same angle comprises the following steps:
performing circular fitting on the edge of the electronic seal;
obtaining the center of a circle of the electronic seal by a four-point method;
the electronic seal is divided into 24 sectors by taking the positive direction of the horizontal direction passing through the center of a circle as a starting position and dividing every 15 degrees.
The random angle is determined by the service time of the electronic seal.
In the random gray matrix generated according to the gray value of each pixel point covered on the scanning straight line after each rotation:
the line number is the number of times of rotation, namely the length of the edge of the electronic seal, and is represented by pixel points;
the column number is the number of pixel points covered on the scanning straight line, namely the radius length of the electronic seal;
each element in the random gray matrix is the gray value of each pixel point from the center of a circle to the edge on a scanning line when rotating every time.
The method for determining all the non-effective information columns in the random gray matrix by using the difference value of the gray mean value of each column of the random gray matrix and the gray mean value of the adjacent column comprises the following steps:
calculating the difference value of the element mean value of each column and the element mean value of the previous adjacent column from the last column of the random gray matrix;
if the difference is smaller than the difference threshold, the previous adjacent is a non-valid information column.
The method for obtaining the effective information screening interval according to the maximum element and the minimum element in all the non-effective information columns and screening the effective elements in each column in the random gray matrix by using the effective information screening interval comprises the following steps:
acquiring a maximum element and a minimum element in all the non-effective information columns;
taking an interval with the lower limit of the minimum element and the upper limit of the maximum element as an effective information screening interval;
and screening out the elements in the effective information screening interval from the elements in the random gray matrix as effective elements.
The method for obtaining the noise distribution weight of each column according to the number of effective elements in each column in the random gray matrix comprises the following steps:
base on e, 2And the column number of each columnThe product of (A) and (B) is an exponent to obtain an exponential power;
and taking the product of the reciprocal of the exponential power and the number of effective elements of each column as the noise distribution weight of each column.
The method for determining the noise distribution amount of each column according to the noise distribution weight of each column comprises the following steps:
and obtaining the noise addition density of each column according to the noise distribution weight of each column and the element number of each column, wherein the specific method comprises the following steps:
acquiring the maximum weight and the minimum weight in the noise distribution weights of all columns;
normalizing the noise distribution weight of each column by using the maximum weight and the minimum weight, and then taking a reverse value;
subtracting the difference value of the number of effective elements in each column from the total number of elements in each column, dividing the difference value by the total number of columns of the random gray matrix, multiplying the obtained quotient value by the inverse value, and taking the obtained product as the noise addition density of each column;
obtaining the noise distribution quantity of each column of the random gray matrix according to the noise addition density of each column, wherein the specific method comprises the following steps:
setting the total number of noise additions;
the total number of noise additions is multiplied by the noise addition density of each column, and the obtained value is used as the noise allocation amount of each column.
The method for adding the noise to each column of the random gray matrix according to the noise distribution quantity of each column comprises the following steps:
the noise allocation amount of each column is added to the position of the non-effective element of each column.
The method for obtaining the anti-copy electronic seal image by using the position of each row of elements of the random gray matrix after noise is added comprises the following steps:
and selecting any row of elements in the random gray matrix after the noise is added as a basic row, taking the first element in the row as a circle center pixel point of the anti-copying electronic seal, taking the last element in the row as an edge pixel point of the anti-copying electronic seal, and taking other pixel points in the row as pixel points between the circle center and the edge to obtain the anti-copying electronic seal.
The beneficial effects of the invention are:
(1) Acquiring an electronic seal image, dividing the electronic seal image into a plurality of sectors with the same angle, acquiring a corresponding sector according to the service time of the electronic seal, and generating a random angle in the sector; the method is based on random disassembly of service time, random angle selection is different, generated random matrixes are different, the random matrixes are shared, the security is higher when the electronic seal is subsequently encrypted, the time is different when the electronic seal is disassembled each time, the affiliated time zone is also different, the random matrixes disassembled when the electronic seal is disassembled at different random angles are also different, even if the electronic seal is violently disassembled, the encryption time of the electronic seal can be contrasted according to the trace left after the disassembling, and thus the tracing is carried out;
(2) Taking the center of an electronic seal image as a starting point, making a rotating straight line along a random angle, rotating the rotating straight line anticlockwise, generating a random gray matrix according to the gray value of each pixel point covered on each scanning straight line, and determining all non-effective information columns in the random gray matrix according to the difference value of the gray average value of each column of the random gray matrix and the gray average value of the adjacent column; the method determines the non-effective information column by utilizing the gray values of the adjacent column elements in the gray difference matrix, namely, the gray levels of other pixel points and the seal edge pixel points are compared to determine the non-effective information column, and the method is simple and effective;
(3) Obtaining effective information screening intervals according to the maximum elements and the minimum elements in all the non-effective information columns, and screening effective elements in each column in the random gray matrix by using the effective information screening intervals; obtaining noise distribution weight of each column according to the number of effective elements, and obtaining noise addition density according to the distribution weight and the number of the elements; obtaining a noise distribution amount according to the noise addition density, and adding noise to each column according to the noise distribution amount to obtain a noise encryption random gray matrix; the method adds the noise quantity according to the effective information of each column, reduces the interference influence on the effective information of the electronic seal, and obtains the accurate encryption anti-copy seal.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of an electronic seal anti-copy encryption method of the present invention;
FIG. 2 is a schematic view of an electronic seal in an anti-copy encryption method for electronic seals according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the anti-copy encryption method for the electronic seal, as shown in fig. 1, comprises the following steps:
the method comprises the following steps: acquiring an electronic seal image; dividing an electronic seal image into a plurality of sectors with the same angle; obtaining a corresponding sector according to the service time of the electronic seal, and generating a random angle in the sector;
the purpose of this step is to preprocess the image of the electronic seal and partition it based on time, and to generate a random angle using the age of the electronic seal for subsequent analysis.
Acquiring an electronic seal image; the method for dividing the electronic seal image into a plurality of sectors with the same angle comprises the following steps:
(1) Image preprocessing:
the composition of the electronic seal is extremely simple and can be divided into two parts, a colored position and a colorless position, as shown in figure 2,
the colored part can be divided into two parts, namely a carrying part of effective information, namely the serial number of the seal and the unit of the electronic seal, which is generally text information, and a frame of the electronic seal. The colorless position is a blank part on the electronic seal, and no colored pixel point exists;
the effective information which is not shielded by the electronic seal is an effective information carrying part in the colored position which is not shielded, so that the subsequent addition of noise point watermarks mainly aims at the ineffective information carrying part, the image of the electronic seal needs to be preprocessed, and the specific preprocessing mode is as follows: firstly, color inversion is carried out on the electronic seal, then graying is carried out on the electronic seal after color inversion, in the preprocessing process, the purpose of color inversion is to enable the position needing to be processed subsequently to be more prominent, and the purpose of the graying process is that the electronic seal is a color image, so that simultaneous processing of each channel is required to be carried out when the electronic seal is processed, but the difference of the image of each channel of the electronic seal is not large, and the cost of processing and calculating resources of each channel does not accord with the actual benefit, so that graying processing is carried out on the electronic seal.
(2) Performing circular fitting on the edge of the electronic seal; obtaining the circle center of the electronic seal by a four-point method; taking the positive direction of the horizontal direction passing through the center of a circle as the initial position, dividing the electronic seal once every 15 degrees, dividing the electronic seal into 24 sectors corresponding to 24 time zones, and dividing each time zone into 60 small sectors corresponding to each minute (corresponding to the seal use time, further dividing the time zones, and accurately dividing the time zones into seconds), wherein the sectors and the time zones in the embodiment are in one-to-one correspondence;
the method comprises the following specific steps: firstly, edge extraction is carried out on the electronic seal by utilizing the prior art, then all edge pixel points are fitted to obtain a circular edge fitting curve of the electronic seal, then the center of a circle of the circular edge fitting curve of the electronic seal is positioned by utilizing a four-point method, and the position of the center of the circle of the electronic seal can be obtained;
secondly, angle division is carried out on the whole electronic seal by using the position of the circle center, specifically, the positive direction of the horizontal direction passing through the circle center is taken as an initial position, then division is carried out once at intervals of 15 degrees, the whole electronic seal can be divided into 24 time blocks (corresponding to 24 hours each day), wherein the first block of the initial position along the counterclockwise direction is defined as 0 point each day, and the rest are accumulated and distributed according to the counterclockwise direction, so that each time block corresponding to 24 hours can be obtained; and the time corresponding to the first time partition with the starting position along the counterclockwise direction is 0 point of each day, and the rest time partitions are subjected to accumulation distribution according to the counterclockwise direction.
The method for generating the random angle in the sector comprises the following steps:
the method comprises the following steps of generating a random angle by using the service time of the electronic seal, wherein the specific process comprises the following steps:
firstly, the service time of the electronic seal is searched, and the time of year, month and day, for example: 9/2022, 16/17;
then, time zone distribution is carried out on the electronic seal according to the seal using time, namely a random angle is determined according to the using time of the electronic seal, and the anticlockwise direction is taken as the positive direction;
the corresponding time of the using time of the electronic seal in the time zone is accurate to minutes, for example, 17 hours and 20 minutes, and the random angle corresponding to 17 hours and 20 minutes is the angle between 17 hours and 20 minutes and 17 hours at the corresponding position in the time zone;
by the method, the corresponding random angles when the electronic seal is used in different time periods can be obtained, and the random angles used by the seal are used as the secret key for subsequent decryption.
The method comprises the steps of equally dividing an image of the electronic seal by utilizing 24 hours every day, determining the random angle of the electronic seal according to random numbers by utilizing specific dates, and providing a basis for disassembling a random matrix of the electronic seal by utilizing random calibration in the follow-up process;
the significance of the step is as follows: the encryption method of the noise point watermark of the conventional electronic seal is to directly carry out noise point watermark encryption on the image of the electronic seal, the encryption method has traces and can be traced, and the tracing cannot be carried out after brute force cracking.
Step two: taking the center of an electronic seal image as a starting point, making a scanning straight line along a random angle direction, rotating the scanning straight line anticlockwise, and generating a random gray matrix according to the gray value of each pixel point covered on the scanning straight line after each rotation;
the method for generating the random gray matrix according to the gray value of each pixel point covered on each scanning line comprises the following steps:
(1) Take an electronic seal as an example, take its corresponding random angle asTaking a circle center pixel point of the electronic seal as a base, and making a scanning line segment along a random angle direction, wherein the width of the scanning line segment is 1 pixel point width, and the length of the scanning line segment is the radius of the electronic seal(the number of circle center pixel apart from edge pixel), then rotate with this scanning straight line along anticlockwise with initial angle, carry out the disassembling of electronic seal image, rotate the step length at every turn and be an edge pixel, carry out pivoted in-process to the electronic seal image at scanning straight line, it all can cover a plurality of pixels in the electronic seal image at every turn, scanning straight line is at the scanning straight lineIn the process of rotation, a plurality of pixel points can be covered, and the plurality of pixel points are selectedThe gray value of each pixel point is used as an element of each row of the random matrix;
(2) The arrangement mode of each element in the random matrix is that the distribution of each row of elements is from the gray value of a pixel point which is the center of a circle to the gray value of an edge pixel point from left to right, the distribution of each column of elements is from top to bottom and is a random angle respectively until each time when the random matrix rotates anticlockwiseThe gray value of each pixel point.
By using the method, the random gray matrix of the electronic seal in use at the moment can be obtained, and the size of the matrix isWhereinWalking (perimeter of electronic seal (number of electronic seal edge pixel points))The number of lines is the number of rotation times, namely the length of the edge of the electronic seal, and is expressed by pixel points; the column number is the number of pixel points covered on the scanning straight line, namely the radius length of the electronic seal; each element in the random gray matrix is the gray value of each pixel point from the center of a circle to the edge on a scanning line when rotating every time.
Step three: determining all non-effective information columns in the random gray matrix by using the difference value of the gray mean value of each column of the random gray matrix and the gray mean value of the adjacent column; obtaining effective information screening intervals according to the maximum elements and the minimum elements in all the non-effective information columns, and screening effective elements in each column in the random gray matrix by using the effective information screening intervals;
the purpose of this step is to determine the valid information position in the random gray matrix using the difference in the mean value of the gray levels of each column in the random gray matrix.
The method for determining all the non-effective information columns in the random gray-scale matrix according to the difference value of the gray-scale mean value of each column of the random gray-scale matrix and the gray-scale mean value of the adjacent column comprises the following steps:
(1) Calculating the difference value of the element mean value of each column and the element mean value of the previous adjacent column from the last column of the random gray matrix;
the reason for calculating the difference from the last column is: all elements in the random matrix can be classified into three categories: valid information, invalid information and invalid information: the sizes of the elements corresponding to the effective information and the non-effective information are close, and the detailed expression is as follows:
the circle at the extreme edge in the electronic seal is invalid information, wherein the red text information and the pattern are valid information, the middle white area is invalid information, and the colors of the invalid information and the valid information are the same due to inkpad, so that the invalid information and the valid information are close to each other;
but after the matrix is disassembled, the distribution position of the effective information is changed, and the non-effective information is in the second of the random matrixColumn and the firstAdjacent columns of columns, after disassembly, the firstThe row is a circle of red area of the edge of the electronic seal, but the specific circle of red area is unknown, so that the distribution position of the effective information is confirmed through the characteristics of the ineffective information in the random matrix;
the specific method comprises the following steps:
in the formula:representing the first in a random matrixAverage size of elements of the column, whereinIs the maximum number of rows in the random matrix, c is row c,is the maximum number of columns in the random matrix,representing the first in a random matrixGo to the firstElements of a column;
the meaning of the formula is: in a random matrix, we can know the first one explicitlyThe elements in the column are invalid information (corresponding to the real object), so that a certain threshold interval is set with the average value of the elements in the R-th column as a standard, and the first column is subjected to the second detectionSearching column-direction elements near the column, locating the non-effective information in the adjacent column after the disassembly to obtain the column of the complete non-effective information, namely all the non-effective information, and searching the effective information according to the range of the element corresponding to the non-effective information, namely performing the second step in the manner described aboveAverage value of elements of a columnCalculating, then usingAndperforming difference valueCalculation, the calculation process is as follows:
the meaning of the formula is as follows:andare respectively the firstColumn element andaverage of column elements, i.e. representing the secondColumn element andapproximate range of size of column elements, ifIf the column elements are also invalid information, the difference value between the column elements and the invalid information is not large, and if the column elements are not valid information, the difference value between the column elements and the invalid information is not largeIf the column element is invalid information, the difference value between the column element and the invalid information is very large (color contrast);
so calculate the firstColumn element and the firstThe difference value of the average value of the column elements is used for judging the secondWhether a column element is non-valid information;
(2) If the difference is smaller than the difference threshold, the previous neighbor is a non-valid information column, specifically:
setting a judgment thresholdFor the difference value less than the judgment threshold valueIs considered as the firstElements of a column belong to non-valid information, whereinHas an empirical value of;
By using the above method, it is possible to judge the column in which all the invalid information is present (item II)Column judgment ofColumn, firstColumn judgment ofRow, stopping judgment until the difference value does not meet the judgment threshold value), and obtaining the total valueA list of non-valid information.
The method for screening the effective elements in each column in the random gray matrix by using the effective information screening interval comprises the following steps of:
acquiring a maximum element and a minimum element in all the non-effective information columns; taking an interval with the lower limit of the minimum element and the upper limit of the maximum element as an effective information screening interval; screening out the elements in the effective information screening interval from the elements in the random gray matrix, wherein the effective elements are as follows:
first, toMaximizing all non-valid information elements of a columnMinimum value ofIn whichA collection of elements representing all non-valid information) and then utilizedMinimum value ofForm effective information screening interval;
Then, element screening is carried out on the whole random matrix, and all the positions in the random matrix are screened outIn one element isAll negatives within the intervalThe elements in the table are the elements corresponding to the effective information.
It should be noted that the reason why the effective information elements are screened out according to the effective information screening interval obtained from the maximum element and the minimum element in all the non-effective information columns is as follows:
the electronic seal is red and colorless in overall composition, the effective information and the ineffective information are red, the effective information can be determined by utilizing the ineffective information, namely, the range of the gray value corresponding to the red pixel point in the electronic seal is judged by the gray value converted by the red pixel point of the ineffective information, and the effective pixel point is judged by utilizing the range.
Step four: obtaining the noise distribution weight of each column according to the number of effective elements in each column in the random gray matrix, determining the noise distribution amount of each column according to the noise distribution weight of each column, and adding noise to each column of the random gray matrix according to the noise distribution amount of each column;
the purpose of the step is to obtain noise distribution weight according to the distribution difference of effective information elements in the random gray matrix, obtain the noise addition quantity of each column by combining the noise quantity and add the noise;
the method for obtaining the noise distribution weight of each column according to the number of the effective elements in each column in the random gray matrix comprises the following steps:
(1) Base on e, 2The product of the column number and the column number of each column is an exponent to obtain an exponential power;
(2) The product of the reciprocal of the exponential power and the number of effective elements in each column is used as the noise distribution weight of each column;
In the formula, the content of the active carbon is shown in the specification,a weight is assigned to the r-th column noise,is the number of effective elements in the r-th row, e is a natural constant, r is the serial number of the r-th row,is the circumferential ratio;
because, the weight of the noise distribution area is that the round electronic seal is decomposed into a rectangular random matrix, and the angle difference causes the random matrixThe method comprises the steps of randomly adding noise watermarks near effective information in a machine matrix, then combining the random matrixes to obtain an electronic seal after noise addition, wherein the electronic seal is easy to cause the shielding of the effective information due to angle change, so that the noise addition near the effective information is adjusted by calculating a noise distribution area weight, the noise distribution area weight is based on each row, the noise distribution area weight of all the effective information in each row is the same, and the noise distribution area weight of all the effective information in each row is the sameColumn as an example (The noise distribution region has a weight of,Is as followsThe first in the random matrixColumn number of column.
The formula has the meaning: in the first placeIn the calculation of the noise region weights for a column,the larger the description isThe more elements corresponding to the valid information in the column, the less noise should be added when noise addition is performed near the elements, so that the valid information is not shielded, and the column sequence numberThe larger the distance between the column in the random matrix and the center pixel point of the electronic seal is, the farther the distance between the column in the random matrix and the center pixel point of the electronic seal is, theThe less the repeated data in the image of the electronic seal corresponding to the medium element, i.e. the more the number of the pixel points in the image of the electronic seal corresponding to the effective information element, and then the more the effective information element is utilizedIs attenuated so that when it is firstThe more elements corresponding to the valid information of the column (Larger) of the column numbersThe larger the number of the effective information pixel points in the electronic seal corresponding to the effective information in the row is, the larger the noise distribution area weight is, the less the effective information pixel points in the electronic seal are added when random noise is added to the given row in the follow-up process, and therefore the possibility that the random noise blocks the effective information pixel points in the electronic seal is reduced.
The formula has the following effects: in the random matrix, because of the unique disassembling mode, when the sequence number of the term is smaller, the term is closer to the center position of the electronic seal, namely, the pixel point of the center position of the electronic seal is repeated for multiple times, but the term is essentially represented as a few pixel points at the center of the circle;
when the column numberWhen the current column isAn elementWhether or notIs any value ofThe values are always equal, and because the values are represented by the center-of-circle pixels, the calculation of the weight of the noise distribution area needs to be carried out on each row according to the rule;
when the weight of the noise distribution area is larger, the noise distribution area indicates that the quantity of noise which can be added in the vicinity of the column should be smaller, and vice versa.
All can be obtained by the above methodThe noise distribution area weight of the row, so far, all the noise area weights are calculated;
the method for determining the noise distribution quantity of each column according to the noise distribution weight of each column comprises the following steps:
(1) Obtaining the noise addition density of each column according to the noise distribution weight of each column and the element number of each column, wherein the method comprises the following steps:
Normalizing the noise distribution weight of each column by using the maximum weight and the minimum weight, and taking a reverse value:
subtracting the difference value of the number of the effective elements in each column from the total number of the elements in each column, dividing the difference value by the total column number of the random gray matrix, multiplying the obtained quotient value by the inverse value, and taking the obtained product as the noise addition density of each column, wherein the method specifically comprises the following steps:
in random gray matrixBy way of example, the noise addition density thereofComprises the following steps:
in the formula:is shown asThe noise of the column adds to the density,representing the number of elements of each column in the random matrix,is shown asThe number of elements corresponding to the valid information in the column,the representation is allThe total set of noise distribution region weights for a column,represents the largest noise distribution region weight among all the noise distribution region weights,represents the smallest noise distribution region weight among all the noise distribution region weights,is shown asThe noise regions of the columns distribute the weights.
The formula has the meaning: first of all utilize、Andcalculate the firstThe ratio of invalid information to non-valid information in the column data to the total elementsThen to the firstNormalizing the noise distribution area weight values corresponding to the columns, namely:
then to the normalizedNegating the noise distribution area weight values corresponding to the columns:
after negation, the firstThe larger the noise distribution area weight corresponding to a column is, the smaller the weight corresponding to the noise which should be added in the column is. The overall formula has the logic ofThe more elements corresponding to the effective information of the column, the greater the weight of the noise distribution area, and the corresponding noise addition densityThe smaller the density, and the larger the density on the contrary;
the noise addition density of all columns can be obtained by the method.
(2) Obtaining the noise distribution quantity of each column of the random gray matrix according to the noise addition density of each column, wherein the method comprises the following steps:
setting the total number of noise additions; firstly to allNoise adding density quantization valueCarrying out normalization to obtainNormalized noise addition density quantization valueThen, the total noise addition amount is obtained, that is, the number of noise added as a whole(according to the user making the autonomous selectionThe larger the size, the more noise on the electronic seal, and vice versa); multiplying the total number of the added noises by the noise adding density of each column to obtain a value as the noise distribution amount of each column; to a first orderBy way of example, the number of noise allocationsComprises the following steps:
(3) The method for adding noise to each column according to the noise distribution quantity to obtain the noise encryption random gray matrix comprises the following steps:
and adding the noise distribution quantity of each column to the position of the non-effective element of each column to obtain the noise encryption random gray matrix.
Step five: and obtaining the anti-copying electronic seal image by utilizing the position of each row of elements of the random gray matrix added with the noise.
The purpose of the step is to obtain the anti-copy electronic seal by encrypting the random gray matrix by using the noise.
The method for obtaining the anti-copy electronic seal image according to the position of each row of elements of the noise encryption random gray matrix comprises the following steps:
selecting any row of elements in the encrypted random matrix, such as a c-th row, as a basic row, and taking a first element in the row as a circle center pixel point of the anti-copying electronic seal; and restoring the positions of all the line elements according to the positions of all the pixels in the inverse process of the rotation of the middle scanning straight line (combining the pixel points if the positions of the pixel points are repeated) to obtain the anti-copying electronic seal image.
Further explaining how to perform verification of the anti-copy electronic seal:
acquiring a file containing an anti-copy electronic seal, and extracting an anti-copy electronic seal image in the file as an image A;
obtaining a noise encryption random gray matrix of the anti-copying electronic seal by taking the signing time of a file containing the anti-copying electronic seal as an angle in a sector corresponding to the using time of the electronic seal, and obtaining an anti-copying electronic seal image as an image B according to the noise encryption random gray matrix;
comparing the noise distribution conditions in the image A and the image B, if the noise distribution is consistent, the anti-copying electronic seal contained in the file is a real seal, otherwise, the anti-copying electronic seal is a copied seal;
the method essentially utilizes noise to encrypt, even if the seal is copied, the generated noise encryption gray matrixes are different due to different random angles generated at each time, whether the electronic seal is copied can be judged,
further, if the seal is found to be copied, time tracing of the seal leakage event can be performed according to encryption information contained in the copied electronic seal image, namely, a noise encryption gray matrix in the copied electronic seal image is matched and compared with a noise gray encryption matrix obtained at each angle of each sector in the electronic seal image, if matching is successful, the corresponding sector when matching is successful is obtained, seal leakage time is obtained, and subsequent tracing can be performed.
It should be noted that, the invention firstly generates a random angle for the electronic seal according to the generation time of the electronic seal, then disassembles the random angle to obtain a random matrix, then determines the effective information by using the characteristics of the ineffective information, then quantizes the noise distribution density of each column in the random matrix according to the effective information and the noise area distribution weight, and finally encrypts the noise of the random matrix according to the noise distribution density of each column.
The purpose of the step is as follows: when the existing electronic seal is subjected to copy-proof encryption by utilizing a noisy point watermark, because noisy points are randomly generated, effective information in the electronic seal can be shielded with a higher probability, so that the effective information of the electronic seal cannot be identified, and authenticity judgment is influenced.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (10)
1. An electronic seal anti-copy encryption method is characterized by comprising the following steps:
acquiring an electronic seal image;
dividing an electronic seal image into a plurality of sectors with the same angle;
obtaining a corresponding sector according to the service time of the electronic seal, and generating a random angle in the sector;
taking the center of an electronic seal image as a starting point, making a scanning straight line along a random angle direction, rotating the scanning straight line anticlockwise, and generating a random gray matrix according to the gray value of each pixel point covered on the scanning straight line after each rotation;
determining all non-effective information columns in the random gray matrix by using the difference value of the gray mean value of each column of the random gray matrix and the gray mean value of the adjacent column;
obtaining effective information screening intervals according to the maximum elements and the minimum elements in all the non-effective information columns, and screening effective elements in each column in the random gray matrix by using the effective information screening intervals;
obtaining the noise distribution weight of each column according to the number of effective elements in each column in the random gray matrix, determining the noise distribution amount of each column according to the noise distribution weight of each column, and adding noise to each column of the random gray matrix according to the noise distribution amount of each column;
and obtaining the anti-copying electronic seal image by utilizing the position of each row of elements of the random gray matrix added with the noise.
2. The electronic seal anti-copy encryption method according to claim 1, wherein the method of dividing the electronic seal image into a plurality of sectors with the same angle comprises:
performing circular fitting on the edge of the electronic seal;
obtaining the circle center of the electronic seal by a four-point method;
the electronic seal is divided into 24 sectors at intervals of 15 degrees by taking the positive direction of the horizontal direction passing through the center of the circle as the initial position.
3. The method according to claim 1, wherein said random angle is determined by a time of use of the electronic seal.
4. The electronic seal anti-copy encryption method according to claim 1, wherein in the random gray matrix generated according to the gray value of each pixel point covered on the scanning straight line after each rotation:
the line number is the number of times of rotation, namely the length of the edge of the electronic seal, and is represented by pixel points;
the column number is the number of pixel points covered on the scanning straight line, namely the radius length of the electronic seal;
each element in the random gray matrix is the gray value of each pixel point from the center of a circle to the edge on a scanning line when rotating every time.
5. The electronic seal anti-copy encryption method according to claim 1, wherein the method for determining all the non-valid information columns in the random gray matrix by using the difference between the gray average value of each column of the random gray matrix and the gray average value of the adjacent column comprises the following steps:
calculating the difference value of the element mean value of each column and the element mean value of the previous adjacent column from the last column of the random gray matrix;
if the difference is smaller than the difference threshold, the previous adjacent is a non-valid information column.
6. The electronic seal anti-copy encryption method according to claim 1, wherein the method for obtaining the effective information screening interval according to the maximum element and the minimum element in all the non-effective information columns and using the effective information screening interval to screen out the effective elements in each column of the random gray matrix comprises the steps of:
acquiring a maximum element and a minimum element in all the non-effective information columns;
taking an interval with the lower limit as a minimum element and the upper limit as a maximum element as an effective information screening interval;
and screening out the elements in the effective information screening interval from the elements in the random gray matrix as effective elements.
7. The electronic seal anti-copy encryption method according to claim 1, wherein the method for obtaining the noise distribution weight of each column according to the number of effective elements in each column in the random gray matrix comprises:
base on e, 2The product of the column number and the column number of each column is an exponent to obtain an exponential power;
the product of the reciprocal of the exponential power and the number of effective elements in each column is used as a noise assignment weight for each column.
8. The electronic seal anti-copy encryption method according to claim 1, wherein the method for determining the noise distribution amount of each column according to the noise distribution weight of each column comprises:
and obtaining the noise addition density of each column according to the noise distribution weight of each column and the element number of each column, wherein the specific method comprises the following steps:
acquiring the maximum weight and the minimum weight in the noise distribution weights of all columns;
normalizing the noise distribution weight of each column by using the maximum weight and the minimum weight, and then taking a reverse value;
subtracting the difference value of the number of the effective elements in each row from the total number of the elements in each row, dividing the difference value by the total row number of the random gray matrix, multiplying the obtained quotient value by the inverse value, and taking the obtained product as the noise addition density of each row;
obtaining the noise distribution amount of each column of the random gray matrix according to the noise addition density of each column, wherein the specific method comprises the following steps:
setting the total number of noise additions;
the total number of noise additions is multiplied by the noise addition density of each column, and the obtained value is used as the noise allocation amount of each column.
9. The electronic seal anti-copy encryption method according to claim 1, wherein the method of adding noise to each column of the random gray matrix according to the noise distribution amount of each column comprises:
the noise allocation amount of each column is added to the position of the non-effective element of each column.
10. The electronic seal anti-copy encryption method according to claim 1, wherein the method for obtaining the anti-copy electronic seal image by using the position of each row element of the random gray matrix after adding noise comprises the following steps:
and selecting any row of elements in the random gray matrix after the noise is added as a basic row, taking the first element in the row as a circle center pixel point of the anti-copying electronic seal, taking the last element in the row as an edge pixel point of the anti-copying electronic seal, and taking other pixel points in the row as pixel points between the circle center and the edge to obtain the anti-copying electronic seal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211264135.XA CN115330584B (en) | 2022-10-17 | 2022-10-17 | Anti-copying encryption method for electronic seal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211264135.XA CN115330584B (en) | 2022-10-17 | 2022-10-17 | Anti-copying encryption method for electronic seal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115330584A true CN115330584A (en) | 2022-11-11 |
CN115330584B CN115330584B (en) | 2023-01-31 |
Family
ID=83915417
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211264135.XA Active CN115330584B (en) | 2022-10-17 | 2022-10-17 | Anti-copying encryption method for electronic seal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115330584B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116091017A (en) * | 2023-04-10 | 2023-05-09 | 四川省肿瘤医院 | System and method for sending out medical records mail |
CN116776301A (en) * | 2023-08-18 | 2023-09-19 | 北京点聚信息技术有限公司 | Quick traceability management method for electronic seal |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1725244A (en) * | 2005-07-19 | 2006-01-25 | 电子科技大学 | Generating and vertification method for electronic seal based on vulnerable water mark |
CN106650874A (en) * | 2016-12-30 | 2017-05-10 | 河南工业大学 | Display method and device for paper fiber characteristics, and anti-counterfeiting method for paper fiber characteristics |
WO2020125839A1 (en) * | 2018-12-18 | 2020-06-25 | GRID INVENT gGmbH | Electronic element and electrically controlled display element |
CN111784554A (en) * | 2020-06-15 | 2020-10-16 | 江苏诚印科技有限公司 | Seal embedding information processing method, digital watermark extraction method and seal processing system |
FR3103929A1 (en) * | 2019-11-28 | 2021-06-04 | Advanced Track And Trace | METHOD AND DEVICE FOR SINGULARIZING AN OBJECT AND PROCEDURE AND DEVICE FOR AUTHENTICATION OF AN OBJECT |
CN113469888A (en) * | 2021-07-08 | 2021-10-01 | 江西金格科技股份有限公司 | Method and device for correcting inclination angle of circular electronic seal |
CN113538498A (en) * | 2021-08-02 | 2021-10-22 | 傲雄在线(重庆)科技有限公司 | Seal image segmentation method based on local binarization, electronic device and readable storage medium |
CN114419635A (en) * | 2022-03-30 | 2022-04-29 | 北京点聚信息技术有限公司 | Electronic seal vector diagram identification method based on graphic identification |
-
2022
- 2022-10-17 CN CN202211264135.XA patent/CN115330584B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1725244A (en) * | 2005-07-19 | 2006-01-25 | 电子科技大学 | Generating and vertification method for electronic seal based on vulnerable water mark |
CN106650874A (en) * | 2016-12-30 | 2017-05-10 | 河南工业大学 | Display method and device for paper fiber characteristics, and anti-counterfeiting method for paper fiber characteristics |
WO2020125839A1 (en) * | 2018-12-18 | 2020-06-25 | GRID INVENT gGmbH | Electronic element and electrically controlled display element |
FR3103929A1 (en) * | 2019-11-28 | 2021-06-04 | Advanced Track And Trace | METHOD AND DEVICE FOR SINGULARIZING AN OBJECT AND PROCEDURE AND DEVICE FOR AUTHENTICATION OF AN OBJECT |
CN111784554A (en) * | 2020-06-15 | 2020-10-16 | 江苏诚印科技有限公司 | Seal embedding information processing method, digital watermark extraction method and seal processing system |
CN113469888A (en) * | 2021-07-08 | 2021-10-01 | 江西金格科技股份有限公司 | Method and device for correcting inclination angle of circular electronic seal |
CN113538498A (en) * | 2021-08-02 | 2021-10-22 | 傲雄在线(重庆)科技有限公司 | Seal image segmentation method based on local binarization, electronic device and readable storage medium |
CN114419635A (en) * | 2022-03-30 | 2022-04-29 | 北京点聚信息技术有限公司 | Electronic seal vector diagram identification method based on graphic identification |
Non-Patent Citations (1)
Title |
---|
李强等: "一种基于区块链的电子签章验证平台设计", 《信息安全研究》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116091017A (en) * | 2023-04-10 | 2023-05-09 | 四川省肿瘤医院 | System and method for sending out medical records mail |
CN116776301A (en) * | 2023-08-18 | 2023-09-19 | 北京点聚信息技术有限公司 | Quick traceability management method for electronic seal |
CN116776301B (en) * | 2023-08-18 | 2023-10-20 | 北京点聚信息技术有限公司 | Quick traceability management method for electronic seal |
Also Published As
Publication number | Publication date |
---|---|
CN115330584B (en) | 2023-01-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115330584B (en) | Anti-copying encryption method for electronic seal | |
Yang et al. | Pattern-based data hiding for binary image authentication by connectivity-preserving | |
WO2018103755A1 (en) | Combined two-dimensional code, electronic certificate carrier, and generation and reading apparatus and method | |
EP1520369B1 (en) | Biometric authentication system | |
CN100530253C (en) | System and method of authenticating an article | |
CN104217388B (en) | A kind of image watermark insertion based on FSSVM, the method and apparatus extracted | |
Feng et al. | Steganalysis of content-adaptive binary image data hiding | |
US7587063B2 (en) | Asymmetric subspace watermarking | |
CN116226471B (en) | Data storage method for homeland resource planning | |
CN104217389B (en) | A kind of method and apparatus based on the image watermark insertion, the extraction that improve Arnold conversion | |
Hu et al. | A spatial image steganography method based on nonnegative matrix factorization | |
CN115378574A (en) | Lightweight dynamic image data encryption method and system | |
CN102722858A (en) | Blind steganalysis method based on symmetric neighborhood information | |
CN104217387A (en) | Image watermark embedding and extracting method and device based on quantization embedding | |
Chhajed et al. | Applying decision tree for hiding data in binary images for secure and secret information flow | |
Veerashetty | Secure communication over wireless sensor network using image steganography with generative adversarial networks | |
Ouyang et al. | A semi-fragile watermarking tamper localization method based on QDFT and multi-view fusion | |
Alkhowaiter et al. | Evaluating perceptual hashing algorithms in detecting image manipulation over social media platforms | |
Chen et al. | Steganalysis of LSB matching using characteristic function moment of pixel differences | |
Su | Color image watermarking: algorithms and technologies | |
US7539870B2 (en) | Media watermarking by biasing randomized statistics | |
Halboos et al. | Improve steganography system using agents software based on statistical and classification technique | |
CN1570962A (en) | Soft certification anti-false method based on graphic code primary and secondary signet series information association mechanism | |
CN115879072B (en) | Copyright protection method, device and medium for deep fake fingerprint detection model | |
Martiri et al. | Monotone digital signatures: an application in software copy protection |
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 |