authenc.h 845 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Authenc: Simple AEAD wrapper for IPsec
  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_AUTHENC_H
  13. #define _CRYPTO_AUTHENC_H
  14. #include <linux/types.h>
  15. enum {
  16. CRYPTO_AUTHENC_KEYA_UNSPEC,
  17. CRYPTO_AUTHENC_KEYA_PARAM,
  18. };
  19. struct crypto_authenc_key_param {
  20. __be32 enckeylen;
  21. };
  22. struct crypto_authenc_keys {
  23. const u8 *authkey;
  24. const u8 *enckey;
  25. unsigned int authkeylen;
  26. unsigned int enckeylen;
  27. };
  28. int crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key,
  29. unsigned int keylen);
  30. #endif /* _CRYPTO_AUTHENC_H */