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

# XWingMLKEM768X25519.OneTimePrivateKey

```
struct OneTimePrivateKey
```

## Topics

### Instance Properties

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

The corresponding public key.

### Instance Methods

[`func decapsulate(Data) throws -> SymmetricKey`](/documentation/CryptoKit/XWingMLKEM768X25519/OneTimePrivateKey/decapsulate(_:))

Decapsulate a shared secret.

### Type Methods

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

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

## Relationships

### Conforms To

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

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

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