Stack Exchange Network

Stack Exchange network consists of 175 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.

0
votes
0answers
23 views

Prove that a signature scheme is RUF-NMA and not EUF-CMA

I am working on the following exercise: Now, assume the following signature scheme: $\operatorname{KeyGen} (1^k$) : On input of a security parameter $k$, choose a symmetric bilinear group with ...
0
votes
0answers
21 views

EKCDSA Implementation [migrated]

I have two implementations of sign() for EKCDSA, one in Java (on BitBucket) and one in C (on GitHub. Java: ...
4
votes
1answer
203 views

Formal Verification of DHKE protocol using ProVerif

I am new to ProVerif and trying to verify a simple DHKE protocol. The attacker is assumed as passive. The specifications are: The attacker cannot obtains the mutual key. Both participants obtain the ...
0
votes
1answer
49 views

Signal protocol: when, and why, is X3DH run again between the same two users?

This question concerns the Signal protocol's X3DH key agreement protocol as documented here. Obviously, if Alice and Bob have never contacted each other before, they need to run X3DH at least once to ...
1
vote
1answer
230 views

Signal Protocol: What extra features does double ratchet algorithm add to Diffie-Hellman ratchet?

I have been reading the documentation of Signal protocol and could not find out why they came up with double ratchet instead of using Diffie-Hellman ratchet which was available at first place in OTR?
3
votes
1answer
272 views

Signal Double Ratchet - How can Alice send 2+ messages in the beginning of the Signal Protocol?

I'm studying about Signal Protocol and I had a doubt in Double Ratchet Algorithm. This section describes how to derive the receiving and sending key messages. Alice is initialized by Bob public ...
2
votes
3answers
5k 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 with a ServerHello. This ...
1
vote
2answers
57 views

Using Diffie-Hellman secret key to encrypt/decrypt data?

My end goal is to encrypt data with AES-128, send it to other process and decrypt it there. While using DH key exchange protocol. I have used DH to generate a 256 bytes shared secret, but I can't use ...
1
vote
2answers
246 views

Safe and computationally efficient way to verify a curve25519 identity?

A client identifies itself as a curve25519 public key. The server wants to verify the client owns the associated private key. Is there a safe and computationally efficient way of doing so? Which ...
4
votes
1answer
79 views

GPG encrypt performance degradence for thousands receipients [closed]

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 ...
7
votes
3answers
2k views

Vulnerabilities if encrypting the same data with 2 different keys

Let's say that Alice and Bob complete a key exchange and then Alice uses that key k1 to encrypt a 256-bit key kaes1 and sends it ...
2
votes
0answers
27 views

Key confirmation and other benefits of double ratchet

I'm trying to understand a comment from the Signal blog post Advanced cryptographic ratcheting. This article uses the term OTR ratchet to refer to a simple asymmetric DH ratchet, where Alice ...
0
votes
0answers
8 views

Disabling the AES cipher suites without ECDHE key exchange algorithm [migrated]

Currently, we are having below cipher suites used in our platform. AES128-GCM-SHA256 AES128-SHA256 AES128-SHA ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES128-SHA Post ...
1
vote
1answer
81 views

Diffie hellman: fixed modulus a risk?

In DH, are algorithms with fixed modulus p (large safe prime) to be avoided? What if it was changed every x minutes?
3
votes
1answer
183 views

Elgamal with secret key equal to zero possible?

From various sources (e.g. this paper, page 3), the key generation algorithm of Elgamal samples the secret key $x$ from $\mathbb{Z}_q$, which is identifiable to $\{0, 1, 2, \dots, q-1\}$. My ...
0
votes
1answer
60 views

How should one refer to the smallest remainders generated by a modulus within DH or DLP?

It's my understanding that the integer base and exponents chosen to create the initial public keys in DH are from the remainders of a modulus. For example, if the value of the modulus is $N=11$, a ...
3
votes
2answers
63 views

In Diffie-Hellman, are $g$ and $p$ universal constants or are they chosen by one party according to a set of rules?

I can't find any clarity on this. In textbooks, what I'm reading suggests there's already a standardized $g$ and $p$ that everyone uses, but I can't find what they are. The closest I've come to is ...
1
vote
0answers
40 views

Reversing Diffie Hellman from the secret

This is a homework assignment that's been giving me some trouble: By eavesdropping on a Diffie-Hellman key exchange, we observe modulus $p$ the base $3$ $A\ =\ 3^a \bmod p\quad$ and $B\ =\ 3^b \...
-2
votes
0answers
16 views

Calculating s in ECDSA over GF(2m) [migrated]

I tried to calculate s over GF(m) , as integer but it is not working since the integer in vhdl has limit size specially that your working with 2^163 any help ??? thanks
1
vote
1answer
81 views

What happens if we choose the random secret keys in Diffie-Hellman greater than prime?

Diffie-Hellman works as follows: Given public parameters $p$ (a large prime) and $g$ (always referred to as a generator of $(\mathbb{Z}^∗_p)$. Then: Alice randomly chooses $a<p$ and sends $A\...
3
votes
1answer
100 views

Malicious DH parameters without using composite numbers [duplicate]

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 ...
1
vote
1answer
38 views

Diffie-Hellman: Recommendation of the base size?

Based upon choosing a prime $p$ of recommended length and $N=2p+1$, where $N$ is also prime, and $a^2$ is not congruent to $1 \pmod N$, and $a^p ≡ 1 \pmod N$, I believe you can rely upon $a$ as having ...
-1
votes
1answer
95 views

Can Shamir’s Trick crack the cryptographic strength of ECDSA?

Recently stumbled upon a discussion in the forum "MyMathForum" What is Shamir’s Trick used for? Are there any such examples?
2
votes
1answer
55 views

If DDH is hard then CCA-secure PKES exist?

My cryptography slides describe several relations between cryptographic problems. I don't still have a good justification on the following: If decisional Diffie-Hellman problem is hard then there ...
3
votes
1answer
104 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 ...
6
votes
1answer
122 views

Is it possible to generate backdoored DH parameters?

I know it has been already asked and answered whether it's possible to generate weak DH parameters. But "recentely" we experienced the Logjam attack, which makes use of the pre-computation ...
1
vote
0answers
50 views

Which 'info' and 'salt' parameters to use in HKDF for TLS 1.3?

all the following discussion is for HKDF in TLS1.3: Regarding the 'salt' parameter in - HKDF-Extract(salt, IKM) as written in RFC 5869: HKDF without having to protect the secrecy of the salt. In ...
0
votes
0answers
31 views

What are some potential applications of trilinear mappings?

In "Applications of Multilinear Forms to Cryptography" Boneh and Silverberg give "one-round n-way Diffie-Hellman key exchange protocol" as a potential application of n-multilinear mappings. If we ...
1
vote
0answers
41 views

Reason for including the public key of the key agreement in the KDF

I found the following text when looking up KDFs: In comparison, the so-called DHAES mode in IEEE 1363a mandates to use the binary representation of the sender’s public key as an input parameter. ...
2
votes
1answer
56 views

What should I use for consequent AES key derivation?

I am writing a small chat program to explore some methods and concepts in cryptography and currently I am using a shared AES key tunneled with RSA which upon further reading revealed many flaws both ...
-1
votes
1answer
54 views

Equivalence of cryptographic problems

Are integer factorization, discrete log and ECDH problems equivalent? I know that factorization and discrete log are equivalent but are one of those two problem equivalent with ECDH? Cand someone ...
3
votes
1answer
163 views

Diffie-Hellman private key recover with non-prime modulus

Say we have a classic Diffie-Hellman key exchange. We have the following parameters of a public key: p,g,y Where $p$ is the modulus, $g$ is the base, $y$ is the ...
3
votes
1answer
64 views

In NIST modulus and key size recommendations is `group` equivalent to modulus and `key` equivalent to exponent?

Looking at the following NIST recommendations for a discrete logarithm, for 2016-2030 and beyond they list 3072-bit number for the group and 256-bit for the ...
1
vote
2answers
203 views

If my server utilises an RSA based certificate, why does firefox think I am using Diffie Hellman?

I am not a beginner in crypto, but not that far from it, so please be gentle. I look after a web server app that I generated the SSL certificate for, and I used an RSA public/private keypair. When ...
0
votes
0answers
59 views

Is RSA in decline across the board?

From what I gather from the internet (source), the recommended practice for 2019 and beyond is to avoid RSA and use ECDH and ECDSA. Is this the general case?
6
votes
3answers
411 views

Supersingular Isogeny Key Exchange broken?

Found this report detailing a quantum algorithm for computing isogenies between supersingular elliptic curves. http://cacr.uwaterloo.ca/techreports/2014/cacr2014-24.pdf with the quote "...
14
votes
2answers
4k views

What is a ratchet?

while reading Whatsapp's Security Whitepaper I found the term "ratchet". What does it mean in cryptography? The Message Key is derived from a sender’s Chain Key that “ratchets” forward with every ...
1
vote
1answer
83 views

Is it safe to send IV in plain text for every request?

Currently, I am creating a project with an IoT device. This is an offline device which shows a QR code which can be scanned by a mobile device, which sends this code to a server. The server handles ...
1
vote
0answers
54 views

Brute force against custom algorithm [closed]

In my free time, I write an algorithm for fun (and it may be the best hobby I had so far). Currently, the output this algorithm produces is indistinguishable. I ran multiple analysis process and ...
3
votes
2answers
1k views

Are developers expected to implement Diffie-Hellman key exchange themselves?

I noticed that the GO standard library has some really nice functions for performing AES encryption / decryption in various modes. However, I couldn't (yet) find anything for Diffie-Hellman key ...
2
votes
0answers
35 views

Precomputation attacks against ECDH

Diffie-Hellman groups are vulnerable to sieving precomputation attacks. These attacks allow a one-time computation against a given DH modulus that makes it practical to attack all subsequent key ...
12
votes
2answers
664 views

What motivated the creation of RSA and ECDH?

Recently I've been learning about cryptography and so far I am loving it. However, there are some things I do not comprehend. As far as I know, RSA was published in 1979 while New Directions on ...
1
vote
1answer
45 views

Diffie hellman small shared secret

Is there a way to prevent the shared secret to be a small value (eg 4) to avoid easily succeeding brute force attacks? In $g^a \bmod p$, I understand that choosing $p$ not a multiple of $g^a$ is a ...
2
votes
1answer
50 views

Protocol that generates keys every 2 minutes using KDC

I am using a Key Distributed Center (KDC) and a key distribution protocol such as Kerberos. In order to limit the amount of ciphertext produced with the same key, I want to renew the session keys ...
33
votes
2answers
20k views

ECDSA vs ECIES vs ECDH

Recently I started studying Elliptic Curve Cryptography and I just loved it. I want to transfer some big data (like 3KB), What is the best method, ECDSA, ECIES, or ECDH (and why)? I am confused, how ...
0
votes
0answers
34 views

Most energy-efficient authentication protocol?

I am looking for a cryptographic protocol that is as energy-efficient as possible. I am talking about battery drain. Alice wants to do a mutual authentication with Bob. Maybe symmetric is good, maybe ...
0
votes
0answers
21 views

How to decrypt plain text x using man in the middle attack

Suppose Alice want to share a plain text $x = 5$ to Bob; using RSA, DHKE, and El-Gamal. My question is if Man-in-the-middle attack is applied then weather oscar can compute/decrypt plain text in all ...
7
votes
1answer
577 views

Which properties of a group are used in the steps of Diffie Hellman?

I’m trying to understand which properties of a group are used in DHKE at each step. For example, Alice and Bob’s public keys appear to only use the closure property of a group and maybe identity (e....
0
votes
1answer
72 views

Multiplication instead of Key Derivation Function?

context In a one message communication. We are right after 2 DHKE (instead of one). Both users then have 2 secret numbers, J and K. question Is it a risk to replace the use of a Key Derivation ...
0
votes
0answers
28 views

Burmester Desmedt confused on the last step

I try to implement in code the traditional burmester desmedt algorithm for group key agreement: But I have the following question regarding the last step: $K=k_{i-1}^{nx_i}K_i^{n-1}K_i+1^{n-2}\dots ...