0

I've got a doubt about how to create the VRI entry for a timestamp that's inside a PAdES signature.

Let's suppose there is a pdf document with a Signature and this signature has an embed timestamp.

Example:

\Sig
[...]
\Contents <1234567890ABCDEF[...]>
[...]
Type \DSS
\VRI <<
     \Hash1 object1
     \Hash2 object2
>>
[...]

Hash1 is easy to calculate: It's the whole signature hash, including the timestamp ( 1234567890ABCDEF[...] )

But Hash2... What should I use to calculate it? In the ETSI document, it's written like this (PAdES LTV Profile - Part 4 - V1.1.2 page 12):

For a Time-stamp's signature it is the bytes of the Time-stamp itself since the Time-stamp token is a signed data object

But I must say that didn't help a lot. Is it the timeStampToken? Only the content? What is "The time-stamp itself"?

Does anyone know any document that clarifies this? Reference implementation

4

1 回答 1

1

你引用的定义

对于时间戳的签名,它是时间戳本身的字节,因为时间戳令牌是签名的数据对象

来自 ETSI TS,它首先定义了 pades LTV 结构。

同时,该 TS 已被 ETSI EN 319 142-1 取代,其中定义重新表述为:

对于文档签名或文档时间戳签名,散列的字节应是条目中完整的十六进制字符串的字节,其中包含签名的 DER 编码二进制数据对象(例如 PKCS#7、CMS或 CAdES 对象)。

因此,文档时间戳就像常规签名一样简单地进行。

顺便说一句,相同的规范规定:

不应使用 VRI 字典。VRI 字典条目的包​​含是可选的。VRI 条目中引用的所有验证材料也在 DSS 条目中引用

因此,您可能根本不需要这些条目。


我才意识到你应该

有一个带有签名的 pdf 文档,并且该签名具有嵌入时间戳。

诚然,嵌入式时间戳不受上述引用的约束。但实际上,时间戳记号是一个ContentInfo包装对象的SignedData对象,就像常规的 CMS 签名容器一样。因此,时间戳记号是要散列的对象。

于 2016-10-08T08:23:27.907 回答