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
1
vote
1 answer

Given a DSAPrivateKey, how to compute corresponding DSAPublicKey?

In Java, I have a DSAPrivateKey, which has an X parameter, and also a DSAParams with P, Q and G parameters. I want to compute the corresponding DSAPublicKey. I know I can construct a DSAPublicKeySpec if I know Y, P, Q, and G, and then I can use the…
Simon Kissane
  • 4,373
  • 3
  • 34
  • 59
1
vote
2 answers

How should I format digital signatures?

I'm working on implementing DSA digital signature algorithm. I understand the algorithm itself, one thing I don't really understand is how should my message look after it was signed? For example, I have a text file that I'd like to sign and send to…
Egor
  • 39,695
  • 10
  • 113
  • 130
1
vote
0 answers

DSACryptoProvider fails with mandatory or temporary profiles

The following code fails when the user is logged on under a mandatory or temporary profile. private static bool VerifySignature(byte[] signature, byte[] data) { DSACryptoServiceProvider verifier = new DSACryptoServiceProvider(); …
axeman
  • 505
  • 1
  • 5
  • 18
1
vote
2 answers

Problem in implementing DSA in Java without Cryptography Library

Hello I have very strange problem and maybe some of you could help my. I am implementing DSA signature algorithm in Java but I cannot use any of existing libraries to do this except of generating SHA-1 hash function from java.security. My code is…
Łukasz
  • 51
  • 6
1
vote
1 answer

How to Convert DSA Certificate to RSA Certificate?

I'm working regarding the development of a Keystore software in java and scala. Now I have a tool to manage my public key certificates. But it only supports the RSA type certificates, not the DSA type. I want to convert DSA type certificates to RSA…
1
vote
0 answers

DSA: generate p

I want to generate p for DSA algorithm. I found a 160-bit prime q and now i need to find p where q is a divisor of p-1. I did read answer here on similar question but i am not sure how to implement that algorithm (DSA: How to generate the…
1
vote
1 answer

DSAParameters byte[] J - What is it?

I am trying to recreate a DSA public/private key to match an existing keyset. The existing public key is created with byte arrays P, Q, G, J, Y, Seed, Counter. The length of byte[] J is 112. When creating a public/private keypair using.. var dsa =…
navitiello
  • 67
  • 6
1
vote
1 answer

Problem when using code from a jar file

I run the following code: public class Sign { private static final PrivateKey priv = Util.loadPrivate(); private static final PublicKey pub = Util.loadPublic(); private static final HexBinaryAdapter adp = new…
Gilad
  • 538
  • 5
  • 16
1
vote
2 answers

Creating a DSA PublicKey in Java from a PEM string

Having created a DSA keypair using ssh-keygen -t dsa And then converting the public key part into pem format using openssl dsa -in mytestkey -pubout I then try to construct a PublicKey using the following: private static final String…
1
vote
1 answer

How to generate a DSA key pair using OpenSSL libcrypto?

I have the following code trying to generate a DSA key pair. OpenSSL_add_all_algorithms(); ctx=EVP_PKEY_CTX_new_id(EVP_PKEY_DSA,NULL); EVP_PKEY_keygen_init(ctx); if (EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx,1024)<=0) …
giuper
  • 145
  • 1
  • 4
1
vote
1 answer

Why privateKey*PublicKey get different result in Ed25519 with golang

for result, i want to calculate a value X as apiKey with formula this Pubkey1 = Privkey1 * G Pubkey2 = Privkey2 * G then we get Privkey2 * Pubkey1 = Privkey1 * Pubkey2 also equal Privkey2 * Privkey1 * G = Privkey1 * Privkey2 * G = X then service…
shudidamowang
1
vote
1 answer

Ssh dsa key authentication fails

I'm trying to log to openssh server installed in cygwin using a dsa key file generated using: ssh-keygen -t dsa I have copied my key to authorized_keys using: ssh-copy-id -i ~/.ssh/id_dsa ltonon@localhost I also configured ssh server in…
Laurent T
  • 1,070
  • 4
  • 13
  • 25
1
vote
1 answer

How to create a signature from Private Key? - DSA

I am trying to create a signature from a private key that i have been provided and a hashed value. I am using DSA and the following code but receive the following error: Invalid type specified. source mscorlib The error is thrown on this line:…
fedor333
  • 45
  • 9
1
vote
2 answers

DSA cipher suites not supported by embedded jetty 9.4 in java

I am using the latest jetty and jdk, it should be supporting DSA cipher suites like TLS_DHE_DSS.... So I generated a certificate file and key pairs with DSA algorithm, uploaded it to my server, and restarted my server, the server started…
enbo tang
  • 11
  • 1
1
vote
0 answers

Error CSP does not support DSA algorithm

I get this error while trying to set up a DSACryptoServiceProvider to be used for a DSA Signature on a HSM that accepts DSA Signature : "The specified cryptographic service provider (CSP) does not support this key algorithm." Call stack : at…
spock
  • 31
  • 5