---
title: HPKEPublicKeySerialization
framework: cryptokit
role: symbol
role_heading: Protocol
path: cryptokit/hpkepublickeyserialization
---

# HPKEPublicKeySerialization

A type that HPKE uses to encode the public key.

## Declaration

```swift
@preconcurrency protocol HPKEPublicKeySerialization : Sendable
```

## Topics

### Initializers

- [init(_:kem:)](cryptokit/hpkepublickeyserialization/init(_:kem:).md)

### Instance Methods

- [hpkeRepresentation(kem:)](cryptokit/hpkepublickeyserialization/hpkerepresentation(kem:).md)

## Relationships

### Inherits From

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

### Inherited By

- [HPKEDiffieHellmanPublicKey](cryptokit/hpkediffiehellmanpublickey.md)
- [HPKEKEMPublicKey](cryptokit/hpkekempublickey.md)

### Conforming Types

- [Curve25519.KeyAgreement.PublicKey](cryptokit/curve25519/keyagreement/publickey.md)
- [P256.KeyAgreement.PublicKey](cryptokit/p256/keyagreement/publickey.md)
- [P384.KeyAgreement.PublicKey](cryptokit/p384/keyagreement/publickey.md)
- [P521.KeyAgreement.PublicKey](cryptokit/p521/keyagreement/publickey.md)
- [XWingMLKEM768X25519.PublicKey](cryptokit/xwingmlkem768x25519/publickey.md)
