mbedtls/library
Jethro Beekman 97f95c9ef3 Avoid small private exponents during RSA key generation
Attacks against RSA exist for small D. [Wiener] established this for
D < N^0.25. [Boneh] suggests the bound should be N^0.5.

Multiple possible values of D might exist for the same set of E, P, Q. The
attack works when there exists any possible D that is small. To make sure that
the generated key is not susceptible to attack, we need to make sure we have
found the smallest possible D, and then check that D is big enough. The
Carmichael function λ of p*q is lcm(p-1, q-1), so we can apply Carmichael's
theorem to show that D = d mod λ(n) is the smallest.

[Wiener] Michael J. Wiener, "Cryptanalysis of Short RSA Secret Exponents"
[Boneh] Dan Boneh and Glenn Durfee, "Cryptanalysis of RSA with Private Key d Less than N^0.292"
2018-04-11 08:38:37 -07:00
..
.gitignore Split libs with make + general make cleanups 2015-06-25 10:59:56 +02:00
aes.c Merge remote-tracking branch 'upstream-restricted/pr/363' into development-proposed 2018-03-28 11:54:28 +01:00
aesni.c Fix build errors on x32 by using the generic 'add' instruction 2016-05-23 14:29:28 +01:00
arc4.c Adds casts to zeroize functions to allow building as C++ 2016-05-23 14:29:32 +01:00
asn1parse.c Fix 1 byte overread in mbedtls_asn1_get_int() 2016-10-13 13:54:14 +01:00
asn1write.c Add mbedtls_asn1_write_len() support for 3 and 4 byte lengths 2016-08-25 15:42:27 +01:00
base64.c Add comment to integer overflow fix in base64.c 2017-02-15 23:31:07 +02:00
bignum.c Merge branch 'pr_1480' into development-proposed 2018-04-01 12:44:06 +02:00
blowfish.c Adds casts to zeroize functions to allow building as C++ 2016-05-23 14:29:32 +01:00
camellia.c Address user reported coverity issues. 2016-06-07 14:52:35 +01:00
ccm.c Allow alternate core implementation of CCM 2017-04-04 11:37:15 +02:00
certs.c Undo API change from SHA1 deprecation 2017-07-27 21:44:33 +01:00
cipher.c return plaintext data faster on unpadded decryption 2018-03-27 10:55:24 -07:00
cipher_wrap.c Change main license to Apache 2.0 2015-09-04 14:21:07 +02:00
cmac.c Merge branch 'pr_726' into development-proposed 2018-03-22 21:50:48 +01:00
CMakeLists.txt Update version to 2.8.0 2018-03-16 16:25:12 +00:00
ctr_drbg.c ctr_drbg: Typo fix in the file description comment. 2018-02-10 11:11:41 +02:00
debug.c Fix compilation error with Mingw32 2017-09-06 17:51:14 +03:00
des.c Adds casts to zeroize functions to allow building as C++ 2016-05-23 14:29:32 +01:00
dhm.c Merge remote-tracking branch 'upstream-restricted/pr/410' into development-restricted 2018-01-26 18:43:04 +00:00
ecdh.c Address PR cpomments reviews 2017-10-10 19:04:27 +03:00
ecdsa.c Clarify the use of MBEDTLS_ERR_PK_SIG_LEN_MISMATCH 2018-03-30 18:43:16 +02:00
ecjpake.c Add support for alternative ECJPAKE implementation 2018-01-24 10:36:22 +00:00
ecp.c Basic support for Curve448, similar to the current level of support for Curve25519 2018-03-29 14:29:06 +01:00
ecp_curves.c Merge branch 'pr_348' into development-proposed 2018-04-04 09:18:27 +02:00
entropy.c Merge branch 'development' into development-restricted 2018-01-25 17:28:31 +00:00
entropy_poll.c Added checking for QNX operating system to make mbedtls build on QNX 2016-08-18 07:55:05 +02:00
error.c Merge branch 'pr_946' into development-proposed 2018-04-04 10:33:45 +02:00
gcm.c Merge remote-tracking branch 'upstream-public/pr/964' into development 2018-01-02 16:24:29 +01:00
havege.c Fixes warnings found by Clang static analyser 2016-05-23 23:18:26 +01:00
hmac_drbg.c Zeroize tmp bufs in hmac_drbg.c functions 2017-06-26 10:22:24 +01:00
Makefile Merge remote-tracking branch 'upstream-public/pr/1499' into development-proposed 2018-04-01 12:41:22 +02:00
md.c Merge branch 'development' into development-restricted 2018-01-25 17:28:31 +00:00
md2.c MD: Make deprecated functions not inline 2018-02-22 10:24:30 +00:00
md4.c MD: Make deprecated functions not inline 2018-02-22 10:24:30 +00:00
md5.c MD: Make deprecated functions not inline 2018-02-22 10:24:30 +00:00
md_wrap.c New MD API: rename functions from _ext to _ret 2018-01-22 11:54:42 +01:00
memory_buffer_alloc.c Merge branch 'pr_679' into development-proposed 2018-03-13 00:13:29 +01:00
net_sockets.c Additionally initialize fd_set's via memset in mbedtls_net_poll 2018-04-03 16:28:09 +01:00
oid.c pkcs5v2: add support for additional hmacSHA algorithms 2018-02-08 17:18:15 +08:00
padlock.c Change main license to Apache 2.0 2015-09-04 14:21:07 +02:00
pem.c Merge remote-tracking branch 'upstream-public/pr/1406' into development-proposed 2018-03-22 21:52:48 +01:00
pk.c Change PK module preprocessor check on word size 2017-08-04 13:32:15 +01:00
pk_wrap.c Clarify the use of MBEDTLS_ERR_PK_SIG_LEN_MISMATCH 2018-03-30 18:43:16 +02:00
pkcs5.c Fix coding style in pkcs5.c preprocessor directives 2018-03-27 20:53:12 +01:00
pkcs11.c Change main license to Apache 2.0 2015-09-04 14:21:07 +02:00
pkcs12.c Shut up a few clang-analyze warnings about use of uninitialized variables 2016-05-23 14:29:28 +01:00
pkparse.c Fix parsing of PKCS#8 encoded Elliptic Curve keys. 2018-03-22 18:01:18 -07:00
pkwrite.c Adapt PK test suite to use new interface 2017-08-23 16:17:27 +01:00
platform.c Merge remote-tracking branch 'upstream-public/pr/1079' into development-proposed 2018-03-11 00:45:10 +01:00
ripemd160.c MD: Make deprecated functions not inline 2018-02-22 10:24:30 +00:00
rsa.c Avoid small private exponents during RSA key generation 2018-04-11 08:38:37 -07:00
rsa_internal.c Add explicit type cast to avoid truncation warning 2018-01-03 09:27:40 +00:00
sha1.c MD: Make deprecated functions not inline 2018-02-22 10:24:30 +00:00
sha256.c MD: Make deprecated functions not inline 2018-02-22 10:24:30 +00:00
sha512.c MD: Make deprecated functions not inline 2018-02-22 10:24:30 +00:00
ssl_cache.c Address PR review comments 2017-10-29 17:53:52 +02:00
ssl_ciphersuites.c Undo API change 2017-07-27 21:44:33 +01:00
ssl_cli.c Merge remote-tracking branch 'upstream-public/pr/1256' into development-proposed 2018-03-22 21:51:53 +01:00
ssl_cookie.c Fix resource leak when using mutex and ssl_cookie 2017-03-02 12:26:11 +00:00
ssl_srv.c Merge branch 'development' into iotssl-1204 2018-03-28 14:52:35 +01:00
ssl_ticket.c Puts platform time abstraction into its own header 2016-07-13 14:46:18 +01:00
ssl_tls.c Merge branch 'pr_946' into development-proposed 2018-04-04 10:33:45 +02:00
threading.c Do not define and initialize global mutexes on configurations that do not use them. 2018-03-21 15:01:55 +00:00
timing.c Merge remote-tracking branch 'upstream-public/pr/572' into development-proposed 2018-03-27 16:42:20 +01:00
version.c Fix missing void argument declarations #678 2016-11-04 23:05:56 +01:00
version_features.c Basic support for Curve448, similar to the current level of support for Curve25519 2018-03-29 14:29:06 +01:00
x509.c Correctly handle leap year in x509_date_is_valid() 2017-10-12 23:21:37 +01:00
x509_create.c Fix other occurrences of same bounds check issue 2015-10-21 12:50:45 +02:00
x509_crl.c x509: CRL: reject unsupported critical extensions 2018-03-14 09:15:02 +01:00
x509_crt.c Merge tag 'mbedtls-2.8.0' into iotssl-1381-x509-verify-refactor-restricted 2018-03-23 02:16:22 +01:00
x509_csr.c Prevent signed integer overflow in CSR parsing 2017-07-27 21:44:34 +01:00
x509write_crt.c New MD API: rename functions from _ext to _ret 2018-01-22 11:54:42 +01:00
x509write_csr.c Clarify code-paths in x509write_csr and x509write_crt 2017-09-22 16:05:43 +01:00
xtea.c Change main license to Apache 2.0 2015-09-04 14:21:07 +02:00