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

How to find a point of an elliptic curve in crypto++ (with given x)? Or how to compute a root in finite field? Or root of Polynomial Ring?

Is there any way in crypto++ to check if an EC contains a point with a given x-coordinate? One solution would be solving the EC polynomial for given x. One side of the equation already done in code. I 'just' need to compute the root of it (over a…
J. Doe
  • 153
  • 6
4
votes
1 answer

How to perform encryption and decryption in java using secp256r1 Elliptical Curve key pair?

We need to perform encryption/decryption of some string message in java using EC key pair. key pair has been generated using secp256r1 Elliptical Curve. We just want to use java core utilities. Encrypting code - in java server side Decryption code -…
prashant sindhu
  • 1,769
  • 2
  • 15
  • 25
4
votes
1 answer

How to decipher the encrypted message using elliptic curve using JavaScript library?

I have found a library about Elliptic Curve Cryptography in JavaScript. I have learned how to encrypt the message. But, I didn't find how to decrypt it to the original message. The code for encryption: var EC = require('elliptic').ec; var ec = new…
ismsm
  • 143
  • 2
  • 11
4
votes
2 answers

How to add elliptic curve points in python?

I'm trying to implement a simple elliptic curve encryption program but I can't get the expected output of doubling and adding a Point P till 12P .The curve equation isy^2 = x^3 +ax + b mod p. According to this site 3P = [10, 6] when P = [5, 1] while…
KMG
  • 1,433
  • 1
  • 8
  • 19
4
votes
0 answers

OpenSSL in FIPS mode: connection error (elliptic curve routines:ec_GFp_simple_oct2point:invalid encoding)

I built OpenSSL 1.0.2p on Windows (64bit) with the FIPS module. I followed the standard build procedure for the FIPS module, then I built the OpenSSL dynamic libraries using a custom procedure based on Scons. At runtime, when I enable the FIPS mode,…
antoniosdc
  • 41
  • 3
4
votes
0 answers

Elliptic Curve Cryptography (ECC) with bouncy castle for asymmetric encryption

I want to use ECC in order to exchange a Session Key for a long-term data transmission. This key exchange should be encrypted using ECC-192bit (curvename: prime192v1). That means that i want to implement an own hybrid encryption model. Therefore i…
Manuel
  • 41
  • 1
  • 1
  • 2
4
votes
2 answers

BouncyCastle C#: How to Implement EllipticCurve Encryption/Decryption

BouncyCastle includes many symmetric encryption engines, as well as RSA and ElGamal encryption engines (asymmetric engines). It also has a lot of online resources about how to use these engines to perform encryption/decryption processes. However, a…
peter bence
  • 782
  • 3
  • 14
  • 34
4
votes
1 answer

Generating Elliptic Curve Private Key in Python with the cryptography library

I am attempting to generate a public/private elliptic curve key pair in python using hazmat in cryptography. Below is the current code that I have. When I run, it is generating the error 'NoneType' object has no attribute…
4
votes
1 answer

Random characters when retrieving private/public KEY (OpenSSL) from file

I am trying to make a program that after it generates a public/private key pair using OppenSSL EC function EC_KEY_generate_key store them in separate files and retrieve them to generate an ECDH KEY. My problem is that although I store them…
balto_n_draco
  • 73
  • 1
  • 5
4
votes
1 answer

ECDH private key size

I know that key sizes in ECDH depend on size of Elliptic Curve. If it is a 256-bit curve (secp256k1), keys will be: Public: 32 bytes * 2 + 1 = 65 (uncompressed) Private: 32 bytes 384-bit curve (secp384r1): Public: 48 bytes * 2 + 1= 97…
4
votes
1 answer

Converting EC PublicKey Hex String to PublicKey

While performing Elliptic Curve cryptography with secp256k1 curve, I noticed that while the code and test cases compile on the Android Studio IDE they do not compile on the android device since the curve isn't defined in the jre/jdk that the mobile…
Sudheesh Singanamalla
  • 2,283
  • 3
  • 19
  • 36
4
votes
1 answer

Encrypting data using elliptic curve encryption in ios/swift

I've been trying to encrypt a string with an elliptic curve encryption using Security swift library, and i'm getting an error on the line with SecKeyCreateEncryptedData(...) : Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0). I…
Dany
  • 339
  • 1
  • 3
  • 15
4
votes
1 answer

What is the difference between EC and ECDSA in the OpenSSL EVP API?

I'm working on a program in which I would like to generate an ECDSA key with OpenSSL's libcrypto EVP API. I found this piece of documentation that deals with this topic. When specifying the key type, there is no EVP_PKEY_ECDSA, only EVP_PKEY_EC. The…
Venemo
  • 18,515
  • 13
  • 84
  • 125
4
votes
2 answers

Android Unable to create EC KeyPair

As noted in the title, I am unable to make the following code produce the ECC keyPair. The Exception is: java.security.InvalidParameterException: unknown key size 571. On the desktop, 571 is the max key size, and I intend to use the max key size on…
theAnonymous
  • 1,701
  • 2
  • 28
  • 62
4
votes
1 answer

How do I load an Elliptic Curve PEM encoded Private Key?

I've generated an elliptic curve private/public key pair using OpenSSL. The private and public keys are PEM encoded. I've figured out how to load the public key thanks to this. However, I can't figure out how to load the private key, as the above…