0

I am trying to generate a public key from a hash on a cuda device. I couldn't find a ready source for that task. So I want to try to modify/ create a new function for this task.

the source code I want to use is here source on github

I have a secret key(unsigned char) and just want to multiply it with G, and then print the puclic key.

inside the gpu kernel:

unsigned char secret[32]

unsigned char   publicK_x[32];
unsigned char   publicK_y[32];

between here supposed to be the function for the point multiplication

dec_ge_set_gej(&p, &pj);

dec_fe_get_b32(publicK_x, &p.x);
dec_fe_get_b32(publicK_y, &p.y);

for (int i = 0; i < 32; i++)///print x.side
{
    printf("%02X", publicK_x[i]);
    printf ("\n");

for (int i = 0; i < 32; i++)///print y.side
    {
    printf("%02X", publicK_y[i]);
    printf("\n")

But since the source code uses pre-computed parallel point addition, I'm a bit stuck to get it to multiply only a single point.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.