WO2020181818A1 - 一种电子文件的加密、解密方法及其装置 - Google Patents

一种电子文件的加密、解密方法及其装置 Download PDF

Info

Publication number
WO2020181818A1
WO2020181818A1 PCT/CN2019/118412 CN2019118412W WO2020181818A1 WO 2020181818 A1 WO2020181818 A1 WO 2020181818A1 CN 2019118412 W CN2019118412 W CN 2019118412W WO 2020181818 A1 WO2020181818 A1 WO 2020181818A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
electronic
encrypted
electronic file
watermark information
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.)
Ceased
Application number
PCT/CN2019/118412
Other languages
English (en)
French (fr)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2020181818A1 publication Critical patent/WO2020181818A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/16Program or content traceability, e.g. by watermarking

Definitions

  • This application relates to the field of encryption technology, in particular to a method and device for encrypting and decrypting electronic files.
  • the inventor of the present invention discovered in the implementation of the above-mentioned prior art that the electronic file may be intercepted by a third person and imitate the second person during the process of transferring an electronic file from the first person to the second person for approval and stamping. People’s seals result in low security in the process of reviewing and stamping electronic documents.
  • this application provides a method and device for encrypting and decrypting electronic files, which can solve the problem of low security in the process of reviewing and stamping electronic files.
  • this application provides an encryption method for electronic files, including: obtaining electronic encrypted seal information and a first electronic file.
  • the electronic encrypted seal information includes a pair of watermark information and a private key in an RSA key.
  • Information obtained after the initial electronic seal is encrypted; the electronic encrypted seal is loaded in the first electronic file to obtain a second electronic file; the second electronic file and the watermark information are passed through a preset encryption algorithm Encrypt and obtain an encrypted electronic file to be sent to the destination address.
  • This application also provides a method for decrypting an electronic file, including: receiving an encrypted electronic file, where the encrypted electronic file is an electronic file obtained by encrypting a second electronic file and watermark information through a preset encryption algorithm; The decryption algorithm decrypts the encrypted electronic file to obtain a second electronic file and first watermark information.
  • the second electronic file includes electronic encryption seal information, and the electronic encryption seal information includes a private key pair in an RSA key.
  • the information obtained after the watermark information and the initial electronic seal are encrypted; the electronic encrypted seal information is decrypted by the public key in the RSA key to obtain the second watermark information; according to the first watermark information and the second watermark Information to determine whether the first watermark information and the second watermark information are the same; if they are the same, the encrypted electronic file is determined to be a legal file; if they are not the same, the encrypted electronic file is determined to be an illegal file.
  • the present application also provides an encryption device for an electronic file, including: an acquiring unit for acquiring electronic encrypted seal information and a first electronic file, the electronic encrypted seal information includes pairing the watermark information and the first electronic file through the private key in the RSA key Information obtained after the initial electronic seal is encrypted; a loading unit for loading the electronic encrypted seal information in the first electronic file to obtain a second electronic file; an encryption unit for storing the second electronic file Together with the watermark information, it is encrypted through a preset encryption algorithm to obtain an encrypted electronic file for sending to the destination address.
  • the present application also provides a computer device, including a memory and a processor, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the above Steps to encrypt electronic files.
  • the present application also provides a non-volatile readable storage medium storing computer readable instructions.
  • the computer readable instructions are executed by one or more processors, the one or more processors can execute as described above. Describe the steps of the encryption method for electronic files.
  • This application also provides an electronic file decryption device, including: a receiving unit for receiving an encrypted electronic file, the encrypted electronic file is an electronic file obtained by encrypting a second electronic file and watermark information together through a preset encryption algorithm File; a first decryption unit for decrypting the encrypted electronic file according to a preset decryption algorithm to obtain a second electronic file and first watermark information, the second electronic file includes electronic encryption seal information, the electronic encryption The seal information includes information obtained by encrypting the watermark information and the initial electronic seal with the private key in the RSA key; the second decryption unit is used to decrypt the electronic encrypted seal information with the public key in the RSA key, Obtaining second watermark information; a determining unit, configured to determine whether the first watermark information and the second watermark information are the same according to the first watermark information and the second watermark information; if they are the same, determine the The encrypted electronic file is a legal file; if they are not the same, it is determined that the encrypted electronic file is an illegal file
  • the present application also provides a computer device, including a memory and a processor, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the above Decryption steps of electronic files.
  • the present application also provides a non-volatile readable storage medium storing computer readable instructions.
  • the computer readable instructions are executed by one or more processors, the one or more processors can execute as described above. Describe the steps of the decryption method of electronic files.
  • this application provides a method and device for encrypting and decrypting electronic files.
  • the electronic encrypted seal information includes the private key pair in the RSA key.
  • the watermark information and the information obtained after the initial electronic seal are encrypted, the second electronic file is obtained by loading the electronic encrypted seal in the first electronic file, so that the second electronic file has higher security, and the second electronic file is further
  • the electronic file and the watermark information are encrypted with a preset encryption algorithm to obtain an encrypted electronic file to be sent to the destination address.
  • the embodiment of the present application encrypts the initial electronic seal to obtain the electronic encrypted seal information, and the electronic file loaded with the electronic encrypted seal information
  • Performing secondary encryption to obtain an encrypted electronic file improves the security of the electronic file during the approval and stamping process, and prevents a third party from tampering with the encrypted electronic file during the process of sending the encrypted electronic file to the destination address.
  • FIG. 1 is a schematic flowchart of an embodiment of an encryption method for an electronic file of this application
  • FIG. 2 is a schematic flowchart of an embodiment of a method for decrypting electronic files of this application
  • FIG. 3 is a schematic structural diagram of an embodiment of an encryption device for electronic files of this application.
  • FIG. 4 is a schematic structural diagram of another embodiment of an encryption device for electronic files of this application.
  • FIG. 5 is a schematic structural diagram of an embodiment of a decryption device for electronic files of this application
  • Fig. 6 is a schematic structural diagram of another embodiment of a decryption device for electronic files of this application.
  • FIG. 1 is a schematic flowchart of an embodiment of an encryption method for electronic files of this application.
  • the execution subject of this embodiment is an encryption device for electronic files, where the encryption device for electronic files can be set independently or on a server used for document approval.
  • the applicable scenario of this embodiment is the encryption of electronic files in the document approval process.
  • the encryption method for electronic files provided in this embodiment includes:
  • Step 101 Obtain the electronic encrypted seal information and the first electronic file.
  • the electronic encrypted seal information in this embodiment includes the information obtained by encrypting the watermark information and the initial electronic seal with the private key in the RSA key.
  • the electronic file is a file to be approved. After the electronic file is approved, the The electronic file is stamped with the electronic seal of the incident and loaded with watermark information, where the watermark information includes at least any one or a combination of the following: approval time, approval start time, submitter information, approver information, and approval department information. Since the initial electronic seal is not a directly obtained electronic seal, the physical seal can be processed to obtain digital data stored in a preset format, and the digital data in the preset format is used as the initial electronic seal.
  • the preset format here It can be digital data in .seal format.
  • the loaded watermark information includes multiple information fields used to approve the file, such as submitter information, submission time, and approval department information for each approval environment, Approval time information and approver information, in the specific process of obtaining electronic encrypted seal information, multiple information fields used for document approval can be extracted from the watermark information, and the multiple information fields used for document approval are in accordance with the preset approval order After sorting to form the approval chain data, the approval chain data and the initial electronic seal are encrypted to obtain the electronic encrypted seal information.
  • the above-mentioned information fields can be separated by the separator "to form data into the approval chain data.
  • the composition format of the approval chain data is as follows: "The composition format is as follows: Example: Example: Get electronic encrypted seal: 00:18/ Project Department user2 2018: Example: Get electronic encrypted seal information. information. Office user3 2018-08-18 15:03:06/General Manager's Office user4 2018-08-23 14:08:15/obtained. Subsequently, the approval chain data and the initial electronic seal are combined into the data to be encrypted, and the electronic encrypted seal information is obtained by encrypting the data to be encrypted. Further, the method for encrypting the watermark information and the initial electronic seal may include any existing encryption algorithm, for example, the RSA algorithm.
  • the key pair can be determined by the RSA algorithm, the encryption step can be performed by the encryption key, and the encryption step can be performed by the decryption key. Decryption steps. It should be noted that, in order to improve the security strength, the RSA key is at least 500 bits long, and the RSA key in this embodiment can be 1024 bits.
  • Step 102 Load the electronic encrypted seal information in the first electronic file to obtain a second electronic file.
  • the electronic encrypted seal information can be loaded into the electronic file to obtain the second electronic file loaded with the initial electronic seal. Since the electronic encrypted seal information loaded in the second electronic file has high security, it cannot be easily cracked by a third party, thereby improving the security of the electronic file.
  • Step 103 Encrypt the second electronic file and the watermark information together by using a preset encryption algorithm to obtain an encrypted electronic file for sending to a destination address.
  • the second electronic file and the watermark information are encrypted by using a preset encryption algorithm to obtain the encrypted electronic file. Since the second electronic file has been covered with the electronic encrypted seal information, the encrypted electronic file after the second electronic file and the watermark information is encrypted by the preset encryption algorithm has higher security and is not easy to be cracked.
  • the preset encryption algorithm may be an encryption algorithm preset by those skilled in the art, such as AES algorithm, chaotic sequence algorithm, LSB algorithm, etc., specifically when the second electronic file and the watermark information are encrypted together
  • the watermark information can be encrypted by a preset encryption algorithm to obtain the encrypted watermark image, and the encrypted watermark image is embedded in the second electronic file to obtain the encrypted electronic file.
  • the watermark information can also be embedded After reaching the second electronic file, the second electronic file embedded with the watermark information is encrypted by using a preset encryption algorithm to obtain the encrypted electronic file.
  • the embodiment of the present application provides an encryption method for an electronic file, by obtaining the electronic encrypted seal information and the first electronic file, since the electronic encrypted seal information includes the private key in the RSA key to encrypt the watermark information and the initial electronic seal After the information obtained, the second electronic file is obtained by loading the electronic encrypted seal in the first electronic file, so that the second electronic file has higher security, and the second electronic file and the watermark information are further passed through the pre Set the encryption algorithm to encrypt to obtain the encrypted electronic file to be sent to the destination address.
  • the embodiment of the present application encrypts the initial electronic seal to obtain the electronic encrypted seal information, and the electronic file loaded with the electronic encrypted seal information
  • Performing secondary encryption to obtain an encrypted electronic file improves the security of the electronic file during the approval and stamping process, and prevents a third party from tampering with the encrypted electronic file during the process of sending the encrypted electronic file to the destination address.
  • FIG. 2 is a schematic flowchart of an embodiment of a method for decrypting an electronic file of this application.
  • the execution subject of this embodiment is a file decryption device, where the file decryption device can be set independently or on a decryption server for electronic files.
  • the applicable scenario of this embodiment is that the second encrypted electronic file is decrypted after all the file approval procedures are completed.
  • the encryption method for electronic files provided in this embodiment includes:
  • Step 201 Receive an encrypted electronic file, where the encrypted electronic file is an electronic file obtained by encrypting the second electronic file and the watermark information through a preset encryption algorithm.
  • the encrypted electronic file is an electronic file obtained by encrypting the second electronic file and the watermark information through a preset encryption algorithm, and has high security. If the electronic file is not decrypted, the content in the electronic file cannot be directly obtained.
  • Step 202 Decrypt the encrypted electronic file according to a preset decryption algorithm to obtain a second electronic file and first watermark information.
  • the second electronic file includes electronic encrypted seal information
  • the electronic encrypted seal information includes information obtained after the watermark information and the initial electronic seal are encrypted by the private key in the RSA key.
  • the encrypted electronic file can be decrypted according to a preset decryption algorithm, and the second electronic file and the first watermark information can be obtained after decryption .
  • the preset decryption algorithm here and the preset encryption algorithm in step 103 are reverse processes. Since the watermark information is used twice in the encryption process of the electronic file, the second encrypted electronic file is decrypted to obtain What is obtained is the watermark information used in the second encryption process of the electronic file, that is, the first watermark information.
  • Step 203 Decrypt the electronically encrypted seal information by using the public key in the RSA key to obtain second watermark information.
  • This embodiment uses the asymmetric encryption algorithm RSA algorithm.
  • the RSA algorithm uses a 1024-bit key, that is, a pair of RSA keys is determined by the RSA encryption algorithm, one of which is the secret key (SK), which is used by various departments for electronic files
  • SK secret key
  • the encrypted terminal is stored and used to encrypt and obtain the electronic encrypted seal information; the other is a public key (PK), which is stored in the terminal for printing electronic documents, and is used to decrypt the electronic encrypted seal information.
  • PK public key
  • the process of decrypting the electronically encrypted seal information using the public key in the RSA key is the reverse of the process of encrypting the initial electronic seal and watermark information in step 101, because the watermark information is encrypted in the electronic file
  • the process is used twice, so by decrypting the electronic encrypted seal information, what is obtained is the watermark information used in the second encryption process of the electronic file, that is, the second watermark information.
  • Step 204 Determine whether the first watermark information and the second watermark information are the same according to the first watermark information and the second watermark information.
  • the first watermark information and the second watermark information extracted by decrypting the second encrypted electronic file should also be the same watermark information. Whether the first watermark information is the same as the second watermark information can be found in time whether the electronic file is tampered. In the process of determining whether the first watermark information and the second watermark information are the same, because the first watermark information and the second watermark information include multiple information fields used to approve documents, for example, submitter information, submission time, and each approval Environmental approval department information, approval time information, and approver information can be specifically compared by comparing the multiple information fields used for document approval in the first watermark information and the multiple information fields used for document approval in the second watermark information.
  • the encrypted electronic file is determined to be a legal file; if there is at least one information field that does not correspond to the same, then the encrypted electronic file is determined to be an illegal file.
  • Step 205a If the same, determine that the encrypted electronic file is a legal file. For the embodiments of the present application, if they are the same, it means that the electronic file has not been tampered with during the transmission process, and it is determined that the encrypted electronic file is a legal file.
  • Step 205b corresponds to step 205a. If it is not the same, it is determined that the encrypted electronic file is an illegal file. For the embodiments of this application, if they are not the same, it means that the electronic file may be tampered with during transmission, and it is determined that the encrypted electronic file is an illegal file.
  • the initial electronic seal and watermark information can be encrypted
  • the initial electronic seal and the encrypted electronic seal and watermark information can also be encrypted as a whole.
  • the new information is the same as the watermark information, so that in the process of decrypting encrypted electronic files after all departments have stamped, the decrypted new information can be extracted first, and further, the electronic encrypted seal information can be decrypted through PK.
  • the decrypted watermark information Obtain the decrypted watermark information, and then compare the decrypted watermark information with the decrypted newly added information. After the comparison is the same, the encrypted electronic file is determined to be a legal file, otherwise the encrypted electronic file is determined to be an illegal file .
  • the encrypted electronic file is a legal file
  • the first watermark can be The information or the second watermark information is converted into target characters or target two-dimensional codes through a preset conversion algorithm; the target characters or target two-dimensional codes are loaded in the second electronic file and output, so that the electronic file can be viewed more intuitively.
  • the method for decrypting an electronic file receives an encrypted electronic file. Since the encrypted electronic file is an electronic file obtained by encrypting the second electronic file and watermark information together through a preset encryption algorithm, it has a higher Security, the encrypted electronic file needs to be decrypted according to the preset decryption algorithm to obtain the second electronic file and the first watermark information, and then the electronic encrypted seal information is decrypted by the public key in the RSA key to obtain the second watermark Information, by judging whether the first watermark information and the second watermark information are the same to determine whether the encrypted electronic file is a legal file.
  • the embodiment of the present application encrypts the initial electronic seal to obtain the electronic encrypted seal information, and the electronic file loaded with the electronic encrypted seal information
  • Performing secondary encryption to obtain an encrypted electronic file improves the security of the electronic file during the approval and stamping process, and prevents a third party from tampering with the encrypted electronic file during the process of sending the encrypted electronic file to the destination address.
  • an embodiment of the present application provides an electronic file encryption device.
  • the electronic file encryption device includes: a first obtaining unit 31, a processing unit 32 and encryption unit 33, in which,
  • the obtaining unit 31 may be used to obtain the electronic encrypted seal information and the first electronic file.
  • the electronic encrypted seal information includes the information obtained after the watermark information and the initial electronic seal are encrypted by the private key in the RSA key;
  • the loading unit 32 Can be used to load the electronic encrypted seal information in the first electronic file to obtain a second electronic file;
  • the encryption unit 33 can be used to pass the second electronic file and the watermark information together through a preset
  • the encryption algorithm performs encryption to obtain an encrypted electronic file to be sent to the destination address.
  • the electronic file encryption device obtaineds the electronic encrypted seal information and the first electronic file, since the electronic encrypted seal information includes the watermark information and the initial electronic seal encrypted by the private key in the RSA key
  • the second electronic file is obtained by loading the electronic encrypted seal in the first electronic file, so that the second electronic file has higher security, and the second electronic file and the watermark information are further encrypted by preset
  • the algorithm is encrypted to obtain an encrypted electronic file to be sent to the destination address.
  • the embodiment of the present application encrypts the initial electronic seal to obtain the electronic encrypted seal information, and the electronic file loaded with the electronic encrypted seal information
  • Performing secondary encryption to obtain an encrypted electronic file improves the security of the electronic file during the approval and stamping process, and prevents a third party from tampering with the encrypted electronic file during the process of sending the encrypted electronic file to the destination address.
  • the device further includes:
  • the processing unit 34 may be configured to process the physical seal to obtain digital data stored in a preset format before obtaining the electronic encrypted seal information, and use the digital data in the preset format as the initial electronic seal.
  • the watermark information includes multiple information fields for document approval
  • the acquisition unit 31 includes: an extraction module 311, which can be used to extract multiple information fields for document approval from the watermark information;
  • the sorting module 312 can be used to sort the multiple information fields used for the approval document according to a preset approval order to form approval chain data;
  • the encryption module 313 can be used to combine the approval chain data and the initial electronic seal After encryption, the electronic encrypted seal information is obtained.
  • this embodiment also provides a storage medium on which a computer program is stored.
  • the program is executed by a processor, the encryption of the electronic file shown in FIG. method.
  • an embodiment of the application provides an electronic file decryption device.
  • the electronic file decryption device provided in this embodiment includes: a receiving unit 41, a first A decryption unit 42, a second decryption unit 43, and a determination unit 44;
  • the receiving unit 41 may be used to receive an encrypted electronic file, the encrypted electronic file is an electronic file obtained by encrypting the second electronic file and the watermark information together through a preset encryption algorithm; the first decryption unit 42 may be used to Suppose that a decryption algorithm decrypts the encrypted electronic file to obtain a second electronic file and first watermark information.
  • the second electronic file includes electronic encrypted seal information, and the electronic encrypted seal information includes a private key in an RSA key.
  • the electronic file decryption device receives encrypted electronic files. Since the encrypted electronic file is an electronic file obtained by encrypting the second electronic file and the watermark information through a preset encryption algorithm, it has high security. , The encrypted electronic file needs to be decrypted according to the preset decryption algorithm to obtain the second electronic file and the first watermark information, and then the electronic encrypted seal information is decrypted by the public key in the RSA key to obtain the second watermark information, Determine whether the encrypted electronic file is a legal file by judging whether the first watermark information and the second watermark information are the same.
  • the embodiment of the present application encrypts the initial electronic seal to obtain the electronic encrypted seal information, and the electronic file loaded with the electronic encrypted seal information
  • Performing secondary encryption to obtain an encrypted electronic file improves the security of the electronic file during the approval and stamping process, and prevents a third party from tampering with the encrypted electronic file during the process of sending the encrypted electronic file to the destination address.
  • the device further includes: a conversion unit 45, which can be used to convert the first watermark information or the second watermark information after determining that the encrypted electronic file is a legal file
  • a conversion unit 45 which can be used to convert the first watermark information or the second watermark information after determining that the encrypted electronic file is a legal file
  • a preset conversion algorithm is used to convert the target character or target two-dimensional code
  • the output unit 46 can be used to load the target character or target two-dimensional code into the second electronic file for output.
  • the first watermark information and the second watermark information include multiple information fields for approving documents, and the determining unit 44 includes:
  • the comparison module 441 can be used to compare whether multiple information fields used for approving files in the first watermark information correspond to the same with multiple information fields used for approving files in the second watermark information;
  • the determining module 442 may be configured to determine that the encrypted electronic file is a legal file if the multiple information fields in the first watermark information and the second watermark information are the same; the determining module 442 may also If there is at least one information field that does not correspond to the same, determine that the encrypted electronic file is an illegal file.
  • this embodiment also provides a non-volatile readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the foregoing
  • the decryption method of electronic files is shown in Figure 2.
  • the software product can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.), including several
  • the instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute the methods described in each implementation scenario of this application.
  • the embodiment of the present application also provides a computer device, which may be a personal computer, Server, network device, etc.
  • the physical device includes a nonvolatile readable storage medium and a processor; a nonvolatile readable storage medium for storing computer readable instructions; a processor for executing computer readable instructions to The method for encrypting and decrypting electronic files as shown in Figures 1 to 2 is realized.
  • the computer equipment may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a Wi-Fi module, and so on.
  • the user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, and the like.
  • the network interface can optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), etc.
  • the storage medium may also include an operating system and a network communication module.
  • the operating system is a program that manages the hardware and software resources of the above-mentioned computer equipment, and supports the operation of information processing programs and other software and/or programs.
  • the network communication module is used to realize the communication between the various components in the storage medium and the communication with other hardware and software in the physical device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Storage Device Security (AREA)
  • Document Processing Apparatus (AREA)

