<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NEVPNIKEv2SecurityAssociationParameters/encryptionAlgorithm",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:objc(cs)NEVPNIKEv2SecurityAssociationParameters(py)encryptionAlgorithm"
  },
  "title" : "encryptionAlgorithm"
}
-->

# encryptionAlgorithm

The algorithm used by the Security Association to encrypt and decrypt data.

```
var encryptionAlgorithm: NEVPNIKEv2EncryptionAlgorithm { get set }
```

## Discussion

The default value of this property is [`NEVPNIKEv2EncryptionAlgorithm.algorithmAES256`](/documentation/NetworkExtension/NEVPNIKEv2EncryptionAlgorithm/algorithmAES256), except on tvOS where the default is [`NEVPNIKEv2EncryptionAlgorithm.algorithmAES256GCM`](/documentation/NetworkExtension/NEVPNIKEv2EncryptionAlgorithm/algorithmAES256GCM).

---

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)