18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Authenc: Simple AEAD wrapper for IPsec
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (c) 2007 Herbert Xu <herbert@gondor.apana.org.au>
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci#ifndef _CRYPTO_AUTHENC_H
88c2ecf20Sopenharmony_ci#define _CRYPTO_AUTHENC_H
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#include <linux/types.h>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_cienum {
138c2ecf20Sopenharmony_ci	CRYPTO_AUTHENC_KEYA_UNSPEC,
148c2ecf20Sopenharmony_ci	CRYPTO_AUTHENC_KEYA_PARAM,
158c2ecf20Sopenharmony_ci};
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_cistruct crypto_authenc_key_param {
188c2ecf20Sopenharmony_ci	__be32 enckeylen;
198c2ecf20Sopenharmony_ci};
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_cistruct crypto_authenc_keys {
228c2ecf20Sopenharmony_ci	const u8 *authkey;
238c2ecf20Sopenharmony_ci	const u8 *enckey;
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci	unsigned int authkeylen;
268c2ecf20Sopenharmony_ci	unsigned int enckeylen;
278c2ecf20Sopenharmony_ci};
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ciint crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key,
308c2ecf20Sopenharmony_ci			       unsigned int keylen);
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci#endif	/* _CRYPTO_AUTHENC_H */
33