Questions tagged [ecdsa]

In cryptography, the Elliptic Curve Digital Signature Algorithm offers a variant of the Digital Signature Algorithm which uses elliptic curve cryptography.

Elliptic Curve Digital Signature is a variant of algorithms. It allows in some cases a smaller public key (for instance, 160 bit in ecdsa compared to 1024 bit in dsa for 80 but security level), and requires the two sides to agree on a curve's field and equation, as well as a prime order on the curve and a multiplicative of the order.

Wikipedia description of Elliptic Curve Digital Signature

700 questions
3
votes
2 answers

Validate JWT signature with ECDSA public key - Error decoding signature bytes

i need some help to validate a jwt signature with a ECDSA public key. I'm reading the key from a .pem file with bouncy castle and using jjwt to do the validation. I'm getting an error while validating the signature. Security.addProvider(new…
Spermato
  • 63
  • 5
3
votes
1 answer

How to generate 33-byte compressed NIST P-256 public key?

I need to generate such public key and do the additional signing of the bytes (which will include this generated previously key) I need to construct bytes of: ASN.1 prefix + signature of (33-byte compressed NIST P-256 public key) The signature…
K.Os
  • 5,123
  • 8
  • 40
  • 95
3
votes
1 answer

How is ECDSA used for key exchange?

When you go to google.com, the certificate under "Subject Public Key Algorithm" shows: Elliptic Curve Public Key ANSI X9.62 elliptic curve prime256v1 (aka secp256r1, NIST P-256) Key size: 256 bits which apparently is ECDSA. I thought ECDSA is…
3
votes
1 answer

Java's BouncyCastle doesn't always verify OpenSSL ECDSA signature

I sign text using OpenSSL (in C++) however my Java program doesn't always validate signed messages (only ~1 out of 5 gets verified). Interestingly https://kjur.github.io/jsrsasign/sample/sample-ecdsa.html doesn't verify any of them: Curve name:…
serg.nechaev
  • 1,323
  • 19
  • 26
3
votes
2 answers

ECDSA secp256k1 keypair generation and signing on Swift

I'm making Hyperledger Sawtooth client prototype for iOS on Swift. Before that, I was doing the same for Android on Java. In Java implementation it makes easy with SpongyCastle library: Function to generate keys looks like this: public static…
null null
  • 101
  • 1
  • 7
3
votes
2 answers

Is python-ecdsa signature size correct?

On the bitcoin wiki I found that bitcoin uses the ECDSA algorithm with the Secp256k1 curve. Relevant Links: https://en.bitcoin.it/wiki/Elliptic_Curve_Digital_Signature_Algorithm https://en.bitcoin.it/wiki/Secp256k1 On the first link, it says…
zrbecker
  • 1,394
  • 1
  • 19
  • 39
3
votes
1 answer

Extracting (r,s) and Verifying ECDSA signature remotely

I am trying to sign content using a java client and then verifying the same on a server (nodejs). My client signature function uses ECDSA and returns a byte[]. I have access to the x and y coordinate values comprising the publicKey on the…
Sudheesh Singanamalla
  • 2,283
  • 3
  • 19
  • 36
3
votes
1 answer

ECDSA signature Java vs Go

I am trying to learn some Go and blockchains.. Starting with ECDSA signatures. Trying to figure out how to test if I had a correctly working Go implementation of ECDSA signatures, I figured I would try to create a similar version in Java and compare…
kg_sYy
  • 1,127
  • 9
  • 26
3
votes
1 answer

ssh-add error with ECDSA and ED25519 identities

Linux environment: Debian 9.1, with Gnome desktop I have both ECDSA and ED25519 identities, but from command line, ssh-add command gives error: Could not add identity How to solve?
mrtexaz
  • 663
  • 7
  • 22
3
votes
2 answers

Signing PDF from Pkcs11Interop for CKM_ECDSA_SHA256 using SoftHSM 2.2.0 (ECDSA with SHA256) C# .net

I am trying to sign Pdf documents using Pkcs11Interop .net library. I need to use ECDSA encryption algorithm with SHA256 hash algorithm. And I am using SoftHSM 2.2.0 for storing private keys. I found an CKM enum, CKM_ECDSA_SHA256, which I am passing…
Kumar
  • 63
  • 1
  • 10
3
votes
1 answer

Generating a ECDSA Private key in bouncy castle returns a PUBLIC key

I am attempting to use bouncy castle to generate ECDSA keys. The code seems to work fine from the Java perspective; but, when I dump the file and try to validate the data, OpenSSL does not like the format of the data. After some research, I figured…
Rodolfo
  • 573
  • 2
  • 8
  • 18
3
votes
1 answer

Reading and writing OpenSSL ECDSA keys to PEM file

I want to generate an ecdsa key pair and save it to PEM file. Here's the code that I generate the key. #include // for EC_GROUP_new_by_curve_name, EC_GROUP_free, EC_KEY_new, EC_KEY_set_group, EC_KEY_generate_key,…
Luke
  • 281
  • 2
  • 7
  • 19
3
votes
2 answers

Choosing curve when generating ECDSA keypair with Java keytool

I am trying to understand how can I choose the ECDSA curve when generating a keypair using Java(7) keytool. It would also help to find out what curve was used with the default settings. Here is the command I use: keytool -genkeypair -keyalg EC…
Roni
  • 45
  • 1
  • 6
3
votes
3 answers

ECDSA algorithm on JCOP 2.4.2 Java Card

I want to implement ECDSA algorithm on Java Card (JCOP 2.4.2). This is my source code: package hashPack; import javacard.framework.*; import javacard.security.*; import javacardx.crypto.*; public class MyECDSA extends Applet{ private byte[]…
3
votes
0 answers

Android verify CA signature in X.509 Certificate

I have a Root CA certificate and a User certificate that has been signed by the CA. Under Windows using Certutil or OpenSSL I can verify that the CA's signature on the User certificate signature is OK. Now I am trying to verify the same signature…
SamStef1
  • 31
  • 5