digital-signature

Tutorial of ECDSA algorithm to sign a string

谁说我不能喝 提交于 2019-12-02 21:59:29
Can you help me to find a simple tutorial of how sign a string using ECDSA algorithm in java. But without using any third-party libraries like bouncycastle. Just JDK 7. I found it difficult to search a simple example, I'm new to cryptography. import java.io.*; import java.security.*; public class GenSig { /** * @param args the command line arguments */ public static void main(String[] args) { /* * Generate a DSA signature */ try { /* * Generate a key pair */ KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DSA", "SUN"); SecureRandom random = SecureRandom.getInstance("SHA1PRNG", "SUN");

How to digitally sign a pdf using iText?

谁说我不能喝 提交于 2019-12-02 21:28:03
How do i sign a pdf using iText ? I'am going through this LINK but didn't understand about my_private_key.pfx. Do i really need a certificate for digital signature ? Please clarify me. Thanks in advance. The document you mentioned in the question is good. You have to create digital signature files. This link has a tool that uses PKCS files and sign PDF documents. It claims to use iText, so you should able to understand the steps. source code here hope this ll help you public class JPdfSign { private static PrivateKey privateKey; private static Certificate[] certificateChain; private static

Where to get Certificate for digitally signing PDFs?

自古美人都是妖i 提交于 2019-12-02 20:28:18
I'm working on a Java application that uses iText to digitally sign PDFs that will be made available online. I have been able to sign the documents with a test cert I obtained from GlobalSign and it works great. The test cert is part of GlobalSign's "DocumentSign for Adobe PDF". The reason I had to use this cert is so that my cert chains back to the Adobe Root CA, which to my knowledge (and I could be wrong) is the only CA that is trusted by Adobe Reader out of the box. I tried regular SSL certs from VeriSign and Entrust but they didn't work as they were not trusted. Now I need to get a

RSA and PublicKey interop with dotnet

帅比萌擦擦* 提交于 2019-12-02 19:34:38
问题 Hi I am using code from this link, Can you let me know why signature is verify is not working? Java signer is using BouncyCastleProvider with SHA1withRSA , here is dotnet verify code.... using System; using System.IO; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Parameters; using Org

How to digitally sign PDF documents in a web application?

我们两清 提交于 2019-12-02 18:45:26
I'm building a web application that most allow the user to digitally sign PDF documents with certificates installed in the client machine. The document, once signed, should be posted back to the server, where it will store the signed version. The server is running Classic ASP/ASP.NET Where should I go? I actually built a system just like this into our web application. Here are some links I found tremendously helpful in doing so: http://www.codeproject.com/KB/vb/Digital_Signatures.aspx http://www.devx.com/security/Article/17249/0/page/2 http://www.example-code.com/vbdotnet/digSig1.asp http:/

Is it possible to change the appearance of the signature within the document after signing it?

爷,独闯天下 提交于 2019-12-02 18:34:51
问题 Before calculating the hash of the document for signing I am adding the TextField in my document using the below code. as I am following this link Changing signature appearance after signing pdf file with iTextSharp Here is a code that adds signature on all pages and adds a text field on the first page. the purpose of the text field is to extract the "IssuedTo" from the certificate and display it on the signature appearance. Before esign open pdf in update mode: XmlNodeList nodeList = xmlDoc

Does OpenSSL -sign for ECDSA apply ASN1 encoding to the hash before signing?

十年热恋 提交于 2019-12-02 12:07:13
This SO question ECDSA sign using OpenSSL without ASN1 encoding the hash states the OpenSSL perfoms ASN1 encoding to the hash before signing it. In other words it states that OpenSSL performs the following steps when for an Elliptic curve key -sign is called: a. Calculate H = Hash(M) b. Encode H into ASN1 standard- H’ c. Sign H’ And thus to avoid applyting step b it's neccessary to first calculate the digest, and then sign the digest using raw signing - pkeyutl for elliptic curver keys However when I run BOTH -sign and -dgst+ -pkeyutl I am able to verify the signature using -verify in both

Generating XADES-BES with “ds” prefix

江枫思渺然 提交于 2019-12-02 09:56:14
问题 I used signedxml class for generating xml signature. And the result xml like below; <Signature Id="orderSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/> <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> ............. ...... ... </Signature> <Object>....</Object> I need to generate XADES-BES xml format,, thats wy I want to add Prefix "ds:" to signedxml. without "ds",

Digital Signatures with PHP

穿精又带淫゛_ 提交于 2019-12-02 09:08:12
问题 Is it possible to let users e-sign a document? Scenario I upload document for a user on my website to review and sign User logs in, reviews the document and then somehow digitally signs it. ( not a image of their signature ) I receive document with some way of verifying they legally signed it. I would prefer the user does not need to download, sign with some third party tool and then upload the document. I want them to somehow perform this action on the webpage maybe by typing there full name

Is it possible to change the appearance of the signature within the document after signing it?

限于喜欢 提交于 2019-12-02 08:36:40
Before calculating the hash of the document for signing I am adding the TextField in my document using the below code. as I am following this link Changing signature appearance after signing pdf file with iTextSharp Here is a code that adds signature on all pages and adds a text field on the first page. the purpose of the text field is to extract the "IssuedTo" from the certificate and display it on the signature appearance. Before esign open pdf in update mode: XmlNodeList nodeList = xmlDoc.GetElementsByTagName("Signatures"); string signature = nodeList[0].FirstChild.InnerText; string src =