Re: pdf file signed with SHA256withECDSA
Andreas Kuehne <[email protected]> Tue, 26 Jul 2016 15:23:35 +0200
| Newsgroups | gmane.comp.java.lib.itext.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============3483999576485393025==
Content-Type: multipart/alternative;
boundary="------------050005010007060403050203"
This is a multi-part message in MIME format.
--------------050005010007060403050203
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
Hi Alfonso,
I saw the problem with unrecognized OIDs for the different sets of EC
parameter before. Maybe it boils down to defining another OID
assignent. Could you please post a sample PDF with this type of signature?
Greetings,
Andreas
> Hi,
> I have a pdf file signed with Elliptic curve Digital Signature Algorithm (DSA) coupled with the Secure Hashing Algorithm (SHA256) algorithm (oid: 1.2.840.10045.4.3.2) .
>
> When I try and verify the signature with this code (iText 5.5.9):
>
> PdfPKCS7 pk = af.verifySignature(name, "BC");
>
> I get the following:
>
> no such algorithm: SHA256with1.2.840.10045.4.3.2 for provider BC
>
> Is it a wanted feature that itext does not support SHA256withECDSA?
>
> When I modify com.itextpdf.text.pdf.security.EncryptionAlgorithms class with:
>
> algorithmNames.put("1.2.840.10045.4.1", "ECDSA");
> algorithmNames.put("1.2.840.10045.4.3.2", "ECDSA");
> algorithmNames.put("1.2.840.10045.4.3.3", "ECDSA");
> algorithmNames.put("1.2.840.10045.4.3.4", "ECDSA");
>
> it seems to work.
>
> I wonder whether this solution is correct.
>
> Will iText support SHA256withECDSA in future?
>
> Best regards
>
> Alfonso
>
>
>
> AVVISO DI RISERVATEZZA Informazioni riservate possono essere contenute nel messaggio o nei suoi allegati. Se non siete i destinatari indicati nel messaggio, o responsabili per la sua consegna alla persona, o se avete ricevuto il messaggio per errore, siete pregati di non trascriverlo, copiarlo o inviarlo ad alcuno. In tal caso vi invitiamo a cancellare il messaggio ed i suoi allegati. Grazie.
> CONFIDENTIALITY NOTICE Confidential information may be contained in this message or in its attachments. If you are not the addressee indicated in this message, or responsible for message delivering to that person, or if you have received this message in error, you may not transcribe, copy or deliver this message to anyone. In that case, you should delete this message and its attachments. Thank you.
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports.http://sdm.link/zohodev2dev
>
>
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
--
Andreas Kühne
phone: +49 177 293 24 97
mailto: [email protected]
Trustable Ltd. Niederlassung Deutschland Gartenheimstr. 39C - 30659 Hannover Amtsgericht Hannover HRB 212612
Director Andreas Kühne
Company UK Company No: 5218868 Registered in England and Wales
--------------050005010007060403050203
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: 8bit
<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Alfonso,<br>
<br>
I saw the problem with unrecognized OIDs for the different sets of
EC parameter before. Maybe it boils down to defining another OID
assignent. Could you please post a sample PDF with this type of
signature?<br>
<br>
Greetings,<br>
<br>
Andreas<br>
</div>
<blockquote
cite="mid:0E92C440D7EC7B45BFDB7E440BFEBB65894B6C6A@FVG-EMB-01V-TS.UCFVG.hosted"
type="cite">
<pre wrap="">Hi,
I have a pdf file signed with Elliptic curve Digital Signature Algorithm (DSA) coupled with the Secure Hashing Algorithm (SHA256) algorithm (oid: 1.2.840.10045.4.3.2) .
When I try and verify the signature with this code (iText 5.5.9):
PdfPKCS7 pk = af.verifySignature(name, "BC");
I get the following:
no such algorithm: SHA256with1.2.840.10045.4.3.2 for provider BC
Is it a wanted feature that itext does not support SHA256withECDSA?
When I modify com.itextpdf.text.pdf.security.EncryptionAlgorithms class with:
algorithmNames.put("1.2.840.10045.4.1", "ECDSA");
algorithmNames.put("1.2.840.10045.4.3.2", "ECDSA");
algorithmNames.put("1.2.840.10045.4.3.3", "ECDSA");
algorithmNames.put("1.2.840.10045.4.3.4", "ECDSA");
it seems to work.
I wonder whether this solution is correct.
Will iText support SHA256withECDSA in future?
Best regards
Alfonso
AVVISO DI RISERVATEZZA Informazioni riservate possono essere contenute nel messaggio o nei suoi allegati. Se non siete i destinatari indicati nel messaggio, o responsabili per la sua consegna alla persona, o se avete ricevuto il messaggio per errore, siete pregati di non trascriverlo, copiarlo o inviarlo ad alcuno. In tal caso vi invitiamo a cancellare il messaggio ed i suoi allegati. Grazie.
CONFIDENTIALITY NOTICE Confidential information may be contained in this message or in its attachments. If you are not the addressee indicated in this message, or responsible for message delivering to that person, or if you have received this message in error, you may not transcribe, copy or deliver this message to anyone. In that case, you should delete this message and its attachments. Thank you.
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
iText-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/itext-questions">https://lists.sourceforge.net/lists/listinfo/itext-questions</a>
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference to the iText book: <a class="moz-txt-link-freetext" href="http://www.itextpdf.com/book/">http://www.itextpdf.com/book/</a>
Please check the keywords list before you ask for examples: <a class="moz-txt-link-freetext" href="http://itextpdf.com/themes/keywords.php">http://itextpdf.com/themes/keywords.php</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Andreas Kühne
phone: +49 177 293 24 97
mailto: <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
Trustable Ltd. Niederlassung Deutschland Gartenheimstr. 39C - 30659 Hannover Amtsgericht Hannover HRB 212612
Director Andreas Kühne
Company UK Company No: 5218868 Registered in England and Wales </pre>
</body>
</html>
--------------050005010007060403050203--
--===============3483999576485393025==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
--===============3483999576485393025==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
--===============3483999576485393025==--