Gilles Peskine
86ffd80456
Register new error code in error.h
2017-12-10 20:04:13 +01:00
Gilles Peskine
0884f4811b
Merge remote-tracking branch 'upstream-public/pr/1141' into development
2017-11-29 20:50:59 +01:00
Andres Amaya Garcia
c5380649d9
Change value of MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE
...
Change the value of the error MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE to
0x0023 to ensure the errors in the AES module are all in a continuous
range.
2017-11-29 10:42:49 +00:00
Gilles Peskine
4b117d9c92
Merge remote-tracking branch 'upstream-public/pr/1055' into development
2017-11-28 17:23:37 +01:00
Andres Amaya Garcia
5a6da63138
Fix indentation for mbedtls_x509_crt_check_key_usage()
2017-11-14 21:47:08 +00:00
Andres Amaya Garcia
c81fcb9d36
Fix typos in documentation for mbedtls_x509_crt_check_extended_key_usage()
2017-11-14 21:43:14 +00:00
Hanno Becker
3319555b7c
Improve documentation of mbedtls_rsa_import[_raw]
2017-10-25 17:04:10 +01:00
Hanno Becker
6851b10ec7
Note that disabling SSL_RENEGO doesn't open door for renego attack
2017-10-17 11:03:50 +01:00
Hanno Becker
fc8fbfa059
Switch to gender neutral wording in rsa.h
2017-10-17 10:34:04 +01:00
Hanno Becker
554c32dae6
Mention validate_params does primality tests only if GENPRIME def'd
2017-10-17 10:34:01 +01:00
Hanno Becker
68767a6e88
Improve documentation in mbedtls_rsa_check_privkey
2017-10-17 10:13:31 +01:00
Hanno Becker
f8c028a2fb
Minor corrections
2017-10-17 09:20:57 +01:00
Hanno Becker
c36aab69b5
Swap D,E parameters in mbedtls_rsa_deduce_primes
2017-10-17 09:15:06 +01:00
Andres Amaya Garcia
9fb02057a5
Fix typo in asn1.h
2017-10-12 23:21:37 +01:00
Ron Eldor
3226d36d61
Fix typo in configuration
...
Change duplicate of MBEDTLS_ECDH_GEN_PUBLIC_ALT to
MBEDTLS_ECDH_COMPUTE_SHARED_ALT
2017-10-12 14:17:48 +03:00
Hanno Becker
d22b78bf12
Switch to old model for alternative implementations
2017-10-12 11:42:17 +01:00
Hanno Becker
08f055eb4f
Don't remove CRT parameters from RSA context for ABI compatibility
...
Albeit possible without conflicts now, this has to wait for the next ABI
changing releaese.
2017-10-12 10:53:58 +01:00
Hanno Becker
a565f54c4c
Introduce new files rsa_internal.[ch] for RSA helper functions
...
This commit splits off the RSA helper functions into separate headers and
compilation units to have a clearer separation of the public RSA interface,
intended to be used by end-users, and the helper functions which are publicly
provided only for the benefit of designers of alternative RSA implementations.
2017-10-11 11:00:19 +01:00
Ron Eldor
a84c1cb355
Address PR cpomments reviews
...
1) move the change into Features from Changes, in the changLog
2) Change the feature alternative configuration MBEDTLS_ECDH_ALT
definition to function alternative defintions
MBEDTLS_ECDH_COMPUTE_SHARED_ALT and MBEDTLS_ECDH_GEN_PUBLIC_ALT
2017-10-10 19:04:27 +03:00
Hanno Becker
f9e184b9df
Remove PRNG argument from mbedtls_rsa_complete
2017-10-10 16:55:41 +01:00
Ron Eldor
314adb6baa
Address PR review comments
...
1) update ChangLog to have new feature in Features instead of Changes
2) Change MBEDTLS_ECDSA_ALT to function specific alternative definitions:
MBEDTLS_ECDSA_SIGN_ALT, MBEDTLS_ECDSA_VERIFY_ALT and MBEDTLS_ECDSA_GENKEY_ALT
2017-10-10 18:49:02 +03:00
Hanno Becker
1e801f5706
Clarify guarantees made by rsa_complete and rsa_check_privkey
2017-10-10 16:44:47 +01:00
Hanno Becker
68b4d58bd8
Remove PRNG argument from mbedtls_rsa_deduce_moduli
...
It is not necessary to pass a CSPRNG to `mbedtls_rsa_deduce_moduli`, as there
exist well-working static strategies, and even if a PRNG is preferred, a
non-secure one would be sufficient.
Further, the implementation is changed to use a static strategy for the choice
of candidates which according to some benchmarks even performs better than the
previous one using random candidate choices.
2017-10-10 16:39:10 +01:00
Hanno Becker
1a9a51c7cf
Enhance documentation of ssl_write_hostname_ext, adapt ChangeLog.
...
Add a reference to the relevant RFC, adapt ChangeLog.
2017-10-06 11:58:50 +01:00
Hanno Becker
0446a39744
Enhance documentation of mbedtls_ssl_set_hostname
...
(1) Add missing error condition
(2) Specify allowance and effect of of NULL hostname parameter
(3) Describe effect of function on failure
2017-10-06 11:58:50 +01:00
Hanno Becker
bc389d1d3c
Extend scope of ERR_RSA_UNSUPPORTED_OPERATION error code
2017-10-05 11:49:53 +01:00
Hanno Becker
3cdc711972
Deprecate usage of RSA primitives with wrong key type
...
Further, state explicitly that wrong key types need not be supported by alternative RSA implementations, and that those
may instead return the newly introduced error code MBEDTLS_ERR_RSA_UNSUPPORTED_OPERATION.
2017-10-05 10:28:21 +01:00
Hanno Becker
0f65e0ca03
Rename rsa_deduce_moduli to rsa_deduce_primes
2017-10-03 14:40:44 +01:00
Hanno Becker
8ba6ce4f4f
Rename rsa_deduce_private to rsa_deduce_private_exponent
2017-10-03 14:40:43 +01:00
Hanno Becker
5178dcab12
Clarify parameter ownership in mbedtls_rsa_import[_raw]
2017-10-03 14:29:37 +01:00
Hanno Becker
b5beaa8995
Check that 1 < D, E < N in mbedtls_rsa_validate_params
2017-10-02 13:20:20 +01:00
Hanno Becker
c6fc878eda
Remove mbedtls_rsa_check_crt
...
This is no longer needed after the decision to not exhaustively validate private key material.
2017-10-02 13:20:15 +01:00
Hanno Becker
98838b04af
Minor improvements
2017-10-02 13:17:01 +01:00
Hanno Becker
7471631dde
Make input arguments to mbedtls_rsa_import_raw constant
...
Original intention was to be allowed to perform in-place operations like changing the byte-order before importing
parameters into an HSM. Now a copy is needed in this case, but there's no more danger of a user expecting the arguments
to be left untouched.
2017-10-02 13:17:01 +01:00
Hanno Becker
43a08d029e
Clarify guarantees made by rsa_check_privkey and rsa_complete
...
Document explicitly that `mbedtls_rsa_check_privkey` and `mbedtls_rsa_complete` succeeding does not guarantee the
consistency of the underlying RSA private key but only that enough information is present to perform a private key
operation.
2017-10-02 13:17:01 +01:00
Hanno Becker
1b831fe1c5
Clarify guarantees made by rsa_deduce_moduli/private/crt
2017-10-02 13:06:47 +01:00
Hanno Becker
bdefff1dde
Change signature of mbedtls_rsa_deduce_private
...
Make input arguments constant and adapt the implementation to use a temporary instead of in-place operations.
2017-10-02 09:59:48 +01:00
Hanno Becker
ba5b755f1a
Change signature and semantics of mbedtls_rsa_deduce_moduli
...
Input arguments are marked as constant. Further, no double-checking is performed when a factorization of the modulus has
been found.
2017-10-02 09:55:49 +01:00
Hanno Becker
2f38a43d3a
Enhance documentation of ssl_write_hostname_ext, adapt ChangeLog.
...
Add a reference to the relevant RFC, adapt ChangeLog.
2017-09-30 23:35:21 +01:00
Hanno Becker
f5f9d11acc
Enhance documentation of mbedtls_ssl_set_hostname
...
(1) Add missing error condition
(2) Specify allowance and effect of of NULL hostname parameter
(3) Describe effect of function on failure
2017-09-30 23:35:12 +01:00
Hanno Becker
56bae95e1d
Improve style and documentation, fix typo
2017-09-29 15:43:49 +01:00
Hanno Becker
4b2f691691
Doxygen: Use typewriter font for variables in rsa.h documentation
2017-09-29 13:36:54 +01:00
Hanno Becker
ed20361321
Increase readability of Doxygen output
...
Multiple lists were not properly recognized as such.
2017-09-29 13:34:25 +01:00
Hanno Becker
91c194dabb
Add and document an RSA-specific error code for unsupported exports
...
E.g., a private key on an external chip might not be exportable to RAM.
2017-09-29 12:50:12 +01:00
Hanno Becker
5063cd2cca
Deprecate direct manipulation of structure fields in RSA context
2017-09-29 11:54:05 +01:00
Jaeden Amero
1526330931
Allow alternate implementation of GCM
...
Provide the ability to use an alternative implementation of GCM in place
of the library-provided implementation.
2017-09-22 17:42:44 +01:00
Hanno Becker
603b8c62c4
Clarify guarantees made by successful mbedtls_rsa_complete call
2017-08-25 11:03:07 +01:00
Hanno Becker
d363799a9d
Add mbedtls_rsa_validate_crt
...
This commit adds the function mbedtls_rsa_validate_crt for validating a set of CRT parameters. The function
mbedtls_rsa_check_crt is simplified accordingly.
2017-08-25 08:35:09 +01:00
Hanno Becker
750e8b4596
Rename rsa_check_params->rsa_validate_params and change error codes
2017-08-25 08:34:55 +01:00
Hanno Becker
b0c5edcc2f
Correct typo in rsa.h
2017-08-23 22:16:10 +01:00