CN115481445B - Signature verification method, device and equipment for portable document format file and storage medium - Google Patents

Signature verification method, device and equipment for portable document format file and storage medium Download PDF

Info

Publication number
CN115481445B
CN115481445B CN202210982570.XA CN202210982570A CN115481445B CN 115481445 B CN115481445 B CN 115481445B CN 202210982570 A CN202210982570 A CN 202210982570A CN 115481445 B CN115481445 B CN 115481445B
Authority
CN
China
Prior art keywords
signature
item
items
interactive form
document
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210982570.XA
Other languages
Chinese (zh)
Other versions
CN115481445A (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

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 signature verification method, device, equipment and storage medium of a portable document format file, wherein the portable document format file comprises an interactive form and 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 interaction form are abnormal or not based on a comparison result; and when the signature items in the interaction form are abnormal, determining a target signature item which cannot be checked from the signature items contained in the document annotation. According to the technical scheme provided by one or more embodiments of the present disclosure, correctness of the signature verification result can be improved.

Description

Signature verification method, device and equipment for portable document format file and storage medium
Technical Field
The disclosure relates to the technical field of data processing, in particular to a signature verification method, device and equipment for a portable document format file and a storage medium.
Background
In order to ensure the security of portable document format (Portable Document Format, PDF) files, an electronic signature is currently typically added to the PDF file. When verifying an electronic signature in a PDF file, conventionally, the electronic signature recorded in a designated area in the PDF file is read, and then the completeness of the PDF file is verified according to information carried in the electronic signature.
However, in practical applications, after the PDF document is processed in a specific manner, an abnormality may occur in the electronic signature in the PDF document. For example, when the PDF document is subjected to the merging operation, a part of the electronic signature in a specified area of the PDF document may be deleted, but the deleted part of the electronic signature may remain in other areas of the PDF document, so that an abnormal situation of the electronic signature may occur. At present, the abnormal condition of the electronic signature is not recognized by the conventional signature verification process. The reason is that the conventional signature verification process only performs signature verification on the electronic signature in the designated area, and the conventional signature verification process cannot sense the existence of the electronic signature for the deleted electronic signature in the designated area. This results in a signature verification result that characterizes the verification of the signature as normal, although an abnormal electronic signature appears in the PDF document. Obviously, the correctness of the signing result cannot be ensured in the existing signing verification process.
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 signing a portable document format file, which can improve the correctness of signing verification results.
In one aspect, the 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 interaction form are abnormal or not based on a comparison result; and when the signature items in the interaction form are abnormal, determining a target signature item which cannot be checked from the signature items contained in the document annotation.
Another aspect of the present disclosure provides a signature verification apparatus for a portable document format file, where the portable document format file includes an interactive form and a document annotation, the apparatus includes: a number identifying unit configured to identify a first number of signature items contained in the interactive form and identify a second number of signature items contained 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 a comparison result; and the determining unit is used for determining a target signature item which cannot be checked and signed from the signature items contained in the document annotation when the signature items in the interaction form are abnormal.
The present disclosure also provides an electronic device, where the electronic device includes a memory and a processor, where the memory is configured to store a computer program, and when the computer program is executed by the processor, the signature verification method of the portable document format file is implemented.
Another aspect of the disclosure also provides a computer readable storage medium storing a computer program, where the computer program is executed by a processor to implement the signature verification method of the portable document format file.
The technical scheme provided by one or more embodiments of the present disclosure, unlike a conventional signature verification process, can compare the number of signature items contained in an interactive form and a document annotation, so as to determine whether the signature items in the interactive form are abnormal. Such anomalies are not identifiable by conventional signature verification processes. When it is determined that the signature items in the interactive form are abnormal, a target signature item which cannot be checked 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. Thus, the abnormal signature which cannot be identified by 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 false verification of the electronic signature is avoided, and the correctness of the signature verification result is improved.
Drawings
The features and advantages of the various embodiments of the present disclosure will be more clearly understood by reference to the accompanying drawings, which are schematic and should not be construed as limiting the disclosure in any way, in which:
FIG. 1 is a schematic diagram showing steps of a method for signing a PDF file according to an embodiment of the disclosure;
FIG. 2 illustrates a first schematic diagram of a signature item in one embodiment of the present disclosure;
FIG. 3 illustrates a second schematic diagram of a signature entry in one embodiment of the present disclosure;
FIG. 4 shows a third schematic diagram of a signature item in one embodiment of the present disclosure;
FIG. 5 shows a fourth schematic diagram of a signature item in one embodiment of the present disclosure;
FIG. 6 illustrates a signature verification flow chart when the first number is equal to the second number in one embodiment of the present disclosure;
FIG. 7 shows a fifth schematic diagram of a signature entry 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 illustrates a flow chart of the signature verification in one specific application example of the present disclosure;
FIG. 10 is a schematic diagram showing functional modules of a signing device for PDF files according to an embodiment of the disclosure;
fig. 11 shows a schematic structural diagram of an electronic device in one embodiment of the present disclosure.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be made by those skilled in the art without the inventive effort, based on the embodiments of the present application are intended to be within the scope of the present disclosure.
Currently, in order to ensure that the contents of a PDF document are not tampered with, an electronic signature may be added to the PDF document. For example, two parties who sign a contract can respectively add electronic signatures in the PDF document, and the signed PDF document can be checked later, and when the checked signature passes, the fact that the content of the contract is not tampered is indicated.
In a PDF document, two parts of content, interactive forms and document annotations, may be included. The path of the interactive form in the PDF document can be expressed as Root. Acro form, the Root represents the Root directory of the PDF document, and the Acro form can represent the directory of the interactive form; the path of the document annotation in the PDF document may be denoted Root.Pages.Kids.Annots, pages.Kids.Annots and may represent a catalog of document annotations.
In general, each electronic signature added to a PDF document can be referred to by the above-described interactive form and document annotation as a different signature item. For example, in an interactive form, the signature items may be referenced under a directory of root. In document annotation, the signature items can be referenced under the root.
In the signature item, a variety of information related to the electronic signature may be contained. For example, byte range information (bytearange) may be included in the signature item, and the byte range information may characterize a content range to which the electronic signature corresponds. When the electronic signature is checked, hash operation can be carried out 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 and the signature value are consistent, the checking flow of the electronic signature is indicated to pass. The signature item may further include signature value information (Contents) which can be used to store the signature value of the electronic signature. In addition, various electronic signature-related information such as signature time information, signature cause information, and signer contact information may be included in the signature item according to the requirements of the actual application scenario.
From the above description, it can be seen that signature items in a PDF document can exist in both interactive forms and document annotations. When signing a PDF document, it is common to read each signature item from an interactive form one by one, and then sign each signature item. However, when exception processing is performed on the PDF file, a part of the signature items in the interactive form may be caused to be deleted. In this case, the conventional signature verification process cannot perceive the missing signature items in the interactive form, and only the remaining signature items can be verified. If the rest signature items pass the signature verification, the conventional signature verification flow can consider that the PDF file has no abnormality. However, in practice, some signature items in the interactive form of the PDF file have been tampered, so that the correctness of the verification cannot be ensured by the conventional verification process.
The technical scheme provided by one or more embodiments of the present disclosure can be applied to the signing verification process of a PDF document, so as to ensure the correctness of signing verification under the above conditions.
Referring to fig. 1, a method for signing a PDF file according to an embodiment of the present disclosure may include the following steps.
S1: a first number of signature items contained in the interaction form is identified and a second number of signature items contained in the document annotation is identified.
In this embodiment, when the PDF file is checked, the number of signature items included can be identified from the interactive form and the document annotation, respectively. Taking the interactive form as an example, the signature items in the interactive form may be referenced in a standard format. For example, "Dictionary of type:/Sig" may be used as the start field when referring to the signature entry. Thus, by identifying the start field in the interaction form, a first number of signature items contained in the interaction form may be determined. Similarly, a second number of contained signature items may be identified in the document annotation in a similar manner.
S3: comparing the first quantity with the second quantity, and judging whether the signature items in the interaction form are abnormal or not based on a comparison result.
In this embodiment, if no pruning of the electronic signature in the PDF file occurs, the first number and the second number should be the same. If the electronic signature in the PDF file is pruned, the first number and the second number may be different.
For example, referring to FIG. 2, the interactive form and document annotation of a PDF file originally contain four signature items. After exception handling of a PDF file (e.g., merging multiple PDF files into one PDF file), some of the signature entries in the interaction form may be caused to be deleted (the deleted signature entries are indicated by dashed 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 exception handling of a PDF file, the signature items in the interactive form are left unchanged, but some of the signature items in the document annotation are deleted. At this time, there are four signature items in the interactive form, and only two signature items remain in the document annotation. For another example, referring to fig. 4, after exception handling of the PDF file, the partial signature entries in both the interactive form and the document annotation are caused to be deleted. At this time, there are two signature items in the interactive form and the document annotation, respectively, but the remaining signature items are not correspondingly identical. For example, in FIG. 4, two signature entries identified as 1 and 3 remain in the interaction form, while two signature entries identified as 2 and 4 remain in the document annotation.
In this embodiment, in consideration of the fact that signature verification is performed on PDF files, signature verification is performed on signature items in an interactive form in sequence, so that the first number and the second number can be compared, and whether the signature items in the interactive form are abnormal or not can be primarily determined.
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 interactive form are deleted, at which time it may be determined that there is an abnormality in the signature items in the interactive 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 no pruning of signature items in both the interactive form and the document annotation occurs, the first number is the same as the second number, at which point no abnormal electronic signature is present in the PDF document. On the other hand, as can be seen from fig. 4, when part of the signature items in both the interactive form and the document annotation are deleted, if the number of deletions is identical, the first number is also caused to be the same as the second number. However, in the case shown in fig. 4, an abnormal electronic signature still exists in the PDF file.
Thus, when the comparison results characterize the first number as being the same as the second number, it is not possible to ascertain whether there is an anomaly in the signature item in the interaction form.
When the first number is greater than the second number, it is also not possible to tell if there is an anomaly in the signature item in the interaction form. The reason is that in the scenario shown in fig. 3, the first number is larger than the second number, and at this time, the signature items in the interactive form are not deleted, so that there is no abnormality in the signature items in the interactive form. However, in the scenario shown in fig. 5, 1 signature item is deleted from the original 5 signature items in the interactive form, and 2 signature items are deleted from the original 5 signature items in the document annotation, where the first number is also greater than the second number, but it is apparent that there is an abnormality in the signature items in the interactive form. Thus, when the first number is greater than the second number, it is still not possible to tell if there is an anomaly in the signature item in the interaction form.
From the above description, it can be determined that there is an abnormality in the signature item in the interactive form in the case where the comparison result characterizes the first number being smaller than the second number.
S5: and when the signature items in the interaction form are abnormal, determining a target signature item which cannot be checked from the signature items contained in the document annotation.
In this embodiment, when it is determined that there is an abnormality in the signature item in the interactive form, it is indicated that if the electronic signature of the abnormality is not recognized in a conventional signature verification manner. For example, in the case shown in fig. 2, the conventional signature verification method only performs signature verification on the signature items identified as 1 and 2 in the interactive form, and the two signature items also exist in the document annotation, so that after the signature verification is performed on the two signature items, a signature verification result which characterizes the electronic signature as normal is obtained. For signature items marked as 3 and 4 in the document annotation, the corresponding signature verification process cannot be started (because the signature items marked as 3 and 4 cannot be obtained from the interactive form), so that a large potential safety hazard exists, and the situation of error reporting during the subsequent opening of the PDF file by other software is caused.
In view of this, in the present embodiment, when there is an abnormality in the signature items in the interactive form, it is necessary to identify a target signature item that cannot be checked out of the signature items included in the document annotation, in addition to checking the signature items in the interactive form.
Specifically, a signature item that is present in the document annotation and that is not present in the interactive form may be determined as a target signature item that cannot be checked. For example, in FIG. 2, the signature entries identified as 1 and 2 exist in both the document annotation and the interaction form, but the signature entries identified as 3 and 4 exist 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 checked.
In practical application, when determining the target signature item, each signature item included in the document annotation can be used as a candidate signature item. Then, each signature item in the interactive form can be traversed, and for any current signature item in the interactive form, identification information of the current signature item can be obtained. And then, inquiring the signature items with the identification information in the candidate signature items, and eliminating the signature items with the identification information from the candidate signature items. The purpose of this process is that the signature items present in both the interactive form and the document annotation indicate that they are normally verifiable, and therefore such signature items are not ultimately determined to be target signature items that cannot be verified. After traversing each signature item in the interaction form, the remaining candidate signature items may be used as target signature items that cannot be checked.
In one embodiment, when determining a target signature item which cannot be checked, 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 contained in the target signature item, and may be used to characterize the location of the target signature item in the PDF file. Therefore, the position of the target signature item which cannot be checked can be accurately positioned based on the output position information, so that the authenticity of the target signature item is checked.
As can be seen from the description of the above embodiments, the technical solutions provided by the present disclosure, unlike the conventional signature verification process, can compare the number of signature items contained in the interactive form and the document annotation, so as to determine whether the signature items in the interactive form are abnormal. Such anomalies are not identifiable by conventional signature verification processes. When it is determined that the signature items in the interactive form are abnormal, a target signature item which cannot be checked 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. Thus, the abnormal signature which cannot be identified by 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 false 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 in step S3 indicates that the first number and the second number 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 verification may be performed on each signature item included in the interactive form one by one. Taking any current signature item in the interactive form as an example, byte range information and signature value information can be read from the current signature item when the current signature item is checked. Then, hash operation can be carried out on the content limited by the byte range information in the PDF file, and the operation result is 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 current signature item is successful in signature verification; and if the operation result is different from the signature value, determining that the signature verification of the current signature item fails. After signature verification is completed on each signature item in the interactive form, 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, the finally output signature verification result can represent that no abnormal electronic signature exists in the PDF file according to the signature verification process. If the signature items in the interactive form and the document annotation change like that shown in fig. 4, the signature verification result of signature verification failure is output at this time, although the number of signature items in the final interactive form and the document annotation still remain consistent. For example, when signing a signature item identified as 1 in fig. 4, since the signature item identified as 1 is missing in the document annotation, part of the content related to the signature item in the document annotation is missing from the content defined by the byte range information of the signature item, which results in that the calculated hash result is different from the signature value carried in the signature value information, thereby causing signing failure.
In addition, in practical applications, there may be cases as shown in fig. 7. In FIG. 7, the signature item identified as 2 is deleted in both the interactive form and the document annotation, and eventually only the signature item identified as 1 is left in the interactive form and the document annotation. In practical applications, such a modification of the signature item may be understood as a normal modification, and should not be determined as an abnormal electronic signature. Aiming at the situation, according to the operation flow disclosed by the disclosure, the signature item marked as 1 still successfully passes through the signature verification, so that a normal signature verification result of the signature verification is obtained, and the signature verification result accords with an actual scene and cannot be subjected to false verification.
Referring to fig. 8, in one embodiment, when the comparison result in step S3 indicates that the first number is greater than the second number, it cannot be directly determined that there is an abnormality in the signature item in the interactive form according to the above description. It can be determined that some of the electronic signatures in the PDF document are indeed destroyed, 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. In an application scenario such as that shown in FIG. 3, the signature item identified as 4 is present in the interaction form, but not in the document annotation.
In this embodiment, for the scenario that the first number is greater than the second number, the signature verification may also be directly performed on each signature item included in the interaction form one by one. Taking any current signature item in the interactive form as an example, byte range information and signature value information can be read from the current signature item when the current signature item is checked. Then, hash operation can be carried out on the content limited by the byte range information in the PDF file, and the operation result is 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 current signature item is successful in signature verification; and if the operation result is different from the signature value, determining that the signature verification of the current signature item fails. After signature verification is completed on each signature item in the interactive form, a corresponding signature verification result can be output.
Taking fig. 3 as an example, when signature items identified as 1 to 3 are checked, a successful signature checking result is obtained. However, when signing the signature item identified as 4, since 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 that the calculated hash result is different from the signature value carried in the signature value information, and thus the signing fails.
Therefore, in the scene that the first number is larger than the second number, according to the technical scheme provided by the disclosure, a correct signature verification result can be generated.
In one embodiment, whether the first number of scenes is the same as the second number of scenes or the first number of scenes is larger than the second number of scenes, if signature verification fails for any signature item in the interactive form, a 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, by comparing the first number with the second number, a corresponding signature verification process can be performed for three different situations. Specifically, as shown in fig. 9, when the first number and the second number are equal, signature verification may be performed for each signature item in the interactive form, and according to the description of the above 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 output finally. If the signature items in the interactive form are not in one-to-one correspondence with the signature items in the document annotation, one or more signature items in the interactive form fail to verify the signature, and only if one signature item fails to verify the signature, a signature verification result representing the failure of verifying the signature is generated.
When the first number is greater than the second number, signature verification can be performed for each signature item in the interactive form, and according to the description of each embodiment, since the signature items in the interactive form and the signature items in the document annotation are not in one-to-one correspondence, one or more signature items in the interactive form will fail in signature verification, and only if one signature item fails in signature verification, a signature verification result representing the signature verification failure will be generated.
When the first number is smaller than the second number, this is not recognized by the conventional signature verification process. In the present disclosure, it may be determined that there is an abnormality in the signature items in the interactive form, and then a target signature item that cannot be checked out may be determined from the document annotation. Thus, according to the conventional signature verification process, a signature verification result representing the success of signature verification may be generated, but at the same time, the present disclosure also generates location information of the target signature item which cannot be verified. When the final output result contains the position information, the partial electronic signature in the PDF file is represented to be destroyed, so that the position of the electronic signature which cannot be checked normally in the PDF file can be determined by analyzing the position information, and the situation that one PDF file with abnormality is misjudged as a file with normal electronic signature is avoided.
Referring to fig. 10, an embodiment of the present disclosure further provides a signature verification apparatus for a portable document format file, where the portable document format file includes an interactive form and a document annotation, and the apparatus includes:
a number identifying unit 100 for identifying a first number of signature items contained in the interactive form and identifying a second number of signature items contained in the document annotation;
a judging unit 200, configured to compare the first number with the second number, and judge whether the signature item in the interactive form is abnormal based on a comparison result;
and a determining unit 300, configured to determine a target signature item that cannot be checked from the signature items included in the document annotation, in a case where there is an abnormality in the signature items in the interactive form.
In one embodiment, the determining unit 200 is further configured to determine that there is an abnormality in the signature item in the interactive form if the comparison result indicates that the first number is smaller than the second number.
In one embodiment, the determining unit 300 is further configured to determine a signature item that exists in the document annotation and does not exist in the interactive form as a target signature item that cannot be checked.
In one embodiment, the determining unit 300 is further configured to take, as a candidate signature item, a signature item included in the document annotation; traversing each signature item in the interactive form, and aiming at any current signature item in the interactive form, acquiring identification information of the current signature item; querying the candidate signature items for the signature items with the identification information, and eliminating the signature items with the identification information from the candidate signature items; after traversing each signature item in the interactive form, taking the remaining candidate signature items as target signature items which cannot be checked.
In one embodiment, the apparatus further comprises:
a location information output unit for identifying location information of the target signature item and outputting the location information; the location information is used for representing the location of the target signature item in the portable document format file.
In one embodiment, the apparatus further comprises:
an information reading unit, configured to read byte range information and signature value information from any current signature item in the interactive form when the comparison result characterizes the first number and the second number to be equal;
the comparison unit is used for carrying out hash operation on the content limited by the byte range information in the portable document format file and comparing 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 current signature item fails to check.
In one embodiment, the information reading unit is further configured to, when the comparison result characterizes 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 interactive form;
the comparison unit is further used for carrying out hash operation on the content limited by the byte range information in the portable document format file, and comparing an operation result with a signature value carried in the signature value information;
the signature verification judging unit is further 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 current signature item fails to check.
In one embodiment, the apparatus further comprises:
and the signature verification result generation 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 respective units set forth in the above embodiments may be implemented by a computer chip or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, 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 functionally divided into various units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
Referring to fig. 11, the disclosure further provides an electronic device, where the electronic device includes a memory and a processor, and the memory is configured to store a computer program, and when the computer program is executed by the processor, implement the signature verification method of the 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-described signature verification method for a portable document format file.
The processor may be a central processing unit (Central Processing Unit, CPU). The processor may also be any other general purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof.
The memory, as 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 in embodiments of the present disclosure. The processor executes various functional applications of the processor and data processing, i.e., implements the methods of the method embodiments described above, by running non-transitory software programs, instructions, and modules stored in memory.
The memory may include a memory program area and a memory data area, wherein the memory program area may store an operating system, at least one application program required for a function; the storage data area may store data created by the processor, etc. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some implementations, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the processor through 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 appreciated by those skilled in the art that implementing all or part of the above-described embodiment method may be implemented by a computer program to instruct related hardware, where the program may be stored in a computer readable storage medium, and the program may include the above-described embodiment method when executed. Wherein the storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Flash Memory (Flash Memory), a Hard Disk (HDD), or a Solid State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for embodiments of the apparatus, device and storage medium, the description is relatively simple as it is substantially similar to the method embodiments, as relevant points are found in the partial description of the method embodiments.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.
Although embodiments of the present disclosure have been described with reference to the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the disclosure, and such modifications and variations fall within the scope as defined by the appended claims.

Claims (11)

1. A method of authenticating a portable document format file, wherein the portable document format file includes an interactive form and a document annotation, and wherein a signature item in the portable document format file is referenced by the interactive form and the document annotation, wherein the signature item is referenced under a root.
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 interaction form are abnormal or not based on a comparison result;
and when the signature items in the interaction form are abnormal, determining a target signature item which cannot be checked 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 is abnormal 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 interaction form are abnormal.
3. The method of claim 1 or 2, wherein determining a target signature item that cannot be checked out of the signature items contained in the document annotation comprises:
signature items that are present in the document annotation and that are not present in the interactive form are determined to be target signature items that cannot be checked.
4. The method of claim 1, wherein determining a target signature item that cannot be checked out of the signature items contained in the document annotation comprises:
taking the signature items contained in the document annotation as candidate signature items;
traversing each signature item in the interactive form, and aiming at any current signature item in the interactive form, acquiring identification information of the current signature item;
querying the candidate signature items for the signature items with the identification information, and eliminating the signature items with the identification information from the candidate signature items;
after traversing each signature item in the interactive form, taking the remaining candidate signature items as target signature items which cannot be checked.
5. The method of claim 1, wherein after determining a target signature item that cannot be checked out of the signature items contained in the document annotation, the method further comprises:
identifying position information of the target signature item and outputting the position information; the location information is used for representing the location of the target signature item in the portable document format file.
6. The method according to claim 1, wherein the method further comprises:
when the comparison result represents that the first quantity and the second quantity are equal, for any current signature item in the interaction form, byte range information and signature value information are read from the current signature item;
carrying out hash operation on the content limited by the byte range information in the portable document format file, and comparing an operation result with a signature value carried in the signature value information;
if the operation result is the same as the signature value, determining that the current signature item is successful in signature verification; and if the operation result is different from the signature value, determining that the current signature item fails to check.
7. The method according to claim 1, wherein the method further comprises:
when the comparison result represents that the first quantity is larger than the second quantity, aiming at any current signature item in the interaction form, byte range information and signature value information are read from the current signature item;
carrying out hash operation on the content limited by the byte range information in the portable document format file, and comparing an operation result with a signature value carried in the signature value information;
if the operation result is the same as the signature value, determining that the current signature item is successful in signature verification; and if the operation result is different from the signature value, determining that the current signature item fails to check.
8. The method according to claim 6 or 7, characterized in that the method further comprises:
if 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. A signature verification apparatus for a portable document format file, wherein the portable document format file includes an interactive form and a document annotation, and signature items in the portable document format file are referenced by the interactive form and the document annotation, wherein the signature items are referenced under a root.
A number identifying unit configured to identify a first number of signature items contained in the interactive form and identify a second number of signature items contained 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 a comparison result;
and the determining unit is used for determining a target signature item which cannot be checked and signed from the signature items contained in the document annotation when the signature items in the interaction form are abnormal.
10. An electronic device comprising a memory and a processor, the memory for storing a computer program which, when executed by the processor, implements the method of any of claims 1 to 8.
11. A computer readable storage medium for storing 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 CN115481445A (en) 2022-12-16
CN115481445B true 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 (10)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10997362B2 (en) * 2016-09-01 2021-05-04 Wacom Co., Ltd. Method and system for input areas in documents for handwriting devices

Patent Citations (10)

* 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
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
CN115481445A (en) 2022-12-16

Similar Documents

Publication Publication Date Title
CN108446407B (en) Database auditing method and device based on block chain
CN112000730B (en) Tracing information writing and tracing information verification method and system based on block chain
CN109815697B (en) Method and device for processing false alarm behavior
CN110866258B (en) Rapid vulnerability positioning method, electronic device and storage medium
CN109145651B (en) Data processing method and device
CN110830257B (en) File signature method and device, electronic equipment and readable storage medium
CN109284331B (en) Certificate making information acquisition method based on service data resources, terminal equipment and medium
US10853197B2 (en) Data recovery with authenticity
CN111885051B (en) Data verification method and device and electronic equipment
CN108573172B (en) Data checking and storing method and device
CN111209339B (en) Block synchronization method, device, computer and storage medium
CN112905667A (en) Unmanned information storage and playback method, device and storage medium
CN110347678B (en) Financial data storage method, system, device and equipment
WO2020086134A1 (en) Object storage for guaranteed content for backup and retention
CN108196975B (en) Data verification method and device based on multiple checksums and storage medium
CN115481445B (en) Signature verification method, device and equipment for portable document format file and storage medium
CN112711570A (en) Log information processing method and device, electronic equipment and storage medium
CN114186278A (en) Database abnormal operation identification method and device and electronic equipment
CN113946828A (en) Vulnerability scanning method and vulnerability scanning device of industrial control system
CN109560964B (en) Equipment compliance checking method and device
CN112286881A (en) Document authentication and tracing method and device
CN111475400A (en) Verification method of service platform and related equipment
CN110826078A (en) Data storage method, device and system
CN111382054A (en) File-based test flow processing method and device and computer storage medium
CN113992334B (en) Storage method and verification method and device of equipment side data and electronic equipment

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