<!--
{
  "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/MLKEM1024/PrivateKey",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Apple CryptoKit"
    ],
    "preciseIdentifier" : "s:9CryptoKit13SecureEnclaveO9MLKEM1024O10PrivateKeyV"
  },
  "title" : "SecureEnclave.MLKEM1024.PrivateKey"
}
-->

# SecureEnclave.MLKEM1024.PrivateKey

```
struct PrivateKey
```

## Topics

### Creating a private key

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

Generates a new random private key.

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

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

### Accessing a key’s properties

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

A data representation of the private key.

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

The corresponding public key.

### Decapsulating shared secrets

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

Decapsulates the encapsulated shared secret

### Initializers

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

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

## Relationships

### Conforms To

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

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

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

---

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)