]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: powerpc/aes - Rename struct aes_key
authorEric Biggers <ebiggers@kernel.org>
Mon, 12 Jan 2026 19:19:59 +0000 (11:19 -0800)
committerEric Biggers <ebiggers@kernel.org>
Mon, 12 Jan 2026 19:39:58 +0000 (11:39 -0800)
Rename struct aes_key in aesp8-ppc.h and aes-gcm-p10-glue.c to
p8_aes_key and p10_aes_key, respectively.  This frees up the name to use
in the library API in <crypto/aes.h>.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20260112192035.10427-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
arch/powerpc/crypto/aes-gcm-p10-glue.c
arch/powerpc/crypto/aes.c
arch/powerpc/crypto/aes_cbc.c
arch/powerpc/crypto/aes_ctr.c
arch/powerpc/crypto/aes_xts.c
arch/powerpc/crypto/aesp8-ppc.h

index 85f4fd4b1bdc5d9073bbd52d02a76c1c4359a71d..f3417436d3f79a3bd0c91dbf59b38c2b3996f908 100644 (file)
@@ -44,7 +44,7 @@ asmlinkage void gcm_ghash_p10(unsigned char *Xi, unsigned char *Htable,
                              unsigned char *aad, unsigned int alen);
 asmlinkage void gcm_update(u8 *iv, void *Xi);
 
-struct aes_key {
+struct p10_aes_key {
        u8 key[AES_MAX_KEYLENGTH];
        u64 rounds;
 };
@@ -63,7 +63,7 @@ struct Hash_ctx {
 };
 
 struct p10_aes_gcm_ctx {
-       struct aes_key enc_key;
+       struct p10_aes_key enc_key;
        u8 nonce[RFC4106_NONCE_SIZE];
 };
 
index 3f1e5e8949021e63721e0ea98e9441afe9c13371..b7192ee719fcd2a9f23cdabebb08ecc38e1dd03c 100644 (file)
@@ -21,8 +21,8 @@
 
 struct p8_aes_ctx {
        struct crypto_cipher *fallback;
-       struct aes_key enc_key;
-       struct aes_key dec_key;
+       struct p8_aes_key enc_key;
+       struct p8_aes_key dec_key;
 };
 
 static int p8_aes_init(struct crypto_tfm *tfm)
index 5f2a4f375eefeae525524251a3e5a28aed37399d..4a9f285f09708816494b80dda46f4f4c6b4d06b3 100644 (file)
@@ -21,8 +21,8 @@
 
 struct p8_aes_cbc_ctx {
        struct crypto_skcipher *fallback;
-       struct aes_key enc_key;
-       struct aes_key dec_key;
+       struct p8_aes_key enc_key;
+       struct p8_aes_key dec_key;
 };
 
 static int p8_aes_cbc_init(struct crypto_skcipher *tfm)
index e27c4036e711642067b8ead873ce9060deb3a894..7dbd06f442dba66fd4c4d68a61b17bbfa64a52ad 100644 (file)
@@ -21,7 +21,7 @@
 
 struct p8_aes_ctr_ctx {
        struct crypto_skcipher *fallback;
-       struct aes_key enc_key;
+       struct p8_aes_key enc_key;
 };
 
 static int p8_aes_ctr_init(struct crypto_skcipher *tfm)
index 9440e771cedec8f8e9bf419120c4d9d14f896e02..b4c760e465ea0b19bcc0563ffa56cef4bfd77413 100644 (file)
@@ -22,9 +22,9 @@
 
 struct p8_aes_xts_ctx {
        struct crypto_skcipher *fallback;
-       struct aes_key enc_key;
-       struct aes_key dec_key;
-       struct aes_key tweak_key;
+       struct p8_aes_key enc_key;
+       struct p8_aes_key dec_key;
+       struct p8_aes_key tweak_key;
 };
 
 static int p8_aes_xts_init(struct crypto_skcipher *tfm)
index 5764d443838850ef7ac04eaabb69aa33528c4d65..0bea010128cb93086a41aafe7d340c0e9109f4db 100644 (file)
@@ -2,7 +2,7 @@
 #include <linux/types.h>
 #include <crypto/aes.h>
 
-struct aes_key {
+struct p8_aes_key {
        u8 key[AES_MAX_KEYLENGTH];
        int rounds;
 };
@@ -14,17 +14,18 @@ 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);
+                          struct p8_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);
+                          struct p8_aes_key *key);
+void aes_p8_encrypt(const u8 *in, u8 *out, const struct p8_aes_key *key);
+void aes_p8_decrypt(const u8 *in, u8 *out, const struct p8_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);
+                       const struct p8_aes_key *key, u8 *iv, const int enc);
+void aes_p8_ctr32_encrypt_blocks(const u8 *in, u8 *out, size_t len,
+                                const struct p8_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);
+                       const struct p8_aes_key *key1,
+                       const struct p8_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);
+                       const struct p8_aes_key *key1,
+                       const struct p8_aes_key *key2, u8 *iv);