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
5
votes
1 answer

Digital Signature vs. HMAC with key via DH

I am writing an application that heavily uses cryptology. Like most networked applications, mine breaks up data into different types of messages (instant message, file chunk, video frame, etc.) -- and each one must be checked for authenticity both…
Hut8
  • 6,080
  • 4
  • 42
  • 59
5
votes
1 answer

How to combine two Sources into new one in Crypto++?

Situation I have two arbitrary sources, lets say a StringSource from a signature and a FileSource from the corresponding signed file. I now want to verify the files signature which is currently performed like this: bool VerifyFile(const ECDSA
xmoex
  • 2,602
  • 22
  • 36
5
votes
4 answers

Modular Exponentiation in Java

I need a way to calculate: (g^u * y^v) mod p in Java. I've found this algorithm for calculating (g^u) mod p: int modulo(int a,int b,int c) { long x=1 long y=a; while(b > 0){ if(b%2 == 1){ x=(x*y)%c; } …
Carl Hagen
  • 53
  • 1
  • 1
  • 5
5
votes
0 answers

Creating RFC-4716 specific dsa public-key using openssl

For the purpose of ssh using public key authentication, DSA-2048 keypair has been generated using openssl and both are stored locally in PEM format. Now, for configuring in the server side (authorized_keys), public key has to be in the RFC-4716…
Raja
  • 51
  • 3
5
votes
1 answer

DSA signature verification in C do not match with signature verification in console. OpenSSL

I wrote a code to sign a message that apparently works fine, it can sign a message with a DSA private key (512 bits), and verify it later with the respective public key (no problems here). I´m using Windows 7. But, If I want to verify the sign in…
4
votes
1 answer

Are OpenSSL byte sequences in little endian or big endian order?

I'm trying to use openssl dsa implementation, but I'm very confused with the following details: Option '-text' of the command openssl dsa ....: the hexadecimal numbers in the output, am I correct to assume that those are the bytes, and thus they…
dsign
  • 12,340
  • 6
  • 59
  • 82
4
votes
0 answers

ECDSA Signature Verification Performance in Java

I am trying to calculate the performance of ECDSA signature verification in Java for secp521r1 curve. I am getting around 3000 signature verification per second. Adding my other work also, I tested with openssl speed command for secp521r1 curve,…
4
votes
1 answer

How to work with OPENSSH PRIVATE KEY in Java?

I am generating a DSA key with the below command: ssh-keygen -t dsa Then I try to sign data using bouncycastle API like that: KeyFactory keyFactory = KeyFactory.getInstance("DSA"); String privateKeyContent = // the content of the generated…
Ilya Gazman
  • 31,250
  • 24
  • 137
  • 216
4
votes
2 answers

How can I generate a valid ECDSA EC key pair?

I am trying to generate ECDSA key pair using SpongyCastle in Android. This is the code: static { Security.insertProviderAt(new org.spongycastle.jce.provider.BouncyCastleProvider(), 1); } public static KeyPair generate() { …
snewtMs
  • 61
  • 1
  • 2
  • 6
4
votes
1 answer

Storage of private and public key in MySQL-DB

Probably somebody asked that already, but I couldn't find any usefull information and I've never done it before. So here is the problem. If I'll get a set of key pairs (DSA public and private keys) with different time validity and unique ID, what is…
Tima
  • 12,765
  • 23
  • 82
  • 125
4
votes
1 answer

java.security.spec.InvalidKeySpecException and Inappropriate key specification error in java program

As a part of project implementation,I have done: 1. Generete DSA keys 2. Encrypt the private key using AES 3. Save into the file 4. Open the file and read the encrypted private key 5. I tried to convert the read value into primary key…
user123
  • 71
  • 1
  • 2
  • 8
4
votes
2 answers

Using openssl to generate a DSA key pair

I want to generate a private and public key using C to use them in an authentication process. Can you please give me a basic example to generate the keys in C? I've found these functions but i don't how to use them: DSA * DSA_generate_parameters(int…
HaTiMuX
  • 621
  • 2
  • 10
  • 22
4
votes
3 answers

Generating 40 char fingerprint for DSA

Is there a existing method within .NET Framework (C#) to generate a 40 char (public?) fingerprint as shown below, when you have P, Q, G, Y and X? Or would anybody know on how to achieve this? Fingerprint: 81F68001 29D928AD BEE41B78 AA862106…
invalidusername
  • 912
  • 9
  • 26
3
votes
1 answer

C# generate a public and private keys for the DSA encryption algorithm

How do I generate a public and a private key for the DSA algorithm in byte array format?
Nicola
  • 621
  • 10
  • 22
3
votes
0 answers

Receiving "TypeError: sign() missing 1 required positional argument: 'algorithm'" with python PyJWT

So I used the command: ssh-keygen -m PKCS8 -t dsa to generate the following (example) key: -----BEGIN PRIVATE…
waltcobb
  • 31
  • 1
1
2
3
12 13