Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [diffie-hellman]

The Diffie–Hellman key agreement is an anonymous, non-authenticated key-agreement protocol.

Filter by
Sorted by
Tagged with
1 vote
0 answers
61 views

Minimizing trust assumptions in Messaging Protocols

As I was listening to an interview yesterday, the journalist claimed that his Signal communications were being spied on by the NSA. Whether to believe him or not is subjective. Still, it is an ...
enricobottazzi's user avatar
5 votes
1 answer
525 views

Why do you need random number for ECDH shared key computation

Let's assume that authentication with certificates has been well performed, next step is to generate short-term private&public ECC keys for ECDH shared key computation. Alice: Generates keyA with ...
unalignedmemoryaccess's user avatar
0 votes
1 answer
251 views

Why does the Public Key Info field in an X509 certificate for EC indicate the algorithm

The Subject Public Key Info field can have a value like ECDSA_P256 or ECDH_P256 when ECC is used. Why is it not sufficient to specify "ECC_P256"? In other words, why is it not enough to ...
Lemon Sky's user avatar
  • 175
3 votes
1 answer
290 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 ...
cliffroot's user avatar
  • 133
2 votes
1 answer
108 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: ...
ayivaak's user avatar
  • 23
5 votes
2 answers
6k 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 ...
geckels1's user avatar
  • 153
1 vote
2 answers
193 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....
SempriGno's user avatar
2 votes
2 answers
128 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 ...
Steffen Vogel's user avatar
1 vote
0 answers
123 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 ...
Simple.Simon's user avatar
1 vote
2 answers
154 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 ...
SKi's user avatar
  • 303
0 votes
1 answer
484 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 ...
Ognjen Bjeletic's user avatar
1 vote
0 answers
63 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 ...
greg27's user avatar
  • 19
2 votes
1 answer
1k 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 ...
Shashank Kumar's user avatar
3 votes
1 answer
2k 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 ...
Hardguy's user avatar
  • 33
-1 votes
1 answer
488 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 ...
dan's user avatar
  • 19
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=...
Bdot42's user avatar
  • 13
2 votes
1 answer
222 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 ...
edo1's user avatar
  • 141
0 votes
0 answers
654 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, ...
Mick8695's user avatar
  • 101
1 vote
1 answer
334 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 ...
Gaai Chia's user avatar
1 vote
2 answers
220 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.
Gaai Chia's user avatar
1 vote
0 answers
186 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 ...
user4520's user avatar
  • 1,037
4 votes
1 answer
5k 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 ...
Joe J's user avatar
  • 143
1 vote
1 answer
311 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 ...
Chris Owen's user avatar
0 votes
0 answers
137 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 ...
김신웅's user avatar
2 votes
3 answers
2k 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 ...
HeadphoneHaxZ's user avatar
0 votes
0 answers
35 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 ...
factor2's user avatar
0 votes
1 answer
185 views

Is this scenario of static ECDH public key exchange right?

I'm thinking about the way to build encryption mechanism for 'peer-2-peer' communication. This is a mechanism I had a thought of: Alice wants to communicate with Bob First of all, Alice and Bob must ...
Big50000's user avatar
1 vote
0 answers
275 views

Key generation between Tiny-C-ECDH and cryptography.hazmat.primitives.asymmetric.ec [closed]

I have two systems, one running a C environment on a RTOS and another a python program running on a Pi. I need to generate an encryption key using ECDH between these two systems for symmetric ...
vijit's user avatar
  • 11
0 votes
0 answers
429 views

ESP32: Secure WiFi credentials via WebCrypto?

Background information: I am not a computer scientist. However, in a research project I am currently building a ESP32-based sensor. Multiple sensors of this type are going to be used by multiple users....
reg.cs's user avatar
  • 101
0 votes
1 answer
599 views

In Diffie-Hellman, why is the shared secret guaranteed to be the same? [duplicate]

In general, I understand the principle of Diffie-Hellman key exchange. What I don't understand is what is so fundamental about primitive roots modulo p that guarantees that the shared secret is the ...
michael b's user avatar
  • 113
1 vote
2 answers
1k views

Cracking diffie-hellman public key to obtain shared key

I'm given 2 prime numbers, g and n, as well 2 public keys, ga mod n and gb mod n, as part of a leaked Diffie hellman key exchange. I need to derive the shared key gab mod n using the given information....
AnzioElane's user avatar
1 vote
1 answer
5k views

Explain the three versions of Diffie-Hellman used in SSL/TLS

I understand how Diffie-Hellman algorithm can be used to agree on a common key between a client and server. I am struggling to understand the three variations of Diffie_Hellman - Anonymous Diffie-...
RKA's user avatar
  • 113
0 votes
1 answer
4k views

Diffie–Hellman key exchange in TLS 1.3

