Back to home page

EIC code displayed by LXR

 
 

    


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

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