Questions tagged [ecdh]
97 questions
1
vote
0 answers
Use micro-ecc generated raw secp256k1 public key in C# to generate a shared secret on the server
I plan to use the micro-ecc C code on my microcontroller-based end unit to create a uECC_secp256k1 public and private keys pair.
When connecting to a C# server, it will receive the server's raw 64-byte public key and send back to the server the end…
![](../../users/profiles/12175680.webp)
David Kaplan
- 11
- 1
1
vote
1 answer
Encryption in swift using Diffie Hellman key exchange and an elliptic curve encryption
I've been trying to encrypt and decrypt a string in swift using a Diffie Hellman key exchange and an elliptic curve encryption.
Following is the code that I followed.
SWIFT Code :
let attributes: [String: Any] = [kSecAttrKeySizeInBits as String:…
![](../../users/profiles/7413163.webp)
user7413163
- 105
- 1
- 2
- 12
1
vote
1 answer
Node.js crypto create ecdh with the tron public address
I am aiming for wallet address encryption, using the TronWeb.createAccount(), I fetch the public address for wallet in base58 and the private key as hex.
Sample Public Address: TPeGpPdJGQoNobV4SEjXLdrjefN3iCAAAA
Sample Private Key:…
![](../../users/profiles/11817386.webp)
Atif Rehman
- 86
- 6
1
vote
1 answer
ECDH + JWE encryption/decryption using jose4j
I am trying to implement ECDH encryption/decryption along with JWE in Android (Java).
I have found the jose4j and Nimbus JOSE libraries that aim to do everything I need but appears that it's more challenging than I thought.
If anybody is familiar…
![](../../users/profiles/246119.webp)
Michael Kessler
- 14,102
- 12
- 45
- 61
1
vote
2 answers
ECDH nodejs and C# key exchange
I've lost my self and I need help to go in the right direction :)
I have nodejs server that have to exchange some critical data with the server that is written in C#, so in that case, I want my data to be encrypted somehow. I was thinking about…
![](../../users/profiles/4796596.webp)
Janso123
- 172
- 8
1
vote
1 answer
do sunpkcs11 supports CK_sensitive attribute for derived key using ECDH
I am trying to generate a shared secret through ECDH using SUNpkcs11 with certain attributes:
CKA_TOKEN= false
CKA_SENSITIVE=true
CKA_EXTRACTABLE=true"
CKA_ENCRYPT=true"
While my base key has CKA_DERIVE, SENSITIVE etc set to true but while doing so…
![](../../users/profiles/10173562.webp)
Zach
- 45
- 5
1
vote
1 answer
how to openSSL 1.1.1 ECDH with 25519
i need to implement ecdh with 25519 using openssl.
using:
key = EC_KEY_new_by_curve_name(NID_X25519)
fails.
using this:
EVP_PKEY *pkey = NULL;
EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(NID_X25519,…
![](../../users/profiles/1235697.webp)
Anton Vainer
- 97
- 9
1
vote
2 answers
Web Crypto API – ECDH - Possible to import private key with only the private key component, without the public key components?
Given a P-256 Elliptical Curve Diffie-Hellman Private Key (which is simply a random 256-bit integer): is it possible to import this private key into a CryptoKey object, using the window.crypto.subtle.importKey() method of the Web Crypto API –…
![](../../users/profiles/7570016.webp)
weaver
- 41
- 3
1
vote
1 answer
Generating ECDH keys using python and secp384 curve in python
private key pairs and I am trying to generate ECDH keys and I am trying to find a python library to help me do that, Can someone help me if there is any python library out there?
![](../../users/profiles/8552794.webp)
Venkata S S K M Chaitanya
- 275
- 1
- 4
- 17
1
vote
0 answers
fips compliant authenticated encryption for ios/swift
I'm looking for fips compliant authenticated encryption. If I understand correctly, there's no support for authenticated encryption out of the box in ios. In that case I suppose I can do AES-CBC + SHA256. I know the latter is supported. Is the…
![](../../users/profiles/4488156.webp)
Zohar Etzioni
- 611
- 5
- 13
1
vote
1 answer
Which order is correct? ECDSA runs before ECDH or after ECDH?
I am confused about the execution order of ECDSA and ECDH, which one runs first ?
Since ECDH can not avoid MITM attach, therefore ECDSA is used to verify the entity. So ECDSA should run before ECDH ?
Or it doens't matter at all?
![](../../users/profiles/369257.webp)
Allan K Liu
- 463
- 1
- 7
- 21
0
votes
0 answers
mbedTLS ECDH Curve25519 and openSSL
i try to learn something about diffie-hellman an elliptic curves... my target is actually to generate a key pair with openSSL on my windows pc, transfer the generated public key to my stm32 target and than calculate the secret with the mbedTLS…
![](../../users/profiles/15746676.webp)
Kill_Switch
- 31
- 2
0
votes
0 answers
Elliptic Curve Cryptography Shared Secret Key Derivation
I am implementing ECDH and wanted to ask how the shared secret that is derived from one's private key and another's public key should be best used.
I got the fact that both parties using this end up with the same secret, which is fine. The secret…
![](../../users/profiles/2695344.webp)
Martin Kersten
- 4,953
- 4
- 36
- 63
0
votes
0 answers
Android Trying to get Public Key from public key byte array: java.lang.IllegalArgumentException: Invalid point encoding 0x30
I am supposed to receive server public key ("ECDH" , "secp256k1") in HEX format, which is uncompressed (65 bytes), generate my own public key in Android which is in X.509format (88 bytes), and then generate a shared secret which must be 32…
![](../../users/profiles/9938652.webp)
Ali Has
- 189
- 3
- 16
0
votes
0 answers
Android generated KeyPair is longer than (server-generated) openssl-generated
To generate an ECDH keypair I have written below code which is the same as server's one which is using open-ssl. But my public key to Hex is like this…
![](../../users/profiles/9938652.webp)
Ali Has
- 189
- 3
- 16