des_i.h revision 214501
1214501Srpaulo/*
2214501Srpaulo * DES and 3DES-EDE ciphers
3214501Srpaulo * Copyright (c) 2006-2009, Jouni Malinen <j@w1.fi>
4214501Srpaulo *
5214501Srpaulo * This program is free software; you can redistribute it and/or modify
6214501Srpaulo * it under the terms of the GNU General Public License version 2 as
7214501Srpaulo * published by the Free Software Foundation.
8214501Srpaulo *
9214501Srpaulo * Alternatively, this software may be distributed under the terms of BSD
10214501Srpaulo * license.
11214501Srpaulo *
12214501Srpaulo * See README and COPYING for more details.
13214501Srpaulo */
14214501Srpaulo
15214501Srpaulo#ifndef DES_I_H
16214501Srpaulo#define DES_I_H
17214501Srpaulo
18214501Srpaulostruct des3_key_s {
19214501Srpaulo	u32 ek[3][32];
20214501Srpaulo	u32 dk[3][32];
21214501Srpaulo};
22214501Srpaulo
23214501Srpaulovoid des_key_setup(const u8 *key, u32 *ek, u32 *dk);
24214501Srpaulovoid des_block_encrypt(const u8 *plain, const u32 *ek, u8 *crypt);
25214501Srpaulovoid des_block_decrypt(const u8 *crypt, const u32 *dk, u8 *plain);
26214501Srpaulo
27214501Srpaulovoid des3_key_setup(const u8 *key, struct des3_key_s *dkey);
28214501Srpaulovoid des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt);
29214501Srpaulovoid des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain);
30214501Srpaulo
31214501Srpaulo#endif /* DES_I_H */
32