The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/crypto/chacha20/chacha.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* $OpenBSD: chacha.h,v 1.4 2016/08/27 04:04:56 guenther Exp $ */
    2 
    3 /*
    4 chacha-merged.c version 20080118
    5 D. J. Bernstein
    6 Public domain.
    7 
    8  $FreeBSD$
    9 */
   10 
   11 #ifndef CHACHA_H
   12 #define CHACHA_H
   13 
   14 #include <sys/types.h>
   15 #include <crypto/chacha20/_chacha.h>
   16 
   17 #define CHACHA_MINKEYLEN        16
   18 #define CHACHA_NONCELEN         8
   19 #define CHACHA_CTRLEN           8
   20 #define CHACHA_STATELEN         (CHACHA_NONCELEN+CHACHA_CTRLEN)
   21 #define CHACHA_BLOCKLEN         64
   22 
   23 #ifdef CHACHA_EMBED
   24 #define LOCAL static
   25 #else
   26 #define LOCAL
   27 #endif
   28 
   29 #ifdef CHACHA_NONCE0_CTR128
   30 #define CHACHA_UNUSED __unused
   31 #else
   32 #define CHACHA_UNUSED
   33 #endif
   34 
   35 LOCAL void chacha_keysetup(struct chacha_ctx *x, const u_char *k, u_int kbits);
   36 LOCAL void chacha_ivsetup(struct chacha_ctx *x, const u_char *iv CHACHA_UNUSED,
   37     const u_char *ctr);
   38 LOCAL void chacha_encrypt_bytes(struct chacha_ctx *x, const u_char *m,
   39     u_char *c, u_int bytes);
   40 
   41 #undef CHACHA_UNUSED
   42 
   43 #endif  /* CHACHA_H */
   44 

Cache object: 06bffd955d654f58dba657d0d54fbb30


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.