Raef Coles
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
Raef Coles
57d5328ad5
Remove MBEDTLS_LM(OT)S prefix from internal macros
...
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:29:00 +01:00
Raef Coles
ad05425ab7
Update naming of internal LMS functions
...
To comply with the mbedtls_ requirement
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:59 +01:00
Raef Coles
40158e11fc
Add LMOTS test hook to header
...
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:58 +01:00
Raef Coles
403558c1c9
Fix LMS function documentation
...
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:57 +01:00
Raef Coles
3982040232
Fix LMS zeroization using wrong sizeof type
...
Causing a buffer write out of bounds
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:55 +01:00
Raef Coles
98d6e22050
Remove doxygen markup from internal LMS functions
...
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:54 +01:00
Raef Coles
40f184c83e
Cast LMS allocation sizes to size_t
...
To prevent implict casting errors on 64-bit platforms
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:52 +01:00
Raef Coles
1310ecb389
Update LMOTS function documentation
...
To avoid CI failure
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:51 +01:00
Raef Coles
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
Raef Coles
fa24f9d6ea
Minor fixes to LMS and LMOTS macros
...
Update some names, use the correct macro in certain places.
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:48 +01:00
Raef Coles
0a967ccf9a
Document LMS and LMOTS internal functions
...
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:47 +01:00
Raef Coles
8738a49d0c
Fix iterator types in LMOTS
...
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:45 +01:00
Raef Coles
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
Raef Coles
e0a17610d1
Fix LMS/LMOTS if-statement style
...
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:41 +01:00
Raef Coles
9b88ee5d5d
Fix LMS and LMOTS coding style violations
...
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:40 +01:00
Raef Coles
366d67d9af
Shorted LMS and LMOTS line-lengths
...
To attempt to comply with the 80-char suggestion
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:38 +01:00
Raef Coles
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
Raef Coles
ab4f87413a
Add MBEDTLS_LMS_PRIVATE define
...
To enable private key operations
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:35 +01:00
Raef Coles
ebd35b5b80
Rename LMS internal tree-manipulation functions
...
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:31 +01:00
Raef Coles
891c613f31
Update LMOTS signature use of temporary variables
...
Document them properly, and move random value to a temporary variable
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:29 +01:00
Raef Coles
0c88d4e447
Remove superfluous casts in LMS and LMOTS
...
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:28 +01:00
Raef Coles
f5632d3efc
Remove MBEDTLS_PRIVATE usage from LMS and LMOTS
...
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:27 +01:00
Raef Coles
01c71a17b3
Update LMS and LMOTS api
...
Fix function names and parameters. Move macros to be more private.
Update implementation.
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:25 +01:00
Raef Coles
c8f9604d7b
Use PSA hashing for LMS and LMOTS
...
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:23 +01:00
Raef Coles
7dce69a27a
Make LMOTS a private api
...
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:22 +01:00
Raef Coles
2ad6e611f0
Update LMS/LMOTS documentation
...
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:20 +01:00
Raef Coles
0aa18e041f
Note that LMS sign function is for testing only
...
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:18 +01:00
Raef Coles
c464746d45
Document LMS and LMOTS contexts
...
And add some comments about the source of their type IDs
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:17 +01:00
Raef Coles
8ff6df538c
Add LMS implementation
...
Also an LM-OTS implementation as one is required for LMS.
Signed-off-by: Raef Coles <raef.coles@arm.com>
2022-10-13 14:28:15 +01:00
Gilles Peskine
0fe6631486
Merge pull request #6291 from gilles-peskine-arm/platform.h-unconditional-3.2
...
Include platform.h unconditionally
2022-10-13 10:19:22 +02:00
Manuel Pégourié-Gonnard
2aa5af9bec
Merge pull request #6403 from mpg/print-failed-suites
...
Print the list of failed suites in verbose mode
2022-10-13 09:59:45 +02:00
Gilles Peskine
8fd3254cfc
Merge pull request #6374 from mprse/enc_types
...
Test TLS 1.2 builds with each encryption type
2022-10-12 12:45:50 +02:00
Ronald Cron
78317c832b
Merge pull request #6327 from yuhaoth/pr/tls13-psk-after-session-tickets
...
TLS 1.3: PSK and NewSessionTicket: Add support for sending PSK and Ticket together.
2022-10-12 12:39:51 +02:00
Janos Follath
301e866f55
Merge pull request #6398 from gilles-peskine-arm/bignum-mbedtls_test_read_mpi_core-char
...
mbedtls_test_read_mpi_core: support an odd number of hex digits
2022-10-11 15:08:06 +01:00
Jerry Yu
c79742303d
Remove unnecessary empty line and fix format issue
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-11 21:22:33 +08:00
Manuel Pégourié-Gonnard
74b748dafe
Merge pull request #6401 from gilles-peskine-arm/config.py-python-version-development
...
Add a note that config.py must remain compatible with Python 3.4
2022-10-11 12:57:19 +02:00
Jerry Yu
22c18c1432
Add NULL check in prepare hello
...
`session_negotiate` is used directly in `ssl_prepare_client_hello`
without NULL check. Add the check in the beggining to avoid segment
fault.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-11 18:07:19 +08:00
Jerry Yu
c2bfaf00d9
fix wrong typo
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-11 18:07:19 +08:00
Manuel Pégourié-Gonnard
ac6c67053d
Print the list of failed suites in verbose mode
...
In verbose mode, the full output of each failing suite is printed out,
which for some suites runs in the 1000s of lines. If you didn't redirect
output to a file, this is a lot to scroll and can make it hard to
quickly identify which test suites failed.
So, let's print out that information at the end. This is useful
information for starting to figure out what went wrong.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-10-11 10:48:32 +02:00
Przemek Stekiel
d61a4d3d1a
Fix missing guard and double-space
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-10-11 09:40:40 +02:00
Gilles Peskine
b50e433b66
Test mbedtls_mpi_core_bitlen
...
Copy the test data for mbedtls_mpi_bitlen except for 0-length and negative cases.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-10 23:03:47 +02:00
Gilles Peskine
e943283f2f
More mbedtls_mpi_bitlen test cases
...
* with leading zero limb
* with trailing zero limb
* negative
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-10 23:03:47 +02:00
Gilles Peskine
24baa81043
Improve mbedtls_mpi_bitlen test descriptions
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-10 23:03:47 +02:00
Gilles Peskine
c5772a194e
mbedtls_test_read_mpi_core: allow odd number of hex digits
...
Test functions must now take a char* argument rather than data_t*. This does
not affect existing test data.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-10 23:03:47 +02:00
Gilles Peskine
cf42536d4e
Add a note that config.py must remain compatible with Python 3.4
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-10-10 22:52:30 +02:00
Janos Follath
1b5c85c75b
Merge pull request #6386 from gilles-peskine-arm/bignum-mbedtls_test_read_mpi_core
...
Introduce mbedtls_test_read_mpi_core
2022-10-10 15:14:46 +01:00
Jerry Yu
4f77ecf409
disable session resumption when ticket expired
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-10 22:10:08 +08:00
Jerry Yu
03aa174d7c
Improve test message and title
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-10 21:48:37 +08:00
Jerry Yu
6916e70521
fix various issues
...
- adjust guards. Remove duplicate guards and adjust format.
- Return success at function end. Not `ret`
- change input len
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-10-10 21:33:51 +08:00