Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [diffie-hellman]

Diffie-Hellman is a method for establishing a shared secret that can be used as a cryptographic key.

2
votes
1answer
25 views

ECDH and static key encryption

It's been a while and I'm still trying to figure out if my understanding of ECC crypto is correct. Basically from what I understood a purely asymmetric encryption is never used. Usually the ...
0
votes
0answers
33 views

Diffie-Hellman Group 25, and 26? [migrated]

Looking here: https://www.sonicwall.com/en-us/support/knowledge-base/180427163815045 It appears that our firewall supports DH group 25, and 26. Almost everywhere I've seen, they've recommended DH ...
1
vote
2answers
116 views

How to optimize the diffie hellman key exchange algorithm

I am making a chat feature in my app where I want to encrypt it E2EE, but the problem is when I start to calculate the public key (public key = g^private % n) it takes a decade to get it done. I need ...
3
votes
1answer
60 views

BouncyCastle and Microsoft Cng ECDH secret key mismatch

I'm trying to refactor some client-side code from BouncyCastle to Microsoft Cng. I've figured out how to convert key format(ECC key blobs) between them, but I couldn't calculate the same secret. ...
1
vote
0answers
73 views

Why Diffie-Hellman instead of just share the secret [duplicate]

I read that D-H is used to make a shared secret between parties that then they use to encrypt the messages. This is used in TLS, for example, after the server has authenticated itself with a ...
1
vote
1answer
86 views

Signal Protocol: How is identity exchanged if a key exchange hasn't happened yet?

On Signal's blog they mention that keys for accessing your profile are exchanged normally with your contacts using the Signal Protocol just like messages are (implying they are already contacts and ...
2
votes
0answers
63 views

WPA technical doubts (3)

This is the third post about the set of doubts that came up when I tried to understand WPA3. I am new to this world of cyber-security so every bit of help is welcome! Someone told me that in WPA2 ...
1
vote
1answer
53 views

Different Diffie–Hellman key per site?

I recently put each of my sites through the ssl labs analyzer and now have them all running with an A+ getting perfect scores with every metric except Key Exchange at 90. As part of this I have ...
1
vote
0answers
44 views

Advantage Of ECDH-RSA over RSA Ciphersuites In TLS

If ECDH-RSA is used for key exchange, this is what happens: The server has its public ECDH parameter embedded within its certificate. The client generates its public ECDH parameter, extracts the ...
2
votes
2answers
131 views

Diffie-Hellman protocol CA, confusing

In the Diffie-Hellman protocol, if the participants have their own private key and a generated public key. How can we determine whether or not they have a trusted CA for authentication or just the ...
0
votes
1answer
159 views

understanding MITM attack [duplicate]

hi Everyone please correct me if im wrong for my understanding for the man in the middle attack used in a variant of diffie hellman key exchange . am i right to say that a protocol is susceptible to ...
0
votes
1answer
101 views

Why use a separate key exchange method like DH during the TLS handshake [duplicate]

Ok first off I'm very familiar with the TLS handshake, the purpose of PKI and key exchange methods. My question is why use a complicated key exchange method like Diffie Hellman when the client could ...
3
votes
2answers
407 views

Is server public key and Diffie Hellman public are the same?

I am trying to understand the working of TLS. I understand that there are various way to generate the master secret used to encrypting the data. Such as DH (Ephemeral DHE) and RSA. I understand that, ...
1
vote
1answer
461 views

diffie-hellman size 2048 and key with size 1024

I want to increase the security of my Tomcat and to configure diffie-hellman module size 2048. I want to add to my CATALINA_OPTS -Djdk.tls.ephemeralDHKeySize=2048 What happens if I have configured it ...
1
vote
0answers
73 views

Diffie-Hellman in Android File Transfer application [closed]

I'm working on the famous android app to transfer files using WiFi-Direct technology: https://github.com/Miserlou/Android-SDK-Samples/tree/master/WiFiDirectDemo I want to implement a key exchange ...
3
votes
1answer
859 views

How can disabling Diffie-Hellman cipher for packet inspection be secure?

I have noticed that a number of network packet monitoring tools on the market today seem to have roughly the same recommended configuration parameters as described below: Disable Diffie Hellman in ...
1
vote
1answer
64 views

Exchange of public keys with DHE-RSA

The paper "Imperfect Forward Secrecy: How Diffie-Hellman Fails in Practice" by Adrian et al claims that the NSA might be able to eavesdrop on a large percentage of TLS connections, because they ...
1
vote
0answers
131 views

