[Cryptography] Why are Diffie-Hellman key sizes multiples of 64?
Pierre Abbat
phma at bezitopo.org
Sun Jan 25 04:14:56 EST 2026
https://codingtechroom.com/question/understanding-dh-key-size-requirements
As far as I'm aware,
* the operation of the DH protocol depends only on the modulus being prime and
the generator being relatively prime to it and having large order;
* if the modulus is p, the difficulty of breaking DH may depend on the size of
the largest factor of p-1 and the size of the largest factor of p+1, depending
on the attack;
* but there's nothing about the protocol itself that requires the number of
bits in p to be a multiple of anything.
Does this requirement come from the library they're using? I don't see what's
wrong with using a 4184-bit or 4235-bit prime, as long as it's a safe prime,
strong prime, or Fouvry prime.
Pierre
--
loi mintu se ckaji danlu cu jmaji
More information about the cryptography
mailing list