summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/cryptodev/sdk_patches/0044-add-aes-256-xts-support-for-async-speed-test.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/cryptodev/sdk_patches/0044-add-aes-256-xts-support-for-async-speed-test.patch')
-rw-r--r--recipes-kernel/cryptodev/sdk_patches/0044-add-aes-256-xts-support-for-async-speed-test.patch64
1 files changed, 0 insertions, 64 deletions
diff --git a/recipes-kernel/cryptodev/sdk_patches/0044-add-aes-256-xts-support-for-async-speed-test.patch b/recipes-kernel/cryptodev/sdk_patches/0044-add-aes-256-xts-support-for-async-speed-test.patch
deleted file mode 100644
index 8a3c4f24..00000000
--- a/recipes-kernel/cryptodev/sdk_patches/0044-add-aes-256-xts-support-for-async-speed-test.patch
+++ /dev/null
@@ -1,64 +0,0 @@
1From 6a89ac4c49068d4225f4c1cc94a1d20b3d174b3f Mon Sep 17 00:00:00 2001
2From: Radu Alexe <raduandrei.alexe@freescale.com>
3Date: Sat, 22 Oct 2016 21:55:25 +0300
4Subject: [PATCH 044/104] add aes-256-xts support for async speed test
5
6Signed-off-by: Radu Alexe <raduandrei.alexe@freescale.com>
7---
8 ioctl.c | 3 +++
9 tests/async_speed.c | 25 +++++++++++++++++++++++++
10 2 files changed, 28 insertions(+)
11
12diff --git a/ioctl.c b/ioctl.c
13index 8d81b56..ca3c5ac 100644
14--- a/ioctl.c
15+++ b/ioctl.c
16@@ -172,6 +172,9 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop)
17 case CRYPTO_AES_ECB:
18 alg_name = "ecb(aes)";
19 break;
20+ case CRYPTO_AES_XTS:
21+ alg_name = "xts(aes)";
22+ break;
23 case CRYPTO_CAMELLIA_CBC:
24 alg_name = "cbc(camellia)";
25 break;
26diff --git a/tests/async_speed.c b/tests/async_speed.c
27index 1188599..39a3d23 100644
28--- a/tests/async_speed.c
29+++ b/tests/async_speed.c
30@@ -211,6 +211,31 @@ int main(void)
31 break;
32 }
33
34+ fprintf(stderr, "\nTesting AES-256-XTS cipher: \n");
35+ memset(&sess, 0, sizeof(sess));
36+ sess.cipher = CRYPTO_AES_XTS;
37+ sess.keylen = 32;
38+ memset(keybuf, 0x42, sess.keylen);
39+ sess.key = (unsigned char *)keybuf;
40+ if (ioctl(fdc, CIOCGSESSION, &sess)) {
41+ perror("ioctl(CIOCGSESSION)");
42+ return 1;
43+ }
44+#ifdef CIOCGSESSINFO
45+ siop.ses = sess.ses;
46+ if (ioctl(fdc, CIOCGSESSINFO, &siop)) {
47+ perror("ioctl(CIOCGSESSION)");
48+ return 1;
49+ }
50+ alignmask = siop.alignmask;
51+#endif
52+
53+ for (i = 256; i <= (64 * 1024); i *= 2) {
54+ if (encrypt_data(&sess, fdc, i, alignmask))
55+ break;
56+ }
57+
58+end:
59 close(fdc);
60 close(fd);
61 return 0;
62--
632.10.2
64