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 11 extern "C" { 12 #endif 13 14 #define crypto_scalarmult_BYTES crypto_scalarmult_curve25519_BYTES 15 SODIUM_EXPORT 16 size_t crypto_scalarmult_bytes(void); 17 18 #define crypto_scalarmult_SCALARBYTES crypto_scalarmult_curve25519_SCALARBYTES 19 SODIUM_EXPORT 20 size_t crypto_scalarmult_scalarbytes(void); 21 22 #define crypto_scalarmult_PRIMITIVE "curve25519" 23 SODIUM_EXPORT 24 const char *crypto_scalarmult_primitive(void); 25 26 SODIUM_EXPORT 27 int 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 */ 37 SODIUM_EXPORT 38 int 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 57 extern "C" { 58 #endif 59 60 #define crypto_scalarmult_BYTES crypto_scalarmult_curve25519_BYTES 61 SODIUM_EXPORT 62 size_t crypto_scalarmult_bytes(void); 63 64 #define crypto_scalarmult_SCALARBYTES crypto_scalarmult_curve25519_SCALARBYTES 65 SODIUM_EXPORT 66 size_t crypto_scalarmult_scalarbytes(void); 67 68 #define crypto_scalarmult_PRIMITIVE "curve25519" 69 SODIUM_EXPORT 70 const char *crypto_scalarmult_primitive(void); 71 72 SODIUM_EXPORT 73 int 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 */ 83 SODIUM_EXPORT 84 int 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 103 extern "C" { 104 #endif 105 106 #define crypto_scalarmult_BYTES crypto_scalarmult_curve25519_BYTES 107 SODIUM_EXPORT 108 size_t crypto_scalarmult_bytes(void); 109 110 #define crypto_scalarmult_SCALARBYTES crypto_scalarmult_curve25519_SCALARBYTES 111 SODIUM_EXPORT 112 size_t crypto_scalarmult_scalarbytes(void); 113 114 #define crypto_scalarmult_PRIMITIVE "curve25519" 115 SODIUM_EXPORT 116 const char *crypto_scalarmult_primitive(void); 117 118 SODIUM_EXPORT 119 int 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 */ 129 SODIUM_EXPORT 130 int 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 149 extern "C" { 150 #endif 151 152 #define crypto_scalarmult_BYTES crypto_scalarmult_curve25519_BYTES 153 SODIUM_EXPORT 154 size_t crypto_scalarmult_bytes(void); 155 156 #define crypto_scalarmult_SCALARBYTES crypto_scalarmult_curve25519_SCALARBYTES 157 SODIUM_EXPORT 158 size_t crypto_scalarmult_scalarbytes(void); 159 160 #define crypto_scalarmult_PRIMITIVE "curve25519" 161 SODIUM_EXPORT 162 const char *crypto_scalarmult_primitive(void); 163 164 SODIUM_EXPORT 165 int 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 */ 175 SODIUM_EXPORT 176 int 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