| 4605 | } |
| 4606 | |
| 4607 | static void ecmult_const_random_mult(void) { |
| 4608 | /* random starting point A (on the curve) */ |
| 4609 | secp256k1_ge a = SECP256K1_GE_CONST( |
| 4610 | 0x6d986544, 0x57ff52b8, 0xcf1b8126, 0x5b802a5b, |
| 4611 | 0xa97f9263, 0xb1e88044, 0x93351325, 0x91bc450a, |
| 4612 | 0x535c59f7, 0x325e5d2b, 0xc391fbe8, 0x3c12787c, |
| 4613 | 0x337e4a98, 0xe82a9011, 0x0123ba37, 0xdd769c7d |
| 4614 | ); |
| 4615 | /* random initial factor xn */ |
| 4616 | secp256k1_scalar xn = SECP256K1_SCALAR_CONST( |
| 4617 | 0x649d4f77, 0xc4242df7, 0x7f2079c9, 0x14530327, |
| 4618 | 0xa31b876a, 0xd2d8ce2a, 0x2236d5c6, 0xd7b2029b |
| 4619 | ); |
| 4620 | /* expected xn * A (from sage) */ |
| 4621 | secp256k1_ge expected_b = SECP256K1_GE_CONST( |
| 4622 | 0x23773684, 0x4d209dc7, 0x098a786f, 0x20d06fcd, |
| 4623 | 0x070a38bf, 0xc11ac651, 0x03004319, 0x1e2a8786, |
| 4624 | 0xed8c3b8e, 0xc06dd57b, 0xd06ea66e, 0x45492b0f, |
| 4625 | 0xb84e4e1b, 0xfb77e21f, 0x96baae2a, 0x63dec956 |
| 4626 | ); |
| 4627 | secp256k1_gej b; |
| 4628 | secp256k1_ecmult_const(&b, &a, &xn); |
| 4629 | |
| 4630 | CHECK(secp256k1_ge_is_valid_var(&a)); |
| 4631 | ge_equals_gej(&expected_b, &b); |
| 4632 | } |
| 4633 | |
| 4634 | static void ecmult_const_commutativity(void) { |
| 4635 | secp256k1_scalar a; |
no test coverage detected