Re: code question for dh to kernel v6.5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> at line 373:
>                 n = roundup_pow_of_two(2 * safe_prime->max_strength);
>                 WARN_ON_ONCE(n & ((1u << 6) - 1));
>                 n >>= 6; /* Convert N into units of u64. */

n is the number of 8-byte words at this point and is used as such
to allocate memory.

>>> n is the number of 8-byte words. 8 bytes only needs to right shift 3, not 6.

> at line 444:
>                 /* n is in units of u64, convert to bytes. */
>                 *key_size = n << 3;

This converts n to a number of bytes again.

Helen





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux