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
140
votes
6 answers

How do you use an identity file with rsync?

How do you use an identity file with rsync? This is the syntax I think I should be using with rsync to use an identity file to connect: rsync -avz -e 'ssh -p1234 -i ~/.ssh/1234-identity' \ "/local/dir/" remoteUser@22.33.44.55:"/remote/dir/" But…
cwd
  • 53,018
  • 53
  • 161
  • 198
116
votes
5 answers

What is the difference between DSA and RSA?

It appears they are both encryption algorithms that require public and private keys. Why would I pick one versus the other to provide encryption in my client server application?
WilliamKF
  • 41,123
  • 68
  • 193
  • 295
107
votes
5 answers

What's the difference between id_rsa.pub and id_dsa.pub?

Is one more secure than the other?
Andrew
  • 1,071
  • 2
  • 8
  • 3
29
votes
1 answer

Importing a DSA key from xml string fails for one user. Permissions? Broken installation? Bad KSP?

A user recently reported a weird error when using my software. I use DSA signatures to verify licenses. When the software imports the public key to verify a signature, the DSA provider's FromXmlString method throws a CryptographicException with the…
KristoferA
  • 12,287
  • 1
  • 40
  • 62
20
votes
2 answers

Is there a standardized fixed-length encoding for EC public keys?

I was wondering if there was (and I hope there is) a standard for public key size for ECDH (Elliptic Curve Diffie-Hellman) and ECDSA (Elliptic Curve Digital Signature Algorithm) for every curve type over prime fields (192, 224, 256, 384 and 521).
19
votes
8 answers

DSA: What can a hacker do with *just* a public key?

The shareware registration system I'm currently developing embeds the public DSA key in the executable itself, and the private key resides on a server. (For the sake of discussion let's assume that the server is 100% secure, and there is no way for…
kurige
  • 3,749
  • 2
  • 21
  • 24
12
votes
1 answer

C# A random BigInt generator

I'm about to implement the DSA algorithm, but there is a problem: choose "p", a prime number with L bits, where 512 <= L <= 1024 and L is a multiple of 64 How can I implement a random generator of that number? Int64 has "only" 63 bits length.
Tony
  • 12,405
  • 36
  • 126
  • 226
12
votes
1 answer

ssh2_auth_pubkey_file authentication always fails

I'm trying to connect to another machine using PHP's ssh2 functions. I know the ssh keys have been created with no passwords and are distributed correctly, I can ssh user@host in the terminal on my machine to the server. The PHP function tries to…
James Kirkby
  • 1,716
  • 5
  • 24
  • 46
9
votes
3 answers

Different results when signing same data with same keys in DSA cryptoservice provider

I am trying to build a small program that can discover whether file/files has been accessed or modified using DSA Signing algorithm. I will give you this small example code to describe the issue. Suppose that we have a file c:\Temporary\Temp.txt. We…
AhdDbn
  • 121
  • 1
  • 2
  • 7
8
votes
6 answers

Tiny asymmetric cipher implementation to validate download

To allow a small C++ application to update itself at clients connected over the internet, I am in need of a mechanism that validates the download based on a public key. Algorithms such as DSA or RSA seem to be able to do this nicely. However,…
Emiel Mols
  • 436
  • 4
  • 12
7
votes
2 answers

DSA Signing with OpenSSL

I'm tryng to sign using DSA from OpenSSL. I have the files containing public and private keys. First of all I make an unicast connection and every thing is fine. After that I need a multicast UDP connection and I want to sign the packets. I'm trying…
calamares
  • 71
  • 3
7
votes
3 answers

How to generate an 2048-bit DSA key pair for Java?

I tried the following methods to generate a DSA private (and public) key with a 2048-bit key length: Via keytool keytool -genkeypair -alias MyKeyPair -keyalg DSA -keysize 2048 -validity 365 -keystore MyKeyStore.ks Resulting in: keytool error:…
Clouren
  • 372
  • 1
  • 3
  • 10
6
votes
4 answers

how to generate public and private key in PEM format

I need to generating a RSA and DSA key pair (public and private key) in PEM format using java. I want the public and private key files to be opened with this format: -----BEGIN PUBLIC KEY-----…
user3077162
  • 181
  • 2
  • 4
  • 12
6
votes
1 answer

Length of data to hash for PGP

I have finally managed to verify some simple PGP signed message blocks. However, I discovered that for some reason, my implementation limits me to verifying data that is 9-16 bytes long. no less. no more. is there some instruction somewhere…
calccrypto
  • 8,583
  • 21
  • 68
  • 99
5
votes
4 answers

SHA hash function gives a negative output

I'm trying to implement DSA signature algorithm and I'm stuck on a problem. I'm using the java.security MessageDigest class, here's the code: MessageDigest md; md = MessageDigest.getInstance("SHA-1"); md.update(text.getBytes()); return new…
Egor
  • 39,695
  • 10
  • 113
  • 130
1
2 3
12 13