Hanno Becker
73d7d79bc1
Implement parameter validation for MPI module
2018-12-18 18:12:13 +00:00
Hanno Becker
c23483ed8c
Document preconditions on parameters in public bignum API
2018-12-18 18:12:13 +00:00
Hanno Becker
974ca0d947
Fix documentation bug on necessity of RNG in RSA PKCS v1.5
2018-12-18 18:03:24 +00:00
Hanno Becker
38e15d49f3
Don't declare MBEDTLS-namespace identifiers in sha512.c
2018-12-18 17:54:00 +00:00
Hanno Becker
8d215e7130
Don't define MBEDTLS-namespace macros in sha256.c
2018-12-18 17:53:21 +00:00
Hanno Becker
039ccab243
Don't declare MBEDTLS-namespace macros in sha1.c
2018-12-18 17:52:14 +00:00
Hanno Becker
2f660d047d
Forbid passing NULL input buffers to RSA encryption routines
2018-12-18 17:07:30 +00:00
Hanno Becker
d22df58a56
Add missing guards around SHA-1 tests
2018-12-18 17:02:03 +00:00
Hanno Becker
9171c6e9ec
Leave behaviour on NULL buffers to SHA-1 unspecified for now
...
We deal correctly with NULL being passed alongside a zero length
argument, but don't have tests for it, so we shouldn't promise
that it works.
2018-12-18 17:01:58 +00:00
Hanno Becker
adc9b178ca
Minor improvements to DHM module
2018-12-18 16:59:09 +00:00
Hanno Becker
8c8a93c574
Test parameter validation for DHM module
2018-12-18 16:59:09 +00:00
Hanno Becker
5c14ed6f86
Implement parameter validation for DHM module
2018-12-18 16:59:09 +00:00
Hanno Becker
6c5c45f400
Document parameter preconditions in DHM module
2018-12-18 16:59:09 +00:00
Hanno Becker
4fbd4bf442
Fix guard in SHA-512 tests
2018-12-18 16:37:43 +00:00
Hanno Becker
ca6f4585c7
Fix parameter validation in SHA-512 module
2018-12-18 16:36:26 +00:00
Hanno Becker
fc2a0b2e67
Minor SHA-256 documentation improvement
2018-12-18 16:32:50 +00:00
Hanno Becker
596e014a06
Add validation is is224
argument in mbedtls_sha256_starts_ret()
2018-12-18 16:31:06 +00:00
Hanno Becker
230b4f4159
Fix definition of MBEDTLS_SHA256_VALIDATE[_RET] in sha256.c
2018-12-18 16:31:06 +00:00
Hanno Becker
36beb04fd5
Add tests or SHA-256 parameter validation
2018-12-18 16:31:06 +00:00
Hanno Becker
77886af63e
Improve SHA-256 documentation on parameter preconditions
2018-12-18 16:30:36 +00:00
Hanno Becker
686c9a0e8d
Test SHA-512 parameter validation
2018-12-18 15:33:14 +00:00
Hanno Becker
ad7581fac5
Minor improvements to ChaCha20/Poly1305/ChaChaPoly documentation
2018-12-18 15:30:30 +00:00
Hanno Becker
a994b2379f
Test that xxx_free() functions accept NULL parameter
2018-12-18 15:30:30 +00:00
Hanno Becker
236ea16c01
Fix wrong conditional in free() functions
2018-12-18 15:30:30 +00:00
Hanno Becker
e463c42902
Minor improvements
2018-12-18 15:30:30 +00:00
Hanno Becker
ae2ff02ff1
Add tests for ChaChaPoly parameter validation
...
Parameter validation was previously performed and tested unconditionally
for the ChaCha/Poly modules. This commit therefore only needs go guard the
existing tests accordingly and use the appropriate test macros for parameter
validation.
2018-12-18 15:30:30 +00:00
Hanno Becker
305e4e4f32
Implement parameter validation for ChaCha/Poly modules
2018-12-18 15:30:30 +00:00
Hanno Becker
b3c10b348b
Add documentation on parameter preconditions to ChaChaPoly modules
2018-12-18 15:30:30 +00:00
Hanno Becker
b5c99f5c72
Improve documentation of SHA-512 parameter preconditions
2018-12-18 15:29:32 +00:00
Andres Amaya Garcia
ff1052e6b0
Document valid function params for SHA-512 functions
2018-12-18 15:06:39 +00:00
Andres Amaya Garcia
863d483965
Add MBEDTLS_ERR_SHA512_BAD_INPUT_DATA to error.{h,c}
2018-12-18 15:06:39 +00:00
Andres Amaya Garcia
ba519b94a5
Add parameter validation to SHA-512 module
2018-12-18 15:06:39 +00:00
Hanno Becker
b86e684ed4
Move/remove param validation in mbedtls_rsa_rsaes_pkcs1_v15_encrypt
...
- The validity of the input and output parameters is checked by
parameter validation.
- A PRNG is required in public mode only (even though it's also
recommended in private mode), so move the check to the
corresponding branch.
2018-12-18 14:46:04 +00:00
Hanno Becker
a9020f2107
Clarify the need for a PRNG in various RSA operations
2018-12-18 14:45:45 +00:00
Hanno Becker
af05a90349
Test parameter validation in ECDSA module
2018-12-18 14:31:50 +00:00
Hanno Becker
319ae11ab3
Implement parameter validation in ECDSA module
2018-12-18 14:31:50 +00:00
Hanno Becker
e2e509ca5d
Document parameter preconditions in ECDSA module
2018-12-18 14:31:50 +00:00
Hanno Becker
8ce3d939be
Fix typo in documentation of ECJPAKE module
2018-12-18 14:31:18 +00:00
Hanno Becker
491db772c3
Test parameter validation for ECJPAKE module
2018-12-18 14:31:18 +00:00
Hanno Becker
71c8e1b8d8
Implement parameter validation in ECJPAKE module
2018-12-18 14:31:18 +00:00
Hanno Becker
c4e5aa5746
Document parameter preconditions for ECJPAKE module
2018-12-18 14:31:18 +00:00
Hanno Becker
60b65044ac
Fix parameter name in documentation of ECDH module
2018-12-18 14:30:39 +00:00
Hanno Becker
4c818483b2
Test parameter validation for ECDH module
2018-12-18 14:30:39 +00:00
Hanno Becker
91796d7471
Implement parameter validation in ECDH module
2018-12-18 14:30:39 +00:00
Hanno Becker
e77ef2ad33
Document parameter preconditions in ECH module
2018-12-18 14:30:39 +00:00
Hanno Becker
b06f193d73
Add missing cases to RSA parameter validation test
2018-12-18 14:05:20 +00:00
Hanno Becker
5bdfca926f
Further RSA documentation improvements
2018-12-18 13:59:28 +00:00
Hanno Becker
05cf6dabb8
Add missing test for mbedtls_rsa_pkcs1_sign()
2018-12-18 13:38:05 +00:00
Hanno Becker
f04d923834
Test mbedtls_rsa_gen_key() with NULL ctx/RNG separately
2018-12-18 13:38:05 +00:00
Hanno Becker
71cd6c7ba9
Remove duplicate test in RSA parameter validation test
2018-12-18 13:38:05 +00:00