Abstract

一种电子文件的加密方法及其装置。该方法包括:获取电子加密印章信息以及第一电子文件(101),所述电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息;将所述电子加密印章信息加载在所述第一电子文件中,获得第二电子文件(102);将所述第二电子文件和所述水印信息一起通过预设加密算法进行加密,获得用以发送至目的地址的加密电子文件(103)。通过对初始电子印章加密,以及对加载有电子加密印章信息的第一电子文件进行加密,提高了电子文件在审批并加盖印章的过程中安全性,避免将加密电子文件向目的地址发送过程中第三方篡改加密电子文件。

Description

一种电子文件的加密、解密方法及其装置
本申请要求与2019年3月11日提交中国专利局、申请号为2019101816823、申请名称为“一种电子文件的加密、解密方法及其装置”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及加密技术领域,尤指一种电子文件的加密、解密方法及其装置。
背景技术
随着科技的发展,电子印章已经广泛的应用在人们生活中,其中,电子印章是以先进的数字技术模拟传统实物印章。
通常,在不同人员对同一文件进行审批并分别加盖印章时,人员可以对审批合格的文件加盖电子印章,从而减少纸质文件需要传输到不同地方进行印章的加盖。
然而,本发明的发明人在实现上述现有技术中发现,电子文件从第一人传输到第二人进行审批和加盖印章的过程中,该电子文件可能被第三人拦截并仿制第二人的印章,从而导致电子文件在审批并加盖印章的过程中安全性较低。
发明内容
为了解决上述技术问题,本申请提供了一种电子文件的加密、解密方法及装置,能够解决电子文件在审批并加盖印章的过程中安全性较低的问题。
为了达到本申请目的,本申请提供了一种电子文件的加密方法,包括:获取电子加密印章信息以及第一电子文件,所述电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息;将所述电子加密印章加载在所述第一电子文件中,获得第二电子文件;将所述第二电子文件和所述水印信息一起通过预设加密算法进行加密,获得用以发送至目的地址的加密电子文件。
本申请还提供了一种电子文件的解密方法,包括:接收加密电子文件,所述加密电子文件为将第二电子文件和水印信息一起通过预设加密算法进行加密获得的电子文件;根据预设解密算法对所述加密电子文件进行解密,获得第二电子文件和第一水印信息,所述第二电子文件包括电子加密印章信息,所述电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息;通过RSA密钥中的公钥对所述电子加密印章信息进行解密,获得第二水印信息;根据所述第一水印信息和所述第二水印信息,确定所述第一水印信息与所述第二水印信息是否相同;若相同,则确定所述加密电子文件为合法文件;若不相同,则确定所述加密电子文件为非法文件。
本申请还提供了一种电子文件的加密装置,包括:获取单元,用于获取电子加密印章信息以及第一电子文件,所述电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息;加载单元,用于将所述电子加密印章信息加载在所述第一电子文件中,获得第二电子文件;加密单元,用于将所述第二电子文件和所述水印信息一起通过预设加密算法进行加密,获得用以发送至目的地址的加密电子文件。
本申请还提供了一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行如上所述电子文件的加密步骤。
本申请还提供了一种存储有计算机可读指令的非易失性可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行如上述所述电子文件的加密方法的步骤。
本申请还提供了一种电子文件的解密装置,包括:接收单元,用于接收加密电子文件,所述加密电子文件为将第二电子文件和水印信息一起通过预设加密算法进行加密获得的电子文件;第一解密单元,用于根据预设解密算法对所述加密电子文件进行解密,获得第二电子文件和第一水印信息,所述第二电子文件包括电子加密印章信息,所述电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息;第二解密单元,用于通过RSA密钥中的公钥对所述电子加密印章信息进行解密,获得第二水印信息;确定单元,用于根据所述第一水印信息和所述第二水印信息,确定所述第一水印信息与所述第二水印信息是否相同;若相同,则确定所述加密电子文件为合法文件;若不相同,则确定所述加密电子文件为非法文件。
本申请还提供了一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行如上所述电子文件的解密步骤。
本申请还提供了一种存储有计算机可读指令的非易失性可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行如上述所述电子文件的解密方法的步骤。
借由上述技术方案,本申请提供了一种电子文件的加密、解密方法及装置,通过获取电子加密印章信息以及第一电子文件,由于电子加密印章信息中包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息,通过将电子加密印章加载在第一电子文件中,获得第二电子文件,使得该第二电子文件具有较高的安全性,进一步再将第二电子文件和水印信息一起通过预设加密算法进行加密,获得用以发送至目的地址的加密电子文件。与现有技术中在电子文件上直接进行审批和加盖印章的方式相比,本申请实施例通过对初始电子印章进行加密,得到电子加密印章信息,以及对加载有电子加密印章信息的电子文件进行二次加密,得到加密电子文件提高了电子文件在审批并加盖印章的过程中安全性,避免将加密电子文件向目的地址发送过程中第三方篡改加密电子文件。
附图说明
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本申请的技术方案,并不构成对本申请技术方案的限制。
图1为本申请电子文件的加密方法一实施例的流程示意图;
图2为本申请电子文件的解密方法一实施例的流程示意图;
图3为本申请电子文件的加密装置一实施例的结构示意图;
图4为本申请电子文件的加密装置另一实施例的结构示意图;
图5为本申请电子文件的解密装置一实施例的结构示意图;
图6为本申请电子文件的解密装置另一实施例的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚明白,下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
图1为本申请电子文件的加密方法一实施例的流程示意图。如图1所示,本实施例的执行主体是电子文件的加密装置,其中,电子文件的加密装置可以独立设置,也可以设置在用于审批文件的服务器上。本实施例的适用场景为文件审批过程中对电子文件的进行加密。本实施例提供的电子文件的加密方法,包括:
步骤101、获取电子加密印章信息以及第一电子文件。
本实施例中的电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息,该电子文件是准备审批的文件,在该电子文件审批通过后可以对该电子文件加盖所述出事电子印章以及加载水印信息,其中,水印信息至少包括以下任意一项或其组合:审批通过时间、审批开始时间、提交人信息、审批人信息、审批部门信息。由于初始电子印章并非是直接获取的电子印章,具体可以通过对物理印章进行处理,得到存储为预设格式的数字数据,并将该预设格式的数字数据作为初始电子印章,这里的预设格式可以为.seal格式的数字数据。举例来讲,通过将物理印章模加盖到白纸上,接着,将白纸上的盖的印记转化为图片信息,再接着经过对图片的剪裁,调色,去除点,休边等操作后,将处理后获得的图片信息存储为.seal格式的数字数据。对于本申请实施例,在进行文件电子文件的加密操作的同时,加载的水印信息中包括用于审批文件的多个信息字段,例如,提交人信息,提交时间,各个审批环境的审批部门信息,审批时间信息和审批人信息,具体获取电子加密印章信息的过程中,可以从水印信息中提取用于审批文件的多个信息字段,并将用于审批文件的多个信息字段按照预设审批顺序进行排序组成审批链数据,并将审批链数据和初始电子印章进行加密后,获得电子加密印章信息。
示例性的,上述的信息字段可以以分隔符“分隔将数据组成审批链数据,审批链数据的组成格式如下例:“组成格式如下例:下例:例:得电子加密印:00:18/项目部user2 2018:例:得电子加密印章信息。信息。办公室user3 2018-08-18 15:03:06/总经办user4 2018-08-23 14:08:15/获。随后将审批链数据和初始电子印章组合成为待加密数据,通过对待加密数据进行加密后得到电子加密印章信息。进一步的,对水印信息和初始电子印章进行加密的方法可以包括现有任何加密算法,例如,RSA算法,通过RSA算法可以确定密钥对,通过加密密钥可以执行加密步骤,通过解密密钥执行解密步骤。需要说明的是,为提高保密强度,RSA密钥至少为500位长,本实施例的RSA密钥可以采用1024位。
步骤102、将所述电子加密印章信息加载在所述第一电子文件中,获得第二电子文件。
具体的,在该第一电子文件审批通过后,为了防止第三方拦截并篡改第一电子文件,可以将电子加密印章信息加载在电子文件中,以获得加载有初始电子印章的第二电子文件,由于第二电子文件中加载的电子加密印章信息具有较高的安全性,并非第三方可以轻易破解,从而提高了电子文件的安全性。
步骤103、将所述第二电子文件和所述水印信息一起通过预设加密算法进行加密,获得用以发送至目的地址的加密电子文件。
具体的,为了提高第二电子文件发送至目的地址的安全性,通过预设加密算法对第二电子文件和水印信息进行加密,获得加密电子文件。由于第二电子文件中已经覆盖有电子加密印章信息,使得利用预设加密算法对第二电子文件和水印信息进行二次加密后的加密电子文件具有更高的安全性,不易被破解。需要说明的是,该预设加密算法可以是本领域技术人预先设定的加密算法,例如AES算法、混沌序列算法、LSB算法等等,具体在将第二电子文件和水印信息一起进行加密的过程中,可以通过预设加密算法对水印信息进行加密后,得到加密水印的图像,并将加密水印的图像嵌入至第二电子文件中,从而得到加密电子文件,当然还可以在将水印信息嵌入至第二电子文件后,通过预设加密算法对嵌入水印信息的第二电子文件进行加密后,得到加密电子文件。
本申请实施例提供的一种电子文件的加密方法,通过获取电子加密印章信息以及第一电子文件,由于电子加密印章信息中包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息,通过将电子加密印章加载在第一电子文件中,获得第二电子文件,使得该第二电子文件具有较高的安全性,进一步再将第二电子文件和水印信息一起通过预设加密算法进行加密,获得用以发送至目的地址的加密电子文件。与现有技术中在电子文件上直接进行审批和加盖印章的方式相比,本申请实施例通过对初始电子印章进行加密,得到电子加密印章信息,以及对加载有电子加密印章信息的电子文件进行二次加密,得到加密电子文件提高了电子文件在审批并加盖印章的过程中安全性,避免将加密电子文件向目的地址发送过程中第三方篡改加密电子文件。
图2为本申请电子文件的解密方法一实施例的流程示意图。如图2所示,本实施例的执行主体是解密文件装置,其中,解密文件装置可以独立设置,也可以设置在用于电子文件的解密服务器上。本实施例的适用场景为文件全部审批流程结束后对第二加密电子文件进行解密。本实施例提供的电子文件的加密方法,包括:
步骤201、接收加密电子文件,所述加密电子文件为将第二电子文件和水印信息一起通过预设加密算法进行加密获得的电子文件。其中,加密电子文件是为将第二电子文件和水印信息一起通过预设加密算法进行加密获得的电子文件,具有较高的安全性,如果不对电子文件进行解密无法直接获取电子文件中的内容。
步骤202、根据预设解密算法对所述加密电子文件进行解密,获得第二电子文件和第一水印信息。其中,第二电子文件包括电子加密印章信息,该电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息。对于本申请实施例,在接收到加密电子文件后,为了验证接收方并非第三方拦截,可以根据预设解密算法对加密电子文件进行解密,通过解密后可以获得第二电子文件和第一水印信息。需要说明的是,这里的预设解密算法与步骤103中预设加密算法为逆向过程,由于水印信息在电子文件的加密过程中使用了两次,所以通过对第二加密电子文件进行解密,获取到的是电子文件在第二次加密过程中使用的水印信息,即第一水印信息。
步骤203、通过RSA密钥中的公钥对所述电子加密印章信息进行解密,获得第二水印信息。
本实施例采用非对称加密算法RSA算法,RSA算法采用1024位密钥,即通过RSA加密算法确定一对RSA密钥,其中之一是私密密钥(SK),由各部门用于电子文件的加密终端保存,用来加密得到电子加密印章信息;另一个为公开密钥(PK),保存于打印电子文件的终端,用于对电子加密印章信息进行解密。需要说明的是,这里通过RSA密钥中的公钥对电子加密印章信息进行解密的过程为与步骤101中对初始电子印章和水印信息进行加密的过程的逆向,由于水印信息在电子文件的加密过程中使用了两次,所以通过对电子加密印章信息进行解密,获取到的是电子文件在第二次加密过程中使用的水印信息,即第二水印信息。
步骤204、根据所述第一水印信息和所述第二水印信息,确定所述第一水印信息与所述第二水印信息是否相同。
由于加密电子文件过程中所使用的水印信息为相同的水印信息,所以对第二加密电子文件解密所提取到的第一水印信息和第二水印信息也应该是相同的水印信息,通过比对第一水印信息与第二水印信息 是否相同,可以及时发现电子文件是否为篡改。在确定第一水印信息与第二水印信息是否相同的过程中,由于第一水印信息和第二水印信息中包括用于审批文件的多个信息字段,例如,提交人信息,提交时间,各个审批环境的审批部门信息,审批时间信息和审批人信息,具体可以通过比较第一水印信息中的用于审批文件的多个信息字段与第二水印信息中用于审批文件的多个信息字段是否对应相同;若第一水印信息与第二水印信息中的多个信息字段均对应相同,则确定加密电子文件为合法文件;若存在至少一个信息字段不对应相同,则确定加密电子文件为非法文件。
步骤205a、若相同,则确定所述加密电子文件为合法文件。对于本申请实施例,若相同,则说明电子文件在传输过程中未被篡改,确定该加密电子文件为合法文件。
与步骤205a相对应的有步骤205b、若不相同,则确定所述加密电子文件为非法文件。对于本申请实施例,若不相同,则说明电子文件在传输过程中可能被篡改,确定该加密电子文件为非法文件。需要说明的是,由于在电子文件的加密过程中,可以在对初始电子印章和水印信息进行加密的同时,还可以将初始电子印章以及加密后的电子印章和水印信息进行整体加密,还可以增加与水印信息相同的新增信息,从而在所有部门盖章结束后对加密电子文件进行解密的过程中,可以首先提取解密后的新增信息,进一步的,通过PK对电子加密印章信息进行解密,获得解密后的水印信息,接着,将解密后的水印信息与解密后的新增信息进行比对,在比对相同后,确定该加密电子文件为合法文件,否则确定该加密电子文件为非法文件。
优选的,在上述实施例的基础上,如果加密电子文件为合法文件,说明电子文件是安全的,进一步在确定加密电子文件为合法文件之后,为了便于对电子文件的打印,可以将第一水印信息或第二水印信息通过预设转换算法,转换为目标字符或目标二维码;将目标字符或目标二维码加载在第二电子文件中输出,从而可以更直观的查看电子文件。
本申请实施例提供的一种电子文件的解密方法,通过接收加密电子文件,由于加密电子文件为将第二电子文件和水印信息一起通过预设加密算法进行加密获得的电子文件,具有较高的安全性,需要根据预设解密算法对加密电子文件进行解密,从而获得第二电子文件和第一水印信息,进一步再通过RSA密钥中的公钥对电子加密印章信息进行解密,获得第二水印信息,通过判断第一水印信息和第二水印信息是否相同来确定加密电子文件是否为合法文件。与现有技术中在电子文件上直接进行审批和加盖印章的方式相比,本申请实施例通过对初始电子印章进行加密,得到电子加密印章信息,以及对加载有电子加密印章信息的电子文件进行二次加密,得到加密电子文件提高了电子文件在审批并加盖印章的过程中安全性,避免将加密电子文件向目的地址发送过程中第三方篡改加密电子文件。
进一步地,作为图1所述方法的具体实现,本申请实施例提供了一种电子文件的加密装置,如图3所示,所述电子文件的加密装置包括:第一获取单元31、处理单元32和加密单元33,其中,
获取单元31,可以用于获取电子加密印章信息以及第一电子文件,所述电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息;加载单元32,可以用于将所述电子加密印章信息加载在所述第一电子文件中,获得第二电子文件;加密单元33,可以用于将所述第二电子文件和所述水印信息一起通过预设加密算法进行加密,获得用以发送至目的地址的加密电子文件。
本申请实施例提供的电子文件的加密装置,通过获取电子加密印章信息以及第一电子文件,由于电子加密印章信息中包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息,通过将电子加密印章加载在第一电子文件中,获得第二电子文件,使得该第二电子文件具有较高的安全性,进一步再将第二电子文件和水印信息一起通过预设加密算法进行加密,获得用以发送至目的地址的加密电子文件。与现有技术中在电子文件上直接进行审批和加盖印章的方式相比,本申请实施例通过对初始电子印章进行加密,得到电子加密印章信息,以及对加载有电子加密印章信息的电子文件进行二次加密,得到加密电子文件提高了电子文件在审批并加盖印章的过程中安全性,避免将加密电子文件向目的地址发送过程中第三方篡改加密电子文件。
在具体的应用场景中,如图4所示,所述装置还包括:
处理单元34,可以用于在所述获取电子加密印章信息之前,通过对物理印章进行处理,得到存储为预设格式的数字数据,将所述预设格式的数字数据作为初始电子印章。
进一步地,所述水印信息中包括用于审批文件的多个信息字段,所述获取单元31包括:提取模块311,可以用于从所述水印信息中提取用于审批文件的多个信息字段;排序模块312,可以用于将所述用于审批文件的多个信息字段按照预设审批顺序进行排序组成审批链数据;加密模块313,可以用于将所述审批链数据和所述初始电子印章进行加密后,获得电子加密印章信息。
需要说明的是,本实施例提供的一种电子文件的加密装置所涉及各功能单元的其他相应描述,可以参考图1的对应描述,在此不再赘述。
基于上述如图1所示方法,相应的,本实施例还提供了一种存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述如图1所示的电子文件的加密的方法。
进一步地,作为图2所述方法的具体实现,本申请实施例提供了一种电子文件的解密装置,如图5所示,本实施例提供的电子文件的解密装置包括:接收单元41、第一解密单元42、第二解密单元43和确定单元44;
接收单元41,可以用于接收加密电子文件,所述加密电子文件为将第二电子文件和水印信息一起通过预设加密算法进行加密获得的电子文件;第一解密单元42,可以用于根据预设解密算法对所述加密电子文件进行解密,获得第二电子文件和第一水印信息,所述第二电子文件包括电子加密印章信息,所述电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息;第二解密单元43,可以用于通过RSA密钥中的公钥对所述电子加密印章信息进行解密,获得第二水印信息;确定单元44,可以用于根据所述第一水印信息和所述第二水印信息,确定所述第一水印信息与所述第二水印信息是否相同;若相同,则确定所述加密电子文件为合法文件;若不相同,则确定所述加密电子文件为非法文件。
本申请实施例提供的电子文件的解密装置,通过接收加密电子文件,由于加密电子文件为将第二电子文件和水印信息一起通过预设加密算法进行加密获得的电子文件,具有较高的安全性,需要根据预设解密算法对加密电子文件进行解密,从而获得第二电子文件和第一水印信息,进一步再通过RSA密钥中的公钥对电子加密印章信息进行解密,获得第二水印信息,通过判断第一水印信息和第二水印信息是否相同来确定加密电子文件是否为合法文件。与现有技术中在电子文件上直接进行审批和加盖印章的方式相比,本申请实施例通过对初始电子印章进行加密,得到电子加密印章信息,以及对加载有电子加密印章信息的电子文件进行二次加密,得到加密电子文件提高了电子文件在审批并加盖印章的过程中安全性,避免将加密电子文件向目的地址发送过程中第三方篡改加密电子文件。
在具体的应用场景中,如图6所示,所述装置还包括:转换单元45,可以用于在确定所述加密电子文件为合法文件之后,将第一水印信息或所述第二水印信息通过预设转换算法,转换为目标字符或目标二维码;输出单元46,可以用于将所述目标字符或目标二维码加载在所述第二电子文件中输出。
进一步的,所述第一水印信息和所述第二水印信息中包括用于审批文件的多个信息字段,所述确定单元44包括:
比较模块441,可以用于比较所述第一水印信息中的用于审批文件的多个信息字段与所述第二水印信息中用于审批文件的多个信息字段是否对应相同;
确定模块442,可以用于若所述第一水印信息与所述第二水印信息中的多个信息字段均对应相同,则确定所述加密电子文件为合法文件;所述确定模块442,还可以用于若存在至少一个信息字段不对应相同,则确定所述加密电子文件为非法文件。
需要说明的是,本实施例提供的一种电子文件的解密装置所涉及各功能单元的其他相应描述,可以参考图2的对应描述,在此不再赘述。基于上述如图2所示方法,相应的,本实施例还提供了一种非易失性可读存储介质,其上存储有计算机可读指令,该计算机可读指令被处理器执行时实现上述如图2所示的电子文件的解密方法。基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施场景所述的方法。基于上述如图1至图2所示的方法,以及图3至图6所示的虚拟装置实施例,为了实现上述目的,本申请实施例还提供了一种计算机设备,具体可以为个人计算机、服务器、网络设备等,该实体设备包括非易失性可读存储介质和处理器;非易失性可读存储介质,用于存储计算机可读指令;处理器,用于执行计算机可读指令以实现上述如图1至图2所示的电子文件的加密、解密的方法。
可选地,该该计算机设备还可以包括用户接口、网络接口、摄像头、射频(Radio Frequency,RF)电路,传感器、音频电路、WI-FI模块等等。用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard)等,可选用户接口还可以包括USB接口、读卡器接口等。网络接口可选的可以包括标准的有线接口、无线接口(如蓝牙接口、WI-FI接口)等。本领域技术人员可以理解,本实施例提供的电子文件的加密、解密的方法对应的实体设备结构并不构成对该实体设备的限定,可以包括更多或更少的部件,或者组合某些部件,或者不同的部件布置。存储介质中还可以包括操作系统、网络通信模块。操作系统是管理上述计算机设备硬件和软件资源的程序,支持信息处理程序以及其它软件和/或程序的运 行。网络通信模块用于实现存储介质内部各组件之间的通信,以及与该实体设备中其它硬件和软件之间通信。通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本申请可以借助软件加必要的通用硬件平台的方式来实现,也可以通过硬件实现。通过应用本申请的技术方案,与目前现有技术相比,通过对初始电子印章进行加密,得到电子加密印章信息,以及对加载有电子加密印章信息的电子文件进行二次加密,得到加密电子文件提高了电子文件在审批并加盖印章的过程中安全性,避免将加密电子文件向目的地址发送过程中第三方篡改加密电子文件。
本领域技术人员可以理解附图只是一个优选实施场景的示意图,附图中的模块或流程并不一定是实施本申请所必须的。本领域技术人员可以理解实施场景中的装置中的模块可以按照实施场景描述进行分布于实施场景的装置中,也可以进行相应变化位于不同于本实施场景的一个或多个装置中。上述实施场景的模块可以合并为一个模块,也可以进一步拆分成多个子模块。上述本申请序号仅仅为了描述,不代表实施场景的优劣。以上公开的仅为本申请的几个具体实施场景,但是,本申请并非局限于此,任何本领域的技术人员能思之的变化都应落入本申请的保护范围。

