b4cb8bef42
Fix remaining warnings from -Wshorten-64-to-32
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2024-02-13 13:41:16 +00:00
059f66ce7c
Remove redundant check
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-11-30 11:02:03 +00:00
6eee57bc07
Merge remote-tracking branch 'origin/development' into msft-aarch64
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-11-30 11:01:50 +00:00
12d1c3ad4f
Use MBEDTLS_HAVE_NEON_INTRINSICS in aesce
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-11-30 09:38:38 +00:00
59059ec503
Merge remote-tracking branch 'origin/development' into msft-aarch64
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-11-30 09:34:41 +00:00
410ad44725
Disable hw AES on Arm for IAR
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-11-28 13:42:17 +00:00
9fbac381e6
Merge pull request #8326 from daverodgman/aesce-thumb2
...
Support hw-accelerated AES on Thumb and Arm
2023-11-27 09:58:58 +00:00
a3b80386d9
Merge remote-tracking branch 'origin/development' into sign-conversion-part1
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-11-24 11:27:18 +00:00
690ee81533
Merge remote-tracking branch 'origin/development' into support_cipher_encrypt_only
2023-11-23 10:31:26 +08:00
e467d62042
Add casts for NEON
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-11-21 17:09:46 +00:00
e4a6f5a7ec
Use size_t cast for pointer subtractions
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-11-21 17:09:46 +00:00
c43479103a
aesce: fix unused parameter
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com >
2023-11-14 11:09:56 +08:00
111159b89c
BLOCK_CIPHER_NO_DECRYPT: call encrypt direction unconditionally
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com >
2023-11-10 15:03:23 +08:00
0d76b6ef76
Return an error if asking for decrypt under BLOCK_CIPHER_NO_DECRYPT
...
If MBEDTLS_BLOCK_CIPHER_NO_DECRYPT is enabled, but decryption is
still requested in some incompatible modes, we return an error of
FEATURE_UNAVAILABLE as additional indication.
Signed-off-by: Yanray Wang <yanray.wang@arm.com >
2023-11-06 10:02:10 +08:00
16799db69a
update headers
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-11-02 19:47:20 +00:00
b67b47425e
Rename MBEDTLS_CIPHER_ENCRYPT_ONLY as MBEDTLS_BLOCK_CIPHER_NO_DECRYPT
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com >
2023-10-31 17:22:06 +08:00
5e41937eba
Remove dependency on asm/hwcap.h
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-25 09:06:24 +01:00
9fd1b526c3
Use MBEDTLS_ARCH_IS_ARMV8_A not MBEDTLS_ARCH_IS_ARMV8
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-25 09:06:24 +01:00
cb5c9fb0c2
Add volatile to prevent asm being optimised out
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-25 09:06:24 +01:00
b34fe8b88b
Fix #error typo
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-25 09:06:24 +01:00
90291dfe33
Share some definitions that are common for clang and GCC 5
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-25 09:06:24 +01:00
46267f6a2d
Tidy-up: move GCM code into one place
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-25 09:06:24 +01:00
f4ee5d4c94
Code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-25 09:06:24 +01:00
2c25bdb7cf
Don't use #ifdef on vreinterpretq_xxx
...
Co-authored-by: Jerry Yu <jerry.h.yu@arm.com >
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-25 09:06:24 +01:00
f60e44d063
Add link to ACLE docs in comment
...
Co-authored-by: Jerry Yu <jerry.h.yu@arm.com >
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-25 09:06:24 +01:00
48b965d941
Update clang version requirements
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-25 09:06:24 +01:00
472a1906d5
fix tabs
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-25 09:06:24 +01:00
4b8e8dc043
Improve compiler version checking + docs + testing for armclang
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-25 09:06:24 +01:00
ece803b0ae
Fix behaviour for Armv8 targets without Neon
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-25 09:06:24 +01:00
851cf5a325
Fix runtime detection on A32/T32
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-25 09:06:24 +01:00
27e3c87fc1
Suppport AESCE on A32 and T32
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-25 09:06:22 +01:00
aa01ee303a
Merge remote-tracking branch 'origin/development' into support_cipher_encrypt_only
2023-10-16 17:38:32 +08:00
a0f10da9d2
Use MBEDTLS_HAVE_NEON_INTRINSICS instead of __ARM_NEON
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-10-16 09:25:59 +01:00
590c9b7abe
AESCE: add macro guard of CIPHER_ENCRYPT_ONLY
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com >
2023-09-01 16:39:28 +08:00
72fd0bdc71
replace arm64 macro and aesce enable flag
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-08-23 17:15:34 +08:00
b30adce7fd
Use -1 as uninitialised marker
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-08-20 20:20:12 +01:00
4566132163
Make mbedtls_aesce_has_support more efficient
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-08-20 20:20:12 +01:00
3660623e59
Rename plain c option and update comments
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-08-02 17:44:01 +08:00
3fcf2b5053
Rename HAS_NO_PLAIN_C to DONT_USE_SOFTWARE_CRYPTO
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-08-02 17:44:00 +08:00
315fd30201
Rename plain c disable option
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-08-02 17:43:59 +08:00
0d4f4e5b01
Add option to disable built-in aes implementation.
...
For time being, there are only two aes implementations for known
architectures. I define runtime detection function as const when
built-in was disabled. In this case, compiler will remove dead
built-in code.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-08-02 17:43:54 +08:00
893be8d10f
Replace cpu modifier flags
...
`crypto` should be replace with `aes`.
See https://arm-software.github.io/acle/main/acle.html#cryptographic-extensions
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-07-13 17:32:11 +08:00
b1d06bb29e
Add error message for old armclang
...
when armclang<6.10, cpu modifiers MUST be
specified on command line.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-07-13 10:40:29 +08:00
6b00f5a135
Add guards for arm_neon.h
...
See: https://arm-software.github.io/acle/main/acle.html#arm_neonh
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-07-13 10:40:28 +08:00
580e06fb07
fix armclang compile fail
...
`__ARM_FEATURE_AES` is not defined with `armclang < 6.10`.
And it raise error on `target("crypto,aes")
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-07-13 10:40:27 +08:00
08933d3dbb
fix compile fail for armclang
...
when target flags are not set at command line, armclang
will reports required feature not set error.
This is found and verified at 6.20.1. And it does not work
for 6.6
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2023-07-13 10:40:08 +08:00
aa4f621901
aesce: use correct target attribute when building with clang
...
Seems clang has its own issues when it comes to crypto extensions,
and right now the best way to avoid them is to accurately enable
the needed instructions instead of the broad crypto feature.
E.g.: https://github.com/llvm/llvm-project/issues/61645
Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com >
2023-07-04 21:15:52 +03:00
c8d81ad54d
Merge pull request #7784 from daverodgman/aesce-unroll
2023-07-04 18:41:13 +01:00
471a975942
aesce: do not specify an arch version when enabling crypto instructions
...
Building mbedtls with different aarch64 tuning variations revealed
that we should use the crypto extensions without forcing a particular
architecture version or core, as that can create issues.
Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com >
2023-06-25 21:10:53 +03:00
73b0c0b051
Improve comment
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-16 14:48:14 +01:00