diff options
author | Mathias Krause <mathias.krause@secunet.com> | 2013-10-15 13:49:30 +0200 |
---|---|---|
committer | Victoria Milhoan <vicki.milhoan@freescale.com> | 2014-11-07 14:52:37 -0700 |
commit | 43691c783b8c91c9853de0b087a344139ff5062e (patch) | |
tree | debbeb422dc3e9176d807c3812c416d4092cb630 /include | |
parent | 1f4959dc9fee5ea70923b68316c0e2183bca7d3a (diff) |
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>
(cherry picked from commit bc6e2bdb71056607141ada309a185f0a50b1aeaf)
(cherry picked from commit e04ea19d6744a2eaaed0cef3400c590e790b0827)
Diffstat (limited to 'include')
-rw-r--r-- | include/crypto/authenc.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/crypto/authenc.h b/include/crypto/authenc.h index e47b044929a8..6775059539b5 100644 --- a/include/crypto/authenc.h +++ b/include/crypto/authenc.h @@ -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 */ |