You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

aes.h 689B

123456789101112131415161718192021222324252627282930
  1. #ifndef _GPXE_AES_H
  2. #define _GPXE_AES_H
  3. FILE_LICENCE ( GPL2_OR_LATER );
  4. struct cipher_algorithm;
  5. /** Basic AES blocksize */
  6. #define AES_BLOCKSIZE 16
  7. #include "crypto/axtls/crypto.h"
  8. /** AES context */
  9. struct aes_context {
  10. /** AES context for AXTLS */
  11. AES_CTX axtls_ctx;
  12. /** Cipher is being used for decrypting */
  13. int decrypting;
  14. };
  15. /** AES context size */
  16. #define AES_CTX_SIZE sizeof ( struct aes_context )
  17. extern struct cipher_algorithm aes_algorithm;
  18. extern struct cipher_algorithm aes_cbc_algorithm;
  19. int aes_wrap ( const void *kek, const void *src, void *dest, int nblk );
  20. int aes_unwrap ( const void *kek, const void *src, void *dest, int nblk );
  21. #endif /* _GPXE_AES_H */