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.

2
votes
1answer
124 views

The compression of the eliptic curve point coordinates

Some time ago I faced the problem of the unexpected format compression of the points on elliptic curve. I used ECDH procedure with a third party service on the base of the $\mathbb({F}_{2^m})$ curve ...
-2
votes
1answer
47 views

Diffie Hellman Key Exchange Security wrt the hardness of discrete Logarithm

Hi I am very new to this field and I was wondering how one would prove or disprove the following statements: 1) if the DH key exchange protocol is secure for a finite cyclic group G, then computing ...
1
vote
0answers
31 views

GPG encrypt performance degradence for thousands receipients

I plan to use GPG to encrypt a small file (32KB) for very many recipient public keys (few thousands). I tested GPG with RSA and then ECDH public key encryptions. If RSA is very slow, with ECDH (nist ...
1
vote
2answers
235 views

Are there benefits for using Static Diffie-Hellman over Ephemeral Diffie-Hellman?

TL;DR - Are there any benefits to using static DH over ephemeral DH? I'm reading about the differences between static DH & ephemeral DH and I am trying to think of one logical reason to use ...
0
votes
0answers
41 views

What protocols are secure under computational and decisional diffie hellman assumption respectively?

I am new to crypto, and I have read the definitions of Computational Diffie-Hellman(CDH) and Decisional Diffie-Hellman(DDH) assumption, though I tried to figure out the differences between the two ...
2
votes
1answer
135 views

Finding missing bits mathematicaly in a DLP situation (full problem)

In a preparatory question we had to recover decimal digits $@$ of $r$ and $s$ given $g=51234$, $h=90403$, $N=111649$, $r=3@497$, $s=276@3$, with $r$ and $s$ the smallest positive solutions to $g^r\...
2
votes
1answer
99 views

Finding missing bits mathematicaly in a DLP situation

Here is a DLP exercice $g = 51234,\; h = 90403 ,\; N = 311 \cdot 359 = 111649$. Define $r$ as the smallest positive integer with $g^r \equiv h \pmod N$. Define $s$ as the smallest positive integer ...
0
votes
1answer
115 views

Differences between ECIES and DHIES

I'm studying the Integrated Encryption Scheme and I did't understand which are the main differences between ECIES and DHIES. Can someone help me ? Thank you in advance.
3
votes
1answer
143 views

Breaking a small-scale Example Diffie-Hellman?

I started to read about Diffie-Hellman exchange and I encountered a problem which I don't know how to solve. Given $g=3$, $p=131$, $g^x\bmod p=112$, $g^y\bmod p=74$, compute $g^{xy}\bmod p$ $113$ $...
-1
votes
1answer
252 views

ECDH over secp256k1 implementation

I'm using ECDH over secp256k1 in multiple languages, and I saw something a little weird in the rust library I use. After the point multiplication it changes y to <...
0
votes
1answer
84 views

Anything known about this variation of Diffie-Hellman key exchange protocol?

I'm considering a variation of the Diffie-Hellman key exchange protocol based on integer modular multiplication in place of exponentiation. If done naively, that would obviously be insecure, but I'm ...
2
votes
1answer
74 views

Understanding the q-SDH Problem (on elliptic curves)

I have some troubles in understanding the q-SDH problem. The discrete logarithm problem states the following. Given a point P of order on an elliptic curve and a point Q on the same curve. It is hard ...
4
votes
0answers
85 views

Where do the PKs come from in Bluetooth device?

I am studying the Elliptic Curve Diffie-Hellman (ECDH) on Bluetooth 4.2. There are some questions about the PK.. Where do these public and private keys come from? Who defines them? and Will it ...
1
vote
1answer
84 views

prove PRG is secure assuming DDH holds

Let $\Bbb{G}$ be a cyclic group of prime order $q$ generated by $g \in G$. Let $G$ be a PRG defined over $(\Bbb{Z}_q^2, \Bbb{G}^3)$ such that: $G(a, b) = (g^{a}, g^{b}, g^{ab})$ How can I show ...
3
votes
2answers
147 views

Questions about the double ratchet mechanism in Signal

I am trying to understand the threats the double ratchet system is trying to prevent against. The threats mentioned in the paper do not quite make sense to me. May be someone can explain where I am ...
2
votes
2answers
143 views

Does Diffie Hellman guarantee secrecy?

I am studying my Cryptology exam and one question I got stuck below; Recall the Diffie-Hellman key establishment protocol. Alice runs this protocol over the Internet to communicate with Bob. ...
10
votes
1answer
1k views

After ECDH with Curve25519, is it pointless to use anything stronger than AES128?

Is the following reasoning correct: After ECDH with Curve25519, the resulting shared secret will be an EC public key with a bit strength of 128 bits. This public key would then be hashed (let's say ...
2
votes
1answer
96 views

About DDH over cyclic group Z*p^2

To construct a secure multiparty computation function, we need to use the cyclic group G = Z*p^2 with p is a large prime. However, we are uncertain that DDH holds over this group. Can you show that ...
1
vote
2answers
63 views

Let $ALG_2$ be an algorithm that solves the RSA problem, can it solve the generalized Diffie-Hellman problem?

Let $ALG_2$ be an algorithm that solves the RSA problem for all $e\in \mathbb{Z}_n^*$ i.e given $e,m^e,n$ then $ALG_2(e,m^e,n)=m$. Is it possible to use this algorithm to solve the generalized Diffie-...
4
votes
0answers
133 views

Encrypt using ECDH with two different EC public keys, minimizing payload size

Let's say Alice has the private EC keys $a$ and $b$, with a base point of prime order $G$. Alice computes the corresponding public keys $A = aG$ and $B = bG$, and sends them to Bob. Bob now wants to ...
0
votes
2answers
376 views

Why is RSA preferred over Diffie-Hellman if they're both used to establish shared key?

I've read that the RSA algorithm is preferred over Diffie-Hellman key exchange as it makes key management easier. In the context of online banking, before the RSA algorithm they would have to maintain ...
4
votes
1answer
55 views

Lightweight primality certificates for untrusted DH parameters

Are there any light-weight techniques to generate primality certificates for custom Diffie-Hellman parameters that could be sent to the client to allow it to verify primality without needing to run ...
10
votes
2answers
2k views

How do malware rely safely on ECDH algorithm to maintain secrecy of keys?

In traditional malware (especially ransomware) using RSA approach, the public key may be hard-coded in the malware binary and is used to encrypt a symmetric key generated on the system. The symmetric ...
2
votes
0answers
293 views

What ECDSA key is used to sign the ECDHE key exchange?

I have a server using TLS1.2 with an ECDSA certificate using secp256r1. The algorithms being used to connect to my browser are TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 as I expect from my server ...
2
votes
0answers
58 views

Is it secure to encrypt with EC “for myself”? [duplicate]

I want to encrypt some small amount of data using ECDH for use by myself later, but I don't want to generate an ephemeral keypair like in ECIES, due to time and space constraints. Would it be safe to ...
1
vote
1answer
148 views

Example of calculating a primitive root for large prime?

I am trying to figure out how to calculate primitive root $w$ for a prime. Following what I read, I generated my prime to be 'safe prime', $p=qr+1$. I know $q$ (also prime) and $r$. Let's assume, ...
2
votes
1answer
48 views

What should be broken to break a cipher with perfect forward secrecy?

What should be broken to break a cipher with perfect forward secrecy as a passive observer? RSA/EC analog, (EC)DHE or both?
2
votes
0answers
56 views

Are there any one-way operations that could be used for Diffie-Hellman post-quantum? (See criteria)

With quantum-computers looming, there is a need for Public Key Cryptosystems that can withstand attacks by quantum-computers. Are there any known one-way operations that fit the following criteria? ...
1
vote
2answers
1k views

Why is a Diffie-Hellman key exchange required when RSA is already being used for key exchange in TLS?

Specifically with TLS, What is RSA used for during key exchange? What is Diffie-Hellman used for? Since RSA already provides authenticity and confidentiality, why is Diffie-Hellman used during the ...
0
votes
1answer
310 views

Finding the Shared Key In DHKE

I am trying to work out the shared key between Alice and Bob in DHKE equation. The generator is 7 and the Prime P = 71. Bobs private choice of number is 28 and he also receives g ^ A = 70 from Alice. ...
0
votes
1answer
111 views

EL gamal cryptosystem

I have this question which gives me q=71(my prime number) , a=7(generator), Yb=3(public key), m=30(message), c1=59(first cipher text) and he wants me to find c2 (second cipher text) I know that c2 = ...
0
votes
1answer
39 views

Breaking a modified version of Diffie Hellmann Protocol

I'm modifying the Diffie Hellman protocol as follows: We are given a large prime number $p$ and exponent $x$ such that $0 \lt x \lt p-1$ and $\mathrm{gcd}(x, p-1) = 1$. Also we pick $g$ such as $1 \lt ...
3
votes
1answer
146 views

How hard is the following q-Strong Diffie-Hellman problem?

From On the $q$-Strong Diffie-Hellman Problem, the following problem is well-known to be hard. For an randomly chosen element $x \in \mathbb{Z}_p$ and a random generator $g \in \mathbb{G}$, the ...
0
votes
1answer
39 views

A method to receive payments at obscured addresses [closed]

The background: We assume that coin ownership and payments are recorded on a public ledger. Suppose Alice wants to publish some information to let her receive coins from anyone. But she does not want ...
0
votes
2answers
114 views

Does AES-GCM without security tag turn into regular CTR Mode?

We are looking to implement a simple password based key agreement scheme. Part of this is deriving a symmetric key from a common passphrase known to both parties involved. This symmetric key is then ...
1
vote
2answers
742 views

AES encryption using a Diffie-Hellman question

this is something that has always nagged at me and I've wanted to know the answer to. Does AES create it's own shared secret symmetrical key after the DH process has completed? I'm not as familiar ...
0
votes
1answer
198 views

Diffie Hellman vs Three Pass Exchange

Given an insecure channel, what are the pros and cons of using Diffie Hellman to generate a symmetric shared key and then send encrypted data with this key, or simply use Shamir's three-pass protocol ...
0
votes
0answers
29 views

Questions regarding the concept of encrypting a device's USB communication

I'm trying to understand the following two images. They describe the Initialization and authentication process of an embedded device that supports encrypted USB communication. In the first image the ...
4
votes
1answer
130 views

How secure is ECDH if the public keys are never changed?

I have a scenario where I'd like to use Diffie Hellman keys where the public keys are exchanged once and then never changed. So server generates a key pair (secp256k1 or secp256r1) and sends its ...
4
votes
1answer
487 views

Varying ECDH key output on different ECC implementations on the secp256k1 curve

Like the title says, I have used several implementations of ECDH, and I have found a discrepancy with libraries that wrap ...
3
votes
1answer
183 views

difference between the math of RSA problem and DH problem

I'm trying to understand why the RSA problem is not related to the Discrete Log problem, and how breaking the Discrete Log problem does not directly compromise RSA. I will explain my reasoning of why ...
2
votes
1answer
83 views

Supersingular isogeny Diffie–Hellman key exchange (SIDH) Library Support AES-256?

In the version 3.0 of the SIDH library, it implements SIDH/SIKEp503 (AES-128) and SIDH/SIKEp751 (AES-192) only. Are there plans to incorporate AES-256? Nathan Aw
1
vote
1answer
159 views

Diffie Helman key space: 128 bit primes

About the Diffie-Hellman key exchange, I have a question related to the key space, as far as I know the key space is of course all the possible keys to be used, for instance, say that $p$ and $\alpha$ ...
3
votes
0answers
70 views

Assuming the difference between success probabilities to be positive

Context: I am currently studying Theorem 3.1 in the paper Number-Theoretic Constructions of Efficient Pseudo-Random Functions by Naor and Reingold. The theorem basically states the randomized self-...
2
votes
3answers
269 views

Which is better when the secret is leaked, RSA or Diffie-Hellman?

I know that DH can be used for perfect forward secrecy but for the sake of this example, let's say that RSA and Diffie-Hellman are both used to establish a symmetric key that will be used for future ...
0
votes
1answer
353 views

What role does RSA play in DHE_RSA cipher suite?

I've read in this article, that encrypting a premaster key with a RSA public key is not safe from forward secrecy attacks. If an adversary, records all communication between a client and a server. And ...
2
votes
1answer
81 views

Malicious DH parameters without using composite numbers

I know that it's possible to generate DH parameters that lead to it being easy to attack (e.g. trivial composite numbers), but is it possible to create a malicious parameter that is not a composite ...
2
votes
1answer
52 views

Role of long-term asymmetric keys in a forward secrecy instant messaging protocol?

I am trying to understand how forward secrecy works in general, using a simple instant messaging protocol as an example. Tell me if I have this process right or not: 1) Alice and Bob each generate a ...
3
votes
3answers
63 views

Establish more secure symmetric crypto system given A and B have small initial secret

Alice and Bob have a secret number X that is known only to them. However, the number is only 14 bits, and Trudy knows they share such a secret and can intercept messages between them. Instead of using ...
3
votes
0answers
65 views

Distribution of randomness in elliptic curve Diffie-Hellman shared secret

The specification for a project I'm working on says to use elliptic curve Diffie-Hellman for key exchange, specifically using the secp224r1 curve. In the notes it is stated: take the last 16 bytes ...