View | Details | Raw Unified | Return to bug 769 | Differences between
and this patch

Collapse All | Expand All

(-)dh.c (-3 / +3 lines)
Lines 272-289 Link Here
272
/*
272
/*
273
 * Estimates the group order for a Diffie-Hellman group that has an
273
 * Estimates the group order for a Diffie-Hellman group that has an
274
 * attack complexity approximately the same as O(2**bits).  Estimate
274
 * attack complexity approximately the same as O(2**bits).  Estimate
275
 * with:  O(exp(1.9223 * (ln q)^(1/3) (ln ln q)^(2/3)))
275
 * with:  O(exp(1.9223 * (ln q)^(1/3) (ln ln q)^(2/3)))
276
 */
276
 */
277
277
278
int
278
int
279
dh_estimate(int bits)
279
dh_estimate(int bits)
280
{
280
{
281
281
282
	if (bits < 64)
282
	if (bits <= 64)
283
		return (512);	/* O(2**63) */
283
		return (512);	/* O(2**63) */
284
	if (bits < 128)
284
	if (bits <= 128)
285
		return (1024);	/* O(2**86) */
285
		return (1024);	/* O(2**86) */
286
	if (bits < 192)
286
	if (bits <= 192)
287
		return (2048);	/* O(2**116) */
287
		return (2048);	/* O(2**116) */
288
	return (4096);		/* O(2**156) */
288
	return (4096);		/* O(2**156) */
289
}
289
}

Return to bug 769