Questions tagged [diffie-hellman]
The Diffie–Hellman key agreement is an anonymous, non-authenticated key-agreement protocol.
277
questions
3
votes
1
answer
185
views
Benefits of the Double Ratchet protocol over the constant Ephemeral DH key exchange
I've been reading lately about the Double Ratchet protocol, how it works conceptually. I understand generally the idea behind the protocol, that it provides Forward Secrecy and Post-Compromise ...
1
vote
1
answer
62
views
Can Fido2 hardware tokens be used for key agreement or Diffie-Hellman?
With Fido2 becoming more popular we see more and more affordable Fido2 hardware security keys on the market.
Can we use those tokens also for establishing a shared secret between two tokens?
I would ...
2
votes
1
answer
44
views
DHE key exchange with p value 257 bytes but a pubkey of 256 bytes
I came across a packet capture in Wireshark where p length = 257 bytes and pubkey length = 256 bytes. See the ServerKeyExchange snip below:
Diffie-Hellman Server Params
p Length: 257
p: ...
5
votes
2
answers
2k
views
Why do I get the error "dh key too small" when the RSA key is 2048 bits?
When I try to connect to the site https://api-mte.itespp.org with OpenSSL (openssl s_client -connect api-mte.itespp.org:443 -brief), it complains that the DH key is too small. But when I analyze its ...
0
votes
1
answer
111
views
Evading authenticated diffie hellman with MITM
I understand that in a non-authenticated Diffie-Hellman setup, a man-in-the-middle attack can occur. Now i'm curious about the feasibility of the following scenario:
Let's assume a situation where www....
0
votes
3
answers
5k
views
How to find the DH prime value (if 1024 or 2048) from Internet?
I have to ensure that the server when communicating on the Internet needs to have DH prime value of 2048 bits or greater.
I can find out the cipher suites that are used but cannot derive the DH ...
4
votes
2
answers
4k
views
How to verify Diffie Hellman uses a "Safe" prime
I'm the developer for a web application that was recently pen tested. One of the vulnerabilities reported from the pen test is that our server uses an unsafe Diffie-Hellman prime in our key exchange. ...
1
vote
0
answers
58
views
What are the ranges of values for DH parameter a and DH parameter b [closed]
I have discovered that Diffie Hellman(DH)shared key is unequal in Apple Numbers, Google Sheets, and Mac Excel (2008).
In Section 1.0, the first try at a solution uses a small Prime to produce certain ...
1
vote
2
answers
103
views
Does saving of ECDHE keypairs to HSM increase security of TLS?
When ephemeral Diffie-Hellman (DHE) is used with TLS, the key-exchange key can/will be discarded after a key-exchange. right?
Is there good reason to use HSM for generating and storing DHE key, when ...
23
votes
2
answers
40k
views
Client-server encryption technique explanation (TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 128 bit keys)
I opened a web page using HTTPS.
When I looked at the page info provided by my Web browser (Firefox) I saw the following:
Connection encrypted: High-grade Encryption
(...
0
votes
1
answer
331
views
Generating AES 256 key from ECDH P-384
Is there anything wrong with hashing(with SHA256) the shared secret generated by ECDH that is 384 bits long and using that as the AES key? Is there a difference between that and, say, truncating the ...
10
votes
4
answers
37k
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 ...
1
vote
0
answers
26
views
Question regarding DH/RSA/Public key cryptography [closed]
Courses giving introduction to cryptography often refer to an example where Alice and Bob need to communicate through an evil postman, and dispose each of a lock, its key and a box in which to send ...
1
vote
1
answer
769
views
What's the use of HMAC or hashing in TLS or SSL inspection
In the Server hello, I got the below Cipher suite
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
Now, I know that we are using DHE for the key exchange, we are using RSA for the authentication, and AES for the ...
1
vote
2
answers
460
views
Command to check a website is vulnerable to Logjam
I am referring this post https://www.openssl.org/blog/blog/2015/05/20/logjam-freak-upcoming-changes/ and trying to see a website is vulnerable to Logjam or not.
I try with www.google.com:443 but I am ...
2
votes
3
answers
1k
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 ...
2
votes
1
answer
1k
views
Why does the OpenVPN server need to keep client's private key?
When I installed the openvpn server following these instructions, the work flow was like below
Create ca.crt
Create server.key and cert
Create client.key and cert
As far as I know, when A and B are ...
-1
votes
1
answer
322
views
What Keys Are Used in TLS 1.3?
In TLS 1.2 the messages sent by client are encrypted under ClientWrite, and the messages send by server are encrypted under ServerWrite.
What about TLS 1.3? I don't see any Pre-Master-Secret being ...
5
votes
2
answers
2k
views
Does changing /etc/ssh/moduli impact previously generated keys?
My company does a lot of automated file transfers over SSH/sftp with banks, etc. A recent SSH upgrade on a server dropped support for the old/weak diffie-hellman-group1-sha1 key exchange protocol in ...
0
votes
0
answers
122
views
Can a secure key-exchange algorithm replace hashing for password authentication?
Over the weekend I was thinking about the problem of scaling various web services. One common practice to scale authorization is to use cryptographically signed tokens. This way when a request comes ...
0
votes
1
answer
456
views
How Could A Diffie Hellman Key Exchange Work on SMS Apps on Two Different Mobile Devices?
How Could A Diffie Hellman Key Exchange Work on SMS Android Apps on Two Different Mobile Devices? It is understandable for a client browser communicating with a server, the internet data path is ...
3
votes
2
answers
2k
views
RSA key exchange
I want to create a message exchange program. These messages are encrypted with the AES key, and this key is encrypted using the RSA algorithm. When I send a message from User 1 to User 2, I need to ...
1
vote
1
answer
2k
views
disabledAlgorithms 'DH keySize < 2048' ignored
I have a JBoss application running on openjdk version "1.8.0_212" where I can influence the security settings via the java.security file. However, using this line:
jdk.tls.disabledAlgorithms=...
0
votes
4
answers
714
views
Why can't we encrypt the message with sender's private key and receiver's public key in case of sending messages through a server?
I read that why do we need E2EE and can't rely only on HTTPS for sending messages through a messaging app. The reason which i understood is when sender sends the message to the server, the TLS ...
2
votes
1
answer
151
views
TLSv1: should DHE be enabled?
I want my web server to be as compatible as possible with old clients, even clients without TLSv1.2 and ECDHE support.
What ciphers should be supported for legacy clients, and in what order should ...
3
votes
2
answers
2k
views
For DHE_RSA_.. Cipher Suites what is RSA used for?
In addition to achieving PFS with DHE, we want as little as possible to be revealed when the server's private key is revealed. So, what is RSA used for in DHE_RSA cipher suites? What does the server ...
1
vote
1
answer
257
views
how are symmetric keys generated in TLS [duplicate]
My confusion stems from reading that TLS handshake uses some kind of Diffie-Hellman, when I was certain that the symmetric key was generated by a digest of earlier packets encrypted with clients ...
5
votes
3
answers
8k
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 ...
109
votes
6
answers
32k
views
Why can't I MitM a Diffie-Hellman key exchange?
After reading the selected answer of "Diffie-Hellman Key Exchange" in plain English 5 times I can't, for the life of me, understand how it protects me from a MitM attack.
Given the ...
0
votes
1
answer
876
views
How can a RSA-2048 certificate be vulnerable to logjam attack? [duplicate]
Most likely I am missing some fundamentals: Our web servers are secured with TLS encryption. We use RSA-2048 bit certificates. The logjam attack targets the DH algorithm. How can our web servers be ...
27
votes
2
answers
26k
views
What is the difference between Diffie Hellman generator 2 and 5?
Generating Diffie Hellman parameters in OpenSSL can be done as follows:
$ openssl dhparam -out dh2048.pem 2048
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a ...
15
votes
1
answer
13k
views
What are the OpenSSL standard Diffie-Hellman parameters (primes)?
I recently generated some custom Diffie-Hellman parameters which are basically just long (in the below case 4096 bit) primes. Those are then used in the key exchange process.
I used the following ...
0
votes
1
answer
718
views
Why is the Diffie-Hellman exchange not enough to authenticate the communication partners in IKE_SA_INIT?
The IKE_SA_INIT does create a key seed SKEYSEED from the Diffie-Hellman values and nonces. Since the exchange does sharing the secret between the communication partners, I do not understand why it is ...
2
votes
3
answers
1k
views
I don't understand TLS 1.3 allowing PSK
TLS 1.3 removes the use of non-ephemeral Diffie-Hellman, which is great! But it still allows PSK.
I'm not as familiar with PSK configuration but wouldn't that mean TLS 1.3 still is allowing the use of ...
1
vote
1
answer
251
views
If Tor does Diffie-Hellman with each node how do they all not know the sender
I'm a bit confused by something regarding Tor. As per what I have read and confirmed in this answer Tor: Is a Diffie-Hellman key exchange being done over recipient of traffic? the client does a DH key ...
5
votes
1
answer
2k
views
How to decrypt Diffie-Hellman encryption in WebRTC?
I have installed a WebRTC server application, which is designed for Contact Center solutions: communicates with internal PCs in pure RTP (agents), and with external PCs (customers) using encrypted ...
8
votes
2
answers
9k
views
Are Telegram secret chats secure assuming MTProto isn't?
For those who don't know: Telegram is a partially open source Whatsapp alternative (Server is closed source) which offers secret chats and normal chats. Secret chats are encrypted with Diffie-Hellman ...
0
votes
0
answers
480
views
IIS Crypto 3.2 not getting rid of Diffie-Hellman algorithms of less than 2048-bits
I'm trying to stop a server using Diffie Hellman key exchanges of less than 2048 bits, but I'm getting confusing results.
I've run
Get-TlsCipherSuite | Format-Table Name, Exchange, Cipher, Hash, ...
6
votes
1
answer
1k
views
Online Diffie-Hellman Tool
I stumbled upon this website which provides a service to generate Diffie-Hellman parameters online for free to the public.
Surely using a website like this would be a bad idea to use in a production ...
4
votes
2
answers
639
views
Why is random DH group recommended over a standard group?
I know in light of logjam there have been recommendations to generate your own DH group (https://weakdh.org/sysadmin.html). It seems to me that leaving this task up to the end user is much more likely ...
1
vote
1
answer
254
views
Tor: How does entry nodes communicate with middle nodes? How does middle nodes communicate with exit nodes?
In Tor, when a client communicates with an entry node, they exchange the parameters such as the prime number and the generator with each other through DH.
What about when an entry node communicating ...
1
vote
2
answers
166
views
Which type of Diffie-Hellman does Tor use?
Does Tor use Ephemeral DH, Static DH or Anonymous DH? I have heard that the latter two are not secure so I am worried if Tor uses them.
1
vote
0
answers
118
views
Diffie Hellman with server public key embedded on the client
First, I realize trying to come up with your own crypto schemes is not a good idea. I'm a relatively new member of a team of developers utilizing such a custom scheme and I'm trying to come up with ...
85
votes
4
answers
56k
views
What is Logjam and how do I prevent it?
I heard there is a "new" TLS vulnerability named Logjam, what does it do and how do I prevent it?
4
votes
1
answer
3k
views
TLS 1.3 RSA key exchange
I have some confusion between the different public and private keys that are used in a TLS 1.3 connection. When a client makes a request to a server, I've always thought that a server's TLS x509 ...
75
votes
2
answers
100k
views
Diffie Hellman parameters still calculating after 24 hours
I have a fresh install of Arch Linux on a RaspberryPi model B. I'm setting up OpenVPN and using easy-rsa with OpenSSL 1.0.2d to generate initial keys and certificates. All went fine until I ran ./...
0
votes
0
answers
106
views
Question about Diffie-Hellman key exchange
It is known that a man-in-the-middle attack on the Diffie-Hellman key exchange protocol in which the adversary generates two public-private key pairs for the attack. Could the same attack be ...
298
votes
11
answers
467k
views
"Diffie-Hellman Key Exchange" in plain English
Can someone explain what the Diffie-Hellman Key Exchange algorithm in plain English? I have read that Twitter has implemented this technology which allows two parties to exchange encrypted messages on ...
56
votes
2
answers
81k
views
Decrypting TLS in Wireshark when using DHE_RSA ciphersuites
How can I decrypt TLS messages when an ephemeral Diffie-Hellman ciphersuite is used? I am able to expose the premaster secret and master secret from the SSL Client. Using that, how to decrypt the ...
0
votes
0
answers
33
views
How does the inclusion of a subprime q value affect the Diffie Hellman equation for key exchange? [duplicate]
This is a follow on from this question:
"Diffie-Hellman Key Exchange" in plain English
In the answer to that question, the standard Diffie Hellman key exchange equation is derived:
(g^a mod ...