由 iTextSharp 5 或 iText7-dotnet 签名的 PDF 显示对 iText 和 Adobe 有效,但对 EU DSS 演示无效
PDF signed by iTextSharp 5 or iText7-dotnet shows valid by iText and Adobe, but not by EU DSS Demo
我使用最新的 iTextSharp 5 进行 PDF 签名问题。我知道该版本已被弃用,但我必须使用旧版本,因为我需要在不高于 .NET Framework v3 的环境中使用它。允许 5 个。
对于歌曲文件,客户可以使用软件密钥或硬件密钥。我们已经在我们公司使用了 RSA 签名,但现在我们也必须实现对 ECDsa 密钥的支持。这就是为什么我尝试使用 iText 的 PrivateKeySignature
class 和调用 MakeSignature.SignDetached
方法对 PDF 文件进行签名。
当我使用 RSA 密钥签署 PDF 并尝试使用欧盟委员会的 DSS 演示应用程序 (https://ec.europa.eu/cefdigital/DSS/webapp-demo/validation) 验证签名时,签名没有问题,只是它不接受证书颁发者作为受信任的 CA。没关系,因为我使用内部 CA 生成的测试密钥,仅供开发人员使用。
但是如果我使用 ECDSA 密钥对 PDF 进行签名,DSS 演示应用程序会显示“签名不完整”。
我用于签名的代码:
AbstractPdfSigner pdfSigner = new PdfSigner();
pdfSigner.SignAsPkcs7Detached = false;
pdfSigner.SignMethod = "Hashed;
pdfSigner.SignReason = "The Quick Brown Fox Jumps Over The Lazy Dog";
pdfSigner.SignLocation = "Test Location";
pdfSigner.SignToNewRevision = true;
pdfSigner.TsaClientUrl = "https://bteszt.e-szigno.hu/tsa";
pdfSigner.TsaClientLogin = "teszt";
pdfSigner.TsaClientPwd = "teszt";
pdfSigner.TsaClientAuthenticationCertificate = null;
pdfSigner.EnableOcsp = false;
pdfSigner.OcspUrl = null;
pdfSigner.HashAlgorithmId = "SHA256";
pdfSigner.VisibleSignatureX1 = 10;
pdfSigner.VisibleSignatureY1 = 10;
pdfSigner.VisibleSignatureX2 = 250;
pdfSigner.VisibleSignatureY2 = 90;
string testPdf = "JVBERi0xLjQKJeLjz9MKMiAwIG9iago8PC9GVC9TaWcvVHlwZS9Bbm5vdC9TdWJ0eXBlL1dp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OkRlc2NyaXB0aW9uPgogIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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BuIAowMDAwMDA1MjI0IDAwMDAwIG4gCjAwMDAwMTE4NzUgMDAwMDAgbiAKMDAwMDAwNTMwNCAwMDAwMCBuIAowMDAwMDA1NDY2IDAwMDAwIG4gCjAwMDAwMTE5NDUgMDAwMDAgbiAKMDAwMDAxMjE3MSAwMDAwMCBuIAowMDAwMDA1Njk0IDAwMDAwIG4gCnRyYWlsZXIKPDwvU2l6ZSAxOS9Sb290IDggMCBSL0luZm8gNiAwIFIvSUQgWzw0ZDRjMzExZGQ2YTY3OTBmNGUxYTlhYWI4MmNiZThmYT48ZjU4OTA3MWEyZTdhMDljNDAzNzZhMzg3Yzg3MDFjMTE+XT4+CiVpVGV4dC01LjUuMTMuMgpzdGFydHhyZWYKMTIyNTMKJSVFT0YK";
pdfSigner.InputPdfBuffer = Convert.FromBase64String(testPdf);
Status status = pdfSigner.Sign(this.Handle, null);
我使用的 classes 在这里:https://gist.github.com/azure-hu/822229714a6ca896682bbb903e1b1ecf, but the same happened even if I tried to use examples provided by iText. (for example: https://kb.itextsupport.com/home/it5kb/examples/digital-signatures-chapter-2#Digitalsignatures-chapter2-c2_01_signhelloworld)
我在创建 ECDsa 签名 PDF 文件时有什么遗漏吗?也许 iTextSharp 5 只能使用 RSA 或 DSA 密钥签署 PDF 文件?
就像评论中提到的@mval一样,iText使用public 密钥算法 OID作为签名算法 OID。
在 RSA 的情况下,这里可以为 RSA 密钥和 RSASSA(使用 PKCS#1 v1.5 填充)指定相同的 OID。
ECDSA 不是这种情况,因此 eSignature DSS 会抱怨。另一方面,Adobe Acrobat (Reader) 非常松懈。它实际上忽略了签名算法 OID 字段,您甚至可以在该字段中拥有带有 RSA OID 的 ECDSA 签名,而当前的 Acrobat 不会抱怨。
要解决此问题,请使用 IExternalSignatureContainer
实现而不是 IExternalSignature
实现,并调用 MakeSignature.SignExternalContainer
而不是 MakeSignature.SignDetached
。在您的 IExternalSignatureContainer
实现中,您可以使用 BouncyCastle 或 Windows Crypto API 类 创建 CMS 签名容器。
关于 iText 的错误签名算法 OID 的其他问题:
- C# Itext7 signed pdf signature is invalid in Foxit PDF Reqader but valid in Acrobat reader
我使用最新的 iTextSharp 5 进行 PDF 签名问题。我知道该版本已被弃用,但我必须使用旧版本,因为我需要在不高于 .NET Framework v3 的环境中使用它。允许 5 个。
对于歌曲文件,客户可以使用软件密钥或硬件密钥。我们已经在我们公司使用了 RSA 签名,但现在我们也必须实现对 ECDsa 密钥的支持。这就是为什么我尝试使用 iText 的 PrivateKeySignature
class 和调用 MakeSignature.SignDetached
方法对 PDF 文件进行签名。
当我使用 RSA 密钥签署 PDF 并尝试使用欧盟委员会的 DSS 演示应用程序 (https://ec.europa.eu/cefdigital/DSS/webapp-demo/validation) 验证签名时,签名没有问题,只是它不接受证书颁发者作为受信任的 CA。没关系,因为我使用内部 CA 生成的测试密钥,仅供开发人员使用。
但是如果我使用 ECDSA 密钥对 PDF 进行签名,DSS 演示应用程序会显示“签名不完整”。
我用于签名的代码:
AbstractPdfSigner pdfSigner = new PdfSigner();
pdfSigner.SignAsPkcs7Detached = false;
pdfSigner.SignMethod = "Hashed;
pdfSigner.SignReason = "The Quick Brown Fox Jumps Over The Lazy Dog";
pdfSigner.SignLocation = "Test Location";
pdfSigner.SignToNewRevision = true;
pdfSigner.TsaClientUrl = "https://bteszt.e-szigno.hu/tsa";
pdfSigner.TsaClientLogin = "teszt";
pdfSigner.TsaClientPwd = "teszt";
pdfSigner.TsaClientAuthenticationCertificate = null;
pdfSigner.EnableOcsp = false;
pdfSigner.OcspUrl = null;
pdfSigner.HashAlgorithmId = "SHA256";
pdfSigner.VisibleSignatureX1 = 10;
pdfSigner.VisibleSignatureY1 = 10;
pdfSigner.VisibleSignatureX2 = 250;
pdfSigner.VisibleSignatureY2 = 90;
string testPdf = "JVBERi0xLjQKJeLjz9MKMiAwIG9iago8PC9GVC9TaWcvVHlwZS9Bbm5vdC9TdWJ0eXBlL1dpZGdldC9SZWN0WzEwIDEwIDI1MCA5MF0vVChEU0lHKS9GID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ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/PgplbmRzdHJlYW0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gMDAwMDAgbiAKMDAwMDAwNTMwNCAwMDAwMCBuIAowMDAwMDA1NDY2IDAwMDAwIG4gCjAwMDAwMTE5NDUgMDAwMDAgbiAKMDAwMDAxMjE3MSAwMDAwMCBuIAowMDAwMDA1Njk0IDAwMDAwIG4gCnRyYWlsZXIKPDwvU2l6ZSAxOS9Sb290IDggMCBSL0luZm8gNiAwIFIvSUQgWzw0ZDRjMzExZGQ2YTY3OTBmNGUxYTlhYWI4MmNiZThmYT48ZjU4OTA3MWEyZTdhMDljNDAzNzZhMzg3Yzg3MDFjMTE+XT4+CiVpVGV4dC01LjUuMTMuMgpzdGFydHhyZWYKMTIyNTMKJSVFT0YK";
pdfSigner.InputPdfBuffer = Convert.FromBase64String(testPdf);
Status status = pdfSigner.Sign(this.Handle, null);
我使用的 classes 在这里:https://gist.github.com/azure-hu/822229714a6ca896682bbb903e1b1ecf, but the same happened even if I tried to use examples provided by iText. (for example: https://kb.itextsupport.com/home/it5kb/examples/digital-signatures-chapter-2#Digitalsignatures-chapter2-c2_01_signhelloworld)
我在创建 ECDsa 签名 PDF 文件时有什么遗漏吗?也许 iTextSharp 5 只能使用 RSA 或 DSA 密钥签署 PDF 文件?
就像评论中提到的@mval一样,iText使用public 密钥算法 OID作为签名算法 OID。
在 RSA 的情况下,这里可以为 RSA 密钥和 RSASSA(使用 PKCS#1 v1.5 填充)指定相同的 OID。
ECDSA 不是这种情况,因此 eSignature DSS 会抱怨。另一方面,Adobe Acrobat (Reader) 非常松懈。它实际上忽略了签名算法 OID 字段,您甚至可以在该字段中拥有带有 RSA OID 的 ECDSA 签名,而当前的 Acrobat 不会抱怨。
要解决此问题,请使用 IExternalSignatureContainer
实现而不是 IExternalSignature
实现,并调用 MakeSignature.SignExternalContainer
而不是 MakeSignature.SignDetached
。在您的 IExternalSignatureContainer
实现中,您可以使用 BouncyCastle 或 Windows Crypto API 类 创建 CMS 签名容器。
关于 iText 的错误签名算法 OID 的其他问题:
- C# Itext7 signed pdf signature is invalid in Foxit PDF Reqader but valid in Acrobat reader