Go to file
Jake Massimo 2500c093aa Increase rounds of Miller-Rabin testing DH_check
DH_check is used to test the validity of Diffie-Hellman parameter sets (p, q, g). Among the tests performed are primality tests on p and q, for this BN_is_prime_ex is called with the rounds of Miller-Rabin set as default. This will therefore use the average case error estimates derived from the function BN_prime_checks_for_size based on the bit size of the number tested.

However, these bounds are only accurate on testing random input. Within this testing scenario, where we are checking the validity of a DH parameter set, we can not assert that these parameters are randomly generated. Thus we must treat them as if they are adversarial in nature and increase the rounds of Miller-Rabin performed.

Generally, each round of Miller-Rabin can declare a composite number prime with probability at most (1/4), thus 64 rounds is sufficient in thwarting known generation techniques (even in safe prime settings - see https://eprint.iacr.org/2019/032 for full analysis). The choice of 64 rounds is also consistent with SRP_NUMBER_ITERATIONS_FOR_PRIME 64 as used in srp_Verify_N_and_g in openssl/apps/s_client.c.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8593)
2019-03-27 14:59:25 +00:00
.github
apps Reorganized signature-scheme detection in 'apps/s_cb.c:security_callback_debug' callback-function. 2019-03-20 13:44:02 +00:00
boringssl@2070f8ad91
Configurations Configurations/windows-makefile.tmpl: small fixes 2019-03-15 12:35:39 +01:00
crypto Increase rounds of Miller-Rabin testing DH_check 2019-03-27 14:59:25 +00:00
demos Fix memory leaks in pkread.c demo file 2019-03-13 09:54:49 +00:00
doc Don't allow SHAKE128/SHAKE256 with HMAC 2019-03-27 14:32:08 +00:00
engines Fix strict-warnings build on FreeBSD 2019-03-19 07:19:41 +01:00
external/perl
fuzz Support SM2 certificate verification 2019-03-13 15:29:39 +08:00
include Make err_clear_constant_time really constant time 2019-03-22 14:22:11 +01:00
krb5@b9ad6c4950
ms
os-dep
providers Implement SHA256 in the default provider 2019-03-21 09:23:38 +00:00
pyca-cryptography@09403100de
ssl constify *_dup() and *i2d_*() and related functions as far as possible, introducing DECLARE_ASN1_DUP_FUNCTION 2019-03-06 16:10:09 +00:00
test Don't allow SHAKE128/SHAKE256 with HMAC 2019-03-27 14:32:08 +00:00
tools
util Implement EVP_MD_fetch() 2019-03-21 09:23:38 +00:00
VMS
.gitattributes
.gitignore
.gitmodules
.travis-apt-pin.preferences
.travis-create-release.sh
.travis.yml Update to xenial 2019-03-16 15:53:39 +01:00
ACKNOWLEDGEMENTS
appveyor.yml
AUTHORS
build.info Add a skeleton default provider 2019-03-21 09:23:38 +00:00
CHANGES Single step kdf implementation 2019-03-19 11:03:45 +00:00
config
config.com
Configure Configure: untabify indentation 2019-03-19 09:14:27 +01:00
CONTRIBUTING
e_os.h Limit DEVRANDOM_WAIT to linux 2019-03-07 22:36:31 +01:00
FAQ
INSTALL Configure: disable new trace api by default 2019-03-14 10:32:58 +01:00
LICENSE
NEWS Add a log about the tracing functionality 2019-03-06 11:15:14 +01:00
NOTES.ANDROID
NOTES.DJGPP
NOTES.PERL
NOTES.UNIX
NOTES.VMS
NOTES.WIN
README
README.ENGINE
README.FIPS

 OpenSSL 3.0.0-dev

 Copyright (c) 1998-2018 The OpenSSL Project
 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
 All rights reserved.

 DESCRIPTION
 -----------

 The OpenSSL Project is a collaborative effort to develop a robust,
 commercial-grade, fully featured, and Open Source toolkit implementing the
 Transport Layer Security (TLS) protocols (including SSLv3) as well as a
 full-strength general purpose cryptographic library.

 OpenSSL is descended from the SSLeay library developed by Eric A. Young
 and Tim J. Hudson.

 The OpenSSL toolkit is licensed under the Apache License 2.0, which means
 that you are free to get and use it for commercial and non-commercial
 purposes as long as you fulfill its conditions.

 OVERVIEW
 --------

 The OpenSSL toolkit includes:

 libssl (with platform specific naming):
     Provides the client and server-side implementations for SSLv3 and TLS.

 libcrypto (with platform specific naming):
     Provides general cryptographic and X.509 support needed by SSL/TLS but
     not logically part of it.

 openssl:
     A command line tool that can be used for:
        Creation of key parameters
        Creation of X.509 certificates, CSRs and CRLs
        Calculation of message digests
        Encryption and decryption
        SSL/TLS client and server tests
        Handling of S/MIME signed or encrypted mail
        And more...

 INSTALLATION
 ------------

 See the appropriate file:
        INSTALL         Linux, Unix, Windows, OpenVMS, ...
        NOTES.*         INSTALL addendums for different platforms

 SUPPORT
 -------

 See the OpenSSL website www.openssl.org for details on how to obtain
 commercial technical support. Free community support is available through the
 openssl-users email list (see
 https://www.openssl.org/community/mailinglists.html for further details).

 If you have any problems with OpenSSL then please take the following steps
 first:

    - Download the latest version from the repository
      to see if the problem has already been addressed
    - Configure with no-asm
    - Remove compiler optimization flags

 If you wish to report a bug then please include the following information
 and create an issue on GitHub:

    - OpenSSL version: output of 'openssl version -a'
    - Configuration data: output of 'perl configdata.pm --dump'
    - OS Name, Version, Hardware platform
    - Compiler Details (name, version)
    - Application Details (name, version)
    - Problem Description (steps that will reproduce the problem, if known)
    - Stack Traceback (if the application dumps core)

 Just because something doesn't work the way you expect does not mean it
 is necessarily a bug in OpenSSL. Use the openssl-users email list for this type
 of query.

 HOW TO CONTRIBUTE TO OpenSSL
 ----------------------------

 See CONTRIBUTING

 LEGALITIES
 ----------

 A number of nations restrict the use or export of cryptography. If you
 are potentially subject to such restrictions you should seek competent
 professional legal advice before attempting to develop or distribute
 cryptographic code.