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

Java - Create XML Digital Signature using ECDSA (Elliptic Curve)

We can create XML Digital Signature using RSA keys. But how do I use elliptic curve keys to sign xml files ? I get error messages such as - Exception in thread "main" java.security.KeyException: ECKeyValue not supported at…
user2531191
  • 579
  • 10
  • 27
7
votes
2 answers

How to create ECDSA keypair (256bit) for bitcoin curve (secp256k1) using spongy castle?

Currently, I am creating keyPair using this method private KeyPair getKeyPair() throws NoSuchAlgorithmException, NoSuchProviderException, InvalidAlgorithmParameterException { KeyPairGenerator keyGen = KeyPairGenerator.getInstance("ECDsA",…
ua741
  • 1,446
  • 15
  • 28
7
votes
1 answer

How to write out ecdsa keys using golang crypto?

I have some Go code to generate an ECDSA key and write it to a file: priv, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) ecder, err := x509.MarshalECPrivateKey(priv) keypem, err := os.OpenFile("ec-key.pem",…
Aaron
  • 1,141
  • 1
  • 11
  • 21
7
votes
1 answer

Recreating Keys (ECPublicKeyParameters) in C# with BouncyCastle

I generate an AsymmetricCipherKeyPair as follows: string curveName = "P-521"; X9ECParameters ecP = NistNamedCurves.GetByName(curveName); ECDomainParameters ecSpec = new ECDomainParameters(ecP.Curve, ecP.G, ecP.N, ecP.H,…
Andrew
  • 816
  • 7
  • 15
6
votes
2 answers

Why does ECDSA produce different signatures for the same data, whereas RSA doesn't?

Consider the following code using RSA... Example: byte[] raw = Encoding.Default.GetBytes("Hello, World!"); RSA key = RSA.Create(); for (int index = 0; index < 5; index++) { byte[] signed = key.SignData(raw, HashAlgorithmType.SHA256,…
Matthew Layton
  • 39,871
  • 52
  • 185
  • 313
6
votes
1 answer

How to sign JWT with ECDSA method using jwt golang package - Sign in with Apple

When integrating Sign in with Apple you generate a key in your apple developer account. It's a file that is named like AuthKey_3JMD5K6.p8 and looks like -----BEGIN PRIVATE…
Ryan Sam
  • 2,858
  • 4
  • 19
  • 30
6
votes
1 answer

Microsoft CNG | How to import PEM encoded ECDSA private key into MS Key Storage Provider

I know the MS CNG private have this format - BCRYPT_ECCKEY_BLOB BYTE X[cbKey] // Big-endian. BYTE Y[cbKey] // Big-endian. BYTE d[cbKey] // Big-endian. Thus tried to import below key bytes - byte[] ec256PrivKB = { //Magic + CBLength 0x45, 0x43,…
User1234
  • 1,543
  • 4
  • 22
  • 32
6
votes
1 answer

Matching sec256k1 keys in JS and PHP

I'm having trouble with uniting the ionux/phactor PHP library, and the indutny/elliptic JS library. One library is being used at a LAMP server, the other via Nodejs at Amazon Lambda. I generate one key pair with the PHP library; sign sha256 hash…
LINKeRxUA
  • 559
  • 6
  • 26
6
votes
3 answers

ECDsa Signing in .Net Core on Linux

I'm trying to create a C# implementation to send Pushes to Apple via their HTTP/2 APNS Endpoint with .Net core in Docker. Part of this requires sending an encrypted JWT Authorization Token along with the payload. With .Net core, I can sign the token…
JoelHess
  • 1,166
  • 2
  • 15
  • 28
6
votes
1 answer

Keys used with the ECDsaCng algorithm must have an algorithm group of ECDsa

I have the following problem, and cant find solution: While consuming APN (Apple push notifications) API, i implemented tokenized authorization. It's apple's new way of authorization on their push notifications api. Apple provides me private key,…
MIslavMIslav
  • 93
  • 1
  • 8
6
votes
1 answer

How do I load an OpenSSL ECDSA key into C#?

I need to load an OpenSSL private key into a C# based application. The commands I used to generate the key are: $ openssl ecparam -name prime256v1 -genkey -noout -out eckey.pem $ openssl ec -in eckey.pem read EC key writing EC key -----BEGIN EC…
makerofthings7
  • 60,103
  • 53
  • 215
  • 448
6
votes
1 answer

Not sure how to generate an ECDSA signature, given a private key and a message

I'm following Apple's guide towards composing a CloudKit Web Services request. The bit I'm having trouble with is Step 2, under "Authenticate Web Service Requests": Compute the ECDSA signature of this message with your private key. Before…
Andrew
  • 7,693
  • 11
  • 43
  • 81
6
votes
0 answers

ECDSA prime256v1 cross-platform signature verification fail

I need to verify a signature with Java/Android and an ATEC108A Chip which is created in a .Net environment. (Using SunEC and AndroidOpenSSL) The signature is created in .Net using BCrypt, the keys are also created using BCrypt and stored on the…
NicoT
  • 61
  • 3
6
votes
3 answers

Specification defining ECDSA signature data

I want to know what specification (or standard) define the data format of the ECDSA signature and public key? I'm testing the ECDSA signature on java card. I found out that there is a TLV format in the signature and the public key value. * Public…
user2642459
  • 507
  • 3
  • 10
  • 18
6
votes
3 answers

Python module ecdsa errors while running paramiko

I am trying to install paramiko module..it fails with the below error python ./test.py Traceback (most recent call last): File "./test.py", line 30, in import paramiko File…
satishkumar432
  • 337
  • 1
  • 6
  • 19
1 2
3
46 47