---
title: key
framework: authenticationservices
role: symbol
role_heading: Instance Property
path: authenticationservices/asimportablecredential/passkey/key
---

# key

The private key associated with this passkey.

## Declaration

```swift
var key: Data
```

## Discussion

Discussion This value must be a PKCS#8-formatted byte string, and Base64URL-encoded when encoding to JSON.

## See Also

### Accessing passkey properties

- [credentialID](authenticationservices/asimportablecredential/passkey/credentialid.md)
- [relyingPartyIdentifier](authenticationservices/asimportablecredential/passkey/relyingpartyidentifier.md)
- [userName](authenticationservices/asimportablecredential/passkey/username.md)
- [userDisplayName](authenticationservices/asimportablecredential/passkey/userdisplayname.md)
- [userHandle](authenticationservices/asimportablecredential/passkey/userhandle.md)
