如何查看'PDF Digital Signature'是否符合'PAdES'标准?

How to check 'PDF Digital Signature' whether it is 'PAdES' standard or not?

我们如何检查我们在 PDF 上的数字签名是否符合 'PAdES' 标准?

最好的问候 Pearapon S.

泰国曼谷

OP 使用第三方软件(本例中为 iText 5.4.2)创建 PAdES 签名,现在想检查生成的签名是否确实满足 PAdES 规范。这里有一些想法:

"PAdES signature"是什么意思?

首先你必须定义"PAdES signature"的意思:

  • 您指的是即将发布的 PDF 2.0 规范中定义的术语吗:

    The PDF signatures using the Subfilter value ETSI.CAdES.detached are referred to as PAdES signatures and they follow one of two CMS profiles created to be compatible with the corresponding CAdES profiles defined in ETSI EN 319 122.

    (ISO 32000-2 FDIS section 12.8.3.4 - CAdES signatures as used in PDF)

  • 您的意思是更具体地说是遵循 ETSI EN 319 142-1 中指定的 PAdES 基线签名配置文件之一的签名?

    Clause 6 defines four levels of PAdES baseline signatures, intended to facilitate interoperability and to encompass the life cycle of PAdES signature, namely:

    a) B-B level provides requirements for the incorporation of signed and some unsigned attributes when the signature is generated.

    b) B-T level provides requirements for the generation and inclusion, for an existing signature, of a trusted token proving that the signature itself actually existed at a certain date and time.

    c) B-LT level provides requirements for the incorporation of all the material required for validating the signature in the signature document. This level aims to tackle the long term availability of the validation material.

    d) B-LTA level provides requirements for the incorporation of electronic time-stamps that allow validation of the signature long time after its generation. This level aims to tackle the long term availability and integrity of the validation material.

    (ETSI EN 319 142-1 V1.1.1 section 6 - PAdES baseline signatures)

  • 或者来自 ETSI EN 319 142-2 的附加 PAdES 签名配置文件之一是否也符合条件?

    The present document contains a profile for the use of PDF signatures, as described in ISO 32000-1 [1] and based on CMS digital signatures [i.6], that enables greater interoperability for PDF signatures by providing additional restrictions beyond those of ISO 32000-1 [1]. This first profile is not related to ETSI EN 319 142-1 [4].

    The present document also contains a second set of profiles that extend the scope of the profile in PAdES part 1 [5], while keeping some features that enhance interoperability of PAdES signatures. These profiles define three levels of PAdES extended signatures addressing incremental requirements to maintain the validity of the signatures over the long term, in a way that a certain level always addresses all the requirements addressed at levels that are below it. These PAdES extended signatures offer a higher degree of optionality than the PAdES baseline signatures specified in ETSI EN 319 142-1 [4].

    The present document also defines a third profile for usage of an arbitrary XML document signed with XAdES signatures that is embedded within a PDF file.

    (ETSI EN 319 142-2 V1.1.1 section 1 - Scope)

特别是您必须知道您是否也在考虑来自 ETSI EN 319 142-2 的额外 PAdES 签名配置文件 "for CMS digital signatures in PDF" 或 "for XAdES Signatures signing XML content in PDF",因为这两个配置文件与剩下的。

我假设您不考虑这两个配置文件,因为前者或多或少是很好的旧 ISO 32000-1 CMS 签名,但大多数签名者都遵循一些限制,而后者是 XML 签名这是完全不同的动物。

所有剩余配置文件的主要区别在于添加到文档中的与验证相关的信息和时间戳的数量和类型,以使验证越来越不依赖于必须在线检索的数据。

检查选项

  1. 手动:您使用 PDF 浏览器(如 iText RUPS 或 PDFBox PDF 调试器)、十六进制查看器、ASN.1 转储实用程序、上面列表中适用的基本规范以及附加的从基本规范中引用的规范并检查所有标准。

    单个签名需要相当长的时间,但最终您可以了解有关测试签名的所有信息。如果您有使用这些工具和使用规范的经验,或者您确实有很多时间学习,我只推荐这个。

  2. 以编程方式:您采用通用 PDF 库(如果您采用与创建签名所用的不同的库,则结果的可信度可能会增加)、安全功能库(例如BouncyCastle),基本规范和附加规范,并开始实施测试规范中标准的程序。

    这需要相当长的时间来开发,但随后可以重复使用,例如用于质量保证和倒退预防。如果您有使用这些库和使用规范的经验,或者您确实有很多时间学习,我只推荐这个。

  3. 您使用为您评估签名的现有软件或服务,例如ETSI 签名一致性检查器 (http://signatures-conformance-checker.etsi.org/pub/index.shtml),一个免费的在线工具,可以执行大量检查以验证 ETSI 高级电子签名的一致性。

    这显然是最快的选择,但您通常无法确定执行测试的可靠性。因此,作为第一个意见是好的,但根据风险的大小,我想要更多的安全性。

  4. 您可以聘请专家根据您的要求分析评估您签名的有效性。

    这可能会很昂贵,但至少如果您以后因某些不合规而遇到麻烦,您可以求助。