projects
/
BearSSL
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed carry propagation bug in m64 impl for P-256.
[BearSSL]
/
src
/
ec
/
ecdsa_i31_vrfy_raw.c
diff --git
a/src/ec/ecdsa_i31_vrfy_raw.c
b/src/ec/ecdsa_i31_vrfy_raw.c
index
54dcfc2
..
259477f
100644
(file)
--- a/
src/ec/ecdsa_i31_vrfy_raw.c
+++ b/
src/ec/ecdsa_i31_vrfy_raw.c
@@
-47,6
+47,13
@@
br_ecdsa_i31_vrfy_raw(const br_ec_impl *impl,
size_t nlen, rlen, ulen;
uint32_t n0i, res;
size_t nlen, rlen, ulen;
uint32_t n0i, res;
+ /*
+ * If the curve is not supported, then report an error.
+ */
+ if (((impl->supported_curves >> pk->curve) & 1) == 0) {
+ return 0;
+ }
+
/*
* Get the curve parameters (generator and order).
*/
/*
* Get the curve parameters (generator and order).
*/
@@
-137,7
+144,7
@@
br_ecdsa_i31_vrfy_raw(const br_ec_impl *impl,
*/
ulen = cd->generator_len;
memcpy(eU, pk->q, ulen);
*/
ulen = cd->generator_len;
memcpy(eU, pk->q, ulen);
- res = impl->muladd(eU,
cd->generator
, ulen,
+ res = impl->muladd(eU,
NULL
, ulen,
tx, nlen, ty, nlen, cd->curve);
/*
tx, nlen, ty, nlen, cd->curve);
/*