wolfcaam_aes.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* wolfcaam_aes.h
  2. *
  3. * Copyright (C) 2006-2023 wolfSSL Inc.
  4. *
  5. * This file is part of wolfSSL.
  6. *
  7. * wolfSSL is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * wolfSSL is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  20. */
  21. #include <wolfssl/wolfcrypt/settings.h>
  22. #ifndef WOLFCAAM_AES_H
  23. #define WOLFCAAM_AES_H
  24. #if !defined(NO_AES) && defined(WOLFSSL_CAAM)
  25. #include <wolfssl/wolfcrypt/aes.h>
  26. WOLFSSL_LOCAL int wc_CAAM_AesCcmEncrypt(Aes* aes, const byte* in, byte* out,
  27. word32 sz, const byte* nonce, word32 nonceSz, byte* authTag,
  28. word32 authTagSz, const byte* authIn, word32 authInSz);
  29. WOLFSSL_LOCAL int wc_CAAM_AesCcmDecrypt(Aes* aes, const byte* in, byte* out,
  30. word32 sz, const byte* nonce, word32 nonceSz, const byte* authTag,
  31. word32 authTagSz, const byte* authIn, word32 authInSz);
  32. WOLFSSL_LOCAL int wc_CAAM_AesGcmEncrypt(Aes* aes, const byte* in, byte* out,
  33. word32 sz, const byte* nonce, word32 nonceSz, byte* authTag,
  34. word32 authTagSz, const byte* authIn, word32 authInSz);
  35. WOLFSSL_LOCAL int wc_CAAM_AesGcmDecrypt(Aes* aes, const byte* in, byte* out,
  36. word32 sz, const byte* nonce, word32 nonceSz, const byte* authTag,
  37. word32 authTagSz, const byte* authIn, word32 authInSz);
  38. WOLFSSL_LOCAL int wc_CAAM_AesCtrEncrypt(Aes* aes, byte* out, const byte* in,
  39. word32 sz);
  40. WOLFSSL_LOCAL int wc_CAAM_AesCbcEncrypt(Aes* aes, byte* out, const byte* in,
  41. word32 sz);
  42. WOLFSSL_LOCAL int wc_CAAM_AesCbcDecrypt(Aes* aes, byte* out, const byte* in,
  43. word32 sz);
  44. WOLFSSL_LOCAL int wc_CAAM_AesEcbEncrypt(Aes* aes, byte* out, const byte* in,
  45. word32 sz);
  46. WOLFSSL_LOCAL int wc_CAAM_AesEcbDecrypt(Aes* aes, byte* out, const byte* in,
  47. word32 sz);
  48. #endif /* WOLFSSL_CAAM && !NO_AES */
  49. #endif /* WOLFCAAM_AES_H */