1

I understand how Diffie-Hellman key-exchange works. Mainly, two parties agrees in a prime $p$ and a generator $g$. Then one party selects its private exponenet $x$, computes its public value $g^x \bmod p$. Then, sends it to the second party. The second party chooses a private exponent $y$, then, computes its public value, $g^y \bmod p$ and sends it to the first party. Then, both parties, compute $g^{xy}$ which is the shared secret.

However, in some protocols descriptions, like TLS 1.3, I find them say the client sends "hello message includes Diffie-Hellman public values for the client's preferred groups". What is "group" refers to??

doughgle
  • 103
  • 6
user2192774
  • 211
  • 1
  • 5

1 Answers1

6

However, in some protocols descriptions, like TLS 1.3, I find them say the client sends "hello message includes Diffie-Hellman public values for the client's preferred groups". What is "group" refers to??

The term group is a mathematical concept that guarantees that a specific operation doesn't leave a set, that it is associative, that there is a neutral element and that there's an inverse element for each element.

Diffie-Hellman generally operates in such groups.
Just view it like this: Your set is defined by $p$, e.g. for all integers $x$ in the group $0\leq x <p$. You then take an element $g$ from it and apply the group operation (multiplication modulo $p$) a certain number of times to it (whatever your exponent tells you).

Now every choice of $p$ describes its own group and additionally you can choose groups with an entirely different structure such as the points of elliptic curves over prime fields (which makes this ECDH)

SEJPM
  • 45,967
  • 7
  • 99
  • 205
  • Zp* (or Zn*) excludes 0, and you can't pick just any g: it must generate a subgroup of sufficiently large and nonsmooth order, usually by construction (e.g. 'safe' prime p=2q+1 p and q both prime, then any g whose order isn't 2 is q) – dave_thompson_085 Jul 18 '16 at 03:32
  • 1
    actually, you do not need a group, A semigroup will be sufficient. –  Jul 18 '16 at 16:53