Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/sodium/crypto_scalarmult_curve25519.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 #ifndef crypto_scalarmult_curve25519_H
0002 #define crypto_scalarmult_curve25519_H
0003 
0004 #include <stddef.h>
0005 
0006 #include "export.h"
0007 
0008 #ifdef __cplusplus
0009 extern "C" {
0010 #endif
0011 
0012 #define crypto_scalarmult_curve25519_BYTES 32U
0013 SODIUM_EXPORT
0014 size_t crypto_scalarmult_curve25519_bytes(void);
0015 
0016 #define crypto_scalarmult_curve25519_SCALARBYTES 32U
0017 SODIUM_EXPORT
0018 size_t crypto_scalarmult_curve25519_scalarbytes(void);
0019 
0020 /*
0021  * NOTE: Do not use the result of this function directly for key exchange.
0022  *
0023  * Hash the result with the public keys in order to compute a shared
0024  * secret key: H(q || client_pk || server_pk)
0025  *
0026  * Or unless this is not an option, use the crypto_kx() API instead.
0027  */
0028 SODIUM_EXPORT
0029 int crypto_scalarmult_curve25519(unsigned char *q, const unsigned char *n,
0030                                  const unsigned char *p)
0031             __attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
0032 
0033 SODIUM_EXPORT
0034 int crypto_scalarmult_curve25519_base(unsigned char *q,
0035                                       const unsigned char *n)
0036             __attribute__ ((nonnull));
0037 
0038 #ifdef __cplusplus
0039 }
0040 #endif
0041 
0042 #endif