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

# MLKEM1024.PrivateKey

A private key you use to decapsulate shared secrets with the Module-Lattice key encapsulation mechanism.

```
struct PrivateKey
```

## Topics

### Creating a private key

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

Generates a new, random private key.

[`init() throws`](/documentation/CryptoKit/MLKEM1024/PrivateKey/init())

Initializes a random private key.

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

Initializes a private key from an integrity-checked representation.

[`init<D>(seedRepresentation: D, publicKey: MLKEM1024.PublicKey?) throws`](/documentation/CryptoKit/MLKEM1024/PrivateKey/init(seedRepresentation:publicKey:))

Initializes a private key from a seed representation and optional public key.

### Inspecting a private key’s properties

[`var integrityCheckedRepresentation: Data`](/documentation/CryptoKit/MLKEM1024/PrivateKey/integrityCheckedRepresentation)

An integrity-checked representation of the private key.

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

The corresponding public key.

[`var seedRepresentation: Data`](/documentation/CryptoKit/MLKEM1024/PrivateKey/seedRepresentation)

The private key’s seed representation.

### Decapsulating shared secrets

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

Decapsulate a shared secret.

## Relationships

### Conforms To

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

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

[`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)