digital-signature

Sign PDF hash using java and iText

一笑奈何 提交于 2020-01-23 03:52:05
问题 I have an application that generates a PDF, and that needs to be signed. We have not the certificates to sign the document, because they're in a HSM, and the only way we could make use of the certificates is using a webservice. PdfReader reader = new PdfReader(src); reader.setAppendable(true); ByteArrayOutputStream baos = new ByteArrayOutputStream(); FileOutputStream fout = new FileOutputStream(dest); PdfStamper stamper = PdfStamper.createSignature(reader, fout, '\0'); PdfSignatureAppearance

Certificate of sender expired before signature verify

喜夏-厌秋 提交于 2020-01-23 00:41:21
问题 I m working on one project about certificates and digital signatures in Java, but i cant understand following situation. Certificates of sender and receiver of document was valid when signature is created. But in time, when receiver received document, certificate of sender had expired. Is that valid situation, so receiver can normally verify signature, or he cant? One more question. For what is used Non-repudiation key usage? 回答1: A digital signature will remain cryptographically correct even

Sign data using private key on client-side (javascript)

做~自己de王妃 提交于 2020-01-22 09:54:28
问题 I know, it looks strange, but I need to sign some data on client-side using javascript only, no ajax backdoor to server-side openssl available. Could someone suggest some client-side solution to sign data using private key? Is it possible? Thanks. 回答1: Found great signing tool. It implements RSA-SHA1 (works perfectly) and RSA-SHA256 (works strange), and allow both to generate signature using private key and to verify signature using certificate. 回答2: I've gone down the same road as you, you

XML Canonicalization algorithm gives two difference results when called directly than when called as part of an xml digital signature?

有些话、适合烂在心里 提交于 2020-01-21 04:36:09
问题 I'm getting two different hashes of the same xml document when I directly canonicalize some xml than when I perform a digital signature on it which also performs the same canonicalization algoririth on the xml before hashing it? I worked out that the digital signature canonicalization includes the new line characters '\n' and spacing characters when canonicalizing and the direct algorithm does not. Including the new line characters + spaces is not in the canonicalization specification though?

failed to verify a dsawithSha1 signed message against a DSA public key in python/m2crypto

若如初见. 提交于 2020-01-17 08:06:27
问题 - I'm trying to verify a signed message using a x509 certificate holding a dsa public key. The x509 certificate was provided by an SAP System in PKCS7 encoding and after converting in PEM with openssl I'm able to read the contents (openssl x509 -in sapcert.pem -inform pem -text) It holds a public key in dsaEncryption, showing me the DSA parameters y(pub), p, q and g. Because I did not found a DSA implementation in M2Crypto x509 class, i tried to build the DSA public key by myself. Therefor I

How to add a web address to program details displayed in Control Panel - Default Programs

落花浮王杯 提交于 2020-01-17 03:59:15
问题 I am writing a program that can handle mailto: protocol. In order to allow user to select my program as a default email handler, I registered my program. However, I noticed that some, programs display clickable link to company web site under company name, for example File Explorer. How do I specify a link to my web site so that Default Programs UI shows it when my app is selected? I use Microsoft Visual Studio 2013 ultimate. Here's my program registration details in .reg format: Windows

How to extract and verify PDF signature (PKCS7) with openssl?

不羁岁月 提交于 2020-01-16 22:39:44
问题 I would like to detect signed PDFs in PHP and verify if the signature is valid. From this document I have written this PHP code below. What it does is: Extract the PKCS7 code (it works because I can get the details from Openssl) Compute the SHA256 hash of the document. At the end I has a PKCS7 file and a SHA256. Now, I would like to verify my signature against my PKCS7 file. How can I do this? I initially looked to the digest_enc_alg / sha256WithRSAEncryption / enc_digest , but it seems it is

How to extract and verify PDF signature (PKCS7) with openssl?

你离开我真会死。 提交于 2020-01-16 22:37:19
问题 I would like to detect signed PDFs in PHP and verify if the signature is valid. From this document I have written this PHP code below. What it does is: Extract the PKCS7 code (it works because I can get the details from Openssl) Compute the SHA256 hash of the document. At the end I has a PKCS7 file and a SHA256. Now, I would like to verify my signature against my PKCS7 file. How can I do this? I initially looked to the digest_enc_alg / sha256WithRSAEncryption / enc_digest , but it seems it is

How to extract and verify PDF signature (PKCS7) with openssl?

六月ゝ 毕业季﹏ 提交于 2020-01-16 22:37:07
问题 I would like to detect signed PDFs in PHP and verify if the signature is valid. From this document I have written this PHP code below. What it does is: Extract the PKCS7 code (it works because I can get the details from Openssl) Compute the SHA256 hash of the document. At the end I has a PKCS7 file and a SHA256. Now, I would like to verify my signature against my PKCS7 file. How can I do this? I initially looked to the digest_enc_alg / sha256WithRSAEncryption / enc_digest , but it seems it is

How to extract all the list of digest algorithm from signed dll using PowerShell?

拈花ヽ惹草 提交于 2020-01-16 14:54:26
问题 I have a dll file which is digitally signed. I need to write a PowerShell command which would get me the Digest Algorithm that are used for the Digital Signature. The Dll I have has both SHA1 and SHA256 and I need both values. I tried the below solution but it gives SHA1 only How to extract digest algorithm from signed dll using PowerShell? command : Get-AuthenticodeSignature $file.Filename | %{ $_.SignerCertificate.SignatureAlgorithm.friendlyname } 回答1: After some searching around, I found