---
title: Curve25519.KeyAgreement.PrivateKey
framework: cryptokit
role: symbol
role_heading: Structure
path: cryptokit/curve25519/keyagreement/privatekey
---

# Curve25519.KeyAgreement.PrivateKey

A Curve25519 private key used for key agreement.

## Declaration

```swift
struct PrivateKey
```

## Topics

### Creating a private key

- [init()](cryptokit/curve25519/keyagreement/privatekey/init().md)
- [init(rawRepresentation:)](cryptokit/curve25519/keyagreement/privatekey/init(rawrepresentation:).md)

### Reporting the private key

- [rawRepresentation](cryptokit/curve25519/keyagreement/privatekey/rawrepresentation.md)

### Finding the public key

- [publicKey](cryptokit/curve25519/keyagreement/privatekey/publickey.md)

### Creating a shared secret

- [sharedSecretFromKeyAgreement(with:)](cryptokit/curve25519/keyagreement/privatekey/sharedsecretfromkeyagreement(with:).md)
- [SharedSecret](cryptokit/sharedsecret.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [DiffieHellmanKeyAgreement](cryptokit/diffiehellmankeyagreement.md)
- [Escapable](swift/escapable.md)
- [HPKEDiffieHellmanPrivateKey](cryptokit/hpkediffiehellmanprivatekey.md)
- [HPKEDiffieHellmanPrivateKeyGeneration](cryptokit/hpkediffiehellmanprivatekeygeneration.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Using keys

- [Curve25519.KeyAgreement.PublicKey](cryptokit/curve25519/keyagreement/publickey.md)
