Commit graph

30 commits

Author SHA1 Message Date
Jerry Yu
f65f71eef3 improve various issues
- duplicate definition
- wrong comments
- redundant include statement

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-28 10:58:24 +08:00
Jerry Yu
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
Dave Rodgman
f2249ec905 Rename mbedtls_aesce_has_support macro to satisfy case rules
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-20 20:20:12 +01:00
Dave Rodgman
b30adce7fd Use -1 as uninitialised marker
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-20 20:20:12 +01:00
Dave Rodgman
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
Jerry Yu
9c0b7d13bf Remove unnecessary name check tag
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-04 17:25:59 +08:00
Jerry Yu
02b1519ab6 move accelerator checks to aes.c
Origin position is always validate due to conflict
between the guards in `aes.c` and module undef check

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:02 +08:00
Jerry Yu
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
Jerry Yu
8840a8c574 fix wrong checks
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:44:00 +08:00
Jerry Yu
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
Jerry Yu
4d030f3acd Add check for no aes implementation provided
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:43:59 +08:00
Jerry Yu
315fd30201 Rename plain c disable option
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-02 17:43:59 +08:00
Jerry Yu
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
Dave Rodgman
48fd2ab5d5 Improve readability of unrolled AESCE code
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-16 09:36:50 +01:00
Dave Rodgman
96fdfb8e62 Unroll aesce_encrypt_block
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-15 16:26:20 +01:00
Jerry Yu
61c4cfa2a7 Add compiler version checks.
When `MBEDTLS_AESCE_C` enabled and the compiler
is not expected, we should raise error to user.

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-04-26 13:06:01 +08:00
Jerry Yu
f015a93f98 Add msvc version document
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-04-25 10:38:03 +08:00
Jerry Yu
8f0e3d4c22 fix wrong compiler checks
- Add msc version check
- remove HAVE_ASM due to conflict with check_config

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-04-25 10:24:53 +08:00
Jerry Yu
07d28d8598 Add msvc build for aesce module
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-04-20 10:32:36 +08:00
Dave Rodgman
c5807a6fa8
Merge pull request #6918 from yuhaoth/pr/add-gcm-with-armv8-crypto-extension
Add GCM  with armv8 crypto extension
2023-03-20 14:45:14 +00:00
Dave Rodgman
f918d42332 Tidy up ARMCE terminology
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-03-17 17:52:23 +00:00
Jerry Yu
df87a12c81 Add GCM support
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-03-15 09:57:32 +08:00
Jerry Yu
608e1093de Improve comment about conflicts between aesce and sha512-crypto
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-28 12:50:00 +08:00
Jerry Yu
ba1e78f1c2 fix code style and comment issues
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-24 11:18:16 +08:00
Jerry Yu
c8bcdc8b91 fix various issues
- Improve some function names
- Improve comments
- improve readability

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-21 15:16:20 +08:00
Jerry Yu
2bb3d8101f Add en(de)crypt routine
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-07 17:11:53 +08:00
Jerry Yu
e096da1af6 Add inverse key function
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-07 17:11:52 +08:00
Jerry Yu
3f2fb71072 Add key expansion for encrypt
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-07 17:11:52 +08:00
Jerry Yu
b95c776c43 Add linux runtime detection
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-07 17:11:52 +08:00
Jerry Yu
49231319fd Add empty aesce files
For time being, we only support gcc and clang

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-07 17:11:52 +08:00