jacobian P;
cc = id_to_curve(curve);
+ if (Glen != cc->point_len) {
+ return 0;
+ }
r = point_decode(&P, G, Glen, cc);
point_mul(&P, x, xlen, cc);
- if (Glen == cc->point_len) {
- point_encode(G, &P, cc);
- }
+ point_encode(G, &P, cc);
return r;
}
*/
cc = id_to_curve(curve);
+ if (len != cc->point_len) {
+ return 0;
+ }
r = point_decode(&P, A, len, cc);
if (B == NULL) {
size_t Glen;