<!--
{
  "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

[`generate()`](/documentation/CryptoKit/SecureEnclave/MLKEM768/PrivateKey/generate())

Generates a new random private key.

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

[`init(dataRepresentation:authenticationContext:)`](/documentation/CryptoKit/SecureEnclave/MLKEM768/PrivateKey/init(dataRepresentation:authenticationContext:))

### Accessing the key’s properties

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

A data representation of the private key.

[`publicKey`](/documentation/CryptoKit/SecureEnclave/MLKEM768/PrivateKey/publicKey)

The corresponding public key.

### Decapsulating shared secrets

[`decapsulate(_:)`](/documentation/CryptoKit/SecureEnclave/MLKEM768/PrivateKey/decapsulate(_:))

Decapsulates the encapsulated shared secret



---

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)