Questions tagged [diffie-hellman]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
40 views

Trying to understand how the same secret key end up being calculated between Alice and Bob

This is basically a duplicate of this question which was not answered very clearly. From the documentation, these are the calculations that happen for Alice to compute the shared secret key: ...
2
votes
1answer
64 views

Why is there no “ephemeral non-DH EC” key exchange in TLS?

In RSA key exchange, the client picks a premaster secret and encrypts it with the RSA public key in the server certificate, and sends it to the server. This offers no forward secrecy. In ECDHE key ...
0
votes
2answers
32 views

ISAKMP 'master key' PFS (phase I) vs Ipsec session key PFS (Phase II)

A question for the crypto-experts to help out a somewhat confused guy: why does PFS (perfect forward secrecy) also exist in phase II as well as in phase I? Rationale: In phase I ISAKMP, the result ...
2
votes
0answers
21 views

Difference between group key agreement, group key sharing, group key distribution and group key establishement

I am currently doing a survey on group key, and throughout my readings, I stumbled on these different terms: Group Key agreement, Group key Sharing, Group key distribution, and Group key establishment....
9
votes
2answers
2k views

What is largest prime factor in Diffie-Hellman?

I was reading the paper of A Public Key Cryptosystem and a Signature Scheme Based on Discrete Logarithms by TAHER ELGAMAL to better understand ElGamal public-key scheme, and he stated that for any ...
-1
votes
0answers
43 views

Break Diffie-Hellman to obtain secret values

In DH-protocol, given $A(a,g^a\bmod p)$ and $B(b,g^b\bmod p)$; both can achieve a session key which is $g^{ab}\bmod p$. However, with $B$ having $g^{ab}$ and $g^b$, it is possible to obtain the secret ...
1
vote
1answer
61 views

Triple Diffie-Hellman and MITM

While reading about Triple Diffie-Hellman, I was wondering how it can prevent MITM if the server decides to spoof key sets. For example, Alice and Bob are connected using a server. Alice ----- ...
0
votes
1answer
26 views

In the SIKE known answer tests, why is there only one secret key?

I'm looking at the SIKE known answer tests and am realizing that I'm confused on all the different terms in a Diffie-Hellman key exchange. From the Wikipedia page, I would think there would be a ...
0
votes
1answer
34 views

Message space when using the group of QR's for El Gamal Encryption

My textbook states, that the DDH-assumption is not satisfied when we use the group $\mathbb{Z}/p \mathbb{Z}$ and demonstrates an attack using Eulers Criterion. After that, it states that one should ...
1
vote
2answers
70 views

How to convert a Diffie–Hellman key exchange number to work with different encryption algorithms

I just read about Diffie–Hellman key exchange and was wondering how the value created from that can be used for any encryption method. Here is a link of where I read it from.
0
votes
1answer
75 views

Composition of X25519+XSalsa20+Poly1305

In an correct implementation of X25519+XSalsa20+Poly1305, I think I have the right understanding in saying that the Poly1305 message authentication code is a ...
1
vote
2answers
71 views

Secure implementation of public key cryptography

Reading online I've found out that for example the RSA implementation that you usually find on textook is not secure. Where I can find some secure implementation of algorithm such as RSA, ECDH, ECDSA? ...
1
vote
1answer
81 views

DH Key Exchange Protocol

Since I am not able to comment under the topic, I would like to ask here why in question 2 old post, we cannot distinguish the two distributions, even with unlimited computational power? Also, what ...
1
vote
0answers
22 views

attacks and defenses on multi party Diffie-Hellman protocol

I tried to create a 4 partied Diffie-Hellman implementation for 4 people using its cyclic group property. However, I am not sure regarding those 2 issues, and would appreciate if you could elaborate ...
0
votes
0answers
33 views

In a web application where does diffie-hellman key exchange come in (server or client side)?

I am creating a simple student web application for sending messages (client 1 encrypts the message with AES and then sends it over the server to client 2 where the message is decrypted). The problem ...
0
votes
0answers
29 views

Server stored, encypted messaging app

