digital-signature

Is this pdf digital signed correctly? PHP/TCPDF

泪湿孤枕 提交于 2019-12-01 06:41:59
问题 I'm updating a project for my company and there is a section where we need to digitally sign a pdf with our certificate file. In this case, I should change the script that signs this pdf using an updated library from PHP. In the old code, we were using another script to make happen that, and we had to use a .p12 file + a string. Using this old script, when you open the created pdf with Acrobat Reader DC we get the next image where you can see that says "Signed and all signatures are valid".

When to use RS256 for JWT?

时光总嘲笑我的痴心妄想 提交于 2019-12-01 06:15:22
So, right now I'm building an API for third parties uses and I was reading about RS256 and HS256. What I understood was that diff between is that in the first one you use a public key to verify and a private key to sign, and the other one, use just one key.. So if you use RS256 if because you want to keep your secret key secure and want the client to verify the token, but what I don't understand why you would like to verify the token in the client? Because you do a post request to the server, then it sends you back a token and whenever you want to make an authorized request you just use that

When to use RS256 for JWT?

若如初见. 提交于 2019-12-01 05:12:06
问题 So, right now I'm building an API for third parties uses and I was reading about RS256 and HS256. What I understood was that diff between is that in the first one you use a public key to verify and a private key to sign, and the other one, use just one key.. So if you use RS256 if because you want to keep your secret key secure and want the client to verify the token, but what I don't understand why you would like to verify the token in the client? Because you do a post request to the server,

Verify whether an executable is signed or not (signtool used to sign that exe)

南笙酒味 提交于 2019-12-01 03:51:22
In my application I need to verify whether it's signed or not. If it's signed continue the execution and exit the application if not. The signtool will be used to sign the application. Is there any C# code to do that? Here is a utility method that does it: var signed = IsSigned(@"c:\windows\explorer.exe"); ... public static bool IsSigned(string filePath) { if (filePath == null) throw new ArgumentNullException(nameof(filePath)); var file = new WINTRUST_FILE_INFO(); file.cbStruct = Marshal.SizeOf(typeof(WINTRUST_FILE_INFO)); file.pcwszFilePath = filePath; var data = new WINTRUST_DATA(); data

Why does SignHash need to know what hash algorithm was used?

人走茶凉 提交于 2019-12-01 02:29:57
问题 This may be a question for http://crypto.stackexchange.com, but I thought I'd try it here first as the answer may relate to .NET rather than the encryption algorithm itself. In the RSACryptoServiceProvider class, there's a method SignHash, which: Computes the signature for the specified hash value by encrypting it with the private key. The first argument is the hash value of the data (which seems fair), but the second is a string stating the algorithm used to create the hash value. The

Difference between signing a XML message using dsig:Signature and TLS Client Certificate

一个人想着一个人 提交于 2019-12-01 01:07:06
I realise this question may be a bit vague or I may be using incorrect terminology, that is because I am trying to get to grips with this stuff :). I have a requirement to implement digital signing of a XML message by using a dsig:Signature section. I think I understand this process; I will use a private key to sign it which will guarantee to the recipient that it was me who sent the message and that no one has tampered with it. Am I right that this is different from implementing TLS Client Certificates but the goal is the same? (because TLS is transport level, right?) Would implementing

Verify whether an executable is signed or not (signtool used to sign that exe)

早过忘川 提交于 2019-12-01 01:00:43
问题 In my application I need to verify whether it's signed or not. If it's signed continue the execution and exit the application if not. The signtool will be used to sign the application. Is there any C# code to do that? 回答1: Here is a utility method that does it: var signed = IsSigned(@"c:\windows\explorer.exe"); ... public static bool IsSigned(string filePath) { if (filePath == null) throw new ArgumentNullException(nameof(filePath)); var file = new WINTRUST_FILE_INFO(); file.cbStruct = Marshal

js signature on chrome with OS keystore

*爱你&永不变心* 提交于 2019-12-01 00:02:45
W3C is working on a http://www.w3.org/TR/WebCryptoAPI/ to define a way to generate digital signatures, encrypton and so on from javascript. Basically defines a new object crypto inside a window object in DOM which must provide javascript with signature and encrypton features. Chrome starts to implement this object which is currently available in its javascript engine (I think in beta stage), I make some tries to generate some signatures with it an seems to work correctly, however I think the most util way to generate digital signatures with this new object is using the private keys in the OS

PDF Signature digest

南笙酒味 提交于 2019-11-30 21:37:54
I have a quick question about calculating the digest of a PDF document to use for a digital signature (somewhat related to one of my earlier questions, I'm trying to figure out why you would need to know a client's certificate to create the correct digest). In Adobe's documentation about the PDF format the following is specified: A byte range digest shall be computed over a range of bytes in the file, that shall be indicated by the ByteRange entry in the signature dictionary. This range should be the entire file, including the signature dictionary but excluding the signature value itself (the

Difference between signing a XML message using dsig:Signature and TLS Client Certificate

拈花ヽ惹草 提交于 2019-11-30 21:11:15
问题 I realise this question may be a bit vague or I may be using incorrect terminology, that is because I am trying to get to grips with this stuff :). I have a requirement to implement digital signing of a XML message by using a dsig:Signature section. I think I understand this process; I will use a private key to sign it which will guarantee to the recipient that it was me who sent the message and that no one has tampered with it. Am I right that this is different from implementing TLS Client