fe51.h 614 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. This file is adapted from amd64-51/fe25519.h:
  3. 'fe25519' is renamed as 'fe51';
  4. All the redundant functions are removed;
  5. New function fe51_nsquare is introduced.
  6. */
  7. #ifndef fe51_H
  8. #define fe51_H
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #include <stdint.h>
  13. #include <stdlib.h>
  14. #include "fe51_namespace.h"
  15. typedef struct
  16. {
  17. uint64_t v[5];
  18. }
  19. fe51;
  20. extern void fe51_pack(unsigned char *, const fe51 *);
  21. extern void fe51_mul(fe51 *, const fe51 *, const fe51 *);
  22. extern void fe51_nsquare(fe51 *, const fe51 *, int);
  23. extern void fe51_invert(fe51 *, const fe51 *);
  24. #ifdef __cplusplus
  25. }
  26. #endif
  27. #endif