Claims (20)

  1. 一种电子文件的加密方法,包括:
    获取电子加密印章信息以及第一电子文件,所述电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息;
    将所述电子加密印章信息加载在所述第一电子文件中,获得第二电子文件;
    将所述第二电子文件和所述水印信息一起通过预设加密算法进行加密,获得用以发送至目的地址的加密电子文件。
  2. 根据权利要求1所述的方法,所述水印信息中包括用于审批文件的多个信息字段,所述获取电子加密印章信息包括:
    从所述水印信息中提取用于审批文件的多个信息字段;
    将所述用于审批文件的多个信息字段按照预设审批顺序进行排序组成审批链数据;
    将所述审批链数据和所述初始电子印章进行加密后,获得电子加密印章信息。
  3. 根据权利要求1所述的方法,在所述获取电子加密印章信息之前,所述方法还包括:
    通过对物理印章进行处理,得到存储为预设格式的数字数据,将所述预设格式的数字数据作为初始电子印章。
  4. 一种电子文件的解密方法,包括:
    接收加密电子文件,所述加密电子文件为将第二电子文件和水印信息一起通过预设加密算法进行加密获得的电子文件;
    根据预设解密算法对所述加密电子文件进行解密,获得第二电子文件和第一水印信息,所述第二电子文件包括电子加密印章信息,所述电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息;
    通过RSA密钥中的公钥对所述电子加密印章信息进行解密,获得第二水印信息;
    根据所述第一水印信息和所述第二水印信息,确定所述第一水印信息与所述第二水印信息是否相同;
    若相同,则确定所述加密电子文件为合法文件;
    若不相同,则确定所述加密电子文件为非法文件。
  5. 根据权利要求4所述的方法,所述第一水印信息和所述第二水印信息中包括用于审批文件的多个信息字段,所述根据所述第一水印信息和所述第二水印信息,确定所述第一水印信息与所述第二水印信息是否相同包括:
    比较所述第一水印信息中的用于审批文件的多个信息字段与所述第二水印信息中用于审批文件的多个信息字段是否对应相同;
    若所述第一水印信息与所述第二水印信息中的多个信息字段均对应相同,则确定所述加密电子文件为合法文件;
    若存在至少一个信息字段不对应相同,则确定所述加密电子文件为非法文件。
  6. 根据权利要求5所述的方法,在所述确定所述加密电子文件为合法文件之后,还包括:
    将第一水印信息或所述第二水印信息通过预设转换算法,转换为目标字符或目标二维码;
    将所述目标字符或目标二维码加载在所述第二电子文件中输出。
  7. 一种电子文件的加密装置,包括:
    获取单元,用于获取电子加密印章信息以及第一电子文件,所述电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息;
    加载单元,用于将所述电子加密印章信息加载在所述第一电子文件中,获得第二电子文件;
    加密单元,用于将所述第二电子文件和所述水印信息一起通过预设加密算法进行加密,获得用以发送至目的地址的加密电子文件。
  8. 根据权利要求7所述的装置,所述水印信息中包括用于审批文件的多个信息字段;所述获取单元包括:
    提取模块,用于从所述水印信息中提取用于审批文件的多个信息字段;
    排序模块,用于将所述用于审批文件的多个信息字段按照预设审批顺序进行排序组成审批链数据;
    加密模块,用于将所述审批链数据和所述初始电子印章进行加密后,获得电子加密印章信息。
  9. 根据权利要求7所述的装置,所述装置还包括:
    处理单元,用于在所述获取电子加密印章信息之前,通过对物理印章进行处理,得到存储为预设格式的数字数据,将所述预设格式的数字数据作为初始电子印章。
  10. 一种电子文件的解密装置,包括:
    接收单元,用于获取第二加密电子文件,所述第二加密电子文件包括将第二电子文件和所述水印信息一起通过预设加密算法进行加密获得的电子文件,所述第二电子文件包括加载有所述电子加密印章的电子文件,所述电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息;
    第一解密单元,用于根据预设解密算法对所述第二加密电子文件进行解密,获得电子文件和第一水印信息;
    第二解密单元,用于通过RSA密钥中的公钥对所述电子加密印章信息进行解密,获得第二水印信息;
    确定单元,用于根据所述第一水印信息和所述第二水印信息,确定所述第一水印信息与所述第二水印信息是否相同;若相同,则确定所述电子文件为合格的所述第二电子文件;若不相同,则确定所述电子文件为不合格文件。
  11. 根据权利要求10所述的装置,所述第一水印信息和所述第二水印信息中包括用于审批文件的多个信息字段;所述确定单元包括:
    比较模块,用于比较所述第一水印信息中的用于审批文件的多个信息字段与所述第二水印信息中用于审批文件的多个信息字段是否对应相同;
    确定模块,用于若所述第一水印信息与所述第二水印信息中的多个信息字段均对应相同,则确定所述加密电子文件为合法文件;
    所述确定模块,还用于若存在至少一个信息字段不对应相同,则确定所述加密电子文件为非法文件。
  12. 根据权利要求11所述的装置,所述装置还包括:
    转换单元,用于在所述确定所述加密电子文件为合法文件之后,将第一水印信息或所述第二水印信息通过预设转换算法,转换为目标字符或目标二维码;
    输出单元,用于将所述目标字符或目标二维码加载在所述第二电子文件中输出。
  13. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行电子文件的加密方法的步骤:获取电子加密印章信息以及第一电子文件,所述电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息;将所述电子加密印章信息加载在所述第一电子文件中,获得第二电子文件;将所述第二电子文件和所述水印信息一起通过预设加密算法进行加密,获得用以发送至目的地址的加密电子文件。
  14. 根据权利要求13所述的计算机设备,所述水印信息中包括用于审批文件的多个信息字段;所述计算机可读指令被所述处理器执行时,使得所述处理器执行所述获取电子加密印章信息包括:从所述水印信息中提取用于审批文件的多个信息字段;将所述用于审批文件的多个信息字段按照预设审批顺序进行排序组成审批链数据;将所述审批链数据和所述初始电子印章进行加密后,获得电子加密印章信息。
  15. 根据权利要求13所述的计算机设备,所述计算机可读指令被所述处理器执行时,使得所述处理器执行电子文件的解密方法的步骤:接收加密电子文件,所述加密电子文件为将第二电子文件和水印信息一起通过预设加密算法进行加密获得的电子文件;根据预设解密算法对所述加密电子文件进行解密,获得第二电子文件和第一水印信息,所述第二电子文件包括电子加密印章信息,所述电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息;通过RSA密钥中的公钥对所述电子加密印章信息进行解密,获得第二水印信息;根据所述第一水印信息和所述第二水印信息,确定所述第一水印信息与所述第二水印信息是否相同;若相同,则确定所述加密电子文件为合法文件;若不相同,则确定所述加密电子文件为非法文件。
  16. 根据权利要求15所述的计算机设备,所述第一水印信息和所述第二水印信息中包括用于审批文件的多个信息字段;所述计算机可读指令被所述处理器执行时,使得所述处理器执行所述根据所述第一水印信息和所述第二水印信息,确定所述第一水印信息与所述第二水印信息是否相同包括:比较所述第一水印信息中的用于审批文件的多个信息字段与所述第二水印信息中用于审批文件的多个信息字段是否对应相同;若所述第一水印信息与所述第二水印信息中的多个信息字段均对应相同,则确定所述加密电子文件为合法文件;若存在至少一个信息字段不对应相同,则确定所述加密电子文件为非法文件。
  17. 一种存储有计算机可读指令的非易失性可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行电子文件的加密方法的步骤:获取电子加密印章信息以及第一电子文件,所述电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息;将所述电子加密印章信息加载在所述第一电子文件中,获得第二电子文件;将所述第二电子文件和所述水印信息一起通过预设加密算法进行加密,获得用以发送至目的地址的加密电子文件。
  18. 根据权利要求17所述的存储介质,所述水印信息中包括用于审批文件的多个信息字段;所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行所述获取电子加密印章信息包括:从所述水印信息中提取用于审批文件的多个信息字段;将所述用于审批文件的多个信息字段按照预设审批顺序进行排序组成审批链数据;将所述审批链数据和所述初始电子印章进行加密后,获得电子加密印章信息。
  19. 根据权利要求17所述的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行电子文件的解密方法的步骤:接收加密电子文件,所述加密电子文件为将第二电子文件和水印信息一起通过预设加密算法进行加密获得的电子文件;根据预设解密算法对所述加密电子文件进行解密,获得第二电子文件和第一水印信息,所述第二电子文件包括电子加密印章信息,所述电子加密印章信息包括通过RSA密钥中的私钥对水印信息和初始电子印章进行加密后获得的信息;通过RSA密钥中的公钥对所述电子加密印章信息进行解密,获得第二水印信息;根据所述第一水印信息和所述第二水印信息,确定所述第一水印信息与所述第二水印信息是否相同;若相同,则确定所述加密电子文件为合法文件;若不相同,则确定所述加密电子文件为非法文件。
  20. 根据权利要求19所述的存储介质,所述第一水印信息和所述第二水印信息中包括用于审批文件的多个信息字段;所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行所述根据所述第一水印信息和所述第二水印信息,确定所述第一水印信息与所述第二水印信息是否相同包括:比较所述第一水印信息中的用于审批文件的多个信息字段与所述第二水印信息中用于审批文件的多个信息字段是否对应相同;若所述第一水印信息与所述第二水印信息中的多个信息字段均对应相同,则确定所述加密电子文件为合法文件;若存在至少一个信息字段不对应相同,则确定所述加密电子文件为非法文件。
