Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

disable modp1 by default and deprecate modp2 and modp5 in getDiffieHellman #25372

Closed
wants to merge 1 commit into from

Conversation

thinred
Copy link

@thinred thinred commented May 23, 2015

Fixes #25366 by deprecating modp1, modp2 and modp5 groups in the docs. Some time should be given to the users to update their codebases.

@thinred thinred force-pushed the fix-issue branch 2 times, most recently from 66d5133 to 99adf64 Compare June 18, 2015 00:17
@thinred thinred changed the title deprecate modp1, modp2 and modp5 in getDiffieHellman disable modp1 by default and deprecate modp2 and modp5 in getDiffieHellman Jun 18, 2015
@thinred thinred force-pushed the fix-issue branch 4 times, most recently from b5a8be4 to 8f843dd Compare June 22, 2015 21:20
@mhdawson
Copy link
Member

I think that since this would apply to 0.10.X stream we'd want a PR for merging the change into v0.10 and then we'd merge into 0.12.X and master.

The other question is whether we should add a similar check to crypto.createDiffieHellman(prime_length) as well. ie reject a prime_length smaller than 768 and use the same command line/env variable to allow fallback.

Otherwise the change looks good to me.

@thinred
Copy link
Author

thinred commented Jun 23, 2015

1st question: Ok, I'll rebase it.
2nd question: I'd say that no, the issue primarily applies to well-known groups (but, sure, using a small prime would be an issue, but it was an issue even before).

Btw, is this code the only user of ENABLE_SMALL_DH_GROUPS now?

In particular:
  - DH groups of size < 1024 are disabled by default
    (there is only one such group: modp1)
  - a new cmdline switch --enable-small-dh-groups and
    SMALL_DH_GROUPS_ENABLE env. variable are introduced;
    they override the default setting and therefore enable
    modp1 group
  - the docs & tests are updated
@thinred
Copy link
Author

thinred commented Jun 23, 2015

I created a new PR on top of 0.10 in #25564.

@thinred thinred closed this Jun 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants