---
title: P521.KeyAgreement
framework: cryptokit
role: symbol
role_heading: Enumeration
path: cryptokit/p521/keyagreement
---

# P521.KeyAgreement

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

## Declaration

```swift
enum KeyAgreement
```

## Topics

### Using keys

- [P521.KeyAgreement.PrivateKey](cryptokit/p521/keyagreement/privatekey.md)
- [P521.KeyAgreement.PublicKey](cryptokit/p521/keyagreement/publickey.md)

## Relationships

### Conforms To

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

## See Also

### Performing operations

- [P521.Signing](cryptokit/p521/signing.md)
