Commit graph

25553 commits

Author SHA1 Message Date
Dave Rodgman
a35551ef01 Use MBEDTLS_PRIVATE
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-07 17:08:19 +01:00
Dave Rodgman
cf4d2bdc09 Spell as SHA-3 not SHA3
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-07 17:08:09 +01:00
Dave Rodgman
2468ad10d7 Add tests for invalid paramters
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-07 17:06:35 +01:00
Dave Rodgman
c3048b3eea Tidy-up definition of mbedtls_sha3_context
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-07 16:50:15 +01:00
Dave Rodgman
9d7fa93e6c move mbedtls_sha3_family_functions out of public interface
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-07 16:50:15 +01:00
Dave Rodgman
e627bef2f8 Use faster type for state index
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-07 16:50:15 +01:00
Dave Rodgman
1789d84282 remove not-needed fields from SHA-3 context
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-07 16:50:15 +01:00
Dave Rodgman
bcfd79c699 Consume input in 8-byte chunks
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-07 16:50:15 +01:00
Dave Rodgman
2070c2074e Avoid possible NEON alignment issue
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-07 16:38:26 +01:00
Dave Rodgman
9d1635e742 Revert not-useful changes to AES-CBC decrypt
Signed-off-by: Dave Rodgman <dave.rodgman@gmail.com>
2023-06-07 16:38:26 +01:00
Dave Rodgman
f1e396c427 improve cbc encrypt perf
Signed-off-by: Dave Rodgman <dave.rodgman@gmail.com>
2023-06-07 16:38:26 +01:00
Dave Rodgman
3f47b3f7a3 Extend NEON use to 32-bit Arm
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-07 16:38:26 +01:00
Dave Rodgman
9c1128edaa Add tests for xor over large blocks
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-06-07 16:38:26 +01:00
David Horstmann
feb1757ead Add clangd compilation databases to gitignore
The clangd language server uses a file called compile_commands.json to
interpret the source tree. This is generated by CMake and must be
present in the source tree in order to use clangd properly.

Add this to the gitignore to improve the developer experience for users
of clangd.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-06-07 15:21:59 +01:00
Przemek Stekiel
0b683a9a57 Remove redundant test and add tests: keyid only (without issuer)
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
401c8e3a97 Adapt test (use path instead of bytes) after rebase
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
ff9c2996f3 Fix code style
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
05d5c3e734 Further test improvements
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
9a1c428966 Fix after rebase (remove redundant variables in tests)
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
64a06e48b3 Add more test cases
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
2c64e90e02 Use RSA keys in generated certificates
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
b1f0b536d7 Add test for invalid KeyIdentifier tag length + adapt error code
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
a6a0a7929a Use TEST_EQUAL instead of TEST_ASSERT in tests
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
1969f6a453 Test optional fields in authorityKeyId
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
0ad1006606 Check values in tests
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
2568d47916 Use generated certs in DER format in tests
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
5ff986cb0a Provide makefile rules to generate cerst for authorityKeyId, subjectKeyId tests
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Gilles Peskine
13230a4ad3
Merge pull request #7349 from mpg/rm-hash-info
Remove `hash_info` module
2023-06-06 21:05:13 +02:00
Gilles Peskine
d598eaf212
Merge pull request #7106 from davidhorstmann-arm/parse-oid-from-string
Parse an OID from a string
2023-06-06 20:57:17 +02:00
Gilles Peskine
a5cd318137
Merge pull request #7670 from lpy4105/issue/fix-wrong-command-for-ec-key-files
Fix invalid commands for ec_x{25519,448}_{prv,pub}.{der,pem}
2023-06-06 20:56:52 +02:00
Gilles Peskine
259903b179
Merge pull request #7643 from lpy4105/issue/renew_cert_2024-01-01
Updating crt/crl files due to expiry before 2024-01-01
2023-06-06 20:55:23 +02:00
Kusumit Ghoderao
28daefab07 Fix fall through warning
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 16:31:39 +05:30
Przemek Stekiel
4d3fc216fc Use safe snprintf
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-06 11:44:25 +02:00
Przemek Stekiel
63973ab80e Add test for invalid IP length (+use der format in tests)
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-06 11:44:25 +02:00
Przemek Stekiel
01cb6eb251 Fix parsing of SAN IP (use mbedtls_snprintf, validate buffer length)
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-06 11:44:25 +02:00
Przemek Stekiel
093c97d492 Add separate case for ip address
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-06 11:44:25 +02:00
Przemek Stekiel
63a4cdd1eb Add test to parse ipV4 and ipV6 addresses
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-06 11:44:25 +02:00
Przemek Stekiel
0ab5b93922 Add support for parsing SAN IP address
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-06 11:44:25 +02:00
Gilles Peskine
265ce7c1da
Merge pull request #5451 from gilles-peskine-arm/psa-driver-kdf-spec
PSA drivers: specification for key derivation
2023-06-06 11:37:28 +02:00
Kusumit Ghoderao
f28e0f5bed Fix code style
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:48 +05:30
Kusumit Ghoderao
354434c466 Add changelog entry
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:47 +05:30
Kusumit Ghoderao
c63d140436 Add negative cases for pbkdf2 output
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:45 +05:30
Kusumit Ghoderao
2b5c91b757 Add RFC tests for pbkdf2 output
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:44 +05:30
Kusumit Ghoderao
e70a8bbb08 Change derive_input test cases for implemented output_bytes
The tests earlier reported PSA_ERROR_NOT_SUPPORTED as final output as
the output_bytes function was not implemented for pbkdf2. The test
cases have now been modified to the correct error codes.

Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:43 +05:30
Kusumit Ghoderao
81797fc270 Add cost and password steps to derive_output_test function
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:42 +05:30
Kusumit Ghoderao
f6a0d57e4d Add pbkdf2 function to key_derivation_output_bytes
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:41 +05:30
Kusumit Ghoderao
a4346cdc50 Add pbkdf2_generate_block function
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:39 +05:30
Kusumit Ghoderao
85e6bdb7ad Add additional members to pbkdf2 struct
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:39 +05:30
Manuel Pégourié-Gonnard
d4dff8b4de Update FFDH component
Was added while I was preparing this PR.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 11:19:37 +02:00
Manuel Pégourié-Gonnard
f5c5d971e7 Add documentation about libtestdriver1 usage
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 11:15:20 +02:00