-
Notifications
You must be signed in to change notification settings - Fork 17
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
Convert Signature and Public key into G1 and G2 format. #119
Comments
Just for reference of Signature I generated from BLS DKG rust and Python |
Hi, @AmitCZ, Thank you for the comment. First, regarding the table of PK/Sig length you attached above, I think for bls_dkg, it shall be 192 for the PK and 384 for the Sig ? Second, the format of PK/Sig that bls_dkg using is from threshold_crypto . Hope this helps. |
Just to add some notes here, @AmitCZ there are a few different representations of G1/G2 points and there's a distinction between PublicKeySets and PublicKeys that you may missing. G1/G1 can be in compressed or affine forms (or projective, but this is rarely serialized), these sizes are in the table below
Make sure you are converting your G1/G2 points into the representation your function expects. Second, you may be confusing the PublicKeySet for the PublicKey. make sure to call public_key() BLS-DKG exposes the compressed G1/G2 points, by calling This compressed representation should be parse-able by other BLS libraries and from that you can convert to Affine if necessary. |
Line 273 in 58e26b0
This line prints public key : 384 characters and Signature : 192 characters What encoding has been used ?? |
Hi Team Maidsafe!! Thank you for your efforts, I am able to get Affine values for my public key and signature. One last help I need Line 42 : bls-verifier-contract Again very much thankful for all your support. |
I don't think we can help you much with your contract, but those numbers are hex encoded, if you want the decimal representation, you can simply re-encode as decimal |
Hi @davidrusu I tried to convert public key points , it is giving 115 character numbers, Still hopeful It it possible to get 77 character long public key from your repo. Appreciated if provided with code snippet. |
PublicKeys are always 48 bytes when compressed and 96 bytes in Affine.
I'm not sure what a "character" is, but you should be counting in bytes, not characters. |
You may try with the threshold_crypto repo to refactor the PK_SIZE and SIG_SIZE to what you want. |
Hi Team !!
Thanks you bls-dkg to provide such a complex implemetation in rust.
I would like to request if it is possible to convert public key and signature into G1 and G2 format.
So that I can verify dkg-bls signature in the ethereum smart contract.
Currently I tried to input those PK and SIG in python ECC library
Line 40 , 51
but it produces G1 and G2 of length 115 but this smart contract Line 38 verifyBLSTest()
accepts G1 G2 value of length 77.
In short do any way to get G1 G2 values in for required length ??
The text was updated successfully, but these errors were encountered: