Make sure EC_window_bits_for_scalar_size() returns a size_t
This commit is contained in:
parent
a9cfd20da7
commit
e077b5452f
@ -175,12 +175,13 @@ static signed char *compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len, B
|
|||||||
* (thus the boundaries should be increased)
|
* (thus the boundaries should be increased)
|
||||||
*/
|
*/
|
||||||
#define EC_window_bits_for_scalar_size(b) \
|
#define EC_window_bits_for_scalar_size(b) \
|
||||||
|
((size_t) \
|
||||||
((b) >= 2000 ? 6 : \
|
((b) >= 2000 ? 6 : \
|
||||||
(b) >= 800 ? 5 : \
|
(b) >= 800 ? 5 : \
|
||||||
(b) >= 300 ? 4 : \
|
(b) >= 300 ? 4 : \
|
||||||
(b) >= 70 ? 3 : \
|
(b) >= 70 ? 3 : \
|
||||||
(b) >= 20 ? 2 : \
|
(b) >= 20 ? 2 : \
|
||||||
1)
|
1))
|
||||||
|
|
||||||
/* Compute
|
/* Compute
|
||||||
* \sum scalars[i]*points[i],
|
* \sum scalars[i]*points[i],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user