aead.h 920 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * AEAD: Authenticated Encryption with Associated Data
  3. *
  4. * Copyright (c) 2007 Herbert Xu <herbert@gondor.apana.org.au>
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the Free
  8. * Software Foundation; either version 2 of the License, or (at your option)
  9. * any later version.
  10. *
  11. */
  12. #ifndef _CRYPTO_AEAD_H
  13. #define _CRYPTO_AEAD_H
  14. #include <linux/crypto.h>
  15. #include <linux/kernel.h>
  16. /**
  17. * struct aead_givcrypt_request - AEAD request with IV generation
  18. * @seq: Sequence number for IV generation
  19. * @giv: Space for generated IV
  20. * @areq: The AEAD request itself
  21. */
  22. struct aead_givcrypt_request {
  23. u64 seq;
  24. u8 *giv;
  25. struct aead_request areq;
  26. };
  27. static inline struct crypto_aead *aead_givcrypt_reqtfm(
  28. struct aead_givcrypt_request *req)
  29. {
  30. return crypto_aead_reqtfm(&req->areq);
  31. }
  32. #endif /* _CRYPTO_AEAD_H */