crypto: authenc - Export key parsing helper function

AEAD key parsing is duplicated to multiple places in the kernel. Add a
common helper function to consolidate that functionality.

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Mathias Krause <mathias.krause@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Mathias Krause
2013-10-15 13:49:30 +02:00
committed by Herbert Xu
parent 6d3aab4ebe
commit bc6e2bdb71
2 changed files with 41 additions and 19 deletions
+11 -1
View File
@@ -23,5 +23,15 @@ struct crypto_authenc_key_param {
__be32 enckeylen;
};
#endif /* _CRYPTO_AUTHENC_H */
struct crypto_authenc_keys {
const u8 *authkey;
const u8 *enckey;
unsigned int authkeylen;
unsigned int enckeylen;
};
int crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key,
unsigned int keylen);
#endif /* _CRYPTO_AUTHENC_H */