-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CRYPTO] authenc: Move enckeylen into key itself
Having enckeylen as a template parameter makes it a pain for hardware devices that implement ciphers with many key sizes since each one would have to be registered separately. Since the authenc algorithm is mainly used for legacy purposes where its key is going to be constructed out of two separate keys, we can in fact embed this value into the key itself. This patch does this by prepending an rtnetlink header to the key that contains the encryption key length. Signed-off-by: Herbert Xu <[email protected]>
- Loading branch information
Showing
2 changed files
with
56 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Authenc: Simple AEAD wrapper for IPsec | ||
* | ||
* Copyright (c) 2007 Herbert Xu <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the Free | ||
* Software Foundation; either version 2 of the License, or (at your option) | ||
* any later version. | ||
* | ||
*/ | ||
#ifndef _CRYPTO_AUTHENC_H | ||
#define _CRYPTO_AUTHENC_H | ||
|
||
#include <linux/types.h> | ||
|
||
enum { | ||
CRYPTO_AUTHENC_KEYA_UNSPEC, | ||
CRYPTO_AUTHENC_KEYA_PARAM, | ||
}; | ||
|
||
struct crypto_authenc_key_param { | ||
__be32 enckeylen; | ||
}; | ||
|
||
#endif /* _CRYPTO_AUTHENC_H */ | ||
|