One-time signing method suitable for PDF (Portable Document Format) perforation seal

Through the one-time signing method, the problems of low signature efficiency and increased file size of traditional PDF files are solved, and the efficient signature process and smaller file size are realized. It is suitable for multi-page signing, which significantly improves the signing efficiency.

CN119167433APending Publication Date: 2024-12-20ZHEJIANG AIQIAN DIGITAL TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411077266.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The digital signature efficiency of traditional PDF files is inefficient, especially in multiple signatures. Each time, HASH needs to be recalculated and digital signatures are generated, resulting in an increase in file size and cannot meet the needs of efficiency and speed.

Method used

Adopt a one-time signing method, the user uploads the file and selects the signature strategy. The system automatically processes the signing parameters and generates a signing value file. Only a file summary and digital signature are required. It supports multiple signature locations to associate the same signature, improve efficiency and reduce files. size.

Benefits of technology

The efficiency of signing seals has been greatly improved. It only takes one calculation to sign 100 clasp seals. The file size increases relatively small, saving storage costs, and increasing efficiency by dozens of times, reducing the file size to one-third of the original method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119167433A_ABST
    Figure CN119167433A_ABST
Patent Text Reader

Abstract

The invention discloses a one-time signing method suitable for a PDF perforation seal. The one-time signing method comprises the steps that a user uploads a to-be-signed file; selecting a related electronic seal and rotating a signature strategy; a signing button is clicked, and signing data is sent to a rear end for processing; analyzing and calculating a signature; assembling and completing the electronic signature; according to the method, the seal picture is attached to each position needing to be stamped with the digital signature, and finally the same digital signature is stamped at a time, so that the signature and seal efficiency is remarkably improved. The method has the advantages of high efficiency and small files.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of PDF document signature, in particular to a one-time signing method suitable for PDF saddle stamp. Background Art

[0002] PDF (Portable Document Format) is a portable document format and the world's leading language for describing printed pages. It was originally a proprietary format of Adobe until it was released as an open standard in 2008 and is commonly used for office documents. PDF mainly consists of four parts: file header, file body, cross-reference table and file footer. It is a layout file format for electronic documents.

[0003] When electronically signing a PDF file, the signer uses his or her private key to encrypt specific attributes of the file (such as content, timestamp, etc.) to generate a unique digital signature.

[0004] The efficiency of traditional methods of stamping digital signatures on PDF is affected by the number of digital signatures. The more digital signatures there are, the lower the efficiency of stamping digital signatures. When the same subject stamps multiple seals at the same time, it cannot meet the demand for efficient and fast stamping of multiple digital signatures by the same subject in a document.

[0005] When traditionally stamping a digital signature with a saddle stamp, if the number reaches hundreds or thousands, each position needs to recalculate the HASH and generate a digital signature, which seriously affects the efficiency of stamping digital signatures and the ever-increasing size of PDF files; each additional digital signature file increases by about 80kb. Summary of the invention

[0006] The purpose of the present invention is to provide a one-time signing method suitable for PDF interleaving seals. The present invention has the advantages of high efficiency and small file size.

[0007] The technical solution of the present invention is a one-time signing method suitable for PDF interlineation stamp, comprising the following steps:

[0008] S1. The user logs in to the electronic signature SAAS system or initiates a contract by calling the API interface, and uploads the document to be signed to the backend server system;

[0009] S2. Select the electronic seal of the relevant user and choose the signature strategy according to the situation;

[0010] S3. The user clicks the sign button, and the system automatically encapsulates the signed parameter data into interface parameters and sends the interface parameters to the backend service for processing; the interface parameters at least include the signatory, the interline seal signing strategy and the user information;

[0011] S4, parsing the user's parameters, querying and obtaining the electronic seal image file according to the user information in the user's parameters, and performing signature calculation on the PDF file to be signed; the signature calculation includes the signature file, certificate file, and seal file described in the signature;

