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
Hanno Becker
a7ee00225b
Test mbedtls_rsa_init() with invalid padding
2018-12-18 13:38:05 +00:00
Hanno Becker
f66f294e2e
Improve documentation in RSA module
2018-12-18 13:38:05 +00:00
Hanno Becker
0118d4190a
Document that RSA public exponent must be odd
2018-12-18 13:38:05 +00:00
Hanno Becker
385ce91592
Minor improvements
2018-12-18 13:38:05 +00:00
Hanno Becker
046d2024c5
Test parameter validation for RSA module
2018-12-18 13:38:05 +00:00
Hanno Becker
ddeeed7d1b
Implement parameter validation for RSA module
2018-12-18 13:38:05 +00:00
Hanno Becker
9a46777d66
Document parameter preconditions in RSA module
2018-12-18 13:38:05 +00:00
Hanno Becker
486f1b33d7
Improve wording in ECP documentation
2018-12-18 13:00:48 +00:00
Hanno Becker
57b684f9d1
Add separate test for xxx_free() functions in ECP module
2018-12-18 13:00:48 +00:00
Hanno Becker
5edcfa529f
Improve ECP documentation
2018-12-18 13:00:48 +00:00
Hanno Becker
12dff0352b
Test parameter validation for ECP module
2018-12-18 13:00:48 +00:00
Hanno Becker
4f8e8e5805
Implement parameter validation for ECP module
2018-12-18 13:00:48 +00:00
Hanno Becker
ebffa7995b
Document parameter preconditions in ECP module
2018-12-18 13:00:48 +00:00
Hanno Becker
03f2ffa7bc
Undo documentation change in ARIA, Blowfish, Camellia modules
2018-12-18 12:45:06 +00:00
Manuel Pégourié-Gonnard
488d9309fc
Fix unused param warnings in test function
2018-12-18 13:05:49 +01:00
Andres Amaya Garcia
0152f1e948
Document valid function params for SHA-256 functions
2018-12-18 11:41:20 +00:00
Andres Amaya Garcia
9e76c0e77f
Add MBEDTLS_ERR_SHA256_BAD_INPUT_DATA to error.{h,c}
2018-12-18 11:41:20 +00:00
Andres Amaya Garcia
79e593f617
Add parameter validation to SHA-256 module
2018-12-18 11:41:20 +00:00
Hanno Becker
b3906d8829
Minor fixes to implementation of SHA1 parameter validation
2018-12-18 11:37:28 +00:00
Hanno Becker
0e24473b94
Test parameter validation in SHA-1 module
2018-12-18 11:37:28 +00:00
Hanno Becker
5359ca8a54
Improve SHA-1 documentation
2018-12-18 11:37:28 +00:00
Andres Amaya Garcia
c523e011e0
Document valid function params for SHA-1 functions
2018-12-18 11:37:28 +00:00
Andres Amaya Garcia
a685d4f28d
Add MBEDTLS_ERR_SHA1_BAD_INPUT_DATA to error.{h,c}
2018-12-18 11:37:28 +00:00
Andres Amaya Garcia
f7c43b3145
Add parameter validation to SHA-1
2018-12-18 11:37:28 +00:00
Manuel Pégourié-Gonnard
e55e103bfe
Fix off-by-one in iv_off check and add tests
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
5b89c09273
Add check for iv_off in AES-CFB128 and AES-OFB
...
The check is mandatory as skipping it results in buffer overread of arbitrary
size.
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
998a358529
Make a check more explicit in aes.c
...
The check was already done later when calling ECB, (as evidenced by the tests
passing, which have a call with data_unit set to NULL), but it's more readable
to have it here too, and more helpful when debugging.
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
eb6d3968b1
Fix some whitespace issues in aes.c
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
ab6b9758d6
Improve constant naming in test functions
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
b66e7dbcc1
Fix some documentation markup/wording issues
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
ad54c49e75
Document AES accelerator functions as internal
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
2bc535be86
Add parameter validation for AES-CTR
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
8e41eb7187
Add parameter validation for AES-OFB
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
1677cca54b
Add parameter validation for AES-CFB functions
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
191af1313a
Add param validation for mbedtls_aes_crypt_xts()
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
3178d1a997
Add param validation for mbedtls_aes_crypt_cbc()
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
1aca260571
Add parameter validation for mbedtls_aes_crypt_ecb()
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
68e3dff3f1
Add parameter validation XTS setkey functions
2018-12-18 12:22:40 +01:00
Manuel Pégourié-Gonnard
af0c6cb9e0
Fix missing guard on XTS function in tests
2018-12-18 12:02:52 +01:00
Hanno Becker
6640b0d9a3
Undo deprecation of MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH
2018-12-18 09:53:14 +00:00
Hanno Becker
a034369eca
Undo deprecation of MBEDTLS_ERR_ARIA_INVALID_INPUT_LENGTH
2018-12-18 09:53:11 +00:00
Hanno Becker
938f9e9bdb
Undo deprecation of MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH
...
Merging MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH and
MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH is an API break.
2018-12-18 09:50:57 +00:00
Hanno Becker
9dbefa1793
Fix conflict between constant deprecation and check-names.sh
...
The previous introduction of constant deprecation macros
in platform_util.h lead to failure of tests/scrips/check-names.sh
because the regular expressions in the latter choked on the brackets
in the part `__attribute__((deprecated))` of the definition of the
helper type `mbedtls_deprecated_{numeric|string}_constant_t`.
Postponing any further study and potential robustness improvements
in check-names.sh to another time, this commit circumvents this
problem by temporarily abbreviating `__attribute__((deprecated))`
as `MBEDTLS_DEPRECATED`, which doesn't lead to problems with
check-names.sh.
2018-12-17 22:49:13 +00:00
Hanno Becker
4fb258a868
Remove mentioning of deprecated error codes
2018-12-17 16:09:15 +00:00
Hanno Becker
3214215b1e
Update errors.c
2018-12-17 13:26:42 +00:00
Hanno Becker
d2f3a00062
Introduce single BLOWFISH error code for bad input data
...
Deprecate the old specific error codes
* MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH
* MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH
2018-12-17 13:26:37 +00:00
Hanno Becker
4c029d09be
Introduce single CAMELLIA error code for bad input data
...
Deprecate the old specific error codes
* MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH
* MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH
2018-12-17 13:26:33 +00:00