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

Using Google Cloud Key Management Service to sign an Ethereum transaction

I've been working on writing a signer service for an Ethereum transaction manager and I need to sign Ethereum transactions using Google KMS Golang APIs. I'll try and summarise the problems I'm facing below. Ethereum requires compact RLP encoded…
4
votes
0 answers

Using ECDSA for signing api requests

Is it a good choice to use ECDSA for signing API requests, given the following conditions: Only clients must be able to create signatures Requests integrity must be verifiable, eg. we should know if a replay-attack was initiated If the keys…
pxr_64
  • 510
  • 1
  • 8
  • 23
4
votes
1 answer

What is the difference between EC and ECDSA in the OpenSSL EVP API?

I'm working on a program in which I would like to generate an ECDSA key with OpenSSL's libcrypto EVP API. I found this piece of documentation that deals with this topic. When specifying the key type, there is no EVP_PKEY_ECDSA, only EVP_PKEY_EC. The…
Venemo
  • 18,515
  • 13
  • 84
  • 125
4
votes
1 answer

What's the proper way to get a fixed-length bytes representation of an ECDSA Signature?

I'm using python and cryptography.io to sign and verify messages. I can get a DER-encoded bytes representation of a signature with: cryptography_priv_key.sign(message, hash_function) ...per this document:…
jMyles
  • 11,772
  • 6
  • 42
  • 56
4
votes
1 answer

Java Signature.sign() with SHAwithECDSA produces different results on multiple runs

I am trying to sign a byte stream which does not change with a private key that does not change either, using the SHAwithECDSA. This should produce the same result, no matter how often you run the code. However, I experience some randomness which I…
Marc
  • 105
  • 2
  • 11
4
votes
2 answers

Constructing ECPublicKey from ANSI X9.62 encoded bytes

I need to validate the signature generated remotely, by ECDSA secp256k1 curve. I get 64 bytes, representing the raw bytes of r and s. And the ANSI X9.62 encoded public key ([0x04, X (32 bytes), Y (32 bytes)]). How can I verify the signature using…
user_4685247
  • 2,878
  • 2
  • 17
  • 43
4
votes
2 answers

Cannot sign with ecdsa module in node js

I am trying to use the ecdsa module to sign some data with a crypto ecdh private key. My code is below: shaMsg = crypto.createHash('sha256').update(myData).digest(); signed = ecdsa.sign(shaMsg, myECDHKey); I am facing the following problem: ERROR:…
Dalton Cézane
  • 3,672
  • 2
  • 35
  • 60
4
votes
2 answers

How to Fingerprint a JWK?

Is there a standard, canonical method for creating a fingerprint (aka thumbprint) for a JWK? From what I was reading it seems that the standard doesn't define how a kid should be specified, which I find odd. To me it makes the most since to have it…
coolaj86
  • 74,004
  • 20
  • 105
  • 125
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
0 answers

Import an ECDSA public key from CngKey to BouncyCastle

I am trying to generate an x509 certificate from a pair of keys generated with CngKey. I create the keys with: var parameters = new CngKeyCreationParameters { Provider =…
santiPipes
  • 61
  • 8
4
votes
1 answer

DER Decode ECDSA Signature in Java

I have generated an ECDSA signature in Java and I would like to get the R and S values from it. It is my understanding that the signature I have generated is DER encoded. Can someone please provide me with some Java code (maybe using Bouncy Castle)…
Hmmmmm
  • 778
  • 9
  • 20
4
votes
2 answers

generate certificate using ECDSA in c#

I'm trying to generate (self-signed) certificate with private key using ECDSA. The goals is to get "the same" (pkcs12) certificate as when using openssl: openssl ecparam -genkey -name secp256r1 -out mykey.key openssl req -new -key mykey.key -out…
grim.ub
  • 192
  • 2
  • 11
4
votes
1 answer

Unattended generation of an ECDSA key using gpg2

Short question How do I specify an elliptic curve in a gpg2 v2.1.11 parameter file? Long question I have successfully used the following bash script to generate an RSA key using gpg2 v2.1.11: #!/bin/bash PUBRING_FILE=$(mktemp…
user2768
  • 794
  • 8
  • 31
4
votes
1 answer

Converting byte array to publickey ECDSA

I need to use ECDSA algorithm to sign a message and send to receiver in java. Then, receiver should verify sender's signature. So, for this, receiver has sender's public key but in byte array format after converting java.security.PublicKey to byte…
Questioner
  • 662
  • 1
  • 10
  • 26
4
votes
1 answer

How to sign the Certificates with Elliptic curve private keys and ECDSA algorithm?

I am able to sign the certificates using bouncy castle with RSA private Keys and "SHA256withRSA " algorithm. I have used below link for reference to achieve this. Sign CSR using Bouncy Castle Now I have my CAs with Elliptic Curve keys signed with…
Dnyanesh
  • 101
  • 1
  • 8