Skip to content

doc: crypto.createDiffieHellmanGroup() not documented #28523

Description

@bnoordhuis

See title. Class DiffieHellmanGroup isn't documented either.

Usage:

const name = 'modp1';
const dh = crypto.createDiffieHellmanGroup(name);

It takes a well-known modp group as its argument but otherwise works the same as DiffieHellman.

name is taken from RFC 2412 (modp1 and 2) and RFC 3526:

$ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h
modp1  #  768 bits
modp2  # 1024 bits
modp5  # 1536 bits
modp14 # 2048 bits
modp15 # etc.
modp16
modp17
modp18

Activity

  1. added
    cryptoIssues and PRs related to the crypto subsystem.
    docIssues and PRs related to Node.js documentation.
    good first issueIssues that are suitable for first-time contributors.
    on Jul 3, 2019
  2. someone-1 commented on Jul 4, 2019

    @someone-1

    Hi
    is this issue fixed ?
    can i take it up ?

  3. bnoordhuis commented on Jul 4, 2019

    @bnoordhuis
    MemberAuthor

    @someone-1 You're welcome to take it.

  4. someone-1 commented on Jul 5, 2019

    @someone-1

    hi @bnoordhuis

    in the file crypto.js
    module.exports = {
    getDiffieHellman: createDiffieHellmanGroup,
    createDiffieHellmanGroup,
    }
    i think there is 2 things exported with different name.
    and documentation for getDiffieHellman is already present in

    getDiffieHellman in crypto.js
    createDiffieHellmanGroup in crypto.js

    could you suggest me how to proceed ?

    Thank you

  5. bnoordhuis commented on Jul 5, 2019

    @bnoordhuis
    MemberAuthor

    Oh, that's a good point. You could add a section explaining it's an alias and link to crypto.getDiffieHellman().

    Important to note that crypto.createDiffieHellmanGroup() was added in v0.9.3. (Class DiffieHellmanGroup was added in v0.7.5 though.)

  6. joe9111 commented on Jul 7, 2019

    @joe9111

    Hi, I am working on this as well!

  7. olingern commented on Jul 24, 2019

    @olingern

    I believe @Trott merged #28585 in 11c52d9 so it looks like this can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cryptoIssues and PRs related to the crypto subsystem.docIssues and PRs related to Node.js documentation.good first issueIssues that are suitable for first-time contributors.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions