Lines Matching refs:ABORT

103 #define ABORT do { \
105 fprintf(stderr, "%s:%d: ABORT\n", __FILE__, __LINE__); \
128 if (s == NULL) ABORT;
131 if (!EC_GROUP_get_order(group, s, ctx)) ABORT;
136 if (P == NULL) ABORT;
141 if ((r[i] = BN_new()) == NULL) ABORT;
142 if (!BN_pseudo_rand(r[i], BN_num_bits(s), 0, 0)) ABORT;
145 if ((r0[i] = BN_new()) == NULL) ABORT;
146 if (!BN_pseudo_rand(r0[i], BN_num_bits(s), 0, 0)) ABORT;
156 (type != TIMING_BASE_PT) ? P : NULL, (type != TIMING_BASE_PT) ? r0[i] : NULL, ctx)) ABORT;
212 if (!ctx) ABORT;
218 if (!p || !a || !b) ABORT;
220 if (!BN_hex2bn(&p, "17")) ABORT;
221 if (!BN_hex2bn(&a, "1")) ABORT;
222 if (!BN_hex2bn(&b, "1")) ABORT;
226 if (!group) ABORT;
228 if (!EC_GROUP_set_curve_GFp(group, p, a, b, ctx)) ABORT;
233 if (!tmp) ABORT;
234 if (!EC_GROUP_copy(tmp, group)) ABORT;
239 if (!EC_GROUP_get_curve_GFp(group, p, a, b, ctx)) ABORT;
252 if (!P || !Q || !R) ABORT;
254 if (!EC_POINT_set_to_infinity(group, P)) ABORT;
255 if (!EC_POINT_is_at_infinity(group, P)) ABORT;
258 if (!EC_POINT_oct2point(group, Q, buf, 1, ctx)) ABORT;
260 if (!EC_POINT_add(group, P, P, Q, ctx)) ABORT;
261 if (!EC_POINT_is_at_infinity(group, P)) ABORT;
266 if (!x || !y || !z) ABORT;
268 if (!BN_hex2bn(&x, "D")) ABORT;
269 if (!EC_POINT_set_compressed_coordinates_GFp(group, Q, x, 1, ctx)) ABORT;
272 if (!EC_POINT_get_affine_coordinates_GFp(group, Q, x, y, ctx)) ABORT;
278 ABORT;
285 if (k-- == 0) ABORT;
291 if (!EC_POINT_get_affine_coordinates_GFp(group, P, x, y, ctx)) ABORT;
300 if (!EC_POINT_copy(R, P)) ABORT;
301 if (!EC_POINT_add(group, P, P, Q, ctx)) ABORT;
310 if (!EC_POINTs_make_affine(group, 2, points, ctx)) ABORT;
317 if (!EC_POINT_add(group, P, Q, R, ctx)) ABORT;
318 if (!EC_POINT_is_at_infinity(group, P)) ABORT;
321 if (len == 0) ABORT;
322 if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT;
323 if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT;
328 if (len == 0) ABORT;
329 if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT;
330 if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT;
335 if (len == 0) ABORT;
336 if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT;
337 if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT;
341 if (!EC_POINT_get_Jprojective_coordinates_GFp(group, R, x, y, z, ctx)) ABORT;
350 if (!EC_POINT_invert(group, P, ctx)) ABORT;
351 if (0 != EC_POINT_cmp(group, P, R, ctx)) ABORT;
357 if (!BN_hex2bn(&p, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF")) ABORT;
358 if (1 != BN_is_prime_ex(p, BN_prime_checks, ctx, NULL)) ABORT;
359 if (!BN_hex2bn(&a, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC")) ABORT;
360 if (!BN_hex2bn(&b, "1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45")) ABORT;
361 if (!EC_GROUP_set_curve_GFp(group, p, a, b, ctx)) ABORT;
363 if (!BN_hex2bn(&x, "4A96B5688EF573284664698968C38BB913CBFC82")) ABORT;
364 if (!BN_hex2bn(&y, "23a628553168947d59dcc912042351377ac5fb32")) ABORT;
365 if (!EC_POINT_set_affine_coordinates_GFp(group, P, x, y, ctx)) ABORT;
366 if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT;
367 if (!BN_hex2bn(&z, "0100000000000000000001F4C8F927AED3CA752257")) ABORT;
368 if (!EC_GROUP_set_generator(group, P, z, BN_value_one())) ABORT;
370 if (!EC_POINT_get_affine_coordinates_GFp(group, P, x, y, ctx)) ABORT;
377 if (!BN_hex2bn(&z, "23a628553168947d59dcc912042351377ac5fb32")) ABORT;
378 if (0 != BN_cmp(y, z)) ABORT;
381 if (EC_GROUP_get_degree(group) != 160) ABORT;
386 if (!EC_GROUP_get_order(group, z, ctx)) ABORT;
387 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
388 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
391 if (!EC_GROUP_precompute_mult(group, ctx)) ABORT;
392 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
393 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
396 if (!(P_160 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT;
397 if (!EC_GROUP_copy(P_160, group)) ABORT;
402 if (!BN_hex2bn(&p, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF")) ABORT;
403 if (1 != BN_is_prime_ex(p, BN_prime_checks, ctx, NULL)) ABORT;
404 if (!BN_hex2bn(&a, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC")) ABORT;
405 if (!BN_hex2bn(&b, "64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1")) ABORT;
406 if (!EC_GROUP_set_curve_GFp(group, p, a, b, ctx)) ABORT;
408 if (!BN_hex2bn(&x, "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012")) ABORT;
409 if (!EC_POINT_set_compressed_coordinates_GFp(group, P, x, 1, ctx)) ABORT;
410 if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT;
411 if (!BN_hex2bn(&z, "FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831")) ABORT;
412 if (!EC_GROUP_set_generator(group, P, z, BN_value_one())) ABORT;
414 if (!EC_POINT_get_affine_coordinates_GFp(group, P, x, y, ctx)) ABORT;
421 if (!BN_hex2bn(&z, "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811")) ABORT;
422 if (0 != BN_cmp(y, z)) ABORT;
425 if (EC_GROUP_get_degree(group) != 192) ABORT;
430 if (!EC_GROUP_get_order(group, z, ctx)) ABORT;
431 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
432 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
436 if (!EC_GROUP_precompute_mult(group, ctx)) ABORT;
438 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
439 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
442 if (!(P_192 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT;
443 if (!EC_GROUP_copy(P_192, group)) ABORT;
448 if (!BN_hex2bn(&p, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001")) ABORT;
449 if (1 != BN_is_prime_ex(p, BN_prime_checks, ctx, NULL)) ABORT;
450 if (!BN_hex2bn(&a, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE")) ABORT;
451 if (!BN_hex2bn(&b, "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4")) ABORT;
452 if (!EC_GROUP_set_curve_GFp(group, p, a, b, ctx)) ABORT;
454 if (!BN_hex2bn(&x, "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21")) ABORT;
455 if (!EC_POINT_set_compressed_coordinates_GFp(group, P, x, 0, ctx)) ABORT;
456 if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT;
457 if (!BN_hex2bn(&z, "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D")) ABORT;
458 if (!EC_GROUP_set_generator(group, P, z, BN_value_one())) ABORT;
460 if (!EC_POINT_get_affine_coordinates_GFp(group, P, x, y, ctx)) ABORT;
467 if (!BN_hex2bn(&z, "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34")) ABORT;
468 if (0 != BN_cmp(y, z)) ABORT;
471 if (EC_GROUP_get_degree(group) != 224) ABORT;
476 if (!EC_GROUP_get_order(group, z, ctx)) ABORT;
477 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
478 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
482 if (!EC_GROUP_precompute_mult(group, ctx)) ABORT;
484 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
485 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
488 if (!(P_224 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT;
489 if (!EC_GROUP_copy(P_224, group)) ABORT;
494 if (!BN_hex2bn(&p, "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF")) ABORT;
495 if (1 != BN_is_prime_ex(p, BN_prime_checks, ctx, NULL)) ABORT;
496 if (!BN_hex2bn(&a, "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC")) ABORT;
497 if (!BN_hex2bn(&b, "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B")) ABORT;
498 if (!EC_GROUP_set_curve_GFp(group, p, a, b, ctx)) ABORT;
500 if (!BN_hex2bn(&x, "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296")) ABORT;
501 if (!EC_POINT_set_compressed_coordinates_GFp(group, P, x, 1, ctx)) ABORT;
502 if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT;
504 "84F3B9CAC2FC632551")) ABORT;
505 if (!EC_GROUP_set_generator(group, P, z, BN_value_one())) ABORT;
507 if (!EC_POINT_get_affine_coordinates_GFp(group, P, x, y, ctx)) ABORT;
514 if (!BN_hex2bn(&z, "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5")) ABORT;
515 if (0 != BN_cmp(y, z)) ABORT;
518 if (EC_GROUP_get_degree(group) != 256) ABORT;
523 if (!EC_GROUP_get_order(group, z, ctx)) ABORT;
524 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
525 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
529 if (!EC_GROUP_precompute_mult(group, ctx)) ABORT;
531 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
532 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
535 if (!(P_256 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT;
536 if (!EC_GROUP_copy(P_256, group)) ABORT;
542 "FFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF")) ABORT;
543 if (1 != BN_is_prime_ex(p, BN_prime_checks, ctx, NULL)) ABORT;
545 "FFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC")) ABORT;
547 "120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF")) ABORT;
548 if (!EC_GROUP_set_curve_GFp(group, p, a, b, ctx)) ABORT;
551 "9859F741E082542A385502F25DBF55296C3A545E3872760AB7")) ABORT;
552 if (!EC_POINT_set_compressed_coordinates_GFp(group, P, x, 1, ctx)) ABORT;
553 if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT;
555 "FFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973")) ABORT;
556 if (!EC_GROUP_set_generator(group, P, z, BN_value_one())) ABORT;
558 if (!EC_POINT_get_affine_coordinates_GFp(group, P, x, y, ctx)) ABORT;
566 "7CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F")) ABORT;
567 if (0 != BN_cmp(y, z)) ABORT;
570 if (EC_GROUP_get_degree(group) != 384) ABORT;
575 if (!EC_GROUP_get_order(group, z, ctx)) ABORT;
576 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
577 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
581 if (!EC_GROUP_precompute_mult(group, ctx)) ABORT;
583 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
584 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
587 if (!(P_384 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT;
588 if (!EC_GROUP_copy(P_384, group)) ABORT;
595 "FFFFFFFFFFFFFFFFFFFFFFFFFFFF")) ABORT;
596 if (1 != BN_is_prime_ex(p, BN_prime_checks, ctx, NULL)) ABORT;
599 "FFFFFFFFFFFFFFFFFFFFFFFFFFFC")) ABORT;
602 "DF883D2C34F1EF451FD46B503F00")) ABORT;
603 if (!EC_GROUP_set_curve_GFp(group, p, a, b, ctx)) ABORT;
607 "3C1856A429BF97E7E31C2E5BD66")) ABORT;
608 if (!EC_POINT_set_compressed_coordinates_GFp(group, P, x, 0, ctx)) ABORT;
609 if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT;
612 "C9B8899C47AEBB6FB71E91386409")) ABORT;
613 if (!EC_GROUP_set_generator(group, P, z, BN_value_one())) ABORT;
615 if (!EC_POINT_get_affine_coordinates_GFp(group, P, x, y, ctx)) ABORT;
624 "7086A272C24088BE94769FD16650")) ABORT;
625 if (0 != BN_cmp(y, z)) ABORT;
628 if (EC_GROUP_get_degree(group) != 521) ABORT;
633 if (!EC_GROUP_get_order(group, z, ctx)) ABORT;
634 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
635 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
639 if (!EC_GROUP_precompute_mult(group, ctx)) ABORT;
641 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
642 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
645 if (!(P_521 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT;
646 if (!EC_GROUP_copy(P_521, group)) ABORT;
651 if (!EC_POINT_copy(Q, P)) ABORT;
652 if (EC_POINT_is_at_infinity(group, Q)) ABORT;
653 if (!EC_POINT_dbl(group, P, P, ctx)) ABORT;
654 if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT;
655 if (!EC_POINT_invert(group, Q, ctx)) ABORT; /* P = -2Q */
657 if (!EC_POINT_add(group, R, P, Q, ctx)) ABORT;
658 if (!EC_POINT_add(group, R, R, Q, ctx)) ABORT;
659 if (!EC_POINT_is_at_infinity(group, R)) ABORT; /* R = P + 2Q */
665 if (EC_POINT_is_at_infinity(group, Q)) ABORT;
670 if (!BN_add(y, z, BN_value_one())) ABORT;
671 if (BN_is_odd(y)) ABORT;
672 if (!BN_rshift1(y, y)) ABORT;
680 if (!EC_POINTs_mul(group, P, NULL, 2, points, scalars, ctx)) ABORT;
681 if (!EC_POINTs_mul(group, R, z, 2, points, scalars, ctx)) ABORT;
682 if (0 != EC_POINT_cmp(group, P, R, ctx)) ABORT;
683 if (0 != EC_POINT_cmp(group, R, Q, ctx)) ABORT;
688 if (!BN_pseudo_rand(y, BN_num_bits(y), 0, 0)) ABORT;
689 if (!BN_add(z, z, y)) ABORT;
694 if (!EC_POINTs_mul(group, P, NULL, 2, points, scalars, ctx)) ABORT;
695 if (!EC_POINT_is_at_infinity(group, P)) ABORT;
700 if (!BN_pseudo_rand(x, BN_num_bits(y) - 1, 0, 0)) ABORT;
701 if (!BN_add(z, x, y)) ABORT;
707 if (!EC_POINTs_mul(group, P, NULL, 3, points, scalars, ctx)) ABORT;
708 if (!EC_POINT_is_at_infinity(group, P)) ABORT;
757 if (!BN_hex2bn(&x, _x)) ABORT; \
758 if (!EC_POINT_set_compressed_coordinates_GF2m(group, P, x, _y_bit, ctx)) ABORT; \
759 if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT; \
760 if (!BN_hex2bn(&z, _order)) ABORT; \
761 if (!BN_hex2bn(&cof, _cof)) ABORT; \
762 if (!EC_GROUP_set_generator(group, P, z, cof)) ABORT; \
763 if (!EC_POINT_get_affine_coordinates_GF2m(group, P, x, y, ctx)) ABORT; \
770 if (!BN_hex2bn(&z, _y)) ABORT; \
771 if (0 != BN_cmp(y, z)) ABORT;
774 if (!BN_hex2bn(&x, _x)) ABORT; \
775 if (!BN_hex2bn(&y, _y)) ABORT; \
776 if (!EC_POINT_set_affine_coordinates_GF2m(group, P, x, y, ctx)) ABORT; \
777 if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT; \
778 if (!BN_hex2bn(&z, _order)) ABORT; \
779 if (!BN_hex2bn(&cof, _cof)) ABORT; \
780 if (!EC_GROUP_set_generator(group, P, z, cof)) ABORT; \
789 if (!BN_hex2bn(&p, _p)) ABORT; \
790 if (!BN_hex2bn(&a, _a)) ABORT; \
791 if (!BN_hex2bn(&b, _b)) ABORT; \
792 if (!EC_GROUP_set_curve_GF2m(group, p, a, b, ctx)) ABORT; \
795 if (EC_GROUP_get_degree(group) != _degree) ABORT; \
799 if (!EC_GROUP_get_order(group, z, ctx)) ABORT; \
800 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; \
801 if (!EC_POINT_is_at_infinity(group, Q)) ABORT; \
804 /* if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; */ \
805 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; \
806 if (!EC_POINT_is_at_infinity(group, Q)) ABORT; \
808 if (!(_variable = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT; \
809 if (!EC_GROUP_copy(_variable, group)) ABORT;
826 if (!ctx) ABORT;
832 if (!p || !a || !b) ABORT;
834 if (!BN_hex2bn(&p, "13")) ABORT;
835 if (!BN_hex2bn(&a, "3")) ABORT;
836 if (!BN_hex2bn(&b, "1")) ABORT;
840 if (!group) ABORT;
841 if (!EC_GROUP_set_curve_GF2m(group, p, a, b, ctx)) ABORT;
846 if (!tmp) ABORT;
847 if (!EC_GROUP_copy(tmp, group)) ABORT;
852 if (!EC_GROUP_get_curve_GF2m(group, p, a, b, ctx)) ABORT;
865 if (!P || !Q || !R) ABORT;
867 if (!EC_POINT_set_to_infinity(group, P)) ABORT;
868 if (!EC_POINT_is_at_infinity(group, P)) ABORT;
871 if (!EC_POINT_oct2point(group, Q, buf, 1, ctx)) ABORT;
873 if (!EC_POINT_add(group, P, P, Q, ctx)) ABORT;
874 if (!EC_POINT_is_at_infinity(group, P)) ABORT;
880 if (!x || !y || !z || !cof) ABORT;
882 if (!BN_hex2bn(&x, "6")) ABORT;
885 if (!EC_POINT_set_compressed_coordinates_GF2m(group, Q, x, 1, ctx)) ABORT;
887 if (!BN_hex2bn(&y, "8")) ABORT;
888 if (!EC_POINT_set_affine_coordinates_GF2m(group, Q, x, y, ctx)) ABORT;
894 if (!EC_POINT_get_affine_coordinates_GF2m(group, Q, x, y, ctx)) ABORT;
901 ABORT;
908 if (k-- == 0) ABORT;
914 if (!EC_POINT_get_affine_coordinates_GF2m(group, P, x, y, ctx)) ABORT;
923 if (!EC_POINT_copy(R, P)) ABORT;
924 if (!EC_POINT_add(group, P, P, Q, ctx)) ABORT;
928 if (!EC_POINT_add(group, P, Q, R, ctx)) ABORT;
929 if (!EC_POINT_is_at_infinity(group, P)) ABORT;
934 if (len == 0) ABORT;
935 if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT;
936 if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT;
942 if (len == 0) ABORT;
943 if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT;
944 if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT;
951 if (len == 0) ABORT;
952 if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT;
953 if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT;
960 if (!EC_POINT_invert(group, P, ctx)) ABORT;
961 if (0 != EC_POINT_cmp(group, P, R, ctx)) ABORT;
1126 if (!EC_POINT_copy(Q, P)) ABORT;
1127 if (EC_POINT_is_at_infinity(group, Q)) ABORT;
1128 if (!EC_POINT_dbl(group, P, P, ctx)) ABORT;
1129 if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT;
1130 if (!EC_POINT_invert(group, Q, ctx)) ABORT; /* P = -2Q */
1132 if (!EC_POINT_add(group, R, P, Q, ctx)) ABORT;
1133 if (!EC_POINT_add(group, R, R, Q, ctx)) ABORT;
1134 if (!EC_POINT_is_at_infinity(group, R)) ABORT; /* R = P + 2Q */
1140 if (EC_POINT_is_at_infinity(group, Q)) ABORT;
1145 if (!BN_add(y, z, BN_value_one())) ABORT;
1146 if (BN_is_odd(y)) ABORT;
1147 if (!BN_rshift1(y, y)) ABORT;
1155 if (!EC_POINTs_mul(group, P, NULL, 2, points, scalars, ctx)) ABORT;
1156 if (!EC_POINTs_mul(group, R, z, 2, points, scalars, ctx)) ABORT;
1157 if (0 != EC_POINT_cmp(group, P, R, ctx)) ABORT;
1158 if (0 != EC_POINT_cmp(group, R, Q, ctx)) ABORT;
1163 if (!BN_pseudo_rand(y, BN_num_bits(y), 0, 0)) ABORT;
1164 if (!BN_add(z, z, y)) ABORT;
1169 if (!EC_POINTs_mul(group, P, NULL, 2, points, scalars, ctx)) ABORT;
1170 if (!EC_POINT_is_at_infinity(group, P)) ABORT;
1175 if (!BN_pseudo_rand(x, BN_num_bits(y) - 1, 0, 0)) ABORT;
1176 if (!BN_add(z, x, y)) ABORT;
1182 if (!EC_POINTs_mul(group, P, NULL, 3, points, scalars, ctx)) ABORT;
1183 if (!EC_POINT_is_at_infinity(group, P)) ABORT;