Questions tagged [elliptic-curve]

In mathematics, an elliptic curve is a smooth, projective algebraic curve of genus one, on which there is a specified point O.

In mathematics, an elliptic curve is a smooth, projective algebraic curve of genus one, on which there is a specified point O (the point at infinity). An elliptic curve is in fact an abelian variety — that is, it is a (necessarily commutative) group with respect to an algebraically defined multiplication — and O serves as the identity element. Often the curve itself, without O specified, is called an elliptic curve.

685 questions
6
votes
2 answers

Calculating ECDSA signature in Java as per an RFC test vector

I am writing a test harness in java for a program relating to the ikev2 protocol. As part of this i need to be able to calculate an ECDSA signature (specifically using the NIST P-256 curve). RFC 4754 Describes the the use of ECDSA in IKEv2 and…
PinkyNoBrain
  • 705
  • 1
  • 7
  • 16
6
votes
2 answers

CNG Import ECC Pub/Priv Keyfrom file

I've been trying to find how to import an ECC key from a file by ANY MEANS for ages. I have tried accessing an ECC cert from the Windows certificate store, from a .p12 file, and from a PKCS#8 OpenSSL key file with no success. Just one of the many…
Jim
  • 587
  • 2
  • 6
  • 19
6
votes
2 answers

How do I obtain the public key from an ECDSA private key in OpenSSL?

I am providing this sample application to show my problem #include #include #include #include int main() { EC_KEY *pkey = NULL; EC_POINT *pub_key = NULL; const EC_GROUP *group =…
farmdve
  • 786
  • 3
  • 13
  • 26
6
votes
2 answers

Creating an ECC Private/Public key with native C#

I've been looking around for hours on Google and Microsoft's Crypto API on how to generate a public and private ECC key pair. The ECDiffieHellmanCng Class…
Jim
  • 587
  • 2
  • 6
  • 19
5
votes
3 answers

PyECC Example - Python Elliptic Curve Cryptography

I am working with PyECC - it is the only elliptic curve cryptography module for python that I can find. I was wondering if anyone had an example of how to use the module? I'll try reading the source, but I couldn't find anything on Stack Overflow on…
5
votes
0 answers

JDK 16 Curve not supported: secp256r1 [NIST P-256,X9.62 prime256v1] (1.2.840.10045.3.1.7)

Currently working on upgrading from Java 13 to Java 16 and using the following updated dependencies for a cryptography library performing encryption/decryption: BouncyCastle 1.69 Google Tink 1.6.1 ================================= Crypto Library…
5
votes
1 answer

Generate a public key from a private key with OpenCL for secp256k1

I'ld like to calculate a public key from a private key. It must work using OpenCL. It seems hashcat has a nice library but I'm not sure how to use…
Bernicc
  • 636
  • 6
  • 14
5
votes
1 answer

Elliptic Curve Cryptography in React Native

Does anyone know if there is an implementation of Elliptic Curve Diffie Hellman cryptography (ECDH) for React Native? I found some libraries for this. each of them has some issues: react-native-ecc: it only generates key pairs and does not…
Emad Bayat
  • 177
  • 1
  • 2
  • 12
5
votes
2 answers

Fileformat for EC public/private keys?

If I wanted to store both a private and a public key in a single file, what would be the easiest format to use? Especially if I'm planning to use the BouncyCastle library for Java?
cdecker
  • 4,515
  • 8
  • 46
  • 75
5
votes
2 answers

OpenSSL: Read an EC-key, then write it again, and it's different

I wrote a wrapper for OpenSSL that supports ECC. I'm trying to read a private key that I generated with openssl ecparam -name secp384r1 -genkey -noout -out privkey.pem And compare it with what OpenSSL would produce after reading the key into a…
The Quantum Physicist
  • 24,987
  • 19
  • 103
  • 189
5
votes
1 answer

Verify Java Card signature

I am writing a Java Card 3.0.2 application on a NXP J3D081 card. I have it both signing and verifying a signature using ALG_ECDSA_SHA_256. The keys have been written to the card by my test app. If I sign 32 bytes of data and pass the signature back…
cifs
  • 51
  • 1
5
votes
2 answers

How to get PKCS11 PublicKey via Template

I have a GO Application, that stores it's certificate to a HSM via opencryptoki (pkcs11) in a softwaretoken. But it's not a go question, more a general pkcs11 question I think. I set my certificates and privatekey like this: certTemplate :=…
Flo
  • 2,699
  • 4
  • 24
  • 46
5
votes
0 answers

How to make apt-get use gpg > 2.1 ? in ubuntu 16.4

I am trying to use apt-get on a source that is signed with a GPG ECC (NIST P-256) key which requires gpg version > 2.1 how can i make apt-get use gpg2 instead of gpg? (aliasing does not work) root@fa2e16b8fbc3:/£ gpg --version gpg (GnuPG)…
Tomer Mayost
  • 266
  • 1
  • 8
5
votes
1 answer

Hot to use mechanisms CKM_ECDH1_DERIVE with pkcs11interop

I bought a NitroKey HSM and wanted to derive a secret with EC. Previosly question For this, I want to use the CKM_ECDH1_DERIVE mechanisms. Which is supported by this HSM, see: Referring to the PKCS#11 specification this must be considered: The…
hdev
  • 6,097
  • 1
  • 45
  • 62
5
votes
0 answers

C# Verify JWT Signed With ES256 C# Using Bouncycastle

Im trying to sign / verify a Json Web Token with Bouncycastle in C#. I've had success with RSXXX and HSXXX but I haven't been able to successfully verify one signed with ES256. I've been using https://kjur.github.io/jsrsasign/tool_jwt.html as my…
user408075