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