digital-signature

pdfBox - Signature validity checkmark not visible in Acrobat reader

巧了我就是萌 提交于 2019-11-26 23:20:31
I am adding a visual signature to a pdf using this as reference - https://stackoverflow.com/a/27940667/7103795 I am able to print the details properly. But the pdf does not display a green tick when opened in Acrobat though it is written "Signed and all signatures are valid." in the signature panel. This is an example of what I need: How can I ensure that the validity sign show up? I am using pdfBox version 2.0.1 In-document visualisations of the signature validity have been deprecated nearly a decade ago. Adobe Reader supports them for backward compatibility reasons only but they have never

Correct way to sign and verify signature using bouncycastle

耗尽温柔 提交于 2019-11-26 22:33:40
问题 I am using bcmail-jdk16-1.46.jar and bcprov-jdk16-1.46.jar (Bouncycastle libraries) to sign a string and then verify the signature . This is my code to sign a string : package my.package; import java.io.FileInputStream; import java.security.Key; import java.security.KeyStore; import java.security.PrivateKey; import java.security.Security; import java.security.Signature; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.List; import org.bouncycastle.cert

Does anyone know a free(trial) timestamp server service? [closed]

随声附和 提交于 2019-11-26 22:31:41
问题 Would like to know if anybody knows any free(trial) time-stamp server service. I would like to test time stamping features in itext. Like I used Start Com class 1 as free CA for testing purposes. Hope I made it clear. Hoping someone knows a place Thanks 回答1: You can try one of these publicly accessible RFC 3161 compliant time-stamping services: https://freetsa.org Supports HTTP, HTTPS and TCP transports and has other features http://time.certum.pl http://dse200.ncipher.com/TSS/HttpTspServer

How to implement digital signature with my existing web project

99封情书 提交于 2019-11-26 21:23:24
问题 I'm working on the project where the user needs to do a digital signature on a document. I checked in the google and know about sinadura which is a desktop application but I need to invoke this into my web application. I installed alfresco community edition on Linux server (https://www.alfresco.com/thank-you/thank-you-downloading-alfresco-community-edition) and followed the instruction as below GitHub link. https://github.com/zylklab/alfresco-sinadura I've implemented successfully with above

How to sign a custom JCE security provider

时光怂恿深爱的人放手 提交于 2019-11-26 20:57:37
问题 Sun's PKCS11 JCE security provider is lacking some functionality we need. So I wrote an enhanced version of it using the original sources. Unfortunately the JCE infrastructure rejects the new provider "JCE cannot authenticate the provider" because it is not properly signed. javax.crypto.JceSecurity.verifyProviderJar(...) throws. (it calls javax.crypto.JarVerifier.verify() ) Any suggestions how to sign the new provider to make it work with JCE? 回答1: The process is described in the document,

Difference between openSSL rsautl and dgst

狂风中的少年 提交于 2019-11-26 20:43:12
The following command generates a signature for an input file: openssl dgst -sha1 -sign privateKey.pem -out signature1 someInputFile The following commands also generates a signature for an input file: openssl dgst -binary -sha1 someInputFile > digest openssl rsautl -sign -in digest -inkey privateKey.pem -out signature2 As far as I know, they should both create the RSA signature of a SHA1 digest of the file. But they don't generate the same signature. As a result, the signature generated with method 2 can also not be verified by an openssl dgst -verify call. Does somebody know what the

Using SHA1 and RSA with java.security.Signature vs. MessageDigest and Cipher

时光毁灭记忆、已成空白 提交于 2019-11-26 19:34:23
I'm trying to understand what the Java java.security.Signature class does. If I compute an SHA1 message digest, and then encrypt that digest using RSA, I get a different result to asking the Signature class to sign the same thing: // Generate new key KeyPair keyPair = KeyPairGenerator.getInstance("RSA").generateKeyPair(); PrivateKey privateKey = keyPair.getPrivate(); String plaintext = "This is the message being signed"; // Compute signature Signature instance = Signature.getInstance("SHA1withRSA"); instance.initSign(privateKey); instance.update((plaintext).getBytes()); byte[] signature =

How to sign string with private key

隐身守侯 提交于 2019-11-26 19:25:51
问题 How can I get the signature of a string using SHA1withRSA if I already have the Private Key as byte[] or String ? 回答1: I guess what you say is you know the key pair before hand and want to sign/verify with that. Please see the following code. import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.NoSuchAlgorithmException; import java.security.Signature; import sun.misc.BASE64Encoder; public class MainClass { public static void main(String[] args) throws

In C#, sign an xml with a x.509 certificate and check the signature

旧巷老猫 提交于 2019-11-26 19:19:36
问题 I'm trying to sign an XML file using a x.509 certificate, I can use the private key to sign the document and then use the CheckSignature method (it has an overload that receives a certificate as parameter) to verify the signature. The problem is that the user who validates the signature must have the certificate, my concern is, if the user has the certificate then he has access to the private key, and as I understand, this is private and should be available only to the user who signs. What am

Digitally sign PDF files [closed]

柔情痞子 提交于 2019-11-26 18:27:45
I have a digital certificate that identifies an user. I need to use it to Digitally sign pdf files. Does anyone have an example that does not uses a third party component? I need to get this done but it would be nice to fully understand how things are done. C# Examples please :) Darin Dimitrov The open source iTextSharp library will allow you to do this. Here's a post explaining how to digitally sign a pdf file. If you don't want to use a third party library then you can implement it yourself but it could be a tough task -> you can start by reading the pdf specification (8.6MB) Proper PDF