by AnonNo15 · 11y ago · 0 comments
[2] http://security.stackexchange.com/questions/42415/openvpn-dh...
Wrong answer. Standard primes are fine; just avoid the small ones. If you try to select your own parameters you're probably going to pick wrong, either in the sense of breaking the crypto or making people wonder if you selected your parameters to hide a backdoor. The standard large primes (my preferred option is the "group #14" 2048-bit prime) were very obviously not selected maliciously, and there's no way anyone has done the precomputations necessary to index that group.
Is there any known situation in which generating parameters with 'openssl dhparam' will give you broken/weak parameters?
> either in the sense of breaking the crypto or making people wonder if you selected your parameters to hide a backdoor
This is a concern if you're going to distribute your parameters with software, but it could make sense where a sysadmin controls both endpoints, such as a site-to-site VPN.
(a link will suffice)
p = 2^2048 - 2^1984 - 1 + 2^64 * { [2^1918 pi] + 124476 }
The value 124476 is the smallest non-negative value which results in p and (p-1)/2 both being prime and 2 being a quadratic residue mod p; this ensures that the subgroup {2^0, 2^1, 2^2, 2^3, ... } is cyclic.
We assume that the binary expansion of Pi is not selected maliciously. ;-)
> Wrong answer. Standard primes are fine; just avoid the small ones.
Sure, that's what I meant insofar as the out of the box params are apparently too small in many apps/libs. The links I gave cover it pretty well, I think, no?
Do what Colin says upthread.
Nothing that I said was wrong - nor does it contradict Colin's advice - and while simple systems are better, that's a tradeoff that should be made if you care about entities with lots of resources like e.g. the NSA. As history shows, bad parameters (or parameters that are feasibly bruteforced over a particular timeframe) are not an 'unlikely' weakness. Besides, being aware of potential vulnerabilities - especially those that you know pose real threats - and not addressing them is simply bad practice.
I'd prefer Tahoe-LAFS
Why else would you want that if you aren't trying to hide something?