---
title: publicKey
framework: HomeKit
role: symbol
role_heading: Instance Property
platforms: [iOS 27.2+, iPadOS 27.2+, Mac Catalyst 27.2+, visionOS 27.2+]
path: homekit/hmhomemanager/pairingidentity/publickey
---

# publicKey

The Ed25519 HAP public key for pairing a HomeKit accessory.

## Declaration

```swift
let publicKey: Data
```

## Overview

Overview The public key has a length of 32 bytes.

## See Also

### Creating a pairing identity

- [init(pairingIdentifier:publicKey:)](homekit/hmhomemanager/pairingidentity/init(pairingidentifier:publickey:).md)
- [pairingIdentifier](homekit/hmhomemanager/pairingidentity/pairingidentifier.md)
