digital-signature

WinVerifyTrust to check for a specific signature?

我的未来我决定 提交于 2019-11-26 17:46:29
问题 I'm implementing a process elevation helper for Windows. It's a program that will run in elevated mode and launch other programs with administrator privileges without displaying additional UAC prompts. For security reasons, I want to make sure only binaries that are digitally signed with my company's Authenticode key can be executed. The WinVerifyTrust function gets me halfway there, but it only ensures that a binary is signed by some key that is part of Microsoft's chain of trust. Is there a

How would an efficient OAuth2.0 server / provider work?

China☆狼群 提交于 2019-11-26 16:30:09
问题 I may need to implement an OAuth2.0 server for an API I'm creating. This API would allow 3rd parties to perform actions on the user's behalf. OAuth2.0 has 3 mains calls. First, there is a call to prompt the user for consent. This returns a code . The second is where the code is exchanged for a access token . Finally, the access token is used to call the API on the user's behalf. For implementation, I was thinking the first call generates a random string which acts as a code . The code is then

Insert digital signature into existing pdf file

徘徊边缘 提交于 2019-11-26 15:56:32
问题 I need to insert a digital signature into already existing pdf files, using a rails application server. (Basically, clients upload pdf files and the server signs them with a local certificate) I've been using JSignpdf to insert digital signatures into pdf files, and started probing for gems for ruby... I've found another portable file to do this job on rubypdf site http://soft.rubypdf.com/software/pdf-digital-signe, but cannot find any gem or even example code to do this in ruby. I've looked

RSA signature size?

时光毁灭记忆、已成空白 提交于 2019-11-26 15:49:54
问题 I would like to know what is the length of RSA signature ? Is it always the same size as the RSA key size like if the key size is 1024 then RSA signature is 128 bytes , if the key size is 512 bits then RSA signature is 64 bytes ? what is RSA modulus ? Also what does RSA-sha1 mean ? Any pointers greatly appreciated. 回答1: You are right, the RSA signature size is dependent on the key size, the RSA signature size is equal to the length of the modulus in bytes. This means that for a "n bit key",

Securing an API: SSL & HTTP Basic Authentication vs Signature

若如初见. 提交于 2019-11-26 15:09:24
问题 When designing an API for our web app, we'll use the their subdomain as the 'username' and generate an API key/shared secret. Firstly, is it ok to use the subdomain as the username? I don't see the benefit of generating another key. Different APIs seem to do one of two things: Use HTTP Basic Authentication with SSL In every request the username is set to the subdomain and the password to the API key. Since we're using SSL then this should be safe from spoofing. Notable APIs: Google Checkout,

Loading raw 64-byte long ECDSA public key in Java

与世无争的帅哥 提交于 2019-11-26 14:23:23
问题 I have a raw (r,s) format ECDSA NIST P-256 public key. It seems that there is no simple way to load it into an object that implements java.security.interfaces.ECPublicKey. What is the cleanest way to load a 64 byte public key so that it can be used to check signatures? 回答1: Java 7 is required for the EC functionality and Java 8 for the Base 64 encoder / decoder, no additional libraries - just plain Java. Note that this will actually display the public key as a named curve when printed out,

Signing PDFs on a server document using a signature from the user

无人久伴 提交于 2019-11-26 13:46:59
Here is what I want to do: user creates document (html) edit -> save PDF on server ask if user wants to sign the document (yes) here is the problem (no) no problem ???? (not important) So now the problem I face is how to do that (yes) in step 3. If the signature is on the server no problem, I have some html->php->pdf classes that can sign with digital signatures but the signature must be on the server as a file. The question is, how can I do it directly on the server. The user chooses yes, the signature is read (from his reader on his computer) and send to the server and signing is done. Here

How to load a PKCS#12 Digital Certificate with Javascript WebCrypto API

你离开我真会死。 提交于 2019-11-26 12:43:51
问题 I\'m trying to sign data using the WebCrypto API, but instead of creating a private/public key and exporting it to pkcs#1 or 8, I would really like to use a user\'s PKCS#12 to sign data. I\'ve read the W3C spec, but cannot make much of it and can\'t find any good material on how to do this. Right now I want to leave ActiveX and Java Applets aside. Is there a way to tweak the following: var buffer = encode(prompt(\"Please enter your password\")); //TODO: //implement a prompt for a pfx or cert

User Authentication from Browser using Digital Signature Certificate on USB Token or Smart Card

删除回忆录丶 提交于 2019-11-26 07:47:43
问题 I would like to know JavaScript code for user authentication from browser with digital signature on client’s USB Token or Smart Card. But I don’t understand how to digitally sign login request, say authtoken, or UserID and Passwrd from browser using USB Token. I need a popup on browser to select certificate form USB Token. My user have USB tokens of various makes and respective driver installed on their PC. I need a solution where user don\'t have to select tokken driver. 回答1: Methods like

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

谁说我不能喝 提交于 2019-11-26 06:59:50
问题 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(\