common.h (7ba9cd4e22a0c177a222669fc58ab300903b63e8) common.h (9363efb4181c5e0fbf86bdfa759262aa29f0eb50)
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
4 */
5
6#ifndef _COMMON_H_
7#define _COMMON_H_
8
9#include <linux/crypto.h>
10#include <linux/types.h>
11#include <crypto/aes.h>
12#include <crypto/hash.h>
13#include <crypto/internal/skcipher.h>
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
4 */
5
6#ifndef _COMMON_H_
7#define _COMMON_H_
8
9#include <linux/crypto.h>
10#include <linux/types.h>
11#include <crypto/aes.h>
12#include <crypto/hash.h>
13#include <crypto/internal/skcipher.h>
14#include <crypto/internal/aead.h>
14
15/* xts du size */
16#define QCE_SECTOR_SIZE 512
17
18/* key size in bytes */
19#define QCE_SHA_HMAC_KEY_SIZE 64
20#define QCE_MAX_CIPHER_KEY_SIZE AES_KEYSIZE_256
21

--- 61 unchanged lines hidden (view full) ---

83struct qce_alg_template {
84 struct list_head entry;
85 u32 crypto_alg_type;
86 unsigned long alg_flags;
87 const u32 *std_iv;
88 union {
89 struct skcipher_alg skcipher;
90 struct ahash_alg ahash;
15
16/* xts du size */
17#define QCE_SECTOR_SIZE 512
18
19/* key size in bytes */
20#define QCE_SHA_HMAC_KEY_SIZE 64
21#define QCE_MAX_CIPHER_KEY_SIZE AES_KEYSIZE_256
22

--- 61 unchanged lines hidden (view full) ---

84struct qce_alg_template {
85 struct list_head entry;
86 u32 crypto_alg_type;
87 unsigned long alg_flags;
88 const u32 *std_iv;
89 union {
90 struct skcipher_alg skcipher;
91 struct ahash_alg ahash;
92 struct aead_alg aead;
91 } alg;
92 struct qce_device *qce;
93 const u8 *hash_zero;
94 const u32 digest_size;
95};
96
97void qce_cpu_to_be32p_array(__be32 *dst, const u8 *src, unsigned int len);
98int qce_check_status(struct qce_device *qce, u32 *status);
99void qce_get_version(struct qce_device *qce, u32 *major, u32 *minor, u32 *step);
100int qce_start(struct crypto_async_request *async_req, u32 type);
101
102#endif /* _COMMON_H_ */
93 } alg;
94 struct qce_device *qce;
95 const u8 *hash_zero;
96 const u32 digest_size;
97};
98
99void qce_cpu_to_be32p_array(__be32 *dst, const u8 *src, unsigned int len);
100int qce_check_status(struct qce_device *qce, u32 *status);
101void qce_get_version(struct qce_device *qce, u32 *major, u32 *minor, u32 *step);
102int qce_start(struct crypto_async_request *async_req, u32 type);
103
104#endif /* _COMMON_H_ */