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.

2
votes
0answers
35 views

How does post quantum key exchange in OpenSSH 8 work?

OpenSSH 8 supports a post quantum KEX, namely sntrup4591761x25519-sha512@tinyssh.org It says in its description that it is basically NTRU + ECC X25519. However, I have tried but cannot understand how ...
0
votes
0answers
26 views

How to exchange a common key to a group of person using Elliptic-curve Diffie–Hellman (ECDH)? [duplicate]

In ECDH, when two persons want to share private keys, they first select a point $G$ on the elliptic curve and after that, each of them picks a random integer $a$ and $b$, respectively, and multiply ...
-1
votes
2answers
46 views

How to find at least one private key from a large list of compressed public keys secp256k1

Not long ago I saw a discussion on the Bitcoin Talk forum: https://bitcointalk.org/index.php?topic=5060735.msg50736695#msg50736695 Please give advice and working methods? Is it possible to find at ...
-5
votes
0answers
45 views

RSA -Diffie-Hellman [on hold]

problem1: The security of the RSA encryption approach relies mainly on the difficulty of the prime factorization of large integer and the difficulty of calculating the Euler Totient function of large ...
1
vote
1answer
31 views

Can I do a forward secure half-round ephemeral-static ECDH?

In the context of the project we are working on recently, we would like to enable users to "leave a message" to someone on the Internet securely. Our setting is as below: ECC key pairs for open ID ...
1
vote
0answers
56 views

If 1 can be a random number in Diffie-Hellman Algorithm

I've done some calculations and Diffie-Hellman Algorithm worked for all chosen random numbers except $1$. In the description of the algorithm, I can't find information that the random number has to be ...
1
vote
0answers
22 views

How does the key agreement process take place in Virgil E3Kit SDK for end to end encryption?

I'm using Virgil E3Kit SDK to implement end-to-end encryption in my App. Their E3Kit SDK is very effective and not too hard to understand, but I still don't understand how does the key agreement ...
2
votes
1answer
59 views

What key is used to encrypt the certificate and certificate verify message in TLS1.3?

Which key is used to encrypt certificate and certificate verify message in TLS1.3? I could not figure out which one it is reading section 4.4.2 of RFC 8846 and I only saw a vague mention on page 11.
0
votes
1answer
39 views

What SALT value will be used in HKDF_EXTRACT in TLS1.3?

What SALT value will be used in HKDF_EXTRACT while generating the Handshake Secret (when there will not be any PSK)?
1
vote
0answers
47 views

How can I compute the theoretical total key-space for 521 bit elliptic curve ECDH private keys?

Assume a dumbed down RSA: the private hey is $3 \times 5 = 15$. $3$ and $5$ are the private key and $15$ is the public key. To brute force it, find the two prime factors of $15$ ($3$ and $5$). Is ...
0
votes
0answers
5 views

Load key “ec256.pem”: invalid format is thrown on trying to generate public key from private key [migrated]

I am trying to generate public/private key pair using ECDSA curve secp256k1 On generating public key from ec256.pem (private key) the following error is thrown "Load key "ec256.pem": invalid format" ...
0
votes
1answer
32 views

How to multiply two Public Keys in Elliptic Curve in Go

I am working on a messaging client similar to Signal. I am stuck on implementing Tripartite Diffie-Hellman handshake in which three DH exchanges are combined to authenticate both parties and produce ...
0
votes
1answer
39 views

Why public key has two parts in my secure messaging client similar to signal

I am working on a Golang code similar to Signal protocol. I need to modify it. I am confused on tripartite Diffie-Hellman handshake part of code, i.e. why public key has two separate parts as compared ...
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: ...
0
votes
0answers
30 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 ...
1
vote
2answers
85 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 ...
2
votes
0answers
32 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 ...
3
votes
2answers
72 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 ...
0
votes
1answer
62 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 ...
1
vote
0answers
43 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 \...
1
vote
1answer
42 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
130 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
58 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 ...
1
vote
0answers
84 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
1answer
71 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 ...
0
votes
0answers
33 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
43 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. ...
-1
votes
1answer
57 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
79 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 ...
0
votes
0answers
63 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?
3
votes
1answer
206 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 ...
1
vote
1answer
100 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
56 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 ...
2
votes
0answers
43 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 ...
1
vote
1answer
102 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\...
2
votes
1answer
72 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 ...
12
votes
2answers
678 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
54 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 ...
0
votes
0answers
36 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
25 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
590 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
0answers
31 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 ...
0
votes
1answer
77 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 ...
1
vote
1answer
87 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?
0
votes
0answers
61 views

Sharing secret content with multiple recipients

I have a sender and N recipients, and am thinking of using the following scheme to send secret content to those recipients. This is similar context to a group chat or email. I am no expert in crypto ...
0
votes
0answers
50 views

Simple but secure method to share secret (128 bit AES key) though an untrusted relay

I am creating an end-to-end encrypted group messenger, and am looking for a way for online members of the chat to a arrive at a shared secret that can be used as a cryptographic key. This will ...
2
votes
1answer
76 views

How to select salt an IKM for HKDF

I have an application where I need to combine a Diffie-Hellman shared secret, with a user's password and derive a key. I'm investigating the possibility of using HKDF to as follows Initial Keying ...
0
votes
0answers
29 views

Diffie-Hellman Groups 20 vs 24 [duplicate]

Which encryption under DH has greater Encryption, it's said that the higher the number in DH the greater the encryption but I would like to verify this further. Does Anyone have inputs on this? or ...
0
votes
0answers
40 views

Discrete Logarithm within DH exchange - finding out A and B secret number [duplicate]

How would i find out Alices or Bobs private number from the details exchanged in public. prime - g = 7 primitive root - n = 3 Alice - A = 3 Bob - B = 4 The details visible in public exchange are: ...