CN112989434A - Electronic document encryption tamper-proof decryption verification method - Google Patents
Electronic document encryption tamper-proof decryption verification method Download PDFInfo
- Publication number
- CN112989434A CN112989434A CN202110300572.1A CN202110300572A CN112989434A CN 112989434 A CN112989434 A CN 112989434A CN 202110300572 A CN202110300572 A CN 202110300572A CN 112989434 A CN112989434 A CN 112989434A
- Authority
- CN
- China
- Prior art keywords
- document
- template
- encryption
- encrypting
- tamper
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting 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
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing 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/2107—File encryption
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Bioethics (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Storage Device Security (AREA)
Abstract
The invention belongs to the technical field of document encryption, and discloses an electronic document encryption tamper-proofing and decryption verification method, which comprises the following steps: the method comprises the following steps: compiling a document template, randomly generating an SM2 secret key pair of the document template, and encrypting and storing the secret key pair; step two: generating a document version and a document number according to document contents in the document template, and compiling a document and then encrypting and storing the document; step three: reading a document; step four: judging whether the document is finalized, if not, returning to the step two to compile the document again, and if so, executing the step five; step five: and encrypting the document number and signing the document content. According to the invention, through means of document encryption, storage, decryption and interpretation, document content signature output, two-dimensional code guess prevention and code scanning verification and the like, the anti-tamper property of each stage of the document is ensured, the file disclosure feasibility is greatly reduced, the file authenticity is greatly improved, and legal and compliance benefits of a receiving and sending party and other reading parties are ensured.
Description
Technical Field
The invention belongs to the technical field of document encryption, and particularly relates to an electronic document encryption tamper-proofing and decryption verification method.
Background
At present, paper official documents are frequently exchanged between units, the security of document contents is difficult to guarantee, document contents are changed frequently, seals are embezzled, the comparison between the document contents of a receiving unit and a launching unit is difficult, and the authenticity of the documents is difficult to confirm.
Therefore, a method for verifying electronic document encryption, tamper-proofing and decryption is needed to solve the above technical problems.
Disclosure of Invention
Aiming at the problems, the invention provides a method for verifying the encryption, the tamper resistance and the decryption of an electronic document, so as to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme:
an electronic document encryption tamper-proofing method, the method comprising the steps of:
the method comprises the following steps: compiling a document template, randomly generating an SM2 secret key pair of the document template, and encrypting and storing the secret key pair;
step two: generating a document version and a document number according to document contents in the document template, and compiling a document and then encrypting and storing the document;
step three: reading a document;
step four: it is determined whether the document is finalized,
if not, returning to the step two to compile the document again,
if yes, executing a fifth step;
step five: and encrypting the document number and signing the document content.
Further, the SM2 key pair is stored encrypted using the DES algorithm.
Further, the generating a document version and a document number according to the document content in the document template includes:
generating a document version according to the document content creation time;
and generating a unique document number according to the document version and the template type.
Further, the encrypting and storing after documentation comprises:
acquiring an SM2 public key of the document template according to the document type;
base64 encoding the document content;
SM2 encryption is performed on base64 codes by using an SM2 public key of the document template;
and storing the encrypted document content and the document additional information into a database.
Further, the reading the document specifically includes: document reading and manuscript setting confirmation are carried out manually.
Further, the encrypting the document number includes:
and encrypting the document number by adopting a DES algorithm, and generating a document unique verification query graph two-dimensional code according to the query URL root address.
Further, the signing the document content includes:
carrying out 64-bit MD5 signature on document content to generate a 64-bit signature character string;
and performing HASH secondary signature on the 64-bit signature character string signed by the MD5 to generate a 10-bit pure digital signature.
A method of electronic document decryption verification, the method comprising:
the method comprises the following steps: scanning the two-dimensional code to perform DES decryption on the document number, and acquiring a document number plaintext;
step two: inquiring a database according to the document number plaintext to obtain the detailed information of the document;
step three: acquiring a document template and an SM2 private key according to the document type;
step four: acquiring original document information according to an SM2 private key;
step five: and comparing the original document information with the paper document to finish verification.
Further, the original document information includes:
document number, document version, MD5 and HASH signature information, document content.
The invention has the technical effects and advantages that:
according to the invention, through means of document encryption, storage, decryption and interpretation, document content signature output, two-dimensional code guess prevention and code scanning verification and the like, the anti-tamper property of each stage of the document is ensured, the file disclosure feasibility is greatly reduced, the file authenticity is greatly improved, and legal and compliance benefits of a receiving and sending party and other reading parties are ensured.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
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, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flow chart of an electronic document encryption tamper-proofing method according to an embodiment of the invention;
fig. 2 is a flow chart illustrating an electronic document decryption verification method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. 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 invention provides an electronic document encryption anti-tampering and decryption verification method, wherein, for example, fig. 1 shows a flow diagram of the electronic document encryption anti-tampering method of the embodiment of the invention, as shown in fig. 1, the method comprises the following steps:
the method comprises the following steps: compiling a document template, randomly generating an SM2 secret key pair of the document template, and encrypting and storing the secret key pair;
specifically, a system administrator performs template compilation on various daily work standard documents and randomly generates an SM2 private key pair of the template, wherein a public key is open to documentation personnel, a private key is automatically managed by the system, and an operator (including the administrator) does not have the right to acquire private key information. In the present embodiment, the DES algorithm is taken as an example to encrypt and store the SM2 key pair, but the present embodiment is not limited thereto.
Step two: generating a document version and a document number according to document contents in the document template, and compiling a document and then encrypting and storing the document;
specifically, the system operator selects the document template according to actual needs, fills in the document content according to the specification, automatically controls and manages the document version according to the document creation time, and generates a unique document number according to the type of the document template and the document version. After a document is compiled, an SM2 public key of a document template is obtained according to the type of the document, base64 coding is carried out on document content, SM2 encryption is carried out on the base64 coding by using the SM2 public key of the document template, and then the encrypted document content and document additional information are stored in a database, so that database-level anti-falsification and anti-library behaviors are achieved. The document additional information includes video, picture, audio, uploaded table, document, PDF, compressed file and other files.
Step three: reading a document;
specifically, in this embodiment, the document administrator reads the specified document according to the document number, and the system acquires the SM2 private key according to the type of the document, decrypts the document content, and displays the specific file content according to the template type.
Step four: it is determined whether the document is finalized,
if not, returning to the step two to compile the document again,
if yes, executing a fifth step;
in this embodiment, the document maker performs the check to determine the finalized document, the system may read the check state to determine whether the document is finalized, the non-finalized document may be edited for the second time, and the finalized document may not be edited but may be previewed or directly printed.
Step five: and encrypting the document number and signing the document content.
Specifically, the system performs DES encryption on the document number according to the document number, and generates a document unique verification query graph two-dimensional code according to the query URL root address. Then, carrying out 64-bit MD5 signature on the document content to generate a 64-bit signature character string; and performing HASH secondary signature on the 64-bit signature character string signed by the MD5 to generate a 10-bit pure digital signature, so that the application system level is prevented from being changed. When a paper file is printed and output, SM2 decryption processing is carried out on the content of a manuscript setting document, plaintext information of a specified document template is applied, a specified standard document is generated according to the document template, a graphic two-dimensional code and 10-bit signature information are notified to be output, and finally the paper file is printed.
Exemplarily, fig. 2 shows a schematic flow chart of a decryption verification method for an electronic document according to an embodiment of the present invention, and as shown in fig. 2, the method includes:
the method comprises the following steps: scanning the two-dimensional code to perform DES decryption on the document number, and acquiring a document number plaintext;
step two: inquiring a database according to the document number plaintext to obtain the detailed information of the document;
step three: acquiring a document template and an SM2 private key according to the document type;
step four: acquiring the original document information according to an SM2 private key;
step five: and comparing the original document information with the paper document to finish verification.
Wherein the original document information includes: document number, document version, MD5 and HASH signature information, document content.
The embodiment adopts a windows/Linux operating system, and uses an SM2 algorithm module, a DES algorithm module, an MD5 signature module, a two-dimensional code generation module and a document template customization module.
The embodiment of the invention ensures the tamper resistance of each stage of the document by means of document encryption, storage, decryption and interpretation, document content signature output, two-dimensional code guess-proof code scanning verification and the like, greatly reduces the file disclosure feasibility, greatly improves the file authenticity, and ensures legal and compliance benefits of transceiving and other readers.
Although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (9)
1. An electronic document encryption tamper-proofing method, characterized by comprising the steps of:
the method comprises the following steps: compiling a document template, randomly generating an SM2 secret key pair of the document template, and encrypting and storing the secret key pair;
step two: generating a document version and a document number according to document contents in the document template, and compiling a document and then encrypting and storing the document;
step three: reading a document;
step four: it is determined whether the document is finalized,
if not, returning to the step two to compile the document again,
if yes, executing a fifth step;
step five: and encrypting the document number and signing the document content.
2. The electronic document encryption tamper-proofing method according to claim 1, wherein the SM2 key pair is stored encrypted using DES algorithm.
3. The electronic document encryption tamper-proofing method according to claim 1, wherein the generating of the document version and the document number according to the document contents in the document template includes:
generating a document version according to the document content creation time;
and generating a unique document number according to the document version and the template type.
4. The electronic document encryption tamper-proofing method according to claim 1, wherein said postdocumentation encrypted storage includes:
acquiring an SM2 public key of the document template according to the document type;
base64 encoding the document content;
SM2 encryption is performed on base64 codes by using an SM2 public key of the document template;
and storing the encrypted document content and the document additional information into a database.
5. The electronic document encryption tamper-proofing method according to claim 1, wherein reading the document specifically includes: document reading and manuscript setting confirmation are carried out manually.
6. The electronic document encryption tamper-proofing method according to claim 1, wherein the encrypting the document number includes:
and encrypting the document number by adopting a DES algorithm, and generating a document unique verification query graph two-dimensional code according to the query URL root address.
7. The electronic document encryption tamper-proofing method according to claim 1, wherein said signing document contents comprises:
carrying out 64-bit MD5 signature on document content to generate a 64-bit signature character string;
and performing HASH secondary signature on the 64-bit signature character string signed by the MD5 to generate a 10-bit pure digital signature.
8. An electronic document decryption verification method, characterized in that the method comprises:
the method comprises the following steps: scanning the two-dimensional code to perform DES decryption on the document number, and acquiring a document number plaintext;
step two: inquiring a database according to the document number plaintext to obtain the detailed information of the document;
step three: acquiring a document template and an SM2 private key according to the document type;
step four: acquiring original document information according to an SM2 private key;
step five: and comparing the original document information with the paper document to finish verification.
9. The electronic document decryption verification method according to claim 8, wherein the original document information includes:
document number, document version, MD5 and HASH signature information, document content.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110300572.1A CN112989434A (en) | 2021-03-22 | 2021-03-22 | Electronic document encryption tamper-proof decryption verification method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110300572.1A CN112989434A (en) | 2021-03-22 | 2021-03-22 | Electronic document encryption tamper-proof decryption verification method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112989434A true CN112989434A (en) | 2021-06-18 |
Family
ID=76332722
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110300572.1A Pending CN112989434A (en) | 2021-03-22 | 2021-03-22 | Electronic document encryption tamper-proof decryption verification method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112989434A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117150536A (en) * | 2023-11-01 | 2023-12-01 | 北京敏行通达信息技术有限公司 | Anti-counterfeiting method, device and equipment for document and readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003323512A (en) * | 2002-05-08 | 2003-11-14 | Amano Corp | Printing system with time stamp and copy system with tamper-proof function |
CN101281581A (en) * | 2007-09-27 | 2008-10-08 | 北京数字证书认证中心有限公司 | Method for checking whether contents of paper file is distorted or not |
CN107194266A (en) * | 2017-05-12 | 2017-09-22 | 江苏诺安科技有限公司 | It is a kind of to verify the method whether papery license is tampered |
CN107229879A (en) * | 2017-06-05 | 2017-10-03 | 北京网证科技有限公司 | Electronics confirmation request automatic generation method and system based on safe Quick Response Code |
CN110391914A (en) * | 2019-09-18 | 2019-10-29 | 尤尼泰克(嘉兴)信息技术有限公司 | A kind of file acquisition method and equipment, two-dimensional code generation method based on two dimensional code |
-
2021
- 2021-03-22 CN CN202110300572.1A patent/CN112989434A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003323512A (en) * | 2002-05-08 | 2003-11-14 | Amano Corp | Printing system with time stamp and copy system with tamper-proof function |
CN101281581A (en) * | 2007-09-27 | 2008-10-08 | 北京数字证书认证中心有限公司 | Method for checking whether contents of paper file is distorted or not |
CN107194266A (en) * | 2017-05-12 | 2017-09-22 | 江苏诺安科技有限公司 | It is a kind of to verify the method whether papery license is tampered |
CN107229879A (en) * | 2017-06-05 | 2017-10-03 | 北京网证科技有限公司 | Electronics confirmation request automatic generation method and system based on safe Quick Response Code |
CN110391914A (en) * | 2019-09-18 | 2019-10-29 | 尤尼泰克(嘉兴)信息技术有限公司 | A kind of file acquisition method and equipment, two-dimensional code generation method based on two dimensional code |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117150536A (en) * | 2023-11-01 | 2023-12-01 | 北京敏行通达信息技术有限公司 | Anti-counterfeiting method, device and equipment for document and readable storage medium |
CN117150536B (en) * | 2023-11-01 | 2024-01-02 | 北京敏行通达信息技术有限公司 | Anti-counterfeiting method, device and equipment for document and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116842583B (en) | Electronic signature system and method with PDF signature as core | |
CN1149784C (en) | Transmitting revisions with digital signatures | |
EP0760565B1 (en) | Apparatus and method for authenticating the dispatch and contents of documents | |
US9361509B2 (en) | Electronic signature authentication method and system | |
US8230216B2 (en) | Information processing apparatus, control method therefor, information processing system, and program | |
CN1936780B (en) | Information processing apparatus, verification processing apparatus, and control methods thereof | |
EP0516898A1 (en) | Electronic notary | |
JPH06176036A (en) | Method for forming duplication which can be authenticated | |
US20100014668A1 (en) | Image data verification program recorded on a recording medium, image data verification method, and image data verification system | |
CN1777851A (en) | Apparatus, system and method for securing digital documents in a digital appliance | |
JP2004240969A (en) | Storage system for document digitally created and signed | |
JP2019148930A (en) | Two-dimensional code, system and method for outputting two-dimensional code, system and method for reading two-dimensional code, and program | |
US20200169411A1 (en) | Cryptograpic font script with integrated signature for verification | |
CN101388776B (en) | Encryption and decryption method and device for printed document | |
Wellem et al. | Academic document authentication using elliptic curve digital signature algorithm and QR code | |
CN101834726A (en) | Safe encryption method based on bi-dimensional codes | |
US20070133792A1 (en) | Image processing apparatus, control method therefor, computer program, and computer-readable storage medium | |
US8316454B2 (en) | Method and system for protection of user information registrations applicable in electoral processes | |
CN106656511A (en) | Method and system for uniformly managing identity endorsement | |
KR101035868B1 (en) | Method of maintaining the security of documents communicated by fax and computer readable media | |
CN116611082A (en) | A File Electronic Signature Algorithm That Can Improve the Security of Electronic Signature | |
KR100527171B1 (en) | A system for electronic contract and a method thereof | |
CN109614805B (en) | Document anti-counterfeiting image generation and identification method and system | |
JP2007060352A (en) | System, program, and method for managing document | |
CN112989434A (en) | Electronic document encryption tamper-proof decryption verification method |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210618 |
|
RJ01 | Rejection of invention patent application after publication |