Questions tagged [dsa]

DSA (Digital Signature Algorithm) is a public-key signature algorithm defined by NIST. Do NOT use this tag for general "Data Structures and Algorithms" questions.

DSA (short for Digital Signature Algorithm) is a specific public-key cryptography algorithm to sign messages. It is specified by FIPS 186-3 published by NIST.

DSA is normally used to sign a digest, or in recent versions a digest.

Do NOT use this tag for general "Data Structures and Algorithms" questions!

195 questions
3
votes
1 answer

Is there a way to generate a DSA certificate using pure .NET Framework and if not, why?

Starting from .NET 4.7.2 it is possible to generate RSA and EC certificates using .NET CertificateRequest. However I can't find anything that would allow me to generate DSA certs. Here is how I'd do it for RSA and EC: private static X509Certificate2…
username
  • 3,378
  • 5
  • 44
  • 75
3
votes
1 answer

ECDSA signing in c# verify in c

I'm trying to sign data in C#, using ECDSA algorithm (this part looks OK) and to verify signature in C using Windows crypto API. Signature part: CngKeyCreationParameters keyCreationParameters = new…
Regis Portalez
  • 4,675
  • 1
  • 29
  • 41
3
votes
1 answer

DSA verification calculation

Am I missing something? from FIPS180-2, on page 25, it gives the values of u1, u2, g^u1 mod p, y^u2 mod p and v. i have calculated all the values except v. yet, when i do the math, my calculations refuse to be v =…
heget
  • 33
  • 2
3
votes
2 answers

Get SHA1 sign of string with DSA private key from PEM file

I have a PEM file which includes my DSA private Key and i need to sign a string with this private key to send it to my partner API. (code attached) For some reason i'm always getting Signature Invalid form my partner API. which means the sign is not…
Eliran Eliassy
  • 1,590
  • 12
  • 25
3
votes
1 answer

How to verify a DSA signature given (R,S) pair in Java?

I am developing a Java (JDK 1.8) application using standard (built in) DSA classes in order to verify digital signatures. I have data files and the expected signatures stored in text files as shown below: // Signature part R: 4226 3F05 F103 E3BE…
3
votes
0 answers

DSA algorithm in java : check and advice

If one of you is familiar with the DSA algorithm, could you check if I understood correctly the algorithm ? Or at least answer the 2 questions that follow ? I based my work on the Wikipedia DSA article. I tried to make the code as clear as I could…
Sharcoux
  • 5,546
  • 7
  • 45
  • 78
3
votes
1 answer

How can I convert DSA public key from OpenSSL to OpenSSH format in PHP?

I have been using RSA keys with in my application. I have used the following code to convert RSA key from OpenSSL to OpenSSH format. It worked perfectly for RSA key. Now I want to support DSA keys. But my conversion code doesn't work for DSA keys.…
Harikrishnan
  • 9,688
  • 11
  • 84
  • 127
3
votes
2 answers

Difference between .NET 3.5 Cryptography implementation and Mono 2.x implementation?

I have identical code being compiled and run under Mono (Unity 4.5) and MS .NET: DSAParameters privateKey; ... DSACryptoServiceProvider dsa = new DSACryptoServiceProvider(csp); dsa.PersistKeyInCsp = false; dsa.ImportParameters(privateKey); The…
SonarJetLens
  • 386
  • 1
  • 9
3
votes
1 answer

Sign a message with DSA with library pyOpenSSL

This is my first question here, because I have not found a solution for this. Hopefully someone has an answer for this issue. I try to sign and verify a message with DSA (Digital Signature Algorithm) and pyOpenSSL wrapper. I've created an example…
3
votes
1 answer

Encrypt a DSA private key with RSA public key

I want to encrypt the DSA secret key with the RSA public key using java. However, when I do so, I get this error: javax.crypto.IllegalBlockSizeException: Data must not be longer than 245 bytes at…
m alizadeh
  • 31
  • 2
3
votes
1 answer

Generate dsa/elgamal key pair with bouncy castle that imports in GPG without error

I have created a small program to generate a DSA / El Gamal PGP Key Ring using Bouncy Castle 1.47 API. The key generation goes real well without an error. I export the private and public key to a file using armored output and when I try to import…
george_h
  • 1,562
  • 2
  • 19
  • 37
2
votes
2 answers

DSA vs RSA and AES128 vs AES256 encryption in Java

DSA & RSA It's not about which one is stronger. I've been researching the subject on the internet and below is the summary of information I've got. Can you please advise if it is correct or not, and if there are any additional important issues which…
Stanislav
  • 87
  • 1
  • 9
2
votes
1 answer

Openssl DSA sign

I am trying to sign some data using a DSA certificate. I am saving the certificate in memory (it was generated with the openssl gendsa command). My function looks like this, and my problem is with res = EVP_SignFinal. Here the function returns 0,…
user365268
2
votes
1 answer

Can someone tell me what's wrong with my openssl_sign example

Here's php demo code to sign data with private 2048 bit dsa key: $priv_key = '-----BEGIN DSA PRIVATE…
Arsen Zahray
  • 24,367
  • 48
  • 131
  • 224
2
votes
1 answer

Create DSA Signature using PEM file

TL;DR... how can I create a DSA signature using a PEM private key file using .Net Framework 4.5.2 I apologise up front... this is all completely new to me, as I've never had to deal with encryption like this. So please be gentle! Details... I'm…
freefaller
  • 19,368
  • 7
  • 57
  • 87
1 2
3
12 13