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
7
votes
4 answers

Number of points on elliptic curve

If you have an elliptic curve in the form of: y^2 = x^3 + a*x + b (mod p) Is there a good program to calculate the number of points on this curve? I have read about Schoof's and Schoof-Elkies-Atkin (SEA) algorithm, but I'm looking for open source…
Omega
  • 365
  • 1
  • 4
  • 10
7
votes
0 answers

Node.js crypto module - ECDH

I'm trying to accomplish a key exchange between Node.js using the crypto module and a web client using the Web Cryptography API. So far I managed to process the key exchange to the point where I derive the shared secret on the server and the client…
7
votes
3 answers

Is it possible to use elliptic curve cryptography for encrypting data?

So far I have only seen it used in digital signatures and key agreement protocols. Can it be used like RSA to actually encrypt data? Are there any libraries for this? Edited: I need something like RSA. Encrypt the data with the recievers public key…
stribika
  • 3,146
  • 2
  • 23
  • 21
7
votes
6 answers

Java compact representation of ECC PublicKey

java.security.PublicKey#getEncoded() returns X509 representation of key which in case of ECC adds a lot of overhead compared to raw ECC values. I'd like to be able to convert PublicKey to byte array (and vice versa) in most compact representation…
Daimon
  • 3,703
  • 2
  • 28
  • 30
7
votes
3 answers

Elliptic Curve Cryptography algorithms in Java

We're a couple of amateurs in cryptography. We have to implement different algorithms related to Elliptic curve cryptography in Java. So far, we have been able to identify some key algorithms like ECDH, ECIES, ECDSA, ECMQV from the Wikipedia page on…
Riddhiman Dasgupta
  • 363
  • 1
  • 6
  • 22
6
votes
1 answer

about use of secp256r1 and x25519

I'm not familiar with ECC, sorry if this question is a bit weird/stupid. I'm implementing some protocol using some 3rd party repository (Private Join and Compute), and the repo only supports built-in curves in FIPS modules (P-224, 256, 348 and 512)…
DDD
  • 63
  • 2
6
votes
1 answer

Why does Curve25519 calculate key pair correctly even though its parameters are wrong?

It seems that .NET (Core 3.1) supports custom curves in ECC. So I've defined the Curve25519, and generated key pair by below code: using System; using System.Security.Cryptography; namespace Curve25519 { class Program { static void…
6
votes
2 answers

OpenSSL EdDSA Specify Key Size

I need to generate some keypairs with the ed25519 curve for NodeJS's elliptic module for a project I'm working on. After some searching, a discovered that this can be done with the following command: openssl genpkey -algorithm ed25519 -out…
arctic_hen7
  • 1,344
  • 11
  • 13
6
votes
1 answer

Encrypt AES secret key with Elliptic Curve ElGamal

There is Alice and Bob. I want to realize the following process: Alice encrypts a text with AES and generates a secret key Alice encrypts this secret key with Bobs public key using Elliptic Curves with El Gamal Alice sends the encrypted text &…
6
votes
1 answer

.NET Core 3 unable to load ECC private key

Thanks to Loading an ECC private key in .NET, I'm able to load ECC private keys into .NET Core 3 and performing signature tasks with them. I have, however run into one key that cannot be loaded by ECDSA.ImportPrivateKey. What's weird is that looking…
RasmusW
  • 3,355
  • 3
  • 28
  • 46
6
votes
3 answers

Way to enumerate all elliptic curve names available in Java?

Is there some way to enumerate all of the elliptic curve names that can be given to the ECGenParameterSpec constructor? Or do you have to just throw a big list of curve names at the wall and see which ones do or don't throw execeptions when you try…
Matthew Cline
  • 2,312
  • 1
  • 19
  • 36
6
votes
1 answer

How can you use .NET Core to support Safe Curves in ECC (eg. Curve25519)

It appears that .NET Core supports creation of custom curves in ECC. I've tried to define the Curve25519, as shown below: public class Curves { // TODO: check the key gen rand. public static ECCurve Curve25519 { get { …
Artem
  • 1,000
  • 1
  • 15
  • 30
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
2 answers

Use ecc for encryption in ios

I am trying to implement ecc technique for encryption. I went through the following posts: Shared Secret based on Elliptic curve Diffie–Hellman with CommonCrypto Elliptic Curve Crypto in iOS which doesn't have any satisfactory solutions. Now, I…
6
votes
2 answers

How does one convert a public EC code point and curve name into a PublicKey?

I have two 32 byte long byte arrays representing the X and Y values for an EC Public Key. I know that the curve is the named curve "prime256v1". How can I turn that into a Java PublicKey object? The JCE appears to provide no facilities whatsoever to…
nsayer
  • 16,925
  • 3
  • 33
  • 51