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

Questions tagged [diffie-hellman]

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

4
votes
1answer
744 views

How to solve the Diffie-Hellman problem if $g$ is unknown?

I am trying to solve the Diffie-Hellman problem modulo a composite number $N$, which I have factored. In this question, it was answered how to deal with such a situation. But how can I solve the ...
4
votes
2answers
914 views

Extracting Private Keys in Diffie Hellman

I know that the security of Diffie Hellman Key Exchange depends upon the discrete logarithm problem, but is it possible to extract the private keys if we know more? Say that in addition to modulus ($q$...
3
votes
1answer
225 views

ClientKeyExchange in static DH

I am confused about the content of ClientKeyExchange in case if the key-exchange is static DH. The TLS 1.2 standard says under section 7.4.7 in https://tools.ietf.org/html/rfc5246#page-57: If the ...
5
votes
1answer
634 views

How to use ECDH keypairs algorithm for encryption and decryption same like RSA keypairs without key agreement?

Is it possible to use ECDH key pairs (Public and private keys) for encryption and decryption like RSA key pairs in encryption and decryption. Say for example, if i have RSA key pairs then i could do ...
6
votes
1answer
851 views

Groups for which DDH is easy but CDH is hard

For prime p, is $\mathbb{Z}^{*}_{p}$ a group for which the Decision Diffie-Hellman problem is easy (because one can compute the Legendre symbol of ($g^{ab}$) while CDH is thought to be hard? Of course,...
2
votes
1answer
225 views

where does the prime number taken in DH algorithm in IPSEC

I am studying & configuring IPSEC ikev1 and in between i am analysing the wireshark captures. I am using the linux kernel for TCP/IP stack and user-space i took ipsec-tools. In the first two ...
3
votes
1answer
380 views

What's dh-composite test on badssl.com?

The site badssl.com provides examples of bad (red icon) and good (green icon) uses of TLS for the purpose of testing TLS implementations. I'm a bit confused by the test called dh-composite. This ...
8
votes
1answer
225 views

Bob has an EC key pair. How can he receive a small integer in the least compute intensive way?

Alice wishes to send Bob a number $n$ between 0 and 255. Bob has a private, public EC key pair $(b, B)$ where $B = bG$ and $G$ is an already agreed upon base point on the ed25519 curve. Alice could ...
1
vote
0answers
756 views

Is ECDH(E) Key Exchange FIPS 140-2 compliant?

We have read dozens of documents now - some that contradict each other - and cannot find a solid source of truth. Does FIPS 140-2 compliance allow for the use of elliptic curve cryptography as a key ...
1
vote
1answer
760 views

Decisional Diffie-Hellman assumption vs decisional bilinear Diffie-Hellman assumption

For the Decisional Diffie-Hellman (DDH) assumption we know that: Given $g^a$ and $g^b$ for uniformly and independently chosen $a,b \in Z_p$ the value of $g^{ab}$ looks like a random value in group $\...
1
vote
2answers
274 views

Choosing between additive or multiplicative group for Diffie-Hellman

I am trying to construct a theoretical Diffie-Hellman key exchange protocol. However, i cannot understand the difference between choosing an additive group or a multiplicative group. I believe an ...
1
vote
1answer
373 views

Showing formally that DDH hardness implies CDH hardness

As part of homework problem, I need to show that DDH hardness implies CDH hardness. Assume $CDH$ is hard relative to some group generator. The intuition is pretty clear, so I've made the trivial ...
2
votes
1answer
791 views

Can Elliptic curve Diffie–Hellman (ECDH) shared secret be used as a static encryption key?

I have two parties: Alice who has a static public key PA Bob who has a static public key PB A static shared secret (S) is computed with ECDH. Encryption and MAC keys are computed with a key ...
0
votes
1answer
64 views

Which assumption is stronger (p-BDHI) and DL?

(p-BDHI): p-Bilinear Diffie-Hellman inversion problem Given $P,sP,s^2P,...,s^pP$. Find $e(P,P)^{\frac{1}{s}}$. (DL): discrete logarithm problem Given $P,sP$. Find $s$. To break (p-BDHI), attacker ...
1
vote
1answer
237 views

Curves intended for both signing and key agreement

I need some guidance on elliptic curves that support signing and key agreement. I am trying to develop a protocol for sending encrypted, deniably authenticated messages. To do this I will sign the ...
6
votes
1answer
454 views

What's the difference between DH and DHM?

Is DHM just Diffie-Hellman with Merkle added to the name?
0
votes
1answer
556 views

Using a single key pair for man-in-the-middle attack on Diffie-Hellman

Assume that a man-in-the-middle attack on the Diffie-Hellman key exchange protocol is possible, for which the adversary generates two public–private key pairs for the attack. Could the same attack be ...
0
votes
1answer
729 views

Where are the DH parameters in a Server Exchange Message?

In a Server Key Exchange message, isn't it supposed to send both the public key's parameters which are for DH: the g(generator) and p(modulus), but the message only contains one public key called ...
4
votes
1answer
704 views

In Diffie-Hellman, can everything be sent in plaintext?

I think my limited understanding of DH might be messed up - what's wrong with this scenario? C wants to connect to S. C has an ECDSA public key that it trusts belongs to S. Here's what happens: C ...
2
votes
2answers
4k views

How is session key generated for TLS?

I would like to understand better what happens during establishment of SSL/TLS secure connection. The Client wants to establish a connection - ClientHello The server answers wit a ServerHello. This ...
3
votes
1answer
329 views

Hard discrete logarithm problem

I want to give an introductory talk on Diffie-Helman key exchange. Along the way, I will mention that there exist groups, like $(\mathbb Z/p\mathbb Z)^\times$ for which it is believed that the ...
1
vote
1answer
257 views

DH Key exchange attack: bad choice of g

In the group $\mathbb{F}_p^*$, Bob reads Alice's parameters as $p=234917$ and $g=281$ and uses a secret key $b < 400$ such that $h_b = g^b = 92646$. Note that $p-1 = 2^2\cdot 11\cdot19\cdot281$ $...
1
vote
1answer
275 views

DH Key Exchange Protocol (one-out-of two)

Now given this problem, for part 1) I have solved it as follows, (I hope I am correct). The basic idea is this: I Have two prime numbers g and p and I tell you what they are. You choose a secret ...
12
votes
2answers
25k views

What's the difference between RSA and Diffie-Hellman? [duplicate]

I've been reading on a lot of websites that same thing: RSA is for communication using the public and private key for both the server and client, where Diffie-Hellman is just for exchanging the same ...
-1
votes
1answer
391 views

Computational Diffie-Hellman problem

From here, The Computational Diffie-Hellman problem: Given $y_1 = g^{x_1}$ and $y_2 = g^{x_2}$ (but not $x_1$ and $x_2$), find $y = g^{x_1·x_2}$. What happens if I knew one of the $x_1$, would it ...
1
vote
2answers
245 views

What is 'order' in More Modular Exponential (MODP) Diffie-Hellman groups? [closed]

I am investigating on source code of a program called hostapd. And I am looking into Diffii-Hellman part of it. ...
3
votes
1answer
2k views

ElGamal CPA secure

I understand that if DDH (Decisional Diffie–Hellman) is hard then ElGamal is CPA secure. But I'm having confusion on what part the DDH applies to. So, given $pk=(G, g, y), y=g^x$ and $sk=(pk,x), x \...
3
votes
1answer
886 views

Unsafe prime in DH key exchange

How the use of unsafe prime in DH key exchange makes DH vulnerable to be broken? can anyone explain to me what is safe prime, and what is the difference between safe and strong prime? How the attacker ...
6
votes
1answer
700 views

DDH Assumption Not Holding

Reading about the Decisional Diffie-Hellman on Wikipedia, I came across this section: Importantly, the DDH assumption does not hold in the multiplicative group $\mathbb{Z}^*_p$, where $p$ is prime. ...
3
votes
0answers
216 views

How to modify the Socialist Millionaire Protocol to be symmetric.

In the Socialist Millionaire Protocol, the roles of Alice and Bob are almost symmetric. By this I mean they do almost the same thing, until the very last step. In the final step, both parties check a ...
5
votes
4answers
2k views

Is Elliptic Curve Diffie-Hellman (ECDH) still secure if I use the public key more than one time?

Elliptic Curve Diffie-Hellman (ECDH) with Public parameters: Ep (a,b) and G = (x, y) Private Keys: ...
7
votes
2answers
2k views

what does “export grade” cryptography mean? and how this related to Logjam attack?

I do a research in Logjam attack and I need a help in learning some terms that are new for me. what does "export grade" cryptography mean? and how this related to Logjam attack?
0
votes
1answer
311 views

Diffie-Hellman Key Exchange in $GF(2^5)$

Stuck in a question where the DHKE (Diffie-Hellman key exchange ) is done in the $GF(2^5)$. The irreducible polynomial is $P(x) = x^5+x^2+1$. The $\alpha$ value is $x^2$. If the private keys of $a = 3$...
0
votes
3answers
2k views

Diffie-Hellman “handshake” vs RSA “handshake”

I have a question about exchanging symmetric keys. I have read something about the Diffie-Hellman algorithm, where two parties generate the shared key independently, sharing only some parts of it ...
1
vote
1answer
228 views

Generating Diffie-Hellman parameters

I'm trying to implement a diffie-hellman key exchange in c++, and I'm struggling with my missing understanding of math / group theory. Let's say I found a large prime number p - how can I find a ...
9
votes
2answers
686 views

Is the additive discrete Logarithm problem always easy in Fields?

While thinking about additive DH key exchanges, I somehow had the idea that additive DH key exchange may always be easy to break, if we are in a field. So here's (directly) the question: In any ...
0
votes
1answer
85 views

Parameter $f(x)$ in binary ECDH exchange protocol

In the binary case of Elliptic-Curve-Diffie-Hellman (ECDH) exchange protocol the domain parameters are $T = (m,f(x),a,b,G,n,h)$. What is the meaning of parameter $f(x)$? You may find the definition ...
3
votes
1answer
71 views

Diffie-Hellman protocol: Clarifications

I'm reading the Wikipedia entry where we have Alice and Bob agrees on a prime number, p, and a base, g, in advance. For ...
3
votes
1answer
175 views

Elliptic Curve-based Diffie Hellman: How is the shared key (mnp) calculated?

It's a very quick question, but I couldn't find the answer from the sources I have. I've been coding EC based D-H key exchange, and I'm almost done with it. So here's what I've understood so far. ...
4
votes
1answer
498 views

Diffie-Hellman key exchange using addition instead of multiplication?

I know that the additive finite group $(Zp,+)$ of prime order $p$ when I perform the Diffie-Hellman key exchange (DHKE) protocol is insecure. I didn't however find many sources online explain why it ...
6
votes
1answer
205 views

Time gap between Diffie-Hellman Key Exchange and ElGamal encryption?

I'm looking into the Diffie-Hellman key exchange paper (New Directions in Cryptography, 1976) as part of a series of classic papers in Cryptography for my Ph.D and I was wondering if someone could ...
2
votes
2answers
620 views

ECDHE generates a key pair?

From my understanding of the basic Diffie Hellman scheme, the final result is 1 key that is known to both sides and now can be used for symmetric encryption. From my understanding of ECDHE-RSA scheme ...
0
votes
1answer
98 views

How does the DH algorithm deal with enormous powers?

I am studing DH Key Exchange and trying to implement it. I am using the algorithm as follows: In order to generate the public Key: (Generator ^ Random_Number) mod Prime_Number Generator = 2 Prime ...
4
votes
1answer
86 views

DH Key Exchange

I am trying to implement DH using Python (for tests), and its working for (3 ^ random_number) mod 17 In order to be secure, the prime (in this case, 17) needs to be very long. My question is: ...
1
vote
1answer
209 views

Would this authentication on a Diffie-Hellmann-key-exchanged channel work?

Before I ask my question, let me say that I don't know the math behind OTR, so I don't know if the process of authentication in OTR is any similar to this. Alice and Bob have exchanged keys using ...
1
vote
1answer
155 views

how to calculate surge of cpu cycles consumption of an ipsec tunnel with aes256/sha512/dhgroup21?

The project I'm involved with needs to establish around 2500 simultaneous ipsec connections between roadwarriors clients and the ipsec concentrator/gateway. In order to be able to estimate the ...
4
votes
1answer
863 views

Does perfect forward secrecy (using DH or ECDH) imply quantum resistance?

Does perfect forwarding secrecy, as used for e.g. the DHE_ and ECDHE_ TLS ciphersuites make it impossible for quantum analysis ...
1
vote
1answer
2k views

How to calculate key size for Diffie-Hellman key exchange?

How to calculate key size for Diffie-Hellman key exchange? The strength obviously depends on both generator and prime modulus. Formula: $$g^x\bmod p$$ Public values: $$g=3$$ $$p=...
3
votes
5answers
1k views

For Diffie-Hellman key exchange method, what are examples of very poor a and b values?

For Diffie-Hellman key exchange method, what are examples of very poor $a$ and $b$ values? Given that $g$ and $p$ values are both large prime number and the formula is $$g^{a . b} \bmod p$$
3
votes
1answer
133 views

Random numbers used for ECC Diffie-Hellman

As the first step for generating a secret DH key a uniformly distributed random number $k$ must be generated, which is used to calculate the $k$-th exponent of the basepoint $A$. Depending on the ...