Expunge revision histories in files.
[u/mdw/catacomb] / rijndael256.h
CommitLineData
2e8eb64a 1/* -*-c-*-
2 *
b817bfc6 3 * $Id: rijndael256.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
2e8eb64a 4 *
5 * The Rijndael block cipher, 256-bit version
6 *
7 * (c) 2001 Straylight/Edgeware
8 */
9
10/*----- Licensing notice --------------------------------------------------*
11 *
12 * This file is part of Catacomb.
13 *
14 * Catacomb is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU Library General Public License as
16 * published by the Free Software Foundation; either version 2 of the
17 * License, or (at your option) any later version.
18 *
19 * Catacomb is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Library General Public License for more details.
23 *
24 * You should have received a copy of the GNU Library General Public
25 * License along with Catacomb; if not, write to the Free
26 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
27 * MA 02111-1307, USA.
28 */
29
2e8eb64a 30#ifndef CATACOMB_RIJNDAEL256_H
31#define CATACOMB_RIJNDAEL256_H
32
33#ifdef __cplusplus
34 extern "C" {
35#endif
36
37/*----- Header files ------------------------------------------------------*/
38
39#ifndef CATACOMB_RIJNDAEL_H
40# include "rijndael.h"
41#endif
42
43/*----- Magical numbers ---------------------------------------------------*/
44
45#define RIJNDAEL256_BLKSZ 32
46#define RIJNDAEL256_KEYSZ 32
47#define RIJNDAEL256_CLASS (N, L, 256)
48
49#define rijndael256_keysz rijndael_keysz
50
51/*----- Data structures ---------------------------------------------------*/
52
53typedef struct rijndael_ctx rijndael256_ctx;
54
55/*----- Functions provided ------------------------------------------------*/
56
57/* --- @rijndael256_init@ --- *
58 *
59 * Arguments: @rijndael_ctx *k@ = pointer to context to initialize
60 * @const void *buf@ = pointer to buffer of key material
61 * @size_t sz@ = size of the key material
62 *
63 * Returns: ---
64 *
65 * Use: Initializes a Rijndael context with a particular key. This
66 * implementation of Rijndael doesn't impose any particular
67 * limits on the key size except that it must be multiple of 4
68 * bytes long. 256 bits seems sensible, though.
69 */
70
71extern void rijndael256_init(rijndael_ctx */*k*/,
72 const void */*buf*/, size_t /*sz*/);
73
74/* --- @rijndael_eblk@, @rijndael_dblk@ --- *
75 *
76 * Arguments: @const rijndael_ctx *k@ = pointer to Rijndael context
77 * @const uint32 s[4]@ = pointer to source block
78 * @uint32 d[4]@ = pointer to destination block
79 *
80 * Returns: ---
81 *
82 * Use: Low-level block encryption and decryption.
83 */
84
85extern void rijndael256_eblk(const rijndael_ctx */*k*/,
86 const uint32 */*s*/, uint32 */*dst*/);
87extern void rijndael256_dblk(const rijndael_ctx */*k*/,
88 const uint32 */*s*/, uint32 */*dst*/);
89
90/*----- That's all, folks -------------------------------------------------*/
91
92#ifdef __cplusplus
93 }
94#endif
95
96#endif