电子签名
用证书签名,让阅读器能证明文件未被更改。
这款工具完全在你的浏览器中运行。文件从不上传,你可以在浏览器的网络标签中亲自验证这一点。 亲自验证:打开浏览器的网络标签观察。你会看到一个查询你是否还有剩余任务的小请求,只包含工具名称和一段哈希,绝不会包含文件。
这款工具的作用
This applies a real cryptographic signature: a detached CMS SignedData structure computed over the document's bytes and embedded in the file, which Acrobat and other compliant readers check when the document is opened. Unlike a drawn signature it establishes two things - that the holder of a particular certificate signed, and that not one byte has changed since.
When the recipient will verify rather than merely look: a tender submission, an invoice under an e-invoicing rule, a document going into an archive that requires signed originals, or anything where a later argument about whether the file was altered is a real possibility.
工作原理
- Drop two files onto this page: the PDF, and your certificate as a .p12 or .pfx file. The order does not matter - the PDF is recognised by its contents.
- Type the passphrase that protects the certificate. It is used in your browser to unwrap the private key and is never sent.
- Fill in the reason and the location if your recipient expects them. Both are recorded inside the signature and shown by readers that display signature details.
- Leave visible on to draw a signature block on the page you choose, or turn it off for a signature that exists only in the file's structure.
- Press Sign with certificate, then open the result in Acrobat to see what a recipient's reader will report.
Every online signing service asks you to upload the one file you should never upload. Here the .p12 is read in the page and parsed inside a worker that holds nothing else, and the worker is terminated when the job finishes - the thread is discarded rather than a variable cleared, so nothing of the key survives into a later job.
A PDF signature covers the byte ranges its /ByteRange array names, and that array has to be written into the file in place, after space for the signature has been reserved. Re-serialising the document afterwards moves every offset and invalidates what was just computed - the mistake naive implementations make, and the reason some signed PDFs report as broken the moment they are opened.
A self-signed certificate produces a valid signature that readers report as validity unknown, because they have no reason to believe the name on it. That is not a failure: it says the mathematics checks out and the identity does not. A certificate issued by an authority your recipient's reader already trusts is what turns that into a green tick.
There is no trusted timestamp and no revocation checking, because both need a network service that this tool never contacts. The signing time recorded is your own computer's clock, which a strict recipient should treat as a claim rather than proof. An encrypted PDF is refused for a related reason: a signature computed over ciphertext is not something a reader will validate.
这款工具做不到的事
- A self-signed certificate shows as validity unknown in the recipient's reader until they choose to trust it. Only a certificate from an authority their reader already trusts avoids that.
- No trusted timestamp is applied and no revocation is checked, because both require contacting a server. The recorded signing time is your device's clock.
- This produces a basic signature rather than a long-term-validation profile, so once the certificate expires nothing in the file confirms the signature was made while it was valid.
- Encrypted documents are refused. Remove the password with Unlock PDF before signing.
- The visible signature block has a fixed position and size on the page you choose; it cannot be dragged elsewhere.
常见问题
- 这和「PDF 签名」有什么区别?
- 「PDF 签名」在页面上画一张签名的图片。这个工具用你的私钥对文件的字节计算一个密码学签名并嵌入,让阅读器能报告是谁按证书签的、以及此后有没有任何东西被改动过。画出来的那种两者都证明不了。
- 我在哪里获得证书?
- 从证书颁发机构获取——一些国家的制度、若干商业 CA 和某些雇主会颁发。你需要的是一个 PKCS#12 包,也就是把证书连同它的私钥装在一起的 .p12 或 .pfx 文件。用 OpenSSL 做的自签名证书也能很好地签名,但阅读器不会自动信任它。
- Acrobat 为什么显示签名的有效性未知?
- 因为它已经验证了数学,却无法验证身份。这条消息意味着签名完好、文档未被更改,但证书没有链接到阅读器信任的机构——每一个自签名证书都会这样。
- 我的私钥会被上传吗?
- 不会,而这正是最看重这一点的工具。.p12 在页面里读取,并在一个任务一结束就被终止的 Web Worker 里解析,所以密钥不会被保留,也什么都不发送。签名前打开网络面板,看它一直空着。
- 有可信时间戳吗?
- 没有。时间戳要通过网络从时间戳机构获取,而这个工具根本不发任何网络请求,所以记录的时间是你自己机器的时钟。它是一种主张而非证据,对有严格政策的收件人应当事先说明。
- 我的文档会被上传吗?
- 不会。文档和证书都留在你的设备上;签名在本地计算并写入文件。页面加载过一次后,签名在断网状态下也能进行,这对处理机密的东西是一种合理的方式。