summaryrefslogtreecommitdiffstats
path: root/include/crypto/aes_platform.h
diff options
context:
space:
mode:
authorTom Cosgrove <tom.cosgrove@arm.com>2023-01-28 18:43:30 +0000
committerTomas Mraz <tomas@openssl.org>2023-02-08 17:16:00 +0100
commitfba380886409d240e369986a3ff37f3669e21656 (patch)
tree89affd5cc668369204e2a963888248b2af52f056 /include/crypto/aes_platform.h
parent13ca68791ff9fb47598eefbda7fe3fedd3c1430e (diff)
Fix the return values of the aarch64 unroll8_eor_aes_gcm_*_*_kernel functions
These aren't currently checked when they are called in cipher_aes_gcm_hw_armv8.inc, but they are declared as returning as size_t the number of bytes they have processed, and the aes_gcm_*_*_kernel (unroll by 4) versions of these do return the correct values. Change-Id: Ic3eaf139e36e29e8779b5bd8b867c08fde37a337 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20191) (cherry picked from commit 4596c20b86871b2bb0f9a7f6b855c0b7f0d4fbf3)
Diffstat (limited to 'include/crypto/aes_platform.h')
-rw-r--r--include/crypto/aes_platform.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/aes_platform.h b/include/crypto/aes_platform.h
index 8159f2a092..5572e52a43 100644
--- a/include/crypto/aes_platform.h
+++ b/include/crypto/aes_platform.h
@@ -119,6 +119,8 @@ void gcm_ghash_p8(u64 Xi[2],const u128 Htable[16],const u8 *inp, size_t len);
# define AES_gcm_decrypt armv8_aes_gcm_decrypt
# define AES_GCM_ASM(gctx) ((gctx)->ctr==aes_v8_ctr32_encrypt_blocks && \
(gctx)->gcm.funcs.ghash==gcm_ghash_v8)
+/* The [unroll8_eor3_]aes_gcm_(enc|dec)_(128|192|256)_kernel() functions
+ * take input length in BITS and return number of BYTES processed */
size_t aes_gcm_enc_128_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext,
uint64_t *Xi, unsigned char ivec[16], const void *key);
size_t aes_gcm_enc_192_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext,