des_i.h revision 8d520ff1dc2da35cdca849e982051b86468016d8
1/*
2 * DES and 3DES-EDE ciphers
3 * Copyright (c) 2006-2009, Jouni Malinen <j@w1.fi>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * Alternatively, this software may be distributed under the terms of BSD
10 * license.
11 *
12 * See README and COPYING for more details.
13 */
14
15#ifndef DES_I_H
16#define DES_I_H
17
18struct des3_key_s {
19	u32 ek[3][32];
20	u32 dk[3][32];
21};
22
23void des_key_setup(const u8 *key, u32 *ek, u32 *dk);
24void des_block_encrypt(const u8 *plain, const u32 *ek, u8 *crypt);
25void des_block_decrypt(const u8 *crypt, const u32 *dk, u8 *plain);
26
27void des3_key_setup(const u8 *key, struct des3_key_s *dkey);
28void des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt);
29void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain);
30
31#endif /* DES_I_H */
32