For my personal research, I have to create a messaging app, but security is only important part of application, security from MITM (man in the middle attack), at device end, and at server level. (note:...
0
votes
2answers
64 views

How does Diffie-Hellman apply to strings?

I have been doing a lot of research on Diffie-Hellman, and I understand how Alice and Bob are able to get a shared g^ab using both of their private keys. However, I am unsure about how this can be ...
1
vote
1answer
146 views

Diffie-Hellman key exchange protocol with finite field GF(2^5)

In a Diffie-Hellman key exchange protocol, the system parameters are given as follows: finite field $GF(2^5)$ defined with irreducible polynomial $f(x) = x^5 + x^2 + 1$ and primitive element $\alpha= ...
2
votes
1answer
59 views

At what modulus size does the logjam reduction stage become impractical?

Attacking a Diffie-Hellman exchange with logjam involves a massive precomputation effort once for the group, and then a comparatively simple reduction stage that is necessary to break each individual ...
1
vote
1answer
82 views

Why aren't Diffie Hellman public keys used for authentication?

So I have been reading about Diffie Hellman and specifically the MitM attacks that it is vulnerable to. I am aware that these are solved currently in ssl for instance by using rsa signatures to ...
2
votes
1answer
98 views

How is Diffle Hellman with RSA immune to man in the middle?

Alice and Bob want to exchange keys, Alice sends his half (the public key of the ephemeral key pair) signed with his private key and makes the public key available. Eve is bridging the connection so ...
1
vote
1answer
130 views

Discrete Logarithm: Given a p, what does it mean to find the discrete logarithm of x to base y?

My understanding is that $a^b \bmod p$ is the discrete logarithm problem. Given the question is worded this way, are we trying to find $ \log_y x \bmod p$. For instance, if we are trying to compute ...
0
votes
0answers
27 views

If they exist a relation between decisional Diffie-Hellman assumption and composite decisional residuosity assumption

From the cryptographic hardness assumptions, we have DDH and CDR assumptions. It is known that the composite decisional residuosity assumption is related to a factoring problem, while the DDH is ...
0
votes
1answer
33 views

Should I assume that all exponent syntax in the description of a Diffie-Hellman-based protocol implies modding?

I am examining the SPAKE2+ protocol introduced in Chapter 9 of a paper called The Twin Diffie-Hellman Problem and Applications. I noticing the use of a lot of syntax that looks like exponents. I am ...
0
votes
0answers
25 views

How is Pre Master Secret related to Client.random or Server.random if DH KEX is RSA

For TLS 1.2 cipher Suite AES256-GCM-SHA384, RSA is KEX(key exchagne algorithm). As per standards of RSA Diffie Hellman KEX, after 'ServerHello' message client gets server certificate and it generates ...
1
vote
1answer
48 views

Key-Agreement & Key-Transport for Symmetric Authentication System

Question: I want to know what kind of Master Key sharing process is pursuit on Symmetric encryption environments (strictly symmetric, also in the key sharing scheme). As I am aware there are several ...
4
votes
0answers
72 views

Regarding the need to hash the shared secret in X25519 with the public keys

I was looking at the LibSodium documentation where it says [...] and to mitigate subtle attacks due to the fact many $(p, n)$ [public key - secret scalar] pairs produce the same result, using the ...
1
vote
0answers
45 views

Need help understanding SPAKE2 setup values

I am trying to write a simulation of the SPAKE2 protocol in python (just so I can get a better understanding of the protocol altogether). I am reading through the ietf draft here: Datatracker. There'...
0
votes
0answers
50 views

recommended encryption algorithms to create an encrypted communication application

I have just turned 17 and I have been developing in Java for a few years. Recently I have been interested in a language called rust, I have also been made aware of privacy issues by some of my friends....
0
votes
1answer
82 views

Key exchange and authentication using libhydrogen

I have been able to exchange session keys on two devices using Libhydrogen's Key exchange using the N variant method. I also want to authenticate both devices to have some protection against the Man ...
1
vote
1answer
55 views

Is a Diffie-Hellman scheme in which parties always use the same public keys vulnerable?

I have come across a couple of protocols in which the public keys of the parties are static across conversations, even with different users. Something about this makes my hairs stand on end but I can'...
3
votes
0answers
40 views

Are all MNT curves assumed to hold XDH?

For one of my projects, I need a pairing group which holds the External co-Diffie-Hellman assumption. I am trying to implement it using Charm crypto python modules which provides support for MNT ...
0
votes
1answer
159 views

Diffie-Hellman Key Exchange attack on small secret keys [closed]

The question as the title suggests is based on the key exchange with Diffie-Hellman protocol and is something like this: *"We have intercepted a communication between Alice and Bob: intercepted-...
0
votes
0answers
47 views

How does DHE-RSA work and why is PFS guaranteed?

How does it work and why is forward secrecy guaranteed? I understood that it is not susceptible to a man-in-the-middle attack by using certificates in the beginning.
0
votes
1answer
128 views

No way to do ECDH with OpenSSL from the command line?

I've scoured this website and the OpenSSL wiki pages, and done numerous internet searches, and I've come to the seemingly incredible conclusion that one cannot generate an ECDH shared secret key using ...
0
votes
0answers
59 views

Is product of two DH's OK?

I have my own version of DH. It is basically a product of two DH's. It does provide authentication preventing MITM attacks without signatures but no forward secrecy if the private keys, as well as key ...
1
vote
0answers
58 views

Using ECC CDH test vectors with ECDH when h >1

I am writing formal tests for a system with a number of crypto requirements including support for ECDSA, ECDH and HMAC. The system is required to support the following EC's: NIST curves P-224, 384, ...
3
votes
0answers
68 views

Using (EC)DH to generate a signature

Say I have access to a system A that is limited to performing (EC)DH, followed by key derivation to produce a secret key. This secret key is later used to provide integrity protection. There is a ...
2
votes
2answers
80 views

Is there a key exchange protocol that requires only one message?

Say I want to exchange a secret with someone, but I only get to send one message to the other person, and then we encrypt with that secret. Diffie-Hellman and ECDH require multiple messages to be sent ...
2
votes
2answers
78 views

Is there any problem to reuse the prime p, g and a in Diffie-Hellman?

Suppose I always reuse p, g and a in DH and there is someone monitoring my communication. Is there a way this person can use this to perform some kind of attack to me? I believe that reusing p and g ...
1
vote
1answer
133 views

Station-to-Station protocol questions

Basic Station-to-Station protocol which authenticates Bob and Alice if they safely shared their long-term asymmetric public keys. Alice sends Bob her public key $A_K$ Bob receives $A_K$ and computes ...
0
votes
1answer
41 views

Signing AES Cipher

Alice and Bob have a pre-shared long-term Ed25519 key used for veryfying/signing ephemeral keys. They have a shared key which resulted from the DH exchange. They compute HKDF SHA256 of the shared key ...
6
votes
1answer
476 views

Can multiple public keys lead to the same shared secret in X25519?

I have no mathematical knowledge about this, but I just read in RFC 7748 the following: Designers using these curves should be aware that for each public key, there are several publicly ...
4
votes
2answers
442 views

Is using different public keys for different peers safer than reusing the public key, beyond forward secrecy?

In X25519 (ECDH over Curve25519) Peer A and B exchange their Public Keys ...
1
vote
1answer
290 views

Using ECDH for encryption and decryption [duplicate]

I'm playing with cryptography and its use with typescript on one side and PHP on the other side. Now I'm looking for routines that can encrypt and decrypt with ecdh's private and shared keys. Any ...
0
votes
1answer
57 views

Calculate shared key having A public Key and B private Key (Diffie Hellman)

I cannot understand how this works. $\text{A}_\text{public} = g^a \bmod p$ $\text{B}_\text{private} = \text{B}$ $\text{g} = p$ I also have $p$, I need to get the shared key, that I know both $\...
3
votes
1answer
140 views

Does knowing that the exponent is in a certain range help solving discrete log?

given: $c=g^i \bmod P$ $g$ generator for group with group size $\varphi(P)$ $g,P,\varphi(P)$,c is known by the attacker He wants to know $i$. Now the attacker also knows $j,k$ with $j<i<k$ $k-j$...
2
votes
1answer
71 views

Calculating G for a give cyclic group mod P

For DH key agreement, one must begin with a generator of a cyclic group g. However, intuitively to me at least, it seems that g ...
1
vote
0answers
51 views

Sigma Protocol with Privacy-preserving Discrete Logarithms?

I've been reading up on Sigma Protocols and Fiat-Shamir Heuristic. There is a small problem I see here that is possibly already solved, but I'd like to know if it has a solution. Peggy wants to prove ...
1
vote
2answers
76 views

“Dave Check” for a tweakable P-256 ECDH KDF

I have two devices with hardware tokens that contain P-256 private keys, and which allow me to compute ECDH shared secrets with arbitrary public keys. I need to build a tweakable key derivation ...

1 2 3 4 5 15