crypto_scalarmult_ristretto255.h 1.1 KB

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