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

Calculating ECDSA signature in Java as per an RFC test vector

I am writing a test harness in java for a program relating to the ikev2 protocol. As part of this i need to be able to calculate an ECDSA signature (specifically using the NIST P-256 curve). RFC 4754 Describes the the use of ECDSA in IKEv2 and…
PinkyNoBrain
  • 705
  • 1
  • 7
  • 16
5
votes
1 answer

How to generate Let's encrypt certificate with key type RSA/ECDSA using certbot?

Let's Encrypt Certbot default key type is changed to ECDSA with the latest version 2.0.0. How to specify the key type to generate RSA or ECDSA?
Thirumal
  • 8,280
  • 11
  • 53
  • 103
5
votes
0 answers

How to generate ECDSA keys with brainpool curve in PKCS11 based SafeNet HSM?

I am trying to generate the ECDSA Keys using brain pool curve at the Safenet HSM. I enabled the user-defined domain parameters at the Safenet HSM and we are facing exception java.security.InvalidAlgorithmParameterException: params must be either a…
Ahmad
  • 1,462
  • 5
  • 17
  • 40
5
votes
1 answer

C# signature verification using ECDSA with SHA256 certificate

I'm trying to use C# and the built in Crypto libraries to verify a signature created using an EC key + SHA256. Here's what I'm doing. I've created a private key and corresponding certificate using openssl: $ openssl ecparam -genkey -name prime256v1…
Amr Bekhit
  • 4,613
  • 8
  • 34
  • 56
5
votes
2 answers

How to generate the ECDSA public key from its private key?

The following site is frequently referenced and, I assume, accurate: https://gobittest.appspot.com/Address I'm trying to repro these steps in Golang but failing at the first step :-( Is someone able to provide me with a Golang snippet that, given a…
DazWilkin
  • 32,823
  • 5
  • 47
  • 88
5
votes
1 answer

Converting EC private key from PEM to DER in python

I am trying to write a Python script to convert an EC private key from PKCS8 PEM to DER using cryptography in Python. I was able to do this previously using openssl like so: openssl pkcs8 -nocrypt -in pem_key.p8 -out der_key.der -outform der I…
Alfonso Embid-Desmet
  • 3,561
  • 3
  • 32
  • 45
5
votes
1 answer

How to construct private key from generated previously ECDSA both encoded key pair?

Having generated the private key like this: fun getKeyPair(): Pair { Security.addProvider(provider) val generator = KeyPairGenerator.getInstance("ECDSA") val ecSpec =…
K.Os
  • 5,123
  • 8
  • 40
  • 95
5
votes
0 answers

Verify signature using NIST P-256 type key and SHA-256 algorithm

I encounter a problem with validation of signature in Java using SHA-256 algorithm and NIST P-256 type key. I have a X509 certificate (provided by Certificate Authority) which contains a public key and I should certify authenticity of the message…
5
votes
3 answers

ECDSA sign with BouncyCastle and verify with Crypto++

Here is the Java code: public static String sign(String data) throws Exception { KeyPair keyPair = loadKeyPair(System.getProperty("user.dir"), "ECDSA"); Signature signature = Signature.getInstance("SHA256withECDSA", "BC"); …
zoraj
  • 73
  • 1
  • 4
5
votes
2 answers

Error incomplete definition of type 'struct ec_key_st' using OpenSSL

I am trying to compute public key from given secret by openssl. I get this error: main.c:27: error: incomplete definition of type 'struct ec_key_st' printf("d: %s\n", BN_bn2hex(eckey->priv_key)); ~~~~~^ Here is my…
miaray
  • 51
  • 1
  • 4
5
votes
1 answer

Create ECDSA DER Encoded Signature

I'm trying to create an ECDSA Signature in Java. When i create one in python it can be verified just fine in Java. But vice-versa gives me a BadSignatureException.Python is using the ECDSA library and Java is using SpongyCastle. Python…
5
votes
1 answer

Creating X509Certificate2 from ECC X509Certificate throws 'System.NotSupportedException' in C#

I need to import ECC certificates into Windows Key Stores in C#. As the first step, I am using BouncyCastle to generate an EC key pair, create an X509 certificate with the public key, and sign it with the ECDSA and private key, i.e.,: …
hyongsop
  • 91
  • 2
  • 9
5
votes
2 answers

Verifying ECDSA signature with Bouncy Castle in C#

I have a problem when I try to verify the ECDSA signature in Bouncy Castle in C#. The code is adopted from Java example that I have, so I am 100% sure that the public key and signature are correct. But the C# implementation always returns that the…
sposnjak
  • 1,491
  • 2
  • 15
  • 25
5
votes
2 answers

Fixed length 64 Bytes EC P-256 Signature with JCE

I need a fixed length 64 Byte ECDSA signature with the NIST P-256 Curve. The implementation hast to use JCE. The following code sample can generate a signature and verify it. Provider provSign = new SunEC(); Provider provVerify = new SunEC(); …
Hollerweger
  • 975
  • 1
  • 13
  • 32
5
votes
1 answer

Use X509Certificate2 to sign and validate ECDSA-SHA256 signatures

I used OpenSSL to create ECC certificates using SHA256. Now I want to use these certificates to sign data and to validate existing signatures. I tried using the DSACryptoServiceProvider, but it only supports SHA1 or MD5. But it seems that ECDsaCng…
Ryo Shinzo
  • 51
  • 1
  • 7