projects
/
BearSSL
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Typo fix in comment.
[BearSSL]
/
src
/
ec
/
ec_prime_i15.c
diff --git
a/src/ec/ec_prime_i15.c
b/src/ec/ec_prime_i15.c
index
bf1d002
..
0f210f2
100644
(file)
--- a/
src/ec/ec_prime_i15.c
+++ b/
src/ec/ec_prime_i15.c
@@
-716,6
+716,14
@@
api_order(int curve, size_t *len)
return cd->order;
}
return cd->order;
}
+static size_t
+api_xoff(int curve, size_t *len)
+{
+ api_generator(curve, len);
+ *len >>= 1;
+ return 1;
+}
+
static uint32_t
api_mul(unsigned char *G, size_t Glen,
const unsigned char *x, size_t xlen, int curve)
static uint32_t
api_mul(unsigned char *G, size_t Glen,
const unsigned char *x, size_t xlen, int curve)
@@
-757,7
+765,7
@@
api_muladd(unsigned char *A, const unsigned char *B, size_t len,
/*
* TODO: see about merging the two ladders. Right now, we do
/*
* TODO: see about merging the two ladders. Right now, we do
- * two independ
a
nt point multiplications, which is a bit
+ * two independ
e
nt point multiplications, which is a bit
* wasteful of CPU resources (but yields short code).
*/
* wasteful of CPU resources (but yields short code).
*/
@@
-805,6
+813,7
@@
const br_ec_impl br_ec_prime_i15 = {
(uint32_t)0x03800000,
&api_generator,
&api_order,
(uint32_t)0x03800000,
&api_generator,
&api_order,
+ &api_xoff,
&api_mul,
&api_mulgen,
&api_muladd
&api_mul,
&api_mulgen,
&api_muladd