digital-signature

How do I read the digital signature information from a signed .Net assembly?

丶灬走出姿态 提交于 2019-12-04 02:46:12
I am writing an assembly information application to be used in our software build process and am trying to read the digital signature information from a signed .Net assembly. I want to do in my C# code what Windows Explorer can do by right-clicking a signed assembly and selecting the "Digital Signatures" tab and then clicking the Details button. e.g. Has anyone got an idea how to do this programmatically in C#? I am currently using the Mono Cecil library to get the rest of the information from the assembly. Your help will be most appreciated. The Mono project provides source code for both

Canonicalizing XML in Ruby

一笑奈何 提交于 2019-12-04 02:28:55
I'm working on a SAML gateway using Ruby/Rails and I'm attempting to write some code that validates the xml digital signature of the incoming SAML response against the x509 cert of the originating service. My problem: the signature depends on a canonicalized version of the XML that is hashed and then signed and I'm having trouble finding a ruby lib/gem that will canonicalize XML per the spec . I found a super old gem on rubyforge that is a mess but I'd be more interested if something like nokogiri supported this kind of functionality (from the nokogiri docs, it doesn't). I've googled

How important is it to digitally sign our executables?

不羁的心 提交于 2019-12-04 00:45:13
We produce a content management system. It's a database-based system, used only by businesses and organizations, and never downloadable from the Internet. That is, it's not the kind of software someone might stumble upon and wonder what it is and whether it's safe to run. Over the 20+ years our system is being sold, its executables have never been digitally signed. Is it time for us to start signing them? For starters, I can think of a few pros and cons: Pro: If using Verisign certificates, Windows Error Reporting can be used Pro: When Windows Vista and Windows 7 show one of those annoying UAC

Converting a byte [] to PrivateKey in java for digital signature

两盒软妹~` 提交于 2019-12-03 21:43:59
I need to digitally sign a String using the SHA-1 digest algorithm first and then apply the RSA algorithm, using a PrivateKey to sign it. I already have the PrivateKey stored in my database as data type char(250) in base64. My problem is that I don't know how to convert it into a PrivateKey for using it for signing in: Cipher cipher = Cipher.getInstance("RSA"); cipher.init(Cipher.ENCRYPT_MODE, privateKey); byte[] cipherText = cipher.doFinal(digest); Digest was an array of bytes to which I applied the SHA-1 digest algorithm: MessageDigest md = MessageDigest.getInstance("SHA-1"); byte [] ba =

Windows CryptoAPI: CryptSignHash with CALG_SHA_256 and private key from MY keystore

风格不统一 提交于 2019-12-03 21:03:08
I am trying to generate digital signatures on Windows (from XP SP3, but currently testing with Windows 7) with CryptoAPI that will be compatible with the following openssl commands: openssl dgst -sha256 -sign <parameters> (for signing) openssl dgst -sha256 -verify <parameters> (for validation) I want to use a private key from the Windows "MY" keystore for signing. I managed to sign files using the SHA1 digest algorithm by using the following CryptoAPI functions (omitting parameters for brevity): CertOpenStore CertFindCertificateInStore CryptAcquireCertificatePrivateKey CryptCreateHash (with

Managed Windows Service starts up slowly after digital signing

南笙酒味 提交于 2019-12-03 20:04:57
问题 We recently tried out digitally signing our .NET binaries. We have a Windows Service which typically starts up within 10 seconds. However after we started digitally signing it, the time increased to around 20-30 seconds. Googling led to me this: http://support.microsoft.com/kb/936707 which basically says that I have to set generatePublisherEvidence to false. But the description of generatePublisherEvidence on MSDN points to the fact that this is not applicable for .NET 4. Still I tried out

Using symmetric key (AES -128) to sign and verify a message

雨燕双飞 提交于 2019-12-03 17:47:17
问题 I want to know can symmetric keys be used to sign a message ? We can encrpyt using the shared secret key. Also when symmetric key is used for signing , what API can be used in JAVA to load the key and sign the message ? if i used Signature from java.security , it has an api initSign but that takes private key from the public/private key pair as the argument to sign the message. Here the key is symmetric key. Any pointers ? 回答1: A shared secret key can be used to calculate a Message

Verifying RSA Signature iOS

空扰寡人 提交于 2019-12-03 16:58:51
问题 In my static Library I have a licence file. Which I want to make sure has been generated by myself (and has not been altered). So the idea was to use an RSA Signature from what I've read. I've looked on the internet and this is what I came up with: First: Generating the private keys and self signed certificates with the information I found here. // Generate private key openssl genrsa -out private_key.pem 2048 -sha256 // Generate certificate request openssl req -new -key private_key.pem -out

Unable to verify digital signature using Apache PDFBOX

Deadly 提交于 2019-12-03 15:15:54
I am a newbie in using Digital Signatures. In one of the projects we are using Apache PdfBox for processing digitally signed pdf files. While we could test all features, verification of signed pdf files is something we are unable to crack. We are using BouncyCastle as the provider. Below is the code: //Get Digital Signature and Signed Content from pdf file byte[] signatureAsBytes = pdsignature.getContents(new FileInputStream(this.INPUT_FILE)); byte[] signedContentAsBytes = pdsignature.getSignedContent(new FileInputStream(this.INPUT_FILE)); //Digital Signature Verification Security.addProvider

Keystore from digital signature e-token using java

天大地大妈咪最大 提交于 2019-12-03 14:10:28
问题 How to create the keystore from digital signature e-token? How crate the path of keystore? How to sign with the keystore in any document using java application? 回答1: Cryptographic hardware devices can usually be interfaced via PKCS#11 API. You will need PKCS#11 library (.dll on Windows or .so on Unix) acting as a "device driver" which gets usually installed along with the software provided by the device vendor (consult your e-token documentation for the exact library location). You have