16#define CHACHA_MINKEYLEN  16 
   17#define CHACHA_NONCELEN   8 
   18#define CHACHA_CTRLEN     8 
   19#define CHACHA_STATELEN   (CHACHA_NONCELEN+CHACHA_CTRLEN) 
   25void chacha_keysetup(
struct chacha_ctx *x, 
const uint8_t *k, uint32_t kbits)
 
   26#ifdef HAVE_GCC_BOUNDED_ATTRIBUTE 
   27    __attribute__((__bounded__(__minbytes__, 2, CHACHA_MINKEYLEN)))
 
   30void chacha_ivsetup(
struct chacha_ctx *x, 
const uint8_t *iv, 
const uint8_t *ctr)
 
   31#ifdef HAVE_GCC_BOUNDED_ATTRIBUTE 
   32    __attribute__((__bounded__(__minbytes__, 2, CHACHA_NONCELEN)))
 
   33    __attribute__((__bounded__(__minbytes__, 3, CHACHA_CTRLEN)))
 
   36void chacha_encrypt_bytes(
struct chacha_ctx *x, 
const uint8_t *m,
 
   37    uint8_t *c, uint32_t bytes)
 
   38#ifdef HAVE_GCC_BOUNDED_ATTRIBUTE 
   39    __attribute__((__bounded__(__buffer__, 2, 4)))
 
   40    __attribute__((__bounded__(__buffer__, 3, 4)))