blob: c9563d2204551ff8c4007c8ef82e77ae3253984f [file] [log] [blame]
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07001/*
2 * DES and 3DES-EDE ciphers
3 * Copyright (c) 2006-2009, Jouni Malinen <j@w1.fi>
4 *
Dmitry Shmidtc5ec7f52012-03-06 16:33:24 -08005 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07007 */
8
9#ifndef DES_I_H
10#define DES_I_H
11
12struct des3_key_s {
13 u32 ek[3][32];
14 u32 dk[3][32];
15};
16
17void des_key_setup(const u8 *key, u32 *ek, u32 *dk);
18void des_block_encrypt(const u8 *plain, const u32 *ek, u8 *crypt);
19void des_block_decrypt(const u8 *crypt, const u32 *dk, u8 *plain);
20
21void des3_key_setup(const u8 *key, struct des3_key_s *dkey);
22void des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt);
23void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain);
24
25#endif /* DES_I_H */