Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / nettle / camellia-internal.h
blobc0f67c8aed5b2d72378a7c994b4647d35a6eb8ae
1 /* camellia-internal.h
3 * The camellia block cipher.
4 */
6 /* Copyright (C) 2006,2007
7 * NTT (Nippon Telegraph and Telephone Corporation).
9 * Copyright (C) 2010 Niels Möller
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27 * Algorithm Specification
28 * http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html
31 /* Based on camellia.c ver 1.2.0, see
32 http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/camellia-LGPL-1.2.0.tar.gz.
35 #ifndef NETTLE_CAMELLIA_INTERNAL_H_INCLUDED
36 #define NETTLE_CAMELLIA_INTERNAL_H_INCLUDED
38 #include "camellia.h"
40 /* Name mangling */
41 #define _camellia_crypt _nettle_camellia_crypt
42 #define _camellia_table _nettle_camellia_table
45 * macros
48 /* Destructive rotation of 128 bit values. */
49 #define ROTL128(bits, xl, xr) do { \
50 uint64_t __rol128_t = (xl); \
51 (xl) = ((xl) << (bits)) | ((xr) >> (64 - (bits))); \
52 (xr) = ((xr) << (bits)) | (__rol128_t >> (64 - (bits))); \
53 } while (0)
55 struct camellia_table
57 uint32_t sp1110[256];
58 uint32_t sp0222[256];
59 uint32_t sp3033[256];
60 uint32_t sp4404[256];
63 void
64 _camellia_crypt(const struct camellia_ctx *ctx,
65 const struct camellia_table *T,
66 unsigned length, uint8_t *dst,
67 const uint8_t *src);
69 extern const struct camellia_table _camellia_table;
71 #endif /* NETTLE_CAMELLIA_INTERNAL_H_INCLUDED */