1
0

fe25519_pack.c 271 B

12345678910111213
  1. #include "fe25519.h"
  2. /* Assumes input x being reduced below 2^255 */
  3. void fe25519_pack(unsigned char r[32], const fe25519 *x)
  4. {
  5. int i;
  6. fe25519 t;
  7. t = *x;
  8. fe25519_freeze(&t);
  9. /* assuming little-endian */
  10. for(i=0;i<32;i++) r[i] = i[(unsigned char *)&t.v];
  11. }