mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-25 14:15:35 +00:00
DHM: add test case with x_size < 0
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
9e96679548
commit
346d20d209
|
@ -27,6 +27,10 @@ dhm_do_dhm:10:"23":1:10:"5":0
|
|||
Diffie-Hellman full exchange: 5-bit #5
|
||||
dhm_do_dhm:10:"23":1:10:"5":0
|
||||
|
||||
## This is x_size = P_size + 1. Arguably x_size > P_size makes no sense,
|
||||
## but it's the current undocumented behavior to treat it the same as when
|
||||
## x_size = P_size. If this behavior changes in the future, change the expected
|
||||
## return status from 0 to MBEDTLS_ERR_DHM_BAD_INPUT_DATA.
|
||||
Diffie-Hellman full exchange: 97-bit, x_size=14
|
||||
dhm_do_dhm:10:"93450983094850938450983409623":14:10:"9345098304850938450983409622":0
|
||||
|
||||
|
@ -81,6 +85,9 @@ dhm_do_dhm:10:"3":1:10:"5":MBEDTLS_ERR_DHM_MAKE_PARAMS_FAILED+MBEDTLS_ERR_MPI_BA
|
|||
Diffie-Hellman zero modulus
|
||||
dhm_do_dhm:10:"0":1:10:"5":MBEDTLS_ERR_DHM_BAD_INPUT_DATA
|
||||
|
||||
Diffie-Hellman: x_size < 0
|
||||
dhm_do_dhm:10:"93450983094850938450983409623":-1:10:"9345098304850938450983409622":MBEDTLS_ERR_DHM_BAD_INPUT_DATA
|
||||
|
||||
Diffie-Hellman MPI_MAX_SIZE modulus
|
||||
dhm_make_public:MBEDTLS_MPI_MAX_SIZE:10:"5":0
|
||||
|
||||
|
|
Loading…
Reference in a new issue