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

ECDSA signature generation using secp256r1 curve and SHA256 algorithm - BouncyCastle

I am trying to generate signature using ECDSA with secp256r1 curve (P256) and SHA256 algorithm for message hash. Also i am using Bouncy Castle libraries. Code below, public class MyTest { /** * @param args */ public static void…
user3932793
5
votes
2 answers

no module named ecdsa with Paramiko

I keep coming up with the error no module named ecdsa when I run a program with Paramiko. I have installed it using pip, and it says that it has installed, but when I run the program again, it comes up with the error again! What can I do? I'm using…
rtharper
  • 105
  • 1
  • 3
  • 12
5
votes
0 answers

java.security.SignatureException: error decoding signature bytes

I am getting this exception when trying to verify the signature in an Android KitKat device (Nexus 5). Using KeyFactory as the EC algorithm and signature instance as NONEwithECDSA. Exception Log: java.security.SignatureException: error decoding…
5
votes
3 answers

Bouncy Castle ECDSA Create Public Key from Private Key

I am trying to sign a bitcoin transaction in c#. I have 2 bits of code I am trying to complete. I can create a set of private and public keys using Bouncy castle. I can convert this to wallet import format ok. I can also generate a bitcoin…
user123976
  • 111
  • 1
  • 7
5
votes
2 answers

What are the parts ECDSA entry in the 'known_hosts' file?

I'm trying to extract an ECDSA public key from my known_hosts file that ssh uses to verify a host. I have one below as an example. This is the entry for "127.0.0.1 ecdsa-sha2-nistp256" in my known_hosts…
loosebazooka
  • 2,363
  • 1
  • 21
  • 32
4
votes
1 answer

Why verification of ECDSA 384 signature fails in GO but not in PHP?

I am facing a issue where I have to verify a signature produced by a Smart Card. The signature is in ECDSA 384 and the message being used is two byte arrays (concatenated together) of SHA-384 hashed strings. I have a sample code written in PHP to…
shadyee
  • 43
  • 4
4
votes
0 answers

yubihsm2 signatures are invalid when signing ETH transactions

I am trying to figure out how to get this yubihsm2 to work with signing eth transactions. I have been using the python lib and so far i have had some basic setup. Below is an abbreviation of what i have web3_endpoint = '' web3 =…
user3554230
  • 283
  • 2
  • 11
4
votes
1 answer

Why are signatures created with ecdsa Python library not valid with coincurve?

I'm switching from the pure Python ecdsa library to the much faster coincurve library for signing data. I would also like to switch to coincurve for verifying the signatures (including the old signatures created by the ecdsa library). It appears…
Lex Berezhny
  • 512
  • 3
  • 15
4
votes
1 answer

How can I sign a document using RustCrypto (ECDSA)?

I am fairly new to Rust but I am trying to build a command line tool similar to OpenSSL written in Rust. I am trying to implement a digital signature using Rust Crypto and the ecdsa crate. I already have a hashed file and my next steps would be as…
Lachr
  • 63
  • 8
4
votes
3 answers

Verify Metamask signature (ethereum) using Python

I would like to verify an ethereum (ETH) signature made in MetaMask using python. I'm developing a website using flask as backend. Javascript code send a POST requests to the back end containing the 3 following variables: {'signature':…
Cybèle
  • 53
  • 1
  • 3
4
votes
1 answer

Invalid JWT signature with ES256

I'm trying to manually create an ES256 JWT token. I've a small script written in python which signs a sha256 hash which uses ecdsa-python. But the signature is invalid on jwt.io. Steps to reproduce: Create base64 header +…
Sam
  • 338
  • 1
  • 4
  • 17
4
votes
1 answer

How to load private ecdsa key es256 in c#?

I've used following commands to generate private and public ES256 keys: Create private key: openssl ecparam -genkey -name prime256v1 -noout -out private.pem Create public key: openssl ec -in private.pem -pubout -out public.pem Now I got following…
sensei
  • 7,044
  • 10
  • 57
  • 125
4
votes
1 answer

Kotlin ECC Encryption

Is there any information about Elliptic Curve Encryption within Kotlin? For generating key pairs and encrypting, decrypting messages. There is very little to non information about this topic. I want to implement the ECC P-521 elliptic curve for…
Riccoh
  • 359
  • 1
  • 4
  • 19
4
votes
0 answers

ECDSA Signature Verification Performance in Java

I am trying to calculate the performance of ECDSA signature verification in Java for secp521r1 curve. I am getting around 3000 signature verification per second. Adding my other work also, I tested with openssl speed command for secp521r1 curve,…
4
votes
1 answer

ECDSA Digital Signature Verification on Android P

import android.os.Bundle; import android.util.Base64; import android.widget.Toast; import org.bouncycastle.jce.provider.BouncyCastleProvider; // implementation 'org.bouncycastle:bcprov-jdk16:1.46' import java.security.KeyFactory; import…
Egis
  • 5,081
  • 5
  • 39
  • 61