How to perform a MITM attack on SSH exploiting the Diffie Hellman key exchange

I have an open-ended project for a class and I picked to make a tool/use existing tools and applications to exploit the Diffie-Hellman key exchange to be able to inject, modify and delete messages ...
1
vote
1answer
1k views

Is Diffie–Hellman key exchange protocol vulnerable to man in the middle attack?

Diffie–Hellman key exchange protocol vulnerable to man in the middle attack? If yes, then what type of MITM is that? I believe that is a replay attack or a relay attack, not sure though.
3
votes
1answer
916 views

Setup Wireshark to decrypt TLS_DHE

I have a passively sniffed traffic dump of client/server were packets are encrypted with cipher suite Cipher Suite: TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (0x009e) With a Logjam attack I managed to ...
0
votes
1answer
90 views

Does LoraWan protocol's Over The Air Activation run Diffie Hellman?

I am looking at the LoraWan protocol specification and I want to capture the over the air activation of a device. So far I have seen the: https://zakelijkforum.kpn.com/lora-forum-16/over-the-air-...
0
votes
2answers
269 views

OpenSSL Base64 output has wrong length

I try to generate an ECDH P-256 key pair as required for web push messages. openssl ecparam -name prime256v1 -genkey -noout -out priv_key.pem ... generates the keys. openssl ec -noout -text -in ...
9
votes
1answer
504 views

Why does TLS 1.3 deprecate custom DHE groups?

According to the second draft of the TLS 1.3 specification, custom DH groups have been deprecated. As we all know, hardcoded DH groups are vulnerable to a precomputation attack that allows retroactive ...
2
votes
1answer
122 views

RSA relation to SSH key exchange

I do not fully understand SSH. I was hoping someone could fix my confusion. When you generate an ssh key pair, you create four files. authorized_keys, id_rsa, id_rsa.pub and known_hosts My ...
0
votes
1answer
228 views

Limitations of TLS Inspection when using Diffie-Hellman

It is my understanding that TLS Inspection can be carried out of two different ways: 1st Approach: Using a proxy server which negotiates TLS with both ends. In this scenario, there would be 2 ...
0
votes
1answer
46 views

Visual verification of DH parameter hashes vs derived password hashes

