Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame^] | 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 | |
| 18 | struct des3_key_s { |
| 19 | u32 ek[3][32]; |
| 20 | u32 dk[3][32]; |
| 21 | }; |
| 22 | |
| 23 | void des_key_setup(const u8 *key, u32 *ek, u32 *dk); |
| 24 | void des_block_encrypt(const u8 *plain, const u32 *ek, u8 *crypt); |
| 25 | void des_block_decrypt(const u8 *crypt, const u32 *dk, u8 *plain); |
| 26 | |
| 27 | void des3_key_setup(const u8 *key, struct des3_key_s *dkey); |
| 28 | void des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt); |
| 29 | void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain); |
| 30 | |
| 31 | #endif /* DES_I_H */ |