Make pubkey parsing test whether points are in the correct subgroup

This commit is contained in:
Pieter Wuille committed 2020-09-18 14:11:38 -07:00
1 parent 87af00b511
commit 08d7d89299
4 files changed
+38

No files matched your search

+3
View File
@@ -33,6 +33,9 @@ int secp256k1_xonly_pubkey_parse(const secp256k1_context* ctx, secp256k1_xonly_p
if (!secp256k1_ge_set_xo_var(&pk, &x, 0)) {
return 0;
}
if (!secp256k1_ge_is_in_correct_subgroup(&pk)) {
return 0;
}
secp256k1_xonly_pubkey_save(pubkey, &pk);
return 1;
}