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

ECIES encryption and EC key generation in Swift

Backend uses this java implementation for encrypting the data using public key(generated from iOS App in swift), Cipher iesCipher = Cipher.getInstance("ECIESwithAES-CBC"); byte[] derivation = Hex.decode(derivationString); …
Dhaval Panchal
  • 2,529
  • 1
  • 25
  • 36
0
votes
1 answer

Can I customize public key from elliptic-curve package node.js?

this.keyPair = ec.genKeyPair(); I use this line to get the keys, and the public key will be the address, but I want the user to make their own address for private blockchain reasons (address will use the public key that the user made, no random…
0
votes
1 answer

tweetnacl -- What input does nacl.box.keyPair.fromSecretKey expect?

I am little bit confused about the API of tweetnacl. Does the function nacl.box.keyPair.fromSecretKey except the secretKey argument to be already clamped? Or it is it fine to provide a random byte string? The way I read the code, tweetnacl does the…
0
votes
1 answer

How to determine whether base point of secp256k1 (G) lies on curve?

I am doing some research on elliptic curves. If I understood correctly there is a G base point that was set as a large prime point on the curve. As an example, I pick the infamous secp256k1 curve with G. G =…
Simen
  • 13
  • 1
  • 3
0
votes
0 answers

Here how to get those 102,88 value? similar to 9,43?

Public: y^2 = x^3 + 11x + 19 (mod 167) and the point (2,7). ---------(I) Alice and Bob each must randomly select their own secret multipliers. Suppose Alice selects A = 15 and Bob selects B = 22. Then Alice computes A(2,7) = 15(2,7) =…
Tumeng
  • 7
  • 1
  • 3
0
votes
1 answer

JAVA 11 - elliptic curve private key - Caused by: java.security.InvalidKeyException: IOException : version mismatch: (supported: 00, parsed: 01

Small question regarding getting an elliptic curve private key with Java please. I run this command in my terminal: openssl ecparam -name secp256k1 -genkey -noout -out ec-secp256k1-dummy-priv-key.pem This commands is working fine, generating the…
PatPanda
  • 3,644
  • 9
  • 58
  • 154
0
votes
0 answers

ECpoint Scalar multiplication using p256 curve

can anyone explain to me how to doing scalarmulti in curve p256? i currently stuck with this problem cant get new reference for this, only this thread have closest issues same with me about scalar multiplication in java. any library i can use for…
Frozencode
  • 57
  • 2
  • 8
0
votes
0 answers

Are Diffie-Hellman and ECC public key / asymmetric cryptographies?

I have a doubt. In RSA we generate a public key (e,n) and a private key (d,n). and the these keypairs are actually used to encrypt (by public-key) and decrypt (by private-key) the actual data during communication. m^(e*d) = m (mod n) because…
0
votes
0 answers

How to create an EVP_PKEY from a public key (EC) stored in DER format [OpenSSL 3.0]

As the question states, I am unable to load public keys and create an EVP_PKEY from them. Our applications requires ECDH key exchange between an arbitrary number of clients. As ECDH requires the public key of the other participant to be loaded in,…
0
votes
1 answer

How to convert a hex string to a public key in java? (java.security.InvalidKeyException)

I am using EC secp160r2 for key generation. My code looks like this: Security.insertProviderAt(new BouncyCastleProvider(), 1); KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC"); keyGen.initialize(new ECGenParameterSpec("secp160r2"), new…
M.Mark
  • 71
  • 1
  • 6
0
votes
0 answers

Is there a catalog in Java for known Elliptic Curves and their parameters?

I'm writing a PEM file parser and would like to be able to parse EC private keys. I'm having trouble assembling all of the pieces of the EllipticCurve object itself. I need to construct all of the following: The ECField (requires the prime p) The…
Christopher Schultz
  • 20,221
  • 9
  • 60
  • 77
0
votes
0 answers

Getting a chain code for an ed25519 expanded private key

I am trying to generate an expanded private key for ed25519_bip32::XPrv class, but I'm having a problem understanding how to get a 32-byte chain code. I was able to generate a 32-byte secret key and then 64-byte extended secret key using…
Proto Ukr
  • 492
  • 4
  • 13
0
votes
0 answers

Converting a raw Ec key to DER encoded

I have a EC 192 bit key which is in raw format for ex: UHWo9mjrEqDeng4wWTtEgpAUJnvoMzD0ZLMA8Rd777o= however in order to import this to an HSM i have to convert it to DER-encoded key. Is there a way i can achieve this? Thank you in advance.
Zach
  • 35
  • 6
0
votes
1 answer

Why does ECDiffieHellmanP256 work with ECDsaCng.SignData()?

In .NET there are two P256 curve algorithms that can be used with CngKey: CngAlgorithm.ECDiffieHellmanP256 Elliptic Curve Diffie-Hellman (ECDH) key exchange CngAlgorithm.ECDsaP256 Elliptic Curve Digital Signature Algorithm (ECDSA) What confuses me…
gregmac
  • 24,276
  • 10
  • 87
  • 118
0
votes
1 answer

How to programmatically create encrypted PKCS#7 using ECC certificate and OpenSSL in C?

OpenSSL console command to do this is: openssl cms -encrypt -aes-256-cbc -in plain-original.txt -outform der -out encrypted.p7 -recip certificate.pem -keyopt ecdh_kdf_md:sha256 assuming certificate.pem is EC type. I'm trying with CMS_encrypt…