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

How to solve PHP ssh2_connect(): Failed overriding HOSTKEY method (ubuntu20.04 openssh) when trying to use ecdsa key

I am using docker to setup an env docker env: ubuntu-desktop-lxde (ubuntu 20.04) (also the server I want to connect to is 20.04) The docker uses: RUN apt-get install openssh-server ... lots more RUN apt-get update; RUN apt-get install -y…
2
votes
0 answers

WebAuthn: using algorithm -47 (ES256K) for PublicKey fails

I'm trying the basic user registration with WebAuthn following https://webauthn.guide/#registration . If pubKeyCredParams: [{alg: -7, type: "public-key"}] is changed to pubKeyCredParams: [{alg: -47, type: "public-key"}] i.e. from ES256 to ES256K…
rlib
  • 7,444
  • 3
  • 32
  • 40
2
votes
0 answers

ECDSA Public Key format analysis

I am having a blockchain application set up with Hyperledger Fabric and I want to get the public key from the caller inside the chaincode. I use golang for the chaincode and I have managed to retrieve from the caller the certificate X509 and from…
Rafail K.
  • 365
  • 3
  • 14
2
votes
1 answer

How to apply P1363 format on deterministic ECDSA - Bouncy Castle?

I don't find any reference for deterministic with P1363 format. the r and s always different in deterministic mode. Non-Deterministic with P1363 -> WithPlain-ECDSA OK ISigner sign = SignerUtilities.GetSigner("SHA256WithPlain-ECDSA"); …
Momo
  • 27
  • 5
2
votes
1 answer

Extract r and s from ECDSA signature signedxml c#

I'm using Signedxml class in .net 5 to generate signature using ECDSA and I need the value of r and s but I can not extract it and another problem is signature length . My signature always 64 bytes but ECDSA signature length is 71 and I do not know…
Ali
  • 50
  • 5
2
votes
1 answer

How to get R and S values from ECDSA signature using PHP

I am working on Signature of data using ECDSA from Starkbank library and I can get the base64 format of the signature value MEUCIALlD6Xsd0Xdj7XTrD2gP4Q3PlssTxLOCUi6R8FbXMlbAiEAmW8HLiBnhaBBPzIL64FGzFYzUwF1HfX+a8ep5/NpI0k= and the Der value is 0E…
MK Said
  • 165
  • 8
2
votes
0 answers

Failed Verification of ECDSA Signature

I am signing some data on a Javacard applet, then verifying it in java on my PC. To test this I have a message I know should verify, but when running my code verification fails. This is my code: //message = byte array of message from java…
LozCodes
  • 109
  • 8
2
votes
1 answer

Why can I sign and verify JWT's with a RSA-algorithm using EC-key-pairs?

I use the crypto core-module in node.js to generate an EC-key-pair. I then use this key-pair to sign and verify JWT's. I would expect the signing/verification to only work when using an EC-algorithm. However it seems to be working with any algorithm…
dandan
  • 115
  • 5
2
votes
1 answer

How to convert data type ECDSA private key in Go

I am using the ecdsa.GenerateKey method to generate a private key pair in Go. I would like to send my private key(priva) with socket programming and can read other private key(privb) from other program. priva, _ := ecdsa.GenerateKey(elliptic.P256(),…
2
votes
1 answer

How to extract the text private and public key from ECDsa or ECDsaCng object?

When creating an ECDSA object, and trying to extract the private and public key objects it returns a byte[]. But when trying to convert it to a string, the output it gives doesn't look right. // Creating the object with default parameters ECDsa…
2
votes
1 answer

JAVA How to verify ECDSA signature when r or s are negative

I'm writing a chunk of code to check the signature My code below works if r and s are positive if not the verify fails. My code is PublicKey publicKey = cert.getPublicKey(); Signature ecdsaVerify = Signature.getInstance("SHA256withECDSA", new…
Ariakan
  • 101
  • 1
  • 6
2
votes
1 answer

how to sign a message with ecdsa privatekey using golang?

I am trying to sign a message in go generated via hd wallet's private key using cosmos sdk. Below is the equivalent implementation in python which generates the signed message / signature as expected when submitted/verified is working properly but…
Mozhi
  • 757
  • 1
  • 11
  • 28
2
votes
0 answers

Android Keystore get public key as x9.63 format

I need to export the public key generated by the android Keystore in x9.63 format. The default getEncoded function returns the key in x.509 byte array format. Update: below is my code to generate keyPair: final int timeout = 5 * 60; final…
2
votes
1 answer

ECDSA signature verification: Go vs OpenSSL

I'm trying to verify an ECDSA signature for a hash using a public key. I've written a small Go program that successfully does this but I've been unable to port it to C++. Here is my input data: Public key:…
Peter
  • 2,919
  • 1
  • 16
  • 35
2
votes
1 answer

Howto calculate v (parity / recovery Id) for ECDSA signature using secp256k1 library in C++?

I use the following code (secp256k1 lib for linux) to create an ethereum tx signature in C++: secp256k1_context *ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY); int res = secp256k1_ec_seckey_verify(ctx,…
Ehsan Khodarahmi
  • 4,772
  • 10
  • 60
  • 87