Yanray Wang
004a60c087
aes.c: remove non-functional code
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-08 19:05:31 +08:00
Yanray Wang
4995e0c31b
cipher.c: return error for ECB-decrypt under BLOCK_CIPHER_NO_DECRYPT
...
- fix remaining dependency in test_suite_psa_crypto.data
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-07 17:51:32 +08:00
Yanray Wang
bc29aefdea
all.sh: test BLOCK_CIPHER_NO_DECRYPT in build_aes_variations
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-06 11:14:38 +08:00
Yanray Wang
53479573a0
ChangeLog: rewrite ChangeLog for block-cipher-no-decrypt
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-06 10:02:10 +08:00
Yanray Wang
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
Yanray Wang
956aa00202
check_config: add checks for MBEDTLS_BLOCK_CIPHER_NO_DECRYPT with PSA
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-06 10:02:10 +08:00
Yanray Wang
f149640021
all.sh: add components to test BLOCK_CIPHER_NO_DECRYPT with PSA
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-06 10:02:10 +08:00
Yanray Wang
de0e2599ad
cipher_wrap.c: remove unnecessary NO_DECRYPT guard for DES
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-06 10:02:10 +08:00
Yanray Wang
f24bbd987a
dh_client.c: modify prompt message
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-06 10:02:10 +08:00
Yanray Wang
be08908564
config.py: exclude MBEDTLS_BLOCK_CIPHER_NO_DECRYPT from full
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-06 10:01:42 +08:00
Yanray Wang
6b190d4f27
psa_information.py: generate dep for AES/ARIA/CAMELLIA ECB test case
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-03 17:37:22 +08:00
Yanray Wang
eefd2695d2
test_suite_psa_crypto: add dependency for decrypt test cases
...
If MBEDTLS_BLOCK_CIPHER_NO_DECRYPT, we can't test decrypt for
AES-ECB, so adding this dependency for some test cases
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-02 12:38:01 +08:00
Yanray Wang
66111393e4
all.sh: modify components to test BLOCK_CIPHER_NO_DECRYPT
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-02 12:38:01 +08:00
Yanray Wang
b799eea123
check_config: add checks for MBEDTLS_BLOCK_CIPHER_NO_DECRYPT
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-02 12:38:01 +08:00
Yanray Wang
e367e47be0
mbedtls_config: add new config option MBEDTLS_BLOCK_CIPHER_NO_DECRYPT
...
With the introduction of negative option
MBEDTLS_BLOCK_CIPHER_NO_DECRYPT, we don't need to implicitly enable
it through PSA.
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-11-02 12:36:41 +08:00
Yanray Wang
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
Yanray Wang
4b6595aa83
Merge remote-tracking branch 'origin/development' into support_cipher_encrypt_only
2023-10-17 11:13:00 +08:00
Dave Rodgman
2fde39a22c
Merge pull request #8283 from daverodgman/more-aes-checks
...
More AES guards testing and some fixes
2023-10-16 18:22:51 +00:00
Dave Rodgman
41bc798d7c
Tidy-up
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-16 14:04:21 +01:00
Dave Rodgman
f3803a1f71
Cleanup validation interface
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-16 13:47:15 +01:00
Yanray Wang
aa01ee303a
Merge remote-tracking branch 'origin/development' into support_cipher_encrypt_only
2023-10-16 17:38:32 +08:00
Gilles Peskine
28b56335bb
Merge pull request #7942 from tom-daubney-arm/psa_crypto_example_hash
...
Add example program for PSA hash
2023-10-13 15:22:58 +00:00
Bence Szépkúti
195411bb17
Merge pull request #8062 from yanrayw/save_stack_usage_pkwrite
...
pkwrite: use heap to save stack usage for writing keys in PEM string
2023-10-13 14:27:13 +00:00
Gilles Peskine
73cb6f85a5
Merge pull request #8360 from Mbed-TLS/revert-8352-iar-fixes
...
Revert "Fix a few IAR warnings" which breaks the CI
2023-10-13 13:11:40 +00:00
Dave Rodgman
2457bcd26c
Tidy up logic for MBEDTLS_MAYBE_UNUSED
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-13 12:31:45 +01:00
Dave Rodgman
cc88ccdda1
Include existing Makefile
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-13 12:25:23 +01:00
Gilles Peskine
9a32632577
Fix 3rdparty/Makefile.inc when included recursively
...
3rdparty/Makefile.inc could only be used when included from the primary
makefile passed to make. It could not be used directly, or included from a
makefile that is itself included. This was due to counting from the left of
$(MAKEFILE_LIST) instead of using the last element.
Since each include directive appends to $(MAKEFILE_LIST), when using it to
determine $(THIRDPARTY_DIR), we need to use a simply-expanded variable.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-10-13 12:25:18 +01:00
Gilles Peskine
97a6231b5c
Revert "Fix a few IAR warnings"
2023-10-13 11:39:53 +02:00
Dave Rodgman
2d67e3a07b
Merge pull request #8352 from daverodgman/iar-fixes
...
Fix a few IAR warnings
2023-10-13 09:20:28 +01:00
Tom Cosgrove
71f2e398bd
Merge pull request #8345 from mcagriaksoy/branch_issue_8344
...
Add missing casting size_t to int on ssl_tls13_keys.c
2023-10-12 18:39:33 +00:00
Dave Rodgman
584c8108b3
Use a block to save 12b
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-12 16:55:23 +01:00
Dave Rodgman
351a81c65d
Keep initialisation of p in its original location
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-12 16:36:05 +01:00
Dave Rodgman
bcb1818e19
Fix IAR 'transfer of control bypasses initialization' warnings
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-12 16:23:11 +01:00
Dave Rodgman
4b779bef9e
Merge branch 'development' into more-aes-checks
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-10-12 16:17:10 +01:00
Dave Rodgman
54bb76e106
Merge pull request #8348 from kasjer/kasjer/aes-rcon-rename
...
Rename local variable in aes.c
2023-10-12 12:30:35 +00:00
Thomas Daubney
2e67781e93
Alter program layout for better clarity
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-10-12 10:46:43 +01:00
Bence Szépkúti
9b0c8164eb
Merge pull request #8330 from KloolK/extern-c
...
Fix C++ build issue when MBEDTLS_ASN1_PARSE_C is not enabled
2023-10-11 16:19:39 +00:00
Thomas Daubney
a21c972941
Remove extra blank line
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-10-11 17:17:32 +01:00
Jerzy Kasenberg
ee62fceade
Rename local variable in aes.c
...
This changes local variable name RCON to round_constants.
RCON being definition in xc32 compiler headers for some PIC32 register.
Without this change, mynewt project for PIC32 platform fails to build due to
macro redefinition.
This does not changes behavior of library in any way.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-10-11 16:36:24 +02:00
Thomas Daubney
d8453bb184
Remove superfluous comment
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-10-11 15:29:02 +01:00
Thomas Daubney
cd79f77439
Add missing newline
...
Newline character was missing from end of print
statement.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-10-11 15:28:13 +01:00
Thomas Daubney
1c2378b8b1
Add variable for message length
...
Add variable to store message length to increase
clarity in what the program is doing.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-10-11 15:19:38 +01:00
Mehmet Cagri Aksoy
56e9011bde
Add casting size_t to int
...
Signed-off-by: Mehmet Cagri Aksoy <mcagriaksoy@yandex.com>
2023-10-11 15:28:06 +02:00
Mehmet Cagri Aksoy
66f9b3f810
Add casting size_t to int
...
Signed-off-by: Mehmet Cagri Aksoy <mcagriaksoy@yandex.com>
2023-10-11 15:26:23 +02:00
Tom Cosgrove
3c1cdc9061
Merge pull request #8185 from yanrayw/aes_benchmark_cfb
...
Benchmark: add AES_CFB128 and AES_CFB8
2023-10-11 09:48:27 +00:00
Bence Szépkúti
cffd7135c6
Merge pull request #8328 from yanrayw/sha256_context_guard
...
sha256_context: guard is224 by MBEDTLS_SHA224_C
2023-10-11 09:13:33 +00:00
Thomas Daubney
34500874ce
Remove trailing white space in documentation
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-10-11 10:04:54 +01:00
Ronald Cron
a89d2ba132
Merge pull request #8327 from ronald-cron-arm/adapt-psa-crypto-repo-name
...
Adapt to new PSA Crypto repo name
2023-10-11 06:45:30 +00:00
Thomas Daubney
760538885a
Inform user when unknown hash algorithm supplied
...
Excplictly inform the user that their hash algorithm
selection is invalid.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-10-10 17:38:53 +01:00
Thomas Daubney
86f9795b00
Update documentation
...
Add further information about PSA hashing to the
comment at the beginning of the code.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-10-10 16:50:49 +01:00