geniv.h 664 B

1234567891011121314151617181920212223242526
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * geniv: IV generation
  4. *
  5. * Copyright (c) 2015 Herbert Xu <herbert@gondor.apana.org.au>
  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. u8 salt[] __attribute__ ((aligned(__alignof__(u32))));
  16. };
  17. struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl,
  18. struct rtattr **tb);
  19. int aead_init_geniv(struct crypto_aead *tfm);
  20. void aead_exit_geniv(struct crypto_aead *tfm);
  21. #endif /* _CRYPTO_INTERNAL_GENIV_H */