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

Is it secure to use the same SecureRandom for generation of differen KeyPairs?

I'm using ECIES cryptography to send messages over the internet. For this method, a random key is generated for every message. The encryption key depends on this random key. Is it secure to use the same, not reseeded SecureRandom for the generation…
Sibbo
  • 3,796
  • 2
  • 23
  • 41
1
vote
1 answer

ECDSA for Android using SpongyCastle

I've just added SpongyCastle to Eclipse for my Android Project, however I don't seem to be able to find a single good/complete example of how to use ECDSA for encryption & decryption of plain texts. I would imagine this should be a 'hello world' for…
1
vote
0 answers

OpenSSL ECC gf2m modification to apply PCLMULQDQ instruction

I'm trying to modify OpenSSL code in order to use the PCLMULQDQ instruction to accelerate gf2m operations, as described in the Intel white paper Intel Polynomial Multiplication Instruction and Usage for Elliptic Curve Cryptography The paper…
Chiara Hsieh
  • 3,273
  • 23
  • 32
1
vote
2 answers

OpenSSL libcrypto: how does EC_POINT_point2oct() encode its result? Is it portable?

EC_POINT_point2oct(ecGroup,EC_KEY_get0_public_key(key),POINT_CONVERSION_COMPRESSED,_pub._key,sizeof(_pub._key),0) It wouldn't be anything high level like DER, PKCS*, or anything ASN.1. (Would it?) I'm guessing a raw BN containing an EC compressed…
AdamIerymenko
  • 1,299
  • 2
  • 10
  • 19
1
vote
2 answers

ECC Curve Modulus

What is the modulus of an ECC P-256 key? Would it be 32 bytes? I seem to only be able to sign/encrypt a 32 byte data buffer with this key. For RSA, I know that a 1024 bit RSA key has a modulus of 128 bytes. For ECC, I'm confused about what "P"…
ademartini
  • 1,311
  • 1
  • 14
  • 24
1
vote
1 answer

Can't bridge Elliptic Curve Diffie-Hellman with javascript

I know this is a very specific question but I tried to exchange keys between php and a client using the Elliptic Curve Diffie-Hellman algorithm (ECDH) based on 2 libraries that seem sound: https://github.com/mdanter/phpecc for the php part…
centurian
  • 1,168
  • 13
  • 25
1
vote
0 answers

"Wrong format: RAW bytes needed" on trying to encrypt in Elliptic curve crypt

I am trying this code(see CODE below) i got from net for Elliptic curve crypt. and it get this error. i have printed the some extra details in the output. java.security.InvalidKeyException: Wrong format: RAW bytes needed i tried to google for…
Naveen Babu
  • 1,584
  • 1
  • 14
  • 35
1
vote
1 answer

Determine certificate key type (RSA vs EC) in .NET or BouncyCastle?

Currently we have a routine that Signs a byte[] given a certificate (and it's private key). However, the type of certificate/keys is hardcoded as "Certificate with RSA keys". That code is : public byte[] Sign(byte[] bytesToSign, bool fOAEP,…
DeepSpace101
  • 13,110
  • 9
  • 77
  • 127
1
vote
1 answer

Elliptic curve example

I would like to use ECC to sign messages. I trying searching in google, but I was not able to find a commented code to understand how it works. Do you know some documentation that explains not only the mathematical basis, but also how to implement…
Ottavio Campana
  • 4,088
  • 5
  • 31
  • 58
1
vote
2 answers

Convert ECIES ECP CryptoPP to JAVA

I have a 202 byte key and that is used to decrypt a binary file. StringSource keyStr( key, Z3_KEY_LENGTH, true ); AutoSeededRandomPool rng; ECIES::Decryptor ellipticalEnc( keyStr ); unsigned char *tmpBuffer( new unsigned char[ src.Size() ]…
1
vote
1 answer

Elliptic curve and point cardinalities

currently working on generation elliptic curve for ECDSA and met some problems: An elliptic curve: y**2 = x**3 + ax + b (mod p) Point on elliptic curve: G = (Gx, Gy) How to find a cardinality of Elliptic curve? How to find the order of point G on…
ted
  • 5,219
  • 7
  • 36
  • 63
1
vote
1 answer

How to convert public key to BigInteger

I need to convert a public key into a BigInteger. In the code below I have extracted the private key and stored it as BigInteger. But when I followed the same method for the public it is not working. public static void main(String[] args) throws …
user1208304
  • 11
  • 1
  • 4
0
votes
2 answers

how to retrieve value from an object-java

i need to know how to access value of an object..for example in my code ` public static void main(String[] args) throws Exception { Security.addProvider(new BouncyCastleProvider()); BigInteger ZERO=new BigInteger("0"); int c; …
user1208304
  • 11
  • 1
  • 4
0
votes
0 answers

ECDSA function in C not giving the correct signature

I have written this C code for creating an es384 signature with sha 384 which I will base 64 encode and use to create a JWT. But for some reason, the signature is not correct and I have no clue why #include #include #include…
0
votes
0 answers

How to use ECDsa

I'm creating a tool that generates EC key pair. I'm new to the Elliptic Curve Algorithm. I started with this function: public static void GenerateECPublicKey(byte[] p, byte[] g, byte[] a, byte[] b, byte[] x, byte[] y) { byte[] cofactor =…
jmt
  • 1
  • 1