]> code.ossystems Code Review - meta-freescale.git/blob
094fb0b5e7bc957a2992f9876d57c33c08472f75
[meta-freescale.git] /
1 From 434790a1bbafa371c0c6647238234573db98d017 Mon Sep 17 00:00:00 2001
2 From: Cristian Stoica <cristian.stoica@freescale.com>
3 Date: Thu, 29 Aug 2013 16:52:30 +0300
4 Subject: [[Patch][fsl 01/16] add support for composite TLS(SHA1,AES)
5  algorithm offload
6
7 Upstream-status: Pending
8
9 This adds support for composite algorithm offload in a single crypto
10 (cipher + hmac) operation.
11
12 It requires either software or hardware TLS support in the Linux kernel
13 and can be used with Freescale B*, P* and T* platforms that have support
14 for hardware TLS acceleration.
15
16 Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
17 Tested-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com>
18 ---
19  crypto/cryptodev.h |    1 +
20  ioctl.c            |    5 +++++
21  2 files changed, 6 insertions(+)
22
23 diff --git a/crypto/cryptodev.h b/crypto/cryptodev.h
24 index 7fb9c7d..c0e8cd4 100644
25 --- a/crypto/cryptodev.h
26 +++ b/crypto/cryptodev.h
27 @@ -50,6 +50,7 @@ enum cryptodev_crypto_op_t {
28         CRYPTO_SHA2_384,
29         CRYPTO_SHA2_512,
30         CRYPTO_SHA2_224_HMAC,
31 +       CRYPTO_TLS10_AES_CBC_HMAC_SHA1,
32         CRYPTO_ALGORITHM_ALL, /* Keep updated - see below */
33  };
34  
35 diff --git a/ioctl.c b/ioctl.c
36 index d4e83f4..a0f1db1 100644
37 --- a/ioctl.c
38 +++ b/ioctl.c
39 @@ -146,6 +146,11 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop)
40                 stream = 1;
41                 aead = 1;
42                 break;
43 +       case CRYPTO_TLS10_AES_CBC_HMAC_SHA1:
44 +               alg_name = "tls10(hmac(sha1),cbc(aes))";
45 +               stream = 0;
46 +               aead = 1;
47 +               break;
48         case CRYPTO_NULL:
49                 alg_name = "ecb(cipher_null)";
50                 stream = 1;
51 -- 
52 1.7.9.7
53