Let us assume the following: Alice and Bob are performing Diffie-Hellman key exchange over an unprotected channel. Eve is an active attacker (capable of dropping, modifying and constructing packets on ...
2
votes
1answer
158 views

How can one guarantee that a Diffie-Hellman initial key exchange is not stored? [duplicate]

I might have missed parts of the technicality when it comes to the initial state of the key exchange. However, If I'm not wrong, if the initial key exchange is done over an insecure channel, how can ...
0
votes
1answer
104 views

Diffie Hellman master secret TLS1.2

I have been trying to calculate the master secret used to encrypt some data using the client public key B, the server private key a and the client and server random values. I have calculated k=B^a, ...
2
votes
1answer
297 views

Limit on modulus lines in OpenSSH /etc/ssh/moduli file?

I understand that OpenSSH server looks in /etc/ssh/moduli and picks a modulus at random for each Diffie-Hellman group exchange. What I am wondering is whether there is a practical limit on how many ...
3
votes
0answers
221 views

Diffie Hellman Pre Master Secret too long

As far as I understood, when using Diffie Hellman, the pre master secret is generated as follows: Alice and Bob agree on a generator g and a prime p Alice chooses a primary key a, calculates A = g^a ...
1
vote
1answer
269 views

What's the usage of the signature algorithm in TLS_DH_* cipher suites?

According to RFC5246 A.5 there are cipher suites TLS_DH_RSA_* and TLS_DH_DSS_*. How / where does the signature algorithm RSA resp. DSA from the cipher suite come into play when using (non-ephermal) ...
0
votes
1answer
383 views

Possible MITM attacks on ECDH-RSA or ECDHE-RSA prevents

As I understood a simplified ECDH-RSA key exchange protocol works like below Alice request Bob for its ECDH public key Bob generates ECDH parameters and sign them with a CA provided RSA certificate. ...
1
vote
1answer
230 views

TLS - DHE_DSS: How does client know public DSS-server key?

I wonder where the public server key g^x for DSS authentication is communicated to the client when a DHE_DSS cipher suite is used in TLS 1.2. Precisely: A DSS certificate contains crypto parameters (...
7
votes
1answer
7k views

Diffie Hellman Group Matching to IPSec Encryption Algorithm

I'm looking for help determining acceptable Diffie Hellman (DH) Groups for specific IPSec IKE and ESP Encryption Algorithms. The goal is to choose DH groups that provide adequate protection for the ...
5
votes
1answer
267 views

Online Diffe-Hellman Tool

So I stumbled upon this website which provides a service to generate Diffe-Hellman paramaters online for free to the public. Surely using a website like this would be a bad idea to use in a ...
0
votes
1answer
186 views

Why send HMAC in reverse direction when performing verified DH with downgrade protection?

The purpose of this procedure is that Alice and Bob perform a verified Diffie-Hellman key exchange. It goes like this: Alice sends her supported signature schemes to Bob. It just says "supported ...
2
votes
1answer
593 views

Will changing the TLS Diffie-Hellman key exchange bit length from 1024 to 2048 cause client/browser compatibility issues?

Recently discovered the need to upgrade our DH key exchange length (used for TLS) from 1024 bits to 2048 bits (due to Logjam exploit and other factors). The question is: How will making that change ...
0
votes
1answer
96 views

What's the point of the second SA exchange in the Create_Child_SA exchange in IPsec

I have problems understanding why you would negotiate crypto-algorithms in the Create_Child_SA request in a IKEv2. During IKE_SA_INIT you negotiate cryptographic algorithms which I assume (correct me ...
-1
votes
1answer
951 views

How likely is that my ECDHE-RSA-AES256-GCM-SHA384 application will be cracked? [closed]

I am using the following chain in my cipher: ECDHE-RSA-AES256-GCM-SHA384 I am wondering if there's a weak chain in this cipher that might allow my application's communications to be cracked? I'm new ...
3
votes
2answers
4k views

Why is the reuse of the Elliptic curve Diffie–Hellman (ECDH) public server param considered bad?

When reviewing the SSL/TLS configuration using Qualys SSL Labs, I've found that the reuse of the Elliptic curve Diffie–Hellman (ECDH) public server param was flagged. Why is the reuse of the Elliptic ...
1
vote
1answer
469 views

Key exchange during IKE_AUTH phase of IKEv2

This is what a casual IKEv2 handshake looks like : Initiator Responder | ...
3
votes
1answer
399 views

What is the meaning of KEX DH host key and KEX DH H signature in SSH key exchange

During the Diffie-Hellman key exchange, the server sends a Diffie-Hellman Key Exchange Reply (31) message back to the client. This message contains the DH server f but also two other pieces of ...
0
votes
1answer
95 views

Logjam definition question

As I understand it, the Logjam TLS attack is an attack that downgrades the DHE cipher suite used by the server to DHE_EXPORT. Where the client thinks it is talking DHE 512 and the server things it's ...
1
vote
1answer
33 views

Secure application data

I have a private client/server application that trying to secure the data transmitted through public network. The encryption/decryption method is private too. Client and server uses DH key exchange ...
10
votes
1answer
4k views

When exactly is Diffie-Hellman used in TLS?

I'm aware that Diffie-Hellman is a key exchange algorithm whereas RSA is an asymmetric encryption algorithm. I have the following questions: During TLS handshake, will both RSA and DH be used? (I ...
1
vote
0answers
192 views

Is ECDH easier than DH to be broken?

As I am a security newbie, this post might have lots of misconceptions about security. If so, please let me know I've heard that ECDH is preferable to DH because its smaller key size and lower ...
0
votes
1answer
305 views

Are public/private keys needed when using Diffie-Hellman with TLS

When using RSA for key exchange in TLS, the role of the public key embedded in the certificate is clear: for asymmetric encryption when sending the master key, which the server can decode using its ...
2
votes
0answers
76 views

Is this a correct DH key exchange over RSA wirelessly?

Note: I am a network researcher, but a security newbie. Hence, this post may contain wrong understanding of security including DH and RSA. If it does, please let me know it. I've designed a certain ...
2
votes
0answers
423 views

SSH wireshark trace and Diffie-Hellman G and P parameters

I have a problem spotting both "DH base (G)" and "DH modulus (P)" in my sshv2 trace. I scrutinized each message exchanged between both my ssh client and the ssh server, there is no trace of "DH base (...
1
vote
2answers
66 views

Generating partical Eliptic Curve Diffie-Hellman keys [closed]

I want to generate a pair of ECDH keys (64 bytes each), where the first 12 bytes of the public key will suit my format. For example, if I have a unique sequence "13456789ABC" I'd like to use it as ...