[0012] S5. Perform summary calculation on the signed document, assemble the user's relevant seal images into the PDF file, use the corresponding digital certificate for electronic signature, assemble the signature data in RSA format, and generate a signature value file.

[0013] In the aforementioned one-time signing method applicable to PDF interlineation stamp, the document files to be signed described in S1 include at least Word, Execl and PDF formats; the document files to be signed are uniformly converted into PDF format after being uploaded to the system.

[0014] In the aforementioned one-time signing method applicable to PDF interleaving stamp, the signing strategy described in S2 is selected according to the situation, and the specific contents are as follows:

[0015] If it is a SAAS system, drag the saddle stamp to the designated location to be signed through the system;

[0016] If the upload is initiated through the API interface, the signing strategy of the saddle seal is set through the parameters of the API interface; the signing strategy at least includes left saddle seal, right saddle seal and left and right saddle seal.

[0017] In the aforementioned one-time signing method applicable to PDF interleaving seal, the seal image described in S5 can select the style of interleaving seal, and the style of interleaving seal includes at least left and right interleaving, left interleaving and right interleaving.

[0018] In the aforementioned one-time signing method applicable to PDF interleaving seals, the function described in S5 can offset the interleaving seal, with the horizontal coordinate offset offsetX and the vertical coordinate offset offsetY, so that users can make appropriate fine adjustments.

[0019] Compared with the prior art, the present invention has the following beneficial effects:

[0020] High efficiency: No matter how many times the same subject signs the same document, the signature value only needs to be calculated once, which greatly improves the efficiency of signing, especially for the interleaving seals of dozens or even hundreds of pages, the efficiency is improved by dozens of times;

[0021] Small file size: Normally, each additional signature will increase the file size by tens of KB, and signing 100 interleaving seals will increase the file size by tens of MB. The invention has a relatively small increase in the file size after the interleaving seals are stamped on many pages, saving a lot of storage costs, and significantly reducing costs and increasing efficiency for enterprises;

[0022] Therefore, the present invention has the advantages of high efficiency and small file size. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a schematic diagram of the signature process of the present invention;

[0024] Figure 2 It is a PDF verification report after ordinary signature;

[0025] Figure 3 It is the PDF verification report after the signature of the present invention;

[0026] Figure 4 This is a schematic diagram of the traditional signature process;

[0027] Figure 5 This is the effect diagram of the traditional method in Experiment 1;

[0028] Figure 6 It is the effect diagram of the present invention in Experiment 1;

[0029] Figure 7 This is the effect diagram of the traditional method in Experiment 2;

[0030] Figure 8 It is the effect diagram of the present invention in Experiment 2. DETAILED DESCRIPTION

[0031] The present invention is further described below in conjunction with the accompanying drawings and embodiments, but they are not intended to limit the present invention.

[0032] Embodiment: A one-time signing method applicable to PDF interlineation stamp, the process is as follows:

[0033] S1. The user logs in to the electronic signature system, uploads the PDF file to be signed to the electronic signature system, and displays the signing page (the user can also log in to the mobile terminal system such as the mini program);

[0034] S2. Select the electronic seal for signing and drag it to the designated location; repeat the corresponding operation until the electronic seal for signing is placed in all designated locations; the type of saddle seal can be selected, including left saddle seal, right saddle seal, left and right saddle seal, etc.;

[0035] S3. Click Confirm Signature to submit the signature data to the backend for processing; the signature data includes the signature type (the style of the interline seal, the page number to be interlineated, the offset, etc.), the seal ID, and the specific coordinates of the signature (specific page number, etc.);

[0036] S4. Parse the signature information parameters, query and obtain the specific electronic seal file (support electronic seal data in national secret or RSA format) according to the seal ID; convert the electronic seal file and the specific location of the seal into the PDF signature appearance PdfSignatureAppearance; obtain the PKCS12 instance KeyStore, obtain the certificate file inside, parse the certificate chain file, build a custom signature carrier IExternalSignature, and build the signature container PenetrateSignatureContainer according to the signature appearance PdfSignatureAppearance and the signature carrier IExternalSignature, the certificate chain file and the signature policy, and complete the final electronic signature action;

