Blame SOURCES/libsodium-1.0.18/src/libsodium/include/sodium/crypto_stream_salsa20.h

rdobuilder 775784
#ifndef crypto_stream_salsa20_H
rdobuilder 775784
#define crypto_stream_salsa20_H
rdobuilder 775784
rdobuilder 775784
/*
rdobuilder 775784
 *  WARNING: This is just a stream cipher. It is NOT authenticated encryption.
rdobuilder 775784
 *  While it provides some protection against eavesdropping, it does NOT
rdobuilder 775784
 *  provide any security against active attacks.
rdobuilder 775784
 *  Unless you know what you're doing, what you are looking for is probably
rdobuilder 775784
 *  the crypto_box functions.
rdobuilder 775784
 */
rdobuilder 775784
rdobuilder 775784
#include <stddef.h>
rdobuilder 775784
#include <stdint.h>
rdobuilder 775784
#include "export.h"
rdobuilder 775784
rdobuilder 775784
#ifdef __cplusplus
rdobuilder 775784
# ifdef __GNUC__
rdobuilder 775784
#  pragma GCC diagnostic ignored "-Wlong-long"
rdobuilder 775784
# endif
rdobuilder 775784
extern "C" {
rdobuilder 775784
#endif
rdobuilder 775784
rdobuilder 775784
#define crypto_stream_salsa20_KEYBYTES 32U
rdobuilder 775784
SODIUM_EXPORT
rdobuilder 775784
size_t crypto_stream_salsa20_keybytes(void);
rdobuilder 775784
rdobuilder 775784
#define crypto_stream_salsa20_NONCEBYTES 8U
rdobuilder 775784
SODIUM_EXPORT
rdobuilder 775784
size_t crypto_stream_salsa20_noncebytes(void);
rdobuilder 775784
rdobuilder 775784
#define crypto_stream_salsa20_MESSAGEBYTES_MAX SODIUM_SIZE_MAX
rdobuilder 775784
SODIUM_EXPORT
rdobuilder 775784
size_t crypto_stream_salsa20_messagebytes_max(void);
rdobuilder 775784
rdobuilder 775784
SODIUM_EXPORT
rdobuilder 775784
int crypto_stream_salsa20(unsigned char *c, unsigned long long clen,
rdobuilder 775784
                          const unsigned char *n, const unsigned char *k)
rdobuilder 775784
            __attribute__ ((nonnull));
rdobuilder 775784
rdobuilder 775784
SODIUM_EXPORT
rdobuilder 775784
int crypto_stream_salsa20_xor(unsigned char *c, const unsigned char *m,
rdobuilder 775784
                              unsigned long long mlen, const unsigned char *n,
rdobuilder 775784
                              const unsigned char *k)
rdobuilder 775784
            __attribute__ ((nonnull));
rdobuilder 775784
rdobuilder 775784
SODIUM_EXPORT
rdobuilder 775784
int crypto_stream_salsa20_xor_ic(unsigned char *c, const unsigned char *m,
rdobuilder 775784
                                 unsigned long long mlen,
rdobuilder 775784
                                 const unsigned char *n, uint64_t ic,
rdobuilder 775784
                                 const unsigned char *k)
rdobuilder 775784
            __attribute__ ((nonnull));
rdobuilder 775784
rdobuilder 775784
SODIUM_EXPORT
rdobuilder 775784
void crypto_stream_salsa20_keygen(unsigned char k[crypto_stream_salsa20_KEYBYTES])
rdobuilder 775784
            __attribute__ ((nonnull));
rdobuilder 775784
rdobuilder 775784
#ifdef __cplusplus
rdobuilder 775784
}
rdobuilder 775784
#endif
rdobuilder 775784
rdobuilder 775784
#endif