Questions tagged [ecdh]
136 questions
0
votes
0 answers
Get byte array of ECC encryption certificate
I'm using self signed certificate ECDH_secP384r1 for signing token. Here is the PowerShell that I create the certificate:
$Cert = New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname $Certname -NotAfter $ExpireDate…

Saeid
- 13,224
- 32
- 107
- 173
0
votes
2 answers
Signing token with ECC encryption certificate
I'm using self signed certificate ECDH_secP384r1 for signing token.
Here is the PowerShell that I create the certificate:
$Cert = New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname $Certname -NotAfter $ExpireDate…

Saeid
- 13,224
- 32
- 107
- 173
0
votes
1 answer
OpenSSL server public key from buffer to EVP_PKEY
I'm programming a client that partecipates in a TLS 1.2 handshake by sending messages through a TCP socket connected to Google's server. I'm using the ECDH key exchange method.
I am trying to derive the shared secret using this code.
I received the…

Myrrdyn
- 25
- 6
0
votes
1 answer
c# generate key pair using ecdh prime256v1
I'm making private/public key using ecdh
var ecdh = new ECDiffieHellmanCng(CngKey.Create(CngAlgorithm.ECDiffieHellmanP256, null, new CngKeyCreationParameters { ExportPolicy = CngExportPolicies.AllowPlaintextExport }));
var privateKey =…

David
- 4,332
- 13
- 54
- 93
0
votes
0 answers
Ecdh key generation in android
We have an app communicating with ble peripheral for which we have a communication layer ECDH implemented on peripheral so now Android app need to create its own ECDH keypair of 64 bytes length only. How can I create the ECDH key of 64 byes in…

nithin y.n.v
- 158
- 2
- 14
0
votes
1 answer
what is the CngKeyBlobFormat of EccPrivateBlob generated by CngAlgorithm.ECDiffieHellmanP521/P256/P384?
CngKey key = CngKey.Create(CngAlgorithm.ECDiffieHellmanP521, null,
new CngKeyCreationParameters { ExportPolicy = CngExportPolicies.AllowPlaintextExport });
byte[] keyBlob= key.Export(CngKeyBlobFormat.EccPrivateBlob);
the length of keyBlob is…

user12220851
- 31
- 5
0
votes
1 answer
Dart - secret key generation method
I am looking for a dart package in order to implement key exchange protocol (Elliptic-curve Diffie–Hellman) in a Flutter application.
app generates a key pair during login and sends the public key to server (so a new key pair is generated for…

AndyDing
- 1
- 1
0
votes
1 answer
Javascript convert ECDH keys into ECDSA keys
I generate the ECDH keys in this way
let _this = this;
window.crypto.subtle.generateKey(
{
name: "ECDH",
namedCurve: "P-256", // the curve name
},
true, // <== Here if you want it to be exportable !!
…

Vito Lipari
- 795
- 8
- 35
0
votes
1 answer
Derive Shared Secret From ECDH with existing foreign public key
Im converting a method from nodeSJ to Java, but im having trouble getting it to work. Im stuck trying to calculate a derived shared secret.
Hoping someone can catch what im doing wrong porting over the nodeJS to Java.
NodeJS code:
//the…

alexward1230
- 579
- 3
- 8
- 25
0
votes
0 answers
C# bouncy castle DHKdfParameters extraInfo not affect result
I use bouncy castle for using Key Derivation Function for ECDH and AES128-GCM.
So It is my code.
byte[] secretZ = txtEcdhKdfZ.Text.HexToByteArray();
byte[] extraInfo = txtEcdhKdfInfo.Text.HexToByteArray();
ECDHKekGenerator egH = new…

NWOWN
- 399
- 1
- 4
- 17
0
votes
1 answer
How to extract private key from Keystore in hexadecimal format
KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore");
keyStore.load(null);
KeyStore.Entry entry = keyStore.getEntry("ECKey", null);
PrivateKey privateKey = ((KeyStore.PrivateKeyEntry) entry).getPrivateKey();
PublicKey publicKey =…

Suja
- 1
0
votes
3 answers
How do I get ECDH keypair in Android 9.0 pie?
I want to get ECDH keypair (Public key and Private key). This method is not working in Android 9.0 pie, because Security provider "BC" , "SC" is removed from this version. I tried below method
KeyPairGenerator keyGen =…

Dev Tamil
- 629
- 1
- 9
- 25
0
votes
1 answer
Convert this Nodejs Function to C# Function
I have this function in NodeJS and I need some help to convert to C#, my problem is get the 'buf' from randomBytes
NodeJS Function:
function generateKeys() {
return new Promise((resolve, reject) => {
const dh =…

Angelo Bestetti
- 115
- 1
- 8
0
votes
2 answers
Why JsonWebSignature with ECDH encryption algorithm give a different signature everytime?
I want to send a request to google FCM to send a push request to the Browser to show notification.
The main goal is to sign the JWT payload with private key using the ECDH algorithm with SHA256 to get a JWT token.
I try to sign a token with ECDH…

Ridae HAMDANI
- 686
- 2
- 7
- 17
0
votes
0 answers
Computing ECDH (secp256k1) shared secret gives wrong result
I am trying to compute ECDH (secp256k1) shared secret based on private key "5785cb919db4984453826032a411248184536c632096c647f72db4e66a8bd091" and public key…