3 * The Noekeon block cipher
5 * (c) 2000 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 /*----- Notes on the Noekeon block cipher --------------------------------*
30 * A Nessie entry, by Joan Daemen, Michael Peeters, Gilles Van Assche and
31 * Vincent Rijmen, two of whom were the designers of the AES winner
32 * Rijndael. It's a simple cipher, based on Serpent-style bit-slicing.
33 * Speed is about middle-of-the-road -- about as fast as SAFER, faster than
37 #ifndef CATACOMB_NOEKEON_H
38 #define CATACOMB_NOEKEON_H
44 /*----- Header files ------------------------------------------------------*/
48 #include <mLib/bits.h>
50 /*----- Magical numbers ---------------------------------------------------*/
52 #define NOEKEON_BLKSZ 16
53 #define NOEKEON_KEYSZ 16
54 #define NOEKEON_CLASS (N, B, 128)
56 extern const octet noekeon_keysz[];
58 /*----- Data structures ---------------------------------------------------*/
60 typedef struct noekeon_ctx {
64 /*----- Functions provided ------------------------------------------------*/
66 /* --- @noekeon_init@ --- *
68 * Arguments: @noekeon_ctx *k@ = pointer to context to initialize
69 * @const void *buf@ = pointer to buffer of key material
70 * @size_t sz@ = size of the key material
74 * Use: Initializes a Noekeon context with a particular key. This
75 * uses indirect keying. The key must be 128 bits long.
78 extern void noekeon_init(noekeon_ctx */*k*/,
79 const void */*buf*/, size_t /*sz*/);
81 /* --- @noekeon_eblk@, @noekeon_dblk@ --- *
83 * Arguments: @const noekeon_ctx *k@ = pointer to Noekeon context
84 * @const uint32 s[4]@ = pointer to source block
85 * @uint32 d[4]@ = pointer to destination block
89 * Use: Low-level block encryption and decryption.
92 extern void noekeon_eblk(const noekeon_ctx */*k*/,
93 const uint32 */*s*/, uint32 */*dst*/);
94 extern void noekeon_dblk(const noekeon_ctx */*k*/,
95 const uint32 */*s*/, uint32 */*dst*/);
97 /*----- That's all, folks -------------------------------------------------*/