<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NEVPNIKEv2DiffieHellmanGroup",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:@E@NEVPNIKEv2DiffieHellmanGroup"
  },
  "title" : "NEVPNIKEv2DiffieHellmanGroup"
}
-->

# NEVPNIKEv2DiffieHellmanGroup

An enumeration of Diffie-Hellman group values.

```
enum NEVPNIKEv2DiffieHellmanGroup
```

## Topics

### Diffie-Hellman groups

[`NEVPNIKEv2DiffieHellmanGroupInvalid`](/documentation/NetworkExtension/NEVPNIKEv2DiffieHellmanGroup/groupInvalid)

A value indicating the group is not a valid Diffie-Hellman group.

[`NEVPNIKEv2DiffieHellmanGroup14`](/documentation/NetworkExtension/NEVPNIKEv2DiffieHellmanGroup/group14)

Diffie Hellman group 14 (2048-bit modular exponential [MODP]).

[`NEVPNIKEv2DiffieHellmanGroup15`](/documentation/NetworkExtension/NEVPNIKEv2DiffieHellmanGroup/group15)

Diffie Hellman group 15 (3072-bit modular exponential [MODP]).

[`NEVPNIKEv2DiffieHellmanGroup16`](/documentation/NetworkExtension/NEVPNIKEv2DiffieHellmanGroup/group16)

Diffie Hellman group 16 (4096-bit modular exponential [MODP]).

[`NEVPNIKEv2DiffieHellmanGroup17`](/documentation/NetworkExtension/NEVPNIKEv2DiffieHellmanGroup/group17)

Diffie Hellman group 17 (6144-bit modular exponential [MODP]).

[`NEVPNIKEv2DiffieHellmanGroup18`](/documentation/NetworkExtension/NEVPNIKEv2DiffieHellmanGroup/group18)

Diffie Hellman group 18 (8192-bit modular exponential [MODP]).

[`NEVPNIKEv2DiffieHellmanGroup19`](/documentation/NetworkExtension/NEVPNIKEv2DiffieHellmanGroup/group19)

Diffie Hellman group 19 (256-bit random elliptic curve group over GF[P] [ECP]).

[`NEVPNIKEv2DiffieHellmanGroup20`](/documentation/NetworkExtension/NEVPNIKEv2DiffieHellmanGroup/group20)

Diffie Hellman group 20 (384-bit random elliptic curve group over GF[P] [ECP]).

[`NEVPNIKEv2DiffieHellmanGroup21`](/documentation/NetworkExtension/NEVPNIKEv2DiffieHellmanGroup/group21)

Diffie Hellman group 21 (521-bit random elliptic curve group over GF[P] [ECP]).

[`NEVPNIKEv2DiffieHellmanGroup31`](/documentation/NetworkExtension/NEVPNIKEv2DiffieHellmanGroup/group31)

Diffie Hellman group 31 (Curve 25519).

[`NEVPNIKEv2DiffieHellmanGroup32`](/documentation/NetworkExtension/NEVPNIKEv2DiffieHellmanGroup/group32)

Diffie Hellman group 32 (Curve 448).

## Relationships

### Conforms To

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)