<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CryptoKit",
  "identifier" : "/documentation/CryptoKit/HPKEDiffieHellmanPrivateKeyGeneration",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Apple CryptoKit"
    ],
    "preciseIdentifier" : "s:9CryptoKit37HPKEDiffieHellmanPrivateKeyGenerationP"
  },
  "title" : "HPKEDiffieHellmanPrivateKeyGeneration"
}
-->

# HPKEDiffieHellmanPrivateKeyGeneration

A type that represents the generation of private keys in a Diffie-Hellman key exchange.

```
@preconcurrency protocol HPKEDiffieHellmanPrivateKeyGeneration : HPKEDiffieHellmanPrivateKey
```

## Topics

### Initializers

[`init()`](/documentation/CryptoKit/HPKEDiffieHellmanPrivateKeyGeneration/init())

Creates a private key generator.

## Relationships

### Conforming Types

[`PrivateKey`](/documentation/CryptoKit/P256/KeyAgreement/PrivateKey)

[`PrivateKey`](/documentation/CryptoKit/P384/KeyAgreement/PrivateKey)

[`PrivateKey`](/documentation/CryptoKit/Curve25519/KeyAgreement/PrivateKey)

[`PrivateKey`](/documentation/CryptoKit/P521/KeyAgreement/PrivateKey)

### Inherits From

[`HPKEDiffieHellmanPrivateKey`](/documentation/CryptoKit/HPKEDiffieHellmanPrivateKey)

[`DiffieHellmanKeyAgreement`](/documentation/CryptoKit/DiffieHellmanKeyAgreement)

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

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

---

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)