---
title: P256.KeyAgreement
framework: cryptokit
role: symbol
role_heading: Enumeration
path: cryptokit/p256/keyagreement
---

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

## Declaration

```swift
enum KeyAgreement
```

## Topics

### Using keys

- [P256.KeyAgreement.PrivateKey](cryptokit/p256/keyagreement/privatekey.md)
- [P256.KeyAgreement.PublicKey](cryptokit/p256/keyagreement/publickey.md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Performing operations

- [P256.Signing](cryptokit/p256/signing.md)
