---
title: "open(_:authenticating:)"
framework: cryptokit
role: symbol
role_heading: Instance Method
path: "cryptokit/hpke/recipient/open(_:authenticating:)"
---

# open(_:authenticating:)

Decrypts a message, if the ciphertext is valid, verifying the integrity of additional authentication data.

## Declaration

```swift
mutating func open<C, AD>(_ ciphertext: C, authenticating aad: AD) throws -> Data where C : DataProtocol, AD : DataProtocol
```

## Parameters

- `ciphertext`: The ciphertext message to decrypt.
- `aad`: Additional cleartext data to authenticate.

## Return Value

Return Value The resulting cleartext message if the message is authentic.

## Discussion

Discussion You can call this method multiple times to decrypt a series of messages. When using this method, the recipient of the ciphertext messages needs to decrypt them in the same order that the sender encrypts them. The system doesn’t decrypt the additional authentication data in the aad parameter that the recipient uses to verify the message integrity. note: The system throws errors from HPKE.Errors when it encounters them.
