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
1answer
23 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
28 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
61 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
54 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
votes
0answers
51 views

Why Diffie-Hellman algorithm can provide secret key exchange? [closed]

Diffie-Hellman algorithm can not provide secure communication, but how can it provide secret key exchange? In general, if Alice want to communicate to Bob by ...
1
vote
2answers
65 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
76 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
19 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
28 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
28 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
63 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
141 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
58 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
77 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
93 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
129 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
26 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
32 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
23 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
40 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
67 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
38 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
63 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
54 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
37 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
138 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
44 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
94 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
49 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
67 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
76 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
68 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
107 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
39 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
459 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
239 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
55 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
70 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
75 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 ...
0
votes
1answer
86 views

Is it safe to use shared secret as a symmetric key in one way communication?

I have a one way communication from one device to another, which needs to be secure and there cannot be any feedback in the other direction. Now both sides happen to have ECC P-256 key pairs and they ...
2
votes
3answers
284 views

Diffie-Hellman algorithm and MITM attack

How does the Diffie-Hellman algorithm prevent MITM attack? I have tried to search about it but i couldn't find any understandable reasons.
2
votes
1answer
97 views

Understanding the Definition of Most Significant Bits in the Hidden Number Problem

Boneh's and Venkatesan's "Hardness of computing the most significant bits of secret keys in Diffie-Hellman and related schemes" defines the Hidden Number Problem (HNP). The HNP shows that computing ...
1
vote
1answer
98 views

ECDH for more than two parties

With classic diffie-hellman it's possible do it with more than two parties. Is this applicable to elliptic curve diffie hellman? I'm guessing not. With ECDH you have a scalar number as the private ...
0
votes
1answer
95 views

How is STS more secure than regular DH

I'm trying to understand the STS protocol (using the wikipedia page as source), but I don't see how this protocol is any more secure than DH regarding man in the middle attacks. If Alice and Bob don'...
1
vote
0answers
34 views

Precise Definition of 1-out-of-2 Oblivious Transfer

What's the precise definition for 1-out-of-2 OT? and what's the best way to show that it can't be achieved under unconditionally secure setting? I am reading about it and just couldn't get my head ...