<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CryptoKit",
  "identifier" : "/documentation/CryptoKit/SecureEnclave/MLKEM768/PrivateKey",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Apple CryptoKit"
    ],
    "preciseIdentifier" : "s:9CryptoKit13SecureEnclaveO8MLKEM768O10PrivateKeyV"
  },
  "title" : "SecureEnclave.MLKEM768.PrivateKey"
}
-->

# SecureEnclave.MLKEM768.PrivateKey

```
struct PrivateKey
```

## Topics

### Creating a private key

[`static func generate() throws -> SecureEnclave.MLKEM768.PrivateKey`](/documentation/CryptoKit/SecureEnclave/MLKEM768/PrivateKey/generate())

Generates a new random private key.

[`init(accessControl: SecAccessControl, authenticationContext: LAContext?) throws`](/documentation/CryptoKit/SecureEnclave/MLKEM768/PrivateKey/init(accessControl:authenticationContext:))

[`init<D>(dataRepresentation: D, authenticationContext: LAContext?) throws`](/documentation/CryptoKit/SecureEnclave/MLKEM768/PrivateKey/init(dataRepresentation:authenticationContext:))

### Accessing the key’s properties

[`let dataRepresentation: Data`](/documentation/CryptoKit/SecureEnclave/MLKEM768/PrivateKey/dataRepresentation)

A data representation of the private key.

[`let publicKey: MLKEM768.PublicKey`](/documentation/CryptoKit/SecureEnclave/MLKEM768/PrivateKey/publicKey)

The corresponding public key.

### Decapsulating shared secrets

[`func decapsulate<D>(D) throws -> SymmetricKey`](/documentation/CryptoKit/SecureEnclave/MLKEM768/PrivateKey/decapsulate(_:))

Decapsulates the encapsulated shared secret

### Initializers

[`init(accessControl: SecAccessControl) throws`](/documentation/CryptoKit/SecureEnclave/MLKEM768/PrivateKey/init(accessControl:))

[`init<D>(dataRepresentation: D) throws`](/documentation/CryptoKit/SecureEnclave/MLKEM768/PrivateKey/init(dataRepresentation:))

## Relationships

### Conforms To

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

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

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

---

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)