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

Produce different signing messages with ECDSA

I have following code to sign messages with ecdsa library. I am getting different result on each run. import ecdsa from hashlib import sha256 random_number_for_private_key =…
Mahsum Akbas
  • 1,523
  • 3
  • 21
  • 38
0
votes
0 answers

Set curl or openssl to use ECDSA vs RSA cert during website request

I use nginx on my site, and used to attach both RSA and ECDSA certs to it as nginx support such hybrid setup. The problem is, I found no way to validate from command line how soon the cert will expire. I need that to monitor if RSA or ECDSA cert…
Alexander
  • 464
  • 1
  • 5
  • 17
0
votes
0 answers

c# Cryptography ECDsa VerifyData of signature returns false, when using Stream

I am using ECDsa for signing. When I use VerifyData with byte[] it works, but when I use it as Stream VerifyData returns false. Why? VerifyData byte[]: True VerifyData Stream: False using System.Security.Cryptography; using System.Text; string data…
andka
  • 1
  • 1
0
votes
1 answer

ECDSA signature verification mismatch

I see a strange behaviour on ECDSA signature verification from the nodejs's secp256k1 package that sometimes fails the signature check. I use the following public key: 33 2E 16 0F 4C 24 1F 50 0B 5A 67 13 EB E1 52 52 D1 E2 BA A0 0A B9 7B 54 6E 5C CD…
Fabio Angeletti
  • 311
  • 3
  • 12
0
votes
0 answers

Error while decoding a ecdsa (secp256k1) private key

I created a private key (pem) file using following command openssl ecparam -name secp256k1 -genkey -noout -out ec-secp256k1-priv-key.pem here is the file content. -----BEGIN EC PRIVATE…
KbiR
  • 4,047
  • 6
  • 37
  • 103
0
votes
1 answer

How to distinguish ASN.1 from P1363 encoding in OpenSSL ECDSA signature

The way ECDSA signatures encode the r and s values is not well-defined: While e.g. OpenSSL exclusively uses a DER encoded ASN.1 SEQUENCE, Windows uses IEEE P1363 encoding (see this excellent SO answer for details). In order to enable ECDSA signature…
kzi
  • 61
  • 9
0
votes
0 answers

Is Exposing a ECDSA Signature bad practice?

I'm developing an app that uses ECDSA for identity management, a steep learning curve wrt best practices. Is it wrong or just bad form to leave a signed message visible or discoverable? The data being signed is hashed (or at least, it will be…
Greg Rowles
  • 191
  • 2
  • 11
0
votes
0 answers

C++: convert list of digest + algorithm to OpenSSL NIDs

I have this list of digest + algorithms: "ECDSA+SHA384:ECDSA+SHA512:RSA+SHA384:RSA+SHA512". Is there any proper way to convert this string into a list of OpenSSL NIDs? As a result I would like to have: std::list supportedSignatureAlgorithms…
René Heuven
  • 197
  • 16
0
votes
1 answer

Given a Java ECPublicKey ECDSA PublicKey, how can I build an SSH2 public key?

I have created a ECDSA key and now need to convert this to SSH2 key. final KeyPairGenerator keyGen = KeyPairGenerator.getInstance("ECDSA"); ECGenParameterSpec params = new ECGenParameterSpec("secp384r1"); keyGen.initialize(params); …
Vicky
  • 1
  • 2
0
votes
1 answer

How to specify private key for ECDSA Signing Key for Xml

I was implementing code for signing a xml document using specific private key in .net 6 using algorithm ECDSA with curve secp256k1 my .net6 code : ECDsaCng key = new ECDsaCng(); …
Moaaz Mahmoud
  • 17
  • 1
  • 9
0
votes
1 answer

Errors using python's ECDSA lib to sign AWS messages

I'm signing my messages using my code below: def sign_msg_hash(self, msg_hash: HexBytes): signature = self._kms_client.sign( KeyId=self._key_id, Message=msg_hash, MessageType="DIGEST", …
whitebat 199
  • 172
  • 2
  • 9
0
votes
1 answer

How to decode JWT of STIR/SHAKEN into JSON object?

I am trying to decode a STIR/SHAKEN HS256 JSON Web Token. I tried with the Jose .NET library: string token =…
Moatassem
  • 19
  • 3
0
votes
1 answer

Nodejs crypto: Elliptic Curve to sign message and export public key as text

I want to achieve the following with the Nodejs crypto module: I want to sign a message with my private key on a defined EC and have the signature as raw buffer/hex. I want to have the respective public key as raw buffer/hex. I can achieve both…
hagen
  • 3
  • 4
0
votes
1 answer

Unable to import OpenSSL generated private key into web API crypto.subtle.importKey

I'm creating a private EC key using the command openssl ecparam -name secp256r1 -genkey -noout -out k1.pem. I'm trying to import it using crypto.subtle.importKey as described in this documentation. I.e. after running OpenSSL I have the private…
Jp_
  • 5,973
  • 4
  • 25
  • 36
0
votes
0 answers

C++ - OpenSSL secp256k1 ECDSA - Can't verify using exact copy of hash, whether using string literals or different objects

I am trying to sign a hash, create a copy of that hash (specifically client/server related), then verify the signature using the copy of the hash. I don't understand how or why when I have two variables, hash and hashCopy, with the exact same…