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

KJUR jws jsrsasign: Cannot validate ES256 token on JWT.io

We are trying to make a JWT token for Apple Search Ads using the KJUR jws library. We are using the API documents from Apple: https://developer.apple.com/documentation/apple_search_ads/implementing_oauth_for_the_apple_search_ads_api We are…
3
votes
1 answer

How to Generate ECDSA Key Pair for SSH in Go?

I'm trying to generate ECDSA Key Pair for SSH with Go, but I find that the private key format is different from ssh-keygen and can't be accepted by GitHub. Here's the 256-bit key pair generated via ssh-keygen -t ecdsa -b 256: ecdsa-sha2-nistp256…
3
votes
1 answer

MekaVerse NFT smart contract is using ECDSA, but I don't understand how it works

In the smart contract of MekaVerse I can see these lines to enable a whitelisting, but I don't understand the theory behind it and how I can use it. function mint(uint256[] memory _tokensId, uint256 _timestamp, bytes memory _signature) public…
Ben BK
  • 154
  • 2
  • 11
3
votes
1 answer

How to encode x, y coords to python ecdsa VerifyingKey format from Dart

I am trying to send verifying key from my flutter app to python server and I can't figure out the format the python ecdsa lib is expecting. I am using the spec256k1 lib on the dart side (The python side is also using the spec256k1 curve) import…
3
votes
1 answer

ECDSA signed PDF fails signature verification with iText 7 (C#), but succeeds with Adobe Reader DC

I have created code with iText 7 that is able to digitally sign a given PDF with a X509 certificate that uses an ECDSA key pair. When I open this signed PDF in Acrobat Reader DC, it correctly reads it, and verifies it to be valid (meaing doc is…
3
votes
1 answer

C# Validate JWT token with values from an authorize end point (crv, x, y)

I have a web page being displayed on a vendors site in an iframe. They call my page and pass a JWT in the query string. I have to parse the…
hammwz
  • 33
  • 5
3
votes
2 answers

Verifying SendGrid's Signed Event Webhook?

I'm trying to implement the validation from this link. https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features/#the-signed-event-webhook I don't want the OAuth part of this, but to use the Public key…
byee
  • 33
  • 4
3
votes
2 answers

InvalidSignature with python cryptography

I want to verify a signature of some payload, given a public ECDSA key, and I know beforehand that the signature is correct. I want to use the cryptography python library, but the problem being, I can't make the verification work and always get a…
phbelitz
  • 45
  • 1
  • 4
3
votes
2 answers

Verify Signature ECDSA signature with Openssl

I want to create a signature and verify it with openssl. I want to have hex output of my signature. it's my code #create private key openssl ecparam -genkey -name secp256k1 -rand /dev/urandom -noout -out private.pem #public key derivation openssl…
monkeyUser
  • 4,301
  • 7
  • 46
  • 95
3
votes
0 answers

How to create x25519 public key from XZ coordinates?

As far as I understand, x25519 DH function used on Curve25519 uses only Xcoordinates as I can read in the wikipedia definition: The protocol uses compressed elliptic point (only X coordinates), so it allows efficient use of the Montgomery ladder for…
Guillaume Cisco
  • 2,859
  • 24
  • 25
3
votes
1 answer

ECDSA Verify Signature in C# using public key and signature from Java

I have a public key and signature generated in Java which I would like to verify in C# using ECDsaCng. The public key is MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExeg15CVOUcspdO0Pm27hPVx50thn0CGk3/3NLl08qcK+0U7cesOUUwxQetMgtUHrh0lNao5XRAAurhcBtZpo6w==…
josagyemang
  • 503
  • 5
  • 9
3
votes
3 answers

How to get an elliptic curve public key from a private key

So, I need to get a public key from a corresponding 256 bit number using ECC spec256k1. So, lets say I get a private key using a sha256 from any passphrase, like this: >>> import hashlib >>> private_key = hashlib.sha3_256(b"Led Zeppelin - No…
Alejandro Veintimilla
  • 10,743
  • 23
  • 91
  • 180
3
votes
1 answer

How to validate a signature in Java if the public key's algorithm is EC?

Given an X509 certificate object of a person. (The object's type is sun.security.x509.X509CertImpl). This person signed a String with his private key. Given the signature that was made by this person, when he signed the above mentioned String…
SaWo
  • 1,515
  • 2
  • 14
  • 32
3
votes
1 answer

How to compute the ECDSA signature using a P-256 key in a PEM file using C#.NET?

I am new to cryptography and in over my head trying to sort it out on Windows, using C#.NET I generated an elliptic curve P-256 (a.k.a. secp256r1 and prime256v1) key using the following command: openssl ecparam –name prime256v1 -genkey –noout –out…
BhanuKer
  • 41
  • 6
3
votes
1 answer

ECDSA Signing and Verifying issue between python ECDSA and C micro-ecc library

I am facing an issue when I do the following : Created a Public Private key pair using python for ECDSA SECP256k1 curve and printed it on the terminal. Copy pasted the key pair in Python script and in visual studio (C coding that uses micro-ecc…
Prajwal B V
  • 33
  • 1
  • 8