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

Verifying signature created using OpenSSL with BearSSL

I am trying to verify a ECDSA signature created with OpenSSL on an embedded device using BearSSL. First I created a private key using OpenSSL and extracted the public key: $ openssl ecparam -name secp256r1 -genkey -noout -out private.pem $ openssl…
Num Lock
  • 742
  • 1
  • 6
  • 32
2
votes
0 answers

The provided issuer certificate does not have an associated private key

I'm trying to write a method for creating a certificate which is not CA certificate using the RequestCertificate class and method Create. I've used this code, it created additional CA but I don't need it because I already have one: public static…
2
votes
1 answer

Get raw keys from Bouncy Castle Java

I am working with both C and Java implementations for ECDSA. C implementation is using raw formats - 32-byte private key, 64-byte public key, 64-byte signature. I am creating keys in Java using Bouncy Castle: public static KeyPair GenerateKeys()…
Michał
  • 691
  • 1
  • 5
  • 22
2
votes
1 answer

How to sign ECDSA signature and encode to DER format in hex in php?

How to sign the Tx data including ETH Keccak256 hashed addresses signature with secp256k1 (ECDSA) keys and encode to DER format in hex and verify in php? I want to use only php libraries come with, openssl and others, to make secp256k1 private and…
smith john
  • 33
  • 9
2
votes
1 answer

How to get a public key from ECDsa in C#

In C# I can create an RSA public/private key pair... RSA rsa = RSA.Create(); byte[] priKey = rsa.ExportRSAPrivateKey(); byte[] pubKey = rsa.ExportRSAPublicKey(); Now I want to do effectively the same thing using ECDsa... ECDsa ecdsa =…
Matthew Layton
  • 39,871
  • 52
  • 185
  • 313
2
votes
1 answer

P256 DER signature from Apple CryptoKit unable to be verified by OpenSSL (invalid signature)

On iOS I am generating a pair of private and public key with the following code: extension Data { var hexString: String { return map { String(format: "%02hhx", $0) }.joined() } } let privateKey = P256.Signing.PrivateKey() let…
peakingcube
  • 1,388
  • 15
  • 32
2
votes
1 answer

Failing to verify ECDSA signature using WebCrypto

I am trying to verify an ECDSA signature via WebCrypto and failing. The signature is created using Java (Bouncy Castle). The curve used is secp256r1 and SHA256 hash is used at signature creation. Then I tried creating signature using RSA (SHA256) in…
2
votes
0 answers

ECDsa Class in System.Security.Cryptography - How to supply K

I am trying to use the ECDsa Class in System.Security.Cryptography, but need to generate deterministic signatures. Some libraries like bouncycastle implement something that looks like this ECDsaSigner signer = new ECDsaSigner(new…
Warrick FitzGerald
  • 2,455
  • 3
  • 23
  • 31
2
votes
0 answers

JWT sign and parse using ES256

I'm trying to generate a jwt token using ECDSA ES256 method and use it for api request, I've been able to generate a []publicPEM and []privatePEM from an *ecdsa.PrivateKey, I used the *ecdsa.PrivateKey to get the jwt token // Secret is…
Epikoder
  • 79
  • 7
2
votes
1 answer

Is it necessary to have two coordinates for the public key of ECDSA?

I am trying to generate an ECDSA key-pair using an external library called easy-ecc. The thing that I do not understand is this library generates a single coordinate for public key. As far as I see from books, online ECDSA generators or NIST test…
Terminou
  • 49
  • 6
2
votes
1 answer

Validate EC SHA 256 signature in .net without bouncy castle

I am implementing Apple's App Attestation service. As part of the process, i receive a EC key and a signature. Sample key: -----BEGIN PUBLIC…
zaitsman
  • 8,984
  • 6
  • 47
  • 79
2
votes
1 answer

ECDSA signing/verifiying appears to be only considering the first 32 bytes of the data

ec = OpenSSL::PKey::EC.new('secp256k1') ec.generate_key signature = ec.dsa_sign_asn1("A" * 64) refute ec.dsa_verify_asn1("A" * 32, signature) # Fails here Given the test code above, why dsa_sign_asn1 and dsa_verify_asn1 only considers the first 32…
Xenofex
  • 611
  • 6
  • 17
2
votes
2 answers

Openssl command line: how to get PEM for a hex public key, 224 bit curve?

I'm lost in a twisty maze of openssl command line options, seemingly all alike... A public datasheet from a chip company shows this public key for use in chip authentication with…
Larry Martin
  • 89
  • 1
  • 10
2
votes
2 answers

WebCrypto API, importKey() for a public key in raw data (64bytes Hex) from an ATECC508A secure chip error: Data provided does not meet requirements

I am using an embedded chip called an ATECC508A in order to generate a ECDSA SHA-256 public/private key, and signature for a given message. When I read the public key from the chip, I obtain a value of: 0x4B 0x34 0x89 0xAB 0x1B 0xE2 0x4C 0x84 0xA4…
2
votes
2 answers

Unmarshalling EC Point of a specific curve in golang

I'm trying to parse an EC Point 04410478ed041c12ddaf693958f91f1174e0c790b2ff580ddca39bc2a4f78ad041dc379aaefe27cede2fa7601f90e3f397938ee53268564e346ac7a58aac8c28ca5415 to a ecdsa.PublickKey struct with the following code: x, y :=…
Jorge Alvarado
  • 2,664
  • 22
  • 33