digital-signature

How do i add additional information to Certificate Service Request (CSR)?

旧时模样 提交于 2020-01-02 08:32:09
问题 I'm using OpenSSL to generate a Certificate Service Request (CSR). The standard fields are: Common Name: John Doe Organization: MyCompany Inc. Organization Unit: Sales Locality: SF State: CA Country: US Email: john.doe@mycompany.com However I want to add my own fields to the certificate such as: GroupId: 348348923 EmployeeLevel: Class 3 What is the proper way to do this before I request the Certificate Authority (CA) sign the CSR? 回答1: All the fields you're describing are subject items in an

Verify BouncyCastle ECDsa signature with .NET libraries ECDsaCng

为君一笑 提交于 2020-01-01 19:00:49
问题 An existing system generated signatures using Bouncy Castle (.NET) and I need to verify these existing signatures using the Microsoft ECDsaCng class. Consider the following code that attempts to do this: public static void InterchangeTest() { //AsymmetricCipherKeyPair bKeyPair_0 = Crypto.GenerateEcdsaKey(); String sPassPhrase = "bob is your uncle"; byte[] bPassPhrase = new UTF8Encoding(false).GetBytes(sPassPhrase); int SaltBitSize = 128; int EcdsaBitLength = 521; byte[] bSalt = new byte

Verify BouncyCastle ECDsa signature with .NET libraries ECDsaCng

≯℡__Kan透↙ 提交于 2020-01-01 19:00:11
问题 An existing system generated signatures using Bouncy Castle (.NET) and I need to verify these existing signatures using the Microsoft ECDsaCng class. Consider the following code that attempts to do this: public static void InterchangeTest() { //AsymmetricCipherKeyPair bKeyPair_0 = Crypto.GenerateEcdsaKey(); String sPassPhrase = "bob is your uncle"; byte[] bPassPhrase = new UTF8Encoding(false).GetBytes(sPassPhrase); int SaltBitSize = 128; int EcdsaBitLength = 521; byte[] bSalt = new byte

Digitally Sign a SAML2 Request in NodeJS

好久不见. 提交于 2020-01-01 12:16:12
问题 I have the following SAML request that I want to digitally sign: <samlp:AuthnRequest Version="2.0" ID="_9FE393FB-1C9C-4EDD-86A5-1AE9F2192A60" IssueInstant="2014-10-22T11:22:56.676Z" Destination="https://idp.ssocircle.com:443/sso/SSOPOST/metaAlias/ssocircle" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"> <saml:Issuer>http://app.localhost</saml:Issuer> <samlp:NameIDPolicy AllowCreate="true" /> </samlp:AuthnRequest> I use the following

Checking digital signature programmatically

有些话、适合烂在心里 提交于 2020-01-01 09:45:51
问题 I have the exe for the project im working on signed by a digital signature which means when it asks for admin rights it shows the company name. This works very well but if you modify the exe it will still work and show unknown there instead. Is there a way to check the digital signature to see if it is valid when you run the exe to avoid modified versions running? Visual studio 2008 windows 7 回答1: Here is a sample program(it uses WinVerifyTrust function) that verifies signature, but I'm not

xml signature DS prefix?

寵の児 提交于 2020-01-01 09:43:29
问题 Is there a way to sign an XML file with RSA and to have the namespace prefix "ds:Signature" instead of "Signature"? I spent many hourstrying to solve this and from what I can see there is no solution. It seems that it is hard-coded in the class System.Security.Cryptography.Xml.Signature. XmlElement element = document.CreateElement("Signature", "http://www.w3.org/2000/09/xmldsig#"); If anyone knows a solution, I need to sign it like that cause the software importing it verifies it with "ds

Generate PDF with digital signature by nodejs

血红的双手。 提交于 2020-01-01 09:37:07
问题 Recently, i tried to generate pdf by nodejs. And i finally found the PDFKit. That library is doing well,but i need to implement the part of digital signature. But most of implementation are for JAVA or C# like iText or VersyPDF. Plz give me some suggestion...thx 回答1: I am currently working on the node-signpdf npm package (at the moment of writing this answer the version is 0.0.3). A readable snippet of PDF generation and signing can be seen in the test code. I know this answer comes years

java.security.NoSuchAlgorithmException: RSA Signature not available

橙三吉。 提交于 2020-01-01 03:31:14
问题 this is exception Exception in thread "main" java.security.NoSuchAlgorithmException: RSA Signature not available at java.security.Signature.getInstance(Signature.java:229) at MailClient.main(MailClient.java:52) this is my code import java.io.*; import java.net.*; import java.nio.ByteBuffer; import java.util.*; import java.security.*; public class MailClient { public String getMessage(Mail m){ return m.message; } public static void main(String[] args) throws Exception { // Initialisation

Java and .NET interop on (RSA) signatures

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-01 03:28:10
问题 I'm signing some data on a .net-based smartcard and trying to verify that signature in a java environment - but without success. Smartcard (c#): RSACryptoServiceProvider rsaProvider = new RSACryptoServiceProvider(1024); // In a different method, rsaParams.Exponent and rsaParams.Modulus are set rsaProvider.ImportParameters(rsaParams); // Here I'm importing the key SHA1 sha1 = SHA1.Create(); byte[] signature = rsaProvider.SignData(data, sha1); Client (Java): Signature sig = Signature

Verify a signature in JWT.IO

半腔热情 提交于 2019-12-31 08:44:41
问题 I have generated the following token and am trying to verify the signature with http://jwt.io I have also attached the contents of my jwks endpoint that should have all the details I need to verify. So my question is: how do I get this to say signature valid on the jwt.io website? Am I missing some transformation on the certificate chain parameter? Here is the spec for jwks for reference.