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

# MLKEM1024.OneTimePrivateKey

```
struct OneTimePrivateKey
```

## Topics

### Initializers

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

Initializes a random one-time-use private key.

### Instance Properties

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

The corresponding public key.

### Instance Methods

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

Decapsulate a shared secret.

### Type Methods

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

Generates a new, random one-time-use private key.

## Relationships

### Conforms To

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

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

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