3 * The Rijndael block cipher, 192-bit version
5 * (c) 2001 Straylight/Edgeware
8 /*----- Licensing notice --------------------------------------------------*
10 * This file is part of Catacomb.
12 * Catacomb is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU Library General Public License as
14 * published by the Free Software Foundation; either version 2 of the
15 * License, or (at your option) any later version.
17 * Catacomb is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU Library General Public License for more details.
22 * You should have received a copy of the GNU Library General Public
23 * License along with Catacomb; if not, write to the Free
24 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
28 #ifndef CATACOMB_RIJNDAEL192_H
29 #define CATACOMB_RIJNDAEL192_H
35 /*----- Header files ------------------------------------------------------*/
37 #ifndef CATACOMB_RIJNDAEL_H
38 # include "rijndael.h"
41 /*----- Magical numbers ---------------------------------------------------*/
43 #define RIJNDAEL192_BLKSZ 24
44 #define RIJNDAEL192_KEYSZ 32
45 #define RIJNDAEL192_CLASS (N, B, 192)
47 #define rijndael192_keysz rijndael_keysz
49 /*----- Data structures ---------------------------------------------------*/
51 typedef struct rijndael_ctx rijndael192_ctx;
53 /*----- Functions provided ------------------------------------------------*/
55 /* --- @rijndael192_init@ --- *
57 * Arguments: @rijndael_ctx *k@ = pointer to context to initialize
58 * @const void *buf@ = pointer to buffer of key material
59 * @size_t sz@ = size of the key material
63 * Use: Initializes a Rijndael context with a particular key. This
64 * implementation of Rijndael doesn't impose any particular
65 * limits on the key size except that it must be multiple of 4
66 * bytes long. 256 bits seems sensible, though.
69 extern void rijndael192_init(rijndael_ctx */*k*/,
70 const void */*buf*/, size_t /*sz*/);
72 /* --- @rijndael_eblk@, @rijndael_dblk@ --- *
74 * Arguments: @const rijndael_ctx *k@ = pointer to Rijndael context
75 * @const uint32 s[4]@ = pointer to source block
76 * @uint32 d[4]@ = pointer to destination block
80 * Use: Low-level block encryption and decryption.
83 extern void rijndael192_eblk(const rijndael_ctx */*k*/,
84 const uint32 */*s*/, uint32 */*dst*/);
85 extern void rijndael192_dblk(const rijndael_ctx */*k*/,
86 const uint32 */*s*/, uint32 */*dst*/);
88 /*----- That's all, folks -------------------------------------------------*/