geode-aes.h 770 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* Copyright (C) 2003-2006, Advanced Micro Devices, Inc.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation; either version 2 of the License, or
  6. * (at your option) any later version.
  7. */
  8. #ifndef _GEODE_AES_H_
  9. #define _GEODE_AES_H_
  10. #define AES_KEY_LENGTH 16
  11. #define AES_IV_LENGTH 16
  12. #define AES_MIN_BLOCK_SIZE 16
  13. #define AES_MODE_ECB 0
  14. #define AES_MODE_CBC 1
  15. #define AES_DIR_DECRYPT 0
  16. #define AES_DIR_ENCRYPT 1
  17. #define AES_FLAGS_USRKEY (1 << 0)
  18. #define AES_FLAGS_COHERENT (1 << 1)
  19. struct geode_aes_op {
  20. void *src;
  21. void *dst;
  22. u32 mode;
  23. u32 dir;
  24. u32 flags;
  25. int len;
  26. u8 key[AES_KEY_LENGTH];
  27. u8 iv[AES_IV_LENGTH];
  28. };
  29. #endif