CN115470508B - Format file vectorization encryption method - Google Patents

Format file vectorization encryption method Download PDF

Info

Publication number
CN115470508B
CN115470508B CN202211359071.1A CN202211359071A CN115470508B CN 115470508 B CN115470508 B CN 115470508B CN 202211359071 A CN202211359071 A CN 202211359071A CN 115470508 B CN115470508 B CN 115470508B
Authority
CN
China
Prior art keywords
character
sequence
ciphertext
undirected
path
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.)
Active
Application number
CN202211359071.1A
Other languages
Chinese (zh)
Other versions
CN115470508A (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 CN202211359071.1A priority Critical patent/CN115470508B/en
Publication of CN115470508A publication Critical patent/CN115470508A/en
Application granted granted Critical
Publication of CN115470508B publication Critical patent/CN115470508B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2211/00Indexing scheme relating to details of data-processing equipment not covered by groups G06F3/00 - G06F13/00
    • G06F2211/007Encryption, En-/decode, En-/decipher, En-/decypher, Scramble, (De-)compress
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The invention relates to the technical field of data encryption, in particular to a format file vectorization encryption method, which comprises the following steps: acquiring a character coding sequence, constructing a undirected key graph, and acquiring an encryption path sequence; acquiring a path sequence and a starting point of each element in the character coding sequence according to the encrypted path sequence and the undirected key diagram; and moving in the undirected key graph according to the starting point and the path sequence, acquiring an end point of the moving, taking the value of the end point as the ciphertext of each element in the character coding sequence, acquiring ciphertext character sequences according to the ciphertexts of all the elements in the character coding sequence, and further acquiring a ciphertext file. The undirected key graph constructed by the method has large key space, can resist brute force cracking attack, has complex ciphertext, and can resist statistical analysis attack.

Description

Format file vectorization encryption method
Technical Field
The invention relates to the technical field of data encryption, in particular to a format file vectorization encryption method.
Background
With the development of informatization, the application range of electronic documents is wider and wider, and the electronic documents gradually replace the paper documents in daily office. In business applications such as archive management, electronic archiving is used.
The method is characterized in that the historical paper files need to be scanned to obtain format files, the format files are in the form of scanned images when displayed, noise and distortion can occur when the format files are amplified, and the real complete conversion from the paper files to the electronic files cannot be realized. Therefore, the format file needs to be vectorized when being filed and stored, and the file content is still clear and can be checked under the condition that the format file is amplified.
Vectorizing the format file, wherein characters in the format file and characters in a character library need to be matched, vectorized fonts of the characters are obtained, and character image areas in the format file are replaced and displayed by the corresponding vectorized fonts. The client needs to transmit the scanned layout file to a file storage server for vectorization and archiving storage.
The characters are the most important parts in the documents, and the characters may contain confidential information, such as commercial secrets, national secrets and the like. In order to prevent the confidential information of the file from being leaked, the characters in the format file need to be encrypted in the process of transmitting the confidential information of the file from the client to the file storage server.
The existing methods for encrypting characters, such as fence translocation method, caesar shift cipher encryption and the like, only change the sequence of the characters, do not change the content of the characters, and are difficult to resist statistical analysis attack.
Disclosure of Invention
The invention provides a format file vectorization encryption method, which aims to solve the existing problems.
The format file vectorization encryption method adopts the following technical scheme:
one embodiment of the invention provides a format file vectorization encryption method, which comprises the following steps:
acquiring a character sequence, and acquiring a character coding sequence according to the character sequence; constructing an undirected key graph according to the length of each element in the character coding sequence; acquiring an encryption path sequence according to the length of the character coding sequence, a preset supplementary key and a preset path length;
acquiring the value of the corresponding position of each element in the character coding sequence in the encryption path sequence as the path of each element; converting the path of each element into binary number and splitting the binary number into a plurality of elements
Figure 877600DEST_PATH_IMAGE001
A binary number of bits, each of which will be
Figure 922785DEST_PATH_IMAGE001
Converting the binary digit into decimal numbers, wherein all the decimal numbers form a path sequence of each element; acquiring a starting point of each element in the character coding sequence according to the undirected key map;
the method for encrypting each element according to the starting point and the path sequence of each element in the character coding sequence to obtain the end point of each element comprises the following steps: s1: taking the starting point as a first vertex; s2: taking a first element in the path sequence as a first weight, and acquiring a vertex which is connected with a first vertex in the undirected key graph and has an edge weight between the undirected key graph and the first vertex equal to the first weight as a second vertex; deleting a first element in the path sequence; when the path sequence is empty, taking the second vertex as an end point, and when the path sequence is not empty, taking the second vertex as a first vertex; s3: repeating the step S2 until an end point is obtained, and stopping iteration;
taking the value of the end point of each element in the character coding sequence as the ciphertext of each element; acquiring the ciphertext of each character in the character sequence according to the ciphertext of each element in the character coding sequence to form a ciphertext character sequence; and acquiring the ciphertext file according to the ciphertext character sequence.
Preferably, the obtaining of the text coding sequence according to the text sequence includes:
coding each character in the character sequence by utilizing a first coding method to obtain a coding result of each character; splitting the coding result of each character into a first code and a second code; and forming a character coding sequence by the first codes and the second codes of all characters in the character sequence.
Preferably, the constructing of the undirected key map according to the length of each element in the literal code sequence includes:
taking the length of each element in the character coding sequence as a first length
Figure 472715DEST_PATH_IMAGE002
Constructing an assembly of
Figure 88504DEST_PATH_IMAGE003
An undirected graph of vertices, wherein the degree of each vertex in the undirected graph is
Figure 116503DEST_PATH_IMAGE004
Connected to any vertex in the undirected graph
Figure 501348DEST_PATH_IMAGE004
The weight of each side is
Figure 425442DEST_PATH_IMAGE005
The value of each vertex in the undirected graph is
Figure 590844DEST_PATH_IMAGE002
Binary number of bits, the value of all vertices in the undirected graph including all
Figure 609484DEST_PATH_IMAGE002
A binary number of bits; and taking the undirected graph as an undirected key graph.
Preferably, the obtaining the encryption path sequence according to the length of the text coding sequence, the preset supplementary key and the preset path length includes:
taking the length of the character coding sequence as a second length and presetting the path length
Figure 911153DEST_PATH_IMAGE006
Multiplication by
Figure 740568DEST_PATH_IMAGE001
As a third length
Figure 393266DEST_PATH_IMAGE007
(ii) a Obtaining an encryption path sequence with a second length by using a chaotic mapping method according to a preset supplementary key, wherein the range of each element in the encryption path sequence is
Figure 966330DEST_PATH_IMAGE008
To
Figure 325767DEST_PATH_IMAGE009
Preferably, the obtaining of the starting point of each element in the text encoding sequence according to the undirected key map includes:
and acquiring a vertex in the undirected key graph, which has the same value as each element in the character coding sequence, and taking the vertex as the starting point of each element in the character coding sequence.
Preferably, the obtaining the ciphertext of each character in the character sequence according to the ciphertext of each element in the character coding sequence includes:
the ciphertext of each element in the character coding sequence corresponds to the first code or the second code of each character in the character sequence, and the ciphertext of the first code of each character is spliced with the ciphertext of the second code to obtain the ciphertext code of each character; and decoding the ciphertext code of each character by using a first coding method to obtain the ciphertext of each character.
Preferably, the obtaining the ciphertext file according to the ciphertext text sequence includes:
and acquiring an image of each character in the ciphertext character sequence, and replacing the image area of the original character in the format file by using the image of each character in the ciphertext character sequence to obtain the ciphertext file.
The technical scheme of the invention has the beneficial effects that: the undirected key graph is constructed to be used as the key in the encryption process, so that the key space is large, and brute force cracking attack can be resisted. Compared with the existing word encryption methods such as fence translocation method, caesar shift cipher encryption and the like, which only change the sequence of the words and do not change the content of the words, the invention not only changes the sequence of the words, but also changes the content of the words; meanwhile, the invention walks in the undirected key map according to the starting point and the path sequence of each element in the character coding sequence to obtain the walking end point, takes the value of the end point as the ciphertext of each element, endows different path sequences for each element, and matches the edge weight value in the undirected key map according to the path sequences to ensure that the walking paths of different elements are different, thereby ensuring that the encryption results of the same elements are different and the encryption results of different elements are possibly the same, increasing the complexity of the ciphertext, destroying the original statistical rule of the plaintext, and resisting the attack of statistical analysis. Meanwhile, the format file is vectorized, so that the format file is clear and viewable after being amplified, and the problem of noise or distortion when the format file is amplified is solved.
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 description of the embodiments or 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 flowchart illustrating steps of a format file vectorization encryption method according to the present invention;
fig. 2 is an undirected graph key diagram of a format file vectorization encryption method of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined object, the following detailed description is provided with reference to the accompanying drawings and preferred embodiments for a format file vectorization encryption method according to the present invention, and its specific implementation, structure, features and effects are described in detail below. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
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 following describes a specific scheme of the format file vectorization encryption method provided by the present invention in detail with reference to the accompanying drawings.
Referring to fig. 1, a flowchart illustrating steps of a format file vectorization encryption method according to an embodiment of the present invention is shown, where the method includes the following steps:
101. and acquiring the undirected key graph and the supplementary key.
It should be noted that the format file may include characters such as chinese characters, letters, numbers, and the like, and in order to encrypt the characters in the format file, the characters in the format file need to be encoded first. The existing GB2312 encoding can encode each word as a 16-bit binary number. The embodiment of the invention aims to realize the encryption of characters according to the path between the vertexes in the undirected graph by constructing the undirected graph as a key. The code length of each character is 16 bits, and the total code length is
Figure 388401DEST_PATH_IMAGE010
A different encoding. If each character is taken as the vertex of the undirected graph, the vertex of the undirected graph has
Figure 461486DEST_PATH_IMAGE010
At this time, the undirected graph data volume is very large, occupies a large space, and is not suitable for being used as a key. Therefore, the code of each character can be divided into two 8-bit binary numbers, and the two 8-bit binary numbers are encrypted respectively. And a length of 8 bits is common to the binary numbers
Figure 900558DEST_PATH_IMAGE011
In the case of the seed, if each 8-bit binary number is used as a vertex of the undirected graph, 256 vertices of the undirected graph are present.
In an embodiment of the present invention, constructing a package comprises
Figure 114501DEST_PATH_IMAGE012
An undirected graph of vertices, the degree of each vertex in the undirected graph being
Figure 348036DEST_PATH_IMAGE004
Then each vertex has
Figure 647431DEST_PATH_IMAGE004
The edge to which the strip is attached. Connected to any vertex in an undirected graph
Figure 562297DEST_PATH_IMAGE004
The weight of each edge is
Figure 958643DEST_PATH_IMAGE005
. Will be provided with
Figure 550031DEST_PATH_IMAGE013
In total
Figure 399038DEST_PATH_IMAGE012
An
Figure 852016DEST_PATH_IMAGE014
Random assignment of bit binary numbers to undirected graphs
Figure 102869DEST_PATH_IMAGE012
The vertices use the obtained undirected graph as a key, and record the undirected graph as an undirected key graph.
Due to the fact that
Figure 881469DEST_PATH_IMAGE013
In total
Figure 155455DEST_PATH_IMAGE012
An
Figure 474441DEST_PATH_IMAGE014
Random assignment of bit binary numbers to undirected graphs
Figure 173276DEST_PATH_IMAGE012
A vertex in common
Figure 919515DEST_PATH_IMAGE015
Due to the distribution mode, the secret key space of the undirected secret key graph is large, and brute force cracking can be resisted. The embodiment of the invention is as follows
Figure 802502DEST_PATH_IMAGE004
A undirected key graph constructed by taking binary digits as an example is shown in fig. 2.
It should be noted that, an object of the embodiment of the present invention is to implement encryption of vertices through paths between vertices in an undirected key graph, so that a supplemental key needs to be set, so as to construct a path sequence according to the supplemental key in the following, and further obtain an encryption result of a vertex according to a path in the path sequence.
In the embodiment of the invention, a supplementary key is set
Figure 862862DEST_PATH_IMAGE016
As a supplemental key, of
Figure 822727DEST_PATH_IMAGE017
Figure 943130DEST_PATH_IMAGE018
Figure 457288DEST_PATH_IMAGE019
Thus, a undirected key map and a supplemental key are obtained. The undirected key map and the complementary key are stored in the encryption end and the decryption end in advance.
102. And acquiring a character coding sequence, and acquiring an encryption path sequence according to the character coding sequence and the supplementary key.
In one embodiment, a format file to be electronically archived is acquired, OCR recognition is performed on the format file at a client, and the content in the format file is recognized as specific characters through the OCR recognition, so that a character sequence is obtained.
In another embodiment, a format file to be electronically archived is acquired, OCR recognition is performed on the format file at a client, content in the format file is recognized as specific characters through the OCR recognition to obtain a first sequence, and the first sequence is encrypted by using a first encryption method to obtain a character sequence. The first encryption method includes, but is not limited to, fence translocation, and Caesar shift cipher.
And coding each character in the character sequence by using a GB2312 coding method, wherein the coding length of each character is 16 bits. And splitting the coding result of each character in the character sequence into two 8-bit binary numbers which are respectively used as a first code and a second code of each character. The first code and the second code of all characters in the character sequence form a character code sequence, and the first code is used
Figure 305027DEST_PATH_IMAGE020
For indicating, for second coding
Figure 119399DEST_PATH_IMAGE021
If the character is represented, the character coding sequence is
Figure 410704DEST_PATH_IMAGE022
In which
Figure 943316DEST_PATH_IMAGE023
A first code for a first word in the sequence of words,
Figure 345479DEST_PATH_IMAGE024
a second code for a first word in the sequence of words.
It should be noted that, in order to encrypt each element in the text encoding sequence by using the path in the undirected key map, one path needs to be obtained for each element in the text encoding sequence, and therefore, an encryption path sequence with the same length as the text encoding sequence needs to be constructed. In order to make the decryption result more chaotic and irregular, the path traversed by each element in the text encoding sequence during encryption needs to be as long as possible. While the weight of each edge in the undirected key map is all in
Figure 217620DEST_PATH_IMAGE025
Within the range of (1), can be used
Figure 742142DEST_PATH_IMAGE001
Bit binary. Setting each element in character coding sequenceHas a path length of
Figure 683422DEST_PATH_IMAGE006
Then the length of each element of the encryption path sequence is required to be converted into binary
Figure 951592DEST_PATH_IMAGE007
Therefore, the size of each element in the encryption path sequence is required to be
Figure 678240DEST_PATH_IMAGE026
Within the range. In the embodiments of the present invention
Figure 311346DEST_PATH_IMAGE027
In other embodiments, the implementer may set up the settings as desired
Figure 818551DEST_PATH_IMAGE006
The value of (c).
In the embodiment of the invention, the length of the character coding sequence is obtained
Figure 562516DEST_PATH_IMAGE028
Generating a length of
Figure 205987DEST_PATH_IMAGE029
Of the chaotic sequence of (a). After in the chaotic sequence
Figure 259263DEST_PATH_IMAGE028
Each element being multiplied by
Figure 988184DEST_PATH_IMAGE009
And rounding down to obtain decimal integer of length
Figure 801419DEST_PATH_IMAGE028
The encrypted path sequence of (1).
Thus, a character coding sequence and an encryption path sequence are obtained.
103. And encrypting each element in the character coding sequence according to the directed key graph and the encryption path sequence to obtain a ciphertext character sequence.
And for each element in the character coding sequence, acquiring the element at the corresponding position in the encryption path sequence as the path of each element in the character coding sequence.
Encrypting each element of the text-coding sequence, e.g. the first element of the text-coding sequence
Figure 502659DEST_PATH_IMAGE030
The encryption method of each element comprises the following steps:
each element in the encryption path sequence has a range of
Figure 274306DEST_PATH_IMAGE026
Thus in the text coding sequence
Figure 693786DEST_PATH_IMAGE030
The path of each element is
Figure 841871DEST_PATH_IMAGE026
Is converted into
Figure 240360DEST_PATH_IMAGE007
A binary number of bits, and converting the number
Figure 182908DEST_PATH_IMAGE007
The bit binary numbers being of equal length
Figure 89684DEST_PATH_IMAGE006
Groups, each group length is
Figure 979143DEST_PATH_IMAGE001
Then obtain
Figure 451713DEST_PATH_IMAGE006
An
Figure 29411DEST_PATH_IMAGE001
A binary number of bits. Each will be
Figure 220221DEST_PATH_IMAGE001
The binary digits are respectively converted into decimal system, then obtaining
Figure 647791DEST_PATH_IMAGE006
An
Figure 240446DEST_PATH_IMAGE025
Decimal number in range, will
Figure 728059DEST_PATH_IMAGE006
In which the decimal number constitutes a code sequence of characters
Figure 140586DEST_PATH_IMAGE030
A sequence of paths of individual elements.
Such as the ones in the hypothetical character code sequence
Figure 637427DEST_PATH_IMAGE030
The path of each element is
Figure 271539DEST_PATH_IMAGE031
When is coming into contact with
Figure 992370DEST_PATH_IMAGE027
When the range of each element in the encryption path sequence is
Figure 95456DEST_PATH_IMAGE032
Then will be
Figure 927145DEST_PATH_IMAGE031
Is converted into
Figure 868294DEST_PATH_IMAGE014
A bit binary number of
Figure 697710DEST_PATH_IMAGE033
. Will be provided with
Figure 84829DEST_PATH_IMAGE033
Is divided into
Figure 923472DEST_PATH_IMAGE004
Is composed of
Figure 282909DEST_PATH_IMAGE034
Figure 345543DEST_PATH_IMAGE035
Figure 406909DEST_PATH_IMAGE036
Figure 580401DEST_PATH_IMAGE037
Then in the text coding sequence
Figure 59924DEST_PATH_IMAGE030
The path sequence of each element is
Figure 231143DEST_PATH_IMAGE038
Obtaining the first position in the undirected key map and the character coding sequence
Figure 592854DEST_PATH_IMAGE030
The vertex with the same element value is taken as the first vertex in the character coding sequence
Figure 507720DEST_PATH_IMAGE030
A starting point of an element.
According to the second in the character coding sequence
Figure 904067DEST_PATH_IMAGE030
The starting point of each element and the path sequence acquire the first in the character coding sequence
Figure 761033DEST_PATH_IMAGE030
The end point of each element is used as the first point in the character coding sequence
Figure 282144DEST_PATH_IMAGE030
A ciphertext of an element. The method specifically comprises the following steps:
taking the starting point as a first vertex, and performing end point acquisition operation according to the first vertex and the path sequence, wherein the end point acquisition operation comprises the following steps: and taking the first element in the path sequence as a first weight, and acquiring a vertex which is connected with the first vertex in the undirected key graph and has an edge weight between the undirected key graph and the first vertex equal to the first weight as a second vertex. The first element in the path sequence is deleted. If the path sequence is empty, the second vertex is used as the end point, and if the path sequence is not empty, the second vertex is used as the first vertex.
And repeating the operation of acquiring the end point according to the first vertex and the path sequence until the end point is obtained, and stopping iteration.
Using the obtained end point value as the first value in the character coding sequence
Figure 63018DEST_PATH_IMAGE030
A ciphertext of an element.
To this end, the first character encoding sequence is completed
Figure 251554DEST_PATH_IMAGE030
The encryption of each element obtains the second element in the character coding sequence
Figure 826892DEST_PATH_IMAGE030
A ciphertext of an element.
And similarly, encrypting each element in the character coding sequence to obtain the ciphertext of each element in the character coding sequence. The character coding sequence is composed of a first code and a second code of each character in the character sequence, so that the ciphertext of each element in the character coding sequence is the ciphertext of the first code or the second code of each character. And splicing the ciphertext of the first code of each character with the ciphertext of the second code to be used as the ciphertext code of each character. The ciphertext of each word is encoded as a 16-bit binary number.
And decoding the ciphertext code of each character into a character by using a GB2312 coding method, and taking the character as the ciphertext of the corresponding character. The ciphertext of all the characters in the character sequence constitutes a ciphertext character sequence.
Thus, encryption of each element in the character coding sequence is completed, and a ciphertext character sequence is obtained.
104. And generating a ciphertext file according to the ciphertext character sequence, and transmitting the ciphertext file.
And searching and acquiring an image of each character in the ciphertext character sequence in the character library, and replacing an image area of the original character in the layout file by using the image of each character in the ciphertext character sequence to display the layout file as a ciphertext, so that the ciphertext file is obtained.
And transmitting the ciphertext file to a file storage server by the client.
105. And decrypting and vectorizing the ciphertext file to obtain a vectorized layout file, and filing and storing the vectorized layout file.
And after receiving the ciphertext file, the file storage server decrypts the ciphertext file. The specific method comprises the following steps:
and performing OCR recognition on the ciphertext file, and recognizing the content in the ciphertext file into specific characters through the OCR recognition to obtain a ciphertext character sequence. And coding each character in the ciphertext character sequence by using a GB2312 coding method, wherein the coding length of each character is 16 bits. And splitting the coding result of each character in the ciphertext character sequence into two 8-bit binary numbers which are respectively used as a first coding ciphertext and a second coding ciphertext of each character. And forming a ciphertext character coding sequence by using the first coding ciphertext and the second coding ciphertext of all characters in the ciphertext character sequence.
The encrypted path sequence is obtained using the method in step 102.
And for each element in the ciphertext character coding sequence, acquiring an element at a corresponding position in the encryption path sequence as a path of each element in the ciphertext character coding sequence. The path of each element in the ciphertext character encoding sequence is converted into a path sequence by the method in step 103. And performing reverse order on the path sequence to obtain a decrypted path sequence.
And acquiring a vertex in the undirected key graph, which has the same value as each element in the ciphertext character coding sequence, as a starting point of each element. And acquiring an end point of each element according to the decryption path sequence of each element and the start point of each element by using the method in the step 103, wherein the value of the end point is the plaintext of each element.
The ciphertext character coding sequence consists of a first coding ciphertext and a second coding ciphertext of each character in the ciphertext character sequence. Therefore, the plaintext of each element in the ciphertext character coding sequence is the plaintext of the first coding ciphertext or the second coding ciphertext of each character. And splicing the plaintext of the first coded ciphertext and the plaintext of the second coded ciphertext of each character to serve as the plaintext code of each character.
And decoding the plaintext code of each character in the ciphertext character sequence into a character by using a GB2312 coding method, wherein the character is the result of decrypting the corresponding character in the ciphertext character sequence. And the decrypted results of all the characters in the ciphertext character sequence form a character sequence.
It should be noted that the layout file is displayed in the form of a scanned image, and when the file is enlarged, noise points and distortion may occur. Therefore, when an original file is acquired according to a text sequence, vectorization needs to be performed at the same time to ensure that no noise point or distortion occurs after the file obtained after decryption is amplified.
In the embodiment of the invention, the vector font of each character in the character sequence is searched and obtained in the character library, and the vector font of each character in the character sequence is used for replacing the image area of the original character in the ciphertext file, so that the decryption of the ciphertext file is realized, and the vectorized format file is obtained.
And finally, the decryption and vectorization of the ciphertext file are completed, and the vectorized layout file is obtained, wherein the format of the vectorized layout file is in a format of 'bw'. And the file storage server is used for archiving and storing the vectorized layout file.
And when needed, a person with related authority can download and view the vectorized layout file on the file storage server.
Through the steps, format file vectorization and filing storage are completed, and electronic filing and safety management of the format files are achieved.
The embodiment of the invention constructs the undirected key graph as the key in the encryption process, has large key space and can resist brute force cracking attack. Compared with the existing word encryption methods such as fence translocation method, caesar shift cipher encryption and the like, which only change the sequence of the words and do not change the content of the words, the invention not only changes the sequence of the words, but also changes the content of the words; meanwhile, the invention walks in the undirected key map according to the starting point and the path sequence of each element in the character coding sequence to obtain the walking end point, takes the value of the end point as the ciphertext of each element, endows different path sequences for each element, and matches the edge weight value in the undirected key map according to the path sequences to ensure that the walking paths of different elements are different, thereby ensuring that the encryption results of the same elements are different and the encryption results of different elements are possibly the same, increasing the complexity of the ciphertext, destroying the original statistical rule of the plaintext, and resisting the attack of statistical analysis. Meanwhile, the format file is vectorized, so that the format file is clearly checked after being amplified, and the problem of noise or distortion when the format file is amplified is solved.
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 (6)

1. A format file vectorization encryption method is characterized by comprising the following steps:
acquiring a character sequence, and acquiring a character coding sequence according to the character sequence; constructing an undirected key graph according to the length of each element in the character coding sequence; acquiring an encryption path sequence according to the length of the character coding sequence, a preset supplementary key and a preset path length;
obtaining the value of the corresponding position of each element in the character coding sequence in the encryption path sequence as each elementThe path of (a); converting the path of each element into binary number and splitting the binary number into a plurality of elements
Figure 878988DEST_PATH_IMAGE001
A binary number of bits, each of which will be
Figure 224650DEST_PATH_IMAGE001
Converting the binary digit into decimal numbers, wherein all the decimal numbers form the path sequence of each element; acquiring a starting point of each element in the character coding sequence according to the undirected key map;
the method for encrypting each element according to the starting point and the path sequence of each element in the character coding sequence to obtain the end point of each element comprises the following steps: s1: taking the starting point as a first vertex; s2: taking a first element in the path sequence as a first weight, and acquiring a vertex which is connected with a first vertex in the undirected key graph and has an edge weight between the undirected key graph and the first vertex equal to the first weight as a second vertex; deleting a first element in the path sequence; when the path sequence is empty, taking the second vertex as an end point, and when the path sequence is not empty, taking the second vertex as a first vertex; s3: repeating the step S2 until an end point is obtained, and stopping iteration;
taking the value of the end point of each element in the character coding sequence as the ciphertext of each element; acquiring the ciphertext of each character in the character sequence according to the ciphertext of each element in the character coding sequence to form a ciphertext character sequence; acquiring a ciphertext file according to the ciphertext character sequence;
the obtaining of the encryption path sequence according to the length of the text coding sequence, the preset supplementary key and the preset path length includes:
taking the length of the character coding sequence as a second length and presetting the path length
Figure 954709DEST_PATH_IMAGE002
Multiplication by
Figure 154746DEST_PATH_IMAGE001
As a third length
Figure 679268DEST_PATH_IMAGE003
(ii) a Obtaining an encryption path sequence with a second length by using a chaotic mapping method according to a preset supplementary key, wherein the range of each element in the encryption path sequence is
Figure 715488DEST_PATH_IMAGE004
To
Figure 718079DEST_PATH_IMAGE005
2. The format file vectorization encryption method according to claim 1, wherein the obtaining of the text encoding sequence according to the text sequence comprises:
coding each character in the character sequence by utilizing a first coding method to obtain a coding result of each character; splitting the coding result of each character into a first code and a second code; and forming a character coding sequence by the first codes and the second codes of all characters in the character sequence.
3. The format file vectorization encryption method according to claim 1, wherein the constructing of the undirected key map according to the length of each element in the literal code sequence comprises:
taking the length of each element in the character coding sequence as a first length
Figure 303781DEST_PATH_IMAGE006
Constructing a package
Figure 812254DEST_PATH_IMAGE007
An undirected graph of vertices, wherein the degree of each vertex in the undirected graph is
Figure 319459DEST_PATH_IMAGE008
Connected to any vertex in the undirected graph
Figure 422280DEST_PATH_IMAGE008
The weight of each side is
Figure 128068DEST_PATH_IMAGE009
The value of each vertex in the undirected graph is
Figure 73022DEST_PATH_IMAGE006
Binary number of bits, the value of all vertices in the undirected graph including all
Figure 598681DEST_PATH_IMAGE006
A binary number of bits; and taking the undirected graph as an undirected key graph.
4. The format file vectorization encryption method according to claim 1, wherein the obtaining of the starting point of each element in the text encoding sequence according to the undirected key map comprises:
and acquiring a vertex in the undirected key graph, which has the same value as each element in the character coding sequence, and taking the vertex as the starting point of each element in the character coding sequence.
5. The format file vectorization encryption method according to claim 1, wherein the obtaining the ciphertext of each character in the character sequence according to the ciphertext of each element in the character encoding sequence comprises:
the ciphertext of each element in the character coding sequence corresponds to the first code or the second code of each character in the character sequence, and the ciphertext of the first code of each character is spliced with the ciphertext of the second code to obtain the ciphertext code of each character; and decoding the ciphertext code of each character by using a first coding method to obtain the ciphertext of each character.
6. The format file vectorization encryption method according to claim 1, wherein the obtaining a ciphertext file according to a ciphertext text sequence comprises:
and acquiring an image of each character in the ciphertext character sequence, and replacing the image area of the original character in the format file by using the image of each character in the ciphertext character sequence to obtain the ciphertext file.
CN202211359071.1A 2022-11-02 2022-11-02 Format file vectorization encryption method Active CN115470508B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211359071.1A CN115470508B (en) 2022-11-02 2022-11-02 Format file vectorization encryption method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211359071.1A CN115470508B (en) 2022-11-02 2022-11-02 Format file vectorization encryption method

Publications (2)

Publication Number Publication Date
CN115470508A CN115470508A (en) 2022-12-13
CN115470508B true CN115470508B (en) 2023-01-31

Family

ID=84337847

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211359071.1A Active CN115470508B (en) 2022-11-02 2022-11-02 Format file vectorization encryption method

Country Status (1)

Country Link
CN (1) CN115470508B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115760126B (en) * 2023-01-10 2023-05-02 北京厚方科技有限公司 Financial transaction information encryption method
CN115859341B (en) * 2023-02-27 2023-05-05 山东水浒文化传媒有限公司 Intelligent on-line file reading system
CN116910827B (en) * 2023-09-13 2023-11-21 北京点聚信息技术有限公司 Automatic signature management method for OFD format file based on artificial intelligence

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105844214B (en) * 2016-03-02 2019-06-21 华南理工大学 A kind of information fingerprint extracting method of the multipath depth coding based on bit space
CN108197491B (en) * 2017-12-29 2021-06-15 西安电子科技大学 Subgraph retrieval method based on ciphertext
US10911215B2 (en) * 2018-02-12 2021-02-02 Gideon Samid BitMap lattice: a cyber tool comprised of geometric construction
CN114549266B (en) * 2021-12-30 2024-04-30 河南大学 Image encryption method based on DNA replacement rule and chaotic system
CN115085924B (en) * 2022-08-22 2022-12-27 锐创软件技术(启东)有限公司 Computer information transmission encryption system based on Huffman coding

Also Published As

Publication number Publication date
CN115470508A (en) 2022-12-13

Similar Documents

Publication Publication Date Title
CN115470508B (en) Format file vectorization encryption method
CN101610088B (en) System and method for encoding data based on a compression technique with security features
US8254570B2 (en) Method and system for encryption of data
CN104331448B (en) Ciphertext domain image search method based on jpeg image ac coefficient histogram
US7925012B2 (en) Method and system for the secure distribution of compressed digital texts
EP3711166A1 (en) A computer-implemented method of performing format-preserving encryption of a data object of variable size
CN115150818B (en) Communication transmission encryption method based on artificial intelligence
Chaplain et al. Springer Undergraduate Mathematics Series
Kumar et al. An optimal high capacity reversible data hiding scheme using move to front coding for LZW codes
Dumas et al. Foundations of coding: compression, encryption, error correction
CN115442043B (en) Video data transmission method for boiler production monitoring
US11277259B2 (en) Multi-layer encryption employing Kaprekar routine and letter-proximity-based cryptograms
Cao et al. Separable Reversible Data Hiding in Encrypted VQ‐Encoded Images
KR101584127B1 (en) System and method for deniable encryption
US20020136400A1 (en) R-conversion encryption method and system
Govindasamy et al. Coverless image steganography using Haar integer wavelet transform
CN114697671B (en) Building engineering quality management system
CN115134471A (en) Image encryption and decryption method and related equipment
Choche et al. A methodology to conceal QR codes for security applications
Abed A new approach to encoding and hiding information in an image
Al-Jarrah et al. Dictionary based arabic text compression and encryption utilizing two-dimensional random binary shuffling operations.
Hussein et al. Randomized Information Hiding in RGB Images Using Genetic Algorithm and Huffman Coding.
US11809588B1 (en) Protecting membership in multi-identification secure computation and communication
CN117540441B (en) Transaction data secure storage method for hall type cloud terminal
Walidaniy et al. Improvement of PSNR by Using Shannon-Fano Compression Technique in AES-LSB StegoCrypto

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