-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SetStr on G2 issue #194
Comments
If the value of G2 is the form (x, y), set "1 " where and are in Fp2, then they are two elements of Fp. |
If the string format is big-endian, you must reverse each Fp element. |
If you get the string from the other library, and if the library supports ETH specification, then it is better to use Deserialize() for the other library output of serialize() after calling ETHmode() once. |
The PKhexstring is a compressed PK form (bigendian) |
Then, could you use
|
I want to set a PK to this value (with curve BLS12-381)
"0xa0b862a7527fee3a731bcb59280ab6abd62d5c0b6ea03dc4ddf6612fdfc9d01f01c315425
41771903475eb1ec6615f8d0df0b8b6dce385811d6dcf8cbefb8759e5e616a3dfd054c928940
766d9a5b9db91e3b697e5d70a975181e007f87fca5e"
after the SetStr, the value is zero.
Is there any problem with the length of the value?
var PKhexstring =
"0xa0b862a7527fee3a731bcb59280ab6abd62d5c0b6ea03dc4ddf6612fdfc9d01f01c315425
41771903475eb1ec6615f8d0df0b8b6dce385811d6dcf8cbefb8759e5e616a3dfd054c928940
766d9a5b9db91e3b697e5d70a975181e007f87fca5e";
var PK = new G2();
PK.SetStr(PKhexstring, 16);
var check = PK.IsValid(); //=TRUE
var check0 = PK.IsZero(); //=TRUE
How I can set the value PKhexstring?
Thanks for your help.
F
The text was updated successfully, but these errors were encountered: