1e5b75505Sopenharmony_ci/* 2e5b75505Sopenharmony_ci * DES and 3DES-EDE ciphers 3e5b75505Sopenharmony_ci * Copyright (c) 2006-2009, Jouni Malinen <j@w1.fi> 4e5b75505Sopenharmony_ci * 5e5b75505Sopenharmony_ci * This software may be distributed under the terms of the BSD license. 6e5b75505Sopenharmony_ci * See README for more details. 7e5b75505Sopenharmony_ci */ 8e5b75505Sopenharmony_ci 9e5b75505Sopenharmony_ci#ifndef DES_I_H 10e5b75505Sopenharmony_ci#define DES_I_H 11e5b75505Sopenharmony_ci 12e5b75505Sopenharmony_cistruct des3_key_s { 13e5b75505Sopenharmony_ci u32 ek[3][32]; 14e5b75505Sopenharmony_ci u32 dk[3][32]; 15e5b75505Sopenharmony_ci}; 16e5b75505Sopenharmony_ci 17e5b75505Sopenharmony_civoid des_key_setup(const u8 *key, u32 *ek, u32 *dk); 18e5b75505Sopenharmony_civoid des_block_encrypt(const u8 *plain, const u32 *ek, u8 *crypt); 19e5b75505Sopenharmony_civoid des_block_decrypt(const u8 *crypt, const u32 *dk, u8 *plain); 20e5b75505Sopenharmony_ci 21e5b75505Sopenharmony_civoid des3_key_setup(const u8 *key, struct des3_key_s *dkey); 22e5b75505Sopenharmony_civoid des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt); 23e5b75505Sopenharmony_civoid des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain); 24e5b75505Sopenharmony_ci 25e5b75505Sopenharmony_ci#endif /* DES_I_H */ 26