[0037] S5. Perform digest calculation on the signature file sign.pdf, assemble the stamp file into the pdf file, use the corresponding digital certificate for electronic signature, assemble the signature data in RSA format, and generate a signature value file.

[0038] In S4.1 and S4, the signature algorithm is obtained according to the signature carrier IExternalSignature, PdfPKCS7 is constructed in combination with the certificate chain chain, and the hash value is calculated. Finally, the signature bytes are calculated according to the hash, encryption standard CMS and timestamp.

[0039] In S4.2 and S4, two PdfDictionaries are constructed. In PdfDictionary, PdfName.ADOBE_PPKMS of PdfName.FILTER is set, PdfName.ADBE_PKCS7_DETACHED of PdfName.SUBFILTER is set, and a direct reference to the appearance PdfSignatureAppearance of PdfName.N is set. The seal image is set in the appearance of PdfSignatureAppearance, and the signature strategy (saddle seal strategy style, saddle seal page number range, etc.) is associated with the visible appearance PdfSignatureAppearance. According to the saddle seal signature strategy, the corresponding signature value field signatureField is constructed and added to PdfStamper. The signature algorithm of S4.1 is called to calculate the signature value, and finally the signature is completed. At the same time, the security algorithm provider, signature algorithm, signature time, etc. are written into the pdf file to finally form a signed pdf file.

[0040] Assume that you need to sign 100 interleaving stamps on a PDF document. The traditional method requires 100 PDF stampings. The process is as shown in the attached figure. Figure 4As shown, each stamping requires a summary of the PDF file and a digital signature. The signature information includes the signature provider, signature algorithm, signature time, file summary, and signature matrix appearance. The signature appearance calls the seal file and calculates its signature matrix to define the coordinate system of its lower left corner and upper right corner.

[0041] Sign 100 interleaving stamps on a PDF document. Figure 1 As shown, 100 stamps are changed to 1 stamp, and the summary and digital signature of the PDF file are only performed once; the 100 signature appearances corresponding to the 100 stamps are converted into 100 signature appearances in one stamp;

[0042] The PDF signature consists of the signature description file to be signed sign.pdf, certificate .pfx file, seal file seal.png, file summary hash, and signature value signVal;

[0043] The signature file defines the binary summary information of all files protected by this signature, specifies the appearance of this signature PdfSignatureAppearance (the signature appearance refers to the specific style of the electronic signature, including the length and width of the signature, page number, horizontal and vertical coordinates, the position of the signature, the seal image of the signature, etc.), and defines the signature value file signVal pointing to this signature;

[0044] A digital signature can be associated with one or more signature appearances, or not associated at all. When multiple locations require electronic signatures, these electronic signatures are converted into the corresponding number of signature appearances, and the digital signatures point to the same one, so that only one document summary and signature is required.

[0045] In this case, users need to stamp at multiple locations in a PDF file, such as a large number of interleaved stamps. If multiple locations require stamping, multiple hash summaries and digital signatures are required. The efficiency of hash summaries and signatures hinders the process and affects the user experience.

[0046] The present invention only performs file hash summary and digital signature once, which improves user experience, and each signature field uses a real digital signature, which complies with the PDF standard.

[0047] Comparative experiment

[0048] Comparison of the effects of signing 31 interleaving stamps and 61 interleaving stamps on a 31-page PDF and a 61-page document respectively

[0049] Experiment 1 (Comparison of various signature indicators before and after the invention of the 31-page saddle seal)

[0050] The 31-page PDF file (size 64914 bytes, occupying 65536 bytes of space) uses the right-saddle strategy and has 31 saddle stamps. The following are the comparison results of the two solutions:

