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

Why cert in certificate store doesn't have private key property

I tried to get EC private key from cert which in certificate store by CNG API. First, I call CertGetCertificateContextProperty() to get private key handle with CERT_KEY_CONTEXT_PROP_ID property, but it always return false. I'm sure that the cert has…
Assam
  • 179
  • 1
  • 13
0
votes
0 answers

Get byte array of ECC encryption certificate

I'm using self signed certificate ECDH_secP384r1 for signing token. Here is the PowerShell that I create the certificate: $Cert = New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname $Certname -NotAfter $ExpireDate…
Saeid
  • 13,224
  • 32
  • 107
  • 173
0
votes
1 answer

Sign Custom created JWT format token using SignAsync method of azure and verify offline

var byteData = Encoding.Unicode.GetBytes( encodedSerializedHeader + "." + encodedPayload); var hasher = new SHA256CryptoServiceProvider(); var digest = hasher.ComputeHash(byteData); var signature = await…
0
votes
1 answer

Does private RSA, DSA or ECDSA key in pem-format contain public key?

I use hardcoded ec-kyes for testing my application. There is example for ecdsa: const char pem_ecdsa_prv_key[] = { "-----BEGIN EC PRIVATE KEY-----\n" "MHcCAQEEIAGOaT3/9PJxSIFKPbvEhj61jY3CGPsgA46IVZlvIlnGoAoGCCqGSM49\n" …
Anisyanka
  • 63
  • 8
0
votes
2 answers

How to sign a message with existing private key by using ECDsa on dotnet core 3.1 MacOS?

I generated a key by running following command: openssl ecparam -genkey -name secp256k1 -out private.key Worth mentioning that I had to use secp256k1 curve. Here is private.key: -----BEGIN EC PARAMETERS----- BgUrgQQACg== -----END EC…
0
votes
0 answers

Get ecdsa public key from ecdsa privatekey in naive java

I have generated the ec private key from ec String. But I don't know how to get the ec public key from this public Key. KeyFactory keyFactory = KeyFactory.getInstance("EC"); PrivateKey ecPrivateKey =…
shulin01
  • 11
  • 2
0
votes
1 answer

WebAuthN and BouncyCastle in .Net

I am working on a proof of concept for YubiKey and webAuthN; I think I have the basic steps down, but I'm having some issues verifying the signature; there are a couple of places where this may be going wrong for me: 1) When I do a…
0
votes
1 answer

How can I persist values of KeyUsage and BasicConstraints in the ECDSA based certificates from LetsEncrypt?

I am trying to set up a CA and I need a root certificate for this CA. This root certificate has to be signed by a public CA and the signing algorithm has to be ECDSA with prime256v1 curve. I am following this issue on LetsEncryp forum. However, I…
Mrudav Shukla
  • 708
  • 1
  • 7
  • 25
0
votes
1 answer

How can I get java.security.PrivateKey from 32 byte raw private key ? (Secp256k1 Algorithm)

I'm trying to get PrivateKey Object from 32-byte raw private key that I got by useing getS() method. I used ECDSA secp256k1 algorithm at bouncy castle library to generate a key pair. Below is the way that I got 32-byte private key in byte array, and…
Minji Cho
  • 1
  • 1
0
votes
2 answers

Transform P1363 encoded signature into ECDSA_SIG using OpenSSL

While OpenSSL always assumes ECDSA signatures to be ASN.1/DER encoded, I also need to be able to verify P1363 encoded signatures. (For a comprehensive introduction to the 2 forms see e.g. the answer to this SO question.) The idea is to patch…
kzi
  • 61
  • 9
0
votes
1 answer

libsodiums secret key contains public key?

I noticed that libsodiums secret signing keys contain a copy of the public key? What is the reason for this? Does it have to do with how the ecdsa algorithm works or is it just for convenience?
evading
  • 3,032
  • 6
  • 37
  • 57
0
votes
1 answer

How to encrypt and decrypt using ECDSA private key and public key generated in Hyperledger fabric

I am working on a basic-network project on Hyperledeger Fabric V-1.4.1. I have enrolled an admin and created a user using enrollAdmin.js and registerUser.js. A public Key and a private key is generated for user1. Now I want to use that private key…
0
votes
2 answers

Convert ECPrivateKey/ECPublicKey to PEM string in Dart

I have a ECPrivateKey/ECPublicKey, want to convert it to PEM string like below PublicKey: -----BEGIN PUBLIC…
Diwa Har
  • 49
  • 7
0
votes
1 answer

Is my leaf certificate truly invalid, or am I using `openssl verify` incorrectly?

I thought I created my leaf certificate (device.cert.pem) correctly but it's not validating correctly with my software. I'm therefore trying to use OpenSSL on the command-line to verify said certificate before I debug my software any further. The…
DavidZemon
  • 501
  • 5
  • 21
0
votes
0 answers

How to port this Cryptography-related code from Go to Python

I am trying to port certain logic from Go to Python 3, and I'm stuck with cryptography-related code. Original code in Go is here: https://github.com/avast/apkverifier/blob/master/signingblock/frosting.go In particular, I'm stuck in the…
vmg
  • 9,920
  • 13
  • 61
  • 90