projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9a2a89
)
Make sure EC_window_bits_for_scalar_size() returns a size_t
author
Richard Levitte
<levitte@openssl.org>
Wed, 21 May 2003 08:40:06 +0000
(08:40 +0000)
committer
Richard Levitte
<levitte@openssl.org>
Wed, 21 May 2003 08:40:06 +0000
(08:40 +0000)
crypto/ec/ec_mult.c
patch
|
blob
|
history
diff --git
a/crypto/ec/ec_mult.c
b/crypto/ec/ec_mult.c
index c71a69ac0d45676304cb3b0b2ce0e4ee557c4a8e..236b66c18a6be7f747f63cf0361abb1782e1ce76 100644
(file)
--- a/
crypto/ec/ec_mult.c
+++ b/
crypto/ec/ec_mult.c
@@
-307,12
+307,13
@@
static signed char *compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len)
* (thus the boundaries should be increased)
*/
#define EC_window_bits_for_scalar_size(b) \
- ((b) >= 2000 ? 6 : \
- (b) >= 800 ? 5 : \
- (b) >= 300 ? 4 : \
- (b) >= 70 ? 3 : \
- (b) >= 20 ? 2 : \
- 1)
+ ((size_t) \
+ ((b) >= 2000 ? 6 : \
+ (b) >= 800 ? 5 : \
+ (b) >= 300 ? 4 : \
+ (b) >= 70 ? 3 : \
+ (b) >= 20 ? 2 : \
+ 1))
/* Compute
* \sum scalars[i]*points[i],