hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/crypto/qce/common.h
....@@ -1,14 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 and
6
- * only version 2 as published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
124 */
135
146 #ifndef _COMMON_H_
....@@ -18,6 +10,10 @@
1810 #include <linux/types.h>
1911 #include <crypto/aes.h>
2012 #include <crypto/hash.h>
13
+#include <crypto/internal/skcipher.h>
14
+
15
+/* xts du size */
16
+#define QCE_SECTOR_SIZE 512
2117
2218 /* key size in bytes */
2319 #define QCE_SHA_HMAC_KEY_SIZE 64
....@@ -87,10 +83,12 @@
8783 unsigned long alg_flags;
8884 const u32 *std_iv;
8985 union {
90
- struct crypto_alg crypto;
86
+ struct skcipher_alg skcipher;
9187 struct ahash_alg ahash;
9288 } alg;
9389 struct qce_device *qce;
90
+ const u8 *hash_zero;
91
+ const u32 digest_size;
9492 };
9593
9694 void qce_cpu_to_be32p_array(__be32 *dst, const u8 *src, unsigned int len);