1 #ifndef crypto_scalarmult_curve25519_H 2 #define crypto_scalarmult_curve25519_H 3 4 #include <stddef.h> 5 6 #include "export.h" 7 8 #ifdef __cplusplus 9 extern "C" { 10 #endif 11 12 #define crypto_scalarmult_curve25519_BYTES 32U 13 SODIUM_EXPORT 14 size_t crypto_scalarmult_curve25519_bytes(void); 15 16 #define crypto_scalarmult_curve25519_SCALARBYTES 32U 17 SODIUM_EXPORT 18 size_t crypto_scalarmult_curve25519_scalarbytes(void); 19 20 /* 21 * NOTE: Do not use the result of this function directly. 22 * 23 * Hash the result with the public keys in order to compute a shared 24 * secret key: H(q || client_pk || server_pk) 25 * 26 * Or unless this is not an option, use the crypto_kx() API instead. 27 */ 28 SODIUM_EXPORT 29 int crypto_scalarmult_curve25519(unsigned char *q, const unsigned char *n, 30 const unsigned char *p) 31 __attribute__ ((warn_unused_result)); 32 33 SODIUM_EXPORT 34 int crypto_scalarmult_curve25519_base(unsigned char *q, const unsigned char *n); 35 36 #ifdef __cplusplus 37 } 38 #endif 39 40 #endif 41