- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
能否请您更详细地解释我,最终给我一些示例(一个用于附加,一个用于分离)iText 分离签名的确切含义?
我发现了这个很棒的文档:iText digital signature pdf关于 iText 数字签名,但我仍然不确定我是否理解 iText 分离签名概念。
阅读文档(见链接)我发现了这个定义:
In PDF, we sometimes refer to a detached signature. According to Wikipedia, a detached signature is a type of digital signature that is kept ‘separate from its signed data’, as opposed to ‘bundled together into a single file’. This definition isn’t entirely correct in the context of PDF: the signature is enclosed in the PDF file, but the attributes of the signature are ‘part of the signature’, as opposed to ‘stored in the signature dictionary’.
我不清楚“签名的属性”是什么意思(它指的是什么签名属性?)
请注意,文章的作者(iText 文档)正在使用此签名 PDF 文件的片段:
%PDF-1.4
%âãÏÓ
3 0 obj
<</F 132/Type/Annot/Subtype/Widget/Rect[0 0 0 0]/FT/Sig
/DR<<>>/T(signature)/V 1 0 R/P 4 0 R/AP<</N 2 0 R>>>>
endobj
1 0 obj
<</Contents <0481801e6d931d561563fb254e27c846e08325570847ed63d6f9e35 ... b2c8788a5>
/Type/Sig/SubFilter/adbe.pkcs7.detached/Location(Ghent)/M(D:20120928104114+02'00')
/ByteRange [0 160 16546 1745 ]/Filter/Adobe.PPKLite/Reason(Test)/ContactInfo()>>
endobj
...
9 0 obj
<</Length 63>>stream
q
BT
36 806 Td
0 -18 Td
/F1 12 Tf
(Hello World!)Tj
0 0 Td
ET
Q
endstream
endobj
...
11 0 obj
<</Type/Catalog/AcroForm<</Fields[3 0 R]/DR<</Font<</Helv 5 0 R
/ZaDb 6 0 R>>>>/DA(/Helv 0 Tf 0 g )/SigFlags 3>>/Pages 10 0 R>>
endobj
xref
0 12
0000000000 65535 f
...
0000017736 00000 n
trailer
<</Root 11 0 R/ID [<08ed1afb8ac41e841738c8b24d592465><bd91a30f9c94b8facf5673e7d7c998dc>]/Info 7 0 R/Size 12>>
startxref
17879
%%EOF
最佳答案
虽然您引用的白皮书是 Digital Signatures for PDF documents由 Bruno Lowagie ,对于任何尝试使用 iText 创建集成 PDF 签名的人来说确实是必读之书(即使您不使用 iText,它也是一个很好的信息来源),我同意其中对在“分离的 PDF 签名”并没有真正打到家:
NOTE: In PDF, we sometimes refer to a detached signature. According to Wikipedia, a detached signature is a type of digital signature that is kept ‘separate from its signed data’, as opposed to ‘bundled together into a single file’. This definition isn’t entirely correct in the context of PDF: the signature is enclosed in the PDF file, but the attributes of the signature are ‘part of the signature’, as opposed to ‘stored in the signature dictionary’.
首先,将这些签名称为“分离”并不是任何当前规范强制执行的术语。无论如何我们这样做的原因是,在此类签名的签名字典中使用的 标识符(adbe.pkcs7.detached 或 ETSI.CAdES.detached) 包含该词。
因此,问题实际上应该是:为什么这些标识符包含“分离”一词?
要理解这一点需要知道,原来有两种集成的PDF签名,将PKCS#7签名容器嵌入到PDF中,分别由adbe.pkcs7.detached和标识>adbe.pkcs7.sha1.
这两种签名的区别在于
ContentInfo
结构中 并且这个嵌入的数据包是以 PKCS#7 方式签名的;ContentInfo
结构为空,并且已签名外部文档的数据范围以 PKCS#7 方式签名。因此,在 adbe.pkcs7.sha1 签名的情况下,实际签名的数据嵌入到容器中,而在 adbe.pkcs7.detached 签名的情况下,实际签名的数据数据不是。
Thus, on the level of the PKCS#7 signature containers signed data and signature are detached from each other in the latter case.
(事实上,以 PKCS#7 方式签名可以——而且通常确实——包括计算要签名的数据的哈希值,将此哈希值添加到多个 so-称为经过身份验证的属性,并最终签署这些特殊属性,不应分散我们的注意力。)
其他类型的分离签名(ETSI.CAdES.detached)的构造类似于adbe.pkcs7.detached容器。它们之间的区别主要是对容器的附加属性的剖析。
白皮书中关于属性作为签名容器一部分的论证实际上说明了前面提到的所有签名类型与adbe.x509.rsa_sha1签名之间的区别,这是第三种原始集成PDF签名类型。这种类型不是基于签名容器,而是相当裸露的签名;因此,在这种情况下,任何额外信息都必须存储在 PDF 中它们自己的结构中
关于iText 分离签名方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26468316/
我得到了这个printHashKey函数,它运行良好。 fun printHashKey() { try { val info : PackageInfo = packageM
如何使用正确的签名 key 为我的 Android 应用包签名? 最佳答案 我尝试在此处和 this question 中使用多个答案, 但不知何故我收到了这个错误,因为我的 android/app/
我的 gradle 文件中有这个: android { signingConfigs { mySigningConfig { keyAlias 'the
请至少选择一个签名版本以在 Android Studio 2.3 中使用 现在在 Android Studio 中生成一个签名的 APK 时,它显示了两个选项(复选框),即 1. V1(Jar 签名)
我想表示一些标量值(例如整数或字符串)通过它的实际值或一些 NA 值,然后存储它们在集合中(例如列表)。目的是处理缺失值。 为此,我实现了一个签名 module type Scalar = sig
为什么这不完全有效? sum :: (Num a, Num b) => a -> b -> c sum a b = a + b 当然,错误消息与签名有关,但我仍然不明白原因。 Couldn't mat
谢谢帮助,我的问题是关于从下面的代码中收到的 ax 值? mov al,22h mov cl,0fdh imul cl 真机结果:ff9a 我的预期:00:9a(通过二进制相乘) 第一个数字是 22h
我有一个注释: import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.
我从对物体的思考中得出了一个术语。当我们扩展一个类时,扩展类将具有与父类相同的签名,因此术语 IS-A 来自...示例 class Foo{ } class Foo2 extends Foo{ } c
我需要在有符号整数和它们作为字节序列的内部表示之间进行转换。在 C 中,我使用的函数如下: unsigned char hibyte(unsigned short i) {return i>>8;}
我正在尝试使用给定的 RSA 参数对一些数据进行签名。 我给出了模数、指数、D、DP、DQ、P、Q 和 InverseQ。什么库或方法最容易使用来计算此签名。在 C# 中,一旦您提供参数,它们就会有一
这些签名之间有什么区别? T * f(T & identifier); T & f(T & identifier); T f(T & identifier); void f(T * identifie
这个问题在这里已经有了答案: 关闭 11 年前。 Possible Duplicate: Where and why do I have to put the “template” and “typ
我有一个签名,我需要在签名旁边添加图片。但我不确定 css 的确切程度和内容。目前它显示在文字下方,我应该把图片放在哪里?在相同的 tr 或 td 中?
查看 LinkedHashMap 的 JDK 源代码,我注意到这个类被声明为: public class LinkedHashMap extends HashMap im
背景:我继承了一个基于 linux 的嵌入式系统,其中包含一个 SMTP 代理和一些我不得不忍受的古怪限制。它位于 SMTP 客户端和服务器之间。当 SMTP 客户端连接时,代理会打开与服务器的连接,
这是 C++17 形式的规则 ([basic.lval]/8),但它在其他标准中看起来很相似(在 C++98 中是“lvalue”而不是“glvalue”): 8 If a program attem
我有一个注释: import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.
我即将开展一个项目,希望使用电子签名板使用 C# 捕获客户的签名、在设备上显示文本等。 现在,在我开始做进一步的研究之前,我想向你们征求一些意见/建议,我应该使用哪些设备.. 我现在的要求非常笼统:我
呢喃自己在心中开始扩张地盘,仿佛制式地广播了三次。 漾起的涟绮,用谈不上精腻的手段。 拒绝天亮,却又贪恋着贪恋多情的日光。 川流不息的画面是他们,而我的落幕停在右脚,它渴望着下台,而我只剩自言
我是一名优秀的程序员,十分优秀!