crypto_scalarmult_curve25519.h revision 1.1 1 1.1 riastrad #ifndef crypto_scalarmult_curve25519_H
2 1.1 riastrad #define crypto_scalarmult_curve25519_H
3 1.1 riastrad
4 1.1 riastrad #if 0
5 1.1 riastrad #include <stddef.h>
6 1.1 riastrad #endif
7 1.1 riastrad
8 1.1 riastrad #include "export.h"
9 1.1 riastrad
10 1.1 riastrad #ifdef __cplusplus
11 1.1 riastrad extern "C" {
12 1.1 riastrad #endif
13 1.1 riastrad
14 1.1 riastrad #define crypto_scalarmult_curve25519_BYTES 32U
15 1.1 riastrad SODIUM_EXPORT
16 1.1 riastrad size_t crypto_scalarmult_curve25519_bytes(void);
17 1.1 riastrad
18 1.1 riastrad #define crypto_scalarmult_curve25519_SCALARBYTES 32U
19 1.1 riastrad SODIUM_EXPORT
20 1.1 riastrad size_t crypto_scalarmult_curve25519_scalarbytes(void);
21 1.1 riastrad
22 1.1 riastrad /*
23 1.1 riastrad * NOTE: Do not use the result of this function directly.
24 1.1 riastrad *
25 1.1 riastrad * Hash the result with the public keys in order to compute a shared
26 1.1 riastrad * secret key: H(q || client_pk || server_pk)
27 1.1 riastrad *
28 1.1 riastrad * Or unless this is not an option, use the crypto_kx() API instead.
29 1.1 riastrad */
30 1.1 riastrad SODIUM_EXPORT
31 1.1 riastrad int crypto_scalarmult_curve25519(unsigned char *q, const unsigned char *n,
32 1.1 riastrad const unsigned char *p)
33 1.1 riastrad __attribute__ ((warn_unused_result));
34 1.1 riastrad
35 1.1 riastrad SODIUM_EXPORT
36 1.1 riastrad int crypto_scalarmult_curve25519_base(unsigned char *q, const unsigned char *n);
37 1.1 riastrad
38 1.1 riastrad #ifdef __cplusplus
39 1.1 riastrad }
40 1.1 riastrad #endif
41 1.1 riastrad
42 1.1 riastrad #endif
43 1.1 riastrad #ifndef crypto_scalarmult_curve25519_H
44 1.1 riastrad #define crypto_scalarmult_curve25519_H
45 1.1 riastrad
46 1.1 riastrad #if 0
47 1.1 riastrad #include <stddef.h>
48 1.1 riastrad #endif
49 1.1 riastrad
50 1.1 riastrad #include "export.h"
51 1.1 riastrad
52 1.1 riastrad #ifdef __cplusplus
53 1.1 riastrad extern "C" {
54 1.1 riastrad #endif
55 1.1 riastrad
56 1.1 riastrad #define crypto_scalarmult_curve25519_BYTES 32U
57 1.1 riastrad SODIUM_EXPORT
58 1.1 riastrad size_t crypto_scalarmult_curve25519_bytes(void);
59 1.1 riastrad
60 1.1 riastrad #define crypto_scalarmult_curve25519_SCALARBYTES 32U
61 1.1 riastrad SODIUM_EXPORT
62 1.1 riastrad size_t crypto_scalarmult_curve25519_scalarbytes(void);
63 1.1 riastrad
64 1.1 riastrad /*
65 1.1 riastrad * NOTE: Do not use the result of this function directly.
66 1.1 riastrad *
67 1.1 riastrad * Hash the result with the public keys in order to compute a shared
68 1.1 riastrad * secret key: H(q || client_pk || server_pk)
69 1.1 riastrad *
70 1.1 riastrad * Or unless this is not an option, use the crypto_kx() API instead.
71 1.1 riastrad */
72 1.1 riastrad SODIUM_EXPORT
73 1.1 riastrad int crypto_scalarmult_curve25519(unsigned char *q, const unsigned char *n,
74 1.1 riastrad const unsigned char *p)
75 1.1 riastrad __attribute__ ((warn_unused_result));
76 1.1 riastrad
77 1.1 riastrad SODIUM_EXPORT
78 1.1 riastrad int crypto_scalarmult_curve25519_base(unsigned char *q, const unsigned char *n);
79 1.1 riastrad
80 1.1 riastrad #ifdef __cplusplus
81 1.1 riastrad }
82 1.1 riastrad #endif
83 1.1 riastrad
84 1.1 riastrad #endif
85 1.1 riastrad #ifndef crypto_scalarmult_curve25519_H
86 1.1 riastrad #define crypto_scalarmult_curve25519_H
87 1.1 riastrad
88 1.1 riastrad #if 0
89 1.1 riastrad #include <stddef.h>
90 1.1 riastrad #endif
91 1.1 riastrad
92 1.1 riastrad #include "export.h"
93 1.1 riastrad
94 1.1 riastrad #ifdef __cplusplus
95 1.1 riastrad extern "C" {
96 1.1 riastrad #endif
97 1.1 riastrad
98 1.1 riastrad #define crypto_scalarmult_curve25519_BYTES 32U
99 1.1 riastrad SODIUM_EXPORT
100 1.1 riastrad size_t crypto_scalarmult_curve25519_bytes(void);
101 1.1 riastrad
102 1.1 riastrad #define crypto_scalarmult_curve25519_SCALARBYTES 32U
103 1.1 riastrad SODIUM_EXPORT
104 1.1 riastrad size_t crypto_scalarmult_curve25519_scalarbytes(void);
105 1.1 riastrad
106 1.1 riastrad /*
107 1.1 riastrad * NOTE: Do not use the result of this function directly.
108 1.1 riastrad *
109 1.1 riastrad * Hash the result with the public keys in order to compute a shared
110 1.1 riastrad * secret key: H(q || client_pk || server_pk)
111 1.1 riastrad *
112 1.1 riastrad * Or unless this is not an option, use the crypto_kx() API instead.
113 1.1 riastrad */
114 1.1 riastrad SODIUM_EXPORT
115 1.1 riastrad int crypto_scalarmult_curve25519(unsigned char *q, const unsigned char *n,
116 1.1 riastrad const unsigned char *p)
117 1.1 riastrad __attribute__ ((warn_unused_result));
118 1.1 riastrad
119 1.1 riastrad SODIUM_EXPORT
120 1.1 riastrad int crypto_scalarmult_curve25519_base(unsigned char *q, const unsigned char *n);
121 1.1 riastrad
122 1.1 riastrad #ifdef __cplusplus
123 1.1 riastrad }
124 1.1 riastrad #endif
125 1.1 riastrad
126 1.1 riastrad #endif
127 1.1 riastrad #ifndef crypto_scalarmult_curve25519_H
128 1.1 riastrad #define crypto_scalarmult_curve25519_H
129 1.1 riastrad
130 1.1 riastrad #if 0
131 1.1 riastrad #include <stddef.h>
132 1.1 riastrad #endif
133 1.1 riastrad
134 1.1 riastrad #include "export.h"
135 1.1 riastrad
136 1.1 riastrad #ifdef __cplusplus
137 1.1 riastrad extern "C" {
138 1.1 riastrad #endif
139 1.1 riastrad
140 1.1 riastrad #define crypto_scalarmult_curve25519_BYTES 32U
141 1.1 riastrad SODIUM_EXPORT
142 1.1 riastrad size_t crypto_scalarmult_curve25519_bytes(void);
143 1.1 riastrad
144 1.1 riastrad #define crypto_scalarmult_curve25519_SCALARBYTES 32U
145 1.1 riastrad SODIUM_EXPORT
146 1.1 riastrad size_t crypto_scalarmult_curve25519_scalarbytes(void);
147 1.1 riastrad
148 1.1 riastrad /*
149 1.1 riastrad * NOTE: Do not use the result of this function directly.
150 1.1 riastrad *
151 1.1 riastrad * Hash the result with the public keys in order to compute a shared
152 1.1 riastrad * secret key: H(q || client_pk || server_pk)
153 1.1 riastrad *
154 1.1 riastrad * Or unless this is not an option, use the crypto_kx() API instead.
155 1.1 riastrad */
156 1.1 riastrad SODIUM_EXPORT
157 1.1 riastrad int crypto_scalarmult_curve25519(unsigned char *q, const unsigned char *n,
158 1.1 riastrad const unsigned char *p)
159 1.1 riastrad __attribute__ ((warn_unused_result));
160 1.1 riastrad
161 1.1 riastrad SODIUM_EXPORT
162 1.1 riastrad int crypto_scalarmult_curve25519_base(unsigned char *q, const unsigned char *n);
163 1.1 riastrad
164 1.1 riastrad #ifdef __cplusplus
165 1.1 riastrad }
166 1.1 riastrad #endif
167 1.1 riastrad
168 1.1 riastrad #endif
169