digital-signature

XML validation with XMLDSIG using XadES-BES algorithm

梦想与她 提交于 2019-12-22 17:06:09
问题 Some information a program is using uses input files in xml format. The files have the following structure. <?xml version="1.0" encoding="UTF-8"?> <Envelope xmlns="urn:envelope"> <MyData Id="MyDataId"> <!-- some data --> </MyData> <Signature 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-more#rsa-sha256" /> <Reference URI="#MyDataId">

XML validation with XMLDSIG using XadES-BES algorithm

心不动则不痛 提交于 2019-12-22 17:05:31
问题 Some information a program is using uses input files in xml format. The files have the following structure. <?xml version="1.0" encoding="UTF-8"?> <Envelope xmlns="urn:envelope"> <MyData Id="MyDataId"> <!-- some data --> </MyData> <Signature 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-more#rsa-sha256" /> <Reference URI="#MyDataId">

How to sign xml element using RSA-SHA1 algorithm?

家住魔仙堡 提交于 2019-12-22 12:33:09
问题 I need to sign (and verify eventually) one of the nodes of an XML document using RSA-SHA1 algorithm. w3.org link RSA-SHA1 URI: http://www.w3.org/2000/09/xmldsig#rsa-sha1 Specified in: section 6.4.2 of [XMLDSIG-CORE2002] I am following this example, however cannot figure how to change the algorithm to required. The signature generation happens here: signedXml.ComputeSignature(); The only override with a parameter expects KeyedHashAlgorithm : public void ComputeSignature(KeyedHashAlgorithm

How to assign certificates to excel macros programmatically

徘徊边缘 提交于 2019-12-22 10:28:58
问题 I have developed some code which creates excel macros and each time after creation of new macro I want to digitally sign the macro programmatically. Can you let me know if there is any way using which I can create new digital certificates and assign those to macro programmatically. Thanks. 回答1: It is not possible to do this with VBA code. I think the best you could hope to do it would be by making Win32 API calls to simulate all the needed steps to make this happen. It would be sloppy but you

Where to store the private key on a digital signing server?

不羁的心 提交于 2019-12-22 09:56:07
问题 I am developing a client-server application that requires some files to be signed using the private key before sending to the client. The client will then verify the signature using the public key. Therefore, the private key will need to be on the server at all time and readable by the server application. The problem is that I was wondering where to store my private key that is more secure from being leaked in case the server is compromised. Should I store it in the database or should I store

Verifying digital signatures in PDF documents

你离开我真会死。 提交于 2019-12-22 08:21:13
问题 I'm trying to verify PDF's digital signatures. I know that when a PDF is signed, a byterange is defined, the certificates get embedded, and from what i've read, the signed message digest and the timestamp are also stored in the PDF. I already can extract the certificates and validate them. Now I'm trying to validate the pdf's integrity and my problem is I don't know where the signed message digest is located. In this sample signed pdf from Adobe (http://blogs.adobe.com/security

Memory Leak while verifying Authenticode Signature of Executables?

谁都会走 提交于 2019-12-22 07:52:27
问题 I am using WinVerifyTrust to verify the validity of some Windows executables with the following function, called in a loop from _tmain : int signature_is_valid(const wchar_t *filepath) { GUID guid = WINTRUST_ACTION_GENERIC_VERIFY_V2; WINTRUST_FILE_INFO file_info = { 0 }; WINTRUST_DATA wd; file_info.cbStruct = sizeof(file_info); file_info.pcwszFilePath = filepath; file_info.hFile = NULL; file_info.pgKnownSubject = NULL; ZeroMemory(&wd, sizeof(wd)); wd.cbStruct = sizeof(wd); wd.dwUIChoice = WTD

Memory Leak while verifying Authenticode Signature of Executables?

人盡茶涼 提交于 2019-12-22 07:51:30
问题 I am using WinVerifyTrust to verify the validity of some Windows executables with the following function, called in a loop from _tmain : int signature_is_valid(const wchar_t *filepath) { GUID guid = WINTRUST_ACTION_GENERIC_VERIFY_V2; WINTRUST_FILE_INFO file_info = { 0 }; WINTRUST_DATA wd; file_info.cbStruct = sizeof(file_info); file_info.pcwszFilePath = filepath; file_info.hFile = NULL; file_info.pgKnownSubject = NULL; ZeroMemory(&wd, sizeof(wd)); wd.cbStruct = sizeof(wd); wd.dwUIChoice = WTD

Java Access Token PKCS11 Not found Provider

為{幸葍}努か 提交于 2019-12-22 05:07:39
问题 Hello I'm trying to access the keystore from my smartcard in Java. And I'm using the following code.. I'm using the Pkcs11 implementation of OpenSc http://www.opensc-project.org/opensc File windows.cnf = name=dnie library=C:\WINDOWS\system32\opensc-pkcs11.dll Java Code = String configName = "windows.cnf" String PIN = "####"; Provider p = new sun.security.pkcs11.SunPKCS11(configName); Security.addProvider(p); KeyStore keyStore = KeyStore.getInstance("PKCS11", "SunPKCS11-dnie"); =)(= char[] pin

Attach hidden (biometric) data to a digital signature on a pdf

五迷三道 提交于 2019-12-22 04:29:20
问题 I'm wondering if it is possible, using iText (that I used for signing) or other tools in Java, to add biometric data on a pdf. I'll explain better: while signing on a sign tablet, I collect signature information like pen pressure, signing speed and so on. I'd like to store those informations (variables in java) togheter with the signature on the pdf. Obviously hidden and encrypted such as the signatures info. Is there some kind of hidden data field on a pdf or something that can contain this