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
2
votes
0 answers

DSA signature - java.security.SignatureException: invalid encoding for signature

I have problem with DSA signature. My DSA code: public byte[] signing(String text, PrivateKey privatekey) throws Exception { byte[] textByte = text.getBytes(); Signature sign = Signature.getInstance("DSA"); sign.initSign(privatekey); …
user2374593
  • 125
  • 2
  • 8
2
votes
0 answers

RSA / DSA implementation in the Forth language

I need to develop a PGP implementation for a custom Forth kernel, and I was wondering if anyone could give me pointers as to where I could get an RSA/DSA implementation in (any) Forth to use for the project. I prefer source code with a flexible…
DeLorean
  • 307
  • 1
  • 11
2
votes
2 answers

DSA signature check in SAML 2.0 with PHP

I've checked SO and googled around, but haven't found answers so far. I am using SAML 2.0 as a service provider, and embedded php-saml - used simplesamlphp first, but found a bit tough to embed. The IdP-s response comes back with a…
Zsolt
  • 67
  • 8
2
votes
1 answer

Generating P in DSA algorithm java

Could you tell me if I am right? I want to generate p in DSA algorithm. I don't understaand that: || pTemp.bitLength() != l in the do while statement, because it means I am looking only for 1 digit prime which is 2,5,7? It is nonsense. private…
Yoda
  • 17,363
  • 67
  • 204
  • 344
1
vote
4 answers

DSA: How to generate the subprime?

Lately I did a bit of research about the Digital Signature Algorithm and how it works. My question according to this is of no practical matter for me but of pure interest. However, I'm curious how to generate the subprime in DSA: Somewhere during…
j0ker
  • 4,069
  • 4
  • 43
  • 65
1
vote
0 answers

Why does a php code which uses DSA signing work on some servers and does not on others?

I've got following php test code: $priv_key = '-----BEGIN DSA PRIVATE…
Arsen Zahray
  • 24,367
  • 48
  • 131
  • 224
1
vote
0 answers

Getting "Invalid secret key format" exception

I have two applications running on IBM JDK 8 and Open JDK 11 respectively, there is common module used in both the application. I have symmetric key used by both the application , symmetric key will be stored in keystore file so that i have used…
NRaj
  • 121
  • 8
1
vote
1 answer

Generate DSA Keys for OpenSSH in Golang

I read through a few examples to generate DSA keys for OpenSSH in Go. And my clean code snippet and outputs are listed below. It has two problems: for 2048-bit length, the public key can't be loaded via ssh.ParseAuthorizedKey, for error: "ssh: no…
1
vote
0 answers

Bouncycastle Loading of PKCS8 Encrypted Private Key Failing on JBoss

I'm trying to load an encrypted DSA private key with Bouncycastle. The key is a pem file in the following format: -----BEGIN ENCRYPTED PRIVATE KEY----- .... -----END ENCRYPTED PRIVATE KEY----- This is my Java code: …
Jardo
  • 1,939
  • 2
  • 25
  • 45
1
vote
2 answers

generate a SHA256withDSA signature using Go and then verify it using Java

Go sha256 orign data then DSA sign it print sign result by hex use Java SHA256withDSA to verify first step result return false i konw sha256 then DSA is difference SHA256withDSA how can i do in Go to generate a sign, that can be verified using…
TBC
  • 43
  • 5
1
vote
1 answer

Difference between Go DSA and Java DSA

Go generates a signature using a DSA private key Java verifies first step result using the DSA public key Java should return true, but returns false package main import ( "crypto/dsa" "crypto/rand" "encoding/asn1" "encoding/hex" …
TBC
  • 43
  • 5
1
vote
2 answers

Java: How to make thread loop until condition met

I want to implement the DSA (Digital Signature Algorithm) algorithm using Java. When building the p and q keys, I want the result of (p-1) mod q = 0. This is the code that I made, when I call the contents of q2 (result of p-1 mod q) it doesn't…
1
vote
0 answers

Java doesn't read DSA keys from Windows-MY

I have created two different DSA keys using java keytool (defaults to 2048 and SHA256, so the 2nd one is explicitly created with length 1024): keytool -genkey -keystore c:\test\dsa2048.p12 -storetype pkcs12 -storepass password -keypass password…
Amber
  • 2,413
  • 1
  • 15
  • 20
1
vote
0 answers

Device-Tree for eth network based on marvell mv88e6390x crashes Xilinx's linux-kernel v5.4

This is my system's network topology. It relies on Xilinx's Zynq-7000 SoC. zynq-7000 'switch0' 'switch1' (cpu) mv88e6390x mv88e6390x ------- --------- --------- | | | | | | | gem0|------|p0 …
1
vote
1 answer

dsaSign and doesn't work with private key

I am using the license generator of FastSpring and their documentation is very poor, especially on the JavaScript functions dsaSign(arg1, arg2) with the following explanation: dsaSign(arg1, arg2): arg1 is a 512 or 1024 byte DSA key in PEM format.…
Daniel Stephens
  • 2,371
  • 8
  • 34
  • 86