mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
crypto: inside-secure - Move ipad/opad into safexcel_context
As both safexcel_ahash_ctx and safexcel_cipher_ctx contain ipad and opad buffers this patch moves them into the common struct safexcel_context. It also adds a union so that they can be accessed in the appropriate endian without crazy casts. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -12,7 +12,9 @@
|
||||
#include <crypto/algapi.h>
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <crypto/sha.h>
|
||||
#include <crypto/sha3.h>
|
||||
#include <crypto/skcipher.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#define EIP197_HIA_VERSION_BE 0xca35
|
||||
#define EIP197_HIA_VERSION_LE 0x35ca
|
||||
@@ -835,6 +837,13 @@ struct safexcel_context {
|
||||
struct safexcel_crypto_priv *priv;
|
||||
dma_addr_t ctxr_dma;
|
||||
|
||||
union {
|
||||
__le32 le[SHA3_512_BLOCK_SIZE / 4];
|
||||
__be32 be[SHA3_512_BLOCK_SIZE / 4];
|
||||
u32 word[SHA3_512_BLOCK_SIZE / 4];
|
||||
u8 byte[SHA3_512_BLOCK_SIZE];
|
||||
} ipad, opad;
|
||||
|
||||
int ring;
|
||||
bool needs_inv;
|
||||
bool exit_inv;
|
||||
|
||||
Reference in New Issue
Block a user