CN115481445A - Portable document format file signature checking method, device, equipment and storage medium - Google Patents

Portable document format file signature checking method, device, equipment and storage medium Download PDF

Info

Publication number
CN115481445A
CN115481445A CN202210982570.XA CN202210982570A CN115481445A CN 115481445 A CN115481445 A CN 115481445A CN 202210982570 A CN202210982570 A CN 202210982570A CN 115481445 A CN115481445 A CN 115481445A
Authority
CN
China
Prior art keywords
signature
item
items
interactive form
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210982570.XA
Other languages
Chinese (zh)
Other versions
CN115481445B (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 Matrix Factorization Technology Co ltd
Original Assignee
Beijing Matrix Factorization 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 Matrix Factorization Technology Co ltd filed Critical Beijing Matrix Factorization Technology Co ltd
Priority to CN202210982570.XA priority Critical patent/CN115481445B/en
Publication of CN115481445A publication Critical patent/CN115481445A/en
Application granted granted Critical
Publication of CN115481445B publication Critical patent/CN115481445B/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/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

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

Abstract

The disclosure provides a method, a device, equipment and a storage medium for verifying and signing a portable document format file, wherein the portable document format file comprises an interactive form and a document annotation, and the method comprises the following steps: identifying a first number of signature items contained in the interaction form and identifying a second number of signature items contained in the document annotation; comparing the first quantity with the second quantity, and judging whether the signature items in the interactive form are abnormal or not based on the comparison result; and in the case of abnormality of the signature items in the interactive form, determining target signature items which cannot be verified from the signature items contained in the document annotation. According to the technical scheme provided by one or more embodiments of the disclosure, the correctness of the signature verification result can be improved.

Description

Portable document format file signature checking method, device, equipment and storage medium
Technical Field
The disclosure relates to the technical field of data processing, in particular to a method, a device, equipment and a storage medium for checking a portable document format file.
Background
In order to ensure the security of a Portable Document Format (PDF) file, an electronic signature is usually added to the PDF file. When verifying an electronic signature in a PDF file, a conventional method is to read the electronic signature recorded in a specified area in the PDF file, and then verify the completeness of the PDF file according to information carried in the electronic signature.
However, in practical applications, after the PDF document is processed in a specific manner, the electronic signature in the PDF document may be abnormal. For example, when the PDF document is subjected to the merging operation, a part of the electronic signature in the designated area of the PDF document may be deleted, but the deleted part of the electronic signature may be retained in other areas of the PDF document, so that the electronic signature may be abnormal. At present, the abnormal condition of the electronic signature cannot be identified by the conventional signature verification process. The reason is that the conventional signature verification process only verifies the electronic signature in the specified area, and the conventional signature verification process cannot sense the existence of the electronic signature for the deleted electronic signature in the specified area. This results in the PDF document having an abnormal electronic signature, but ultimately produces a signature verification result that characterizes the signature verification as normal. Obviously, the existing signature verification process cannot ensure the correctness of the signature verification result.
Disclosure of Invention
In view of this, one or more embodiments of the present disclosure provide a method, an apparatus, a device, and a storage medium for checking a portable document format file, which can improve the correctness of a result of checking the file.
One aspect of the present disclosure provides a method for verifying a portable document format file, where the portable document format file includes an interactive form and a document annotation, and the method includes: identifying a first number of signature items contained in the interaction form and identifying a second number of signature items contained in the document annotation; comparing the first quantity with the second quantity, and judging whether the signature items in the interactive form are abnormal or not based on the comparison result; and in the case of abnormality of the signature items in the interactive form, determining target signature items which cannot be verified from the signature items contained in the document annotation.
The present disclosure also provides an apparatus for verifying and signing a portable document format file, where the portable document format file includes an interactive form and a document annotation, and the apparatus includes: a quantity identification unit, configured to identify a first quantity of signature items included in the interaction form and identify a second quantity of signature items included in the document annotation; the judging unit is used for comparing the first quantity with the second quantity and judging whether the signature items in the interactive form are abnormal or not based on the comparison result; and the determining unit is used for determining a target signature item which cannot be verified from the signature items contained in the document annotation under the condition that the abnormality exists in the signature items in the interactive form.
In another aspect, the present disclosure further provides an electronic device, which includes a memory and a processor, where the memory is used to store a computer program, and when the computer program is executed by the processor, the electronic device implements the above-mentioned signature verification method for a portable document format file.
In another aspect of the present disclosure, a computer-readable storage medium is provided, where the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the computer program implements the above-mentioned method for verifying a portable document format file.
The technical scheme provided by one or more embodiments of the present disclosure is different from a conventional signature verification process, and can compare the number of signature items included in an interactive form and a document annotation, so as to determine whether the signature item in the interactive form is abnormal. Such anomalies are not recognizable by conventional signature verification processes. When the abnormity of the signature items in the interactive form is judged, the target signature items which cannot be verified can be further determined from the signature items contained in the document annotation. The information of the portion of the target signature item may be output by the signature verification tool as part of the final signature verification result. Therefore, the abnormal signature which cannot be identified in the conventional signature verification process can be reflected in the final signature verification result through the technical scheme provided by the disclosure, so that the error verification of the electronic signature is avoided, and the correctness of the signature verification result is improved.
Drawings
The features and advantages of embodiments of the present disclosure will be more clearly understood by reference to the accompanying drawings, which are illustrative and not to be construed as limiting the disclosure in any way, and in which:
FIG. 1 is a schematic diagram illustrating steps of a method for verifying a PDF file according to an embodiment of the present disclosure;
FIG. 2 illustrates a first diagram of a signature item in one embodiment of the present disclosure;
FIG. 3 illustrates a second diagram of a signature item in one embodiment of the present disclosure;
FIG. 4 illustrates a third diagram of a signature item in one embodiment of the present disclosure;
FIG. 5 illustrates a fourth diagram of a signature item in one embodiment of the present disclosure;
FIG. 6 illustrates a flow chart of the verification of the first number and the second number being equal in one embodiment of the present disclosure;
FIG. 7 illustrates a fifth diagram of a signature item in one embodiment of the present disclosure;
FIG. 8 illustrates a signature verification flow chart when the first number is greater than the second number in one embodiment of the present disclosure;
FIG. 9 is a flow chart of signature verification in an example of a specific application of the present disclosure;
fig. 10 is a schematic diagram illustrating functional modules of a signature verification device for a PDF file according to an embodiment of the present disclosure;
fig. 11 shows a schematic structural diagram of an electronic device in an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely below with reference to the accompanying drawings of the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. 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 disclosure.
Currently, in order to ensure that the content of a PDF document is not tampered, an electronic signature may be added to the PDF document. For example, both parties signing the contract may add electronic signatures to the PDF document respectively, and then may check the signed PDF document, and after the check passes, it indicates that the contract content has not been tampered.
In a PDF document, two parts of content, an interaction form and a document annotation, may be included. The path of the interactive form in the PDF document can be represented as Root, where Root represents a Root directory of the PDF document, and AcroForm represents a directory of the interactive form; the path of a document annotation in a PDF document can be represented as root.
Generally, each electronic signature added to a PDF document may be referred to by the above-mentioned interactive form and document annotation as a different signature item. For example, in an interactive form, the signature entry may be referenced under the root. In document annotation, the signature items can be referenced under the root.
In the signature item, various information related to the electronic signature may be contained. For example, byte range information (ByteRange) may be included in the signature entry, which may characterize the content range to which the electronic signature corresponds. When the electronic signature is checked, the hash operation can be performed on the content range represented by the byte range information, the operation result is compared with the signature value of the electronic signature, and if the operation result is consistent with the signature value of the electronic signature, the signature checking process for the electronic signature is passed. In the signature item, signature value information (Contents) may be further included, and the signature value information may be used to store the signature value of the electronic signature. In addition, the signature item may further include various information related to the electronic signature, such as signature time information, signature reason information, and signer contact information, according to the requirements of the actual application scenario.
As can be seen from the above description, the signature item in the PDF document may exist in both the interactive form and the document annotation. When a PDF document is checked, each signature item is read one by one from an interactive form, and then each signature item is checked. However, when the PDF file is subjected to exception processing, a part of the signature entries in the interactive form may be deleted. In this case, the conventional signature verification process cannot sense the missing signature items in the interactive form, and only can verify the remaining signature items. If the rest signature items pass the verification, the conventional verification process considers that the PDF file has no abnormity. In fact, part of signature items in the interactive form of the PDF file are tampered, so that the correctness of signature verification cannot be guaranteed by the conventional signature verification process.
The technical scheme provided by one or more embodiments of the present disclosure can be applied to the signature verification process of the PDF document, thereby ensuring the correctness of the signature verification under the above circumstances.
Referring to fig. 1, a method for verifying a PDF file according to an embodiment of the present disclosure may include the following steps.
S1: a first number of signature items included in the interaction form is identified, and a second number of signature items included in the document annotation is identified.
In this embodiment, when the PDF file is checked, the number of signature items included in each of the interactive form and the document annotation can be identified. Taking the interactive form as an example, the signature item in the interactive form can be referred to in a standard format. For example, "Dictionary of type:/Sig" may be used as a start field when referring to a signature entry. In this way, by identifying the start field in the interactive form, a first number of signature entries contained in the interactive form can be determined. Similarly, a second number of included signature items may also be identified in the document annotation in a similar manner.
S3: and comparing the first quantity with the second quantity, and judging whether the signature items in the interactive form are abnormal or not based on the comparison result.
In this embodiment, if the electronic signature in the PDF file is not falsified, the first number and the second number should be the same. If the electronic signature in the PDF file is falsified, the first number and the second number may be different.
For example, referring to fig. 2, the original text of the interactive form and the document annotation of the pdf file includes four signature entries. After performing exception handling on a PDF file (e.g., merging multiple PDF files into one PDF file), it may cause a part of signature items in the interaction form to be deleted (the deleted signature items are indicated by dotted lines). At this time, only two signature items remain in the interactive form, and four signature items also exist in the document annotation. For another example, referring to fig. 3, after the PDF file is exception-processed, the signature item in the interactive form is not changed, but a part of the signature item in the document annotation is deleted. At this time, there are four signature items in the interaction form, and only two signature items remain in the document annotation. For another example, referring to fig. 4, after the PDF file is exception-processed, part of signature items in the interactive form and the document annotation are deleted. At this time, two signature items exist in the interactive form and the document annotation, respectively, but the rest signature items are not correspondingly consistent. For example, in FIG. 4, two signature items identified as 1 and 3 remain in the interaction form, while two signature items identified as 2 and 4 remain in the document annotation.
In this embodiment, considering that signature items in the interactive form are usually checked sequentially when the PDF file is checked, the first number and the second number may be compared to preliminarily determine whether the signature items in the interactive form are abnormal.
According to the above description, when the first number is smaller than the second number, it may be determined that a part of the signature items in the interaction form is deleted, and at this time, it may be determined that there is an exception in the signature items in the interaction form.
And when the first number is equal to the second number, the signature items in the interactive form are not necessarily abnormal. For example, when the signature items in the interaction form and the document annotation are not deleted, the first number and the second number are the same, and no abnormal electronic signature exists in the PDF document. On the other hand, as can be seen from fig. 4, when the partial signature items in the interactive form and the document annotation are both deleted, if the number of deletions is consistent, then the first number will also result in the same as the second number. However, in the case shown in fig. 4, an abnormal electronic signature still exists in the PDF file.
Therefore, when the comparison result indicates that the first quantity is the same as the second quantity, whether the signature item in the interactive form has an abnormality cannot be judged.
When the first number is larger than the second number, it is also impossible to judge whether there is an abnormality in the signature item in the interactive form. The reason is that, in the scenario shown in fig. 3, the first number is greater than the second number, and at this time, the signature item in the interaction form is not deleted, so that there is no exception in the signature item in the interaction form. However, in the scenario shown in fig. 5, 1 original 5 signature items in the interactive form are deleted, and 2 original 5 signature items in the document annotation are deleted, where the first number is also greater than the second number, but it is obvious that there is an exception in the signature items in the interactive form. Therefore, when the first number is larger than the second number, whether the signature item in the interactive form is abnormal or not still cannot be judged.
As can be seen from the above description, in the case that the comparison result indicates that the first number is smaller than the second number, it can be determined that the signature item in the interactive form is abnormal.
S5: and in the case of abnormality of the signature items in the interactive form, determining target signature items which cannot be verified from the signature items contained in the document annotation.
In the embodiment, when the signature item in the interactive form is determined to have an abnormality, it indicates that the abnormal electronic signature cannot be identified if the signature is checked in a conventional signature checking manner. For example, for the situation shown in fig. 2, the conventional signature verification method only verifies the signature items identified as 1 and 2 in the interactive form, and since the two signature items also exist in the document annotation, after the two signature items are verified, a signature verification result that characterizes that the electronic signature is normal is obtained. For the signature items marked with 3 and 4 in the document annotation, the corresponding signature verification process cannot be started (because the signature items marked with 3 and 4 cannot be obtained from the interactive form), so that a great potential safety hazard exists, and a situation of error reporting occurs when the PDF file is opened subsequently through other software can also be caused.
In view of this, in the present embodiment, when there is an abnormality in the signature item in the interactive form, in addition to checking the signature item in the interactive form, it is necessary to determine a target signature item that cannot be checked from among the signature items included in the document annotation.
Specifically, a signature item that exists in the document annotation and does not exist in the interactive form may be determined as a target signature item that cannot be verified. For example, in FIG. 2, signature items identified as 1 and 2 are present in both the document annotation and the interaction form, but signature items identified as 3 and 4 are present only in the document annotation. In this case, the signature items identified as 3 and 4 may be regarded as target signature items that cannot be verified.
In practical applications, when determining the target signature item, each signature item included in the document annotation may be taken as a candidate signature item. Then, each signature item in the interactive form may be traversed, and for any current signature item in the interactive form, identification information of the current signature item may be obtained. Then, the signature items with the identification information can be inquired in the candidate signature items, and the signature items with the identification information are removed from the candidate signature items. The purpose of this is that the signature items present in both the interactive form and the document annotation indicate that they are signature items that can be properly signed, and therefore such signature items are not ultimately determined to be target signature items that cannot be signed. After traversing each signature item in the interactive form, the remaining candidate signature items can be used as target signature items which cannot be verified.
In one embodiment, when a target signature item which cannot be verified is determined, the position information of the target signature item can be identified, and the position information is output. The location information may be obtained from various information included in the target signature item, and the location information may be used to characterize a location of the target signature item in the PDF file. Therefore, the position of the target signature item which cannot be verified can be accurately positioned subsequently based on the output position information, and the authenticity of the target signature item is checked.
As can be seen from the description of the foregoing embodiments, the technical solution provided by the present disclosure is different from a conventional signature verification process, and can compare the number of signature items included in an interactive form and a document annotation, so as to determine whether a signature item in the interactive form is abnormal. Such anomalies are not recognizable by conventional signature verification procedures. When the abnormity of the signature items in the interactive form is judged, the target signature items which cannot be verified can be further determined from the signature items contained in the document annotation. The information of the portion of the target signature item may be output by the signature verification tool as part of the final signature verification result. Therefore, the abnormal signature which cannot be identified in the conventional signature verification process can be reflected in the final signature verification result through the technical scheme provided by the disclosure, so that the error verification of the electronic signature is avoided, and the correctness of the signature verification result is improved.
Referring to fig. 6, in one embodiment, when the comparison result of step S3 indicates that the first quantity and the second quantity are equal, it cannot be directly determined that there is an abnormality in the signature item in the interactive form according to the above description. In this case, the signature items included in the interactive form may be verified one by one. Taking any current signature item in the interactive form as an example, when the current signature item is verified, the byte range information and the signature value information may be read from the current signature item. The contents of the PDF file defined by the byte range information may then be hashed and the result of the operation may be compared with the signature value carried in the signature value information. If the operation result is the same as the signature value, determining that the signature verification of the current signature item is successful; and if the operation result is different from the signature value, determining that the signature verification of the current signature item fails. After the signature verification of each signature item in the interactive form is completed, a corresponding signature verification result can be output.
In this embodiment, if the signature items in the interactive form and the document annotation are not changed, according to the signature verification process, the finally output signature verification result can represent that there is no abnormal electronic signature in the PDF file. If the signature items in the interactive form and the document annotation are changed like those shown in fig. 4, although the number of the signature items in the interactive form and the document annotation is still consistent, the signature result with failed signature verification is output at this time. For example, when the signature item identified as 1 in fig. 4 is verified, since the signature item identified as 1 is missing in the document annotation, part of the content of the document annotation defined by the byte range information of the signature item, which is related to the signature item, is missing, which results in the computed hash result being different from the signature value carried in the signature value information, thereby resulting in a failure in verification.
Note that, in actual use, there may be a case as shown in fig. 7. In fig. 7, the signature item identified as 2 is deleted from both the interaction form and the document annotation, and finally only the signature item identified as 1 is left in the interaction form and the document annotation. In practical applications, such alteration of the signature item can be understood as normal alteration, and should not be determined as the occurrence of an abnormal electronic signature. For such a situation, according to the above operation flow of the present disclosure, the signature item marked as 1 still passes through the signature verification smoothly, so as to obtain a signature verification result with normal signature verification, and the signature verification result conforms to an actual scene, and a false verification situation does not occur.
Referring to FIG. 8, in one embodiment, when the comparison result of step S3 indicates that the first number is greater than the second number, according to the above description, it cannot be directly determined that there is an abnormality in the signature item in the interactive form. It is determined that the partial electronic signature in the PDF document is indeed corrupted, resulting in a greater number of signature items in the interaction form than in the document annotation. For this case, there will be some signature item that is present in the interaction form but not in the document annotation. For example, in the application scenario shown in fig. 3, the signature entry identified as 4 is present in the interactive form, but not in the document annotation.
In this embodiment, for scenes in which the first number is greater than the second number, the signature items included in the interactive form may be directly checked one by one. Taking any current signature item in the interactive form as an example, when the current signature item is verified, the byte range information and the signature value information may be read from the current signature item. Then, the contents limited by the byte range information in the PDF file may be hashed, and the operation result may be compared with the signature value carried in the signature value information. If the operation result is the same as the signature value, determining that the signature verification of the current signature item is successful; and if the operation result is different from the signature value, determining that the signature verification of the current signature item fails. After the signature verification of each signature item in the interactive form is completed, a corresponding signature verification result can be output.
Taking fig. 3 as an example, when signature items marked 1 to 3 are verified, a signature verification result of successful signature verification is obtained. However, when the signature item identified as 4 is verified, because the signature item identified as 4 is missing in the document annotation, part of the content related to the signature item in the document annotation is missing in the content defined by the byte range information of the signature item, which results in a computed hash result different from the signature value carried in the signature value information, thereby resulting in a failure in verifying the signature.
Therefore, under the condition that the first number is larger than the second number, according to the technical scheme provided by the disclosure, correct signature verification results can be generated.
In one embodiment, no matter the first number is the same as the second number or the first number is greater than the second number, if the signature verification fails for any signature item in the interactive form, the signature verification result representing the signature verification failure can be directly generated, and the signature verification result is output.
Referring to fig. 9, in a specific application scenario, according to the technical scheme provided by the present disclosure, corresponding signature verification processes can be executed on three different situations by comparing the first quantity with the second quantity. Specifically, as shown in fig. 9, when the first number and the second number are equal, the signature verification may be performed on each signature item in the interactive form, and according to the description of the foregoing embodiments, if the electronic signature in the PDF file is not destroyed, a signature verification result indicating that the signature verification is successful may be finally output. If the signature items in the interactive form are not in one-to-one correspondence with the signature items in the document annotation, the signature verification of one or more signature items in the interactive form fails, and if only one signature item fails, a signature verification result representing the signature verification failure is generated.
When the first number is greater than the second number, the signature verification may be performed on each signature item in the interaction form, according to the description of the foregoing embodiments, because the signature items in the interaction form and the signature items in the document annotations are not in a one-to-one correspondence relationship, a failure in signature verification of one or more signature items in the interaction form may be caused, and as long as a failure in signature verification of one signature item occurs, a signature verification result indicating that the signature verification fails may be generated.
When the first number is less than the second number, this is not recognizable by conventional signature verification procedures. In the disclosure, it can be determined that the signature item in the interactive form has an abnormality, and then a target signature item which cannot be checked can be determined from the document annotation. Thus, according to the conventional signature verification process, a signature verification result representing successful signature verification can be generated, and meanwhile, the disclosure also generates the position information of the target signature item which cannot be verified. When the final output result contains the position information, part of the electronic signature in the PDF file is represented to be damaged, so that the position of the electronic signature which cannot be normally verified in the PDF file can be determined by analyzing the position information, and the PDF file with the abnormality is prevented from being judged as the file with the normal electronic signature by mistake.
Referring to fig. 10, an embodiment of the present disclosure further provides an apparatus for verifying a portable document format file, where the portable document format file includes an interactive form and a document annotation, and the apparatus includes:
a quantity identification unit 100, configured to identify a first quantity of signature items included in the interaction form, and identify a second quantity of signature items included in the document annotation;
the judging unit 200 is configured to compare the first quantity with the second quantity, and judge whether a signature item in the interactive form is abnormal based on a comparison result;
a determining unit 300, configured to determine, when there is an exception in the signature item in the interactive form, a target signature item that cannot be verified from the signature items included in the document annotation.
In an embodiment, the determining unit 200 is further configured to determine that the signature item in the interactive form is abnormal if the comparison result indicates that the first quantity is smaller than the second quantity.
In one embodiment, the determining unit 300 is further configured to determine a signature item that is present in the document annotation and is not present in the interaction form as a target signature item that cannot be verified.
In one embodiment, the determining unit 300 is further configured to take the signature item included in the document annotation as a candidate signature item; traversing each signature item in the interactive form, and acquiring identification information of any current signature item in the interactive form; querying the signature items with the identification information in the candidate signature items, and removing the signature items with the identification information from the candidate signature items; and after traversing each signature item in the interactive form, taking the rest candidate signature items as target signature items which cannot be verified.
In one embodiment, the apparatus further comprises:
a position information output unit for identifying position information of the target signature item and outputting the position information; the location information is used for characterizing the location of the target signature item in the portable document format file.
In one embodiment, the apparatus further comprises:
the information reading unit is used for reading byte range information and signature value information from any current signature item in the interactive form when the comparison result represents that the first quantity and the second quantity are equal;
a comparison unit, configured to perform hash operation on the content limited by the byte range information in the portable document format file, and compare an operation result with a signature value carried in the signature value information;
the signature verification judging unit is used for determining that the signature verification of the current signature item is successful if the operation result is the same as the signature value; and if the operation result is different from the signature value, determining that the signature verification of the current signature item fails.
In an embodiment, the information reading unit is further configured to, when the comparison result indicates that the first number is greater than the second number, read byte range information and signature value information from any current signature item in the interaction form for the current signature item;
the comparison unit is further configured to perform hash operation on the content limited by the byte range information in the portable document format file, and compare an operation result with a signature value carried in the signature value information;
the signature verification judging unit is further configured to determine that the signature verification of the current signature item is successful if the operation result is the same as the signature value; and if the operation result is different from the signature value, determining that the signature verification of the current signature item fails.
In one embodiment, the apparatus further comprises:
and the signature verification result generating unit is used for generating a signature verification result representing the signature verification failure if the signature verification fails for any signature item in the interactive form, and outputting the signature verification result.
The units illustrated in the above embodiments may be implemented by a computer chip, or implemented by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by functions, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more pieces of software and/or hardware in the practice of the present application.
Referring to fig. 11, the present disclosure further provides an electronic device, where the electronic device includes a memory and a processor, the memory is used to store a computer program, and when the computer program is executed by the processor, the electronic device implements the above-mentioned method for verifying a portable document format file.
The present disclosure also provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the above-mentioned method for verifying a portable document format file.
The processor may be a Central Processing Unit (CPU). The Processor may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or a combination thereof.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the methods of the embodiments of the present disclosure. The processor executes various functional applications and data processing of the processor by executing non-transitory software programs, instructions and modules stored in the memory, that is, the method in the above method embodiment is realized.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor, and the like. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and such remote memory may be coupled to the processor via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the apparatus, the device and the storage medium, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to the description, reference may be made to some parts of the description of the method embodiments.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.
Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations fall within the scope defined by the appended claims.

Claims (11)

1. A method for checking and signing a portable document format file, wherein the portable document format file comprises an interactive form and a document annotation, and the method comprises the following steps:
identifying a first number of signature items contained in the interaction form and identifying a second number of signature items contained in the document annotation;
comparing the first quantity with the second quantity, and judging whether the signature items in the interactive form are abnormal or not based on the comparison result;
and in the case of abnormality of the signature items in the interactive form, determining target signature items which cannot be verified from the signature items contained in the document annotation.
2. The method of claim 1, wherein the step of determining whether the signature item in the interactive form has an anomaly based on the comparison result comprises:
and if the comparison result represents that the first quantity is smaller than the second quantity, judging that the signature items in the interactive form are abnormal.
3. The method of claim 1 or 2, wherein determining a target signature item that cannot be verified from the signature items contained in the document annotation comprises:
and determining the signature item which exists in the document annotation and does not exist in the interactive form as a target signature item which cannot be checked.
4. The method of claim 1, wherein determining a target signature item that is not verifiable from the signature items contained in the document annotation comprises:
taking the signature item contained in the document annotation as a candidate signature item;
traversing each signature item in the interactive form, and acquiring identification information of any current signature item in the interactive form;
querying the signature items with the identification information from the candidate signature items, and removing the signature items with the identification information from the candidate signature items;
and after traversing each signature item in the interactive form, taking the rest candidate signature items as target signature items which cannot be verified.
5. The method of claim 1, wherein after determining a target signature item that cannot be verified from the signature items contained in the document annotation, the method further comprises:
identifying the position information of the target signature item and outputting the position information; the location information is used for characterizing the location of the target signature item in the portable document format file.
6. The method of claim 1, further comprising:
when the comparison result indicates that the first number and the second number are equal, reading byte range information and signature value information from any current signature item in the interactive form;
performing hash operation on the content limited by the byte range information in the portable document format file, and comparing the operation result with the signature value carried in the signature value information;
if the operation result is the same as the signature value, the signature verification of the current signature item is determined to be successful; and if the operation result is different from the signature value, determining that the signature verification of the current signature item fails.
7. The method of claim 1, further comprising:
when the comparison result indicates that the first number is larger than the second number, reading byte range information and signature value information from any current signature item in the interactive form;
performing hash operation on the content limited by the byte range information in the portable document format file, and comparing the operation result with the signature value carried in the signature value information;
if the operation result is the same as the signature value, the success of signature verification of the current signature item is determined; and if the operation result is different from the signature value, determining that the signature verification of the current signature item fails.
8. The method according to claim 6 or 7, characterized in that the method further comprises:
and if the signature verification fails for any signature item in the interactive form, generating a signature verification result representing the signature verification failure, and outputting the signature verification result.
9. An apparatus for verifying and signing a portable document format file, wherein the portable document format file comprises an interactive form and a document annotation, the apparatus comprising:
a quantity identification unit, configured to identify a first quantity of signature items included in the interaction form and identify a second quantity of signature items included in the document annotation;
the judging unit is used for comparing the first quantity with the second quantity and judging whether the signature items in the interactive form are abnormal or not based on the comparison result;
and the determining unit is used for determining a target signature item which cannot be verified from the signature items contained in the document annotation under the condition that the abnormality exists in the signature items in the interactive form.
10. An electronic device, characterized in that the electronic device comprises a memory for storing a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program which, when executed by a processor, implements the method of any one of claims 1 to 8.
CN202210982570.XA 2022-08-16 2022-08-16 Signature verification method, device and equipment for portable document format file and storage medium Active CN115481445B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210982570.XA CN115481445B (en) 2022-08-16 2022-08-16 Signature verification method, device and equipment for portable document format file and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210982570.XA CN115481445B (en) 2022-08-16 2022-08-16 Signature verification method, device and equipment for portable document format file and storage medium

Publications (2)

Publication Number Publication Date
CN115481445A true CN115481445A (en) 2022-12-16
CN115481445B CN115481445B (en) 2023-08-18

Family

ID=84420841

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210982570.XA Active CN115481445B (en) 2022-08-16 2022-08-16 Signature verification method, device and equipment for portable document format file and storage medium

Country Status (1)

Country Link
CN (1) CN115481445B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1918845A (en) * 2003-12-14 2007-02-21 汉斯·怀森 A method and system for verifying documents
JP2009272720A (en) * 2008-04-30 2009-11-19 Ricoh Co Ltd Information processor, signature method, program and storage medium
US8433909B1 (en) * 2008-07-25 2013-04-30 Allstate Insurance Company One-to-many electronic signature process
CN103617403A (en) * 2013-11-25 2014-03-05 广东数字证书认证中心有限公司 PDF file digital signature and verification method and system
TW201533596A (en) * 2014-02-21 2015-09-01 Tatung Co Electronic signature system and electronic signature method
CN106789087A (en) * 2017-01-26 2017-05-31 数安时代科技股份有限公司 Determine the data summarization of message, the method and system based on multi-party digital signature
US20180060291A1 (en) * 2016-09-01 2018-03-01 Wacom Co., Ltd. Method and system for input areas in documents for handwriting devices
CN111539000A (en) * 2020-04-17 2020-08-14 福建福昕软件开发股份有限公司 Method, system and device for simplifying electronic signature process based on PDF document
CN111797434A (en) * 2020-05-22 2020-10-20 北京国电通网络技术有限公司 File editing method and device
CN113395161A (en) * 2020-03-13 2021-09-14 斑马智行网络(香港)有限公司 Verification method, verification device, electronic equipment and storage medium
CN114611471A (en) * 2022-03-24 2022-06-10 深圳市电子商务安全证书管理有限公司 Electronic document reading method and device, electronic equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1918845A (en) * 2003-12-14 2007-02-21 汉斯·怀森 A method and system for verifying documents
JP2009272720A (en) * 2008-04-30 2009-11-19 Ricoh Co Ltd Information processor, signature method, program and storage medium
US8433909B1 (en) * 2008-07-25 2013-04-30 Allstate Insurance Company One-to-many electronic signature process
CN103617403A (en) * 2013-11-25 2014-03-05 广东数字证书认证中心有限公司 PDF file digital signature and verification method and system
TW201533596A (en) * 2014-02-21 2015-09-01 Tatung Co Electronic signature system and electronic signature method
US20180060291A1 (en) * 2016-09-01 2018-03-01 Wacom Co., Ltd. Method and system for input areas in documents for handwriting devices
CN106789087A (en) * 2017-01-26 2017-05-31 数安时代科技股份有限公司 Determine the data summarization of message, the method and system based on multi-party digital signature
CN113395161A (en) * 2020-03-13 2021-09-14 斑马智行网络(香港)有限公司 Verification method, verification device, electronic equipment and storage medium
CN111539000A (en) * 2020-04-17 2020-08-14 福建福昕软件开发股份有限公司 Method, system and device for simplifying electronic signature process based on PDF document
CN111797434A (en) * 2020-05-22 2020-10-20 北京国电通网络技术有限公司 File editing method and device
CN114611471A (en) * 2022-03-24 2022-06-10 深圳市电子商务安全证书管理有限公司 Electronic document reading method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115481445B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
US9535781B2 (en) System file repair method and apparatus
CN111901337A (en) File uploading method and system and storage medium
CN109815697B (en) Method and device for processing false alarm behavior
CN109284331B (en) Certificate making information acquisition method based on service data resources, terminal equipment and medium
US10853197B2 (en) Data recovery with authenticity
CN109145651B (en) Data processing method and device
CN110830257B (en) File signature method and device, electronic equipment and readable storage medium
CN111209339B (en) Block synchronization method, device, computer and storage medium
CN108573172B (en) Data checking and storing method and device
CN109344228A (en) Declaration form data processing method, device, computer equipment and storage medium
CN110147354B (en) Batch data editing method, device, computer equipment and storage medium
CN111783159A (en) Webpage tampering verification method and device, computer equipment and storage medium
CN109033818B (en) Terminal, authentication method, and computer-readable storage medium
CN112711570A (en) Log information processing method and device, electronic equipment and storage medium
CN115481445B (en) Signature verification method, device and equipment for portable document format file and storage medium
CN115294505A (en) Risk object detection and model training method and device and electronic equipment
CN112416891B (en) Data detection method, device, electronic equipment and readable storage medium
US11429688B2 (en) Correcting a URL within a REST API call
CN113779620A (en) Program file checking method and device, storage medium and computer equipment
CN113810344A (en) Security orchestration system, apparatus, method, and computer-readable storage medium
CN111475400A (en) Verification method of service platform and related equipment
CN111460436A (en) Unstructured data operation method and system based on block chain
WO2020047736A1 (en) Method and system for verifying integrity of website backend picture resource
CN115827940B (en) Method and device for archiving electronic files, electronic equipment and storage medium
CN115033857A (en) Method, device, vehicle and storage medium for checking electronic control unit

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