geniv.h 702 B

123456789101112131415161718192021222324252627
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * geniv: IV generation
  4. *
  5. * Copyright (c) 2015 Herbert Xu <[email protected]>
  6. */
  7. #ifndef _CRYPTO_INTERNAL_GENIV_H
  8. #define _CRYPTO_INTERNAL_GENIV_H
  9. #include <crypto/internal/aead.h>
  10. #include <linux/spinlock.h>
  11. #include <linux/types.h>
  12. struct aead_geniv_ctx {
  13. spinlock_t lock;
  14. struct crypto_aead *child;
  15. struct crypto_sync_skcipher *sknull;
  16. u8 salt[] __attribute__ ((aligned(__alignof__(u32))));
  17. };
  18. struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl,
  19. struct rtattr **tb);
  20. int aead_init_geniv(struct crypto_aead *tfm);
  21. void aead_exit_geniv(struct crypto_aead *tfm);
  22. #endif /* _CRYPTO_INTERNAL_GENIV_H */