summaryrefslogtreecommitdiff
path: root/include/crypto
diff options
context:
space:
mode:
authorMathias Krause <mathias.krause@secunet.com>2013-10-15 11:49:30 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-09 21:15:09 (GMT)
commit63429b60a99ab3434d0fd79dd332d5f72de07ff8 (patch)
tree12bc3555d9d8df9bc1665c1d1ae3b5ce0fe0cd81 /include/crypto
parent5fd1325fd97a8365009f204091402e489efa6bc2 (diff)
downloadlinux-fsl-qoriq-63429b60a99ab3434d0fd79dd332d5f72de07ff8.tar.xz
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)
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/authenc.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/crypto/authenc.h b/include/crypto/authenc.h
index e47b044..6775059 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 */