Monero
Loading...
Searching...
No Matches
sc25519.h
Go to the documentation of this file.
1#ifndef SC25519_H
2#define SC25519_H
3
4#define sc25519 crypto_sign_ed25519_amd64_51_30k_batch_sc25519
5#define shortsc25519 crypto_sign_ed25519_amd64_51_30k_batch_shortsc25519
6#define sc25519_from32bytes crypto_sign_ed25519_amd64_51_30k_batch_sc25519_from32bytes
7#define shortsc25519_from16bytes crypto_sign_ed25519_amd64_51_30k_batch_shortsc25519_from16bytes
8#define sc25519_from64bytes crypto_sign_ed25519_amd64_51_30k_batch_sc25519_from64bytes
9#define sc25519_from_shortsc crypto_sign_ed25519_amd64_51_30k_batch_sc25519_from_shortsc
10#define sc25519_to32bytes crypto_sign_ed25519_amd64_51_30k_batch_sc25519_to32bytes
11#define sc25519_iszero_vartime crypto_sign_ed25519_amd64_51_30k_batch_sc25519_iszero_vartime
12#define sc25519_isshort_vartime crypto_sign_ed25519_amd64_51_30k_batch_sc25519_isshort_vartime
13#define sc25519_lt crypto_sign_ed25519_amd64_51_30k_batch_sc25519_lt
14#define sc25519_add crypto_sign_ed25519_amd64_51_30k_batch_sc25519_add
15#define sc25519_sub_nored crypto_sign_ed25519_amd64_51_30k_batch_sc25519_sub_nored
16#define sc25519_mul crypto_sign_ed25519_amd64_51_30k_batch_sc25519_mul
17#define sc25519_mul_shortsc crypto_sign_ed25519_amd64_51_30k_batch_sc25519_mul_shortsc
18#define sc25519_window4 crypto_sign_ed25519_amd64_51_30k_batch_sc25519_window4
19#define sc25519_window5 crypto_sign_ed25519_amd64_51_30k_batch_sc25519_window5
20#define sc25519_slide crypto_sign_ed25519_amd64_51_30k_batch_sc25519_slide
21#define sc25519_2interleave2 crypto_sign_ed25519_amd64_51_30k_batch_sc25519_2interleave2
22#define sc25519_barrett crypto_sign_ed25519_amd64_51_30k_batch_sc25519_barrett
23
24typedef struct
25{
26 unsigned long long v[4];
27}
29
30typedef struct
31{
32 unsigned long long v[2];
33}
35
36void sc25519_from32bytes(sc25519 *r, const unsigned char x[32]);
37
38void sc25519_from64bytes(sc25519 *r, const unsigned char x[64]);
39
41
42void sc25519_to32bytes(unsigned char r[32], const sc25519 *x);
43
45
46int sc25519_lt(const sc25519 *x, const sc25519 *y);
47
48void sc25519_add(sc25519 *r, const sc25519 *x, const sc25519 *y);
49
50void sc25519_sub_nored(sc25519 *r, const sc25519 *x, const sc25519 *y);
51
52void sc25519_mul(sc25519 *r, const sc25519 *x, const sc25519 *y);
53
54void sc25519_mul_shortsc(sc25519 *r, const sc25519 *x, const shortsc25519 *y);
55
56/* Convert s into a representation of the form \sum_{i=0}^{63}r[i]2^(4*i)
57 * with r[i] in {-8,...,7}
58 */
59void sc25519_window4(signed char r[64], const sc25519 *s);
60
61void sc25519_window5(signed char r[51], const sc25519 *s);
62
63void sc25519_slide(signed char r[256], const sc25519 *s, int swindowsize);
64
65void sc25519_2interleave2(unsigned char r[127], const sc25519 *s1, const sc25519 *s2);
66
67void sc25519_barrett(sc25519 *r, unsigned long long x[8]);
68
69#endif
#define s(x, c)
Definition aesb.c:47
#define sc25519_sub_nored
Definition sc25519.h:15
#define sc25519_from32bytes
Definition sc25519.h:6
#define sc25519_add
Definition sc25519.h:14
#define sc25519_from_shortsc
Definition sc25519.h:9
#define sc25519_to32bytes
Definition sc25519.h:10
#define sc25519_barrett
Definition sc25519.h:22
#define sc25519_2interleave2
Definition sc25519.h:21
#define sc25519_window4
Definition sc25519.h:18
#define sc25519_from64bytes
Definition sc25519.h:8
#define shortsc25519
Definition sc25519.h:5
#define sc25519_mul_shortsc
Definition sc25519.h:17
#define sc25519_mul
Definition sc25519.h:16
#define sc25519_window5
Definition sc25519.h:19
#define sc25519_slide
Definition sc25519.h:20
#define sc25519_iszero_vartime
Definition sc25519.h:11
#define sc25519
Definition sc25519.h:4
#define sc25519_lt
Definition sc25519.h:13
unsigned long long v[4]
Definition sc25519.h:26
unsigned long long v[2]
Definition sc25519.h:32