{
if (!field_mul(group, Zb23, Zb23, &b->Z, ctx)) goto end;
if (!field_mul(group, tmp1, &a->Y, Zb23, ctx)) goto end;
+ /* tmp1_ = tmp1 */
}
+ else
+ tmp1_ = &a->Y;
if (!a->Z_is_one)
{
if (!field_mul(group, Za23, Za23, &a->Z, ctx)) goto end;
if (!field_mul(group, tmp2, &b->Y, Za23, ctx)) goto end;
+ /* tmp2_ = tmp2 */
}
- /* tmp1_ and tmp2_ are still ok */
+ else
+ tmp2_ = &b->Y;
/* compare Y_a*Z_b^3 with Y_b*Z_a^3 */
if (BN_cmp(tmp1_, tmp2_) != 0)
b = BN_new();
if (!p || !a || !b) ABORT;
- if (!BN_hex2bn(&p, "D")) ABORT;
- if (!BN_hex2bn(&a, "7")) ABORT;
- if (!BN_hex2bn(&b, "C")) ABORT;
+ if (!BN_hex2bn(&p, "17")) ABORT;
+ if (!BN_hex2bn(&a, "1")) ABORT;
+ if (!BN_hex2bn(&b, "1")) ABORT;
group = EC_GROUP_new(EC_GFp_mont_method());
if (!group) ABORT;
z = BN_new();
if (!x || !y || !z) ABORT;
- if (!BN_hex2bn(&x, "C")) ABORT;
+ if (!BN_hex2bn(&x, "D")) ABORT;
if (!EC_POINT_set_compressed_coordinates_GFp(group, Q, x, 1, ctx)) ABORT;
if (!EC_POINT_is_on_curve(group, Q, ctx))
{