Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _IPXE_AES_H
  2. #define _IPXE_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. /* AXTLS functions */
  18. extern void axtls_aes_encrypt ( const AES_CTX *ctx, uint32_t *data );
  19. extern void axtls_aes_decrypt ( const AES_CTX *ctx, uint32_t *data );
  20. extern struct cipher_algorithm aes_algorithm;
  21. extern struct cipher_algorithm aes_ecb_algorithm;
  22. extern struct cipher_algorithm aes_cbc_algorithm;
  23. int aes_wrap ( const void *kek, const void *src, void *dest, int nblk );
  24. int aes_unwrap ( const void *kek, const void *src, void *dest, int nblk );
  25. #endif /* _IPXE_AES_H */