des_i.h revision 214734
193250Sphk/*
293250Sphk * DES and 3DES-EDE ciphers
393250Sphk * Copyright (c) 2006-2009, Jouni Malinen <j@w1.fi>
493250Sphk *
593250Sphk * This program is free software; you can redistribute it and/or modify
693250Sphk * it under the terms of the GNU General Public License version 2 as
793250Sphk * published by the Free Software Foundation.
893250Sphk *
993250Sphk * Alternatively, this software may be distributed under the terms of BSD
1093250Sphk * license.
1193250Sphk *
1293250Sphk * See README and COPYING for more details.
1393250Sphk */
1493250Sphk
1593250Sphk#ifndef DES_I_H
1693250Sphk#define DES_I_H
1793250Sphk
1893250Sphkstruct des3_key_s {
1993250Sphk	u32 ek[3][32];
2093250Sphk	u32 dk[3][32];
2193250Sphk};
2293250Sphk
2393250Sphkvoid des_key_setup(const u8 *key, u32 *ek, u32 *dk);
2493250Sphkvoid des_block_encrypt(const u8 *plain, const u32 *ek, u8 *crypt);
2593250Sphkvoid des_block_decrypt(const u8 *crypt, const u32 *dk, u8 *plain);
2693250Sphk
2793250Sphkvoid des3_key_setup(const u8 *key, struct des3_key_s *dkey);
2893250Sphkvoid des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt);
2993250Sphkvoid des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain);
3093250Sphk
3193250Sphk#endif /* DES_I_H */
3293250Sphk