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