| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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. |
|---|
| 12 | 4 | */ |
|---|
| 13 | 5 | |
|---|
| 14 | 6 | #ifndef _COMMON_H_ |
|---|
| .. | .. |
|---|
| 18 | 10 | #include <linux/types.h> |
|---|
| 19 | 11 | #include <crypto/aes.h> |
|---|
| 20 | 12 | #include <crypto/hash.h> |
|---|
| 13 | +#include <crypto/internal/skcipher.h> |
|---|
| 14 | + |
|---|
| 15 | +/* xts du size */ |
|---|
| 16 | +#define QCE_SECTOR_SIZE 512 |
|---|
| 21 | 17 | |
|---|
| 22 | 18 | /* key size in bytes */ |
|---|
| 23 | 19 | #define QCE_SHA_HMAC_KEY_SIZE 64 |
|---|
| .. | .. |
|---|
| 87 | 83 | unsigned long alg_flags; |
|---|
| 88 | 84 | const u32 *std_iv; |
|---|
| 89 | 85 | union { |
|---|
| 90 | | - struct crypto_alg crypto; |
|---|
| 86 | + struct skcipher_alg skcipher; |
|---|
| 91 | 87 | struct ahash_alg ahash; |
|---|
| 92 | 88 | } alg; |
|---|
| 93 | 89 | struct qce_device *qce; |
|---|
| 90 | + const u8 *hash_zero; |
|---|
| 91 | + const u32 digest_size; |
|---|
| 94 | 92 | }; |
|---|
| 95 | 93 | |
|---|
| 96 | 94 | void qce_cpu_to_be32p_array(__be32 *dst, const u8 *src, unsigned int len); |
|---|