David Horstmann
fd9264e65b
Fix pylint errors
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 16:21:15 +01:00
Gilles Peskine
f3a41685e7
Merge pull request #8126 from daverodgman/p256-m-aarch64
...
Disable p256-m asm on aarch64
2023-08-29 14:15:08 +00:00
Gilles Peskine
a878b663cf
Merge pull request #8090 from silabs-Kusumit/PBKDF2_higher_cost_tests
...
PBKDF2: tests with higher input costs
2023-08-29 14:00:17 +00:00
David Horstmann
41c316d3b2
Move -B switch into a single argument
...
This will prevent CMake from mistaking the build directory for the
source directory
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 14:57:23 +01:00
Dave Rodgman
787011542b
Fully replace mbedtls_psa_safer_memcmp
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-29 14:20:18 +01:00
David Horstmann
b48822c816
Appease pylint by renaming variables
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 14:12:53 +01:00
David Horstmann
beaee2604f
Test PSA compliance: Build only the crypto target
...
Use CMake's -t option to build only the crypto target. Parameterize the
crypto target to have the right name depending on whether this is Mbed
TLS or PSA Crypto.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 14:01:52 +01:00
David Horstmann
c69074dcf6
Tidy up reference to Mbed TLS in help message
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 13:46:11 +01:00
Dave Rodgman
024a3b3f04
Disable p256-m asm on aarch64
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-29 13:21:43 +01:00
David Horstmann
2ba89bece6
Disable pylint error in CMake command
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 10:37:29 +01:00
David Horstmann
3b8984af5c
Remove or qualify references to Mbed TLS
...
Either remove exclusive references to Mbed TLS or accompany them with
references to "PSA Crypto".
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 10:32:26 +01:00
David Horstmann
f757069269
Rename 'mbedtls_dir' -> 'root_dir'
...
This makes it more repo-agnostic
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 10:27:13 +01:00
David Horstmann
98af198a30
Correctly detect presence of the built library
...
Use the repo-specific test not just the Mbed TLS specific one.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 10:25:54 +01:00
David Horstmann
58cf7c6c38
Use repo detection functions at start of all.sh
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 10:15:05 +01:00
David Horstmann
d02b5f8f56
Separate directory discernment into 2 functions
...
Have separate in_mbedtls_repo() and in_psa_crypto_repo() functions
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 09:55:56 +01:00
David Horstmann
2fde99962d
Improve directory coverage in PSA repo detection
...
Check for the 'drivers' and 'programs' directories additionally to the
ones that are already there.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-29 09:50:16 +01:00
Dave Rodgman
e97de40e7b
Typo fix
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-29 09:47:35 +01:00
Dave Rodgman
6d5261e38f
Fix typo in doxygen for mbedtls_ct_memcpy_offset
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-29 09:42:14 +01:00
Dave Rodgman
b69239c604
Improve docs in mbedtls_mpi_lt_mpi_ct
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-29 09:42:14 +01:00
Dave Rodgman
d44dd96132
Improve docs re duplicate declarations
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-29 09:42:14 +01:00
Dave Rodgman
0cf9dd1056
Whitespace - tidy up asm and make it more consistent
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-29 09:42:14 +01:00
Dave Rodgman
81673bba77
Add x86 const-time assembly
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-29 09:42:14 +01:00
Dave Rodgman
664fea481c
Add x86-64 const-time assembly
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-29 09:42:14 +01:00
Dave Rodgman
d395590597
Merge pull request #7579 from daverodgman/safer-ct-asm
...
Arm assembly implementation of constant time primitives
2023-08-28 08:26:29 +00:00
Gilles Peskine
8ca2041145
Merge pull request #8074 from tgonzalezorlandoarm/tg/allowlist
...
Implement allowlist of test cases that are legitimately not executed
2023-08-24 18:03:20 +00:00
Gilles Peskine
2a296729d0
Merge pull request #8084 from AgathiyanB/remove-type-qualifier-in-assignment-casts
...
Remove type qualifier in assignment casts
2023-08-24 18:02:11 +00:00
David Horstmann
0ac57ca6c6
Rename is_psa_crypto -> in_psa_crypto_repo
...
(For consistency with all.sh)
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
7f93d22ad9
Rename psa_crypto_lib_filename to just crypto_lib_filename
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
4dcddcfae2
Parameterize out of source build directory
...
Use CMake to build the library out-of-source (rather than make)
in tests/scripts/test_psa_compliance.py and add a script argument for
the out-of-source build directory.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
76a7738537
Invert logic for repo detection in all.sh
...
Instead of:
! in_psa_crypto_repo()
use
in_mbedtls_repo()
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
e31014a681
Tweak test_psa_compliance pylint annotations
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
42f42f4394
Support psa-crypto repo in psa_storage.py
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
1d09184291
Modify test_psa_compliance.py for psa-crypto repo
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
795d8b523d
Modify build_tree.py for the PSA Crypto repo
...
When detecting the root dir, look both for PSA Crypto and Mbed TLS
directories.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:18 +01:00
David Horstmann
9a6c45b436
Make all.sh PSA-crypto-friendly
...
Introduce changes needed to run all.sh in the psa-crypto repo. Where
behaviour must differ, detect that we are in the psa-crypto repo by
checking for the 'core' directory.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-08-24 15:18:11 +01:00
Tomás González
d43cab3f5c
Correct analyze_outcomes identation
...
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
2023-08-24 09:12:40 +01:00
Gilles Peskine
ef483255db
Announce that #7420 is fixed
...
This is part of a bigger issue https://github.com/Mbed-TLS/mbedtls/issues/7609
which is still pending since there are still configurations that are not
handled correctly. However https://github.com/Mbed-TLS/mbedtls/issues/7420
itself was fixed by https://github.com/Mbed-TLS/mbedtls/pull/7611 .
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-23 18:08:45 +02:00
Tom Cosgrove
41d689f389
Merge pull request #7985 from tom-cosgrove-arm/single-source-of-truth-for-licensing
...
Single source of truth for licensing
2023-08-22 16:27:21 +00:00
Gilles Peskine
dc23236f0a
Revert "Install cryptography only on linux platform"
...
This reverts commit eb2c39ed2b
.
We temporarily turned off the cryptography requirement on Windows due to a
CI instance that had an old, incompatible verison of pip. That CI instance
has been upgraded so we no longer need the workaround.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-22 17:24:45 +02:00
Agathiyan Bragadeesh
1515f351a1
Remove IAR warning fixes to 2.28 from changelog
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
2023-08-22 15:24:38 +01:00
Agathiyan Bragadeesh
c5eb13d2a9
Reword IAR changelog for fixing compiler warnings
...
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
2023-08-22 15:13:04 +01:00
Tom Cosgrove
3d2d599d3e
Merge pull request #7996 from gilles-peskine-arm/small_primes-gaps
...
Reduce the size of the small primes table used by primality testing
2023-08-22 12:48:56 +00:00
Gilles Peskine
e65bba4dd2
Merge pull request #7803 from gilles-peskine-arm/psa-low-hash-mac-size
...
Start testing the PSA built-in drivers: hashes
2023-08-22 11:19:41 +00:00
Tomás González
a0631446b5
Correct analyze_outcomes.py identation
...
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
2023-08-22 12:18:04 +01:00
Gilles Peskine
30b0378008
Fix off-by-one error
...
The value of p after adding the last entry in the gap table is not used.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-22 11:06:47 +02:00
Tomás González
5022311c9d
Tidy up allow list definition
...
* Don't break string literals in the allow list definition
* Comment each test that belongs to the allow list is there.
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
2023-08-22 09:54:28 +01:00
Tomás González
7ebb18fbd6
Make non-executed tests that are not in the allow list an error
...
* Turn the warnings produced when finding non-executed tests that
are not in the allow list into errors.
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
2023-08-22 09:47:49 +01:00
Gilles Peskine
ad7725d95d
Fix type annotation
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-22 09:59:50 +02:00
Gilles Peskine
6d14c2b858
Remove dead code
...
Do explain why we don't test a smaller buffer in addition to testing the
nominal size and a larger buffer.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-22 09:59:50 +02:00
Gilles Peskine
c9187c5866
New test suite for the low-level hash interface
...
Some basic test coverage for now:
* Nominal operation.
* Larger output buffer.
* Clone an operation and use it after the original operation stops.
Generate test data automatically. For the time being, only do that for
hashes that Python supports natively. Supporting all algorithms is future
work.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-22 09:59:42 +02:00