Debian Codegraph @

crypto_pow/inv25519/sandy2x/api.c

raw
1 #include "crypto_pow.h"
2 #include "fe.h"
3 #include "fe51.h"
4
5 void crypto_pow(unsigned char *q,const unsigned char *p)
6 {
7 fe x;
8 fe51 x51;
9 fe_frombytes(x,p);
10 x51.v[0] = (x[1] << 26) + x[0];
11 x51.v[1] = (x[3] << 26) + x[2];
12 x51.v[2] = (x[5] << 26) + x[4];
13 x51.v[3] = (x[7] << 26) + x[6];
14 x51.v[4] = (x[9] << 26) + x[8];
15 fe51_invert(&x51,&x51);
16 fe51_pack(q,&x51);
17 }