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

# SecureEnclave.P256.KeyAgreement

A mechanism used to create a shared secret between two users by
performing NIST P-256 elliptic curve Diffie Hellman (ECDH) key
exchange within the Secure Enclave.

```
enum KeyAgreement
```

## Topics

### Using keys

[`PrivateKey`](/documentation/CryptoKit/SecureEnclave/P256/KeyAgreement/PrivateKey)

A P-256 private 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)