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

How does Elliptic Curve Diffie Hellman work on JavaCard, in combination with Java?

I'm trying to get Elliptic Curve Diffie Hellman to work on a JavaCard (version 2.2.1). On the JavaCard, I have the following code right now: byte temp[] = new byte[100]; byte secret[] = new byte[100]; byte size =…
kokx
  • 1,706
  • 13
  • 19
5
votes
2 answers

Fixed length 64 Bytes EC P-256 Signature with JCE

I need a fixed length 64 Byte ECDSA signature with the NIST P-256 Curve. The implementation hast to use JCE. The following code sample can generate a signature and verify it. Provider provSign = new SunEC(); Provider provVerify = new SunEC(); …
Hollerweger
  • 975
  • 1
  • 13
  • 32
5
votes
1 answer

Using BouncyCastle to encrypt with ECIES in Java

I am trying to encrypt some content using ECC algorithm using BouncyCastle in java. But I am getting exception of BouncyCastle library saying cannot cast JCEECPublicKey to IESKey. Which I understood that the public key generated by KeyPairGenerator…
5
votes
1 answer

Restricted elliptic curves in Java Card

I am trying to implement cryptographic algorithms on elliptic curve in Java Card. First, I implemented it on 256bits elliptic curve (the NIST one) and it worked well. Now I want to test it on a 512bits curve (and not 521 like the NIST one). My card…
Raoul722
  • 1,222
  • 13
  • 30
5
votes
1 answer

How to decrypt HTTPS (ECDHE) data?

I am trying to understand how exactly HTTPS works and doing a little practical tests. I have a data captured from HTTPS communication encrypted by TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA. If I understood it right, client during the TLS handshake creates…
user10099
  • 1,345
  • 2
  • 17
  • 23
5
votes
1 answer

How does the elliptic-curve version of Diffie-Hellman cryptography work?

Does the Elliptic curve diffie hellman calculation look any different from the standard one defined here: /* * The basic Diffie-Hellman Key Agreement Equation * * The client initiates …
cmaduro
  • 1,672
  • 3
  • 21
  • 40
5
votes
2 answers

Generate EC Diffie-Hellman public and private key pair

I need to generate an EC Diffie Hellman key pair. I am using the secp256r1 named curve, and OpenSSL. This is what I have with me so far: unsigned char *ecdh(size_t *secret_len) { EVP_PKEY_CTX *pctx, *kctx; EVP_PKEY_CTX *ctx; unsigned…
5
votes
2 answers

Python -- Matplotlib for elliptic curve with sympy solve()

I have an elliptic curve plotted. I want to draw a line along a P,Q,R (where P and Q will be determined independent of this question). The main problem with the P is that sympy solve() returns another equation and it needs to instead return a value…
stackuser
  • 869
  • 16
  • 34
5
votes
4 answers

Codes to generate a public key in an elliptic curve algorithm using a given private key

I need to implement ECC (Elliptic Curve Cryptography) algorithm using jdk 1.7. I tried using bouncy castle, sunEC, but all of them gave errors and errors. My target is to generate an elliptic curve using the private key, I will be given to the…
user2934766
  • 51
  • 1
  • 1
  • 3
5
votes
2 answers

Scalar Multiplication of Point over elliptic Curve

I am implementing Elliptic Curve Point arithmetic operation on NIST specified curve "p192". For testing purpose I have taken example points shown in NIST Routine document for the curve p192. I am getting correct answer for addition of point and…
gs.mndt
  • 51
  • 1
  • 3
5
votes
1 answer

OpenSSL command line secp384r1 / SHA-256 digital signatures

Is it possible to generate digital signatures using secp384r1 / SHA-256 from the OpenSSL command line (I'm using version 1.0.1c)? After some experimentation I can generate signatures with SHA-1 using: openssl dgst -sign ec-key.pem -ecdsa-with-SHA1…
user2166777
  • 51
  • 1
  • 2
5
votes
2 answers

What ECC certificate would work with the following PKCS7/CMS code?

We are using the PKCS#7 / CMS data format standard to encrypt/decrypt/sign/verify sensitive payloads. Currently we're using 2048 and 4096 bit RSA certificates (and keys) for our PKCS7 / CMS and its fine (see RSA working code below). We want to add…
DeepSpace101
  • 13,110
  • 9
  • 77
  • 127
5
votes
1 answer

Access PFX File ECC PrivateKey For Symmetric Key Generation in Java

I'm writing a program (in Java using the Bouncy Castle API) that encrypts files with AES-256/GCM with a key generated by ONE EC key pair. I have the symmetric encryption portion working perfectly but now the key generation is proving to be…
Jim
  • 587
  • 2
  • 6
  • 19
5
votes
5 answers

How do I feed OpenSSL random data for use in ECDSA signing?

I want to feed OpenSSL specific data for use as random seed during the signing of data with an EC key. I'm doing this to compare my application with another reference one (closed source). That utility takes the file with private key, file with data…
Belrog
  • 950
  • 1
  • 11
  • 19
4
votes
1 answer

Can you do basic EC operations in Java 7 without a third-party library?

Java 7 comes with SunEC, which provides ECDH and ECDSA operations. I was attempting to do basic EC operations (point addition, scalar multiplication). I start with ECParameterSpec p256 = NamedCurve.getECParameterSpec("secp256r1"); ECPoint generator…
Jumbogram
  • 2,249
  • 1
  • 20
  • 24