des_i.h 709 B

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