[0051] 1. Traditional ordinary saddle-seam signature (the signature needs to be calculated each time the signature is signed)

[0052] As attached Figure 5 , file size after signature: 1175552 bytes (1.12M)

[0053] Space occupied: 1175552 bytes (1.12M)

[0054] Signing time: about 2.498 (seconds)

[0055] 2. The present invention's saddle-seal (only one signature calculation is required, and 31 appearances are associated)

[0056] As attached Figure 6 , after signing, the file size is: 414268 bytes (404KB)

[0057] Space occupied: 417792 bytes (408KB)

[0058] Signing time: 215 (milliseconds)

[0059] Experiment 2 (Comparison of various signature indicators before and after the invention of the saddle seal on page 61)

[0060] The 61-page PDF file (size 450929 bytes, occupied space 45465 bytes) uses the right saddle strategy and has 61 saddle stamps. The following is a comparison of the two solutions:

[0061] 1. Traditional ordinary saddle-seam signature (the signature needs to be calculated each time the signature is signed)

[0062] As attached Figure 7 , file size after signature: 2235392 bytes (2.13M)

[0063] Space occupied: 2236416 bytes (2.13M)

[0064] Signing time: about 5.189 (seconds)

[0065] 2. The present invention's saddle-seal (only one signature calculation is required, and 61 appearances are associated)

[0066] As attached Figure 8 , file size after signature: 51379 bytes (501KB)

[0067] Space occupied: 516096 bytes (504KB)

[0068] Total time: 239 (ms)

[0069] Summary: Through the above comparative experiments, it can be seen that the signing method of the present invention is much better than the traditional signing method in terms of signing efficiency (basically in milliseconds) and file size after signing. The efficiency is nearly 10 times that of the traditional signing method, and the file size is three to one-quarter of the traditional method, which greatly improves the signing efficiency.

Claims

1. A one-time signing method for PDF interlineation stamp, It is characterized in that The steps include: S1. The user logs in to the electronic signature SAAS system or initiates a contract by calling the API interface, and uploads the document to be signed to the backend server system; S2. Select the electronic seal of the relevant user and choose the signature strategy according to the situation; S3. The user clicks the sign button, and the system automatically encapsulates the signed parameter data into interface parameters and sends the interface parameters to the backend service for processing; the interface parameters at least include the signatory, the interline seal signing strategy and the user information; S4, parsing the user's parameters, querying and obtaining the electronic seal image file according to the user information in the user's parameters, and performing signature calculation on the PDF file to be signed; the signature calculation includes the signature file, certificate file, and seal file described in the signature; S5. Perform summary calculation on the signed document, assemble the user's relevant seal images into the PDF file, use the corresponding digital certificate for electronic signature, assemble the signature data in RSA format, and generate a signature value file.

2. A one-time signing method suitable for PDF interlineation stamp according to claim 1, Features: The document files to be signed described in S1 include at least Word, Execl and PDF formats; the document files to be signed are uniformly converted into PDF format after being uploaded to the system.

3. A one-time signing method suitable for PDF interlineation stamp according to claim 1, It is characterized in that The specific contents of S2 are as follows: If it is a SAAS system, drag the saddle stamp to the designated location to be signed through the system; If the upload is initiated through the API interface, the signing strategy of the saddle seal is set through the parameters of the API interface; the signing strategy includes at least left saddle seal, right saddle seal and left and right saddle seal.

4. A one-time signing method suitable for PDF interlineation stamp according to claim 1, Features: The seal image described in S5 can select the style of the saddle seal, and the style of the saddle seal at least includes left and right saddles, left saddles and right saddles.

5. A one-time signing method suitable for PDF interlineation stamp according to claim 1, Features: The function described in S5 can offset the seam, with the horizontal coordinate offset offsetX and the vertical coordinate offset offsetY, so that users can make appropriate fine adjustments.

Citation Information

Cited By

  • Signing management method and system for electronic combination verbal contract

    CN119559015A