31c2dcb611
Fix file names in reproduction instructions in test data
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2022-10-13 20:48:15 +02:00
2875aa7b01
Fix instructions and test data for pyhsslms interop tests
...
The test data was invalid because it had the extra 4-byte prefix for HSS.
Regenerate it (which produces completely new signatures since it is
randomized).
Rearrange the reproduction instructions for the second test case so that it
shows more clearly how to generate a second signature with the same private
key.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2022-10-13 20:45:05 +02:00
8bccc999d9
Don't mention error type in LMS test comments
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 17:57:31 +01:00
6d7d94a821
Use correct export length in LMS export tests
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 17:55:46 +01:00
aa9d52bcdc
Rename LMS private key files to match library name
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 17:53:40 +01:00
f8bfe2783b
Remove bad character from LMS test case
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 17:35:28 +01:00
d543697092
Fix minor type in LMS test description
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 17:06:42 +01:00
a2514f622f
Update pyhsslms test instructions with script
...
Due to tool name conflict hampering data reproduction
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 17:04:21 +01:00
ce18e528ff
Rename LMS private key files
...
And remove now-unnecessary modification to check_files.py
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 16:45:05 +01:00
e4d96b804c
Update LMS and LMOTS test comments
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 16:45:05 +01:00
493724e3c2
Check correct output size in LMOTS export test
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 15:43:07 +01:00
ed0e4591dc
Add output length test for LMS export too-big test
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 15:05:47 +01:00
49e4184812
Merge pull request #6299 from xkqian/tls13_add_servername_check
...
Add server name check when proposing pre-share key
2022-10-13 16:00:59 +02:00
33f7d66304
Add output check to export too-big buffer tests
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:36 +01:00
1d88ea870f
Remove unneeded NULL pointer checks in LMS tests
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:35 +01:00
d1c1f7f7be
Disable LMS in all.sh tests that lack _WANT_SHA256
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:31 +01:00
a21671123a
Remove sudo pip3
in LM(OT)S tests instructions
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:27 +01:00
1b43a7448d
Clean up LMS and LMOTS feature dependencies
...
Remove SHA256 dependencies from tests, fix incorrect boolean logic in
check_config, and change depends_hashes.pl to disable LMS in one test
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:26 +01:00
6b2c573b3d
And export buffer too large test to LMS and LMOTS
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:24 +01:00
534f66f3f0
Fix assert arguments in LMS and LMOTS export tests
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:23 +01:00
d1c2a80319
Remove duplicated assert from LMOTS tests
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:21 +01:00
20d2e06ca4
Add cleanup frees in LMS and LMOTS tests
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:20 +01:00
781f7bedb0
Properly mark LMOTS leak test as failed
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:18 +01:00
d137c86125
Don't skip LMS tests due to out of memory error
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:17 +01:00
76563399fd
Fix LMS and LMOTS test dependencies
...
Mark them as depending on PSA_WANT_ALG_SHA256 so that
test_depends_hashes_psa doesn't fail
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:15 +01:00
59eb0d0f2b
Fix LMOTS signature leak test dependencies
...
As it requires MBEDTLS_LMS_PRIVATE
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:12 +01:00
d0c701237a
Replace TEST_ASSERT with TEST_EQUAL in LMS tests
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:09 +01:00
f9b8502865
Add LMS import/export negative tests
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:06 +01:00
4511055511
Exclude binary LMS keys from file checking
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:05 +01:00
9fc303a99a
Add extra LMOTS import negative tests
...
And fix failures that are related to the new tests
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:01 +01:00
71f554b48f
Use real data for negative LMOTS tests
...
To avoid errors caused by the null public keys and signatures
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:30:00 +01:00
66edf6a833
Use hsslms data for LMOTS import/export test
...
Also, test that export fails when the buffer is too small.
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:29:58 +01:00
8b55ba623e
Source LMOTS data from hsslms
...
So it can be reproduced
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:29:57 +01:00
a6b47c0aac
Add LMS hsslms interop tests
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:29:55 +01:00
d6adcb6146
Add negative LMS import/export tests
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:29:53 +01:00
810612e14e
Update LMS and LMOTS to use TEST_EQUAL
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:29:51 +01:00
90e13fc3c6
Add repro instructions for LMS test data
...
Add more interop tests, and use real data for the negative tests
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:29:49 +01:00
0dc604ed2b
Change how LMS and LMOTS negative tests work
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:29:48 +01:00
7726678b23
Remove debugging code left in LMOTS tests
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:29:46 +01:00
370cc43630
Make LMS public key export part of public key api
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:29:28 +01:00
be3bdd8240
Rename LMS and LMOTS init/free functions
...
To match convention
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:29:18 +01:00
5127e859d7
Update LMS and LMOTS dependency macros
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:29:11 +01:00
b4568c5423
Disable LMS in PSA crypto client test
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:29:07 +01:00
47bccb7e47
Disable LMS_PRIVATE in all.sh when LMS is disabled
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:29:06 +01:00
a7e03adef5
Disable LMS in all.sh when PSA isn't enabled
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:29:04 +01:00
98c504373c
Update LMS test description
...
To correct copy-paste error
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:29:02 +01:00
40158e11fc
Add LMOTS test hook to header
...
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:28:58 +01:00
9c9027b1a4
Add extra LMS and LMOTS tests
...
NULL-message and LMOTS signature leak tests
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:28:50 +01:00
f5919e2997
Update LMS/LMOTS tests
...
Document tests and source of data, use test RNG, pass more parameters
into each test
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:28:43 +01:00
e9479a0264
Update LMS API to support multiple parameter sets
...
Parameterise macros to allow variation of sizes
Signed-off-by: Raef Coles <raef.coles@arm.com >
2022-10-13 14:28:36 +01:00