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

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

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

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