PCT/CN2019/118412 2019-03-11 2019-11-14 一种电子文件的加密、解密方法及其装置 Ceased WO2020181818A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910181682.3 2019-03-11
CN201910181682.3A CN110069906A (zh) 2019-03-11 2019-03-11 一种电子文件的加密、解密方法及其装置

Publications (1)

Publication Number Publication Date
WO2020181818A1 true WO2020181818A1 (zh) 2020-09-17

Family

ID=67366150

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/118412 Ceased WO2020181818A1 (zh) 2019-03-11 2019-11-14 一种电子文件的加密、解密方法及其装置

Country Status (2)

Country Link
CN (1) CN110069906A (zh)
WO (1) WO2020181818A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760392A (zh) * 2022-06-15 2022-07-15 湖南工商大学 基于盲水印和非对称加密的文档篡改检测方法
CN115828281A (zh) * 2022-11-28 2023-03-21 中国农业银行股份有限公司 文本加密方法、装置、电子设备及存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069906A (zh) * 2019-03-11 2019-07-30 平安科技(深圳)有限公司 一种电子文件的加密、解密方法及其装置
CN112231397B (zh) * 2020-09-25 2023-06-30 标信智链(杭州)科技发展有限公司 基于区块链的交易文件传递方法及装置
CN115203742A (zh) * 2022-07-08 2022-10-18 百视通网络电视技术发展有限责任公司 一种内容审核追溯的方法及设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1847064A1 (en) * 2005-01-25 2007-10-24 Pakkay Yuen Secure encryption system, device and method
CN105989253A (zh) * 2015-03-06 2016-10-05 北京万方数据股份有限公司 一种水印嵌入方法和提取方法及装置
CN109274644A (zh) * 2018-08-21 2019-01-25 华为技术有限公司 一种数据处理方法、终端和水印服务器
CN110069906A (zh) * 2019-03-11 2019-07-30 平安科技(深圳)有限公司 一种电子文件的加密、解密方法及其装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101311950B (zh) * 2007-05-25 2012-01-18 北京书生国际信息技术有限公司 一种电子印章的实现方法和装置
CN103544592A (zh) * 2012-07-16 2014-01-29 天津书生投资有限公司 一种电子印章使用方法和装置
CN107992463A (zh) * 2017-12-01 2018-05-04 机械工业第六设计研究院有限公司 一种电子政务申报的方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1847064A1 (en) * 2005-01-25 2007-10-24 Pakkay Yuen Secure encryption system, device and method
CN105989253A (zh) * 2015-03-06 2016-10-05 北京万方数据股份有限公司 一种水印嵌入方法和提取方法及装置
CN109274644A (zh) * 2018-08-21 2019-01-25 华为技术有限公司 一种数据处理方法、终端和水印服务器
CN110069906A (zh) * 2019-03-11 2019-07-30 平安科技(深圳)有限公司 一种电子文件的加密、解密方法及其装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760392A (zh) * 2022-06-15 2022-07-15 湖南工商大学 基于盲水印和非对称加密的文档篡改检测方法
CN115828281A (zh) * 2022-11-28 2023-03-21 中国农业银行股份有限公司 文本加密方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN110069906A (zh) 2019-07-30

Similar Documents

Publication Publication Date Title
WO2020181818A1 (zh) 一种电子文件的加密、解密方法及其装置
CN109150499B (zh) 动态加密数据的方法、装置、计算机设备和存储介质
US10044689B2 (en) System and method for authenticating users
US9882883B2 (en) Method and system for securing communication
US9172533B2 (en) Method and system for securing communication
US10320765B2 (en) Method and system for securing communication
US9413754B2 (en) Authenticator device facilitating file security
CN111177801B (zh) 电子文档的签章方法、装置、存储介质和电子设备
CN109829269A (zh) 基于电子印章验证电子文档的方法、装置及系统
CN112039902A (zh) 一种数据加密方法及装置
CN107786331B (zh) 数据处理方法、装置、系统及计算机可读存储介质
WO2019205366A1 (zh) 一种图片管理方法、装置、计算机设备及存储介质
CN104660589A (zh) 一种对信息进行加密控制、解析信息的方法、系统和终端
CN106817358A (zh) 一种用户资源的加密、解密方法和设备
CN105187357A (zh) 二维码认证方法和系统
CN107665314A (zh) 在电子文档上签名的可信处理方法及装置
CN110262908A (zh) 一种剪切板数据的处理方法及装置
WO2015109958A1 (zh) 一种基于协商密钥的数据处理方法和手机
CN108390755A (zh) 基于内置安全芯片的sim贴膜卡的安全输入法
CN111177748A (zh) 指纹存储加密方法、装置及系统
CN115913519A (zh) 基于图像的数据加密传输方法、装置及电子设备
CN107124407A (zh) 数据传输方法、装置、可读存储介质、电子设备及系统
CN115442046A (zh) 签名方法、装置、电子设备和存储介质
CN112560050B (zh) 安全的电子证件颁发方法、装置、终端设备及存储介质
CN115174260B (zh) 数据验证方法、装置、计算机、存储介质和程序产品

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19919499

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19919499

Country of ref document: EP

Kind code of ref document: A1