-
Notifications
You must be signed in to change notification settings - Fork 20
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
Help!Urgent! #9
Comments
Did you try debugging (printfs or otherwise) and see till what point the code reaches? |
Sorry for not getting back about this earlier, all I saw was an email with
an empty body!
The most obvious problem is that the group order "r" has not been
initialized.
I tried
ECP4_BLS24 Q,W;
FP24_BLS24 g,w;
FP8_BLS24 cm;
BIG_BLS24 s,r,x,y;
BIG_BLS24 sk[5]={0};
ECP4_BLS24 pk[5]={0};
ECP4_BLS24_generator(&W);
BIG_BLS24_rcopy(r,CURVE_Order_BLS24);
for (int i=0;i<5;i++) {
BIG_BLS24_randomnum(sk[i],r,RNG);
ECP4_BLS24_copy(&Q,&W);
PAIR_BLS24_G2mul(&Q,sk[i]);
ECP4_BLS24_copy(&pk[i],&Q);
}
for (int i=0;i<5;i++) {
BIG_480_56_rawoutput(sk[i]); printf("\n");
ECP4_BLS24_output(&pk[i]);
}
and it worked fine, outputting
shamus@DESKTOP-6SOOS4D:~/c$ ./bench
(fd3ff62c544811,7c67a3aeffee17,77e43c060a210,3c2da91284fe1b,da8b20a833673,fe6f741e11620e,f656fcb1c47e,0,0)
([[4d3faa8028dadaec75a01867eb16e6de2f475224aab02f6335ce2667c74cd690abd9900383561671edaa634c0a5fd9cfd5faaada8cc93457115a034d,1d7b07cf30a5c624f5af53f5c7866aff98ee9a4ac543bdc70c6bd28069980eaf11480fd47daa81908ccb925cb772a20a8bd40e57a833f78d0c72225e],[39748ee316228c89e3ba09be2474d46cdb5ad997fa2537d220b5f6cabb7040831a88c677c720808bf1e0c4c0c323615c8ed5c5ae90d00fa7b1652b70,4896d298f03a38860d63713564d05c08b78ec6b70ad2f6e5632d5423937f2952d3640d011fecfabc26f7d31ea728b7a7969a6f19cd29d88991c71cbf]],[[147b03f8df3ca0f4f615c7067858bdda09a5a02e4cf3c0e86baaf8f3a62d22507814f6d5c50b382f5b6d3e303073afb43f3b735cecb7dac1ef514de5,183524e3f03c5bd77b19d0581bb5b4b63161f1454a8bc88e14d27c89f4e447e5625cce71d64f546dfcead26c88c7335e4f86b41fe472b122f483d834],[41d32cc46e07778099438d01c184a88cbedbd71fa357d196c353e7fe98e71fff1c8395540190e0183961e90960ddd6a41dc9f8fb74ac6e855aeefc1e,096b97fe2f0a5cf4f6aa00b9253d30999a235c1823e953ff7cfa23bf9475aef0078873be6775cae161b7b3a1c41d07a93569f64617138434c487dcbc]])
(e36d70c41b4214,8f8f5c3fb93d0f,1ca3a8ebd12ea7,1ee69561ef851b,d01b8b1abfbea9,79de505d42e931,a375880d4525,0,0)
([[3c251587a228e83c7e6d5579444c128542840535bcd9fcd308e5a027ddb9c0bd305a2f6eebbd497f3ccd09ea2a9a0276e9c4c3c6c251d8dc4e0bf3b4,4348dff4f8f5723706eb7da6f0fecf87f8152e4c027fa01b343130d61a774adefe8ed75e0d53c629b0497f59ebaed62c62e3b8e740004318918656ab],[3af59c6a92a2ad2651ac55b48be5c00a7275cc625b8d6ab19f2fccfaedf225f76888576e53ba13850067da81f36311b6c326ce883084ff0bbb846533,38792ddcfb1891a4df9f96024b01c5e844816468b886f0d1b89a7945b5ab4467be44ceee7c39c86ea565479a00305a832424fa97640e34285f5edead]],[[05c0c2d812d12fc0be8e3274129090681eb5325c75b2fb974e1c253a9dc97ea2f5a318318f51975e651d10480fe7265ba7cbf06b2d9c4e3cb9ea1b81,53521be6a62ef126a0457a62b5a0118ee27fb0fbf3725ac01891d34c801a392904a09ee54a0ea280b8d5096687b6a07c6ac24320ceb8fcdeecb1ef8c],[553543f2cf92bd27ef5ff31502759d5ce10ddd6bb5296bc1b0eb5c9d7db7b09037805f857499911b351460ce5d15564cf7d61b4f0871cca6dcf47219,0a76233b581b3c8fef83eaddd7a99fce0f70401b802856f713ae72abb4f773f86529dbee85e7bfbba8b9f262b57b39f6ce34cda43b2068179ba06677]])
(1d95b3212b0e19,e68086d336db44,7abdb04b1874aa,44720a598c6778,a0ace4199795d1,66282f5649c82a,291ec2e12b96,0,0)
([[50b073f68a490426ad4ff3044830376e34e7820643f79cdec338f53bf840c124edef7b79fb4b2064954191b355c58a0ed78f218a4e67217b46fda26c,1367ac1ec9b52d10579c5ce5b3e770f9ef7be839ac2d171457f6e8f256c761707e51cf6e43f528ed2f4dc29b6a78185c0a548c51150e37144aaf8e1e],[43ce1e86545414c50ae36aa189eed5fda1136e031fbeab031b09085e37e3bbecfe7aa5bebe582f67cda64cfe88af4df730a15b81fed1f30a0b99b4eb,331613a793817ffdc6c7e37e8ebd21b1ccb2d3e410ef06d07f05fbdf7059ba725dd7b2b161277da9622e1ecde0e2b1efd714837306c0a4f593544af4]],[[4607d66bc4e58dbda2271fd7f559d31924685fe9e147e125fdc035dfacee590555ae1625ae60521fe2908ca94bc29b5085aa2806d5823fbdd77302a0,1a23e8b4515c0d4b556b17fb147ccd161c0a797cb20fdec86c64b13dfba847e839b48264c2ecb0460ad934fd95c4492224118ae47c9da3eeda2db30b],[1342be456721c634ec2e833a457e0eb4ae0927839d8f9c420f3206b26aba5519556024fd55cc2d65543ccfce9bad564038367caebd78434a67a221a3,455534357712f159502beb560b46c65c1db98ba71a6f01877251707b55e54906ef6d81c022acf62296eab87c0fe9bf48bc817e841cb4cacbe9050764]])
(c2e0820669d13d,7fe370842ce644,a0d33acdda8bb2,33407d6c3c305a,fd4267c34085e3,eb317fe26527eb,e5a36e6b13f5,0,0)
([[24a871d60cd0e1ecd39d96a153cc366b13d5793f9b019f8fcd2e83e8815e7aa24d3fc808555c688408f1c8315011b8e315f32db8bb4f8bab9d9a8dd0,07ffcf3031d47c1cf588226d5891510e9a77b40353fa9af8791f5b185ca88b5deffcad5c919bb7e3a3d26910a0562580d39eabede517afd95b5c1d67],[3c004beec2aadda07319a48d4bc2f13afaebed1d8bfb450e19022f394b8b65eef0c6275f6777634627ca38cf1afc0c84e94d344f75c99371340a9fd0,162ab10ccd2777a6ccd39b958a9ca36d6be485efb1fe016efda2f67eda49b85d9e5d8ec9f74ef1b835dee401f3c425b0865eb5a97df0278811826efd]],[[49bc646710fcb8834db5e0952d496903a322d7ac7f29a6b9b1e6d565c314def460159447040f1918f736b31810df4c5ec5137b2cae609888cfd3db5b,1846df31eb212a2df37f5d571a95ffa2674b8709b8edb056e5de4601fd561faf08979052231fa4f260769b6ab93101051cf51c1c575fbb3b1356116f],[3fa2ffefe69340a001d5e54e655a06c01a9f6bebca31395007866b20fb509932af356528807ce73d80691dc44e57ecba10ce9df10641b086d77dd0cf,098674926eaafe34a70e88adeb6f6f9a4c3c4e350548d086ad8a72778bba5f3af63414f030a893e9dd41ace2ef9634a44f5815c96e458863e222f276]])
(ffd38da3632a14,b0543c746d7e9a,d2c35c7b947aa2,c7f1a4e1f08ba6,a8a94ac4f814f1,d63da332606ef2,a86d28496b0e,0,0)
([[2fb3f569e5267458276f12583e11cb55b8d5e26a2134c6f3f8c7760fbb43be7d31d66034d8d7233f658cffc44a39a92b1573b07f6f18d69832579278,372dc4ea8ee0f1da5d9f21b0006158ed8778836ca71eecee4067437226bb5554473fed1f59c8680be4b0afce13858158af0845e63faf08a5355ee2ad],[330e4aba1d8459e43dd705ad568972f8f4562376900cd2c60b6900ca2c54665ee0ec0e240db66ae58e735c0827a3ea5fd846e7d3cccf98f312cba450,1975e0de981b68e1736f57069050c0f2fd1640ce6283829d17854476314cf4368e90153c8400b353d1001f3581ba03ba1b19363030299fdba8d0848b]],[[17b3f7b6861758a109eb1a137fc5585f8ff4709bd34452783432444b62cfd0c0a7afbc7adf7130a7eb0a8c637b2c582dcbab75c95997099e80336c1d,00e42b95001137443ea3a96c5531d10a95c449b1d1d38f951dda044ee61cd311db2e6844bc16f711f2faab72126723dc0260b14dc3fb16939ab1663c],[20aec41710d9fcf22df2c87aaaf4e7b971edb42912b25417476f813fd8d6b14c69d7f57c6bbf457c6fd47351d3a0a046f63a0901fe0094d546105b82,2826570f58079f16d456e3416b8b7be94bdef0ddc67f70380a777393ac037dca3d7dda6190e7894bccca6bf3a90d1e9c11e77e95e828d287e182f2f0]])
Mike
…On Tue, May 14, 2019 at 10:30 AM yeeacksonideo ***@***.***> wrote:
@mcarrickscott <https://github.com/mcarrickscott>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9?email_source=notifications&email_token=AAU3ZDWLJPAFD4Q5R6REKR3PVKBDBA5CNFSM4HMYAPYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVK4X5I#issuecomment-492162037>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAU3ZDTUZLRRNALHLKMUY33PVKBDBANCNFSM4HMYAPYA>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I need to generate pk with the corresponding sk。
In my code,The first loop, I want to use an array of sk and pk, first select sk randomly , then Q * sk[i], and then give the result to pk[i]
The second loop is to output the contents of sk[i] and pk[i].
But when I run the program,My results are shown in Figure 2,It is like stuck, and will not continue。
What's wrong?
The text was updated successfully, but these errors were encountered: