mirror of https://github.com/wolfSSL/wolfssl.git
comment for clarifying table of DH sizes
parent
9a5ad356a6
commit
cad6a08f10
|
@ -107,8 +107,11 @@ static int GeneratePrivate(DhKey* key, WC_RNG* rng, byte* priv, word32* privSz)
|
||||||
int ret;
|
int ret;
|
||||||
word32 sz = mp_unsigned_bin_size(&key->p);
|
word32 sz = mp_unsigned_bin_size(&key->p);
|
||||||
|
|
||||||
/* predetermined values that operation would return for size */
|
/* Table of predetermined values from the operation
|
||||||
WOLFSSL_DH_ROUND(sz); /* if using fixed points only, than round up */
|
2 * DiscreteLogWorkFactor(sz * WOLFSSL_BIT_SIZE) / WOLFSSL_BIT_SIZE + 1
|
||||||
|
Sizes in table checked against RFC 3526
|
||||||
|
*/
|
||||||
|
WOLFSSL_DH_ROUND(sz); /* if using fixed points only, then round up */
|
||||||
switch (sz) {
|
switch (sz) {
|
||||||
case 128: sz = 21; break;
|
case 128: sz = 21; break;
|
||||||
case 256: sz = 29; break;
|
case 256: sz = 29; break;
|
||||||
|
|
Loading…
Reference in New Issue