gnunet-android

GNUnet for Android
Log | Files | Refs | README

crypto_scalarmult_ristretto255.h (1119B)


      1 
      2 #ifndef crypto_scalarmult_ristretto255_H
      3 #define crypto_scalarmult_ristretto255_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_ristretto255_BYTES 32U
     14 SODIUM_EXPORT
     15 size_t crypto_scalarmult_ristretto255_bytes(void);
     16 
     17 #define crypto_scalarmult_ristretto255_SCALARBYTES 32U
     18 SODIUM_EXPORT
     19 size_t crypto_scalarmult_ristretto255_scalarbytes(void);
     20 
     21 /*
     22  * NOTE: Do not use the result of this function directly for key exchange.
     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_ristretto255(unsigned char *q, const unsigned char *n,
     31                                    const unsigned char *p)
     32             __attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
     33 
     34 SODIUM_EXPORT
     35 int crypto_scalarmult_ristretto255_base(unsigned char *q,
     36                                         const unsigned char *n)
     37             __attribute__ ((nonnull));
     38 
     39 #ifdef __cplusplus
     40 }
     41 #endif
     42 
     43 #endif