mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 07:31:29 +00:00
109303336a
Relocate all crypto files in vmx driver to arch/powerpc/crypto directory and remove vmx directory. drivers/crypto/vmx/aes.c rename to arch/powerpc/crypto/aes.c drivers/crypto/vmx/aes_cbc.c rename to arch/powerpc/crypto/aes_cbc.c drivers/crypto/vmx/aes_ctr.c rename to arch/powerpc/crypto/aes_ctr.c drivers/crypto/vmx/aes_xts.c rename to arch/powerpc/crypto/aes_xts.c drivers/crypto/vmx/aesp8-ppc.h rename to arch/powerpc/crypto/aesp8-ppc.h drivers/crypto/vmx/aesp8-ppc.pl rename to arch/powerpc/crypto/aesp8-ppc.pl drivers/crypto/vmx/ghash.c rename to arch/powerpc/crypto/ghash.c drivers/crypto/vmx/ghashp8-ppc.pl rename to arch/powerpc/crypto/ghashp8-ppc.pl drivers/crypto/vmx/vmx.c rename to arch/powerpc/crypto/vmx.c deleted files: drivers/crypto/vmx/Makefile drivers/crypto/vmx/Kconfig drivers/crypto/vmx/ppc-xlate.pl This patch has been tested has passed the selftest. The patch is also tested with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled. Signed-off-by: Danny Tsen <dtsen@linux.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
31 lines
1.1 KiB
C
31 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#include <linux/types.h>
|
|
#include <crypto/aes.h>
|
|
|
|
struct aes_key {
|
|
u8 key[AES_MAX_KEYLENGTH];
|
|
int rounds;
|
|
};
|
|
|
|
extern struct shash_alg p8_ghash_alg;
|
|
extern struct crypto_alg p8_aes_alg;
|
|
extern struct skcipher_alg p8_aes_cbc_alg;
|
|
extern struct skcipher_alg p8_aes_ctr_alg;
|
|
extern struct skcipher_alg p8_aes_xts_alg;
|
|
|
|
int aes_p8_set_encrypt_key(const u8 *userKey, const int bits,
|
|
struct aes_key *key);
|
|
int aes_p8_set_decrypt_key(const u8 *userKey, const int bits,
|
|
struct aes_key *key);
|
|
void aes_p8_encrypt(const u8 *in, u8 *out, const struct aes_key *key);
|
|
void aes_p8_decrypt(const u8 *in, u8 *out, const struct aes_key *key);
|
|
void aes_p8_cbc_encrypt(const u8 *in, u8 *out, size_t len,
|
|
const struct aes_key *key, u8 *iv, const int enc);
|
|
void aes_p8_ctr32_encrypt_blocks(const u8 *in, u8 *out,
|
|
size_t len, const struct aes_key *key,
|
|
const u8 *iv);
|
|
void aes_p8_xts_encrypt(const u8 *in, u8 *out, size_t len,
|
|
const struct aes_key *key1, const struct aes_key *key2, u8 *iv);
|
|
void aes_p8_xts_decrypt(const u8 *in, u8 *out, size_t len,
|
|
const struct aes_key *key1, const struct aes_key *key2, u8 *iv);
|