lokinet/crypto/curve25519/sandy2x/fe51.h

40 lines
636 B
C
Raw Normal View History

2018-10-23 11:29:37 +00:00
/*
This file is adapted from amd64-51/fe25519.h:
'fe25519' is renamed as 'fe51';
All the redundant functions are removed;
New function fe51_nsquare is introduced.
*/
#ifndef fe51_H
#define fe51_H
#ifdef __cplusplus
2019-08-31 18:54:19 +00:00
extern "C"
{
2018-10-23 11:29:37 +00:00
#endif
#include <stdint.h>
#include <stdlib.h>
#include "fe51_namespace.h"
2019-08-31 18:54:19 +00:00
typedef struct
{
2018-10-23 11:29:37 +00:00
uint64_t v[5];
2019-08-31 18:54:19 +00:00
} fe51;
extern void
fe51_pack(unsigned char *, const fe51 *);
extern void
fe51_mul(fe51 *, const fe51 *, const fe51 *);
extern void
fe51_nsquare(fe51 *, const fe51 *, int);
extern void
fe51_invert(fe51 *, const fe51 *);
2018-10-23 11:29:37 +00:00
#ifdef __cplusplus
}
#endif
#endif