1
0

fe25519_unpack.c 322 B

1234567891011
  1. #include "fe25519.h"
  2. void fe25519_unpack(fe25519 *r, const unsigned char x[32])
  3. {
  4. /* assuming little-endian */
  5. r->v[0] = *(unsigned long long *)x;
  6. r->v[1] = *(((unsigned long long *)x)+1);
  7. r->v[2] = *(((unsigned long long *)x)+2);
  8. r->v[3] = *(((unsigned long long *)x)+3);
  9. r->v[3] &= 0x7fffffffffffffffULL;
  10. }