<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CryptoKit",
  "identifier" : "/documentation/CryptoKit/Curve25519/Signing/PrivateKey",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Apple CryptoKit"
    ],
    "preciseIdentifier" : "s:9CryptoKit10Curve25519O7SigningO10PrivateKeyV"
  },
  "title" : "Curve25519.Signing.PrivateKey"
}
-->

# Curve25519.Signing.PrivateKey

A Curve25519 private key used to create cryptographic signatures.

```
struct PrivateKey
```

## Topics

### Creating a private key

[`init()`](/documentation/CryptoKit/Curve25519/Signing/PrivateKey/init())

Creates a random Curve25519 private key for signing.

[`init<D>(rawRepresentation: D) throws`](/documentation/CryptoKit/Curve25519/Signing/PrivateKey/init(rawRepresentation:))

Creates a Curve25519 private key for signing from a data
representation.

### Reporting the private key

[`var rawRepresentation: Data`](/documentation/CryptoKit/Curve25519/Signing/PrivateKey/rawRepresentation)

The raw representation of the key as a collection of contiguous
bytes.

### Finding the public key

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

The corresponding public key.

### Creating a signature

[`func signature<D>(for: D) throws -> Data`](/documentation/CryptoKit/Curve25519/Signing/PrivateKey/signature(for:))

Generates an EdDSA signature over Curve25519.

## Relationships

### Conforms To

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