<!--
{
  "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/KeyAgreement",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Apple CryptoKit",
      "CryptoKit"
    ],
    "preciseIdentifier" : "s:9CryptoKit10Curve25519O12KeyAgreementO"
  },
  "title" : "Curve25519.KeyAgreement"
}
-->

# Curve25519.KeyAgreement

A mechanism used to create a shared secret between two users by
performing X25519 key agreement.

```
enum KeyAgreement
```

## Topics

### Using keys

[`PrivateKey`](/documentation/CryptoKit/Curve25519/KeyAgreement/PrivateKey)

A Curve25519 private key used for key agreement.

[`PublicKey`](/documentation/CryptoKit/Curve25519/KeyAgreement/PublicKey)

A Curve25519 public key used for key agreement.

## 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)