I am reading about the Diffie–Hellman key exchange in TLS 1.3. So the first step here is that the two parts Alice and Bob t agree on a large prime p and a nonzero integer g modulo p. Then Alice and ...
loutsi1's user avatar
  • 51
0 votes
0 answers
420 views

symmetric key generation in TLS 1.3

Am trying to understand the phase where the symmetric key is getting generating. From what I am understanding Diffie-Hellman is used to derive the symmetric key in TLS1.3 I am reading this tls ...
loutsi1's user avatar
  • 51
0 votes
1 answer
685 views

How to generate ffdhe from rfc7919

Everyone recommends to use the pre-defined ffdhe groups from https://www.rfc-editor.org/rfc/rfc7919 There are multiple sources (for example mozilla) where I can download the DH PARAMETERS file but how ...
Hannes's user avatar
  • 103
2 votes
0 answers
430 views

What will be the key size for rsa, ecdhe and ecdsa from the cipher suite given?

From the cipher suites tls_rsa_with_aes_128_cbc_sha256 and tls_ecdhe_ecdsa_with_aes_128_cbc_sha256 how do I know what will be the RSA , ECDHE, and ECDSA key support in IBM cloud Watson? here is the ...
wanglen soram's user avatar
0 votes
1 answer
157 views

How to use another SSL certificate for DHE-RSA while I already have one with domain?

I'm working in IOT team to build a web based IOT system. I'm using Dataplicity's Wormhole to host my nodeJS app on raspberry pi. I want to use DHE-RSA symmetric key encryption channel for sending/...
RAKTIM BANERJEE's user avatar
0 votes
0 answers
150 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 ...
stevendesu's user avatar
0 votes
0 answers
190 views

how to encrypt and decrypt messages with more than one sender and more than one receiver?

I am creating a chat app. This app contains private messages and channels. These channels include more than one user. I want to encrypt messages using AES and to transfer the AES key to users of this ...
HUS.97's user avatar
  • 41
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 ...
HUS.97's user avatar
  • 41
1 vote
1 answer
907 views

Diffie Hellman implementation- NodeJS

Diffie Hellman is a key exchange algorithm where client and server both generate public and private key, exchange their public key and combine this key with his own private key to generate same secret ...
RAKTIM BANERJEE's user avatar
0 votes
4 answers
756 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 ...
shiwang's user avatar
  • 103
0 votes
1 answer
2k views

Performance comparison between ed25519 vs AES

I found that AES has dedicated hardware on most machines. The question is can we use ed25519 to replace AES? Instead of using RSA to encrypt the AES key and then encrypt the data with AES, can we just ...
Vasantha Ganesh's user avatar
0 votes
0 answers
317 views

how to send prime and generator of diffie hell-men to client over network node js?

I am using crypto module of node js for exchanging key using diffie-hellman algorithm. server.js const crypto = require("crypto"); const alice = crypto.createDiffieHellman(512); const aliceKey = ...
Devarsh Mavani's user avatar
0 votes
1 answer
136 views

Intercepting messeges in attacks on authentication protocols

I've recently read about Diffie-Hellman Man-in-the-Middle attack when a third party can intercept messages and thus construt two different symetric keys with both sides. However I still don't ...
chendoy's user avatar
  • 103
1 vote
2 answers
337 views

Which algorithm is used to combine a key between client and server?

I read a lot of Q&A here, and read a lot of articles about RSA and Diffie-Hellman, but it seems like they are all saying opposite things about the question: When I start an HTTPS session in a ...
Incognitex's user avatar
0 votes
1 answer
4k views

How to decrypt Diffie-Hellman in wireshark?

How can i decrypt Diffie-hellman TCP packets? I'm trying to make a tool that shows cleartext response from a server that uses this encryption. However when i look online people all seem to say it's ...
ZedPython's user avatar
  • 339
1 vote
3 answers
817 views

Do I need an ECDSA SSL certificate to use Diffie–Hellman key exchange method?

I cannot quite understand the role of Diffie–Hellman key exchange. Does RSA SSL certificate work with the Diffie–Hellman key exchange or is it only used with an ECDSA certificate? When is Diffie–...
t7e's user avatar
  • 127
1 vote
1 answer
3k views

ECDH_SHA2_NISTP256 (KEX) Algorithm in SSH - Vulnerabilities?

My organization within my company uses this KEX Algorithm in our SSH Implementation. Another organization within my company won't connect to our servers as long as this algorithm is implemented as ...
Drew's user avatar
  • 67
0 votes
0 answers
167 views

In which sense is Perfect Forward Secrecy perfect? [duplicate]

Wikipedia states that Perfect Forward Secrecy "is a feature of specific key agreement protocols that gives assurances that session keys will not be compromised even if the private key of the server is ...
leo's user avatar
  • 103

1
2 3 4 5 6