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

ECDSA Not Signing/Verifying Correctly

I am currently having trouble signing/verifying a string with Crypto++. I have tried methods listed on this website among others, for months, with no success. I have previously tried the C style solution posted here:…
stacker
  • 71
  • 7
4
votes
1 answer

ECDsaCng signature generation using SignData or SignHash give different result

I am trying to generate signature using ECDSA with secp256r1 curve (P256) and SHA256 algorithm for message hash. Also i am using NET libraries. Code below, using System; using System.Security.Cryptography; namespace ProjetTest { public static…
SKla
  • 85
  • 1
  • 3
4
votes
1 answer

Elliptic curve encryption - ECDSA on iOS and Android

I'm putting together an encryption strategy that will encrypt data shared between iOS and Android devices over BTLE. We would like to use a basic elliptic curve cryptography. We're currently implementing our iOS app and our Android app will kick-off…
user2536583
  • 71
  • 1
  • 6
4
votes
1 answer

Where can be ECDsaCryptoServiceProvider class found

I've been following this sample about singing xml documents with c# using RSACryptoServiceProvider. What I need is to use this sample with ECDsaCryptoServiceProvider, found…
Alejandro Morán
  • 669
  • 1
  • 13
  • 36
4
votes
1 answer

Elliptic curve addition in Jacobian coordinates

I try to add two points on an elliptic curve over a prime field, converting these points from affine/to-affine coordinates, but do not manage to get a correct result (the curve I am testing has a=0). Anyone can see what's wrong? // From…
4
votes
2 answers

Convert ECDSA private hex key to public key

I'm using the below two lines to generate a hex of an ECDSA private key: openssl ecparam -genkey -name secp256k1 -out data.pem openssl ec -in data.pem -outform DER|tail -c +8|head -c 32|xxd -p -c 32 Those output something like…
Microondas
  • 71
  • 1
  • 5
4
votes
3 answers

ECDSA sign with OpenSSL, verify with Crypto++

I create an ECDSA keypair (secp128r1) in my application with Wei Dai's Crypto++. Signing and verifying works as expected. I do not add the message itself to the signature to minimize the signature length (which is exactly 32 Bytes). However, when I…
divB
  • 896
  • 1
  • 11
  • 28
4
votes
1 answer

ECDSA: How to get y coordinate from uncompressing x using openssl

What I am trying to do with ECDSA is take an x "compressed" coordinate and a y "bit" from values taken from external ECDSA hardware (it's really a public key) and then trying to recover the y coordinate (uncompressed) with OpenSSL function calls. I…
4
votes
1 answer

Why are these Botan public keys so similar?

I am using Botan to create public/private ECDSA keypairs. The public keys that are generated (even on different machines using this code) are very similar... too similar to consider safe I would think. Here is an example of two runs: -----BEGIN…
sorrell
  • 1,801
  • 1
  • 16
  • 27
4
votes
2 answers

Javascript ECDSA get private and public keys?

All I need are to get a private and public keypair for ECDSA. Stanford Javascript Crypto Library does it in a non-standard way ( https://groups.google.com/forum/?fromgroups#!topic/sjcl-discuss/UaWUyMWS3Rs ) and that's useless to me - like what's the…
apscience
  • 7,033
  • 11
  • 55
  • 89
3
votes
1 answer

How can I use Hedera JS SDK to generate a set of ECDSA key-pairs based on a BIP-39 seed phrase and a custom derivation path?

I'm currently using the Hedera JS SDK to generate a single ECDSA key-pair using a private key directly as an input, like so: const privateKey = PrivateKey.fromStringECDSA(process.env.TARGET_HEX_PRIVATE_KEY); Instead I would like to do…
bguiz
  • 27,371
  • 47
  • 154
  • 243
3
votes
2 answers

Verify WebAuthn ECDSA signature in ethers.js

Using the SimpleWebAuthn TypeScript package, I have generated a ECDSA-SHA256 key pair and I used the key pair to sign a challenge. The SimpleWebAuthn package uses crypto.webcrypto.subtle (see this line) to verify the signature. I want to verify the…
Yao
  • 359
  • 4
  • 10
3
votes
2 answers

How can I export (to store) an ecdsa key pair in Rust?

I am able to create a public/private ecdsa key in Rust, how can I store the keys for further use? I can't seem to find a method that will export the key. use p256::{ecdsa::{SigningKey, Signature, signature::Signer}}; use rand_core::OsRng; //…
Kladskull
  • 10,332
  • 20
  • 69
  • 111
3
votes
0 answers

How to create ECDSA signature with Node.js crypto?

What signature algorithm does the Node crypto module use in the following example? I can't figure it out from the documentation. The digest algorithm is SHA-256, but am I using ECDSA? Or something else? const crypto = require('crypto'); const {…
user16910834
  • 31
  • 1
  • 2
3
votes
1 answer

using _hashTypedDataV4 in smart contract and _signTypedData(etherjs) in frontend is not working

i am trying to encode the nft data using _signTypedData(etherjs) in frontend as follows const domain = { name: "og-nft", version: "1", }; const types = { Nft: [ { name: "URI", type: "string" }, { name: "price", type:…
Adarsh Raj
  • 297
  • 4
  • 14