Thomas Gleixner | 2874c5f | 2019-05-27 08:55:01 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Herbert Xu | e236d4a | 2007-11-22 23:11:53 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Authenc: Simple AEAD wrapper for IPsec |
| 4 | * |
| 5 | * Copyright (c) 2007 Herbert Xu <herbert@gondor.apana.org.au> |
Herbert Xu | e236d4a | 2007-11-22 23:11:53 +0800 | [diff] [blame] | 6 | */ |
| 7 | #ifndef _CRYPTO_AUTHENC_H |
| 8 | #define _CRYPTO_AUTHENC_H |
| 9 | |
| 10 | #include <linux/types.h> |
| 11 | |
| 12 | enum { |
| 13 | CRYPTO_AUTHENC_KEYA_UNSPEC, |
| 14 | CRYPTO_AUTHENC_KEYA_PARAM, |
| 15 | }; |
| 16 | |
| 17 | struct crypto_authenc_key_param { |
| 18 | __be32 enckeylen; |
| 19 | }; |
| 20 | |
Mathias Krause | bc6e2bd | 2013-10-15 13:49:30 +0200 | [diff] [blame] | 21 | struct crypto_authenc_keys { |
| 22 | const u8 *authkey; |
| 23 | const u8 *enckey; |
Herbert Xu | e236d4a | 2007-11-22 23:11:53 +0800 | [diff] [blame] | 24 | |
Mathias Krause | bc6e2bd | 2013-10-15 13:49:30 +0200 | [diff] [blame] | 25 | unsigned int authkeylen; |
| 26 | unsigned int enckeylen; |
| 27 | }; |
| 28 | |
| 29 | int crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key, |
| 30 | unsigned int keylen); |
| 31 | |
| 32 | #endif /* _CRYPTO_AUTHENC_H */ |