<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CryptoKit",
  "identifier" : "/documentation/CryptoKit/ChaChaPoly",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Apple CryptoKit"
    ],
    "preciseIdentifier" : "s:9CryptoKit03ChaC4PolyO"
  },
  "title" : "ChaChaPoly"
}
-->

# ChaChaPoly

An implementation of the ChaCha20-Poly1305 cipher.

```
enum ChaChaPoly
```

## Topics

### Storing the output

[`ChaChaPoly.SealedBox`](/documentation/CryptoKit/ChaChaPoly/SealedBox)

A secure container for your data that you access using a cipher.

### Getting a nonce

[`ChaChaPoly.Nonce`](/documentation/CryptoKit/ChaChaPoly/Nonce)

A value used once during a cryptographic operation and then discarded.

### Securing the plaintext message

[`seal(_:using:nonce:)`](/documentation/CryptoKit/ChaChaPoly/seal(_:using:nonce:))

Secures the given plaintext message with encryption and an
authentication tag.

[`seal(_:using:nonce:authenticating:)`](/documentation/CryptoKit/ChaChaPoly/seal(_:using:nonce:authenticating:))

Secures the given plaintext message with encryption and an
authentication tag that covers both the encrypted data and additional
data.

### Decrypting and verifying the message

[`open(_:using:)`](/documentation/CryptoKit/ChaChaPoly/open(_:using:))

Decrypts the message and verifies its authenticity.

[`open(_:using:authenticating:)`](/documentation/CryptoKit/ChaChaPoly/open(_:using:authenticating:))

Decrypts the message and verifies the authenticity of both the encrypted
message and additional data.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)
